diff --git a/admin/node_modules/.vite/deps/_metadata.json b/admin/node_modules/.vite/deps/_metadata.json index 7aa928d9..604b4a0b 100644 --- a/admin/node_modules/.vite/deps/_metadata.json +++ b/admin/node_modules/.vite/deps/_metadata.json @@ -2,307 +2,370 @@ "hash": "0b0fcdca", "configHash": "0bd4dba1", "lockfileHash": "45a4e0fd", - "browserHash": "0f8eb059", + "browserHash": "f9d297a9", "optimized": { "@element-plus/icons-vue": { "src": "../../@element-plus/icons-vue/dist/index.js", "file": "@element-plus_icons-vue.js", - "fileHash": "63fef99e", + "fileHash": "9f66cf3c", "needsInterop": false }, "axios": { "src": "../../axios/index.js", "file": "axios.js", - "fileHash": "c4c91103", + "fileHash": "d0e8827a", "needsInterop": false }, "dayjs": { "src": "../../dayjs/dayjs.min.js", "file": "dayjs.js", - "fileHash": "45ab92bc", + "fileHash": "67e70480", "needsInterop": true }, "element-plus": { "src": "../../element-plus/es/index.mjs", "file": "element-plus.js", - "fileHash": "a9eb7ac2", + "fileHash": "6462e4a2", "needsInterop": false }, "element-plus/dist/locale/zh-cn.mjs": { "src": "../../element-plus/dist/locale/zh-cn.mjs", "file": "element-plus_dist_locale_zh-cn__mjs.js", - "fileHash": "2e509bd7", + "fileHash": "63d98427", "needsInterop": false }, "pinia": { "src": "../../pinia/dist/pinia.mjs", "file": "pinia.js", - "fileHash": "5573d424", + "fileHash": "1cc5fe52", "needsInterop": false }, "qrcode": { "src": "../../qrcode/lib/browser.js", "file": "qrcode.js", - "fileHash": "2f402876", + "fileHash": "8f92023e", "needsInterop": true }, "vue": { "src": "../../vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "0f609a55", + "fileHash": "97abd90d", "needsInterop": false }, "vue-router": { "src": "../../vue-router/dist/vue-router.mjs", "file": "vue-router.js", - "fileHash": "25c74ef8", + "fileHash": "b189be4f", "needsInterop": false }, "element-plus/es": { "src": "../../element-plus/es/index.mjs", "file": "element-plus_es.js", - "fileHash": "a13f022c", + "fileHash": "4e5350bd", "needsInterop": false }, "element-plus/es/components/base/style/css": { "src": "../../element-plus/es/components/base/style/css.mjs", "file": "element-plus_es_components_base_style_css.js", - "fileHash": "b4220b72", + "fileHash": "2f24955e", "needsInterop": false }, "element-plus/es/components/loading/style/css": { "src": "../../element-plus/es/components/loading/style/css.mjs", "file": "element-plus_es_components_loading_style_css.js", - "fileHash": "0122de81", + "fileHash": "5a7f8660", "needsInterop": false }, "element-plus/es/components/dialog/style/css": { "src": "../../element-plus/es/components/dialog/style/css.mjs", "file": "element-plus_es_components_dialog_style_css.js", - "fileHash": "f74604cc", + "fileHash": "27c0aa21", "needsInterop": false }, "element-plus/es/components/input/style/css": { "src": "../../element-plus/es/components/input/style/css.mjs", "file": "element-plus_es_components_input_style_css.js", - "fileHash": "664f43b9", + "fileHash": "1e44aa38", "needsInterop": false }, "element-plus/es/components/pagination/style/css": { "src": "../../element-plus/es/components/pagination/style/css.mjs", "file": "element-plus_es_components_pagination_style_css.js", - "fileHash": "ff29c02c", + "fileHash": "c46c3f28", "needsInterop": false }, "element-plus/es/components/table/style/css": { "src": "../../element-plus/es/components/table/style/css.mjs", "file": "element-plus_es_components_table_style_css.js", - "fileHash": "9516c0f3", + "fileHash": "f2cad5d9", "needsInterop": false }, "element-plus/es/components/tag/style/css": { "src": "../../element-plus/es/components/tag/style/css.mjs", "file": "element-plus_es_components_tag_style_css.js", - "fileHash": "acc11f71", + "fileHash": "6026e653", "needsInterop": false }, "element-plus/es/components/table-column/style/css": { "src": "../../element-plus/es/components/table-column/style/css.mjs", "file": "element-plus_es_components_table-column_style_css.js", - "fileHash": "63d6cae1", + "fileHash": "20fe1fe1", "needsInterop": false }, "element-plus/es/components/form/style/css": { "src": "../../element-plus/es/components/form/style/css.mjs", "file": "element-plus_es_components_form_style_css.js", - "fileHash": "8d500fe6", + "fileHash": "acb1358d", "needsInterop": false }, "element-plus/es/components/form-item/style/css": { "src": "../../element-plus/es/components/form-item/style/css.mjs", "file": "element-plus_es_components_form-item_style_css.js", - "fileHash": "dff655d7", + "fileHash": "0d000125", "needsInterop": false }, "element-plus/es/components/select/style/css": { "src": "../../element-plus/es/components/select/style/css.mjs", "file": "element-plus_es_components_select_style_css.js", - "fileHash": "18fa9e47", + "fileHash": "f9c4f2b6", "needsInterop": false }, "element-plus/es/components/option/style/css": { "src": "../../element-plus/es/components/option/style/css.mjs", "file": "element-plus_es_components_option_style_css.js", - "fileHash": "ec5bec4c", + "fileHash": "5b17115f", "needsInterop": false }, "element-plus/es/components/button/style/css": { "src": "../../element-plus/es/components/button/style/css.mjs", "file": "element-plus_es_components_button_style_css.js", - "fileHash": "4e0ee820", + "fileHash": "072165a7", "needsInterop": false }, "element-plus/es/components/icon/style/css": { "src": "../../element-plus/es/components/icon/style/css.mjs", "file": "element-plus_es_components_icon_style_css.js", - "fileHash": "d81f84e6", + "fileHash": "91400fe8", "needsInterop": false }, "element-plus/es/components/container/style/css": { "src": "../../element-plus/es/components/container/style/css.mjs", "file": "element-plus_es_components_container_style_css.js", - "fileHash": "05c2c583", + "fileHash": "42960329", "needsInterop": false }, "element-plus/es/components/main/style/css": { "src": "../../element-plus/es/components/main/style/css.mjs", "file": "element-plus_es_components_main_style_css.js", - "fileHash": "a80d717e", + "fileHash": "79d917a7", "needsInterop": false }, "element-plus/es/components/header/style/css": { "src": "../../element-plus/es/components/header/style/css.mjs", "file": "element-plus_es_components_header_style_css.js", - "fileHash": "e687ec69", + "fileHash": "784162ca", "needsInterop": false }, "element-plus/es/components/dropdown/style/css": { "src": "../../element-plus/es/components/dropdown/style/css.mjs", "file": "element-plus_es_components_dropdown_style_css.js", - "fileHash": "59835c76", + "fileHash": "92871da6", "needsInterop": false }, "element-plus/es/components/dropdown-menu/style/css": { "src": "../../element-plus/es/components/dropdown-menu/style/css.mjs", "file": "element-plus_es_components_dropdown-menu_style_css.js", - "fileHash": "23e3be80", + "fileHash": "c0a9f980", "needsInterop": false }, "element-plus/es/components/dropdown-item/style/css": { "src": "../../element-plus/es/components/dropdown-item/style/css.mjs", "file": "element-plus_es_components_dropdown-item_style_css.js", - "fileHash": "85b49429", + "fileHash": "846c18b1", "needsInterop": false }, "element-plus/es/components/avatar/style/css": { "src": "../../element-plus/es/components/avatar/style/css.mjs", "file": "element-plus_es_components_avatar_style_css.js", - "fileHash": "936aa490", + "fileHash": "094b2abf", "needsInterop": false }, "element-plus/es/components/breadcrumb/style/css": { "src": "../../element-plus/es/components/breadcrumb/style/css.mjs", "file": "element-plus_es_components_breadcrumb_style_css.js", - "fileHash": "875c584d", + "fileHash": "6f37c7f8", "needsInterop": false }, "element-plus/es/components/breadcrumb-item/style/css": { "src": "../../element-plus/es/components/breadcrumb-item/style/css.mjs", "file": "element-plus_es_components_breadcrumb-item_style_css.js", - "fileHash": "b43c6781", + "fileHash": "8aabd46b", "needsInterop": false }, "element-plus/es/components/aside/style/css": { "src": "../../element-plus/es/components/aside/style/css.mjs", "file": "element-plus_es_components_aside_style_css.js", - "fileHash": "e712c224", + "fileHash": "3976d9c5", "needsInterop": false }, "element-plus/es/components/menu/style/css": { "src": "../../element-plus/es/components/menu/style/css.mjs", "file": "element-plus_es_components_menu_style_css.js", - "fileHash": "b95e1cd9", + "fileHash": "2fd5552a", "needsInterop": false }, "element-plus/es/components/menu-item/style/css": { "src": "../../element-plus/es/components/menu-item/style/css.mjs", "file": "element-plus_es_components_menu-item_style_css.js", - "fileHash": "c8593318", + "fileHash": "c1f41a14", "needsInterop": false }, "element-plus/es/components/input-number/style/css": { "src": "../../element-plus/es/components/input-number/style/css.mjs", "file": "element-plus_es_components_input-number_style_css.js", - "fileHash": "67b6ba2c", + "fileHash": "f2f57f0e", "needsInterop": false }, "element-plus/es/components/row/style/css": { "src": "../../element-plus/es/components/row/style/css.mjs", "file": "element-plus_es_components_row_style_css.js", - "fileHash": "4e4350dd", + "fileHash": "d116f174", "needsInterop": false }, "element-plus/es/components/col/style/css": { "src": "../../element-plus/es/components/col/style/css.mjs", "file": "element-plus_es_components_col_style_css.js", - "fileHash": "43cd095d", + "fileHash": "df159c48", "needsInterop": false }, "element-plus/es/components/radio-group/style/css": { "src": "../../element-plus/es/components/radio-group/style/css.mjs", "file": "element-plus_es_components_radio-group_style_css.js", - "fileHash": "86c77dd9", + "fileHash": "a88d5658", "needsInterop": false }, "element-plus/es/components/radio/style/css": { "src": "../../element-plus/es/components/radio/style/css.mjs", "file": "element-plus_es_components_radio_style_css.js", - "fileHash": "e7a084fb", + "fileHash": "a04c3aea", + "needsInterop": false + }, + "element-plus/es/components/divider/style/css": { + "src": "../../element-plus/es/components/divider/style/css.mjs", + "file": "element-plus_es_components_divider_style_css.js", + "fileHash": "f4ed4f68", + "needsInterop": false + }, + "element-plus/es/components/autocomplete/style/css": { + "src": "../../element-plus/es/components/autocomplete/style/css.mjs", + "file": "element-plus_es_components_autocomplete_style_css.js", + "fileHash": "44ebd843", + "needsInterop": false + }, + "element-plus/es/components/text/style/css": { + "src": "../../element-plus/es/components/text/style/css.mjs", + "file": "element-plus_es_components_text_style_css.js", + "fileHash": "3ad4a3c9", + "needsInterop": false + }, + "element-plus/es/components/switch/style/css": { + "src": "../../element-plus/es/components/switch/style/css.mjs", + "file": "element-plus_es_components_switch_style_css.js", + "fileHash": "2253b6b1", + "needsInterop": false + }, + "element-plus/es/components/descriptions/style/css": { + "src": "../../element-plus/es/components/descriptions/style/css.mjs", + "file": "element-plus_es_components_descriptions_style_css.js", + "fileHash": "9c51f142", + "needsInterop": false + }, + "element-plus/es/components/descriptions-item/style/css": { + "src": "../../element-plus/es/components/descriptions-item/style/css.mjs", + "file": "element-plus_es_components_descriptions-item_style_css.js", + "fileHash": "48d89583", + "needsInterop": false + }, + "element-plus/es/components/upload/style/css": { + "src": "../../element-plus/es/components/upload/style/css.mjs", + "file": "element-plus_es_components_upload_style_css.js", + "fileHash": "bf70a099", + "needsInterop": false + }, + "element-plus/es/components/image/style/css": { + "src": "../../element-plus/es/components/image/style/css.mjs", + "file": "element-plus_es_components_image_style_css.js", + "fileHash": "d3299a84", + "needsInterop": false + }, + "element-plus/es/components/collapse/style/css": { + "src": "../../element-plus/es/components/collapse/style/css.mjs", + "file": "element-plus_es_components_collapse_style_css.js", + "fileHash": "b737d8d8", + "needsInterop": false + }, + "element-plus/es/components/collapse-item/style/css": { + "src": "../../element-plus/es/components/collapse-item/style/css.mjs", + "file": "element-plus_es_components_collapse-item_style_css.js", + "fileHash": "ac7c5b8f", "needsInterop": false } }, "chunks": { + "chunk-4PW274X2": { + "file": "chunk-4PW274X2.js" + }, + "chunk-JUCAMQ7P": { + "file": "chunk-JUCAMQ7P.js" + }, "chunk-SMFPDFTD": { "file": "chunk-SMFPDFTD.js" }, - "chunk-75C4BP7B": { - "file": "chunk-75C4BP7B.js" - }, - "chunk-5KK3TTMN": { - "file": "chunk-5KK3TTMN.js" - }, - "chunk-UBLR4G7Q": { - "file": "chunk-UBLR4G7Q.js" - }, - "chunk-NKQWFVTF": { - "file": "chunk-NKQWFVTF.js" - }, "chunk-R5DNQ3QC": { "file": "chunk-R5DNQ3QC.js" }, "chunk-B2YDYSZR": { "file": "chunk-B2YDYSZR.js" }, + "chunk-75C4BP7B": { + "file": "chunk-75C4BP7B.js" + }, + "chunk-5KK3TTMN": { + "file": "chunk-5KK3TTMN.js" + }, "chunk-REWOA3VH": { "file": "chunk-REWOA3VH.js" }, "chunk-TX5YLZ4O": { "file": "chunk-TX5YLZ4O.js" }, - "chunk-4PW274X2": { - "file": "chunk-4PW274X2.js" - }, - "chunk-IV6PSERC": { - "file": "chunk-IV6PSERC.js" - }, - "chunk-W7GFOP2W": { - "file": "chunk-W7GFOP2W.js" - }, - "chunk-OP4ZUAFM": { - "file": "chunk-OP4ZUAFM.js" + "chunk-UBLR4G7Q": { + "file": "chunk-UBLR4G7Q.js" }, "chunk-YFT6OQ5R": { "file": "chunk-YFT6OQ5R.js" }, + "chunk-NKQWFVTF": { + "file": "chunk-NKQWFVTF.js" + }, + "chunk-IV6PSERC": { + "file": "chunk-IV6PSERC.js" + }, + "chunk-STH2JMDO": { + "file": "chunk-STH2JMDO.js" + }, "chunk-HYZ2CRGS": { "file": "chunk-HYZ2CRGS.js" }, - "chunk-H2732BJL": { - "file": "chunk-H2732BJL.js" + "chunk-OP4ZUAFM": { + "file": "chunk-OP4ZUAFM.js" }, "chunk-QZC7O2C6": { "file": "chunk-QZC7O2C6.js" }, + "chunk-H2732BJL": { + "file": "chunk-H2732BJL.js" + }, "chunk-G3PMV62Z": { "file": "chunk-G3PMV62Z.js" } diff --git a/admin/node_modules/.vite/deps/chunk-W7GFOP2W.js b/admin/node_modules/.vite/deps/chunk-W7GFOP2W.js deleted file mode 100644 index a51b60f1..00000000 --- a/admin/node_modules/.vite/deps/chunk-W7GFOP2W.js +++ /dev/null @@ -1,73662 +0,0 @@ -import { - arrow_down_default, - arrow_left_default, - arrow_right_default, - arrow_up_default, - back_default, - calendar_default, - caret_right_default, - caret_top_default, - check_default, - circle_check_default, - circle_check_filled_default, - circle_close_default, - circle_close_filled_default, - clock_default, - close_default, - d_arrow_left_default, - d_arrow_right_default, - delete_default, - document_default, - full_screen_default, - hide_default, - info_filled_default, - loading_default, - minus_default, - more_default, - more_filled_default, - picture_filled_default, - plus_default, - question_filled_default, - refresh_left_default, - refresh_right_default, - scale_to_original_default, - search_default, - sort_down_default, - sort_up_default, - star_default, - star_filled_default, - success_filled_default, - view_default, - warning_filled_default, - zoom_in_default, - zoom_out_default -} from "./chunk-OP4ZUAFM.js"; -import { - isVue2 -} from "./chunk-HYZ2CRGS.js"; -import { - Comment, - Fragment, - NOOP, - Teleport, - Text, - Transition, - TransitionGroup, - camelize, - capitalize, - cloneVNode, - computed, - createApp, - createBaseVNode, - createBlock, - createCommentVNode, - createElementBlock, - createSlots, - createTextVNode, - createVNode, - defineComponent, - effectScope, - getCurrentInstance, - getCurrentScope, - guardReactiveProps, - h, - hasOwn, - hyphenate, - inject, - isArray, - isDate, - isFunction, - isObject, - isPlainObject, - isPromise, - isRef, - isString, - isVNode, - markRaw, - mergeProps, - nextTick, - normalizeClass, - normalizeProps, - normalizeStyle, - onActivated, - onBeforeMount, - onBeforeUnmount, - onBeforeUpdate, - onDeactivated, - onMounted, - onScopeDispose, - onUnmounted, - onUpdated, - openBlock, - provide, - reactive, - readonly, - ref, - render, - renderList, - renderSlot, - resolveComponent, - resolveDirective, - resolveDynamicComponent, - shallowReactive, - shallowRef, - toDisplayString, - toHandlerKey, - toHandlers, - toRaw, - toRef, - toRefs, - triggerRef, - unref, - useAttrs, - useSlots, - vModelCheckbox, - vModelRadio, - vModelText, - vShow, - warn, - watch, - watchEffect, - withCtx, - withDirectives, - withKeys, - withModifiers -} from "./chunk-H2732BJL.js"; -import { - require_dayjs_min -} from "./chunk-QZC7O2C6.js"; -import { - __commonJS, - __toESM -} from "./chunk-G3PMV62Z.js"; - -// node_modules/dayjs/plugin/localeData.js -var require_localeData = __commonJS({ - "node_modules/dayjs/plugin/localeData.js"(exports2, module2) { - !function(n, e) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e(); - }(exports2, function() { - "use strict"; - return function(n, e, t) { - var r = e.prototype, o2 = function(n2) { - return n2 && (n2.indexOf ? n2 : n2.s); - }, u2 = function(n2, e2, t2, r2, u3) { - var i2 = n2.name ? n2 : n2.$locale(), a3 = o2(i2[e2]), s3 = o2(i2[t2]), f2 = a3 || s3.map(function(n3) { - return n3.slice(0, r2); - }); - if (!u3) return f2; - var d2 = i2.weekStart; - return f2.map(function(n3, e3) { - return f2[(e3 + (d2 || 0)) % 7]; - }); - }, i = function() { - return t.Ls[t.locale()]; - }, a2 = function(n2, e2) { - return n2.formats[e2] || function(n3) { - return n3.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n4, e3, t2) { - return e3 || t2.slice(1); - }); - }(n2.formats[e2.toUpperCase()]); - }, s2 = function() { - var n2 = this; - return { months: function(e2) { - return e2 ? e2.format("MMMM") : u2(n2, "months"); - }, monthsShort: function(e2) { - return e2 ? e2.format("MMM") : u2(n2, "monthsShort", "months", 3); - }, firstDayOfWeek: function() { - return n2.$locale().weekStart || 0; - }, weekdays: function(e2) { - return e2 ? e2.format("dddd") : u2(n2, "weekdays"); - }, weekdaysMin: function(e2) { - return e2 ? e2.format("dd") : u2(n2, "weekdaysMin", "weekdays", 2); - }, weekdaysShort: function(e2) { - return e2 ? e2.format("ddd") : u2(n2, "weekdaysShort", "weekdays", 3); - }, longDateFormat: function(e2) { - return a2(n2.$locale(), e2); - }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal }; - }; - r.localeData = function() { - return s2.bind(this)(); - }, t.localeData = function() { - var n2 = i(); - return { firstDayOfWeek: function() { - return n2.weekStart || 0; - }, weekdays: function() { - return t.weekdays(); - }, weekdaysShort: function() { - return t.weekdaysShort(); - }, weekdaysMin: function() { - return t.weekdaysMin(); - }, months: function() { - return t.months(); - }, monthsShort: function() { - return t.monthsShort(); - }, longDateFormat: function(e2) { - return a2(n2, e2); - }, meridiem: n2.meridiem, ordinal: n2.ordinal }; - }, t.months = function() { - return u2(i(), "months"); - }, t.monthsShort = function() { - return u2(i(), "monthsShort", "months", 3); - }, t.weekdays = function(n2) { - return u2(i(), "weekdays", null, null, n2); - }, t.weekdaysShort = function(n2) { - return u2(i(), "weekdaysShort", "weekdays", 3, n2); - }, t.weekdaysMin = function(n2) { - return u2(i(), "weekdaysMin", "weekdays", 2, n2); - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/customParseFormat.js -var require_customParseFormat = __commonJS({ - "node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) { - !function(e, t) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t(); - }(exports2, function() { - "use strict"; - var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o2 = /\d*[^-_:/,()\s\d]+/, s2 = {}, a2 = function(e2) { - return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3); - }; - var f2 = function(e2) { - return function(t2) { - this[e2] = +t2; - }; - }, h3 = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) { - (this.zone || (this.zone = {})).offset = function(e3) { - if (!e3) return 0; - if ("Z" === e3) return 0; - var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0); - return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2; - }(e2); - }], u2 = function(e2) { - var t2 = s2[e2]; - return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f)); - }, d2 = function(e2, t2) { - var n2, r2 = s2.meridiem; - if (r2) { - for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) { - n2 = i2 > 12; - break; - } - } else n2 = e2 === (t2 ? "pm" : "PM"); - return n2; - }, c2 = { A: [o2, function(e2) { - this.afternoon = d2(e2, false); - }], a: [o2, function(e2) { - this.afternoon = d2(e2, true); - }], Q: [n, function(e2) { - this.month = 3 * (e2 - 1) + 1; - }], S: [n, function(e2) { - this.milliseconds = 100 * +e2; - }], SS: [r, function(e2) { - this.milliseconds = 10 * +e2; - }], SSS: [/\d{3}/, function(e2) { - this.milliseconds = +e2; - }], s: [i, f2("seconds")], ss: [i, f2("seconds")], m: [i, f2("minutes")], mm: [i, f2("minutes")], H: [i, f2("hours")], h: [i, f2("hours")], HH: [i, f2("hours")], hh: [i, f2("hours")], D: [i, f2("day")], DD: [r, f2("day")], Do: [o2, function(e2) { - var t2 = s2.ordinal, n2 = e2.match(/\d+/); - if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2); - }], w: [i, f2("week")], ww: [r, f2("week")], M: [i, f2("month")], MM: [r, f2("month")], MMM: [o2, function(e2) { - var t2 = u2("months"), n2 = (u2("monthsShort") || t2.map(function(e3) { - return e3.slice(0, 3); - })).indexOf(e2) + 1; - if (n2 < 1) throw new Error(); - this.month = n2 % 12 || n2; - }], MMMM: [o2, function(e2) { - var t2 = u2("months").indexOf(e2) + 1; - if (t2 < 1) throw new Error(); - this.month = t2 % 12 || t2; - }], Y: [/[+-]?\d+/, f2("year")], YY: [r, function(e2) { - this.year = a2(e2); - }], YYYY: [/\d{4}/, f2("year")], Z: h3, ZZ: h3 }; - function l2(n2) { - var r2, i2; - r2 = n2, i2 = s2 && s2.formats; - for (var o3 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) { - var o4 = r3 && r3.toUpperCase(); - return n3 || i2[r3] || e[r3] || i2[o4].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) { - return t3 || n4.slice(1); - }); - })).match(t), a3 = o3.length, f3 = 0; f3 < a3; f3 += 1) { - var h4 = o3[f3], u3 = c2[h4], d3 = u3 && u3[0], l3 = u3 && u3[1]; - o3[f3] = l3 ? { regex: d3, parser: l3 } : h4.replace(/^\[|\]$/g, ""); - } - return function(e2) { - for (var t2 = {}, n3 = 0, r3 = 0; n3 < a3; n3 += 1) { - var i3 = o3[n3]; - if ("string" == typeof i3) r3 += i3.length; - else { - var s3 = i3.regex, f4 = i3.parser, h5 = e2.slice(r3), u4 = s3.exec(h5)[0]; - f4.call(t2, u4), e2 = e2.replace(u4, ""); - } - } - return function(e3) { - var t3 = e3.afternoon; - if (void 0 !== t3) { - var n4 = e3.hours; - t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon; - } - }(t2), t2; - }; - } - return function(e2, t2, n2) { - n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a2 = e2.parseTwoDigitYear); - var r2 = t2.prototype, i2 = r2.parse; - r2.parse = function(e3) { - var t3 = e3.date, r3 = e3.utc, o3 = e3.args; - this.$u = r3; - var a3 = o3[1]; - if ("string" == typeof a3) { - var f3 = true === o3[2], h4 = true === o3[3], u3 = f3 || h4, d3 = o3[2]; - h4 && (d3 = o3[2]), s2 = this.$locale(), !f3 && d3 && (s2 = n2.Ls[d3]), this.$d = function(e4, t4, n3, r4) { - try { - if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4); - var i3 = l2(t4)(e4), o4 = i3.year, s3 = i3.month, a4 = i3.day, f4 = i3.hours, h5 = i3.minutes, u4 = i3.seconds, d4 = i3.milliseconds, c4 = i3.zone, m3 = i3.week, M3 = /* @__PURE__ */ new Date(), Y2 = a4 || (o4 || s3 ? 1 : M3.getDate()), p2 = o4 || M3.getFullYear(), v2 = 0; - o4 && !s3 || (v2 = s3 > 0 ? s3 - 1 : M3.getMonth()); - var D2, w2 = f4 || 0, g = h5 || 0, y = u4 || 0, L = d4 || 0; - return c4 ? new Date(Date.UTC(p2, v2, Y2, w2, g, y, L + 60 * c4.offset * 1e3)) : n3 ? new Date(Date.UTC(p2, v2, Y2, w2, g, y, L)) : (D2 = new Date(p2, v2, Y2, w2, g, y, L), m3 && (D2 = r4(D2).week(m3).toDate()), D2); - } catch (e5) { - return /* @__PURE__ */ new Date(""); - } - }(t3, a3, r3, n2), this.init(), d3 && true !== d3 && (this.$L = this.locale(d3).$L), u3 && t3 != this.format(a3) && (this.$d = /* @__PURE__ */ new Date("")), s2 = {}; - } else if (a3 instanceof Array) for (var c3 = a3.length, m2 = 1; m2 <= c3; m2 += 1) { - o3[1] = a3[m2 - 1]; - var M2 = n2.apply(this, o3); - if (M2.isValid()) { - this.$d = M2.$d, this.$L = M2.$L, this.init(); - break; - } - m2 === c3 && (this.$d = /* @__PURE__ */ new Date("")); - } - else i2.call(this, e3); - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/advancedFormat.js -var require_advancedFormat = __commonJS({ - "node_modules/dayjs/plugin/advancedFormat.js"(exports2, module2) { - !function(e, t) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t(); - }(exports2, function() { - "use strict"; - return function(e, t) { - var r = t.prototype, n = r.format; - r.format = function(e2) { - var t2 = this, r2 = this.$locale(); - if (!this.isValid()) return n.bind(this)(e2); - var s2 = this.$utils(), a2 = (e2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(e3) { - switch (e3) { - case "Q": - return Math.ceil((t2.$M + 1) / 3); - case "Do": - return r2.ordinal(t2.$D); - case "gggg": - return t2.weekYear(); - case "GGGG": - return t2.isoWeekYear(); - case "wo": - return r2.ordinal(t2.week(), "W"); - case "w": - case "ww": - return s2.s(t2.week(), "w" === e3 ? 1 : 2, "0"); - case "W": - case "WW": - return s2.s(t2.isoWeek(), "W" === e3 ? 1 : 2, "0"); - case "k": - case "kk": - return s2.s(String(0 === t2.$H ? 24 : t2.$H), "k" === e3 ? 1 : 2, "0"); - case "X": - return Math.floor(t2.$d.getTime() / 1e3); - case "x": - return t2.$d.getTime(); - case "z": - return "[" + t2.offsetName() + "]"; - case "zzz": - return "[" + t2.offsetName("long") + "]"; - default: - return e3; - } - }); - return n.bind(this)(a2); - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/weekOfYear.js -var require_weekOfYear = __commonJS({ - "node_modules/dayjs/plugin/weekOfYear.js"(exports2, module2) { - !function(e, t) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t(); - }(exports2, function() { - "use strict"; - var e = "week", t = "year"; - return function(i, n, r) { - var f2 = n.prototype; - f2.week = function(i2) { - if (void 0 === i2 && (i2 = null), null !== i2) return this.add(7 * (i2 - this.week()), "day"); - var n2 = this.$locale().yearStart || 1; - if (11 === this.month() && this.date() > 25) { - var f3 = r(this).startOf(t).add(1, t).date(n2), s2 = r(this).endOf(e); - if (f3.isBefore(s2)) return 1; - } - var a2 = r(this).startOf(t).date(n2).startOf(e).subtract(1, "millisecond"), o2 = this.diff(a2, e, true); - return o2 < 0 ? r(this).startOf("week").week() : Math.ceil(o2); - }, f2.weeks = function(e2) { - return void 0 === e2 && (e2 = null), this.week(e2); - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/weekYear.js -var require_weekYear = __commonJS({ - "node_modules/dayjs/plugin/weekYear.js"(exports2, module2) { - !function(e, t) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t(); - }(exports2, function() { - "use strict"; - return function(e, t) { - t.prototype.weekYear = function() { - var e2 = this.month(), t2 = this.week(), n = this.year(); - return 1 === t2 && 11 === e2 ? n + 1 : 0 === e2 && t2 >= 52 ? n - 1 : n; - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/dayOfYear.js -var require_dayOfYear = __commonJS({ - "node_modules/dayjs/plugin/dayOfYear.js"(exports2, module2) { - !function(e, t) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_dayOfYear = t(); - }(exports2, function() { - "use strict"; - return function(e, t, n) { - t.prototype.dayOfYear = function(e2) { - var t2 = Math.round((n(this).startOf("day") - n(this).startOf("year")) / 864e5) + 1; - return null == e2 ? t2 : this.add(e2 - t2, "day"); - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/isSameOrAfter.js -var require_isSameOrAfter = __commonJS({ - "node_modules/dayjs/plugin/isSameOrAfter.js"(exports2, module2) { - !function(e, t) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t(); - }(exports2, function() { - "use strict"; - return function(e, t) { - t.prototype.isSameOrAfter = function(e2, t2) { - return this.isSame(e2, t2) || this.isAfter(e2, t2); - }; - }; - }); - } -}); - -// node_modules/dayjs/plugin/isSameOrBefore.js -var require_isSameOrBefore = __commonJS({ - "node_modules/dayjs/plugin/isSameOrBefore.js"(exports2, module2) { - !function(e, i) { - "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i(); - }(exports2, function() { - "use strict"; - return function(e, i) { - i.prototype.isSameOrBefore = function(e2, i2) { - return this.isSame(e2, i2) || this.isBefore(e2, i2); - }; - }; - }); - } -}); - -// node_modules/element-plus/es/version.mjs -var version = "2.13.1"; - -// node_modules/element-plus/es/constants/key.mjs -var INSTALLED_KEY = Symbol("INSTALLED_KEY"); - -// node_modules/element-plus/es/components/config-provider/src/constants.mjs -var configProviderContextKey = Symbol(); - -// node_modules/element-plus/es/hooks/use-namespace/index.mjs -var defaultNamespace = "el"; -var statePrefix = "is-"; -var _bem = (namespace, block, blockSuffix, element, modifier) => { - let cls = `${namespace}-${block}`; - if (blockSuffix) { - cls += `-${blockSuffix}`; - } - if (element) { - cls += `__${element}`; - } - if (modifier) { - cls += `--${modifier}`; - } - return cls; -}; -var namespaceContextKey = Symbol("namespaceContextKey"); -var useGetDerivedNamespace = (namespaceOverrides) => { - const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace)); - const namespace = computed(() => { - return unref(derivedNamespace) || defaultNamespace; - }); - return namespace; -}; -var useNamespace = (block, namespaceOverrides) => { - const namespace = useGetDerivedNamespace(namespaceOverrides); - const b2 = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", ""); - const e = (element) => element ? _bem(namespace.value, block, "", element, "") : ""; - const m2 = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : ""; - const be2 = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : ""; - const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : ""; - const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : ""; - const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : ""; - const is = (name, ...args) => { - const state = args.length >= 1 ? args[0] : true; - return name && state ? `${statePrefix}${name}` : ""; - }; - const cssVar = (object4) => { - const styles = {}; - for (const key in object4) { - if (object4[key]) { - styles[`--${namespace.value}-${key}`] = object4[key]; - } - } - return styles; - }; - const cssVarBlock = (object4) => { - const styles = {}; - for (const key in object4) { - if (object4[key]) { - styles[`--${namespace.value}-${block}-${key}`] = object4[key]; - } - } - return styles; - }; - const cssVarName = (name) => `--${namespace.value}-${name}`; - const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`; - return { - namespace, - b: b2, - e, - m: m2, - be: be2, - em, - bm, - bem, - is, - cssVar, - cssVarName, - cssVarBlock, - cssVarBlockName - }; -}; - -// node_modules/lodash-es/_freeGlobal.js -var freeGlobal = typeof global == "object" && global && global.Object === Object && global; -var freeGlobal_default = freeGlobal; - -// node_modules/lodash-es/_root.js -var freeSelf = typeof self == "object" && self && self.Object === Object && self; -var root = freeGlobal_default || freeSelf || Function("return this")(); -var root_default = root; - -// node_modules/lodash-es/_Symbol.js -var Symbol2 = root_default.Symbol; -var Symbol_default = Symbol2; - -// node_modules/lodash-es/_getRawTag.js -var objectProto = Object.prototype; -var hasOwnProperty = objectProto.hasOwnProperty; -var nativeObjectToString = objectProto.toString; -var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0; -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - try { - value[symToStringTag] = void 0; - var unmasked = true; - } catch (e) { - } - var result2 = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result2; -} -var getRawTag_default = getRawTag; - -// node_modules/lodash-es/_objectToString.js -var objectProto2 = Object.prototype; -var nativeObjectToString2 = objectProto2.toString; -function objectToString(value) { - return nativeObjectToString2.call(value); -} -var objectToString_default = objectToString; - -// node_modules/lodash-es/_baseGetTag.js -var nullTag = "[object Null]"; -var undefinedTag = "[object Undefined]"; -var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0; -function baseGetTag(value) { - if (value == null) { - return value === void 0 ? undefinedTag : nullTag; - } - return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value); -} -var baseGetTag_default = baseGetTag; - -// node_modules/lodash-es/isObjectLike.js -function isObjectLike(value) { - return value != null && typeof value == "object"; -} -var isObjectLike_default = isObjectLike; - -// node_modules/lodash-es/isSymbol.js -var symbolTag = "[object Symbol]"; -function isSymbol(value) { - return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag; -} -var isSymbol_default = isSymbol; - -// node_modules/lodash-es/_baseToNumber.js -var NAN = 0 / 0; -function baseToNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol_default(value)) { - return NAN; - } - return +value; -} -var baseToNumber_default = baseToNumber; - -// node_modules/lodash-es/_arrayMap.js -function arrayMap(array4, iteratee2) { - var index = -1, length = array4 == null ? 0 : array4.length, result2 = Array(length); - while (++index < length) { - result2[index] = iteratee2(array4[index], index, array4); - } - return result2; -} -var arrayMap_default = arrayMap; - -// node_modules/lodash-es/isArray.js -var isArray2 = Array.isArray; -var isArray_default = isArray2; - -// node_modules/lodash-es/_baseToString.js -var INFINITY = 1 / 0; -var symbolProto = Symbol_default ? Symbol_default.prototype : void 0; -var symbolToString = symbolProto ? symbolProto.toString : void 0; -function baseToString(value) { - if (typeof value == "string") { - return value; - } - if (isArray_default(value)) { - return arrayMap_default(value, baseToString) + ""; - } - if (isSymbol_default(value)) { - return symbolToString ? symbolToString.call(value) : ""; - } - var result2 = value + ""; - return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; -} -var baseToString_default = baseToString; - -// node_modules/lodash-es/_createMathOperation.js -function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result2; - if (value === void 0 && other === void 0) { - return defaultValue; - } - if (value !== void 0) { - result2 = value; - } - if (other !== void 0) { - if (result2 === void 0) { - return other; - } - if (typeof value == "string" || typeof other == "string") { - value = baseToString_default(value); - other = baseToString_default(other); - } else { - value = baseToNumber_default(value); - other = baseToNumber_default(other); - } - result2 = operator(value, other); - } - return result2; - }; -} -var createMathOperation_default = createMathOperation; - -// node_modules/lodash-es/add.js -var add = createMathOperation_default(function(augend, addend) { - return augend + addend; -}, 0); -var add_default = add; - -// node_modules/lodash-es/_trimmedEndIndex.js -var reWhitespace = /\s/; -function trimmedEndIndex(string3) { - var index = string3.length; - while (index-- && reWhitespace.test(string3.charAt(index))) { - } - return index; -} -var trimmedEndIndex_default = trimmedEndIndex; - -// node_modules/lodash-es/_baseTrim.js -var reTrimStart = /^\s+/; -function baseTrim(string3) { - return string3 ? string3.slice(0, trimmedEndIndex_default(string3) + 1).replace(reTrimStart, "") : string3; -} -var baseTrim_default = baseTrim; - -// node_modules/lodash-es/isObject.js -function isObject2(value) { - var type4 = typeof value; - return value != null && (type4 == "object" || type4 == "function"); -} -var isObject_default = isObject2; - -// node_modules/lodash-es/toNumber.js -var NAN2 = 0 / 0; -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -var reIsBinary = /^0b[01]+$/i; -var reIsOctal = /^0o[0-7]+$/i; -var freeParseInt = parseInt; -function toNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol_default(value)) { - return NAN2; - } - if (isObject_default(value)) { - var other = typeof value.valueOf == "function" ? value.valueOf() : value; - value = isObject_default(other) ? other + "" : other; - } - if (typeof value != "string") { - return value === 0 ? value : +value; - } - value = baseTrim_default(value); - var isBinary = reIsBinary.test(value); - return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN2 : +value; -} -var toNumber_default = toNumber; - -// node_modules/lodash-es/toFinite.js -var INFINITY2 = 1 / 0; -var MAX_INTEGER = 17976931348623157e292; -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber_default(value); - if (value === INFINITY2 || value === -INFINITY2) { - var sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} -var toFinite_default = toFinite; - -// node_modules/lodash-es/toInteger.js -function toInteger(value) { - var result2 = toFinite_default(value), remainder = result2 % 1; - return result2 === result2 ? remainder ? result2 - remainder : result2 : 0; -} -var toInteger_default = toInteger; - -// node_modules/lodash-es/after.js -var FUNC_ERROR_TEXT = "Expected a function"; -function after(n, func) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger_default(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; -} -var after_default = after; - -// node_modules/lodash-es/identity.js -function identity(value) { - return value; -} -var identity_default = identity; - -// node_modules/lodash-es/isFunction.js -var asyncTag = "[object AsyncFunction]"; -var funcTag = "[object Function]"; -var genTag = "[object GeneratorFunction]"; -var proxyTag = "[object Proxy]"; -function isFunction2(value) { - if (!isObject_default(value)) { - return false; - } - var tag = baseGetTag_default(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} -var isFunction_default = isFunction2; - -// node_modules/lodash-es/_coreJsData.js -var coreJsData = root_default["__core-js_shared__"]; -var coreJsData_default = coreJsData; - -// node_modules/lodash-es/_isMasked.js -var maskSrcKey = function() { - var uid2 = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || ""); - return uid2 ? "Symbol(src)_1." + uid2 : ""; -}(); -function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; -} -var isMasked_default = isMasked; - -// node_modules/lodash-es/_toSource.js -var funcProto = Function.prototype; -var funcToString = funcProto.toString; -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) { - } - try { - return func + ""; - } catch (e) { - } - } - return ""; -} -var toSource_default = toSource; - -// node_modules/lodash-es/_baseIsNative.js -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; -var reIsHostCtor = /^\[object .+?Constructor\]$/; -var funcProto2 = Function.prototype; -var objectProto3 = Object.prototype; -var funcToString2 = funcProto2.toString; -var hasOwnProperty2 = objectProto3.hasOwnProperty; -var reIsNative = RegExp( - "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" -); -function baseIsNative(value) { - if (!isObject_default(value) || isMasked_default(value)) { - return false; - } - var pattern4 = isFunction_default(value) ? reIsNative : reIsHostCtor; - return pattern4.test(toSource_default(value)); -} -var baseIsNative_default = baseIsNative; - -// node_modules/lodash-es/_getValue.js -function getValue(object4, key) { - return object4 == null ? void 0 : object4[key]; -} -var getValue_default = getValue; - -// node_modules/lodash-es/_getNative.js -function getNative(object4, key) { - var value = getValue_default(object4, key); - return baseIsNative_default(value) ? value : void 0; -} -var getNative_default = getNative; - -// node_modules/lodash-es/_WeakMap.js -var WeakMap2 = getNative_default(root_default, "WeakMap"); -var WeakMap_default = WeakMap2; - -// node_modules/lodash-es/_metaMap.js -var metaMap = WeakMap_default && new WeakMap_default(); -var metaMap_default = metaMap; - -// node_modules/lodash-es/_baseSetData.js -var baseSetData = !metaMap_default ? identity_default : function(func, data) { - metaMap_default.set(func, data); - return func; -}; -var baseSetData_default = baseSetData; - -// node_modules/lodash-es/_baseCreate.js -var objectCreate = Object.create; -var baseCreate = /* @__PURE__ */ function() { - function object4() { - } - return function(proto) { - if (!isObject_default(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object4.prototype = proto; - var result2 = new object4(); - object4.prototype = void 0; - return result2; - }; -}(); -var baseCreate_default = baseCreate; - -// node_modules/lodash-es/_createCtor.js -function createCtor(Ctor) { - return function() { - var args = arguments; - switch (args.length) { - case 0: - return new Ctor(); - case 1: - return new Ctor(args[0]); - case 2: - return new Ctor(args[0], args[1]); - case 3: - return new Ctor(args[0], args[1], args[2]); - case 4: - return new Ctor(args[0], args[1], args[2], args[3]); - case 5: - return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: - return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: - return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate_default(Ctor.prototype), result2 = Ctor.apply(thisBinding, args); - return isObject_default(result2) ? result2 : thisBinding; - }; -} -var createCtor_default = createCtor; - -// node_modules/lodash-es/_createBind.js -var WRAP_BIND_FLAG = 1; -function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor_default(func); - function wrapper() { - var fn2 = this && this !== root_default && this instanceof wrapper ? Ctor : func; - return fn2.apply(isBind ? thisArg : this, arguments); - } - return wrapper; -} -var createBind_default = createBind; - -// node_modules/lodash-es/_apply.js -function apply(func, thisArg, args) { - switch (args.length) { - case 0: - return func.call(thisArg); - case 1: - return func.call(thisArg, args[0]); - case 2: - return func.call(thisArg, args[0], args[1]); - case 3: - return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} -var apply_default = apply; - -// node_modules/lodash-es/_composeArgs.js -var nativeMax = Math.max; -function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array(leftLength + rangeLength), isUncurried = !isCurried; - while (++leftIndex < leftLength) { - result2[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result2[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result2[leftIndex++] = args[argsIndex++]; - } - return result2; -} -var composeArgs_default = composeArgs; - -// node_modules/lodash-es/_composeArgsRight.js -var nativeMax2 = Math.max; -function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax2(argsLength - holdersLength, 0), result2 = Array(rangeLength + rightLength), isUncurried = !isCurried; - while (++argsIndex < rangeLength) { - result2[argsIndex] = args[argsIndex]; - } - var offset3 = argsIndex; - while (++rightIndex < rightLength) { - result2[offset3 + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result2[offset3 + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result2; -} -var composeArgsRight_default = composeArgsRight; - -// node_modules/lodash-es/_countHolders.js -function countHolders(array4, placeholder) { - var length = array4.length, result2 = 0; - while (length--) { - if (array4[length] === placeholder) { - ++result2; - } - } - return result2; -} -var countHolders_default = countHolders; - -// node_modules/lodash-es/_baseLodash.js -function baseLodash() { -} -var baseLodash_default = baseLodash; - -// node_modules/lodash-es/_LazyWrapper.js -var MAX_ARRAY_LENGTH = 4294967295; -function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; -} -LazyWrapper.prototype = baseCreate_default(baseLodash_default.prototype); -LazyWrapper.prototype.constructor = LazyWrapper; -var LazyWrapper_default = LazyWrapper; - -// node_modules/lodash-es/noop.js -function noop() { -} -var noop_default = noop; - -// node_modules/lodash-es/_getData.js -var getData = !metaMap_default ? noop_default : function(func) { - return metaMap_default.get(func); -}; -var getData_default = getData; - -// node_modules/lodash-es/_realNames.js -var realNames = {}; -var realNames_default = realNames; - -// node_modules/lodash-es/_getFuncName.js -var objectProto4 = Object.prototype; -var hasOwnProperty3 = objectProto4.hasOwnProperty; -function getFuncName(func) { - var result2 = func.name + "", array4 = realNames_default[result2], length = hasOwnProperty3.call(realNames_default, result2) ? array4.length : 0; - while (length--) { - var data = array4[length], otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result2; -} -var getFuncName_default = getFuncName; - -// node_modules/lodash-es/_LodashWrapper.js -function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = void 0; -} -LodashWrapper.prototype = baseCreate_default(baseLodash_default.prototype); -LodashWrapper.prototype.constructor = LodashWrapper; -var LodashWrapper_default = LodashWrapper; - -// node_modules/lodash-es/_copyArray.js -function copyArray(source, array4) { - var index = -1, length = source.length; - array4 || (array4 = Array(length)); - while (++index < length) { - array4[index] = source[index]; - } - return array4; -} -var copyArray_default = copyArray; - -// node_modules/lodash-es/_wrapperClone.js -function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper_default) { - return wrapper.clone(); - } - var result2 = new LodashWrapper_default(wrapper.__wrapped__, wrapper.__chain__); - result2.__actions__ = copyArray_default(wrapper.__actions__); - result2.__index__ = wrapper.__index__; - result2.__values__ = wrapper.__values__; - return result2; -} -var wrapperClone_default = wrapperClone; - -// node_modules/lodash-es/wrapperLodash.js -var objectProto5 = Object.prototype; -var hasOwnProperty4 = objectProto5.hasOwnProperty; -function lodash(value) { - if (isObjectLike_default(value) && !isArray_default(value) && !(value instanceof LazyWrapper_default)) { - if (value instanceof LodashWrapper_default) { - return value; - } - if (hasOwnProperty4.call(value, "__wrapped__")) { - return wrapperClone_default(value); - } - } - return new LodashWrapper_default(value); -} -lodash.prototype = baseLodash_default.prototype; -lodash.prototype.constructor = lodash; -var wrapperLodash_default = lodash; - -// node_modules/lodash-es/_isLaziable.js -function isLaziable(func) { - var funcName = getFuncName_default(func), other = wrapperLodash_default[funcName]; - if (typeof other != "function" || !(funcName in LazyWrapper_default.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData_default(other); - return !!data && func === data[0]; -} -var isLaziable_default = isLaziable; - -// node_modules/lodash-es/_shortOut.js -var HOT_COUNT = 800; -var HOT_SPAN = 16; -var nativeNow = Date.now; -function shortOut(func) { - var count = 0, lastCalled = 0; - return function() { - var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(void 0, arguments); - }; -} -var shortOut_default = shortOut; - -// node_modules/lodash-es/_setData.js -var setData = shortOut_default(baseSetData_default); -var setData_default = setData; - -// node_modules/lodash-es/_getWrapDetails.js -var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/; -var reSplitDetails = /,? & /; -function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; -} -var getWrapDetails_default = getWrapDetails; - -// node_modules/lodash-es/_insertWrapDetails.js -var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; -function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; - details = details.join(length > 2 ? ", " : " "); - return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); -} -var insertWrapDetails_default = insertWrapDetails; - -// node_modules/lodash-es/constant.js -function constant(value) { - return function() { - return value; - }; -} -var constant_default = constant; - -// node_modules/lodash-es/_defineProperty.js -var defineProperty = function() { - try { - var func = getNative_default(Object, "defineProperty"); - func({}, "", {}); - return func; - } catch (e) { - } -}(); -var defineProperty_default = defineProperty; - -// node_modules/lodash-es/_baseSetToString.js -var baseSetToString = !defineProperty_default ? identity_default : function(func, string3) { - return defineProperty_default(func, "toString", { - "configurable": true, - "enumerable": false, - "value": constant_default(string3), - "writable": true - }); -}; -var baseSetToString_default = baseSetToString; - -// node_modules/lodash-es/_setToString.js -var setToString = shortOut_default(baseSetToString_default); -var setToString_default = setToString; - -// node_modules/lodash-es/_arrayEach.js -function arrayEach(array4, iteratee2) { - var index = -1, length = array4 == null ? 0 : array4.length; - while (++index < length) { - if (iteratee2(array4[index], index, array4) === false) { - break; - } - } - return array4; -} -var arrayEach_default = arrayEach; - -// node_modules/lodash-es/_baseFindIndex.js -function baseFindIndex(array4, predicate, fromIndex, fromRight) { - var length = array4.length, index = fromIndex + (fromRight ? 1 : -1); - while (fromRight ? index-- : ++index < length) { - if (predicate(array4[index], index, array4)) { - return index; - } - } - return -1; -} -var baseFindIndex_default = baseFindIndex; - -// node_modules/lodash-es/_baseIsNaN.js -function baseIsNaN(value) { - return value !== value; -} -var baseIsNaN_default = baseIsNaN; - -// node_modules/lodash-es/_strictIndexOf.js -function strictIndexOf(array4, value, fromIndex) { - var index = fromIndex - 1, length = array4.length; - while (++index < length) { - if (array4[index] === value) { - return index; - } - } - return -1; -} -var strictIndexOf_default = strictIndexOf; - -// node_modules/lodash-es/_baseIndexOf.js -function baseIndexOf(array4, value, fromIndex) { - return value === value ? strictIndexOf_default(array4, value, fromIndex) : baseFindIndex_default(array4, baseIsNaN_default, fromIndex); -} -var baseIndexOf_default = baseIndexOf; - -// node_modules/lodash-es/_arrayIncludes.js -function arrayIncludes(array4, value) { - var length = array4 == null ? 0 : array4.length; - return !!length && baseIndexOf_default(array4, value, 0) > -1; -} -var arrayIncludes_default = arrayIncludes; - -// node_modules/lodash-es/_updateWrapDetails.js -var WRAP_BIND_FLAG2 = 1; -var WRAP_BIND_KEY_FLAG = 2; -var WRAP_CURRY_FLAG = 8; -var WRAP_CURRY_RIGHT_FLAG = 16; -var WRAP_PARTIAL_FLAG = 32; -var WRAP_PARTIAL_RIGHT_FLAG = 64; -var WRAP_ARY_FLAG = 128; -var WRAP_REARG_FLAG = 256; -var WRAP_FLIP_FLAG = 512; -var wrapFlags = [ - ["ary", WRAP_ARY_FLAG], - ["bind", WRAP_BIND_FLAG2], - ["bindKey", WRAP_BIND_KEY_FLAG], - ["curry", WRAP_CURRY_FLAG], - ["curryRight", WRAP_CURRY_RIGHT_FLAG], - ["flip", WRAP_FLIP_FLAG], - ["partial", WRAP_PARTIAL_FLAG], - ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], - ["rearg", WRAP_REARG_FLAG] -]; -function updateWrapDetails(details, bitmask) { - arrayEach_default(wrapFlags, function(pair) { - var value = "_." + pair[0]; - if (bitmask & pair[1] && !arrayIncludes_default(details, value)) { - details.push(value); - } - }); - return details.sort(); -} -var updateWrapDetails_default = updateWrapDetails; - -// node_modules/lodash-es/_setWrapToString.js -function setWrapToString(wrapper, reference, bitmask) { - var source = reference + ""; - return setToString_default(wrapper, insertWrapDetails_default(source, updateWrapDetails_default(getWrapDetails_default(source), bitmask))); -} -var setWrapToString_default = setWrapToString; - -// node_modules/lodash-es/_createRecurry.js -var WRAP_BIND_FLAG3 = 1; -var WRAP_BIND_KEY_FLAG2 = 2; -var WRAP_CURRY_BOUND_FLAG = 4; -var WRAP_CURRY_FLAG2 = 8; -var WRAP_PARTIAL_FLAG2 = 32; -var WRAP_PARTIAL_RIGHT_FLAG2 = 64; -function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG2, newHolders = isCurry ? holders : void 0, newHoldersRight = isCurry ? void 0 : holders, newPartials = isCurry ? partials : void 0, newPartialsRight = isCurry ? void 0 : partials; - bitmask |= isCurry ? WRAP_PARTIAL_FLAG2 : WRAP_PARTIAL_RIGHT_FLAG2; - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG2 : WRAP_PARTIAL_FLAG2); - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG3 | WRAP_BIND_KEY_FLAG2); - } - var newData = [ - func, - bitmask, - thisArg, - newPartials, - newHolders, - newPartialsRight, - newHoldersRight, - argPos, - ary2, - arity - ]; - var result2 = wrapFunc.apply(void 0, newData); - if (isLaziable_default(func)) { - setData_default(result2, newData); - } - result2.placeholder = placeholder; - return setWrapToString_default(result2, func, bitmask); -} -var createRecurry_default = createRecurry; - -// node_modules/lodash-es/_getHolder.js -function getHolder(func) { - var object4 = func; - return object4.placeholder; -} -var getHolder_default = getHolder; - -// node_modules/lodash-es/_isIndex.js -var MAX_SAFE_INTEGER = 9007199254740991; -var reIsUint = /^(?:0|[1-9]\d*)$/; -function isIndex(value, length) { - var type4 = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (type4 == "number" || type4 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); -} -var isIndex_default = isIndex; - -// node_modules/lodash-es/_reorder.js -var nativeMin = Math.min; -function reorder(array4, indexes) { - var arrLength = array4.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray_default(array4); - while (length--) { - var index = indexes[length]; - array4[length] = isIndex_default(index, arrLength) ? oldArray[index] : void 0; - } - return array4; -} -var reorder_default = reorder; - -// node_modules/lodash-es/_replaceHolders.js -var PLACEHOLDER = "__lodash_placeholder__"; -function replaceHolders(array4, placeholder) { - var index = -1, length = array4.length, resIndex = 0, result2 = []; - while (++index < length) { - var value = array4[index]; - if (value === placeholder || value === PLACEHOLDER) { - array4[index] = PLACEHOLDER; - result2[resIndex++] = index; - } - } - return result2; -} -var replaceHolders_default = replaceHolders; - -// node_modules/lodash-es/_createHybrid.js -var WRAP_BIND_FLAG4 = 1; -var WRAP_BIND_KEY_FLAG3 = 2; -var WRAP_CURRY_FLAG3 = 8; -var WRAP_CURRY_RIGHT_FLAG2 = 16; -var WRAP_ARY_FLAG2 = 128; -var WRAP_FLIP_FLAG2 = 512; -function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) { - var isAry = bitmask & WRAP_ARY_FLAG2, isBind = bitmask & WRAP_BIND_FLAG4, isBindKey = bitmask & WRAP_BIND_KEY_FLAG3, isCurried = bitmask & (WRAP_CURRY_FLAG3 | WRAP_CURRY_RIGHT_FLAG2), isFlip = bitmask & WRAP_FLIP_FLAG2, Ctor = isBindKey ? void 0 : createCtor_default(func); - function wrapper() { - var length = arguments.length, args = Array(length), index = length; - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder_default(wrapper), holdersCount = countHolders_default(args, placeholder); - } - if (partials) { - args = composeArgs_default(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight_default(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders_default(args, placeholder); - return createRecurry_default( - func, - bitmask, - createHybrid, - wrapper.placeholder, - thisArg, - args, - newHolders, - argPos, - ary2, - arity - length - ); - } - var thisBinding = isBind ? thisArg : this, fn2 = isBindKey ? thisBinding[func] : func; - length = args.length; - if (argPos) { - args = reorder_default(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary2 < length) { - args.length = ary2; - } - if (this && this !== root_default && this instanceof wrapper) { - fn2 = Ctor || createCtor_default(fn2); - } - return fn2.apply(thisBinding, args); - } - return wrapper; -} -var createHybrid_default = createHybrid; - -// node_modules/lodash-es/_createCurry.js -function createCurry(func, bitmask, arity) { - var Ctor = createCtor_default(func); - function wrapper() { - var length = arguments.length, args = Array(length), index = length, placeholder = getHolder_default(wrapper); - while (index--) { - args[index] = arguments[index]; - } - var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders_default(args, placeholder); - length -= holders.length; - if (length < arity) { - return createRecurry_default( - func, - bitmask, - createHybrid_default, - wrapper.placeholder, - void 0, - args, - holders, - void 0, - void 0, - arity - length - ); - } - var fn2 = this && this !== root_default && this instanceof wrapper ? Ctor : func; - return apply_default(fn2, this, args); - } - return wrapper; -} -var createCurry_default = createCurry; - -// node_modules/lodash-es/_createPartial.js -var WRAP_BIND_FLAG5 = 1; -function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG5, Ctor = createCtor_default(func); - function wrapper() { - var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn2 = this && this !== root_default && this instanceof wrapper ? Ctor : func; - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply_default(fn2, isBind ? thisArg : this, args); - } - return wrapper; -} -var createPartial_default = createPartial; - -// node_modules/lodash-es/_mergeData.js -var PLACEHOLDER2 = "__lodash_placeholder__"; -var WRAP_BIND_FLAG6 = 1; -var WRAP_BIND_KEY_FLAG4 = 2; -var WRAP_CURRY_BOUND_FLAG2 = 4; -var WRAP_CURRY_FLAG4 = 8; -var WRAP_ARY_FLAG3 = 128; -var WRAP_REARG_FLAG2 = 256; -var nativeMin2 = Math.min; -function mergeData(data, source) { - var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG6 | WRAP_BIND_KEY_FLAG4 | WRAP_ARY_FLAG3); - var isCombo = srcBitmask == WRAP_ARY_FLAG3 && bitmask == WRAP_CURRY_FLAG4 || srcBitmask == WRAP_ARY_FLAG3 && bitmask == WRAP_REARG_FLAG2 && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG3 | WRAP_REARG_FLAG2) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG4; - if (!(isCommon || isCombo)) { - return data; - } - if (srcBitmask & WRAP_BIND_FLAG6) { - data[2] = source[2]; - newBitmask |= bitmask & WRAP_BIND_FLAG6 ? 0 : WRAP_CURRY_BOUND_FLAG2; - } - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs_default(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders_default(data[3], PLACEHOLDER2) : source[4]; - } - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight_default(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders_default(data[5], PLACEHOLDER2) : source[6]; - } - value = source[7]; - if (value) { - data[7] = value; - } - if (srcBitmask & WRAP_ARY_FLAG3) { - data[8] = data[8] == null ? source[8] : nativeMin2(data[8], source[8]); - } - if (data[9] == null) { - data[9] = source[9]; - } - data[0] = source[0]; - data[1] = newBitmask; - return data; -} -var mergeData_default = mergeData; - -// node_modules/lodash-es/_createWrap.js -var FUNC_ERROR_TEXT2 = "Expected a function"; -var WRAP_BIND_FLAG7 = 1; -var WRAP_BIND_KEY_FLAG5 = 2; -var WRAP_CURRY_FLAG5 = 8; -var WRAP_CURRY_RIGHT_FLAG3 = 16; -var WRAP_PARTIAL_FLAG3 = 32; -var WRAP_PARTIAL_RIGHT_FLAG3 = 64; -var nativeMax3 = Math.max; -function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG5; - if (!isBindKey && typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT2); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG3 | WRAP_PARTIAL_RIGHT_FLAG3); - partials = holders = void 0; - } - ary2 = ary2 === void 0 ? ary2 : nativeMax3(toInteger_default(ary2), 0); - arity = arity === void 0 ? arity : toInteger_default(arity); - length -= holders ? holders.length : 0; - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG3) { - var partialsRight = partials, holdersRight = holders; - partials = holders = void 0; - } - var data = isBindKey ? void 0 : getData_default(func); - var newData = [ - func, - bitmask, - thisArg, - partials, - holders, - partialsRight, - holdersRight, - argPos, - ary2, - arity - ]; - if (data) { - mergeData_default(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === void 0 ? isBindKey ? 0 : func.length : nativeMax3(newData[9] - length, 0); - if (!arity && bitmask & (WRAP_CURRY_FLAG5 | WRAP_CURRY_RIGHT_FLAG3)) { - bitmask &= ~(WRAP_CURRY_FLAG5 | WRAP_CURRY_RIGHT_FLAG3); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG7) { - var result2 = createBind_default(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG5 || bitmask == WRAP_CURRY_RIGHT_FLAG3) { - result2 = createCurry_default(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG3 || bitmask == (WRAP_BIND_FLAG7 | WRAP_PARTIAL_FLAG3)) && !holders.length) { - result2 = createPartial_default(func, bitmask, thisArg, partials); - } else { - result2 = createHybrid_default.apply(void 0, newData); - } - var setter = data ? baseSetData_default : setData_default; - return setWrapToString_default(setter(result2, newData), func, bitmask); -} -var createWrap_default = createWrap; - -// node_modules/lodash-es/ary.js -var WRAP_ARY_FLAG4 = 128; -function ary(func, n, guard) { - n = guard ? void 0 : n; - n = func && n == null ? func.length : n; - return createWrap_default(func, WRAP_ARY_FLAG4, void 0, void 0, void 0, void 0, n); -} -var ary_default = ary; - -// node_modules/lodash-es/_baseAssignValue.js -function baseAssignValue(object4, key, value) { - if (key == "__proto__" && defineProperty_default) { - defineProperty_default(object4, key, { - "configurable": true, - "enumerable": true, - "value": value, - "writable": true - }); - } else { - object4[key] = value; - } -} -var baseAssignValue_default = baseAssignValue; - -// node_modules/lodash-es/eq.js -function eq(value, other) { - return value === other || value !== value && other !== other; -} -var eq_default = eq; - -// node_modules/lodash-es/_assignValue.js -var objectProto6 = Object.prototype; -var hasOwnProperty5 = objectProto6.hasOwnProperty; -function assignValue(object4, key, value) { - var objValue = object4[key]; - if (!(hasOwnProperty5.call(object4, key) && eq_default(objValue, value)) || value === void 0 && !(key in object4)) { - baseAssignValue_default(object4, key, value); - } -} -var assignValue_default = assignValue; - -// node_modules/lodash-es/_copyObject.js -function copyObject(source, props2, object4, customizer) { - var isNew = !object4; - object4 || (object4 = {}); - var index = -1, length = props2.length; - while (++index < length) { - var key = props2[index]; - var newValue = customizer ? customizer(object4[key], source[key], key, object4, source) : void 0; - if (newValue === void 0) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue_default(object4, key, newValue); - } else { - assignValue_default(object4, key, newValue); - } - } - return object4; -} -var copyObject_default = copyObject; - -// node_modules/lodash-es/_overRest.js -var nativeMax4 = Math.max; -function overRest(func, start, transform2) { - start = nativeMax4(start === void 0 ? func.length - 1 : start, 0); - return function() { - var args = arguments, index = -1, length = nativeMax4(args.length - start, 0), array4 = Array(length); - while (++index < length) { - array4[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform2(array4); - return apply_default(func, this, otherArgs); - }; -} -var overRest_default = overRest; - -// node_modules/lodash-es/_baseRest.js -function baseRest(func, start) { - return setToString_default(overRest_default(func, start, identity_default), func + ""); -} -var baseRest_default = baseRest; - -// node_modules/lodash-es/isLength.js -var MAX_SAFE_INTEGER2 = 9007199254740991; -function isLength(value) { - return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2; -} -var isLength_default = isLength; - -// node_modules/lodash-es/isArrayLike.js -function isArrayLike(value) { - return value != null && isLength_default(value.length) && !isFunction_default(value); -} -var isArrayLike_default = isArrayLike; - -// node_modules/lodash-es/_isIterateeCall.js -function isIterateeCall(value, index, object4) { - if (!isObject_default(object4)) { - return false; - } - var type4 = typeof index; - if (type4 == "number" ? isArrayLike_default(object4) && isIndex_default(index, object4.length) : type4 == "string" && index in object4) { - return eq_default(object4[index], value); - } - return false; -} -var isIterateeCall_default = isIterateeCall; - -// node_modules/lodash-es/_createAssigner.js -function createAssigner(assigner) { - return baseRest_default(function(object4, sources) { - var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; - customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; - if (guard && isIterateeCall_default(sources[0], sources[1], guard)) { - customizer = length < 3 ? void 0 : customizer; - length = 1; - } - object4 = Object(object4); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object4, source, index, customizer); - } - } - return object4; - }); -} -var createAssigner_default = createAssigner; - -// node_modules/lodash-es/_isPrototype.js -var objectProto7 = Object.prototype; -function isPrototype(value) { - var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto7; - return value === proto; -} -var isPrototype_default = isPrototype; - -// node_modules/lodash-es/_baseTimes.js -function baseTimes(n, iteratee2) { - var index = -1, result2 = Array(n); - while (++index < n) { - result2[index] = iteratee2(index); - } - return result2; -} -var baseTimes_default = baseTimes; - -// node_modules/lodash-es/_baseIsArguments.js -var argsTag = "[object Arguments]"; -function baseIsArguments(value) { - return isObjectLike_default(value) && baseGetTag_default(value) == argsTag; -} -var baseIsArguments_default = baseIsArguments; - -// node_modules/lodash-es/isArguments.js -var objectProto8 = Object.prototype; -var hasOwnProperty6 = objectProto8.hasOwnProperty; -var propertyIsEnumerable = objectProto8.propertyIsEnumerable; -var isArguments = baseIsArguments_default(/* @__PURE__ */ function() { - return arguments; -}()) ? baseIsArguments_default : function(value) { - return isObjectLike_default(value) && hasOwnProperty6.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); -}; -var isArguments_default = isArguments; - -// node_modules/lodash-es/stubFalse.js -function stubFalse() { - return false; -} -var stubFalse_default = stubFalse; - -// node_modules/lodash-es/isBuffer.js -var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports; -var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module; -var moduleExports = freeModule && freeModule.exports === freeExports; -var Buffer = moduleExports ? root_default.Buffer : void 0; -var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0; -var isBuffer = nativeIsBuffer || stubFalse_default; -var isBuffer_default = isBuffer; - -// node_modules/lodash-es/_baseIsTypedArray.js -var argsTag2 = "[object Arguments]"; -var arrayTag = "[object Array]"; -var boolTag = "[object Boolean]"; -var dateTag = "[object Date]"; -var errorTag = "[object Error]"; -var funcTag2 = "[object Function]"; -var mapTag = "[object Map]"; -var numberTag = "[object Number]"; -var objectTag = "[object Object]"; -var regexpTag = "[object RegExp]"; -var setTag = "[object Set]"; -var stringTag = "[object String]"; -var weakMapTag = "[object WeakMap]"; -var arrayBufferTag = "[object ArrayBuffer]"; -var dataViewTag = "[object DataView]"; -var float32Tag = "[object Float32Array]"; -var float64Tag = "[object Float64Array]"; -var int8Tag = "[object Int8Array]"; -var int16Tag = "[object Int16Array]"; -var int32Tag = "[object Int32Array]"; -var uint8Tag = "[object Uint8Array]"; -var uint8ClampedTag = "[object Uint8ClampedArray]"; -var uint16Tag = "[object Uint16Array]"; -var uint32Tag = "[object Uint32Array]"; -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; -function baseIsTypedArray(value) { - return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)]; -} -var baseIsTypedArray_default = baseIsTypedArray; - -// node_modules/lodash-es/_baseUnary.js -function baseUnary(func) { - return function(value) { - return func(value); - }; -} -var baseUnary_default = baseUnary; - -// node_modules/lodash-es/_nodeUtil.js -var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports; -var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module; -var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2; -var freeProcess = moduleExports2 && freeGlobal_default.process; -var nodeUtil = function() { - try { - var types2 = freeModule2 && freeModule2.require && freeModule2.require("util").types; - if (types2) { - return types2; - } - return freeProcess && freeProcess.binding && freeProcess.binding("util"); - } catch (e) { - } -}(); -var nodeUtil_default = nodeUtil; - -// node_modules/lodash-es/isTypedArray.js -var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray; -var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default; -var isTypedArray_default = isTypedArray; - -// node_modules/lodash-es/_arrayLikeKeys.js -var objectProto9 = Object.prototype; -var hasOwnProperty7 = objectProto9.hasOwnProperty; -function arrayLikeKeys(value, inherited) { - var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes_default(value.length, String) : [], length = result2.length; - for (var key in value) { - if ((inherited || hasOwnProperty7.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. - (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. - isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. - isIndex_default(key, length)))) { - result2.push(key); - } - } - return result2; -} -var arrayLikeKeys_default = arrayLikeKeys; - -// node_modules/lodash-es/_overArg.js -function overArg(func, transform2) { - return function(arg) { - return func(transform2(arg)); - }; -} -var overArg_default = overArg; - -// node_modules/lodash-es/_nativeKeys.js -var nativeKeys = overArg_default(Object.keys, Object); -var nativeKeys_default = nativeKeys; - -// node_modules/lodash-es/_baseKeys.js -var objectProto10 = Object.prototype; -var hasOwnProperty8 = objectProto10.hasOwnProperty; -function baseKeys(object4) { - if (!isPrototype_default(object4)) { - return nativeKeys_default(object4); - } - var result2 = []; - for (var key in Object(object4)) { - if (hasOwnProperty8.call(object4, key) && key != "constructor") { - result2.push(key); - } - } - return result2; -} -var baseKeys_default = baseKeys; - -// node_modules/lodash-es/keys.js -function keys(object4) { - return isArrayLike_default(object4) ? arrayLikeKeys_default(object4) : baseKeys_default(object4); -} -var keys_default = keys; - -// node_modules/lodash-es/assign.js -var objectProto11 = Object.prototype; -var hasOwnProperty9 = objectProto11.hasOwnProperty; -var assign = createAssigner_default(function(object4, source) { - if (isPrototype_default(source) || isArrayLike_default(source)) { - copyObject_default(source, keys_default(source), object4); - return; - } - for (var key in source) { - if (hasOwnProperty9.call(source, key)) { - assignValue_default(object4, key, source[key]); - } - } -}); -var assign_default = assign; - -// node_modules/lodash-es/_nativeKeysIn.js -function nativeKeysIn(object4) { - var result2 = []; - if (object4 != null) { - for (var key in Object(object4)) { - result2.push(key); - } - } - return result2; -} -var nativeKeysIn_default = nativeKeysIn; - -// node_modules/lodash-es/_baseKeysIn.js -var objectProto12 = Object.prototype; -var hasOwnProperty10 = objectProto12.hasOwnProperty; -function baseKeysIn(object4) { - if (!isObject_default(object4)) { - return nativeKeysIn_default(object4); - } - var isProto = isPrototype_default(object4), result2 = []; - for (var key in object4) { - if (!(key == "constructor" && (isProto || !hasOwnProperty10.call(object4, key)))) { - result2.push(key); - } - } - return result2; -} -var baseKeysIn_default = baseKeysIn; - -// node_modules/lodash-es/keysIn.js -function keysIn(object4) { - return isArrayLike_default(object4) ? arrayLikeKeys_default(object4, true) : baseKeysIn_default(object4); -} -var keysIn_default = keysIn; - -// node_modules/lodash-es/assignIn.js -var assignIn = createAssigner_default(function(object4, source) { - copyObject_default(source, keysIn_default(source), object4); -}); -var assignIn_default = assignIn; - -// node_modules/lodash-es/assignInWith.js -var assignInWith = createAssigner_default(function(object4, source, srcIndex, customizer) { - copyObject_default(source, keysIn_default(source), object4, customizer); -}); -var assignInWith_default = assignInWith; - -// node_modules/lodash-es/assignWith.js -var assignWith = createAssigner_default(function(object4, source, srcIndex, customizer) { - copyObject_default(source, keys_default(source), object4, customizer); -}); -var assignWith_default = assignWith; - -// node_modules/lodash-es/_isKey.js -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; -var reIsPlainProp = /^\w*$/; -function isKey(value, object4) { - if (isArray_default(value)) { - return false; - } - var type4 = typeof value; - if (type4 == "number" || type4 == "symbol" || type4 == "boolean" || value == null || isSymbol_default(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object4 != null && value in Object(object4); -} -var isKey_default = isKey; - -// node_modules/lodash-es/_nativeCreate.js -var nativeCreate = getNative_default(Object, "create"); -var nativeCreate_default = nativeCreate; - -// node_modules/lodash-es/_hashClear.js -function hashClear() { - this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {}; - this.size = 0; -} -var hashClear_default = hashClear; - -// node_modules/lodash-es/_hashDelete.js -function hashDelete(key) { - var result2 = this.has(key) && delete this.__data__[key]; - this.size -= result2 ? 1 : 0; - return result2; -} -var hashDelete_default = hashDelete; - -// node_modules/lodash-es/_hashGet.js -var HASH_UNDEFINED = "__lodash_hash_undefined__"; -var objectProto13 = Object.prototype; -var hasOwnProperty11 = objectProto13.hasOwnProperty; -function hashGet(key) { - var data = this.__data__; - if (nativeCreate_default) { - var result2 = data[key]; - return result2 === HASH_UNDEFINED ? void 0 : result2; - } - return hasOwnProperty11.call(data, key) ? data[key] : void 0; -} -var hashGet_default = hashGet; - -// node_modules/lodash-es/_hashHas.js -var objectProto14 = Object.prototype; -var hasOwnProperty12 = objectProto14.hasOwnProperty; -function hashHas(key) { - var data = this.__data__; - return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty12.call(data, key); -} -var hashHas_default = hashHas; - -// node_modules/lodash-es/_hashSet.js -var HASH_UNDEFINED2 = "__lodash_hash_undefined__"; -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value; - return this; -} -var hashSet_default = hashSet; - -// node_modules/lodash-es/_Hash.js -function Hash(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -Hash.prototype.clear = hashClear_default; -Hash.prototype["delete"] = hashDelete_default; -Hash.prototype.get = hashGet_default; -Hash.prototype.has = hashHas_default; -Hash.prototype.set = hashSet_default; -var Hash_default = Hash; - -// node_modules/lodash-es/_listCacheClear.js -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} -var listCacheClear_default = listCacheClear; - -// node_modules/lodash-es/_assocIndexOf.js -function assocIndexOf(array4, key) { - var length = array4.length; - while (length--) { - if (eq_default(array4[length][0], key)) { - return length; - } - } - return -1; -} -var assocIndexOf_default = assocIndexOf; - -// node_modules/lodash-es/_listCacheDelete.js -var arrayProto = Array.prototype; -var splice = arrayProto.splice; -function listCacheDelete(key) { - var data = this.__data__, index = assocIndexOf_default(data, key); - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} -var listCacheDelete_default = listCacheDelete; - -// node_modules/lodash-es/_listCacheGet.js -function listCacheGet(key) { - var data = this.__data__, index = assocIndexOf_default(data, key); - return index < 0 ? void 0 : data[index][1]; -} -var listCacheGet_default = listCacheGet; - -// node_modules/lodash-es/_listCacheHas.js -function listCacheHas(key) { - return assocIndexOf_default(this.__data__, key) > -1; -} -var listCacheHas_default = listCacheHas; - -// node_modules/lodash-es/_listCacheSet.js -function listCacheSet(key, value) { - var data = this.__data__, index = assocIndexOf_default(data, key); - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} -var listCacheSet_default = listCacheSet; - -// node_modules/lodash-es/_ListCache.js -function ListCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -ListCache.prototype.clear = listCacheClear_default; -ListCache.prototype["delete"] = listCacheDelete_default; -ListCache.prototype.get = listCacheGet_default; -ListCache.prototype.has = listCacheHas_default; -ListCache.prototype.set = listCacheSet_default; -var ListCache_default = ListCache; - -// node_modules/lodash-es/_Map.js -var Map2 = getNative_default(root_default, "Map"); -var Map_default = Map2; - -// node_modules/lodash-es/_mapCacheClear.js -function mapCacheClear() { - this.size = 0; - this.__data__ = { - "hash": new Hash_default(), - "map": new (Map_default || ListCache_default)(), - "string": new Hash_default() - }; -} -var mapCacheClear_default = mapCacheClear; - -// node_modules/lodash-es/_isKeyable.js -function isKeyable(value) { - var type4 = typeof value; - return type4 == "string" || type4 == "number" || type4 == "symbol" || type4 == "boolean" ? value !== "__proto__" : value === null; -} -var isKeyable_default = isKeyable; - -// node_modules/lodash-es/_getMapData.js -function getMapData(map2, key) { - var data = map2.__data__; - return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; -} -var getMapData_default = getMapData; - -// node_modules/lodash-es/_mapCacheDelete.js -function mapCacheDelete(key) { - var result2 = getMapData_default(this, key)["delete"](key); - this.size -= result2 ? 1 : 0; - return result2; -} -var mapCacheDelete_default = mapCacheDelete; - -// node_modules/lodash-es/_mapCacheGet.js -function mapCacheGet(key) { - return getMapData_default(this, key).get(key); -} -var mapCacheGet_default = mapCacheGet; - -// node_modules/lodash-es/_mapCacheHas.js -function mapCacheHas(key) { - return getMapData_default(this, key).has(key); -} -var mapCacheHas_default = mapCacheHas; - -// node_modules/lodash-es/_mapCacheSet.js -function mapCacheSet(key, value) { - var data = getMapData_default(this, key), size3 = data.size; - data.set(key, value); - this.size += data.size == size3 ? 0 : 1; - return this; -} -var mapCacheSet_default = mapCacheSet; - -// node_modules/lodash-es/_MapCache.js -function MapCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -MapCache.prototype.clear = mapCacheClear_default; -MapCache.prototype["delete"] = mapCacheDelete_default; -MapCache.prototype.get = mapCacheGet_default; -MapCache.prototype.has = mapCacheHas_default; -MapCache.prototype.set = mapCacheSet_default; -var MapCache_default = MapCache; - -// node_modules/lodash-es/memoize.js -var FUNC_ERROR_TEXT3 = "Expected a function"; -function memoize(func, resolver) { - if (typeof func != "function" || resolver != null && typeof resolver != "function") { - throw new TypeError(FUNC_ERROR_TEXT3); - } - var memoized = function() { - var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache; - if (cache2.has(key)) { - return cache2.get(key); - } - var result2 = func.apply(this, args); - memoized.cache = cache2.set(key, result2) || cache2; - return result2; - }; - memoized.cache = new (memoize.Cache || MapCache_default)(); - return memoized; -} -memoize.Cache = MapCache_default; -var memoize_default = memoize; - -// node_modules/lodash-es/_memoizeCapped.js -var MAX_MEMOIZE_SIZE = 500; -function memoizeCapped(func) { - var result2 = memoize_default(func, function(key) { - if (cache2.size === MAX_MEMOIZE_SIZE) { - cache2.clear(); - } - return key; - }); - var cache2 = result2.cache; - return result2; -} -var memoizeCapped_default = memoizeCapped; - -// node_modules/lodash-es/_stringToPath.js -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; -var reEscapeChar = /\\(\\)?/g; -var stringToPath = memoizeCapped_default(function(string3) { - var result2 = []; - if (string3.charCodeAt(0) === 46) { - result2.push(""); - } - string3.replace(rePropName, function(match, number4, quote, subString) { - result2.push(quote ? subString.replace(reEscapeChar, "$1") : number4 || match); - }); - return result2; -}); -var stringToPath_default = stringToPath; - -// node_modules/lodash-es/toString.js -function toString(value) { - return value == null ? "" : baseToString_default(value); -} -var toString_default = toString; - -// node_modules/lodash-es/_castPath.js -function castPath(value, object4) { - if (isArray_default(value)) { - return value; - } - return isKey_default(value, object4) ? [value] : stringToPath_default(toString_default(value)); -} -var castPath_default = castPath; - -// node_modules/lodash-es/_toKey.js -var INFINITY3 = 1 / 0; -function toKey(value) { - if (typeof value == "string" || isSymbol_default(value)) { - return value; - } - var result2 = value + ""; - return result2 == "0" && 1 / value == -INFINITY3 ? "-0" : result2; -} -var toKey_default = toKey; - -// node_modules/lodash-es/_baseGet.js -function baseGet(object4, path) { - path = castPath_default(path, object4); - var index = 0, length = path.length; - while (object4 != null && index < length) { - object4 = object4[toKey_default(path[index++])]; - } - return index && index == length ? object4 : void 0; -} -var baseGet_default = baseGet; - -// node_modules/lodash-es/get.js -function get(object4, path, defaultValue) { - var result2 = object4 == null ? void 0 : baseGet_default(object4, path); - return result2 === void 0 ? defaultValue : result2; -} -var get_default = get; - -// node_modules/lodash-es/_baseAt.js -function baseAt(object4, paths) { - var index = -1, length = paths.length, result2 = Array(length), skip = object4 == null; - while (++index < length) { - result2[index] = skip ? void 0 : get_default(object4, paths[index]); - } - return result2; -} -var baseAt_default = baseAt; - -// node_modules/lodash-es/_arrayPush.js -function arrayPush(array4, values2) { - var index = -1, length = values2.length, offset3 = array4.length; - while (++index < length) { - array4[offset3 + index] = values2[index]; - } - return array4; -} -var arrayPush_default = arrayPush; - -// node_modules/lodash-es/_isFlattenable.js -var spreadableSymbol = Symbol_default ? Symbol_default.isConcatSpreadable : void 0; -function isFlattenable(value) { - return isArray_default(value) || isArguments_default(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); -} -var isFlattenable_default = isFlattenable; - -// node_modules/lodash-es/_baseFlatten.js -function baseFlatten(array4, depth, predicate, isStrict, result2) { - var index = -1, length = array4.length; - predicate || (predicate = isFlattenable_default); - result2 || (result2 = []); - while (++index < length) { - var value = array4[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - baseFlatten(value, depth - 1, predicate, isStrict, result2); - } else { - arrayPush_default(result2, value); - } - } else if (!isStrict) { - result2[result2.length] = value; - } - } - return result2; -} -var baseFlatten_default = baseFlatten; - -// node_modules/lodash-es/flatten.js -function flatten(array4) { - var length = array4 == null ? 0 : array4.length; - return length ? baseFlatten_default(array4, 1) : []; -} -var flatten_default = flatten; - -// node_modules/lodash-es/_flatRest.js -function flatRest(func) { - return setToString_default(overRest_default(func, void 0, flatten_default), func + ""); -} -var flatRest_default = flatRest; - -// node_modules/lodash-es/at.js -var at = flatRest_default(baseAt_default); -var at_default = at; - -// node_modules/lodash-es/_getPrototype.js -var getPrototype = overArg_default(Object.getPrototypeOf, Object); -var getPrototype_default = getPrototype; - -// node_modules/lodash-es/isPlainObject.js -var objectTag2 = "[object Object]"; -var funcProto3 = Function.prototype; -var objectProto15 = Object.prototype; -var funcToString3 = funcProto3.toString; -var hasOwnProperty13 = objectProto15.hasOwnProperty; -var objectCtorString = funcToString3.call(Object); -function isPlainObject2(value) { - if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag2) { - return false; - } - var proto = getPrototype_default(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty13.call(proto, "constructor") && proto.constructor; - return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString; -} -var isPlainObject_default = isPlainObject2; - -// node_modules/lodash-es/isError.js -var domExcTag = "[object DOMException]"; -var errorTag2 = "[object Error]"; -function isError(value) { - if (!isObjectLike_default(value)) { - return false; - } - var tag = baseGetTag_default(value); - return tag == errorTag2 || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject_default(value); -} -var isError_default = isError; - -// node_modules/lodash-es/attempt.js -var attempt = baseRest_default(function(func, args) { - try { - return apply_default(func, void 0, args); - } catch (e) { - return isError_default(e) ? e : new Error(e); - } -}); -var attempt_default = attempt; - -// node_modules/lodash-es/before.js -var FUNC_ERROR_TEXT4 = "Expected a function"; -function before(n, func) { - var result2; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT4); - } - n = toInteger_default(n); - return function() { - if (--n > 0) { - result2 = func.apply(this, arguments); - } - if (n <= 1) { - func = void 0; - } - return result2; - }; -} -var before_default = before; - -// node_modules/lodash-es/bind.js -var WRAP_BIND_FLAG8 = 1; -var WRAP_PARTIAL_FLAG4 = 32; -var bind = baseRest_default(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG8; - if (partials.length) { - var holders = replaceHolders_default(partials, getHolder_default(bind)); - bitmask |= WRAP_PARTIAL_FLAG4; - } - return createWrap_default(func, bitmask, thisArg, partials, holders); -}); -bind.placeholder = {}; -var bind_default = bind; - -// node_modules/lodash-es/bindAll.js -var bindAll = flatRest_default(function(object4, methodNames) { - arrayEach_default(methodNames, function(key) { - key = toKey_default(key); - baseAssignValue_default(object4, key, bind_default(object4[key], object4)); - }); - return object4; -}); -var bindAll_default = bindAll; - -// node_modules/lodash-es/bindKey.js -var WRAP_BIND_FLAG9 = 1; -var WRAP_BIND_KEY_FLAG6 = 2; -var WRAP_PARTIAL_FLAG5 = 32; -var bindKey = baseRest_default(function(object4, key, partials) { - var bitmask = WRAP_BIND_FLAG9 | WRAP_BIND_KEY_FLAG6; - if (partials.length) { - var holders = replaceHolders_default(partials, getHolder_default(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG5; - } - return createWrap_default(key, bitmask, object4, partials, holders); -}); -bindKey.placeholder = {}; -var bindKey_default = bindKey; - -// node_modules/lodash-es/_baseSlice.js -function baseSlice(array4, start, end) { - var index = -1, length = array4.length; - if (start < 0) { - start = -start > length ? 0 : length + start; - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : end - start >>> 0; - start >>>= 0; - var result2 = Array(length); - while (++index < length) { - result2[index] = array4[index + start]; - } - return result2; -} -var baseSlice_default = baseSlice; - -// node_modules/lodash-es/_castSlice.js -function castSlice(array4, start, end) { - var length = array4.length; - end = end === void 0 ? length : end; - return !start && end >= length ? array4 : baseSlice_default(array4, start, end); -} -var castSlice_default = castSlice; - -// node_modules/lodash-es/_hasUnicode.js -var rsAstralRange = "\\ud800-\\udfff"; -var rsComboMarksRange = "\\u0300-\\u036f"; -var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; -var rsComboSymbolsRange = "\\u20d0-\\u20ff"; -var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; -var rsVarRange = "\\ufe0e\\ufe0f"; -var rsZWJ = "\\u200d"; -var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); -function hasUnicode(string3) { - return reHasUnicode.test(string3); -} -var hasUnicode_default = hasUnicode; - -// node_modules/lodash-es/_asciiToArray.js -function asciiToArray(string3) { - return string3.split(""); -} -var asciiToArray_default = asciiToArray; - -// node_modules/lodash-es/_unicodeToArray.js -var rsAstralRange2 = "\\ud800-\\udfff"; -var rsComboMarksRange2 = "\\u0300-\\u036f"; -var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f"; -var rsComboSymbolsRange2 = "\\u20d0-\\u20ff"; -var rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2; -var rsVarRange2 = "\\ufe0e\\ufe0f"; -var rsAstral = "[" + rsAstralRange2 + "]"; -var rsCombo = "[" + rsComboRange2 + "]"; -var rsFitz = "\\ud83c[\\udffb-\\udfff]"; -var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; -var rsNonAstral = "[^" + rsAstralRange2 + "]"; -var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; -var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; -var rsZWJ2 = "\\u200d"; -var reOptMod = rsModifier + "?"; -var rsOptVar = "[" + rsVarRange2 + "]?"; -var rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; -var rsSeq = rsOptVar + reOptMod + rsOptJoin; -var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; -var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); -function unicodeToArray(string3) { - return string3.match(reUnicode) || []; -} -var unicodeToArray_default = unicodeToArray; - -// node_modules/lodash-es/_stringToArray.js -function stringToArray(string3) { - return hasUnicode_default(string3) ? unicodeToArray_default(string3) : asciiToArray_default(string3); -} -var stringToArray_default = stringToArray; - -// node_modules/lodash-es/_createCaseFirst.js -function createCaseFirst(methodName) { - return function(string3) { - string3 = toString_default(string3); - var strSymbols = hasUnicode_default(string3) ? stringToArray_default(string3) : void 0; - var chr = strSymbols ? strSymbols[0] : string3.charAt(0); - var trailing = strSymbols ? castSlice_default(strSymbols, 1).join("") : string3.slice(1); - return chr[methodName]() + trailing; - }; -} -var createCaseFirst_default = createCaseFirst; - -// node_modules/lodash-es/upperFirst.js -var upperFirst = createCaseFirst_default("toUpperCase"); -var upperFirst_default = upperFirst; - -// node_modules/lodash-es/capitalize.js -function capitalize2(string3) { - return upperFirst_default(toString_default(string3).toLowerCase()); -} -var capitalize_default = capitalize2; - -// node_modules/lodash-es/_arrayReduce.js -function arrayReduce(array4, iteratee2, accumulator, initAccum) { - var index = -1, length = array4 == null ? 0 : array4.length; - if (initAccum && length) { - accumulator = array4[++index]; - } - while (++index < length) { - accumulator = iteratee2(accumulator, array4[index], index, array4); - } - return accumulator; -} -var arrayReduce_default = arrayReduce; - -// node_modules/lodash-es/_basePropertyOf.js -function basePropertyOf(object4) { - return function(key) { - return object4 == null ? void 0 : object4[key]; - }; -} -var basePropertyOf_default = basePropertyOf; - -// node_modules/lodash-es/_deburrLetter.js -var deburredLetters = { - // Latin-1 Supplement block. - "À": "A", - "Á": "A", - "Â": "A", - "Ã": "A", - "Ä": "A", - "Å": "A", - "à": "a", - "á": "a", - "â": "a", - "ã": "a", - "ä": "a", - "å": "a", - "Ç": "C", - "ç": "c", - "Ð": "D", - "ð": "d", - "È": "E", - "É": "E", - "Ê": "E", - "Ë": "E", - "è": "e", - "é": "e", - "ê": "e", - "ë": "e", - "Ì": "I", - "Í": "I", - "Î": "I", - "Ï": "I", - "ì": "i", - "í": "i", - "î": "i", - "ï": "i", - "Ñ": "N", - "ñ": "n", - "Ò": "O", - "Ó": "O", - "Ô": "O", - "Õ": "O", - "Ö": "O", - "Ø": "O", - "ò": "o", - "ó": "o", - "ô": "o", - "õ": "o", - "ö": "o", - "ø": "o", - "Ù": "U", - "Ú": "U", - "Û": "U", - "Ü": "U", - "ù": "u", - "ú": "u", - "û": "u", - "ü": "u", - "Ý": "Y", - "ý": "y", - "ÿ": "y", - "Æ": "Ae", - "æ": "ae", - "Þ": "Th", - "þ": "th", - "ß": "ss", - // Latin Extended-A block. - "Ā": "A", - "Ă": "A", - "Ą": "A", - "ā": "a", - "ă": "a", - "ą": "a", - "Ć": "C", - "Ĉ": "C", - "Ċ": "C", - "Č": "C", - "ć": "c", - "ĉ": "c", - "ċ": "c", - "č": "c", - "Ď": "D", - "Đ": "D", - "ď": "d", - "đ": "d", - "Ē": "E", - "Ĕ": "E", - "Ė": "E", - "Ę": "E", - "Ě": "E", - "ē": "e", - "ĕ": "e", - "ė": "e", - "ę": "e", - "ě": "e", - "Ĝ": "G", - "Ğ": "G", - "Ġ": "G", - "Ģ": "G", - "ĝ": "g", - "ğ": "g", - "ġ": "g", - "ģ": "g", - "Ĥ": "H", - "Ħ": "H", - "ĥ": "h", - "ħ": "h", - "Ĩ": "I", - "Ī": "I", - "Ĭ": "I", - "Į": "I", - "İ": "I", - "ĩ": "i", - "ī": "i", - "ĭ": "i", - "į": "i", - "ı": "i", - "Ĵ": "J", - "ĵ": "j", - "Ķ": "K", - "ķ": "k", - "ĸ": "k", - "Ĺ": "L", - "Ļ": "L", - "Ľ": "L", - "Ŀ": "L", - "Ł": "L", - "ĺ": "l", - "ļ": "l", - "ľ": "l", - "ŀ": "l", - "ł": "l", - "Ń": "N", - "Ņ": "N", - "Ň": "N", - "Ŋ": "N", - "ń": "n", - "ņ": "n", - "ň": "n", - "ŋ": "n", - "Ō": "O", - "Ŏ": "O", - "Ő": "O", - "ō": "o", - "ŏ": "o", - "ő": "o", - "Ŕ": "R", - "Ŗ": "R", - "Ř": "R", - "ŕ": "r", - "ŗ": "r", - "ř": "r", - "Ś": "S", - "Ŝ": "S", - "Ş": "S", - "Š": "S", - "ś": "s", - "ŝ": "s", - "ş": "s", - "š": "s", - "Ţ": "T", - "Ť": "T", - "Ŧ": "T", - "ţ": "t", - "ť": "t", - "ŧ": "t", - "Ũ": "U", - "Ū": "U", - "Ŭ": "U", - "Ů": "U", - "Ű": "U", - "Ų": "U", - "ũ": "u", - "ū": "u", - "ŭ": "u", - "ů": "u", - "ű": "u", - "ų": "u", - "Ŵ": "W", - "ŵ": "w", - "Ŷ": "Y", - "ŷ": "y", - "Ÿ": "Y", - "Ź": "Z", - "Ż": "Z", - "Ž": "Z", - "ź": "z", - "ż": "z", - "ž": "z", - "IJ": "IJ", - "ij": "ij", - "Œ": "Oe", - "œ": "oe", - "ʼn": "'n", - "ſ": "s" -}; -var deburrLetter = basePropertyOf_default(deburredLetters); -var deburrLetter_default = deburrLetter; - -// node_modules/lodash-es/deburr.js -var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; -var rsComboMarksRange3 = "\\u0300-\\u036f"; -var reComboHalfMarksRange3 = "\\ufe20-\\ufe2f"; -var rsComboSymbolsRange3 = "\\u20d0-\\u20ff"; -var rsComboRange3 = rsComboMarksRange3 + reComboHalfMarksRange3 + rsComboSymbolsRange3; -var rsCombo2 = "[" + rsComboRange3 + "]"; -var reComboMark = RegExp(rsCombo2, "g"); -function deburr(string3) { - string3 = toString_default(string3); - return string3 && string3.replace(reLatin, deburrLetter_default).replace(reComboMark, ""); -} -var deburr_default = deburr; - -// node_modules/lodash-es/_asciiWords.js -var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; -function asciiWords(string3) { - return string3.match(reAsciiWord) || []; -} -var asciiWords_default = asciiWords; - -// node_modules/lodash-es/_hasUnicodeWord.js -var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; -function hasUnicodeWord(string3) { - return reHasUnicodeWord.test(string3); -} -var hasUnicodeWord_default = hasUnicodeWord; - -// node_modules/lodash-es/_unicodeWords.js -var rsAstralRange3 = "\\ud800-\\udfff"; -var rsComboMarksRange4 = "\\u0300-\\u036f"; -var reComboHalfMarksRange4 = "\\ufe20-\\ufe2f"; -var rsComboSymbolsRange4 = "\\u20d0-\\u20ff"; -var rsComboRange4 = rsComboMarksRange4 + reComboHalfMarksRange4 + rsComboSymbolsRange4; -var rsDingbatRange = "\\u2700-\\u27bf"; -var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff"; -var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7"; -var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"; -var rsPunctuationRange = "\\u2000-\\u206f"; -var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000"; -var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde"; -var rsVarRange3 = "\\ufe0e\\ufe0f"; -var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; -var rsApos = "['’]"; -var rsBreak = "[" + rsBreakRange + "]"; -var rsCombo3 = "[" + rsComboRange4 + "]"; -var rsDigits = "\\d+"; -var rsDingbat = "[" + rsDingbatRange + "]"; -var rsLower = "[" + rsLowerRange + "]"; -var rsMisc = "[^" + rsAstralRange3 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]"; -var rsFitz2 = "\\ud83c[\\udffb-\\udfff]"; -var rsModifier2 = "(?:" + rsCombo3 + "|" + rsFitz2 + ")"; -var rsNonAstral2 = "[^" + rsAstralRange3 + "]"; -var rsRegional2 = "(?:\\ud83c[\\udde6-\\uddff]){2}"; -var rsSurrPair2 = "[\\ud800-\\udbff][\\udc00-\\udfff]"; -var rsUpper = "[" + rsUpperRange + "]"; -var rsZWJ3 = "\\u200d"; -var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")"; -var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")"; -var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?"; -var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?"; -var reOptMod2 = rsModifier2 + "?"; -var rsOptVar2 = "[" + rsVarRange3 + "]?"; -var rsOptJoin2 = "(?:" + rsZWJ3 + "(?:" + [rsNonAstral2, rsRegional2, rsSurrPair2].join("|") + ")" + rsOptVar2 + reOptMod2 + ")*"; -var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])"; -var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])"; -var rsSeq2 = rsOptVar2 + reOptMod2 + rsOptJoin2; -var rsEmoji = "(?:" + [rsDingbat, rsRegional2, rsSurrPair2].join("|") + ")" + rsSeq2; -var reUnicodeWord = RegExp([ - rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", - rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")", - rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower, - rsUpper + "+" + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji -].join("|"), "g"); -function unicodeWords(string3) { - return string3.match(reUnicodeWord) || []; -} -var unicodeWords_default = unicodeWords; - -// node_modules/lodash-es/words.js -function words(string3, pattern4, guard) { - string3 = toString_default(string3); - pattern4 = guard ? void 0 : pattern4; - if (pattern4 === void 0) { - return hasUnicodeWord_default(string3) ? unicodeWords_default(string3) : asciiWords_default(string3); - } - return string3.match(pattern4) || []; -} -var words_default = words; - -// node_modules/lodash-es/_createCompounder.js -var rsApos2 = "['’]"; -var reApos = RegExp(rsApos2, "g"); -function createCompounder(callback) { - return function(string3) { - return arrayReduce_default(words_default(deburr_default(string3).replace(reApos, "")), callback, ""); - }; -} -var createCompounder_default = createCompounder; - -// node_modules/lodash-es/camelCase.js -var camelCase = createCompounder_default(function(result2, word, index) { - word = word.toLowerCase(); - return result2 + (index ? capitalize_default(word) : word); -}); -var camelCase_default = camelCase; - -// node_modules/lodash-es/castArray.js -function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray_default(value) ? value : [value]; -} -var castArray_default = castArray; - -// node_modules/lodash-es/_createRound.js -var nativeIsFinite = root_default.isFinite; -var nativeMin3 = Math.min; -function createRound(methodName) { - var func = Math[methodName]; - return function(number4, precision) { - number4 = toNumber_default(number4); - precision = precision == null ? 0 : nativeMin3(toInteger_default(precision), 292); - if (precision && nativeIsFinite(number4)) { - var pair = (toString_default(number4) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision)); - pair = (toString_default(value) + "e").split("e"); - return +(pair[0] + "e" + (+pair[1] - precision)); - } - return func(number4); - }; -} -var createRound_default = createRound; - -// node_modules/lodash-es/ceil.js -var ceil = createRound_default("ceil"); -var ceil_default = ceil; - -// node_modules/lodash-es/chain.js -function chain(value) { - var result2 = wrapperLodash_default(value); - result2.__chain__ = true; - return result2; -} -var chain_default = chain; - -// node_modules/lodash-es/chunk.js -var nativeCeil = Math.ceil; -var nativeMax5 = Math.max; -function chunk(array4, size3, guard) { - if (guard ? isIterateeCall_default(array4, size3, guard) : size3 === void 0) { - size3 = 1; - } else { - size3 = nativeMax5(toInteger_default(size3), 0); - } - var length = array4 == null ? 0 : array4.length; - if (!length || size3 < 1) { - return []; - } - var index = 0, resIndex = 0, result2 = Array(nativeCeil(length / size3)); - while (index < length) { - result2[resIndex++] = baseSlice_default(array4, index, index += size3); - } - return result2; -} -var chunk_default = chunk; - -// node_modules/lodash-es/_baseClamp.js -function baseClamp(number4, lower, upper) { - if (number4 === number4) { - if (upper !== void 0) { - number4 = number4 <= upper ? number4 : upper; - } - if (lower !== void 0) { - number4 = number4 >= lower ? number4 : lower; - } - } - return number4; -} -var baseClamp_default = baseClamp; - -// node_modules/lodash-es/clamp.js -function clamp(number4, lower, upper) { - if (upper === void 0) { - upper = lower; - lower = void 0; - } - if (upper !== void 0) { - upper = toNumber_default(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== void 0) { - lower = toNumber_default(lower); - lower = lower === lower ? lower : 0; - } - return baseClamp_default(toNumber_default(number4), lower, upper); -} -var clamp_default = clamp; - -// node_modules/lodash-es/_stackClear.js -function stackClear() { - this.__data__ = new ListCache_default(); - this.size = 0; -} -var stackClear_default = stackClear; - -// node_modules/lodash-es/_stackDelete.js -function stackDelete(key) { - var data = this.__data__, result2 = data["delete"](key); - this.size = data.size; - return result2; -} -var stackDelete_default = stackDelete; - -// node_modules/lodash-es/_stackGet.js -function stackGet(key) { - return this.__data__.get(key); -} -var stackGet_default = stackGet; - -// node_modules/lodash-es/_stackHas.js -function stackHas(key) { - return this.__data__.has(key); -} -var stackHas_default = stackHas; - -// node_modules/lodash-es/_stackSet.js -var LARGE_ARRAY_SIZE = 200; -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache_default) { - var pairs = data.__data__; - if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache_default(pairs); - } - data.set(key, value); - this.size = data.size; - return this; -} -var stackSet_default = stackSet; - -// node_modules/lodash-es/_Stack.js -function Stack(entries) { - var data = this.__data__ = new ListCache_default(entries); - this.size = data.size; -} -Stack.prototype.clear = stackClear_default; -Stack.prototype["delete"] = stackDelete_default; -Stack.prototype.get = stackGet_default; -Stack.prototype.has = stackHas_default; -Stack.prototype.set = stackSet_default; -var Stack_default = Stack; - -// node_modules/lodash-es/_baseAssign.js -function baseAssign(object4, source) { - return object4 && copyObject_default(source, keys_default(source), object4); -} -var baseAssign_default = baseAssign; - -// node_modules/lodash-es/_baseAssignIn.js -function baseAssignIn(object4, source) { - return object4 && copyObject_default(source, keysIn_default(source), object4); -} -var baseAssignIn_default = baseAssignIn; - -// node_modules/lodash-es/_cloneBuffer.js -var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports; -var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module; -var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3; -var Buffer2 = moduleExports3 ? root_default.Buffer : void 0; -var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0; -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - buffer.copy(result2); - return result2; -} -var cloneBuffer_default = cloneBuffer; - -// node_modules/lodash-es/_arrayFilter.js -function arrayFilter(array4, predicate) { - var index = -1, length = array4 == null ? 0 : array4.length, resIndex = 0, result2 = []; - while (++index < length) { - var value = array4[index]; - if (predicate(value, index, array4)) { - result2[resIndex++] = value; - } - } - return result2; -} -var arrayFilter_default = arrayFilter; - -// node_modules/lodash-es/stubArray.js -function stubArray() { - return []; -} -var stubArray_default = stubArray; - -// node_modules/lodash-es/_getSymbols.js -var objectProto16 = Object.prototype; -var propertyIsEnumerable2 = objectProto16.propertyIsEnumerable; -var nativeGetSymbols = Object.getOwnPropertySymbols; -var getSymbols = !nativeGetSymbols ? stubArray_default : function(object4) { - if (object4 == null) { - return []; - } - object4 = Object(object4); - return arrayFilter_default(nativeGetSymbols(object4), function(symbol) { - return propertyIsEnumerable2.call(object4, symbol); - }); -}; -var getSymbols_default = getSymbols; - -// node_modules/lodash-es/_copySymbols.js -function copySymbols(source, object4) { - return copyObject_default(source, getSymbols_default(source), object4); -} -var copySymbols_default = copySymbols; - -// node_modules/lodash-es/_getSymbolsIn.js -var nativeGetSymbols2 = Object.getOwnPropertySymbols; -var getSymbolsIn = !nativeGetSymbols2 ? stubArray_default : function(object4) { - var result2 = []; - while (object4) { - arrayPush_default(result2, getSymbols_default(object4)); - object4 = getPrototype_default(object4); - } - return result2; -}; -var getSymbolsIn_default = getSymbolsIn; - -// node_modules/lodash-es/_copySymbolsIn.js -function copySymbolsIn(source, object4) { - return copyObject_default(source, getSymbolsIn_default(source), object4); -} -var copySymbolsIn_default = copySymbolsIn; - -// node_modules/lodash-es/_baseGetAllKeys.js -function baseGetAllKeys(object4, keysFunc, symbolsFunc) { - var result2 = keysFunc(object4); - return isArray_default(object4) ? result2 : arrayPush_default(result2, symbolsFunc(object4)); -} -var baseGetAllKeys_default = baseGetAllKeys; - -// node_modules/lodash-es/_getAllKeys.js -function getAllKeys(object4) { - return baseGetAllKeys_default(object4, keys_default, getSymbols_default); -} -var getAllKeys_default = getAllKeys; - -// node_modules/lodash-es/_getAllKeysIn.js -function getAllKeysIn(object4) { - return baseGetAllKeys_default(object4, keysIn_default, getSymbolsIn_default); -} -var getAllKeysIn_default = getAllKeysIn; - -// node_modules/lodash-es/_DataView.js -var DataView = getNative_default(root_default, "DataView"); -var DataView_default = DataView; - -// node_modules/lodash-es/_Promise.js -var Promise2 = getNative_default(root_default, "Promise"); -var Promise_default = Promise2; - -// node_modules/lodash-es/_Set.js -var Set2 = getNative_default(root_default, "Set"); -var Set_default = Set2; - -// node_modules/lodash-es/_getTag.js -var mapTag2 = "[object Map]"; -var objectTag3 = "[object Object]"; -var promiseTag = "[object Promise]"; -var setTag2 = "[object Set]"; -var weakMapTag2 = "[object WeakMap]"; -var dataViewTag2 = "[object DataView]"; -var dataViewCtorString = toSource_default(DataView_default); -var mapCtorString = toSource_default(Map_default); -var promiseCtorString = toSource_default(Promise_default); -var setCtorString = toSource_default(Set_default); -var weakMapCtorString = toSource_default(WeakMap_default); -var getTag = baseGetTag_default; -if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) { - getTag = function(value) { - var result2 = baseGetTag_default(value), Ctor = result2 == objectTag3 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : ""; - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: - return dataViewTag2; - case mapCtorString: - return mapTag2; - case promiseCtorString: - return promiseTag; - case setCtorString: - return setTag2; - case weakMapCtorString: - return weakMapTag2; - } - } - return result2; - }; -} -var getTag_default = getTag; - -// node_modules/lodash-es/_initCloneArray.js -var objectProto17 = Object.prototype; -var hasOwnProperty14 = objectProto17.hasOwnProperty; -function initCloneArray(array4) { - var length = array4.length, result2 = new array4.constructor(length); - if (length && typeof array4[0] == "string" && hasOwnProperty14.call(array4, "index")) { - result2.index = array4.index; - result2.input = array4.input; - } - return result2; -} -var initCloneArray_default = initCloneArray; - -// node_modules/lodash-es/_Uint8Array.js -var Uint8Array2 = root_default.Uint8Array; -var Uint8Array_default = Uint8Array2; - -// node_modules/lodash-es/_cloneArrayBuffer.js -function cloneArrayBuffer(arrayBuffer) { - var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array_default(result2).set(new Uint8Array_default(arrayBuffer)); - return result2; -} -var cloneArrayBuffer_default = cloneArrayBuffer; - -// node_modules/lodash-es/_cloneDataView.js -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer_default(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} -var cloneDataView_default = cloneDataView; - -// node_modules/lodash-es/_cloneRegExp.js -var reFlags = /\w*$/; -function cloneRegExp(regexp4) { - var result2 = new regexp4.constructor(regexp4.source, reFlags.exec(regexp4)); - result2.lastIndex = regexp4.lastIndex; - return result2; -} -var cloneRegExp_default = cloneRegExp; - -// node_modules/lodash-es/_cloneSymbol.js -var symbolProto2 = Symbol_default ? Symbol_default.prototype : void 0; -var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0; -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} -var cloneSymbol_default = cloneSymbol; - -// node_modules/lodash-es/_cloneTypedArray.js -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} -var cloneTypedArray_default = cloneTypedArray; - -// node_modules/lodash-es/_initCloneByTag.js -var boolTag2 = "[object Boolean]"; -var dateTag2 = "[object Date]"; -var mapTag3 = "[object Map]"; -var numberTag2 = "[object Number]"; -var regexpTag2 = "[object RegExp]"; -var setTag3 = "[object Set]"; -var stringTag2 = "[object String]"; -var symbolTag2 = "[object Symbol]"; -var arrayBufferTag2 = "[object ArrayBuffer]"; -var dataViewTag3 = "[object DataView]"; -var float32Tag2 = "[object Float32Array]"; -var float64Tag2 = "[object Float64Array]"; -var int8Tag2 = "[object Int8Array]"; -var int16Tag2 = "[object Int16Array]"; -var int32Tag2 = "[object Int32Array]"; -var uint8Tag2 = "[object Uint8Array]"; -var uint8ClampedTag2 = "[object Uint8ClampedArray]"; -var uint16Tag2 = "[object Uint16Array]"; -var uint32Tag2 = "[object Uint32Array]"; -function initCloneByTag(object4, tag, isDeep) { - var Ctor = object4.constructor; - switch (tag) { - case arrayBufferTag2: - return cloneArrayBuffer_default(object4); - case boolTag2: - case dateTag2: - return new Ctor(+object4); - case dataViewTag3: - return cloneDataView_default(object4, isDeep); - case float32Tag2: - case float64Tag2: - case int8Tag2: - case int16Tag2: - case int32Tag2: - case uint8Tag2: - case uint8ClampedTag2: - case uint16Tag2: - case uint32Tag2: - return cloneTypedArray_default(object4, isDeep); - case mapTag3: - return new Ctor(); - case numberTag2: - case stringTag2: - return new Ctor(object4); - case regexpTag2: - return cloneRegExp_default(object4); - case setTag3: - return new Ctor(); - case symbolTag2: - return cloneSymbol_default(object4); - } -} -var initCloneByTag_default = initCloneByTag; - -// node_modules/lodash-es/_initCloneObject.js -function initCloneObject(object4) { - return typeof object4.constructor == "function" && !isPrototype_default(object4) ? baseCreate_default(getPrototype_default(object4)) : {}; -} -var initCloneObject_default = initCloneObject; - -// node_modules/lodash-es/_baseIsMap.js -var mapTag4 = "[object Map]"; -function baseIsMap(value) { - return isObjectLike_default(value) && getTag_default(value) == mapTag4; -} -var baseIsMap_default = baseIsMap; - -// node_modules/lodash-es/isMap.js -var nodeIsMap = nodeUtil_default && nodeUtil_default.isMap; -var isMap = nodeIsMap ? baseUnary_default(nodeIsMap) : baseIsMap_default; -var isMap_default = isMap; - -// node_modules/lodash-es/_baseIsSet.js -var setTag4 = "[object Set]"; -function baseIsSet(value) { - return isObjectLike_default(value) && getTag_default(value) == setTag4; -} -var baseIsSet_default = baseIsSet; - -// node_modules/lodash-es/isSet.js -var nodeIsSet = nodeUtil_default && nodeUtil_default.isSet; -var isSet = nodeIsSet ? baseUnary_default(nodeIsSet) : baseIsSet_default; -var isSet_default = isSet; - -// node_modules/lodash-es/_baseClone.js -var CLONE_DEEP_FLAG = 1; -var CLONE_FLAT_FLAG = 2; -var CLONE_SYMBOLS_FLAG = 4; -var argsTag3 = "[object Arguments]"; -var arrayTag2 = "[object Array]"; -var boolTag3 = "[object Boolean]"; -var dateTag3 = "[object Date]"; -var errorTag3 = "[object Error]"; -var funcTag3 = "[object Function]"; -var genTag2 = "[object GeneratorFunction]"; -var mapTag5 = "[object Map]"; -var numberTag3 = "[object Number]"; -var objectTag4 = "[object Object]"; -var regexpTag3 = "[object RegExp]"; -var setTag5 = "[object Set]"; -var stringTag3 = "[object String]"; -var symbolTag3 = "[object Symbol]"; -var weakMapTag3 = "[object WeakMap]"; -var arrayBufferTag3 = "[object ArrayBuffer]"; -var dataViewTag4 = "[object DataView]"; -var float32Tag3 = "[object Float32Array]"; -var float64Tag3 = "[object Float64Array]"; -var int8Tag3 = "[object Int8Array]"; -var int16Tag3 = "[object Int16Array]"; -var int32Tag3 = "[object Int32Array]"; -var uint8Tag3 = "[object Uint8Array]"; -var uint8ClampedTag3 = "[object Uint8ClampedArray]"; -var uint16Tag3 = "[object Uint16Array]"; -var uint32Tag3 = "[object Uint32Array]"; -var cloneableTags = {}; -cloneableTags[argsTag3] = cloneableTags[arrayTag2] = cloneableTags[arrayBufferTag3] = cloneableTags[dataViewTag4] = cloneableTags[boolTag3] = cloneableTags[dateTag3] = cloneableTags[float32Tag3] = cloneableTags[float64Tag3] = cloneableTags[int8Tag3] = cloneableTags[int16Tag3] = cloneableTags[int32Tag3] = cloneableTags[mapTag5] = cloneableTags[numberTag3] = cloneableTags[objectTag4] = cloneableTags[regexpTag3] = cloneableTags[setTag5] = cloneableTags[stringTag3] = cloneableTags[symbolTag3] = cloneableTags[uint8Tag3] = cloneableTags[uint8ClampedTag3] = cloneableTags[uint16Tag3] = cloneableTags[uint32Tag3] = true; -cloneableTags[errorTag3] = cloneableTags[funcTag3] = cloneableTags[weakMapTag3] = false; -function baseClone(value, bitmask, customizer, key, object4, stack) { - var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; - if (customizer) { - result2 = object4 ? customizer(value, key, object4, stack) : customizer(value); - } - if (result2 !== void 0) { - return result2; - } - if (!isObject_default(value)) { - return value; - } - var isArr = isArray_default(value); - if (isArr) { - result2 = initCloneArray_default(value); - if (!isDeep) { - return copyArray_default(value, result2); - } - } else { - var tag = getTag_default(value), isFunc = tag == funcTag3 || tag == genTag2; - if (isBuffer_default(value)) { - return cloneBuffer_default(value, isDeep); - } - if (tag == objectTag4 || tag == argsTag3 || isFunc && !object4) { - result2 = isFlat || isFunc ? {} : initCloneObject_default(value); - if (!isDeep) { - return isFlat ? copySymbolsIn_default(value, baseAssignIn_default(result2, value)) : copySymbols_default(value, baseAssign_default(result2, value)); - } - } else { - if (!cloneableTags[tag]) { - return object4 ? value : {}; - } - result2 = initCloneByTag_default(value, tag, isDeep); - } - } - stack || (stack = new Stack_default()); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result2); - if (isSet_default(value)) { - value.forEach(function(subValue) { - result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap_default(value)) { - value.forEach(function(subValue, key2) { - result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); - }); - } - var keysFunc = isFull ? isFlat ? getAllKeysIn_default : getAllKeys_default : isFlat ? keysIn_default : keys_default; - var props2 = isArr ? void 0 : keysFunc(value); - arrayEach_default(props2 || value, function(subValue, key2) { - if (props2) { - key2 = subValue; - subValue = value[key2]; - } - assignValue_default(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); - }); - return result2; -} -var baseClone_default = baseClone; - -// node_modules/lodash-es/clone.js -var CLONE_SYMBOLS_FLAG2 = 4; -function clone(value) { - return baseClone_default(value, CLONE_SYMBOLS_FLAG2); -} -var clone_default = clone; - -// node_modules/lodash-es/cloneDeep.js -var CLONE_DEEP_FLAG2 = 1; -var CLONE_SYMBOLS_FLAG3 = 4; -function cloneDeep(value) { - return baseClone_default(value, CLONE_DEEP_FLAG2 | CLONE_SYMBOLS_FLAG3); -} -var cloneDeep_default = cloneDeep; - -// node_modules/lodash-es/cloneDeepWith.js -var CLONE_DEEP_FLAG3 = 1; -var CLONE_SYMBOLS_FLAG4 = 4; -function cloneDeepWith(value, customizer) { - customizer = typeof customizer == "function" ? customizer : void 0; - return baseClone_default(value, CLONE_DEEP_FLAG3 | CLONE_SYMBOLS_FLAG4, customizer); -} -var cloneDeepWith_default = cloneDeepWith; - -// node_modules/lodash-es/cloneWith.js -var CLONE_SYMBOLS_FLAG5 = 4; -function cloneWith(value, customizer) { - customizer = typeof customizer == "function" ? customizer : void 0; - return baseClone_default(value, CLONE_SYMBOLS_FLAG5, customizer); -} -var cloneWith_default = cloneWith; - -// node_modules/lodash-es/commit.js -function wrapperCommit() { - return new LodashWrapper_default(this.value(), this.__chain__); -} -var commit_default = wrapperCommit; - -// node_modules/lodash-es/compact.js -function compact(array4) { - var index = -1, length = array4 == null ? 0 : array4.length, resIndex = 0, result2 = []; - while (++index < length) { - var value = array4[index]; - if (value) { - result2[resIndex++] = value; - } - } - return result2; -} -var compact_default = compact; - -// node_modules/lodash-es/concat.js -function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), array4 = arguments[0], index = length; - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush_default(isArray_default(array4) ? copyArray_default(array4) : [array4], baseFlatten_default(args, 1)); -} -var concat_default = concat; - -// node_modules/lodash-es/_setCacheAdd.js -var HASH_UNDEFINED3 = "__lodash_hash_undefined__"; -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED3); - return this; -} -var setCacheAdd_default = setCacheAdd; - -// node_modules/lodash-es/_setCacheHas.js -function setCacheHas(value) { - return this.__data__.has(value); -} -var setCacheHas_default = setCacheHas; - -// node_modules/lodash-es/_SetCache.js -function SetCache(values2) { - var index = -1, length = values2 == null ? 0 : values2.length; - this.__data__ = new MapCache_default(); - while (++index < length) { - this.add(values2[index]); - } -} -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd_default; -SetCache.prototype.has = setCacheHas_default; -var SetCache_default = SetCache; - -// node_modules/lodash-es/_arraySome.js -function arraySome(array4, predicate) { - var index = -1, length = array4 == null ? 0 : array4.length; - while (++index < length) { - if (predicate(array4[index], index, array4)) { - return true; - } - } - return false; -} -var arraySome_default = arraySome; - -// node_modules/lodash-es/_cacheHas.js -function cacheHas(cache2, key) { - return cache2.has(key); -} -var cacheHas_default = cacheHas; - -// node_modules/lodash-es/_equalArrays.js -var COMPARE_PARTIAL_FLAG = 1; -var COMPARE_UNORDERED_FLAG = 2; -function equalArrays(array4, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array4.length, othLength = other.length; - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - var arrStacked = stack.get(array4); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array4; - } - var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache_default() : void 0; - stack.set(array4, other); - stack.set(other, array4); - while (++index < arrLength) { - var arrValue = array4[index], othValue = other[index]; - if (customizer) { - var compared = isPartial ? customizer(othValue, arrValue, index, other, array4, stack) : customizer(arrValue, othValue, index, array4, other, stack); - } - if (compared !== void 0) { - if (compared) { - continue; - } - result2 = false; - break; - } - if (seen) { - if (!arraySome_default(other, function(othValue2, othIndex) { - if (!cacheHas_default(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result2 = false; - break; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - result2 = false; - break; - } - } - stack["delete"](array4); - stack["delete"](other); - return result2; -} -var equalArrays_default = equalArrays; - -// node_modules/lodash-es/_mapToArray.js -function mapToArray(map2) { - var index = -1, result2 = Array(map2.size); - map2.forEach(function(value, key) { - result2[++index] = [key, value]; - }); - return result2; -} -var mapToArray_default = mapToArray; - -// node_modules/lodash-es/_setToArray.js -function setToArray(set3) { - var index = -1, result2 = Array(set3.size); - set3.forEach(function(value) { - result2[++index] = value; - }); - return result2; -} -var setToArray_default = setToArray; - -// node_modules/lodash-es/_equalByTag.js -var COMPARE_PARTIAL_FLAG2 = 1; -var COMPARE_UNORDERED_FLAG2 = 2; -var boolTag4 = "[object Boolean]"; -var dateTag4 = "[object Date]"; -var errorTag4 = "[object Error]"; -var mapTag6 = "[object Map]"; -var numberTag4 = "[object Number]"; -var regexpTag4 = "[object RegExp]"; -var setTag6 = "[object Set]"; -var stringTag4 = "[object String]"; -var symbolTag4 = "[object Symbol]"; -var arrayBufferTag4 = "[object ArrayBuffer]"; -var dataViewTag5 = "[object DataView]"; -var symbolProto3 = Symbol_default ? Symbol_default.prototype : void 0; -var symbolValueOf2 = symbolProto3 ? symbolProto3.valueOf : void 0; -function equalByTag(object4, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag5: - if (object4.byteLength != other.byteLength || object4.byteOffset != other.byteOffset) { - return false; - } - object4 = object4.buffer; - other = other.buffer; - case arrayBufferTag4: - if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array_default(object4), new Uint8Array_default(other))) { - return false; - } - return true; - case boolTag4: - case dateTag4: - case numberTag4: - return eq_default(+object4, +other); - case errorTag4: - return object4.name == other.name && object4.message == other.message; - case regexpTag4: - case stringTag4: - return object4 == other + ""; - case mapTag6: - var convert = mapToArray_default; - case setTag6: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG2; - convert || (convert = setToArray_default); - if (object4.size != other.size && !isPartial) { - return false; - } - var stacked = stack.get(object4); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG2; - stack.set(object4, other); - var result2 = equalArrays_default(convert(object4), convert(other), bitmask, customizer, equalFunc, stack); - stack["delete"](object4); - return result2; - case symbolTag4: - if (symbolValueOf2) { - return symbolValueOf2.call(object4) == symbolValueOf2.call(other); - } - } - return false; -} -var equalByTag_default = equalByTag; - -// node_modules/lodash-es/_equalObjects.js -var COMPARE_PARTIAL_FLAG3 = 1; -var objectProto18 = Object.prototype; -var hasOwnProperty15 = objectProto18.hasOwnProperty; -function equalObjects(object4, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = getAllKeys_default(object4), objLength = objProps.length, othProps = getAllKeys_default(other), othLength = othProps.length; - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty15.call(other, key))) { - return false; - } - } - var objStacked = stack.get(object4); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object4; - } - var result2 = true; - stack.set(object4, other); - stack.set(other, object4); - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object4[key], othValue = other[key]; - if (customizer) { - var compared = isPartial ? customizer(othValue, objValue, key, other, object4, stack) : customizer(objValue, othValue, key, object4, other, stack); - } - if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { - result2 = false; - break; - } - skipCtor || (skipCtor = key == "constructor"); - } - if (result2 && !skipCtor) { - var objCtor = object4.constructor, othCtor = other.constructor; - if (objCtor != othCtor && ("constructor" in object4 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { - result2 = false; - } - } - stack["delete"](object4); - stack["delete"](other); - return result2; -} -var equalObjects_default = equalObjects; - -// node_modules/lodash-es/_baseIsEqualDeep.js -var COMPARE_PARTIAL_FLAG4 = 1; -var argsTag4 = "[object Arguments]"; -var arrayTag3 = "[object Array]"; -var objectTag5 = "[object Object]"; -var objectProto19 = Object.prototype; -var hasOwnProperty16 = objectProto19.hasOwnProperty; -function baseIsEqualDeep(object4, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray_default(object4), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag3 : getTag_default(object4), othTag = othIsArr ? arrayTag3 : getTag_default(other); - objTag = objTag == argsTag4 ? objectTag5 : objTag; - othTag = othTag == argsTag4 ? objectTag5 : othTag; - var objIsObj = objTag == objectTag5, othIsObj = othTag == objectTag5, isSameTag = objTag == othTag; - if (isSameTag && isBuffer_default(object4)) { - if (!isBuffer_default(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack_default()); - return objIsArr || isTypedArray_default(object4) ? equalArrays_default(object4, other, bitmask, customizer, equalFunc, stack) : equalByTag_default(object4, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG4)) { - var objIsWrapped = objIsObj && hasOwnProperty16.call(object4, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty16.call(other, "__wrapped__"); - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object4.value() : object4, othUnwrapped = othIsWrapped ? other.value() : other; - stack || (stack = new Stack_default()); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack_default()); - return equalObjects_default(object4, other, bitmask, customizer, equalFunc, stack); -} -var baseIsEqualDeep_default = baseIsEqualDeep; - -// node_modules/lodash-es/_baseIsEqual.js -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || !isObjectLike_default(value) && !isObjectLike_default(other)) { - return value !== value && other !== other; - } - return baseIsEqualDeep_default(value, other, bitmask, customizer, baseIsEqual, stack); -} -var baseIsEqual_default = baseIsEqual; - -// node_modules/lodash-es/_baseIsMatch.js -var COMPARE_PARTIAL_FLAG5 = 1; -var COMPARE_UNORDERED_FLAG3 = 2; -function baseIsMatch(object4, source, matchData, customizer) { - var index = matchData.length, length = index, noCustomizer = !customizer; - if (object4 == null) { - return !length; - } - object4 = Object(object4); - while (index--) { - var data = matchData[index]; - if (noCustomizer && data[2] ? data[1] !== object4[data[0]] : !(data[0] in object4)) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], objValue = object4[key], srcValue = data[1]; - if (noCustomizer && data[2]) { - if (objValue === void 0 && !(key in object4)) { - return false; - } - } else { - var stack = new Stack_default(); - if (customizer) { - var result2 = customizer(objValue, srcValue, key, object4, source, stack); - } - if (!(result2 === void 0 ? baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG5 | COMPARE_UNORDERED_FLAG3, customizer, stack) : result2)) { - return false; - } - } - } - return true; -} -var baseIsMatch_default = baseIsMatch; - -// node_modules/lodash-es/_isStrictComparable.js -function isStrictComparable(value) { - return value === value && !isObject_default(value); -} -var isStrictComparable_default = isStrictComparable; - -// node_modules/lodash-es/_getMatchData.js -function getMatchData(object4) { - var result2 = keys_default(object4), length = result2.length; - while (length--) { - var key = result2[length], value = object4[key]; - result2[length] = [key, value, isStrictComparable_default(value)]; - } - return result2; -} -var getMatchData_default = getMatchData; - -// node_modules/lodash-es/_matchesStrictComparable.js -function matchesStrictComparable(key, srcValue) { - return function(object4) { - if (object4 == null) { - return false; - } - return object4[key] === srcValue && (srcValue !== void 0 || key in Object(object4)); - }; -} -var matchesStrictComparable_default = matchesStrictComparable; - -// node_modules/lodash-es/_baseMatches.js -function baseMatches(source) { - var matchData = getMatchData_default(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable_default(matchData[0][0], matchData[0][1]); - } - return function(object4) { - return object4 === source || baseIsMatch_default(object4, source, matchData); - }; -} -var baseMatches_default = baseMatches; - -// node_modules/lodash-es/_baseHasIn.js -function baseHasIn(object4, key) { - return object4 != null && key in Object(object4); -} -var baseHasIn_default = baseHasIn; - -// node_modules/lodash-es/_hasPath.js -function hasPath(object4, path, hasFunc) { - path = castPath_default(path, object4); - var index = -1, length = path.length, result2 = false; - while (++index < length) { - var key = toKey_default(path[index]); - if (!(result2 = object4 != null && hasFunc(object4, key))) { - break; - } - object4 = object4[key]; - } - if (result2 || ++index != length) { - return result2; - } - length = object4 == null ? 0 : object4.length; - return !!length && isLength_default(length) && isIndex_default(key, length) && (isArray_default(object4) || isArguments_default(object4)); -} -var hasPath_default = hasPath; - -// node_modules/lodash-es/hasIn.js -function hasIn(object4, path) { - return object4 != null && hasPath_default(object4, path, baseHasIn_default); -} -var hasIn_default = hasIn; - -// node_modules/lodash-es/_baseMatchesProperty.js -var COMPARE_PARTIAL_FLAG6 = 1; -var COMPARE_UNORDERED_FLAG4 = 2; -function baseMatchesProperty(path, srcValue) { - if (isKey_default(path) && isStrictComparable_default(srcValue)) { - return matchesStrictComparable_default(toKey_default(path), srcValue); - } - return function(object4) { - var objValue = get_default(object4, path); - return objValue === void 0 && objValue === srcValue ? hasIn_default(object4, path) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4); - }; -} -var baseMatchesProperty_default = baseMatchesProperty; - -// node_modules/lodash-es/_baseProperty.js -function baseProperty(key) { - return function(object4) { - return object4 == null ? void 0 : object4[key]; - }; -} -var baseProperty_default = baseProperty; - -// node_modules/lodash-es/_basePropertyDeep.js -function basePropertyDeep(path) { - return function(object4) { - return baseGet_default(object4, path); - }; -} -var basePropertyDeep_default = basePropertyDeep; - -// node_modules/lodash-es/property.js -function property(path) { - return isKey_default(path) ? baseProperty_default(toKey_default(path)) : basePropertyDeep_default(path); -} -var property_default = property; - -// node_modules/lodash-es/_baseIteratee.js -function baseIteratee(value) { - if (typeof value == "function") { - return value; - } - if (value == null) { - return identity_default; - } - if (typeof value == "object") { - return isArray_default(value) ? baseMatchesProperty_default(value[0], value[1]) : baseMatches_default(value); - } - return property_default(value); -} -var baseIteratee_default = baseIteratee; - -// node_modules/lodash-es/cond.js -var FUNC_ERROR_TEXT5 = "Expected a function"; -function cond(pairs) { - var length = pairs == null ? 0 : pairs.length, toIteratee = baseIteratee_default; - pairs = !length ? [] : arrayMap_default(pairs, function(pair) { - if (typeof pair[1] != "function") { - throw new TypeError(FUNC_ERROR_TEXT5); - } - return [toIteratee(pair[0]), pair[1]]; - }); - return baseRest_default(function(args) { - var index = -1; - while (++index < length) { - var pair = pairs[index]; - if (apply_default(pair[0], this, args)) { - return apply_default(pair[1], this, args); - } - } - }); -} -var cond_default = cond; - -// node_modules/lodash-es/_baseConformsTo.js -function baseConformsTo(object4, source, props2) { - var length = props2.length; - if (object4 == null) { - return !length; - } - object4 = Object(object4); - while (length--) { - var key = props2[length], predicate = source[key], value = object4[key]; - if (value === void 0 && !(key in object4) || !predicate(value)) { - return false; - } - } - return true; -} -var baseConformsTo_default = baseConformsTo; - -// node_modules/lodash-es/_baseConforms.js -function baseConforms(source) { - var props2 = keys_default(source); - return function(object4) { - return baseConformsTo_default(object4, source, props2); - }; -} -var baseConforms_default = baseConforms; - -// node_modules/lodash-es/conforms.js -var CLONE_DEEP_FLAG4 = 1; -function conforms(source) { - return baseConforms_default(baseClone_default(source, CLONE_DEEP_FLAG4)); -} -var conforms_default = conforms; - -// node_modules/lodash-es/conformsTo.js -function conformsTo(object4, source) { - return source == null || baseConformsTo_default(object4, source, keys_default(source)); -} -var conformsTo_default = conformsTo; - -// node_modules/lodash-es/_arrayAggregator.js -function arrayAggregator(array4, setter, iteratee2, accumulator) { - var index = -1, length = array4 == null ? 0 : array4.length; - while (++index < length) { - var value = array4[index]; - setter(accumulator, value, iteratee2(value), array4); - } - return accumulator; -} -var arrayAggregator_default = arrayAggregator; - -// node_modules/lodash-es/_createBaseFor.js -function createBaseFor(fromRight) { - return function(object4, iteratee2, keysFunc) { - var index = -1, iterable = Object(object4), props2 = keysFunc(object4), length = props2.length; - while (length--) { - var key = props2[fromRight ? length : ++index]; - if (iteratee2(iterable[key], key, iterable) === false) { - break; - } - } - return object4; - }; -} -var createBaseFor_default = createBaseFor; - -// node_modules/lodash-es/_baseFor.js -var baseFor = createBaseFor_default(); -var baseFor_default = baseFor; - -// node_modules/lodash-es/_baseForOwn.js -function baseForOwn(object4, iteratee2) { - return object4 && baseFor_default(object4, iteratee2, keys_default); -} -var baseForOwn_default = baseForOwn; - -// node_modules/lodash-es/_createBaseEach.js -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee2) { - if (collection == null) { - return collection; - } - if (!isArrayLike_default(collection)) { - return eachFunc(collection, iteratee2); - } - var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); - while (fromRight ? index-- : ++index < length) { - if (iteratee2(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} -var createBaseEach_default = createBaseEach; - -// node_modules/lodash-es/_baseEach.js -var baseEach = createBaseEach_default(baseForOwn_default); -var baseEach_default = baseEach; - -// node_modules/lodash-es/_baseAggregator.js -function baseAggregator(collection, setter, iteratee2, accumulator) { - baseEach_default(collection, function(value, key, collection2) { - setter(accumulator, value, iteratee2(value), collection2); - }); - return accumulator; -} -var baseAggregator_default = baseAggregator; - -// node_modules/lodash-es/_createAggregator.js -function createAggregator(setter, initializer) { - return function(collection, iteratee2) { - var func = isArray_default(collection) ? arrayAggregator_default : baseAggregator_default, accumulator = initializer ? initializer() : {}; - return func(collection, setter, baseIteratee_default(iteratee2, 2), accumulator); - }; -} -var createAggregator_default = createAggregator; - -// node_modules/lodash-es/countBy.js -var objectProto20 = Object.prototype; -var hasOwnProperty17 = objectProto20.hasOwnProperty; -var countBy = createAggregator_default(function(result2, value, key) { - if (hasOwnProperty17.call(result2, key)) { - ++result2[key]; - } else { - baseAssignValue_default(result2, key, 1); - } -}); -var countBy_default = countBy; - -// node_modules/lodash-es/create.js -function create(prototype, properties) { - var result2 = baseCreate_default(prototype); - return properties == null ? result2 : baseAssign_default(result2, properties); -} -var create_default = create; - -// node_modules/lodash-es/curry.js -var WRAP_CURRY_FLAG6 = 8; -function curry(func, arity, guard) { - arity = guard ? void 0 : arity; - var result2 = createWrap_default(func, WRAP_CURRY_FLAG6, void 0, void 0, void 0, void 0, void 0, arity); - result2.placeholder = curry.placeholder; - return result2; -} -curry.placeholder = {}; -var curry_default = curry; - -// node_modules/lodash-es/curryRight.js -var WRAP_CURRY_RIGHT_FLAG4 = 16; -function curryRight(func, arity, guard) { - arity = guard ? void 0 : arity; - var result2 = createWrap_default(func, WRAP_CURRY_RIGHT_FLAG4, void 0, void 0, void 0, void 0, void 0, arity); - result2.placeholder = curryRight.placeholder; - return result2; -} -curryRight.placeholder = {}; -var curryRight_default = curryRight; - -// node_modules/lodash-es/now.js -var now = function() { - return root_default.Date.now(); -}; -var now_default = now; - -// node_modules/lodash-es/debounce.js -var FUNC_ERROR_TEXT6 = "Expected a function"; -var nativeMax6 = Math.max; -var nativeMin4 = Math.min; -function debounce(func, wait, options) { - var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT6); - } - wait = toNumber_default(wait) || 0; - if (isObject_default(options)) { - leading = !!options.leading; - maxing = "maxWait" in options; - maxWait = maxing ? nativeMax6(toNumber_default(options.maxWait) || 0, wait) : maxWait; - trailing = "trailing" in options ? !!options.trailing : trailing; - } - function invokeFunc(time) { - var args = lastArgs, thisArg = lastThis; - lastArgs = lastThis = void 0; - lastInvokeTime = time; - result2 = func.apply(thisArg, args); - return result2; - } - function leadingEdge(time) { - lastInvokeTime = time; - timerId = setTimeout(timerExpired, wait); - return leading ? invokeFunc(time) : result2; - } - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; - return maxing ? nativeMin4(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; - } - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; - return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; - } - function timerExpired() { - var time = now_default(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - timerId = setTimeout(timerExpired, remainingWait(time)); - } - function trailingEdge(time) { - timerId = void 0; - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = void 0; - return result2; - } - function cancel() { - if (timerId !== void 0) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = void 0; - } - function flush() { - return timerId === void 0 ? result2 : trailingEdge(now_default()); - } - function debounced() { - var time = now_default(), isInvoking = shouldInvoke(time); - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - if (isInvoking) { - if (timerId === void 0) { - return leadingEdge(lastCallTime); - } - if (maxing) { - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === void 0) { - timerId = setTimeout(timerExpired, wait); - } - return result2; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} -var debounce_default = debounce; - -// node_modules/lodash-es/defaultTo.js -function defaultTo(value, defaultValue) { - return value == null || value !== value ? defaultValue : value; -} -var defaultTo_default = defaultTo; - -// node_modules/lodash-es/defaults.js -var objectProto21 = Object.prototype; -var hasOwnProperty18 = objectProto21.hasOwnProperty; -var defaults = baseRest_default(function(object4, sources) { - object4 = Object(object4); - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : void 0; - if (guard && isIterateeCall_default(sources[0], sources[1], guard)) { - length = 1; - } - while (++index < length) { - var source = sources[index]; - var props2 = keysIn_default(source); - var propsIndex = -1; - var propsLength = props2.length; - while (++propsIndex < propsLength) { - var key = props2[propsIndex]; - var value = object4[key]; - if (value === void 0 || eq_default(value, objectProto21[key]) && !hasOwnProperty18.call(object4, key)) { - object4[key] = source[key]; - } - } - } - return object4; -}); -var defaults_default = defaults; - -// node_modules/lodash-es/_assignMergeValue.js -function assignMergeValue(object4, key, value) { - if (value !== void 0 && !eq_default(object4[key], value) || value === void 0 && !(key in object4)) { - baseAssignValue_default(object4, key, value); - } -} -var assignMergeValue_default = assignMergeValue; - -// node_modules/lodash-es/isArrayLikeObject.js -function isArrayLikeObject(value) { - return isObjectLike_default(value) && isArrayLike_default(value); -} -var isArrayLikeObject_default = isArrayLikeObject; - -// node_modules/lodash-es/_safeGet.js -function safeGet(object4, key) { - if (key === "constructor" && typeof object4[key] === "function") { - return; - } - if (key == "__proto__") { - return; - } - return object4[key]; -} -var safeGet_default = safeGet; - -// node_modules/lodash-es/toPlainObject.js -function toPlainObject(value) { - return copyObject_default(value, keysIn_default(value)); -} -var toPlainObject_default = toPlainObject; - -// node_modules/lodash-es/_baseMergeDeep.js -function baseMergeDeep(object4, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet_default(object4, key), srcValue = safeGet_default(source, key), stacked = stack.get(srcValue); - if (stacked) { - assignMergeValue_default(object4, key, stacked); - return; - } - var newValue = customizer ? customizer(objValue, srcValue, key + "", object4, source, stack) : void 0; - var isCommon = newValue === void 0; - if (isCommon) { - var isArr = isArray_default(srcValue), isBuff = !isArr && isBuffer_default(srcValue), isTyped = !isArr && !isBuff && isTypedArray_default(srcValue); - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray_default(objValue)) { - newValue = objValue; - } else if (isArrayLikeObject_default(objValue)) { - newValue = copyArray_default(objValue); - } else if (isBuff) { - isCommon = false; - newValue = cloneBuffer_default(srcValue, true); - } else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray_default(srcValue, true); - } else { - newValue = []; - } - } else if (isPlainObject_default(srcValue) || isArguments_default(srcValue)) { - newValue = objValue; - if (isArguments_default(objValue)) { - newValue = toPlainObject_default(objValue); - } else if (!isObject_default(objValue) || isFunction_default(objValue)) { - newValue = initCloneObject_default(srcValue); - } - } else { - isCommon = false; - } - } - if (isCommon) { - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack["delete"](srcValue); - } - assignMergeValue_default(object4, key, newValue); -} -var baseMergeDeep_default = baseMergeDeep; - -// node_modules/lodash-es/_baseMerge.js -function baseMerge(object4, source, srcIndex, customizer, stack) { - if (object4 === source) { - return; - } - baseFor_default(source, function(srcValue, key) { - stack || (stack = new Stack_default()); - if (isObject_default(srcValue)) { - baseMergeDeep_default(object4, source, key, srcIndex, baseMerge, customizer, stack); - } else { - var newValue = customizer ? customizer(safeGet_default(object4, key), srcValue, key + "", object4, source, stack) : void 0; - if (newValue === void 0) { - newValue = srcValue; - } - assignMergeValue_default(object4, key, newValue); - } - }, keysIn_default); -} -var baseMerge_default = baseMerge; - -// node_modules/lodash-es/_customDefaultsMerge.js -function customDefaultsMerge(objValue, srcValue, key, object4, source, stack) { - if (isObject_default(objValue) && isObject_default(srcValue)) { - stack.set(srcValue, objValue); - baseMerge_default(objValue, srcValue, void 0, customDefaultsMerge, stack); - stack["delete"](srcValue); - } - return objValue; -} -var customDefaultsMerge_default = customDefaultsMerge; - -// node_modules/lodash-es/mergeWith.js -var mergeWith = createAssigner_default(function(object4, source, srcIndex, customizer) { - baseMerge_default(object4, source, srcIndex, customizer); -}); -var mergeWith_default = mergeWith; - -// node_modules/lodash-es/defaultsDeep.js -var defaultsDeep = baseRest_default(function(args) { - args.push(void 0, customDefaultsMerge_default); - return apply_default(mergeWith_default, void 0, args); -}); -var defaultsDeep_default = defaultsDeep; - -// node_modules/lodash-es/_baseDelay.js -var FUNC_ERROR_TEXT7 = "Expected a function"; -function baseDelay(func, wait, args) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT7); - } - return setTimeout(function() { - func.apply(void 0, args); - }, wait); -} -var baseDelay_default = baseDelay; - -// node_modules/lodash-es/defer.js -var defer = baseRest_default(function(func, args) { - return baseDelay_default(func, 1, args); -}); -var defer_default = defer; - -// node_modules/lodash-es/delay.js -var delay = baseRest_default(function(func, wait, args) { - return baseDelay_default(func, toNumber_default(wait) || 0, args); -}); -var delay_default = delay; - -// node_modules/lodash-es/_arrayIncludesWith.js -function arrayIncludesWith(array4, value, comparator) { - var index = -1, length = array4 == null ? 0 : array4.length; - while (++index < length) { - if (comparator(value, array4[index])) { - return true; - } - } - return false; -} -var arrayIncludesWith_default = arrayIncludesWith; - -// node_modules/lodash-es/_baseDifference.js -var LARGE_ARRAY_SIZE2 = 200; -function baseDifference(array4, values2, iteratee2, comparator) { - var index = -1, includes2 = arrayIncludes_default, isCommon = true, length = array4.length, result2 = [], valuesLength = values2.length; - if (!length) { - return result2; - } - if (iteratee2) { - values2 = arrayMap_default(values2, baseUnary_default(iteratee2)); - } - if (comparator) { - includes2 = arrayIncludesWith_default; - isCommon = false; - } else if (values2.length >= LARGE_ARRAY_SIZE2) { - includes2 = cacheHas_default; - isCommon = false; - values2 = new SetCache_default(values2); - } - outer: - while (++index < length) { - var value = array4[index], computed2 = iteratee2 == null ? value : iteratee2(value); - value = comparator || value !== 0 ? value : 0; - if (isCommon && computed2 === computed2) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values2[valuesIndex] === computed2) { - continue outer; - } - } - result2.push(value); - } else if (!includes2(values2, computed2, comparator)) { - result2.push(value); - } - } - return result2; -} -var baseDifference_default = baseDifference; - -// node_modules/lodash-es/difference.js -var difference = baseRest_default(function(array4, values2) { - return isArrayLikeObject_default(array4) ? baseDifference_default(array4, baseFlatten_default(values2, 1, isArrayLikeObject_default, true)) : []; -}); -var difference_default = difference; - -// node_modules/lodash-es/last.js -function last(array4) { - var length = array4 == null ? 0 : array4.length; - return length ? array4[length - 1] : void 0; -} -var last_default = last; - -// node_modules/lodash-es/differenceBy.js -var differenceBy = baseRest_default(function(array4, values2) { - var iteratee2 = last_default(values2); - if (isArrayLikeObject_default(iteratee2)) { - iteratee2 = void 0; - } - return isArrayLikeObject_default(array4) ? baseDifference_default(array4, baseFlatten_default(values2, 1, isArrayLikeObject_default, true), baseIteratee_default(iteratee2, 2)) : []; -}); -var differenceBy_default = differenceBy; - -// node_modules/lodash-es/differenceWith.js -var differenceWith = baseRest_default(function(array4, values2) { - var comparator = last_default(values2); - if (isArrayLikeObject_default(comparator)) { - comparator = void 0; - } - return isArrayLikeObject_default(array4) ? baseDifference_default(array4, baseFlatten_default(values2, 1, isArrayLikeObject_default, true), void 0, comparator) : []; -}); -var differenceWith_default = differenceWith; - -// node_modules/lodash-es/divide.js -var divide = createMathOperation_default(function(dividend, divisor) { - return dividend / divisor; -}, 1); -var divide_default = divide; - -// node_modules/lodash-es/drop.js -function drop(array4, n, guard) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return []; - } - n = guard || n === void 0 ? 1 : toInteger_default(n); - return baseSlice_default(array4, n < 0 ? 0 : n, length); -} -var drop_default = drop; - -// node_modules/lodash-es/dropRight.js -function dropRight(array4, n, guard) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return []; - } - n = guard || n === void 0 ? 1 : toInteger_default(n); - n = length - n; - return baseSlice_default(array4, 0, n < 0 ? 0 : n); -} -var dropRight_default = dropRight; - -// node_modules/lodash-es/_baseWhile.js -function baseWhile(array4, predicate, isDrop, fromRight) { - var length = array4.length, index = fromRight ? length : -1; - while ((fromRight ? index-- : ++index < length) && predicate(array4[index], index, array4)) { - } - return isDrop ? baseSlice_default(array4, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice_default(array4, fromRight ? index + 1 : 0, fromRight ? length : index); -} -var baseWhile_default = baseWhile; - -// node_modules/lodash-es/dropRightWhile.js -function dropRightWhile(array4, predicate) { - return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3), true, true) : []; -} -var dropRightWhile_default = dropRightWhile; - -// node_modules/lodash-es/dropWhile.js -function dropWhile(array4, predicate) { - return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3), true) : []; -} -var dropWhile_default = dropWhile; - -// node_modules/lodash-es/_castFunction.js -function castFunction(value) { - return typeof value == "function" ? value : identity_default; -} -var castFunction_default = castFunction; - -// node_modules/lodash-es/forEach.js -function forEach(collection, iteratee2) { - var func = isArray_default(collection) ? arrayEach_default : baseEach_default; - return func(collection, castFunction_default(iteratee2)); -} -var forEach_default = forEach; - -// node_modules/lodash-es/_arrayEachRight.js -function arrayEachRight(array4, iteratee2) { - var length = array4 == null ? 0 : array4.length; - while (length--) { - if (iteratee2(array4[length], length, array4) === false) { - break; - } - } - return array4; -} -var arrayEachRight_default = arrayEachRight; - -// node_modules/lodash-es/_baseForRight.js -var baseForRight = createBaseFor_default(true); -var baseForRight_default = baseForRight; - -// node_modules/lodash-es/_baseForOwnRight.js -function baseForOwnRight(object4, iteratee2) { - return object4 && baseForRight_default(object4, iteratee2, keys_default); -} -var baseForOwnRight_default = baseForOwnRight; - -// node_modules/lodash-es/_baseEachRight.js -var baseEachRight = createBaseEach_default(baseForOwnRight_default, true); -var baseEachRight_default = baseEachRight; - -// node_modules/lodash-es/forEachRight.js -function forEachRight(collection, iteratee2) { - var func = isArray_default(collection) ? arrayEachRight_default : baseEachRight_default; - return func(collection, castFunction_default(iteratee2)); -} -var forEachRight_default = forEachRight; - -// node_modules/lodash-es/endsWith.js -function endsWith(string3, target2, position) { - string3 = toString_default(string3); - target2 = baseToString_default(target2); - var length = string3.length; - position = position === void 0 ? length : baseClamp_default(toInteger_default(position), 0, length); - var end = position; - position -= target2.length; - return position >= 0 && string3.slice(position, end) == target2; -} -var endsWith_default = endsWith; - -// node_modules/lodash-es/_baseToPairs.js -function baseToPairs(object4, props2) { - return arrayMap_default(props2, function(key) { - return [key, object4[key]]; - }); -} -var baseToPairs_default = baseToPairs; - -// node_modules/lodash-es/_setToPairs.js -function setToPairs(set3) { - var index = -1, result2 = Array(set3.size); - set3.forEach(function(value) { - result2[++index] = [value, value]; - }); - return result2; -} -var setToPairs_default = setToPairs; - -// node_modules/lodash-es/_createToPairs.js -var mapTag7 = "[object Map]"; -var setTag7 = "[object Set]"; -function createToPairs(keysFunc) { - return function(object4) { - var tag = getTag_default(object4); - if (tag == mapTag7) { - return mapToArray_default(object4); - } - if (tag == setTag7) { - return setToPairs_default(object4); - } - return baseToPairs_default(object4, keysFunc(object4)); - }; -} -var createToPairs_default = createToPairs; - -// node_modules/lodash-es/toPairs.js -var toPairs = createToPairs_default(keys_default); -var toPairs_default = toPairs; - -// node_modules/lodash-es/toPairsIn.js -var toPairsIn = createToPairs_default(keysIn_default); -var toPairsIn_default = toPairsIn; - -// node_modules/lodash-es/_escapeHtmlChar.js -var htmlEscapes = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'" -}; -var escapeHtmlChar = basePropertyOf_default(htmlEscapes); -var escapeHtmlChar_default = escapeHtmlChar; - -// node_modules/lodash-es/escape.js -var reUnescapedHtml = /[&<>"']/g; -var reHasUnescapedHtml = RegExp(reUnescapedHtml.source); -function escape(string3) { - string3 = toString_default(string3); - return string3 && reHasUnescapedHtml.test(string3) ? string3.replace(reUnescapedHtml, escapeHtmlChar_default) : string3; -} -var escape_default = escape; - -// node_modules/lodash-es/escapeRegExp.js -var reRegExpChar2 = /[\\^$.*+?()[\]{}|]/g; -var reHasRegExpChar = RegExp(reRegExpChar2.source); -function escapeRegExp(string3) { - string3 = toString_default(string3); - return string3 && reHasRegExpChar.test(string3) ? string3.replace(reRegExpChar2, "\\$&") : string3; -} -var escapeRegExp_default = escapeRegExp; - -// node_modules/lodash-es/_arrayEvery.js -function arrayEvery(array4, predicate) { - var index = -1, length = array4 == null ? 0 : array4.length; - while (++index < length) { - if (!predicate(array4[index], index, array4)) { - return false; - } - } - return true; -} -var arrayEvery_default = arrayEvery; - -// node_modules/lodash-es/_baseEvery.js -function baseEvery(collection, predicate) { - var result2 = true; - baseEach_default(collection, function(value, index, collection2) { - result2 = !!predicate(value, index, collection2); - return result2; - }); - return result2; -} -var baseEvery_default = baseEvery; - -// node_modules/lodash-es/every.js -function every(collection, predicate, guard) { - var func = isArray_default(collection) ? arrayEvery_default : baseEvery_default; - if (guard && isIterateeCall_default(collection, predicate, guard)) { - predicate = void 0; - } - return func(collection, baseIteratee_default(predicate, 3)); -} -var every_default = every; - -// node_modules/lodash-es/toLength.js -var MAX_ARRAY_LENGTH2 = 4294967295; -function toLength(value) { - return value ? baseClamp_default(toInteger_default(value), 0, MAX_ARRAY_LENGTH2) : 0; -} -var toLength_default = toLength; - -// node_modules/lodash-es/_baseFill.js -function baseFill(array4, value, start, end) { - var length = array4.length; - start = toInteger_default(start); - if (start < 0) { - start = -start > length ? 0 : length + start; - } - end = end === void 0 || end > length ? length : toInteger_default(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength_default(end); - while (start < end) { - array4[start++] = value; - } - return array4; -} -var baseFill_default = baseFill; - -// node_modules/lodash-es/fill.js -function fill(array4, value, start, end) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return []; - } - if (start && typeof start != "number" && isIterateeCall_default(array4, value, start)) { - start = 0; - end = length; - } - return baseFill_default(array4, value, start, end); -} -var fill_default = fill; - -// node_modules/lodash-es/_baseFilter.js -function baseFilter(collection, predicate) { - var result2 = []; - baseEach_default(collection, function(value, index, collection2) { - if (predicate(value, index, collection2)) { - result2.push(value); - } - }); - return result2; -} -var baseFilter_default = baseFilter; - -// node_modules/lodash-es/filter.js -function filter(collection, predicate) { - var func = isArray_default(collection) ? arrayFilter_default : baseFilter_default; - return func(collection, baseIteratee_default(predicate, 3)); -} -var filter_default = filter; - -// node_modules/lodash-es/_createFind.js -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike_default(collection)) { - var iteratee2 = baseIteratee_default(predicate, 3); - collection = keys_default(collection); - predicate = function(key) { - return iteratee2(iterable[key], key, iterable); - }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee2 ? collection[index] : index] : void 0; - }; -} -var createFind_default = createFind; - -// node_modules/lodash-es/findIndex.js -var nativeMax7 = Math.max; -function findIndex(array4, predicate, fromIndex) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger_default(fromIndex); - if (index < 0) { - index = nativeMax7(length + index, 0); - } - return baseFindIndex_default(array4, baseIteratee_default(predicate, 3), index); -} -var findIndex_default = findIndex; - -// node_modules/lodash-es/find.js -var find = createFind_default(findIndex_default); -var find_default = find; - -// node_modules/lodash-es/_baseFindKey.js -function baseFindKey(collection, predicate, eachFunc) { - var result2; - eachFunc(collection, function(value, key, collection2) { - if (predicate(value, key, collection2)) { - result2 = key; - return false; - } - }); - return result2; -} -var baseFindKey_default = baseFindKey; - -// node_modules/lodash-es/findKey.js -function findKey(object4, predicate) { - return baseFindKey_default(object4, baseIteratee_default(predicate, 3), baseForOwn_default); -} -var findKey_default = findKey; - -// node_modules/lodash-es/findLastIndex.js -var nativeMax8 = Math.max; -var nativeMin5 = Math.min; -function findLastIndex(array4, predicate, fromIndex) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== void 0) { - index = toInteger_default(fromIndex); - index = fromIndex < 0 ? nativeMax8(length + index, 0) : nativeMin5(index, length - 1); - } - return baseFindIndex_default(array4, baseIteratee_default(predicate, 3), index, true); -} -var findLastIndex_default = findLastIndex; - -// node_modules/lodash-es/findLast.js -var findLast = createFind_default(findLastIndex_default); -var findLast_default = findLast; - -// node_modules/lodash-es/findLastKey.js -function findLastKey(object4, predicate) { - return baseFindKey_default(object4, baseIteratee_default(predicate, 3), baseForOwnRight_default); -} -var findLastKey_default = findLastKey; - -// node_modules/lodash-es/head.js -function head(array4) { - return array4 && array4.length ? array4[0] : void 0; -} -var head_default = head; - -// node_modules/lodash-es/_baseMap.js -function baseMap(collection, iteratee2) { - var index = -1, result2 = isArrayLike_default(collection) ? Array(collection.length) : []; - baseEach_default(collection, function(value, key, collection2) { - result2[++index] = iteratee2(value, key, collection2); - }); - return result2; -} -var baseMap_default = baseMap; - -// node_modules/lodash-es/map.js -function map(collection, iteratee2) { - var func = isArray_default(collection) ? arrayMap_default : baseMap_default; - return func(collection, baseIteratee_default(iteratee2, 3)); -} -var map_default = map; - -// node_modules/lodash-es/flatMap.js -function flatMap(collection, iteratee2) { - return baseFlatten_default(map_default(collection, iteratee2), 1); -} -var flatMap_default = flatMap; - -// node_modules/lodash-es/flatMapDeep.js -var INFINITY4 = 1 / 0; -function flatMapDeep(collection, iteratee2) { - return baseFlatten_default(map_default(collection, iteratee2), INFINITY4); -} -var flatMapDeep_default = flatMapDeep; - -// node_modules/lodash-es/flatMapDepth.js -function flatMapDepth(collection, iteratee2, depth) { - depth = depth === void 0 ? 1 : toInteger_default(depth); - return baseFlatten_default(map_default(collection, iteratee2), depth); -} -var flatMapDepth_default = flatMapDepth; - -// node_modules/lodash-es/flattenDeep.js -var INFINITY5 = 1 / 0; -function flattenDeep(array4) { - var length = array4 == null ? 0 : array4.length; - return length ? baseFlatten_default(array4, INFINITY5) : []; -} -var flattenDeep_default = flattenDeep; - -// node_modules/lodash-es/flattenDepth.js -function flattenDepth(array4, depth) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return []; - } - depth = depth === void 0 ? 1 : toInteger_default(depth); - return baseFlatten_default(array4, depth); -} -var flattenDepth_default = flattenDepth; - -// node_modules/lodash-es/flip.js -var WRAP_FLIP_FLAG3 = 512; -function flip(func) { - return createWrap_default(func, WRAP_FLIP_FLAG3); -} -var flip_default = flip; - -// node_modules/lodash-es/floor.js -var floor = createRound_default("floor"); -var floor_default = floor; - -// node_modules/lodash-es/_createFlow.js -var FUNC_ERROR_TEXT8 = "Expected a function"; -var WRAP_CURRY_FLAG7 = 8; -var WRAP_PARTIAL_FLAG6 = 32; -var WRAP_ARY_FLAG5 = 128; -var WRAP_REARG_FLAG3 = 256; -function createFlow(fromRight) { - return flatRest_default(function(funcs) { - var length = funcs.length, index = length, prereq = LodashWrapper_default.prototype.thru; - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT8); - } - if (prereq && !wrapper && getFuncName_default(func) == "wrapper") { - var wrapper = new LodashWrapper_default([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - var funcName = getFuncName_default(func), data = funcName == "wrapper" ? getData_default(func) : void 0; - if (data && isLaziable_default(data[0]) && data[1] == (WRAP_ARY_FLAG5 | WRAP_CURRY_FLAG7 | WRAP_PARTIAL_FLAG6 | WRAP_REARG_FLAG3) && !data[4].length && data[9] == 1) { - wrapper = wrapper[getFuncName_default(data[0])].apply(wrapper, data[3]); - } else { - wrapper = func.length == 1 && isLaziable_default(func) ? wrapper[funcName]() : wrapper.thru(func); - } - } - return function() { - var args = arguments, value = args[0]; - if (wrapper && args.length == 1 && isArray_default(value)) { - return wrapper.plant(value).value(); - } - var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value; - while (++index2 < length) { - result2 = funcs[index2].call(this, result2); - } - return result2; - }; - }); -} -var createFlow_default = createFlow; - -// node_modules/lodash-es/flow.js -var flow = createFlow_default(); -var flow_default = flow; - -// node_modules/lodash-es/flowRight.js -var flowRight = createFlow_default(true); -var flowRight_default = flowRight; - -// node_modules/lodash-es/forIn.js -function forIn(object4, iteratee2) { - return object4 == null ? object4 : baseFor_default(object4, castFunction_default(iteratee2), keysIn_default); -} -var forIn_default = forIn; - -// node_modules/lodash-es/forInRight.js -function forInRight(object4, iteratee2) { - return object4 == null ? object4 : baseForRight_default(object4, castFunction_default(iteratee2), keysIn_default); -} -var forInRight_default = forInRight; - -// node_modules/lodash-es/forOwn.js -function forOwn(object4, iteratee2) { - return object4 && baseForOwn_default(object4, castFunction_default(iteratee2)); -} -var forOwn_default = forOwn; - -// node_modules/lodash-es/forOwnRight.js -function forOwnRight(object4, iteratee2) { - return object4 && baseForOwnRight_default(object4, castFunction_default(iteratee2)); -} -var forOwnRight_default = forOwnRight; - -// node_modules/lodash-es/fromPairs.js -function fromPairs(pairs) { - var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {}; - while (++index < length) { - var pair = pairs[index]; - result2[pair[0]] = pair[1]; - } - return result2; -} -var fromPairs_default = fromPairs; - -// node_modules/lodash-es/_baseFunctions.js -function baseFunctions(object4, props2) { - return arrayFilter_default(props2, function(key) { - return isFunction_default(object4[key]); - }); -} -var baseFunctions_default = baseFunctions; - -// node_modules/lodash-es/functions.js -function functions(object4) { - return object4 == null ? [] : baseFunctions_default(object4, keys_default(object4)); -} -var functions_default = functions; - -// node_modules/lodash-es/functionsIn.js -function functionsIn(object4) { - return object4 == null ? [] : baseFunctions_default(object4, keysIn_default(object4)); -} -var functionsIn_default = functionsIn; - -// node_modules/lodash-es/groupBy.js -var objectProto22 = Object.prototype; -var hasOwnProperty19 = objectProto22.hasOwnProperty; -var groupBy = createAggregator_default(function(result2, value, key) { - if (hasOwnProperty19.call(result2, key)) { - result2[key].push(value); - } else { - baseAssignValue_default(result2, key, [value]); - } -}); -var groupBy_default = groupBy; - -// node_modules/lodash-es/_baseGt.js -function baseGt(value, other) { - return value > other; -} -var baseGt_default = baseGt; - -// node_modules/lodash-es/_createRelationalOperation.js -function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == "string" && typeof other == "string")) { - value = toNumber_default(value); - other = toNumber_default(other); - } - return operator(value, other); - }; -} -var createRelationalOperation_default = createRelationalOperation; - -// node_modules/lodash-es/gt.js -var gt = createRelationalOperation_default(baseGt_default); -var gt_default = gt; - -// node_modules/lodash-es/gte.js -var gte = createRelationalOperation_default(function(value, other) { - return value >= other; -}); -var gte_default = gte; - -// node_modules/lodash-es/_baseHas.js -var objectProto23 = Object.prototype; -var hasOwnProperty20 = objectProto23.hasOwnProperty; -function baseHas(object4, key) { - return object4 != null && hasOwnProperty20.call(object4, key); -} -var baseHas_default = baseHas; - -// node_modules/lodash-es/has.js -function has(object4, path) { - return object4 != null && hasPath_default(object4, path, baseHas_default); -} -var has_default = has; - -// node_modules/lodash-es/_baseInRange.js -var nativeMax9 = Math.max; -var nativeMin6 = Math.min; -function baseInRange(number4, start, end) { - return number4 >= nativeMin6(start, end) && number4 < nativeMax9(start, end); -} -var baseInRange_default = baseInRange; - -// node_modules/lodash-es/inRange.js -function inRange(number4, start, end) { - start = toFinite_default(start); - if (end === void 0) { - end = start; - start = 0; - } else { - end = toFinite_default(end); - } - number4 = toNumber_default(number4); - return baseInRange_default(number4, start, end); -} -var inRange_default = inRange; - -// node_modules/lodash-es/isString.js -var stringTag5 = "[object String]"; -function isString2(value) { - return typeof value == "string" || !isArray_default(value) && isObjectLike_default(value) && baseGetTag_default(value) == stringTag5; -} -var isString_default = isString2; - -// node_modules/lodash-es/_baseValues.js -function baseValues(object4, props2) { - return arrayMap_default(props2, function(key) { - return object4[key]; - }); -} -var baseValues_default = baseValues; - -// node_modules/lodash-es/values.js -function values(object4) { - return object4 == null ? [] : baseValues_default(object4, keys_default(object4)); -} -var values_default = values; - -// node_modules/lodash-es/includes.js -var nativeMax10 = Math.max; -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike_default(collection) ? collection : values_default(collection); - fromIndex = fromIndex && !guard ? toInteger_default(fromIndex) : 0; - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax10(length + fromIndex, 0); - } - return isString_default(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf_default(collection, value, fromIndex) > -1; -} -var includes_default = includes; - -// node_modules/lodash-es/indexOf.js -var nativeMax11 = Math.max; -function indexOf(array4, value, fromIndex) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger_default(fromIndex); - if (index < 0) { - index = nativeMax11(length + index, 0); - } - return baseIndexOf_default(array4, value, index); -} -var indexOf_default = indexOf; - -// node_modules/lodash-es/initial.js -function initial(array4) { - var length = array4 == null ? 0 : array4.length; - return length ? baseSlice_default(array4, 0, -1) : []; -} -var initial_default = initial; - -// node_modules/lodash-es/_baseIntersection.js -var nativeMin7 = Math.min; -function baseIntersection(arrays, iteratee2, comparator) { - var includes2 = comparator ? arrayIncludesWith_default : arrayIncludes_default, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result2 = []; - while (othIndex--) { - var array4 = arrays[othIndex]; - if (othIndex && iteratee2) { - array4 = arrayMap_default(array4, baseUnary_default(iteratee2)); - } - maxLength = nativeMin7(array4.length, maxLength); - caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array4.length >= 120) ? new SetCache_default(othIndex && array4) : void 0; - } - array4 = arrays[0]; - var index = -1, seen = caches[0]; - outer: - while (++index < length && result2.length < maxLength) { - var value = array4[index], computed2 = iteratee2 ? iteratee2(value) : value; - value = comparator || value !== 0 ? value : 0; - if (!(seen ? cacheHas_default(seen, computed2) : includes2(result2, computed2, comparator))) { - othIndex = othLength; - while (--othIndex) { - var cache2 = caches[othIndex]; - if (!(cache2 ? cacheHas_default(cache2, computed2) : includes2(arrays[othIndex], computed2, comparator))) { - continue outer; - } - } - if (seen) { - seen.push(computed2); - } - result2.push(value); - } - } - return result2; -} -var baseIntersection_default = baseIntersection; - -// node_modules/lodash-es/_castArrayLikeObject.js -function castArrayLikeObject(value) { - return isArrayLikeObject_default(value) ? value : []; -} -var castArrayLikeObject_default = castArrayLikeObject; - -// node_modules/lodash-es/intersection.js -var intersection = baseRest_default(function(arrays) { - var mapped = arrayMap_default(arrays, castArrayLikeObject_default); - return mapped.length && mapped[0] === arrays[0] ? baseIntersection_default(mapped) : []; -}); -var intersection_default = intersection; - -// node_modules/lodash-es/intersectionBy.js -var intersectionBy = baseRest_default(function(arrays) { - var iteratee2 = last_default(arrays), mapped = arrayMap_default(arrays, castArrayLikeObject_default); - if (iteratee2 === last_default(mapped)) { - iteratee2 = void 0; - } else { - mapped.pop(); - } - return mapped.length && mapped[0] === arrays[0] ? baseIntersection_default(mapped, baseIteratee_default(iteratee2, 2)) : []; -}); -var intersectionBy_default = intersectionBy; - -// node_modules/lodash-es/intersectionWith.js -var intersectionWith = baseRest_default(function(arrays) { - var comparator = last_default(arrays), mapped = arrayMap_default(arrays, castArrayLikeObject_default); - comparator = typeof comparator == "function" ? comparator : void 0; - if (comparator) { - mapped.pop(); - } - return mapped.length && mapped[0] === arrays[0] ? baseIntersection_default(mapped, void 0, comparator) : []; -}); -var intersectionWith_default = intersectionWith; - -// node_modules/lodash-es/_baseInverter.js -function baseInverter(object4, setter, iteratee2, accumulator) { - baseForOwn_default(object4, function(value, key, object5) { - setter(accumulator, iteratee2(value), key, object5); - }); - return accumulator; -} -var baseInverter_default = baseInverter; - -// node_modules/lodash-es/_createInverter.js -function createInverter(setter, toIteratee) { - return function(object4, iteratee2) { - return baseInverter_default(object4, setter, toIteratee(iteratee2), {}); - }; -} -var createInverter_default = createInverter; - -// node_modules/lodash-es/invert.js -var objectProto24 = Object.prototype; -var nativeObjectToString3 = objectProto24.toString; -var invert = createInverter_default(function(result2, value, key) { - if (value != null && typeof value.toString != "function") { - value = nativeObjectToString3.call(value); - } - result2[value] = key; -}, constant_default(identity_default)); -var invert_default = invert; - -// node_modules/lodash-es/invertBy.js -var objectProto25 = Object.prototype; -var hasOwnProperty21 = objectProto25.hasOwnProperty; -var nativeObjectToString4 = objectProto25.toString; -var invertBy = createInverter_default(function(result2, value, key) { - if (value != null && typeof value.toString != "function") { - value = nativeObjectToString4.call(value); - } - if (hasOwnProperty21.call(result2, value)) { - result2[value].push(key); - } else { - result2[value] = [key]; - } -}, baseIteratee_default); -var invertBy_default = invertBy; - -// node_modules/lodash-es/_parent.js -function parent(object4, path) { - return path.length < 2 ? object4 : baseGet_default(object4, baseSlice_default(path, 0, -1)); -} -var parent_default = parent; - -// node_modules/lodash-es/_baseInvoke.js -function baseInvoke(object4, path, args) { - path = castPath_default(path, object4); - object4 = parent_default(object4, path); - var func = object4 == null ? object4 : object4[toKey_default(last_default(path))]; - return func == null ? void 0 : apply_default(func, object4, args); -} -var baseInvoke_default = baseInvoke; - -// node_modules/lodash-es/invoke.js -var invoke = baseRest_default(baseInvoke_default); -var invoke_default = invoke; - -// node_modules/lodash-es/invokeMap.js -var invokeMap = baseRest_default(function(collection, path, args) { - var index = -1, isFunc = typeof path == "function", result2 = isArrayLike_default(collection) ? Array(collection.length) : []; - baseEach_default(collection, function(value) { - result2[++index] = isFunc ? apply_default(path, value, args) : baseInvoke_default(value, path, args); - }); - return result2; -}); -var invokeMap_default = invokeMap; - -// node_modules/lodash-es/_baseIsArrayBuffer.js -var arrayBufferTag5 = "[object ArrayBuffer]"; -function baseIsArrayBuffer(value) { - return isObjectLike_default(value) && baseGetTag_default(value) == arrayBufferTag5; -} -var baseIsArrayBuffer_default = baseIsArrayBuffer; - -// node_modules/lodash-es/isArrayBuffer.js -var nodeIsArrayBuffer = nodeUtil_default && nodeUtil_default.isArrayBuffer; -var isArrayBuffer = nodeIsArrayBuffer ? baseUnary_default(nodeIsArrayBuffer) : baseIsArrayBuffer_default; -var isArrayBuffer_default = isArrayBuffer; - -// node_modules/lodash-es/isBoolean.js -var boolTag5 = "[object Boolean]"; -function isBoolean(value) { - return value === true || value === false || isObjectLike_default(value) && baseGetTag_default(value) == boolTag5; -} -var isBoolean_default = isBoolean; - -// node_modules/lodash-es/_baseIsDate.js -var dateTag5 = "[object Date]"; -function baseIsDate(value) { - return isObjectLike_default(value) && baseGetTag_default(value) == dateTag5; -} -var baseIsDate_default = baseIsDate; - -// node_modules/lodash-es/isDate.js -var nodeIsDate = nodeUtil_default && nodeUtil_default.isDate; -var isDate2 = nodeIsDate ? baseUnary_default(nodeIsDate) : baseIsDate_default; -var isDate_default = isDate2; - -// node_modules/lodash-es/isElement.js -function isElement(value) { - return isObjectLike_default(value) && value.nodeType === 1 && !isPlainObject_default(value); -} -var isElement_default = isElement; - -// node_modules/lodash-es/isEmpty.js -var mapTag8 = "[object Map]"; -var setTag8 = "[object Set]"; -var objectProto26 = Object.prototype; -var hasOwnProperty22 = objectProto26.hasOwnProperty; -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike_default(value) && (isArray_default(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer_default(value) || isTypedArray_default(value) || isArguments_default(value))) { - return !value.length; - } - var tag = getTag_default(value); - if (tag == mapTag8 || tag == setTag8) { - return !value.size; - } - if (isPrototype_default(value)) { - return !baseKeys_default(value).length; - } - for (var key in value) { - if (hasOwnProperty22.call(value, key)) { - return false; - } - } - return true; -} -var isEmpty_default = isEmpty; - -// node_modules/lodash-es/isEqual.js -function isEqual(value, other) { - return baseIsEqual_default(value, other); -} -var isEqual_default = isEqual; - -// node_modules/lodash-es/isEqualWith.js -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == "function" ? customizer : void 0; - var result2 = customizer ? customizer(value, other) : void 0; - return result2 === void 0 ? baseIsEqual_default(value, other, void 0, customizer) : !!result2; -} -var isEqualWith_default = isEqualWith; - -// node_modules/lodash-es/isFinite.js -var nativeIsFinite2 = root_default.isFinite; -function isFinite(value) { - return typeof value == "number" && nativeIsFinite2(value); -} -var isFinite_default = isFinite; - -// node_modules/lodash-es/isInteger.js -function isInteger(value) { - return typeof value == "number" && value == toInteger_default(value); -} -var isInteger_default = isInteger; - -// node_modules/lodash-es/isMatch.js -function isMatch(object4, source) { - return object4 === source || baseIsMatch_default(object4, source, getMatchData_default(source)); -} -var isMatch_default = isMatch; - -// node_modules/lodash-es/isMatchWith.js -function isMatchWith(object4, source, customizer) { - customizer = typeof customizer == "function" ? customizer : void 0; - return baseIsMatch_default(object4, source, getMatchData_default(source), customizer); -} -var isMatchWith_default = isMatchWith; - -// node_modules/lodash-es/isNumber.js -var numberTag5 = "[object Number]"; -function isNumber(value) { - return typeof value == "number" || isObjectLike_default(value) && baseGetTag_default(value) == numberTag5; -} -var isNumber_default = isNumber; - -// node_modules/lodash-es/isNaN.js -function isNaN2(value) { - return isNumber_default(value) && value != +value; -} -var isNaN_default = isNaN2; - -// node_modules/lodash-es/_isMaskable.js -var isMaskable = coreJsData_default ? isFunction_default : stubFalse_default; -var isMaskable_default = isMaskable; - -// node_modules/lodash-es/isNative.js -var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill."; -function isNative(value) { - if (isMaskable_default(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative_default(value); -} -var isNative_default = isNative; - -// node_modules/lodash-es/isNil.js -function isNil(value) { - return value == null; -} -var isNil_default = isNil; - -// node_modules/lodash-es/isNull.js -function isNull(value) { - return value === null; -} -var isNull_default = isNull; - -// node_modules/lodash-es/_baseIsRegExp.js -var regexpTag5 = "[object RegExp]"; -function baseIsRegExp(value) { - return isObjectLike_default(value) && baseGetTag_default(value) == regexpTag5; -} -var baseIsRegExp_default = baseIsRegExp; - -// node_modules/lodash-es/isRegExp.js -var nodeIsRegExp = nodeUtil_default && nodeUtil_default.isRegExp; -var isRegExp = nodeIsRegExp ? baseUnary_default(nodeIsRegExp) : baseIsRegExp_default; -var isRegExp_default = isRegExp; - -// node_modules/lodash-es/isSafeInteger.js -var MAX_SAFE_INTEGER3 = 9007199254740991; -function isSafeInteger(value) { - return isInteger_default(value) && value >= -MAX_SAFE_INTEGER3 && value <= MAX_SAFE_INTEGER3; -} -var isSafeInteger_default = isSafeInteger; - -// node_modules/lodash-es/isUndefined.js -function isUndefined(value) { - return value === void 0; -} -var isUndefined_default = isUndefined; - -// node_modules/lodash-es/isWeakMap.js -var weakMapTag4 = "[object WeakMap]"; -function isWeakMap(value) { - return isObjectLike_default(value) && getTag_default(value) == weakMapTag4; -} -var isWeakMap_default = isWeakMap; - -// node_modules/lodash-es/isWeakSet.js -var weakSetTag = "[object WeakSet]"; -function isWeakSet(value) { - return isObjectLike_default(value) && baseGetTag_default(value) == weakSetTag; -} -var isWeakSet_default = isWeakSet; - -// node_modules/lodash-es/iteratee.js -var CLONE_DEEP_FLAG5 = 1; -function iteratee(func) { - return baseIteratee_default(typeof func == "function" ? func : baseClone_default(func, CLONE_DEEP_FLAG5)); -} -var iteratee_default = iteratee; - -// node_modules/lodash-es/join.js -var arrayProto2 = Array.prototype; -var nativeJoin = arrayProto2.join; -function join(array4, separator) { - return array4 == null ? "" : nativeJoin.call(array4, separator); -} -var join_default = join; - -// node_modules/lodash-es/kebabCase.js -var kebabCase = createCompounder_default(function(result2, word, index) { - return result2 + (index ? "-" : "") + word.toLowerCase(); -}); -var kebabCase_default = kebabCase; - -// node_modules/lodash-es/keyBy.js -var keyBy = createAggregator_default(function(result2, value, key) { - baseAssignValue_default(result2, key, value); -}); -var keyBy_default = keyBy; - -// node_modules/lodash-es/_strictLastIndexOf.js -function strictLastIndexOf(array4, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array4[index] === value) { - return index; - } - } - return index; -} -var strictLastIndexOf_default = strictLastIndexOf; - -// node_modules/lodash-es/lastIndexOf.js -var nativeMax12 = Math.max; -var nativeMin8 = Math.min; -function lastIndexOf(array4, value, fromIndex) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return -1; - } - var index = length; - if (fromIndex !== void 0) { - index = toInteger_default(fromIndex); - index = index < 0 ? nativeMax12(length + index, 0) : nativeMin8(index, length - 1); - } - return value === value ? strictLastIndexOf_default(array4, value, index) : baseFindIndex_default(array4, baseIsNaN_default, index, true); -} -var lastIndexOf_default = lastIndexOf; - -// node_modules/lodash-es/lowerCase.js -var lowerCase = createCompounder_default(function(result2, word, index) { - return result2 + (index ? " " : "") + word.toLowerCase(); -}); -var lowerCase_default = lowerCase; - -// node_modules/lodash-es/lowerFirst.js -var lowerFirst = createCaseFirst_default("toLowerCase"); -var lowerFirst_default = lowerFirst; - -// node_modules/lodash-es/_baseLt.js -function baseLt(value, other) { - return value < other; -} -var baseLt_default = baseLt; - -// node_modules/lodash-es/lt.js -var lt = createRelationalOperation_default(baseLt_default); -var lt_default = lt; - -// node_modules/lodash-es/lte.js -var lte = createRelationalOperation_default(function(value, other) { - return value <= other; -}); -var lte_default = lte; - -// node_modules/lodash-es/mapKeys.js -function mapKeys(object4, iteratee2) { - var result2 = {}; - iteratee2 = baseIteratee_default(iteratee2, 3); - baseForOwn_default(object4, function(value, key, object5) { - baseAssignValue_default(result2, iteratee2(value, key, object5), value); - }); - return result2; -} -var mapKeys_default = mapKeys; - -// node_modules/lodash-es/mapValues.js -function mapValues(object4, iteratee2) { - var result2 = {}; - iteratee2 = baseIteratee_default(iteratee2, 3); - baseForOwn_default(object4, function(value, key, object5) { - baseAssignValue_default(result2, key, iteratee2(value, key, object5)); - }); - return result2; -} -var mapValues_default = mapValues; - -// node_modules/lodash-es/matches.js -var CLONE_DEEP_FLAG6 = 1; -function matches(source) { - return baseMatches_default(baseClone_default(source, CLONE_DEEP_FLAG6)); -} -var matches_default = matches; - -// node_modules/lodash-es/matchesProperty.js -var CLONE_DEEP_FLAG7 = 1; -function matchesProperty(path, srcValue) { - return baseMatchesProperty_default(path, baseClone_default(srcValue, CLONE_DEEP_FLAG7)); -} -var matchesProperty_default = matchesProperty; - -// node_modules/lodash-es/_baseExtremum.js -function baseExtremum(array4, iteratee2, comparator) { - var index = -1, length = array4.length; - while (++index < length) { - var value = array4[index], current = iteratee2(value); - if (current != null && (computed2 === void 0 ? current === current && !isSymbol_default(current) : comparator(current, computed2))) { - var computed2 = current, result2 = value; - } - } - return result2; -} -var baseExtremum_default = baseExtremum; - -// node_modules/lodash-es/max.js -function max(array4) { - return array4 && array4.length ? baseExtremum_default(array4, identity_default, baseGt_default) : void 0; -} -var max_default = max; - -// node_modules/lodash-es/maxBy.js -function maxBy(array4, iteratee2) { - return array4 && array4.length ? baseExtremum_default(array4, baseIteratee_default(iteratee2, 2), baseGt_default) : void 0; -} -var maxBy_default = maxBy; - -// node_modules/lodash-es/_baseSum.js -function baseSum(array4, iteratee2) { - var result2, index = -1, length = array4.length; - while (++index < length) { - var current = iteratee2(array4[index]); - if (current !== void 0) { - result2 = result2 === void 0 ? current : result2 + current; - } - } - return result2; -} -var baseSum_default = baseSum; - -// node_modules/lodash-es/_baseMean.js -var NAN3 = 0 / 0; -function baseMean(array4, iteratee2) { - var length = array4 == null ? 0 : array4.length; - return length ? baseSum_default(array4, iteratee2) / length : NAN3; -} -var baseMean_default = baseMean; - -// node_modules/lodash-es/mean.js -function mean(array4) { - return baseMean_default(array4, identity_default); -} -var mean_default = mean; - -// node_modules/lodash-es/meanBy.js -function meanBy(array4, iteratee2) { - return baseMean_default(array4, baseIteratee_default(iteratee2, 2)); -} -var meanBy_default = meanBy; - -// node_modules/lodash-es/merge.js -var merge = createAssigner_default(function(object4, source, srcIndex) { - baseMerge_default(object4, source, srcIndex); -}); -var merge_default = merge; - -// node_modules/lodash-es/method.js -var method = baseRest_default(function(path, args) { - return function(object4) { - return baseInvoke_default(object4, path, args); - }; -}); -var method_default = method; - -// node_modules/lodash-es/methodOf.js -var methodOf = baseRest_default(function(object4, args) { - return function(path) { - return baseInvoke_default(object4, path, args); - }; -}); -var methodOf_default = methodOf; - -// node_modules/lodash-es/min.js -function min(array4) { - return array4 && array4.length ? baseExtremum_default(array4, identity_default, baseLt_default) : void 0; -} -var min_default = min; - -// node_modules/lodash-es/minBy.js -function minBy(array4, iteratee2) { - return array4 && array4.length ? baseExtremum_default(array4, baseIteratee_default(iteratee2, 2), baseLt_default) : void 0; -} -var minBy_default = minBy; - -// node_modules/lodash-es/mixin.js -function mixin(object4, source, options) { - var props2 = keys_default(source), methodNames = baseFunctions_default(source, props2); - var chain2 = !(isObject_default(options) && "chain" in options) || !!options.chain, isFunc = isFunction_default(object4); - arrayEach_default(methodNames, function(methodName) { - var func = source[methodName]; - object4[methodName] = func; - if (isFunc) { - object4.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain2 || chainAll) { - var result2 = object4(this.__wrapped__), actions = result2.__actions__ = copyArray_default(this.__actions__); - actions.push({ "func": func, "args": arguments, "thisArg": object4 }); - result2.__chain__ = chainAll; - return result2; - } - return func.apply(object4, arrayPush_default([this.value()], arguments)); - }; - } - }); - return object4; -} -var mixin_default = mixin; - -// node_modules/lodash-es/multiply.js -var multiply = createMathOperation_default(function(multiplier, multiplicand) { - return multiplier * multiplicand; -}, 1); -var multiply_default = multiply; - -// node_modules/lodash-es/negate.js -var FUNC_ERROR_TEXT9 = "Expected a function"; -function negate(predicate) { - if (typeof predicate != "function") { - throw new TypeError(FUNC_ERROR_TEXT9); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: - return !predicate.call(this); - case 1: - return !predicate.call(this, args[0]); - case 2: - return !predicate.call(this, args[0], args[1]); - case 3: - return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; -} -var negate_default = negate; - -// node_modules/lodash-es/_iteratorToArray.js -function iteratorToArray(iterator) { - var data, result2 = []; - while (!(data = iterator.next()).done) { - result2.push(data.value); - } - return result2; -} -var iteratorToArray_default = iteratorToArray; - -// node_modules/lodash-es/toArray.js -var mapTag9 = "[object Map]"; -var setTag9 = "[object Set]"; -var symIterator = Symbol_default ? Symbol_default.iterator : void 0; -function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike_default(value)) { - return isString_default(value) ? stringToArray_default(value) : copyArray_default(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray_default(value[symIterator]()); - } - var tag = getTag_default(value), func = tag == mapTag9 ? mapToArray_default : tag == setTag9 ? setToArray_default : values_default; - return func(value); -} -var toArray_default = toArray; - -// node_modules/lodash-es/next.js -function wrapperNext() { - if (this.__values__ === void 0) { - this.__values__ = toArray_default(this.value()); - } - var done = this.__index__ >= this.__values__.length, value = done ? void 0 : this.__values__[this.__index__++]; - return { "done": done, "value": value }; -} -var next_default = wrapperNext; - -// node_modules/lodash-es/_baseNth.js -function baseNth(array4, n) { - var length = array4.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex_default(n, length) ? array4[n] : void 0; -} -var baseNth_default = baseNth; - -// node_modules/lodash-es/nth.js -function nth(array4, n) { - return array4 && array4.length ? baseNth_default(array4, toInteger_default(n)) : void 0; -} -var nth_default = nth; - -// node_modules/lodash-es/nthArg.js -function nthArg(n) { - n = toInteger_default(n); - return baseRest_default(function(args) { - return baseNth_default(args, n); - }); -} -var nthArg_default = nthArg; - -// node_modules/lodash-es/_baseUnset.js -var objectProto27 = Object.prototype; -var hasOwnProperty23 = objectProto27.hasOwnProperty; -function baseUnset(object4, path) { - path = castPath_default(path, object4); - var index = -1, length = path.length; - if (!length) { - return true; - } - var isRootPrimitive = object4 == null || typeof object4 !== "object" && typeof object4 !== "function"; - while (++index < length) { - var key = path[index]; - if (typeof key !== "string") { - continue; - } - if (key === "__proto__" && !hasOwnProperty23.call(object4, "__proto__")) { - return false; - } - if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") { - if (isRootPrimitive && index === 0) { - continue; - } - return false; - } - } - var obj = parent_default(object4, path); - return obj == null || delete obj[toKey_default(last_default(path))]; -} -var baseUnset_default = baseUnset; - -// node_modules/lodash-es/_customOmitClone.js -function customOmitClone(value) { - return isPlainObject_default(value) ? void 0 : value; -} -var customOmitClone_default = customOmitClone; - -// node_modules/lodash-es/omit.js -var CLONE_DEEP_FLAG8 = 1; -var CLONE_FLAT_FLAG2 = 2; -var CLONE_SYMBOLS_FLAG6 = 4; -var omit = flatRest_default(function(object4, paths) { - var result2 = {}; - if (object4 == null) { - return result2; - } - var isDeep = false; - paths = arrayMap_default(paths, function(path) { - path = castPath_default(path, object4); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject_default(object4, getAllKeysIn_default(object4), result2); - if (isDeep) { - result2 = baseClone_default(result2, CLONE_DEEP_FLAG8 | CLONE_FLAT_FLAG2 | CLONE_SYMBOLS_FLAG6, customOmitClone_default); - } - var length = paths.length; - while (length--) { - baseUnset_default(result2, paths[length]); - } - return result2; -}); -var omit_default = omit; - -// node_modules/lodash-es/_baseSet.js -function baseSet(object4, path, value, customizer) { - if (!isObject_default(object4)) { - return object4; - } - path = castPath_default(path, object4); - var index = -1, length = path.length, lastIndex = length - 1, nested = object4; - while (nested != null && ++index < length) { - var key = toKey_default(path[index]), newValue = value; - if (key === "__proto__" || key === "constructor" || key === "prototype") { - return object4; - } - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : void 0; - if (newValue === void 0) { - newValue = isObject_default(objValue) ? objValue : isIndex_default(path[index + 1]) ? [] : {}; - } - } - assignValue_default(nested, key, newValue); - nested = nested[key]; - } - return object4; -} -var baseSet_default = baseSet; - -// node_modules/lodash-es/_basePickBy.js -function basePickBy(object4, paths, predicate) { - var index = -1, length = paths.length, result2 = {}; - while (++index < length) { - var path = paths[index], value = baseGet_default(object4, path); - if (predicate(value, path)) { - baseSet_default(result2, castPath_default(path, object4), value); - } - } - return result2; -} -var basePickBy_default = basePickBy; - -// node_modules/lodash-es/pickBy.js -function pickBy(object4, predicate) { - if (object4 == null) { - return {}; - } - var props2 = arrayMap_default(getAllKeysIn_default(object4), function(prop) { - return [prop]; - }); - predicate = baseIteratee_default(predicate); - return basePickBy_default(object4, props2, function(value, path) { - return predicate(value, path[0]); - }); -} -var pickBy_default = pickBy; - -// node_modules/lodash-es/omitBy.js -function omitBy(object4, predicate) { - return pickBy_default(object4, negate_default(baseIteratee_default(predicate))); -} -var omitBy_default = omitBy; - -// node_modules/lodash-es/once.js -function once(func) { - return before_default(2, func); -} -var once_default = once; - -// node_modules/lodash-es/_baseSortBy.js -function baseSortBy(array4, comparer) { - var length = array4.length; - array4.sort(comparer); - while (length--) { - array4[length] = array4[length].value; - } - return array4; -} -var baseSortBy_default = baseSortBy; - -// node_modules/lodash-es/_compareAscending.js -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol_default(value); - var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol_default(other); - if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { - return 1; - } - if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { - return -1; - } - } - return 0; -} -var compareAscending_default = compareAscending; - -// node_modules/lodash-es/_compareMultiple.js -function compareMultiple(object4, other, orders) { - var index = -1, objCriteria = object4.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; - while (++index < length) { - var result2 = compareAscending_default(objCriteria[index], othCriteria[index]); - if (result2) { - if (index >= ordersLength) { - return result2; - } - var order = orders[index]; - return result2 * (order == "desc" ? -1 : 1); - } - } - return object4.index - other.index; -} -var compareMultiple_default = compareMultiple; - -// node_modules/lodash-es/_baseOrderBy.js -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap_default(iteratees, function(iteratee2) { - if (isArray_default(iteratee2)) { - return function(value) { - return baseGet_default(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2); - }; - } - return iteratee2; - }); - } else { - iteratees = [identity_default]; - } - var index = -1; - iteratees = arrayMap_default(iteratees, baseUnary_default(baseIteratee_default)); - var result2 = baseMap_default(collection, function(value, key, collection2) { - var criteria = arrayMap_default(iteratees, function(iteratee2) { - return iteratee2(value); - }); - return { "criteria": criteria, "index": ++index, "value": value }; - }); - return baseSortBy_default(result2, function(object4, other) { - return compareMultiple_default(object4, other, orders); - }); -} -var baseOrderBy_default = baseOrderBy; - -// node_modules/lodash-es/orderBy.js -function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray_default(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - orders = guard ? void 0 : orders; - if (!isArray_default(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseOrderBy_default(collection, iteratees, orders); -} -var orderBy_default = orderBy; - -// node_modules/lodash-es/_createOver.js -function createOver(arrayFunc) { - return flatRest_default(function(iteratees) { - iteratees = arrayMap_default(iteratees, baseUnary_default(baseIteratee_default)); - return baseRest_default(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee2) { - return apply_default(iteratee2, thisArg, args); - }); - }); - }); -} -var createOver_default = createOver; - -// node_modules/lodash-es/over.js -var over = createOver_default(arrayMap_default); -var over_default = over; - -// node_modules/lodash-es/_castRest.js -var castRest = baseRest_default; -var castRest_default = castRest; - -// node_modules/lodash-es/overArgs.js -var nativeMin9 = Math.min; -var overArgs = castRest_default(function(func, transforms) { - transforms = transforms.length == 1 && isArray_default(transforms[0]) ? arrayMap_default(transforms[0], baseUnary_default(baseIteratee_default)) : arrayMap_default(baseFlatten_default(transforms, 1), baseUnary_default(baseIteratee_default)); - var funcsLength = transforms.length; - return baseRest_default(function(args) { - var index = -1, length = nativeMin9(args.length, funcsLength); - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); - } - return apply_default(func, this, args); - }); -}); -var overArgs_default = overArgs; - -// node_modules/lodash-es/overEvery.js -var overEvery = createOver_default(arrayEvery_default); -var overEvery_default = overEvery; - -// node_modules/lodash-es/overSome.js -var overSome = createOver_default(arraySome_default); -var overSome_default = overSome; - -// node_modules/lodash-es/_baseRepeat.js -var MAX_SAFE_INTEGER4 = 9007199254740991; -var nativeFloor = Math.floor; -function baseRepeat(string3, n) { - var result2 = ""; - if (!string3 || n < 1 || n > MAX_SAFE_INTEGER4) { - return result2; - } - do { - if (n % 2) { - result2 += string3; - } - n = nativeFloor(n / 2); - if (n) { - string3 += string3; - } - } while (n); - return result2; -} -var baseRepeat_default = baseRepeat; - -// node_modules/lodash-es/_asciiSize.js -var asciiSize = baseProperty_default("length"); -var asciiSize_default = asciiSize; - -// node_modules/lodash-es/_unicodeSize.js -var rsAstralRange4 = "\\ud800-\\udfff"; -var rsComboMarksRange5 = "\\u0300-\\u036f"; -var reComboHalfMarksRange5 = "\\ufe20-\\ufe2f"; -var rsComboSymbolsRange5 = "\\u20d0-\\u20ff"; -var rsComboRange5 = rsComboMarksRange5 + reComboHalfMarksRange5 + rsComboSymbolsRange5; -var rsVarRange4 = "\\ufe0e\\ufe0f"; -var rsAstral2 = "[" + rsAstralRange4 + "]"; -var rsCombo4 = "[" + rsComboRange5 + "]"; -var rsFitz3 = "\\ud83c[\\udffb-\\udfff]"; -var rsModifier3 = "(?:" + rsCombo4 + "|" + rsFitz3 + ")"; -var rsNonAstral3 = "[^" + rsAstralRange4 + "]"; -var rsRegional3 = "(?:\\ud83c[\\udde6-\\uddff]){2}"; -var rsSurrPair3 = "[\\ud800-\\udbff][\\udc00-\\udfff]"; -var rsZWJ4 = "\\u200d"; -var reOptMod3 = rsModifier3 + "?"; -var rsOptVar3 = "[" + rsVarRange4 + "]?"; -var rsOptJoin3 = "(?:" + rsZWJ4 + "(?:" + [rsNonAstral3, rsRegional3, rsSurrPair3].join("|") + ")" + rsOptVar3 + reOptMod3 + ")*"; -var rsSeq3 = rsOptVar3 + reOptMod3 + rsOptJoin3; -var rsSymbol2 = "(?:" + [rsNonAstral3 + rsCombo4 + "?", rsCombo4, rsRegional3, rsSurrPair3, rsAstral2].join("|") + ")"; -var reUnicode2 = RegExp(rsFitz3 + "(?=" + rsFitz3 + ")|" + rsSymbol2 + rsSeq3, "g"); -function unicodeSize(string3) { - var result2 = reUnicode2.lastIndex = 0; - while (reUnicode2.test(string3)) { - ++result2; - } - return result2; -} -var unicodeSize_default = unicodeSize; - -// node_modules/lodash-es/_stringSize.js -function stringSize(string3) { - return hasUnicode_default(string3) ? unicodeSize_default(string3) : asciiSize_default(string3); -} -var stringSize_default = stringSize; - -// node_modules/lodash-es/_createPadding.js -var nativeCeil2 = Math.ceil; -function createPadding(length, chars) { - chars = chars === void 0 ? " " : baseToString_default(chars); - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat_default(chars, length) : chars; - } - var result2 = baseRepeat_default(chars, nativeCeil2(length / stringSize_default(chars))); - return hasUnicode_default(chars) ? castSlice_default(stringToArray_default(result2), 0, length).join("") : result2.slice(0, length); -} -var createPadding_default = createPadding; - -// node_modules/lodash-es/pad.js -var nativeCeil3 = Math.ceil; -var nativeFloor2 = Math.floor; -function pad(string3, length, chars) { - string3 = toString_default(string3); - length = toInteger_default(length); - var strLength = length ? stringSize_default(string3) : 0; - if (!length || strLength >= length) { - return string3; - } - var mid = (length - strLength) / 2; - return createPadding_default(nativeFloor2(mid), chars) + string3 + createPadding_default(nativeCeil3(mid), chars); -} -var pad_default = pad; - -// node_modules/lodash-es/padEnd.js -function padEnd(string3, length, chars) { - string3 = toString_default(string3); - length = toInteger_default(length); - var strLength = length ? stringSize_default(string3) : 0; - return length && strLength < length ? string3 + createPadding_default(length - strLength, chars) : string3; -} -var padEnd_default = padEnd; - -// node_modules/lodash-es/padStart.js -function padStart(string3, length, chars) { - string3 = toString_default(string3); - length = toInteger_default(length); - var strLength = length ? stringSize_default(string3) : 0; - return length && strLength < length ? createPadding_default(length - strLength, chars) + string3 : string3; -} -var padStart_default = padStart; - -// node_modules/lodash-es/parseInt.js -var reTrimStart2 = /^\s+/; -var nativeParseInt = root_default.parseInt; -function parseInt2(string3, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString_default(string3).replace(reTrimStart2, ""), radix || 0); -} -var parseInt_default = parseInt2; - -// node_modules/lodash-es/partial.js -var WRAP_PARTIAL_FLAG7 = 32; -var partial = baseRest_default(function(func, partials) { - var holders = replaceHolders_default(partials, getHolder_default(partial)); - return createWrap_default(func, WRAP_PARTIAL_FLAG7, void 0, partials, holders); -}); -partial.placeholder = {}; -var partial_default = partial; - -// node_modules/lodash-es/partialRight.js -var WRAP_PARTIAL_RIGHT_FLAG4 = 64; -var partialRight = baseRest_default(function(func, partials) { - var holders = replaceHolders_default(partials, getHolder_default(partialRight)); - return createWrap_default(func, WRAP_PARTIAL_RIGHT_FLAG4, void 0, partials, holders); -}); -partialRight.placeholder = {}; -var partialRight_default = partialRight; - -// node_modules/lodash-es/partition.js -var partition = createAggregator_default(function(result2, value, key) { - result2[key ? 0 : 1].push(value); -}, function() { - return [[], []]; -}); -var partition_default = partition; - -// node_modules/lodash-es/_basePick.js -function basePick(object4, paths) { - return basePickBy_default(object4, paths, function(value, path) { - return hasIn_default(object4, path); - }); -} -var basePick_default = basePick; - -// node_modules/lodash-es/pick.js -var pick = flatRest_default(function(object4, paths) { - return object4 == null ? {} : basePick_default(object4, paths); -}); -var pick_default = pick; - -// node_modules/lodash-es/plant.js -function wrapperPlant(value) { - var result2, parent2 = this; - while (parent2 instanceof baseLodash_default) { - var clone2 = wrapperClone_default(parent2); - clone2.__index__ = 0; - clone2.__values__ = void 0; - if (result2) { - previous.__wrapped__ = clone2; - } else { - result2 = clone2; - } - var previous = clone2; - parent2 = parent2.__wrapped__; - } - previous.__wrapped__ = value; - return result2; -} -var plant_default = wrapperPlant; - -// node_modules/lodash-es/propertyOf.js -function propertyOf(object4) { - return function(path) { - return object4 == null ? void 0 : baseGet_default(object4, path); - }; -} -var propertyOf_default = propertyOf; - -// node_modules/lodash-es/_baseIndexOfWith.js -function baseIndexOfWith(array4, value, fromIndex, comparator) { - var index = fromIndex - 1, length = array4.length; - while (++index < length) { - if (comparator(array4[index], value)) { - return index; - } - } - return -1; -} -var baseIndexOfWith_default = baseIndexOfWith; - -// node_modules/lodash-es/_basePullAll.js -var arrayProto3 = Array.prototype; -var splice2 = arrayProto3.splice; -function basePullAll(array4, values2, iteratee2, comparator) { - var indexOf2 = comparator ? baseIndexOfWith_default : baseIndexOf_default, index = -1, length = values2.length, seen = array4; - if (array4 === values2) { - values2 = copyArray_default(values2); - } - if (iteratee2) { - seen = arrayMap_default(array4, baseUnary_default(iteratee2)); - } - while (++index < length) { - var fromIndex = 0, value = values2[index], computed2 = iteratee2 ? iteratee2(value) : value; - while ((fromIndex = indexOf2(seen, computed2, fromIndex, comparator)) > -1) { - if (seen !== array4) { - splice2.call(seen, fromIndex, 1); - } - splice2.call(array4, fromIndex, 1); - } - } - return array4; -} -var basePullAll_default = basePullAll; - -// node_modules/lodash-es/pullAll.js -function pullAll(array4, values2) { - return array4 && array4.length && values2 && values2.length ? basePullAll_default(array4, values2) : array4; -} -var pullAll_default = pullAll; - -// node_modules/lodash-es/pull.js -var pull = baseRest_default(pullAll_default); -var pull_default = pull; - -// node_modules/lodash-es/pullAllBy.js -function pullAllBy(array4, values2, iteratee2) { - return array4 && array4.length && values2 && values2.length ? basePullAll_default(array4, values2, baseIteratee_default(iteratee2, 2)) : array4; -} -var pullAllBy_default = pullAllBy; - -// node_modules/lodash-es/pullAllWith.js -function pullAllWith(array4, values2, comparator) { - return array4 && array4.length && values2 && values2.length ? basePullAll_default(array4, values2, void 0, comparator) : array4; -} -var pullAllWith_default = pullAllWith; - -// node_modules/lodash-es/_basePullAt.js -var arrayProto4 = Array.prototype; -var splice3 = arrayProto4.splice; -function basePullAt(array4, indexes) { - var length = array4 ? indexes.length : 0, lastIndex = length - 1; - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex_default(index)) { - splice3.call(array4, index, 1); - } else { - baseUnset_default(array4, index); - } - } - } - return array4; -} -var basePullAt_default = basePullAt; - -// node_modules/lodash-es/pullAt.js -var pullAt = flatRest_default(function(array4, indexes) { - var length = array4 == null ? 0 : array4.length, result2 = baseAt_default(array4, indexes); - basePullAt_default(array4, arrayMap_default(indexes, function(index) { - return isIndex_default(index, length) ? +index : index; - }).sort(compareAscending_default)); - return result2; -}); -var pullAt_default = pullAt; - -// node_modules/lodash-es/_baseRandom.js -var nativeFloor3 = Math.floor; -var nativeRandom = Math.random; -function baseRandom(lower, upper) { - return lower + nativeFloor3(nativeRandom() * (upper - lower + 1)); -} -var baseRandom_default = baseRandom; - -// node_modules/lodash-es/random.js -var freeParseFloat = parseFloat; -var nativeMin10 = Math.min; -var nativeRandom2 = Math.random; -function random(lower, upper, floating) { - if (floating && typeof floating != "boolean" && isIterateeCall_default(lower, upper, floating)) { - upper = floating = void 0; - } - if (floating === void 0) { - if (typeof upper == "boolean") { - floating = upper; - upper = void 0; - } else if (typeof lower == "boolean") { - floating = lower; - lower = void 0; - } - } - if (lower === void 0 && upper === void 0) { - lower = 0; - upper = 1; - } else { - lower = toFinite_default(lower); - if (upper === void 0) { - upper = lower; - lower = 0; - } else { - upper = toFinite_default(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom2(); - return nativeMin10(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper); - } - return baseRandom_default(lower, upper); -} -var random_default = random; - -// node_modules/lodash-es/_baseRange.js -var nativeCeil4 = Math.ceil; -var nativeMax13 = Math.max; -function baseRange(start, end, step2, fromRight) { - var index = -1, length = nativeMax13(nativeCeil4((end - start) / (step2 || 1)), 0), result2 = Array(length); - while (length--) { - result2[fromRight ? length : ++index] = start; - start += step2; - } - return result2; -} -var baseRange_default = baseRange; - -// node_modules/lodash-es/_createRange.js -function createRange(fromRight) { - return function(start, end, step2) { - if (step2 && typeof step2 != "number" && isIterateeCall_default(start, end, step2)) { - end = step2 = void 0; - } - start = toFinite_default(start); - if (end === void 0) { - end = start; - start = 0; - } else { - end = toFinite_default(end); - } - step2 = step2 === void 0 ? start < end ? 1 : -1 : toFinite_default(step2); - return baseRange_default(start, end, step2, fromRight); - }; -} -var createRange_default = createRange; - -// node_modules/lodash-es/range.js -var range = createRange_default(); -var range_default = range; - -// node_modules/lodash-es/rangeRight.js -var rangeRight = createRange_default(true); -var rangeRight_default = rangeRight; - -// node_modules/lodash-es/rearg.js -var WRAP_REARG_FLAG4 = 256; -var rearg = flatRest_default(function(func, indexes) { - return createWrap_default(func, WRAP_REARG_FLAG4, void 0, void 0, void 0, indexes); -}); -var rearg_default = rearg; - -// node_modules/lodash-es/_baseReduce.js -function baseReduce(collection, iteratee2, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection2) { - accumulator = initAccum ? (initAccum = false, value) : iteratee2(accumulator, value, index, collection2); - }); - return accumulator; -} -var baseReduce_default = baseReduce; - -// node_modules/lodash-es/reduce.js -function reduce(collection, iteratee2, accumulator) { - var func = isArray_default(collection) ? arrayReduce_default : baseReduce_default, initAccum = arguments.length < 3; - return func(collection, baseIteratee_default(iteratee2, 4), accumulator, initAccum, baseEach_default); -} -var reduce_default = reduce; - -// node_modules/lodash-es/_arrayReduceRight.js -function arrayReduceRight(array4, iteratee2, accumulator, initAccum) { - var length = array4 == null ? 0 : array4.length; - if (initAccum && length) { - accumulator = array4[--length]; - } - while (length--) { - accumulator = iteratee2(accumulator, array4[length], length, array4); - } - return accumulator; -} -var arrayReduceRight_default = arrayReduceRight; - -// node_modules/lodash-es/reduceRight.js -function reduceRight(collection, iteratee2, accumulator) { - var func = isArray_default(collection) ? arrayReduceRight_default : baseReduce_default, initAccum = arguments.length < 3; - return func(collection, baseIteratee_default(iteratee2, 4), accumulator, initAccum, baseEachRight_default); -} -var reduceRight_default = reduceRight; - -// node_modules/lodash-es/reject.js -function reject(collection, predicate) { - var func = isArray_default(collection) ? arrayFilter_default : baseFilter_default; - return func(collection, negate_default(baseIteratee_default(predicate, 3))); -} -var reject_default = reject; - -// node_modules/lodash-es/remove.js -function remove(array4, predicate) { - var result2 = []; - if (!(array4 && array4.length)) { - return result2; - } - var index = -1, indexes = [], length = array4.length; - predicate = baseIteratee_default(predicate, 3); - while (++index < length) { - var value = array4[index]; - if (predicate(value, index, array4)) { - result2.push(value); - indexes.push(index); - } - } - basePullAt_default(array4, indexes); - return result2; -} -var remove_default = remove; - -// node_modules/lodash-es/repeat.js -function repeat(string3, n, guard) { - if (guard ? isIterateeCall_default(string3, n, guard) : n === void 0) { - n = 1; - } else { - n = toInteger_default(n); - } - return baseRepeat_default(toString_default(string3), n); -} -var repeat_default = repeat; - -// node_modules/lodash-es/replace.js -function replace() { - var args = arguments, string3 = toString_default(args[0]); - return args.length < 3 ? string3 : string3.replace(args[1], args[2]); -} -var replace_default = replace; - -// node_modules/lodash-es/rest.js -var FUNC_ERROR_TEXT10 = "Expected a function"; -function rest(func, start) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT10); - } - start = start === void 0 ? start : toInteger_default(start); - return baseRest_default(func, start); -} -var rest_default = rest; - -// node_modules/lodash-es/result.js -function result(object4, path, defaultValue) { - path = castPath_default(path, object4); - var index = -1, length = path.length; - if (!length) { - length = 1; - object4 = void 0; - } - while (++index < length) { - var value = object4 == null ? void 0 : object4[toKey_default(path[index])]; - if (value === void 0) { - index = length; - value = defaultValue; - } - object4 = isFunction_default(value) ? value.call(object4) : value; - } - return object4; -} -var result_default = result; - -// node_modules/lodash-es/reverse.js -var arrayProto5 = Array.prototype; -var nativeReverse = arrayProto5.reverse; -function reverse(array4) { - return array4 == null ? array4 : nativeReverse.call(array4); -} -var reverse_default = reverse; - -// node_modules/lodash-es/round.js -var round = createRound_default("round"); -var round_default = round; - -// node_modules/lodash-es/_arraySample.js -function arraySample(array4) { - var length = array4.length; - return length ? array4[baseRandom_default(0, length - 1)] : void 0; -} -var arraySample_default = arraySample; - -// node_modules/lodash-es/_baseSample.js -function baseSample(collection) { - return arraySample_default(values_default(collection)); -} -var baseSample_default = baseSample; - -// node_modules/lodash-es/sample.js -function sample(collection) { - var func = isArray_default(collection) ? arraySample_default : baseSample_default; - return func(collection); -} -var sample_default = sample; - -// node_modules/lodash-es/_shuffleSelf.js -function shuffleSelf(array4, size3) { - var index = -1, length = array4.length, lastIndex = length - 1; - size3 = size3 === void 0 ? length : size3; - while (++index < size3) { - var rand = baseRandom_default(index, lastIndex), value = array4[rand]; - array4[rand] = array4[index]; - array4[index] = value; - } - array4.length = size3; - return array4; -} -var shuffleSelf_default = shuffleSelf; - -// node_modules/lodash-es/_arraySampleSize.js -function arraySampleSize(array4, n) { - return shuffleSelf_default(copyArray_default(array4), baseClamp_default(n, 0, array4.length)); -} -var arraySampleSize_default = arraySampleSize; - -// node_modules/lodash-es/_baseSampleSize.js -function baseSampleSize(collection, n) { - var array4 = values_default(collection); - return shuffleSelf_default(array4, baseClamp_default(n, 0, array4.length)); -} -var baseSampleSize_default = baseSampleSize; - -// node_modules/lodash-es/sampleSize.js -function sampleSize(collection, n, guard) { - if (guard ? isIterateeCall_default(collection, n, guard) : n === void 0) { - n = 1; - } else { - n = toInteger_default(n); - } - var func = isArray_default(collection) ? arraySampleSize_default : baseSampleSize_default; - return func(collection, n); -} -var sampleSize_default = sampleSize; - -// node_modules/lodash-es/set.js -function set(object4, path, value) { - return object4 == null ? object4 : baseSet_default(object4, path, value); -} -var set_default = set; - -// node_modules/lodash-es/setWith.js -function setWith(object4, path, value, customizer) { - customizer = typeof customizer == "function" ? customizer : void 0; - return object4 == null ? object4 : baseSet_default(object4, path, value, customizer); -} -var setWith_default = setWith; - -// node_modules/lodash-es/_arrayShuffle.js -function arrayShuffle(array4) { - return shuffleSelf_default(copyArray_default(array4)); -} -var arrayShuffle_default = arrayShuffle; - -// node_modules/lodash-es/_baseShuffle.js -function baseShuffle(collection) { - return shuffleSelf_default(values_default(collection)); -} -var baseShuffle_default = baseShuffle; - -// node_modules/lodash-es/shuffle.js -function shuffle(collection) { - var func = isArray_default(collection) ? arrayShuffle_default : baseShuffle_default; - return func(collection); -} -var shuffle_default = shuffle; - -// node_modules/lodash-es/size.js -var mapTag10 = "[object Map]"; -var setTag10 = "[object Set]"; -function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike_default(collection)) { - return isString_default(collection) ? stringSize_default(collection) : collection.length; - } - var tag = getTag_default(collection); - if (tag == mapTag10 || tag == setTag10) { - return collection.size; - } - return baseKeys_default(collection).length; -} -var size_default = size; - -// node_modules/lodash-es/slice.js -function slice(array4, start, end) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return []; - } - if (end && typeof end != "number" && isIterateeCall_default(array4, start, end)) { - start = 0; - end = length; - } else { - start = start == null ? 0 : toInteger_default(start); - end = end === void 0 ? length : toInteger_default(end); - } - return baseSlice_default(array4, start, end); -} -var slice_default = slice; - -// node_modules/lodash-es/snakeCase.js -var snakeCase = createCompounder_default(function(result2, word, index) { - return result2 + (index ? "_" : "") + word.toLowerCase(); -}); -var snakeCase_default = snakeCase; - -// node_modules/lodash-es/_baseSome.js -function baseSome(collection, predicate) { - var result2; - baseEach_default(collection, function(value, index, collection2) { - result2 = predicate(value, index, collection2); - return !result2; - }); - return !!result2; -} -var baseSome_default = baseSome; - -// node_modules/lodash-es/some.js -function some(collection, predicate, guard) { - var func = isArray_default(collection) ? arraySome_default : baseSome_default; - if (guard && isIterateeCall_default(collection, predicate, guard)) { - predicate = void 0; - } - return func(collection, baseIteratee_default(predicate, 3)); -} -var some_default = some; - -// node_modules/lodash-es/sortBy.js -var sortBy = baseRest_default(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall_default(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall_default(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy_default(collection, baseFlatten_default(iteratees, 1), []); -}); -var sortBy_default = sortBy; - -// node_modules/lodash-es/_baseSortedIndexBy.js -var MAX_ARRAY_LENGTH3 = 4294967295; -var MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH3 - 1; -var nativeFloor4 = Math.floor; -var nativeMin11 = Math.min; -function baseSortedIndexBy(array4, value, iteratee2, retHighest) { - var low = 0, high = array4 == null ? 0 : array4.length; - if (high === 0) { - return 0; - } - value = iteratee2(value); - var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol_default(value), valIsUndefined = value === void 0; - while (low < high) { - var mid = nativeFloor4((low + high) / 2), computed2 = iteratee2(array4[mid]), othIsDefined = computed2 !== void 0, othIsNull = computed2 === null, othIsReflexive = computed2 === computed2, othIsSymbol = isSymbol_default(computed2); - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? computed2 <= value : computed2 < value; - } - if (setLow) { - low = mid + 1; - } else { - high = mid; - } - } - return nativeMin11(high, MAX_ARRAY_INDEX); -} -var baseSortedIndexBy_default = baseSortedIndexBy; - -// node_modules/lodash-es/_baseSortedIndex.js -var MAX_ARRAY_LENGTH4 = 4294967295; -var HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH4 >>> 1; -function baseSortedIndex(array4, value, retHighest) { - var low = 0, high = array4 == null ? low : array4.length; - if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = low + high >>> 1, computed2 = array4[mid]; - if (computed2 !== null && !isSymbol_default(computed2) && (retHighest ? computed2 <= value : computed2 < value)) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - return baseSortedIndexBy_default(array4, value, identity_default, retHighest); -} -var baseSortedIndex_default = baseSortedIndex; - -// node_modules/lodash-es/sortedIndex.js -function sortedIndex(array4, value) { - return baseSortedIndex_default(array4, value); -} -var sortedIndex_default = sortedIndex; - -// node_modules/lodash-es/sortedIndexBy.js -function sortedIndexBy(array4, value, iteratee2) { - return baseSortedIndexBy_default(array4, value, baseIteratee_default(iteratee2, 2)); -} -var sortedIndexBy_default = sortedIndexBy; - -// node_modules/lodash-es/sortedIndexOf.js -function sortedIndexOf(array4, value) { - var length = array4 == null ? 0 : array4.length; - if (length) { - var index = baseSortedIndex_default(array4, value); - if (index < length && eq_default(array4[index], value)) { - return index; - } - } - return -1; -} -var sortedIndexOf_default = sortedIndexOf; - -// node_modules/lodash-es/sortedLastIndex.js -function sortedLastIndex(array4, value) { - return baseSortedIndex_default(array4, value, true); -} -var sortedLastIndex_default = sortedLastIndex; - -// node_modules/lodash-es/sortedLastIndexBy.js -function sortedLastIndexBy(array4, value, iteratee2) { - return baseSortedIndexBy_default(array4, value, baseIteratee_default(iteratee2, 2), true); -} -var sortedLastIndexBy_default = sortedLastIndexBy; - -// node_modules/lodash-es/sortedLastIndexOf.js -function sortedLastIndexOf(array4, value) { - var length = array4 == null ? 0 : array4.length; - if (length) { - var index = baseSortedIndex_default(array4, value, true) - 1; - if (eq_default(array4[index], value)) { - return index; - } - } - return -1; -} -var sortedLastIndexOf_default = sortedLastIndexOf; - -// node_modules/lodash-es/_baseSortedUniq.js -function baseSortedUniq(array4, iteratee2) { - var index = -1, length = array4.length, resIndex = 0, result2 = []; - while (++index < length) { - var value = array4[index], computed2 = iteratee2 ? iteratee2(value) : value; - if (!index || !eq_default(computed2, seen)) { - var seen = computed2; - result2[resIndex++] = value === 0 ? 0 : value; - } - } - return result2; -} -var baseSortedUniq_default = baseSortedUniq; - -// node_modules/lodash-es/sortedUniq.js -function sortedUniq(array4) { - return array4 && array4.length ? baseSortedUniq_default(array4) : []; -} -var sortedUniq_default = sortedUniq; - -// node_modules/lodash-es/sortedUniqBy.js -function sortedUniqBy(array4, iteratee2) { - return array4 && array4.length ? baseSortedUniq_default(array4, baseIteratee_default(iteratee2, 2)) : []; -} -var sortedUniqBy_default = sortedUniqBy; - -// node_modules/lodash-es/split.js -var MAX_ARRAY_LENGTH5 = 4294967295; -function split(string3, separator, limit) { - if (limit && typeof limit != "number" && isIterateeCall_default(string3, separator, limit)) { - separator = limit = void 0; - } - limit = limit === void 0 ? MAX_ARRAY_LENGTH5 : limit >>> 0; - if (!limit) { - return []; - } - string3 = toString_default(string3); - if (string3 && (typeof separator == "string" || separator != null && !isRegExp_default(separator))) { - separator = baseToString_default(separator); - if (!separator && hasUnicode_default(string3)) { - return castSlice_default(stringToArray_default(string3), 0, limit); - } - } - return string3.split(separator, limit); -} -var split_default = split; - -// node_modules/lodash-es/spread.js -var FUNC_ERROR_TEXT11 = "Expected a function"; -var nativeMax14 = Math.max; -function spread(func, start) { - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT11); - } - start = start == null ? 0 : nativeMax14(toInteger_default(start), 0); - return baseRest_default(function(args) { - var array4 = args[start], otherArgs = castSlice_default(args, 0, start); - if (array4) { - arrayPush_default(otherArgs, array4); - } - return apply_default(func, this, otherArgs); - }); -} -var spread_default = spread; - -// node_modules/lodash-es/startCase.js -var startCase = createCompounder_default(function(result2, word, index) { - return result2 + (index ? " " : "") + upperFirst_default(word); -}); -var startCase_default = startCase; - -// node_modules/lodash-es/startsWith.js -function startsWith(string3, target2, position) { - string3 = toString_default(string3); - position = position == null ? 0 : baseClamp_default(toInteger_default(position), 0, string3.length); - target2 = baseToString_default(target2); - return string3.slice(position, position + target2.length) == target2; -} -var startsWith_default = startsWith; - -// node_modules/lodash-es/stubObject.js -function stubObject() { - return {}; -} -var stubObject_default = stubObject; - -// node_modules/lodash-es/stubString.js -function stubString() { - return ""; -} -var stubString_default = stubString; - -// node_modules/lodash-es/stubTrue.js -function stubTrue() { - return true; -} -var stubTrue_default = stubTrue; - -// node_modules/lodash-es/subtract.js -var subtract = createMathOperation_default(function(minuend, subtrahend) { - return minuend - subtrahend; -}, 0); -var subtract_default = subtract; - -// node_modules/lodash-es/sum.js -function sum(array4) { - return array4 && array4.length ? baseSum_default(array4, identity_default) : 0; -} -var sum_default = sum; - -// node_modules/lodash-es/sumBy.js -function sumBy(array4, iteratee2) { - return array4 && array4.length ? baseSum_default(array4, baseIteratee_default(iteratee2, 2)) : 0; -} -var sumBy_default = sumBy; - -// node_modules/lodash-es/tail.js -function tail(array4) { - var length = array4 == null ? 0 : array4.length; - return length ? baseSlice_default(array4, 1, length) : []; -} -var tail_default = tail; - -// node_modules/lodash-es/take.js -function take(array4, n, guard) { - if (!(array4 && array4.length)) { - return []; - } - n = guard || n === void 0 ? 1 : toInteger_default(n); - return baseSlice_default(array4, 0, n < 0 ? 0 : n); -} -var take_default = take; - -// node_modules/lodash-es/takeRight.js -function takeRight(array4, n, guard) { - var length = array4 == null ? 0 : array4.length; - if (!length) { - return []; - } - n = guard || n === void 0 ? 1 : toInteger_default(n); - n = length - n; - return baseSlice_default(array4, n < 0 ? 0 : n, length); -} -var takeRight_default = takeRight; - -// node_modules/lodash-es/takeRightWhile.js -function takeRightWhile(array4, predicate) { - return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3), false, true) : []; -} -var takeRightWhile_default = takeRightWhile; - -// node_modules/lodash-es/takeWhile.js -function takeWhile(array4, predicate) { - return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3)) : []; -} -var takeWhile_default = takeWhile; - -// node_modules/lodash-es/tap.js -function tap(value, interceptor) { - interceptor(value); - return value; -} -var tap_default = tap; - -// node_modules/lodash-es/_customDefaultsAssignIn.js -var objectProto28 = Object.prototype; -var hasOwnProperty24 = objectProto28.hasOwnProperty; -function customDefaultsAssignIn(objValue, srcValue, key, object4) { - if (objValue === void 0 || eq_default(objValue, objectProto28[key]) && !hasOwnProperty24.call(object4, key)) { - return srcValue; - } - return objValue; -} -var customDefaultsAssignIn_default = customDefaultsAssignIn; - -// node_modules/lodash-es/_escapeStringChar.js -var stringEscapes = { - "\\": "\\", - "'": "'", - "\n": "n", - "\r": "r", - "\u2028": "u2028", - "\u2029": "u2029" -}; -function escapeStringChar(chr) { - return "\\" + stringEscapes[chr]; -} -var escapeStringChar_default = escapeStringChar; - -// node_modules/lodash-es/_reInterpolate.js -var reInterpolate = /<%=([\s\S]+?)%>/g; -var reInterpolate_default = reInterpolate; - -// node_modules/lodash-es/_reEscape.js -var reEscape = /<%-([\s\S]+?)%>/g; -var reEscape_default = reEscape; - -// node_modules/lodash-es/_reEvaluate.js -var reEvaluate = /<%([\s\S]+?)%>/g; -var reEvaluate_default = reEvaluate; - -// node_modules/lodash-es/templateSettings.js -var templateSettings = { - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - "escape": reEscape_default, - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - "evaluate": reEvaluate_default, - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - "interpolate": reInterpolate_default, - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type {string} - */ - "variable": "", - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type {Object} - */ - "imports": { - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type {Function} - */ - "_": { "escape": escape_default } - } -}; -var templateSettings_default = templateSettings; - -// node_modules/lodash-es/template.js -var INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; -var reEmptyStringLeading = /\b__p \+= '';/g; -var reEmptyStringMiddle = /\b(__p \+=) '' \+/g; -var reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; -var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; -var reNoMatch = /($^)/; -var reUnescapedString = /['\n\r\u2028\u2029\\]/g; -var objectProto29 = Object.prototype; -var hasOwnProperty25 = objectProto29.hasOwnProperty; -function template(string3, options, guard) { - var settings = templateSettings_default.imports._.templateSettings || templateSettings_default; - if (guard && isIterateeCall_default(string3, options, guard)) { - options = void 0; - } - string3 = toString_default(string3); - options = assignInWith_default({}, options, settings, customDefaultsAssignIn_default); - var imports = assignInWith_default({}, options.imports, settings.imports, customDefaultsAssignIn_default), importsKeys = keys_default(imports), importsValues = baseValues_default(imports, importsKeys); - var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '"; - var reDelimiters = RegExp( - (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate_default ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", - "g" - ); - var sourceURL = hasOwnProperty25.call(options, "sourceURL") ? "//# sourceURL=" + (options.sourceURL + "").replace(/\s/g, " ") + "\n" : ""; - string3.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset3) { - interpolateValue || (interpolateValue = esTemplateValue); - source += string3.slice(index, offset3).replace(reUnescapedString, escapeStringChar_default); - if (escapeValue) { - isEscaping = true; - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset3 + match.length; - return match; - }); - source += "';\n"; - var variable = hasOwnProperty25.call(options, "variable") && options.variable; - if (!variable) { - source = "with (obj) {\n" + source + "\n}\n"; - } else if (reForbiddenIdentifierChars.test(variable)) { - throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); - } - source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"); - source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}"; - var result2 = attempt_default(function() { - return Function(importsKeys, sourceURL + "return " + source).apply(void 0, importsValues); - }); - result2.source = source; - if (isError_default(result2)) { - throw result2; - } - return result2; -} -var template_default = template; - -// node_modules/lodash-es/throttle.js -var FUNC_ERROR_TEXT12 = "Expected a function"; -function throttle(func, wait, options) { - var leading = true, trailing = true; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT12); - } - if (isObject_default(options)) { - leading = "leading" in options ? !!options.leading : leading; - trailing = "trailing" in options ? !!options.trailing : trailing; - } - return debounce_default(func, wait, { - "leading": leading, - "maxWait": wait, - "trailing": trailing - }); -} -var throttle_default = throttle; - -// node_modules/lodash-es/thru.js -function thru(value, interceptor) { - return interceptor(value); -} -var thru_default = thru; - -// node_modules/lodash-es/times.js -var MAX_SAFE_INTEGER5 = 9007199254740991; -var MAX_ARRAY_LENGTH6 = 4294967295; -var nativeMin12 = Math.min; -function times(n, iteratee2) { - n = toInteger_default(n); - if (n < 1 || n > MAX_SAFE_INTEGER5) { - return []; - } - var index = MAX_ARRAY_LENGTH6, length = nativeMin12(n, MAX_ARRAY_LENGTH6); - iteratee2 = castFunction_default(iteratee2); - n -= MAX_ARRAY_LENGTH6; - var result2 = baseTimes_default(length, iteratee2); - while (++index < n) { - iteratee2(index); - } - return result2; -} -var times_default = times; - -// node_modules/lodash-es/toIterator.js -function wrapperToIterator() { - return this; -} -var toIterator_default = wrapperToIterator; - -// node_modules/lodash-es/_baseWrapperValue.js -function baseWrapperValue(value, actions) { - var result2 = value; - if (result2 instanceof LazyWrapper_default) { - result2 = result2.value(); - } - return arrayReduce_default(actions, function(result3, action) { - return action.func.apply(action.thisArg, arrayPush_default([result3], action.args)); - }, result2); -} -var baseWrapperValue_default = baseWrapperValue; - -// node_modules/lodash-es/wrapperValue.js -function wrapperValue() { - return baseWrapperValue_default(this.__wrapped__, this.__actions__); -} -var wrapperValue_default = wrapperValue; - -// node_modules/lodash-es/toLower.js -function toLower(value) { - return toString_default(value).toLowerCase(); -} -var toLower_default = toLower; - -// node_modules/lodash-es/toPath.js -function toPath(value) { - if (isArray_default(value)) { - return arrayMap_default(value, toKey_default); - } - return isSymbol_default(value) ? [value] : copyArray_default(stringToPath_default(toString_default(value))); -} -var toPath_default = toPath; - -// node_modules/lodash-es/toSafeInteger.js -var MAX_SAFE_INTEGER6 = 9007199254740991; -function toSafeInteger(value) { - return value ? baseClamp_default(toInteger_default(value), -MAX_SAFE_INTEGER6, MAX_SAFE_INTEGER6) : value === 0 ? value : 0; -} -var toSafeInteger_default = toSafeInteger; - -// node_modules/lodash-es/toUpper.js -function toUpper(value) { - return toString_default(value).toUpperCase(); -} -var toUpper_default = toUpper; - -// node_modules/lodash-es/transform.js -function transform(object4, iteratee2, accumulator) { - var isArr = isArray_default(object4), isArrLike = isArr || isBuffer_default(object4) || isTypedArray_default(object4); - iteratee2 = baseIteratee_default(iteratee2, 4); - if (accumulator == null) { - var Ctor = object4 && object4.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor() : []; - } else if (isObject_default(object4)) { - accumulator = isFunction_default(Ctor) ? baseCreate_default(getPrototype_default(object4)) : {}; - } else { - accumulator = {}; - } - } - (isArrLike ? arrayEach_default : baseForOwn_default)(object4, function(value, index, object5) { - return iteratee2(accumulator, value, index, object5); - }); - return accumulator; -} -var transform_default = transform; - -// node_modules/lodash-es/_charsEndIndex.js -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; - while (index-- && baseIndexOf_default(chrSymbols, strSymbols[index], 0) > -1) { - } - return index; -} -var charsEndIndex_default = charsEndIndex; - -// node_modules/lodash-es/_charsStartIndex.js -function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, length = strSymbols.length; - while (++index < length && baseIndexOf_default(chrSymbols, strSymbols[index], 0) > -1) { - } - return index; -} -var charsStartIndex_default = charsStartIndex; - -// node_modules/lodash-es/trim.js -function trim(string3, chars, guard) { - string3 = toString_default(string3); - if (string3 && (guard || chars === void 0)) { - return baseTrim_default(string3); - } - if (!string3 || !(chars = baseToString_default(chars))) { - return string3; - } - var strSymbols = stringToArray_default(string3), chrSymbols = stringToArray_default(chars), start = charsStartIndex_default(strSymbols, chrSymbols), end = charsEndIndex_default(strSymbols, chrSymbols) + 1; - return castSlice_default(strSymbols, start, end).join(""); -} -var trim_default = trim; - -// node_modules/lodash-es/trimEnd.js -function trimEnd(string3, chars, guard) { - string3 = toString_default(string3); - if (string3 && (guard || chars === void 0)) { - return string3.slice(0, trimmedEndIndex_default(string3) + 1); - } - if (!string3 || !(chars = baseToString_default(chars))) { - return string3; - } - var strSymbols = stringToArray_default(string3), end = charsEndIndex_default(strSymbols, stringToArray_default(chars)) + 1; - return castSlice_default(strSymbols, 0, end).join(""); -} -var trimEnd_default = trimEnd; - -// node_modules/lodash-es/trimStart.js -var reTrimStart3 = /^\s+/; -function trimStart(string3, chars, guard) { - string3 = toString_default(string3); - if (string3 && (guard || chars === void 0)) { - return string3.replace(reTrimStart3, ""); - } - if (!string3 || !(chars = baseToString_default(chars))) { - return string3; - } - var strSymbols = stringToArray_default(string3), start = charsStartIndex_default(strSymbols, stringToArray_default(chars)); - return castSlice_default(strSymbols, start).join(""); -} -var trimStart_default = trimStart; - -// node_modules/lodash-es/truncate.js -var DEFAULT_TRUNC_LENGTH = 30; -var DEFAULT_TRUNC_OMISSION = "..."; -var reFlags2 = /\w*$/; -function truncate(string3, options) { - var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; - if (isObject_default(options)) { - var separator = "separator" in options ? options.separator : separator; - length = "length" in options ? toInteger_default(options.length) : length; - omission = "omission" in options ? baseToString_default(options.omission) : omission; - } - string3 = toString_default(string3); - var strLength = string3.length; - if (hasUnicode_default(string3)) { - var strSymbols = stringToArray_default(string3); - strLength = strSymbols.length; - } - if (length >= strLength) { - return string3; - } - var end = length - stringSize_default(omission); - if (end < 1) { - return omission; - } - var result2 = strSymbols ? castSlice_default(strSymbols, 0, end).join("") : string3.slice(0, end); - if (separator === void 0) { - return result2 + omission; - } - if (strSymbols) { - end += result2.length - end; - } - if (isRegExp_default(separator)) { - if (string3.slice(end).search(separator)) { - var match, substring = result2; - if (!separator.global) { - separator = RegExp(separator.source, toString_default(reFlags2.exec(separator)) + "g"); - } - separator.lastIndex = 0; - while (match = separator.exec(substring)) { - var newEnd = match.index; - } - result2 = result2.slice(0, newEnd === void 0 ? end : newEnd); - } - } else if (string3.indexOf(baseToString_default(separator), end) != end) { - var index = result2.lastIndexOf(separator); - if (index > -1) { - result2 = result2.slice(0, index); - } - } - return result2 + omission; -} -var truncate_default = truncate; - -// node_modules/lodash-es/unary.js -function unary(func) { - return ary_default(func, 1); -} -var unary_default = unary; - -// node_modules/lodash-es/_unescapeHtmlChar.js -var htmlUnescapes = { - "&": "&", - "<": "<", - ">": ">", - """: '"', - "'": "'" -}; -var unescapeHtmlChar = basePropertyOf_default(htmlUnescapes); -var unescapeHtmlChar_default = unescapeHtmlChar; - -// node_modules/lodash-es/unescape.js -var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g; -var reHasEscapedHtml = RegExp(reEscapedHtml.source); -function unescape(string3) { - string3 = toString_default(string3); - return string3 && reHasEscapedHtml.test(string3) ? string3.replace(reEscapedHtml, unescapeHtmlChar_default) : string3; -} -var unescape_default = unescape; - -// node_modules/lodash-es/_createSet.js -var INFINITY6 = 1 / 0; -var createSet = !(Set_default && 1 / setToArray_default(new Set_default([, -0]))[1] == INFINITY6) ? noop_default : function(values2) { - return new Set_default(values2); -}; -var createSet_default = createSet; - -// node_modules/lodash-es/_baseUniq.js -var LARGE_ARRAY_SIZE3 = 200; -function baseUniq(array4, iteratee2, comparator) { - var index = -1, includes2 = arrayIncludes_default, length = array4.length, isCommon = true, result2 = [], seen = result2; - if (comparator) { - isCommon = false; - includes2 = arrayIncludesWith_default; - } else if (length >= LARGE_ARRAY_SIZE3) { - var set3 = iteratee2 ? null : createSet_default(array4); - if (set3) { - return setToArray_default(set3); - } - isCommon = false; - includes2 = cacheHas_default; - seen = new SetCache_default(); - } else { - seen = iteratee2 ? [] : result2; - } - outer: - while (++index < length) { - var value = array4[index], computed2 = iteratee2 ? iteratee2(value) : value; - value = comparator || value !== 0 ? value : 0; - if (isCommon && computed2 === computed2) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed2) { - continue outer; - } - } - if (iteratee2) { - seen.push(computed2); - } - result2.push(value); - } else if (!includes2(seen, computed2, comparator)) { - if (seen !== result2) { - seen.push(computed2); - } - result2.push(value); - } - } - return result2; -} -var baseUniq_default = baseUniq; - -// node_modules/lodash-es/union.js -var union = baseRest_default(function(arrays) { - return baseUniq_default(baseFlatten_default(arrays, 1, isArrayLikeObject_default, true)); -}); -var union_default = union; - -// node_modules/lodash-es/unionBy.js -var unionBy = baseRest_default(function(arrays) { - var iteratee2 = last_default(arrays); - if (isArrayLikeObject_default(iteratee2)) { - iteratee2 = void 0; - } - return baseUniq_default(baseFlatten_default(arrays, 1, isArrayLikeObject_default, true), baseIteratee_default(iteratee2, 2)); -}); -var unionBy_default = unionBy; - -// node_modules/lodash-es/unionWith.js -var unionWith = baseRest_default(function(arrays) { - var comparator = last_default(arrays); - comparator = typeof comparator == "function" ? comparator : void 0; - return baseUniq_default(baseFlatten_default(arrays, 1, isArrayLikeObject_default, true), void 0, comparator); -}); -var unionWith_default = unionWith; - -// node_modules/lodash-es/uniq.js -function uniq(array4) { - return array4 && array4.length ? baseUniq_default(array4) : []; -} -var uniq_default = uniq; - -// node_modules/lodash-es/uniqBy.js -function uniqBy(array4, iteratee2) { - return array4 && array4.length ? baseUniq_default(array4, baseIteratee_default(iteratee2, 2)) : []; -} -var uniqBy_default = uniqBy; - -// node_modules/lodash-es/uniqWith.js -function uniqWith(array4, comparator) { - comparator = typeof comparator == "function" ? comparator : void 0; - return array4 && array4.length ? baseUniq_default(array4, void 0, comparator) : []; -} -var uniqWith_default = uniqWith; - -// node_modules/lodash-es/uniqueId.js -var idCounter = 0; -function uniqueId(prefix) { - var id = ++idCounter; - return toString_default(prefix) + id; -} -var uniqueId_default = uniqueId; - -// node_modules/lodash-es/unset.js -function unset(object4, path) { - return object4 == null ? true : baseUnset_default(object4, path); -} -var unset_default = unset; - -// node_modules/lodash-es/unzip.js -var nativeMax15 = Math.max; -function unzip(array4) { - if (!(array4 && array4.length)) { - return []; - } - var length = 0; - array4 = arrayFilter_default(array4, function(group) { - if (isArrayLikeObject_default(group)) { - length = nativeMax15(group.length, length); - return true; - } - }); - return baseTimes_default(length, function(index) { - return arrayMap_default(array4, baseProperty_default(index)); - }); -} -var unzip_default = unzip; - -// node_modules/lodash-es/unzipWith.js -function unzipWith(array4, iteratee2) { - if (!(array4 && array4.length)) { - return []; - } - var result2 = unzip_default(array4); - if (iteratee2 == null) { - return result2; - } - return arrayMap_default(result2, function(group) { - return apply_default(iteratee2, void 0, group); - }); -} -var unzipWith_default = unzipWith; - -// node_modules/lodash-es/_baseUpdate.js -function baseUpdate(object4, path, updater, customizer) { - return baseSet_default(object4, path, updater(baseGet_default(object4, path)), customizer); -} -var baseUpdate_default = baseUpdate; - -// node_modules/lodash-es/update.js -function update(object4, path, updater) { - return object4 == null ? object4 : baseUpdate_default(object4, path, castFunction_default(updater)); -} -var update_default = update; - -// node_modules/lodash-es/updateWith.js -function updateWith(object4, path, updater, customizer) { - customizer = typeof customizer == "function" ? customizer : void 0; - return object4 == null ? object4 : baseUpdate_default(object4, path, castFunction_default(updater), customizer); -} -var updateWith_default = updateWith; - -// node_modules/lodash-es/upperCase.js -var upperCase = createCompounder_default(function(result2, word, index) { - return result2 + (index ? " " : "") + word.toUpperCase(); -}); -var upperCase_default = upperCase; - -// node_modules/lodash-es/valuesIn.js -function valuesIn(object4) { - return object4 == null ? [] : baseValues_default(object4, keysIn_default(object4)); -} -var valuesIn_default = valuesIn; - -// node_modules/lodash-es/without.js -var without = baseRest_default(function(array4, values2) { - return isArrayLikeObject_default(array4) ? baseDifference_default(array4, values2) : []; -}); -var without_default = without; - -// node_modules/lodash-es/wrap.js -function wrap(value, wrapper) { - return partial_default(castFunction_default(wrapper), value); -} -var wrap_default = wrap; - -// node_modules/lodash-es/wrapperAt.js -var wrapperAt = flatRest_default(function(paths) { - var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object4) { - return baseAt_default(object4, paths); - }; - if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper_default) || !isIndex_default(start)) { - return this.thru(interceptor); - } - value = value.slice(start, +start + (length ? 1 : 0)); - value.__actions__.push({ - "func": thru_default, - "args": [interceptor], - "thisArg": void 0 - }); - return new LodashWrapper_default(value, this.__chain__).thru(function(array4) { - if (length && !array4.length) { - array4.push(void 0); - } - return array4; - }); -}); -var wrapperAt_default = wrapperAt; - -// node_modules/lodash-es/wrapperChain.js -function wrapperChain() { - return chain_default(this); -} -var wrapperChain_default = wrapperChain; - -// node_modules/lodash-es/wrapperReverse.js -function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper_default) { - var wrapped = value; - if (this.__actions__.length) { - wrapped = new LazyWrapper_default(this); - } - wrapped = wrapped.reverse(); - wrapped.__actions__.push({ - "func": thru_default, - "args": [reverse_default], - "thisArg": void 0 - }); - return new LodashWrapper_default(wrapped, this.__chain__); - } - return this.thru(reverse_default); -} -var wrapperReverse_default = wrapperReverse; - -// node_modules/lodash-es/_baseXor.js -function baseXor(arrays, iteratee2, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq_default(arrays[0]) : []; - } - var index = -1, result2 = Array(length); - while (++index < length) { - var array4 = arrays[index], othIndex = -1; - while (++othIndex < length) { - if (othIndex != index) { - result2[index] = baseDifference_default(result2[index] || array4, arrays[othIndex], iteratee2, comparator); - } - } - } - return baseUniq_default(baseFlatten_default(result2, 1), iteratee2, comparator); -} -var baseXor_default = baseXor; - -// node_modules/lodash-es/xor.js -var xor = baseRest_default(function(arrays) { - return baseXor_default(arrayFilter_default(arrays, isArrayLikeObject_default)); -}); -var xor_default = xor; - -// node_modules/lodash-es/xorBy.js -var xorBy = baseRest_default(function(arrays) { - var iteratee2 = last_default(arrays); - if (isArrayLikeObject_default(iteratee2)) { - iteratee2 = void 0; - } - return baseXor_default(arrayFilter_default(arrays, isArrayLikeObject_default), baseIteratee_default(iteratee2, 2)); -}); -var xorBy_default = xorBy; - -// node_modules/lodash-es/xorWith.js -var xorWith = baseRest_default(function(arrays) { - var comparator = last_default(arrays); - comparator = typeof comparator == "function" ? comparator : void 0; - return baseXor_default(arrayFilter_default(arrays, isArrayLikeObject_default), void 0, comparator); -}); -var xorWith_default = xorWith; - -// node_modules/lodash-es/zip.js -var zip = baseRest_default(unzip_default); -var zip_default = zip; - -// node_modules/lodash-es/_baseZipObject.js -function baseZipObject(props2, values2, assignFunc) { - var index = -1, length = props2.length, valsLength = values2.length, result2 = {}; - while (++index < length) { - var value = index < valsLength ? values2[index] : void 0; - assignFunc(result2, props2[index], value); - } - return result2; -} -var baseZipObject_default = baseZipObject; - -// node_modules/lodash-es/zipObject.js -function zipObject(props2, values2) { - return baseZipObject_default(props2 || [], values2 || [], assignValue_default); -} -var zipObject_default = zipObject; - -// node_modules/lodash-es/zipObjectDeep.js -function zipObjectDeep(props2, values2) { - return baseZipObject_default(props2 || [], values2 || [], baseSet_default); -} -var zipObjectDeep_default = zipObjectDeep; - -// node_modules/lodash-es/zipWith.js -var zipWith = baseRest_default(function(arrays) { - var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : void 0; - iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : void 0; - return unzipWith_default(arrays, iteratee2); -}); -var zipWith_default = zipWith; - -// node_modules/lodash-es/array.default.js -var array_default_default = { - chunk: chunk_default, - compact: compact_default, - concat: concat_default, - difference: difference_default, - differenceBy: differenceBy_default, - differenceWith: differenceWith_default, - drop: drop_default, - dropRight: dropRight_default, - dropRightWhile: dropRightWhile_default, - dropWhile: dropWhile_default, - fill: fill_default, - findIndex: findIndex_default, - findLastIndex: findLastIndex_default, - first: head_default, - flatten: flatten_default, - flattenDeep: flattenDeep_default, - flattenDepth: flattenDepth_default, - fromPairs: fromPairs_default, - head: head_default, - indexOf: indexOf_default, - initial: initial_default, - intersection: intersection_default, - intersectionBy: intersectionBy_default, - intersectionWith: intersectionWith_default, - join: join_default, - last: last_default, - lastIndexOf: lastIndexOf_default, - nth: nth_default, - pull: pull_default, - pullAll: pullAll_default, - pullAllBy: pullAllBy_default, - pullAllWith: pullAllWith_default, - pullAt: pullAt_default, - remove: remove_default, - reverse: reverse_default, - slice: slice_default, - sortedIndex: sortedIndex_default, - sortedIndexBy: sortedIndexBy_default, - sortedIndexOf: sortedIndexOf_default, - sortedLastIndex: sortedLastIndex_default, - sortedLastIndexBy: sortedLastIndexBy_default, - sortedLastIndexOf: sortedLastIndexOf_default, - sortedUniq: sortedUniq_default, - sortedUniqBy: sortedUniqBy_default, - tail: tail_default, - take: take_default, - takeRight: takeRight_default, - takeRightWhile: takeRightWhile_default, - takeWhile: takeWhile_default, - union: union_default, - unionBy: unionBy_default, - unionWith: unionWith_default, - uniq: uniq_default, - uniqBy: uniqBy_default, - uniqWith: uniqWith_default, - unzip: unzip_default, - unzipWith: unzipWith_default, - without: without_default, - xor: xor_default, - xorBy: xorBy_default, - xorWith: xorWith_default, - zip: zip_default, - zipObject: zipObject_default, - zipObjectDeep: zipObjectDeep_default, - zipWith: zipWith_default -}; - -// node_modules/lodash-es/collection.default.js -var collection_default_default = { - countBy: countBy_default, - each: forEach_default, - eachRight: forEachRight_default, - every: every_default, - filter: filter_default, - find: find_default, - findLast: findLast_default, - flatMap: flatMap_default, - flatMapDeep: flatMapDeep_default, - flatMapDepth: flatMapDepth_default, - forEach: forEach_default, - forEachRight: forEachRight_default, - groupBy: groupBy_default, - includes: includes_default, - invokeMap: invokeMap_default, - keyBy: keyBy_default, - map: map_default, - orderBy: orderBy_default, - partition: partition_default, - reduce: reduce_default, - reduceRight: reduceRight_default, - reject: reject_default, - sample: sample_default, - sampleSize: sampleSize_default, - shuffle: shuffle_default, - size: size_default, - some: some_default, - sortBy: sortBy_default -}; - -// node_modules/lodash-es/date.default.js -var date_default_default = { - now: now_default -}; - -// node_modules/lodash-es/function.default.js -var function_default_default = { - after: after_default, - ary: ary_default, - before: before_default, - bind: bind_default, - bindKey: bindKey_default, - curry: curry_default, - curryRight: curryRight_default, - debounce: debounce_default, - defer: defer_default, - delay: delay_default, - flip: flip_default, - memoize: memoize_default, - negate: negate_default, - once: once_default, - overArgs: overArgs_default, - partial: partial_default, - partialRight: partialRight_default, - rearg: rearg_default, - rest: rest_default, - spread: spread_default, - throttle: throttle_default, - unary: unary_default, - wrap: wrap_default -}; - -// node_modules/lodash-es/lang.default.js -var lang_default_default = { - castArray: castArray_default, - clone: clone_default, - cloneDeep: cloneDeep_default, - cloneDeepWith: cloneDeepWith_default, - cloneWith: cloneWith_default, - conformsTo: conformsTo_default, - eq: eq_default, - gt: gt_default, - gte: gte_default, - isArguments: isArguments_default, - isArray: isArray_default, - isArrayBuffer: isArrayBuffer_default, - isArrayLike: isArrayLike_default, - isArrayLikeObject: isArrayLikeObject_default, - isBoolean: isBoolean_default, - isBuffer: isBuffer_default, - isDate: isDate_default, - isElement: isElement_default, - isEmpty: isEmpty_default, - isEqual: isEqual_default, - isEqualWith: isEqualWith_default, - isError: isError_default, - isFinite: isFinite_default, - isFunction: isFunction_default, - isInteger: isInteger_default, - isLength: isLength_default, - isMap: isMap_default, - isMatch: isMatch_default, - isMatchWith: isMatchWith_default, - isNaN: isNaN_default, - isNative: isNative_default, - isNil: isNil_default, - isNull: isNull_default, - isNumber: isNumber_default, - isObject: isObject_default, - isObjectLike: isObjectLike_default, - isPlainObject: isPlainObject_default, - isRegExp: isRegExp_default, - isSafeInteger: isSafeInteger_default, - isSet: isSet_default, - isString: isString_default, - isSymbol: isSymbol_default, - isTypedArray: isTypedArray_default, - isUndefined: isUndefined_default, - isWeakMap: isWeakMap_default, - isWeakSet: isWeakSet_default, - lt: lt_default, - lte: lte_default, - toArray: toArray_default, - toFinite: toFinite_default, - toInteger: toInteger_default, - toLength: toLength_default, - toNumber: toNumber_default, - toPlainObject: toPlainObject_default, - toSafeInteger: toSafeInteger_default, - toString: toString_default -}; - -// node_modules/lodash-es/math.default.js -var math_default_default = { - add: add_default, - ceil: ceil_default, - divide: divide_default, - floor: floor_default, - max: max_default, - maxBy: maxBy_default, - mean: mean_default, - meanBy: meanBy_default, - min: min_default, - minBy: minBy_default, - multiply: multiply_default, - round: round_default, - subtract: subtract_default, - sum: sum_default, - sumBy: sumBy_default -}; - -// node_modules/lodash-es/number.default.js -var number_default_default = { - clamp: clamp_default, - inRange: inRange_default, - random: random_default -}; - -// node_modules/lodash-es/object.default.js -var object_default_default = { - assign: assign_default, - assignIn: assignIn_default, - assignInWith: assignInWith_default, - assignWith: assignWith_default, - at: at_default, - create: create_default, - defaults: defaults_default, - defaultsDeep: defaultsDeep_default, - entries: toPairs_default, - entriesIn: toPairsIn_default, - extend: assignIn_default, - extendWith: assignInWith_default, - findKey: findKey_default, - findLastKey: findLastKey_default, - forIn: forIn_default, - forInRight: forInRight_default, - forOwn: forOwn_default, - forOwnRight: forOwnRight_default, - functions: functions_default, - functionsIn: functionsIn_default, - get: get_default, - has: has_default, - hasIn: hasIn_default, - invert: invert_default, - invertBy: invertBy_default, - invoke: invoke_default, - keys: keys_default, - keysIn: keysIn_default, - mapKeys: mapKeys_default, - mapValues: mapValues_default, - merge: merge_default, - mergeWith: mergeWith_default, - omit: omit_default, - omitBy: omitBy_default, - pick: pick_default, - pickBy: pickBy_default, - result: result_default, - set: set_default, - setWith: setWith_default, - toPairs: toPairs_default, - toPairsIn: toPairsIn_default, - transform: transform_default, - unset: unset_default, - update: update_default, - updateWith: updateWith_default, - values: values_default, - valuesIn: valuesIn_default -}; - -// node_modules/lodash-es/seq.default.js -var seq_default_default = { - at: wrapperAt_default, - chain: chain_default, - commit: commit_default, - lodash: wrapperLodash_default, - next: next_default, - plant: plant_default, - reverse: wrapperReverse_default, - tap: tap_default, - thru: thru_default, - toIterator: toIterator_default, - toJSON: wrapperValue_default, - value: wrapperValue_default, - valueOf: wrapperValue_default, - wrapperChain: wrapperChain_default -}; - -// node_modules/lodash-es/string.default.js -var string_default_default = { - camelCase: camelCase_default, - capitalize: capitalize_default, - deburr: deburr_default, - endsWith: endsWith_default, - escape: escape_default, - escapeRegExp: escapeRegExp_default, - kebabCase: kebabCase_default, - lowerCase: lowerCase_default, - lowerFirst: lowerFirst_default, - pad: pad_default, - padEnd: padEnd_default, - padStart: padStart_default, - parseInt: parseInt_default, - repeat: repeat_default, - replace: replace_default, - snakeCase: snakeCase_default, - split: split_default, - startCase: startCase_default, - startsWith: startsWith_default, - template: template_default, - templateSettings: templateSettings_default, - toLower: toLower_default, - toUpper: toUpper_default, - trim: trim_default, - trimEnd: trimEnd_default, - trimStart: trimStart_default, - truncate: truncate_default, - unescape: unescape_default, - upperCase: upperCase_default, - upperFirst: upperFirst_default, - words: words_default -}; - -// node_modules/lodash-es/util.default.js -var util_default_default = { - attempt: attempt_default, - bindAll: bindAll_default, - cond: cond_default, - conforms: conforms_default, - constant: constant_default, - defaultTo: defaultTo_default, - flow: flow_default, - flowRight: flowRight_default, - identity: identity_default, - iteratee: iteratee_default, - matches: matches_default, - matchesProperty: matchesProperty_default, - method: method_default, - methodOf: methodOf_default, - mixin: mixin_default, - noop: noop_default, - nthArg: nthArg_default, - over: over_default, - overEvery: overEvery_default, - overSome: overSome_default, - property: property_default, - propertyOf: propertyOf_default, - range: range_default, - rangeRight: rangeRight_default, - stubArray: stubArray_default, - stubFalse: stubFalse_default, - stubObject: stubObject_default, - stubString: stubString_default, - stubTrue: stubTrue_default, - times: times_default, - toPath: toPath_default, - uniqueId: uniqueId_default -}; - -// node_modules/lodash-es/_lazyClone.js -function lazyClone() { - var result2 = new LazyWrapper_default(this.__wrapped__); - result2.__actions__ = copyArray_default(this.__actions__); - result2.__dir__ = this.__dir__; - result2.__filtered__ = this.__filtered__; - result2.__iteratees__ = copyArray_default(this.__iteratees__); - result2.__takeCount__ = this.__takeCount__; - result2.__views__ = copyArray_default(this.__views__); - return result2; -} -var lazyClone_default = lazyClone; - -// node_modules/lodash-es/_lazyReverse.js -function lazyReverse() { - if (this.__filtered__) { - var result2 = new LazyWrapper_default(this); - result2.__dir__ = -1; - result2.__filtered__ = true; - } else { - result2 = this.clone(); - result2.__dir__ *= -1; - } - return result2; -} -var lazyReverse_default = lazyReverse; - -// node_modules/lodash-es/_getView.js -var nativeMax16 = Math.max; -var nativeMin13 = Math.min; -function getView(start, end, transforms) { - var index = -1, length = transforms.length; - while (++index < length) { - var data = transforms[index], size3 = data.size; - switch (data.type) { - case "drop": - start += size3; - break; - case "dropRight": - end -= size3; - break; - case "take": - end = nativeMin13(end, start + size3); - break; - case "takeRight": - start = nativeMax16(start, end - size3); - break; - } - } - return { "start": start, "end": end }; -} -var getView_default = getView; - -// node_modules/lodash-es/_lazyValue.js -var LAZY_FILTER_FLAG = 1; -var LAZY_MAP_FLAG = 2; -var nativeMin14 = Math.min; -function lazyValue() { - var array4 = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray_default(array4), isRight = dir < 0, arrLength = isArr ? array4.length : 0, view = getView_default(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin14(length, this.__takeCount__); - if (!isArr || !isRight && arrLength == length && takeCount == length) { - return baseWrapperValue_default(array4, this.__actions__); - } - var result2 = []; - outer: - while (length-- && resIndex < takeCount) { - index += dir; - var iterIndex = -1, value = array4[index]; - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], iteratee2 = data.iteratee, type4 = data.type, computed2 = iteratee2(value); - if (type4 == LAZY_MAP_FLAG) { - value = computed2; - } else if (!computed2) { - if (type4 == LAZY_FILTER_FLAG) { - continue outer; - } else { - break outer; - } - } - } - result2[resIndex++] = value; - } - return result2; -} -var lazyValue_default = lazyValue; - -// node_modules/lodash-es/lodash.default.js -var VERSION = "4.17.22"; -var WRAP_BIND_KEY_FLAG7 = 2; -var LAZY_FILTER_FLAG2 = 1; -var LAZY_WHILE_FLAG = 3; -var MAX_ARRAY_LENGTH7 = 4294967295; -var arrayProto6 = Array.prototype; -var objectProto30 = Object.prototype; -var hasOwnProperty26 = objectProto30.hasOwnProperty; -var symIterator2 = Symbol_default ? Symbol_default.iterator : void 0; -var nativeMax17 = Math.max; -var nativeMin15 = Math.min; -var mixin2 = /* @__PURE__ */ function(func) { - return function(object4, source, options) { - if (options == null) { - var isObj = isObject_default(source), props2 = isObj && keys_default(source), methodNames = props2 && props2.length && baseFunctions_default(source, props2); - if (!(methodNames ? methodNames.length : isObj)) { - options = source; - source = object4; - object4 = this; - } - } - return func(object4, source, options); - }; -}(mixin_default); -wrapperLodash_default.after = function_default_default.after; -wrapperLodash_default.ary = function_default_default.ary; -wrapperLodash_default.assign = object_default_default.assign; -wrapperLodash_default.assignIn = object_default_default.assignIn; -wrapperLodash_default.assignInWith = object_default_default.assignInWith; -wrapperLodash_default.assignWith = object_default_default.assignWith; -wrapperLodash_default.at = object_default_default.at; -wrapperLodash_default.before = function_default_default.before; -wrapperLodash_default.bind = function_default_default.bind; -wrapperLodash_default.bindAll = util_default_default.bindAll; -wrapperLodash_default.bindKey = function_default_default.bindKey; -wrapperLodash_default.castArray = lang_default_default.castArray; -wrapperLodash_default.chain = seq_default_default.chain; -wrapperLodash_default.chunk = array_default_default.chunk; -wrapperLodash_default.compact = array_default_default.compact; -wrapperLodash_default.concat = array_default_default.concat; -wrapperLodash_default.cond = util_default_default.cond; -wrapperLodash_default.conforms = util_default_default.conforms; -wrapperLodash_default.constant = util_default_default.constant; -wrapperLodash_default.countBy = collection_default_default.countBy; -wrapperLodash_default.create = object_default_default.create; -wrapperLodash_default.curry = function_default_default.curry; -wrapperLodash_default.curryRight = function_default_default.curryRight; -wrapperLodash_default.debounce = function_default_default.debounce; -wrapperLodash_default.defaults = object_default_default.defaults; -wrapperLodash_default.defaultsDeep = object_default_default.defaultsDeep; -wrapperLodash_default.defer = function_default_default.defer; -wrapperLodash_default.delay = function_default_default.delay; -wrapperLodash_default.difference = array_default_default.difference; -wrapperLodash_default.differenceBy = array_default_default.differenceBy; -wrapperLodash_default.differenceWith = array_default_default.differenceWith; -wrapperLodash_default.drop = array_default_default.drop; -wrapperLodash_default.dropRight = array_default_default.dropRight; -wrapperLodash_default.dropRightWhile = array_default_default.dropRightWhile; -wrapperLodash_default.dropWhile = array_default_default.dropWhile; -wrapperLodash_default.fill = array_default_default.fill; -wrapperLodash_default.filter = collection_default_default.filter; -wrapperLodash_default.flatMap = collection_default_default.flatMap; -wrapperLodash_default.flatMapDeep = collection_default_default.flatMapDeep; -wrapperLodash_default.flatMapDepth = collection_default_default.flatMapDepth; -wrapperLodash_default.flatten = array_default_default.flatten; -wrapperLodash_default.flattenDeep = array_default_default.flattenDeep; -wrapperLodash_default.flattenDepth = array_default_default.flattenDepth; -wrapperLodash_default.flip = function_default_default.flip; -wrapperLodash_default.flow = util_default_default.flow; -wrapperLodash_default.flowRight = util_default_default.flowRight; -wrapperLodash_default.fromPairs = array_default_default.fromPairs; -wrapperLodash_default.functions = object_default_default.functions; -wrapperLodash_default.functionsIn = object_default_default.functionsIn; -wrapperLodash_default.groupBy = collection_default_default.groupBy; -wrapperLodash_default.initial = array_default_default.initial; -wrapperLodash_default.intersection = array_default_default.intersection; -wrapperLodash_default.intersectionBy = array_default_default.intersectionBy; -wrapperLodash_default.intersectionWith = array_default_default.intersectionWith; -wrapperLodash_default.invert = object_default_default.invert; -wrapperLodash_default.invertBy = object_default_default.invertBy; -wrapperLodash_default.invokeMap = collection_default_default.invokeMap; -wrapperLodash_default.iteratee = util_default_default.iteratee; -wrapperLodash_default.keyBy = collection_default_default.keyBy; -wrapperLodash_default.keys = keys_default; -wrapperLodash_default.keysIn = object_default_default.keysIn; -wrapperLodash_default.map = collection_default_default.map; -wrapperLodash_default.mapKeys = object_default_default.mapKeys; -wrapperLodash_default.mapValues = object_default_default.mapValues; -wrapperLodash_default.matches = util_default_default.matches; -wrapperLodash_default.matchesProperty = util_default_default.matchesProperty; -wrapperLodash_default.memoize = function_default_default.memoize; -wrapperLodash_default.merge = object_default_default.merge; -wrapperLodash_default.mergeWith = object_default_default.mergeWith; -wrapperLodash_default.method = util_default_default.method; -wrapperLodash_default.methodOf = util_default_default.methodOf; -wrapperLodash_default.mixin = mixin2; -wrapperLodash_default.negate = negate_default; -wrapperLodash_default.nthArg = util_default_default.nthArg; -wrapperLodash_default.omit = object_default_default.omit; -wrapperLodash_default.omitBy = object_default_default.omitBy; -wrapperLodash_default.once = function_default_default.once; -wrapperLodash_default.orderBy = collection_default_default.orderBy; -wrapperLodash_default.over = util_default_default.over; -wrapperLodash_default.overArgs = function_default_default.overArgs; -wrapperLodash_default.overEvery = util_default_default.overEvery; -wrapperLodash_default.overSome = util_default_default.overSome; -wrapperLodash_default.partial = function_default_default.partial; -wrapperLodash_default.partialRight = function_default_default.partialRight; -wrapperLodash_default.partition = collection_default_default.partition; -wrapperLodash_default.pick = object_default_default.pick; -wrapperLodash_default.pickBy = object_default_default.pickBy; -wrapperLodash_default.property = util_default_default.property; -wrapperLodash_default.propertyOf = util_default_default.propertyOf; -wrapperLodash_default.pull = array_default_default.pull; -wrapperLodash_default.pullAll = array_default_default.pullAll; -wrapperLodash_default.pullAllBy = array_default_default.pullAllBy; -wrapperLodash_default.pullAllWith = array_default_default.pullAllWith; -wrapperLodash_default.pullAt = array_default_default.pullAt; -wrapperLodash_default.range = util_default_default.range; -wrapperLodash_default.rangeRight = util_default_default.rangeRight; -wrapperLodash_default.rearg = function_default_default.rearg; -wrapperLodash_default.reject = collection_default_default.reject; -wrapperLodash_default.remove = array_default_default.remove; -wrapperLodash_default.rest = function_default_default.rest; -wrapperLodash_default.reverse = array_default_default.reverse; -wrapperLodash_default.sampleSize = collection_default_default.sampleSize; -wrapperLodash_default.set = object_default_default.set; -wrapperLodash_default.setWith = object_default_default.setWith; -wrapperLodash_default.shuffle = collection_default_default.shuffle; -wrapperLodash_default.slice = array_default_default.slice; -wrapperLodash_default.sortBy = collection_default_default.sortBy; -wrapperLodash_default.sortedUniq = array_default_default.sortedUniq; -wrapperLodash_default.sortedUniqBy = array_default_default.sortedUniqBy; -wrapperLodash_default.split = string_default_default.split; -wrapperLodash_default.spread = function_default_default.spread; -wrapperLodash_default.tail = array_default_default.tail; -wrapperLodash_default.take = array_default_default.take; -wrapperLodash_default.takeRight = array_default_default.takeRight; -wrapperLodash_default.takeRightWhile = array_default_default.takeRightWhile; -wrapperLodash_default.takeWhile = array_default_default.takeWhile; -wrapperLodash_default.tap = seq_default_default.tap; -wrapperLodash_default.throttle = function_default_default.throttle; -wrapperLodash_default.thru = thru_default; -wrapperLodash_default.toArray = lang_default_default.toArray; -wrapperLodash_default.toPairs = object_default_default.toPairs; -wrapperLodash_default.toPairsIn = object_default_default.toPairsIn; -wrapperLodash_default.toPath = util_default_default.toPath; -wrapperLodash_default.toPlainObject = lang_default_default.toPlainObject; -wrapperLodash_default.transform = object_default_default.transform; -wrapperLodash_default.unary = function_default_default.unary; -wrapperLodash_default.union = array_default_default.union; -wrapperLodash_default.unionBy = array_default_default.unionBy; -wrapperLodash_default.unionWith = array_default_default.unionWith; -wrapperLodash_default.uniq = array_default_default.uniq; -wrapperLodash_default.uniqBy = array_default_default.uniqBy; -wrapperLodash_default.uniqWith = array_default_default.uniqWith; -wrapperLodash_default.unset = object_default_default.unset; -wrapperLodash_default.unzip = array_default_default.unzip; -wrapperLodash_default.unzipWith = array_default_default.unzipWith; -wrapperLodash_default.update = object_default_default.update; -wrapperLodash_default.updateWith = object_default_default.updateWith; -wrapperLodash_default.values = object_default_default.values; -wrapperLodash_default.valuesIn = object_default_default.valuesIn; -wrapperLodash_default.without = array_default_default.without; -wrapperLodash_default.words = string_default_default.words; -wrapperLodash_default.wrap = function_default_default.wrap; -wrapperLodash_default.xor = array_default_default.xor; -wrapperLodash_default.xorBy = array_default_default.xorBy; -wrapperLodash_default.xorWith = array_default_default.xorWith; -wrapperLodash_default.zip = array_default_default.zip; -wrapperLodash_default.zipObject = array_default_default.zipObject; -wrapperLodash_default.zipObjectDeep = array_default_default.zipObjectDeep; -wrapperLodash_default.zipWith = array_default_default.zipWith; -wrapperLodash_default.entries = object_default_default.toPairs; -wrapperLodash_default.entriesIn = object_default_default.toPairsIn; -wrapperLodash_default.extend = object_default_default.assignIn; -wrapperLodash_default.extendWith = object_default_default.assignInWith; -mixin2(wrapperLodash_default, wrapperLodash_default); -wrapperLodash_default.add = math_default_default.add; -wrapperLodash_default.attempt = util_default_default.attempt; -wrapperLodash_default.camelCase = string_default_default.camelCase; -wrapperLodash_default.capitalize = string_default_default.capitalize; -wrapperLodash_default.ceil = math_default_default.ceil; -wrapperLodash_default.clamp = number_default_default.clamp; -wrapperLodash_default.clone = lang_default_default.clone; -wrapperLodash_default.cloneDeep = lang_default_default.cloneDeep; -wrapperLodash_default.cloneDeepWith = lang_default_default.cloneDeepWith; -wrapperLodash_default.cloneWith = lang_default_default.cloneWith; -wrapperLodash_default.conformsTo = lang_default_default.conformsTo; -wrapperLodash_default.deburr = string_default_default.deburr; -wrapperLodash_default.defaultTo = util_default_default.defaultTo; -wrapperLodash_default.divide = math_default_default.divide; -wrapperLodash_default.endsWith = string_default_default.endsWith; -wrapperLodash_default.eq = lang_default_default.eq; -wrapperLodash_default.escape = string_default_default.escape; -wrapperLodash_default.escapeRegExp = string_default_default.escapeRegExp; -wrapperLodash_default.every = collection_default_default.every; -wrapperLodash_default.find = collection_default_default.find; -wrapperLodash_default.findIndex = array_default_default.findIndex; -wrapperLodash_default.findKey = object_default_default.findKey; -wrapperLodash_default.findLast = collection_default_default.findLast; -wrapperLodash_default.findLastIndex = array_default_default.findLastIndex; -wrapperLodash_default.findLastKey = object_default_default.findLastKey; -wrapperLodash_default.floor = math_default_default.floor; -wrapperLodash_default.forEach = collection_default_default.forEach; -wrapperLodash_default.forEachRight = collection_default_default.forEachRight; -wrapperLodash_default.forIn = object_default_default.forIn; -wrapperLodash_default.forInRight = object_default_default.forInRight; -wrapperLodash_default.forOwn = object_default_default.forOwn; -wrapperLodash_default.forOwnRight = object_default_default.forOwnRight; -wrapperLodash_default.get = object_default_default.get; -wrapperLodash_default.gt = lang_default_default.gt; -wrapperLodash_default.gte = lang_default_default.gte; -wrapperLodash_default.has = object_default_default.has; -wrapperLodash_default.hasIn = object_default_default.hasIn; -wrapperLodash_default.head = array_default_default.head; -wrapperLodash_default.identity = identity_default; -wrapperLodash_default.includes = collection_default_default.includes; -wrapperLodash_default.indexOf = array_default_default.indexOf; -wrapperLodash_default.inRange = number_default_default.inRange; -wrapperLodash_default.invoke = object_default_default.invoke; -wrapperLodash_default.isArguments = lang_default_default.isArguments; -wrapperLodash_default.isArray = isArray_default; -wrapperLodash_default.isArrayBuffer = lang_default_default.isArrayBuffer; -wrapperLodash_default.isArrayLike = lang_default_default.isArrayLike; -wrapperLodash_default.isArrayLikeObject = lang_default_default.isArrayLikeObject; -wrapperLodash_default.isBoolean = lang_default_default.isBoolean; -wrapperLodash_default.isBuffer = lang_default_default.isBuffer; -wrapperLodash_default.isDate = lang_default_default.isDate; -wrapperLodash_default.isElement = lang_default_default.isElement; -wrapperLodash_default.isEmpty = lang_default_default.isEmpty; -wrapperLodash_default.isEqual = lang_default_default.isEqual; -wrapperLodash_default.isEqualWith = lang_default_default.isEqualWith; -wrapperLodash_default.isError = lang_default_default.isError; -wrapperLodash_default.isFinite = lang_default_default.isFinite; -wrapperLodash_default.isFunction = lang_default_default.isFunction; -wrapperLodash_default.isInteger = lang_default_default.isInteger; -wrapperLodash_default.isLength = lang_default_default.isLength; -wrapperLodash_default.isMap = lang_default_default.isMap; -wrapperLodash_default.isMatch = lang_default_default.isMatch; -wrapperLodash_default.isMatchWith = lang_default_default.isMatchWith; -wrapperLodash_default.isNaN = lang_default_default.isNaN; -wrapperLodash_default.isNative = lang_default_default.isNative; -wrapperLodash_default.isNil = lang_default_default.isNil; -wrapperLodash_default.isNull = lang_default_default.isNull; -wrapperLodash_default.isNumber = lang_default_default.isNumber; -wrapperLodash_default.isObject = isObject_default; -wrapperLodash_default.isObjectLike = lang_default_default.isObjectLike; -wrapperLodash_default.isPlainObject = lang_default_default.isPlainObject; -wrapperLodash_default.isRegExp = lang_default_default.isRegExp; -wrapperLodash_default.isSafeInteger = lang_default_default.isSafeInteger; -wrapperLodash_default.isSet = lang_default_default.isSet; -wrapperLodash_default.isString = lang_default_default.isString; -wrapperLodash_default.isSymbol = lang_default_default.isSymbol; -wrapperLodash_default.isTypedArray = lang_default_default.isTypedArray; -wrapperLodash_default.isUndefined = lang_default_default.isUndefined; -wrapperLodash_default.isWeakMap = lang_default_default.isWeakMap; -wrapperLodash_default.isWeakSet = lang_default_default.isWeakSet; -wrapperLodash_default.join = array_default_default.join; -wrapperLodash_default.kebabCase = string_default_default.kebabCase; -wrapperLodash_default.last = last_default; -wrapperLodash_default.lastIndexOf = array_default_default.lastIndexOf; -wrapperLodash_default.lowerCase = string_default_default.lowerCase; -wrapperLodash_default.lowerFirst = string_default_default.lowerFirst; -wrapperLodash_default.lt = lang_default_default.lt; -wrapperLodash_default.lte = lang_default_default.lte; -wrapperLodash_default.max = math_default_default.max; -wrapperLodash_default.maxBy = math_default_default.maxBy; -wrapperLodash_default.mean = math_default_default.mean; -wrapperLodash_default.meanBy = math_default_default.meanBy; -wrapperLodash_default.min = math_default_default.min; -wrapperLodash_default.minBy = math_default_default.minBy; -wrapperLodash_default.stubArray = util_default_default.stubArray; -wrapperLodash_default.stubFalse = util_default_default.stubFalse; -wrapperLodash_default.stubObject = util_default_default.stubObject; -wrapperLodash_default.stubString = util_default_default.stubString; -wrapperLodash_default.stubTrue = util_default_default.stubTrue; -wrapperLodash_default.multiply = math_default_default.multiply; -wrapperLodash_default.nth = array_default_default.nth; -wrapperLodash_default.noop = util_default_default.noop; -wrapperLodash_default.now = date_default_default.now; -wrapperLodash_default.pad = string_default_default.pad; -wrapperLodash_default.padEnd = string_default_default.padEnd; -wrapperLodash_default.padStart = string_default_default.padStart; -wrapperLodash_default.parseInt = string_default_default.parseInt; -wrapperLodash_default.random = number_default_default.random; -wrapperLodash_default.reduce = collection_default_default.reduce; -wrapperLodash_default.reduceRight = collection_default_default.reduceRight; -wrapperLodash_default.repeat = string_default_default.repeat; -wrapperLodash_default.replace = string_default_default.replace; -wrapperLodash_default.result = object_default_default.result; -wrapperLodash_default.round = math_default_default.round; -wrapperLodash_default.sample = collection_default_default.sample; -wrapperLodash_default.size = collection_default_default.size; -wrapperLodash_default.snakeCase = string_default_default.snakeCase; -wrapperLodash_default.some = collection_default_default.some; -wrapperLodash_default.sortedIndex = array_default_default.sortedIndex; -wrapperLodash_default.sortedIndexBy = array_default_default.sortedIndexBy; -wrapperLodash_default.sortedIndexOf = array_default_default.sortedIndexOf; -wrapperLodash_default.sortedLastIndex = array_default_default.sortedLastIndex; -wrapperLodash_default.sortedLastIndexBy = array_default_default.sortedLastIndexBy; -wrapperLodash_default.sortedLastIndexOf = array_default_default.sortedLastIndexOf; -wrapperLodash_default.startCase = string_default_default.startCase; -wrapperLodash_default.startsWith = string_default_default.startsWith; -wrapperLodash_default.subtract = math_default_default.subtract; -wrapperLodash_default.sum = math_default_default.sum; -wrapperLodash_default.sumBy = math_default_default.sumBy; -wrapperLodash_default.template = string_default_default.template; -wrapperLodash_default.times = util_default_default.times; -wrapperLodash_default.toFinite = lang_default_default.toFinite; -wrapperLodash_default.toInteger = toInteger_default; -wrapperLodash_default.toLength = lang_default_default.toLength; -wrapperLodash_default.toLower = string_default_default.toLower; -wrapperLodash_default.toNumber = lang_default_default.toNumber; -wrapperLodash_default.toSafeInteger = lang_default_default.toSafeInteger; -wrapperLodash_default.toString = lang_default_default.toString; -wrapperLodash_default.toUpper = string_default_default.toUpper; -wrapperLodash_default.trim = string_default_default.trim; -wrapperLodash_default.trimEnd = string_default_default.trimEnd; -wrapperLodash_default.trimStart = string_default_default.trimStart; -wrapperLodash_default.truncate = string_default_default.truncate; -wrapperLodash_default.unescape = string_default_default.unescape; -wrapperLodash_default.uniqueId = util_default_default.uniqueId; -wrapperLodash_default.upperCase = string_default_default.upperCase; -wrapperLodash_default.upperFirst = string_default_default.upperFirst; -wrapperLodash_default.each = collection_default_default.forEach; -wrapperLodash_default.eachRight = collection_default_default.forEachRight; -wrapperLodash_default.first = array_default_default.head; -mixin2(wrapperLodash_default, function() { - var source = {}; - baseForOwn_default(wrapperLodash_default, function(func, methodName) { - if (!hasOwnProperty26.call(wrapperLodash_default.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; -}(), { "chain": false }); -wrapperLodash_default.VERSION = VERSION; -(wrapperLodash_default.templateSettings = string_default_default.templateSettings).imports._ = wrapperLodash_default; -arrayEach_default(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) { - wrapperLodash_default[methodName].placeholder = wrapperLodash_default; -}); -arrayEach_default(["drop", "take"], function(methodName, index) { - LazyWrapper_default.prototype[methodName] = function(n) { - n = n === void 0 ? 1 : nativeMax17(toInteger_default(n), 0); - var result2 = this.__filtered__ && !index ? new LazyWrapper_default(this) : this.clone(); - if (result2.__filtered__) { - result2.__takeCount__ = nativeMin15(n, result2.__takeCount__); - } else { - result2.__views__.push({ - "size": nativeMin15(n, MAX_ARRAY_LENGTH7), - "type": methodName + (result2.__dir__ < 0 ? "Right" : "") - }); - } - return result2; - }; - LazyWrapper_default.prototype[methodName + "Right"] = function(n) { - return this.reverse()[methodName](n).reverse(); - }; -}); -arrayEach_default(["filter", "map", "takeWhile"], function(methodName, index) { - var type4 = index + 1, isFilter = type4 == LAZY_FILTER_FLAG2 || type4 == LAZY_WHILE_FLAG; - LazyWrapper_default.prototype[methodName] = function(iteratee2) { - var result2 = this.clone(); - result2.__iteratees__.push({ - "iteratee": baseIteratee_default(iteratee2, 3), - "type": type4 - }); - result2.__filtered__ = result2.__filtered__ || isFilter; - return result2; - }; -}); -arrayEach_default(["head", "last"], function(methodName, index) { - var takeName = "take" + (index ? "Right" : ""); - LazyWrapper_default.prototype[methodName] = function() { - return this[takeName](1).value()[0]; - }; -}); -arrayEach_default(["initial", "tail"], function(methodName, index) { - var dropName = "drop" + (index ? "" : "Right"); - LazyWrapper_default.prototype[methodName] = function() { - return this.__filtered__ ? new LazyWrapper_default(this) : this[dropName](1); - }; -}); -LazyWrapper_default.prototype.compact = function() { - return this.filter(identity_default); -}; -LazyWrapper_default.prototype.find = function(predicate) { - return this.filter(predicate).head(); -}; -LazyWrapper_default.prototype.findLast = function(predicate) { - return this.reverse().find(predicate); -}; -LazyWrapper_default.prototype.invokeMap = baseRest_default(function(path, args) { - if (typeof path == "function") { - return new LazyWrapper_default(this); - } - return this.map(function(value) { - return baseInvoke_default(value, path, args); - }); -}); -LazyWrapper_default.prototype.reject = function(predicate) { - return this.filter(negate_default(baseIteratee_default(predicate))); -}; -LazyWrapper_default.prototype.slice = function(start, end) { - start = toInteger_default(start); - var result2 = this; - if (result2.__filtered__ && (start > 0 || end < 0)) { - return new LazyWrapper_default(result2); - } - if (start < 0) { - result2 = result2.takeRight(-start); - } else if (start) { - result2 = result2.drop(start); - } - if (end !== void 0) { - end = toInteger_default(end); - result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start); - } - return result2; -}; -LazyWrapper_default.prototype.takeRightWhile = function(predicate) { - return this.reverse().takeWhile(predicate).reverse(); -}; -LazyWrapper_default.prototype.toArray = function() { - return this.take(MAX_ARRAY_LENGTH7); -}; -baseForOwn_default(LazyWrapper_default.prototype, function(func, methodName) { - var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = wrapperLodash_default[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName); - if (!lodashFunc) { - return; - } - wrapperLodash_default.prototype[methodName] = function() { - var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper_default, iteratee2 = args[0], useLazy = isLazy || isArray_default(value); - var interceptor = function(value2) { - var result3 = lodashFunc.apply(wrapperLodash_default, arrayPush_default([value2], args)); - return isTaker && chainAll ? result3[0] : result3; - }; - if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) { - isLazy = useLazy = false; - } - var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; - if (!retUnwrapped && useLazy) { - value = onlyLazy ? value : new LazyWrapper_default(this); - var result2 = func.apply(value, args); - result2.__actions__.push({ "func": thru_default, "args": [interceptor], "thisArg": void 0 }); - return new LodashWrapper_default(result2, chainAll); - } - if (isUnwrapped && onlyLazy) { - return func.apply(this, args); - } - result2 = this.thru(interceptor); - return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2; - }; -}); -arrayEach_default(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) { - var func = arrayProto6[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName); - wrapperLodash_default.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray_default(value) ? value : [], args); - } - return this[chainName](function(value2) { - return func.apply(isArray_default(value2) ? value2 : [], args); - }); - }; -}); -baseForOwn_default(LazyWrapper_default.prototype, function(func, methodName) { - var lodashFunc = wrapperLodash_default[methodName]; - if (lodashFunc) { - var key = lodashFunc.name + ""; - if (!hasOwnProperty26.call(realNames_default, key)) { - realNames_default[key] = []; - } - realNames_default[key].push({ "name": methodName, "func": lodashFunc }); - } -}); -realNames_default[createHybrid_default(void 0, WRAP_BIND_KEY_FLAG7).name] = [{ - "name": "wrapper", - "func": void 0 -}]; -LazyWrapper_default.prototype.clone = lazyClone_default; -LazyWrapper_default.prototype.reverse = lazyReverse_default; -LazyWrapper_default.prototype.value = lazyValue_default; -wrapperLodash_default.prototype.at = seq_default_default.at; -wrapperLodash_default.prototype.chain = seq_default_default.wrapperChain; -wrapperLodash_default.prototype.commit = seq_default_default.commit; -wrapperLodash_default.prototype.next = seq_default_default.next; -wrapperLodash_default.prototype.plant = seq_default_default.plant; -wrapperLodash_default.prototype.reverse = seq_default_default.reverse; -wrapperLodash_default.prototype.toJSON = wrapperLodash_default.prototype.valueOf = wrapperLodash_default.prototype.value = seq_default_default.value; -wrapperLodash_default.prototype.first = wrapperLodash_default.prototype.head; -if (symIterator2) { - wrapperLodash_default.prototype[symIterator2] = seq_default_default.toIterator; -} - -// node_modules/element-plus/es/utils/types.mjs -var isUndefined2 = (val) => val === void 0; -var isBoolean2 = (val) => typeof val === "boolean"; -var isNumber2 = (val) => typeof val === "number"; -var isEmpty2 = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length; -var isElement2 = (e) => { - if (typeof Element === "undefined") - return false; - return e instanceof Element; -}; -var isPropAbsent = (prop) => isNil_default(prop); -var isStringNumber = (val) => { - if (!isString(val)) { - return false; - } - return !Number.isNaN(Number(val)); -}; -var isWindow = (val) => val === window; - -// node_modules/@vueuse/shared/index.mjs -function computedEager(fn2, options) { - var _a; - const result2 = shallowRef(); - watchEffect(() => { - result2.value = fn2(); - }, { - ...options, - flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync" - }); - return readonly(result2); -} -function tryOnScopeDispose(fn2) { - if (getCurrentScope()) { - onScopeDispose(fn2); - return true; - } - return false; -} -function toValue(r) { - return typeof r === "function" ? r() : unref(r); -} -function toReactive(objectRef) { - if (!isRef(objectRef)) - return reactive(objectRef); - const proxy = new Proxy({}, { - get(_2, p2, receiver) { - return unref(Reflect.get(objectRef.value, p2, receiver)); - }, - set(_2, p2, value) { - if (isRef(objectRef.value[p2]) && !isRef(value)) - objectRef.value[p2].value = value; - else - objectRef.value[p2] = value; - return true; - }, - deleteProperty(_2, p2) { - return Reflect.deleteProperty(objectRef.value, p2); - }, - has(_2, p2) { - return Reflect.has(objectRef.value, p2); - }, - ownKeys() { - return Object.keys(objectRef.value); - }, - getOwnPropertyDescriptor() { - return { - enumerable: true, - configurable: true - }; - } - }); - return reactive(proxy); -} -function reactiveComputed(fn2) { - return toReactive(computed(fn2)); -} -var isClient = typeof window !== "undefined" && typeof document !== "undefined"; -var isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; -var isDef = (val) => typeof val !== "undefined"; -var notNullish = (val) => val != null; -var toString2 = Object.prototype.toString; -var isObject3 = (val) => toString2.call(val) === "[object Object]"; -var clamp2 = (n, min4, max4) => Math.min(max4, Math.max(min4, n)); -var noop2 = () => { -}; -var isIOS = getIsIOS(); -function getIsIOS() { - var _a, _b; - return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent)); -} -function createFilterWrapper(filter2, fn2) { - function wrapper(...args) { - return new Promise((resolve, reject2) => { - Promise.resolve(filter2(() => fn2.apply(this, args), { fn: fn2, thisArg: this, args })).then(resolve).catch(reject2); - }); - } - return wrapper; -} -function debounceFilter(ms, options = {}) { - let timer; - let maxTimer; - let lastRejector = noop2; - const _clearTimeout = (timer2) => { - clearTimeout(timer2); - lastRejector(); - lastRejector = noop2; - }; - const filter2 = (invoke2) => { - const duration = toValue(ms); - const maxDuration = toValue(options.maxWait); - if (timer) - _clearTimeout(timer); - if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) { - if (maxTimer) { - _clearTimeout(maxTimer); - maxTimer = null; - } - return Promise.resolve(invoke2()); - } - return new Promise((resolve, reject2) => { - lastRejector = options.rejectOnCancel ? reject2 : resolve; - if (maxDuration && !maxTimer) { - maxTimer = setTimeout(() => { - if (timer) - _clearTimeout(timer); - maxTimer = null; - resolve(invoke2()); - }, maxDuration); - } - timer = setTimeout(() => { - if (maxTimer) - _clearTimeout(maxTimer); - maxTimer = null; - resolve(invoke2()); - }, duration); - }); - }; - return filter2; -} -function throttleFilter(...args) { - let lastExec = 0; - let timer; - let isLeading = true; - let lastRejector = noop2; - let lastValue; - let ms; - let trailing; - let leading; - let rejectOnCancel; - if (!isRef(args[0]) && typeof args[0] === "object") - ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]); - else - [ms, trailing = true, leading = true, rejectOnCancel = false] = args; - const clear = () => { - if (timer) { - clearTimeout(timer); - timer = void 0; - lastRejector(); - lastRejector = noop2; - } - }; - const filter2 = (_invoke) => { - const duration = toValue(ms); - const elapsed = Date.now() - lastExec; - const invoke2 = () => { - return lastValue = _invoke(); - }; - clear(); - if (duration <= 0) { - lastExec = Date.now(); - return invoke2(); - } - if (elapsed > duration && (leading || !isLeading)) { - lastExec = Date.now(); - invoke2(); - } else if (trailing) { - lastValue = new Promise((resolve, reject2) => { - lastRejector = rejectOnCancel ? reject2 : resolve; - timer = setTimeout(() => { - lastExec = Date.now(); - isLeading = true; - resolve(invoke2()); - clear(); - }, Math.max(0, duration - elapsed)); - }); - } - if (!leading && !timer) - timer = setTimeout(() => isLeading = true, duration); - isLeading = false; - return lastValue; - }; - return filter2; -} -function cacheStringFunction(fn2) { - const cache2 = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache2[str]; - return hit || (cache2[str] = fn2(str)); - }; -} -var hyphenateRE = /\B([A-Z])/g; -var hyphenate2 = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); -var camelizeRE = /-(\w)/g; -var camelize2 = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_2, c2) => c2 ? c2.toUpperCase() : ""); -}); -function identity2(arg) { - return arg; -} -function getLifeCycleTarget(target2) { - return target2 || getCurrentInstance(); -} -function useDebounceFn(fn2, ms = 200, options = {}) { - return createFilterWrapper( - debounceFilter(ms, options), - fn2 - ); -} -function refDebounced(value, ms = 200, options = {}) { - const debounced = ref(value.value); - const updater = useDebounceFn(() => { - debounced.value = value.value; - }, ms, options); - watch(value, () => updater()); - return debounced; -} -function useThrottleFn(fn2, ms = 200, trailing = false, leading = true, rejectOnCancel = false) { - return createFilterWrapper( - throttleFilter(ms, trailing, leading, rejectOnCancel), - fn2 - ); -} -function tryOnMounted(fn2, sync = true, target2) { - const instance = getLifeCycleTarget(); - if (instance) - onMounted(fn2, target2); - else if (sync) - fn2(); - else - nextTick(fn2); -} -function useTimeoutFn(cb, interval, options = {}) { - const { - immediate = true - } = options; - const isPending = ref(false); - let timer = null; - function clear() { - if (timer) { - clearTimeout(timer); - timer = null; - } - } - function stop() { - isPending.value = false; - clear(); - } - function start(...args) { - clear(); - isPending.value = true; - timer = setTimeout(() => { - isPending.value = false; - timer = null; - cb(...args); - }, toValue(interval)); - } - if (immediate) { - isPending.value = true; - if (isClient) - start(); - } - tryOnScopeDispose(stop); - return { - isPending: readonly(isPending), - start, - stop - }; -} - -// node_modules/@vueuse/core/index.mjs -function unrefElement(elRef) { - var _a; - const plain = toValue(elRef); - return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain; -} -var defaultWindow = isClient ? window : void 0; -var defaultDocument = isClient ? window.document : void 0; -var defaultNavigator = isClient ? window.navigator : void 0; -var defaultLocation = isClient ? window.location : void 0; -function useEventListener(...args) { - let target2; - let events; - let listeners; - let options; - if (typeof args[0] === "string" || Array.isArray(args[0])) { - [events, listeners, options] = args; - target2 = defaultWindow; - } else { - [target2, events, listeners, options] = args; - } - if (!target2) - return noop2; - if (!Array.isArray(events)) - events = [events]; - if (!Array.isArray(listeners)) - listeners = [listeners]; - const cleanups = []; - const cleanup = () => { - cleanups.forEach((fn2) => fn2()); - cleanups.length = 0; - }; - const register2 = (el, event, listener, options2) => { - el.addEventListener(event, listener, options2); - return () => el.removeEventListener(event, listener, options2); - }; - const stopWatch = watch( - () => [unrefElement(target2), toValue(options)], - ([el, options2]) => { - cleanup(); - if (!el) - return; - const optionsClone = isObject3(options2) ? { ...options2 } : options2; - cleanups.push( - ...events.flatMap((event) => { - return listeners.map((listener) => register2(el, event, listener, optionsClone)); - }) - ); - }, - { immediate: true, flush: "post" } - ); - const stop = () => { - stopWatch(); - cleanup(); - }; - tryOnScopeDispose(stop); - return stop; -} -var _iOSWorkaround = false; -function onClickOutside(target2, handler, options = {}) { - const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options; - if (!window2) - return noop2; - if (isIOS && !_iOSWorkaround) { - _iOSWorkaround = true; - Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop2)); - window2.document.documentElement.addEventListener("click", noop2); - } - let shouldListen = true; - const shouldIgnore = (event) => { - return ignore.some((target22) => { - if (typeof target22 === "string") { - return Array.from(window2.document.querySelectorAll(target22)).some((el) => el === event.target || event.composedPath().includes(el)); - } else { - const el = unrefElement(target22); - return el && (event.target === el || event.composedPath().includes(el)); - } - }); - }; - const listener = (event) => { - const el = unrefElement(target2); - if (!el || el === event.target || event.composedPath().includes(el)) - return; - if (event.detail === 0) - shouldListen = !shouldIgnore(event); - if (!shouldListen) { - shouldListen = true; - return; - } - handler(event); - }; - const cleanup = [ - useEventListener(window2, "click", listener, { passive: true, capture }), - useEventListener(window2, "pointerdown", (e) => { - const el = unrefElement(target2); - shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el)); - }, { passive: true }), - detectIframe && useEventListener(window2, "blur", (event) => { - setTimeout(() => { - var _a; - const el = unrefElement(target2); - if (((_a = window2.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement))) { - handler(event); - } - }, 0); - }) - ].filter(Boolean); - const stop = () => cleanup.forEach((fn2) => fn2()); - return stop; -} -function useMounted() { - const isMounted = ref(false); - const instance = getCurrentInstance(); - if (instance) { - onMounted(() => { - isMounted.value = true; - }, isVue2 ? void 0 : instance); - } - return isMounted; -} -function useSupported(callback) { - const isMounted = useMounted(); - return computed(() => { - isMounted.value; - return Boolean(callback()); - }); -} -function useMutationObserver(target2, callback, options = {}) { - const { window: window2 = defaultWindow, ...mutationOptions } = options; - let observer; - const isSupported = useSupported(() => window2 && "MutationObserver" in window2); - const cleanup = () => { - if (observer) { - observer.disconnect(); - observer = void 0; - } - }; - const targets = computed(() => { - const value = toValue(target2); - const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish); - return new Set(items); - }); - const stopWatch = watch( - () => targets.value, - (targets2) => { - cleanup(); - if (isSupported.value && targets2.size) { - observer = new MutationObserver(callback); - targets2.forEach((el) => observer.observe(el, mutationOptions)); - } - }, - { immediate: true, flush: "post" } - ); - const takeRecords = () => { - return observer == null ? void 0 : observer.takeRecords(); - }; - const stop = () => { - cleanup(); - stopWatch(); - }; - tryOnScopeDispose(stop); - return { - isSupported, - stop, - takeRecords - }; -} -function useActiveElement(options = {}) { - var _a; - const { - window: window2 = defaultWindow, - deep = true, - triggerOnRemoval = false - } = options; - const document2 = (_a = options.document) != null ? _a : window2 == null ? void 0 : window2.document; - const getDeepActiveElement = () => { - var _a2; - let element = document2 == null ? void 0 : document2.activeElement; - if (deep) { - while (element == null ? void 0 : element.shadowRoot) - element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement; - } - return element; - }; - const activeElement = ref(); - const trigger = () => { - activeElement.value = getDeepActiveElement(); - }; - if (window2) { - useEventListener(window2, "blur", (event) => { - if (event.relatedTarget !== null) - return; - trigger(); - }, true); - useEventListener(window2, "focus", trigger, true); - } - if (triggerOnRemoval) { - useMutationObserver(document2, (mutations) => { - mutations.filter((m2) => m2.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => { - if (node === activeElement.value) - trigger(); - }); - }, { - childList: true, - subtree: true - }); - } - trigger(); - return activeElement; -} -function useMediaQuery(query, options = {}) { - const { window: window2 = defaultWindow } = options; - const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function"); - let mediaQuery; - const matches2 = ref(false); - const handler = (event) => { - matches2.value = event.matches; - }; - const cleanup = () => { - if (!mediaQuery) - return; - if ("removeEventListener" in mediaQuery) - mediaQuery.removeEventListener("change", handler); - else - mediaQuery.removeListener(handler); - }; - const stopWatch = watchEffect(() => { - if (!isSupported.value) - return; - cleanup(); - mediaQuery = window2.matchMedia(toValue(query)); - if ("addEventListener" in mediaQuery) - mediaQuery.addEventListener("change", handler); - else - mediaQuery.addListener(handler); - matches2.value = mediaQuery.matches; - }); - tryOnScopeDispose(() => { - stopWatch(); - cleanup(); - mediaQuery = void 0; - }); - return matches2; -} -function cloneFnJSON(source) { - return JSON.parse(JSON.stringify(source)); -} -var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; -var globalKey = "__vueuse_ssr_handlers__"; -var handlers = getHandlers(); -function getHandlers() { - if (!(globalKey in _global)) - _global[globalKey] = _global[globalKey] || {}; - return _global[globalKey]; -} -function useCssVar(prop, target2, options = {}) { - const { window: window2 = defaultWindow, initialValue = "", observe = false } = options; - const variable = ref(initialValue); - const elRef = computed(() => { - var _a; - return unrefElement(target2) || ((_a = window2 == null ? void 0 : window2.document) == null ? void 0 : _a.documentElement); - }); - function updateCssVar() { - var _a; - const key = toValue(prop); - const el = toValue(elRef); - if (el && window2) { - const value = (_a = window2.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim(); - variable.value = value || initialValue; - } - } - if (observe) { - useMutationObserver(elRef, updateCssVar, { - attributeFilter: ["style", "class"], - window: window2 - }); - } - watch( - [elRef, () => toValue(prop)], - updateCssVar, - { immediate: true } - ); - watch( - variable, - (val) => { - var _a; - if ((_a = elRef.value) == null ? void 0 : _a.style) - elRef.value.style.setProperty(toValue(prop), val); - } - ); - return variable; -} -function useDocumentVisibility(options = {}) { - const { document: document2 = defaultDocument } = options; - if (!document2) - return ref("visible"); - const visibility = ref(document2.visibilityState); - useEventListener(document2, "visibilitychange", () => { - visibility.value = document2.visibilityState; - }); - return visibility; -} -function useResizeObserver(target2, callback, options = {}) { - const { window: window2 = defaultWindow, ...observerOptions } = options; - let observer; - const isSupported = useSupported(() => window2 && "ResizeObserver" in window2); - const cleanup = () => { - if (observer) { - observer.disconnect(); - observer = void 0; - } - }; - const targets = computed(() => Array.isArray(target2) ? target2.map((el) => unrefElement(el)) : [unrefElement(target2)]); - const stopWatch = watch( - targets, - (els) => { - cleanup(); - if (isSupported.value && window2) { - observer = new ResizeObserver(callback); - for (const _el of els) - _el && observer.observe(_el, observerOptions); - } - }, - { immediate: true, flush: "post" } - ); - const stop = () => { - cleanup(); - stopWatch(); - }; - tryOnScopeDispose(stop); - return { - isSupported, - stop - }; -} -function useElementBounding(target2, options = {}) { - const { - reset = true, - windowResize = true, - windowScroll = true, - immediate = true - } = options; - const height = ref(0); - const bottom = ref(0); - const left = ref(0); - const right = ref(0); - const top = ref(0); - const width = ref(0); - const x2 = ref(0); - const y = ref(0); - function update2() { - const el = unrefElement(target2); - if (!el) { - if (reset) { - height.value = 0; - bottom.value = 0; - left.value = 0; - right.value = 0; - top.value = 0; - width.value = 0; - x2.value = 0; - y.value = 0; - } - return; - } - const rect = el.getBoundingClientRect(); - height.value = rect.height; - bottom.value = rect.bottom; - left.value = rect.left; - right.value = rect.right; - top.value = rect.top; - width.value = rect.width; - x2.value = rect.x; - y.value = rect.y; - } - useResizeObserver(target2, update2); - watch(() => unrefElement(target2), (ele) => !ele && update2()); - useMutationObserver(target2, update2, { - attributeFilter: ["style", "class"] - }); - if (windowScroll) - useEventListener("scroll", update2, { capture: true, passive: true }); - if (windowResize) - useEventListener("resize", update2, { passive: true }); - tryOnMounted(() => { - if (immediate) - update2(); - }); - return { - height, - bottom, - left, - right, - top, - width, - x: x2, - y, - update: update2 - }; -} -function useElementSize(target2, initialSize = { width: 0, height: 0 }, options = {}) { - const { window: window2 = defaultWindow, box = "content-box" } = options; - const isSVG = computed(() => { - var _a, _b; - return (_b = (_a = unrefElement(target2)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg"); - }); - const width = ref(initialSize.width); - const height = ref(initialSize.height); - const { stop: stop1 } = useResizeObserver( - target2, - ([entry]) => { - const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize; - if (window2 && isSVG.value) { - const $elem = unrefElement(target2); - if ($elem) { - const rect = $elem.getBoundingClientRect(); - width.value = rect.width; - height.value = rect.height; - } - } else { - if (boxSize) { - const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize]; - width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0); - height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0); - } else { - width.value = entry.contentRect.width; - height.value = entry.contentRect.height; - } - } - }, - options - ); - tryOnMounted(() => { - const ele = unrefElement(target2); - if (ele) { - width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width; - height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height; - } - }); - const stop2 = watch( - () => unrefElement(target2), - (ele) => { - width.value = ele ? initialSize.width : 0; - height.value = ele ? initialSize.height : 0; - } - ); - function stop() { - stop1(); - stop2(); - } - return { - width, - height, - stop - }; -} -function useIntersectionObserver(target2, callback, options = {}) { - const { - root: root2, - rootMargin = "0px", - threshold = 0.1, - window: window2 = defaultWindow, - immediate = true - } = options; - const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2); - const targets = computed(() => { - const _target = toValue(target2); - return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish); - }); - let cleanup = noop2; - const isActive = ref(immediate); - const stopWatch = isSupported.value ? watch( - () => [targets.value, unrefElement(root2), isActive.value], - ([targets2, root22]) => { - cleanup(); - if (!isActive.value) - return; - if (!targets2.length) - return; - const observer = new IntersectionObserver( - callback, - { - root: unrefElement(root22), - rootMargin, - threshold - } - ); - targets2.forEach((el) => el && observer.observe(el)); - cleanup = () => { - observer.disconnect(); - cleanup = noop2; - }; - }, - { immediate, flush: "post" } - ) : noop2; - const stop = () => { - cleanup(); - stopWatch(); - isActive.value = false; - }; - tryOnScopeDispose(stop); - return { - isSupported, - isActive, - pause() { - cleanup(); - isActive.value = false; - }, - resume() { - isActive.value = true; - }, - stop - }; -} -var defaultState = { - x: 0, - y: 0, - pointerId: 0, - pressure: 0, - tiltX: 0, - tiltY: 0, - width: 0, - height: 0, - twist: 0, - pointerType: null -}; -var keys2 = Object.keys(defaultState); -var DEFAULT_UNITS = [ - { max: 6e4, value: 1e3, name: "second" }, - { max: 276e4, value: 6e4, name: "minute" }, - { max: 72e6, value: 36e5, name: "hour" }, - { max: 5184e5, value: 864e5, name: "day" }, - { max: 24192e5, value: 6048e5, name: "week" }, - { max: 28512e6, value: 2592e6, name: "month" }, - { max: Number.POSITIVE_INFINITY, value: 31536e6, name: "year" } -]; -var _TransitionPresets = { - easeInSine: [0.12, 0, 0.39, 0], - easeOutSine: [0.61, 1, 0.88, 1], - easeInOutSine: [0.37, 0, 0.63, 1], - easeInQuad: [0.11, 0, 0.5, 0], - easeOutQuad: [0.5, 1, 0.89, 1], - easeInOutQuad: [0.45, 0, 0.55, 1], - easeInCubic: [0.32, 0, 0.67, 0], - easeOutCubic: [0.33, 1, 0.68, 1], - easeInOutCubic: [0.65, 0, 0.35, 1], - easeInQuart: [0.5, 0, 0.75, 0], - easeOutQuart: [0.25, 1, 0.5, 1], - easeInOutQuart: [0.76, 0, 0.24, 1], - easeInQuint: [0.64, 0, 0.78, 0], - easeOutQuint: [0.22, 1, 0.36, 1], - easeInOutQuint: [0.83, 0, 0.17, 1], - easeInExpo: [0.7, 0, 0.84, 0], - easeOutExpo: [0.16, 1, 0.3, 1], - easeInOutExpo: [0.87, 0, 0.13, 1], - easeInCirc: [0.55, 0, 1, 0.45], - easeOutCirc: [0, 0.55, 0.45, 1], - easeInOutCirc: [0.85, 0, 0.15, 1], - easeInBack: [0.36, 0, 0.66, -0.56], - easeOutBack: [0.34, 1.56, 0.64, 1], - easeInOutBack: [0.68, -0.6, 0.32, 1.6] -}; -var TransitionPresets = Object.assign({}, { linear: identity2 }, _TransitionPresets); -function useVModel(props2, key, emit, options = {}) { - var _a, _b, _c, _d, _e; - const { - clone: clone2 = false, - passive = false, - eventName, - deep = false, - defaultValue, - shouldEmit - } = options; - const vm = getCurrentInstance(); - const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy)); - let event = eventName; - if (!key) { - if (isVue2) { - const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model; - key = (modelOptions == null ? void 0 : modelOptions.value) || "value"; - if (!eventName) - event = (modelOptions == null ? void 0 : modelOptions.event) || "input"; - } else { - key = "modelValue"; - } - } - event = event || `update:${key.toString()}`; - const cloneFn = (val) => !clone2 ? val : typeof clone2 === "function" ? clone2(val) : cloneFnJSON(val); - const getValue3 = () => isDef(props2[key]) ? cloneFn(props2[key]) : defaultValue; - const triggerEmit = (value) => { - if (shouldEmit) { - if (shouldEmit(value)) - _emit(event, value); - } else { - _emit(event, value); - } - }; - if (passive) { - const initialValue = getValue3(); - const proxy = ref(initialValue); - let isUpdating = false; - watch( - () => props2[key], - (v2) => { - if (!isUpdating) { - isUpdating = true; - proxy.value = cloneFn(v2); - nextTick(() => isUpdating = false); - } - } - ); - watch( - proxy, - (v2) => { - if (!isUpdating && (v2 !== props2[key] || deep)) - triggerEmit(v2); - }, - { deep } - ); - return proxy; - } else { - return computed({ - get() { - return getValue3(); - }, - set(value) { - triggerEmit(value); - } - }); - } -} -function useWindowFocus(options = {}) { - const { window: window2 = defaultWindow } = options; - if (!window2) - return ref(false); - const focused = ref(window2.document.hasFocus()); - useEventListener(window2, "blur", () => { - focused.value = false; - }); - useEventListener(window2, "focus", () => { - focused.value = true; - }); - return focused; -} -function useWindowSize(options = {}) { - const { - window: window2 = defaultWindow, - initialWidth = Number.POSITIVE_INFINITY, - initialHeight = Number.POSITIVE_INFINITY, - listenOrientation = true, - includeScrollbar = true - } = options; - const width = ref(initialWidth); - const height = ref(initialHeight); - const update2 = () => { - if (window2) { - if (includeScrollbar) { - width.value = window2.innerWidth; - height.value = window2.innerHeight; - } else { - width.value = window2.document.documentElement.clientWidth; - height.value = window2.document.documentElement.clientHeight; - } - } - }; - update2(); - tryOnMounted(update2); - useEventListener("resize", update2, { passive: true }); - if (listenOrientation) { - const matches2 = useMediaQuery("(orientation: portrait)"); - watch(matches2, () => update2()); - } - return { width, height }; -} - -// node_modules/element-plus/es/utils/error.mjs -var ElementPlusError = class extends Error { - constructor(m2) { - super(m2); - this.name = "ElementPlusError"; - } -}; -function throwError(scope, m2) { - throw new ElementPlusError(`[${scope}] ${m2}`); -} -function debugWarn(scope, message2) { - if (true) { - const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message2}`) : scope; - console.warn(error); - } -} - -// node_modules/element-plus/es/hooks/use-z-index/index.mjs -var initial2 = { - current: 0 -}; -var zIndex = ref(0); -var defaultInitialZIndex = 2e3; -var ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey"); -var zIndexContextKey = Symbol("zIndexContextKey"); -var useZIndex = (zIndexOverrides) => { - const increasingInjection = getCurrentInstance() ? inject(ZINDEX_INJECTION_KEY, initial2) : initial2; - const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0); - const initialZIndex = computed(() => { - const zIndexFromInjection = unref(zIndexInjection); - return isNumber2(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex; - }); - const currentZIndex = computed(() => initialZIndex.value + zIndex.value); - const nextZIndex = () => { - increasingInjection.current++; - zIndex.value = increasingInjection.current; - return currentZIndex.value; - }; - if (!isClient && !inject(ZINDEX_INJECTION_KEY)) { - debugWarn( - "ZIndexInjection", - `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed -usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })` - ); - } - return { - initialZIndex, - currentZIndex, - nextZIndex - }; -}; - -// node_modules/element-plus/es/locale/lang/en.mjs -var English = { - name: "en", - el: { - breadcrumb: { - label: "Breadcrumb" - }, - colorpicker: { - confirm: "OK", - clear: "Clear", - defaultLabel: "color picker", - description: "current color is {color}. press enter to select a new color.", - alphaLabel: "pick alpha value", - alphaDescription: "alpha {alpha}, current color is {color}", - hueLabel: "pick hue value", - hueDescription: "hue {hue}, current color is {color}", - svLabel: "pick saturation and brightness value", - svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}", - predefineDescription: "select {value} as the color" - }, - datepicker: { - now: "Now", - today: "Today", - cancel: "Cancel", - clear: "Clear", - confirm: "OK", - dateTablePrompt: "Use the arrow keys and enter to select the day of the month", - monthTablePrompt: "Use the arrow keys and enter to select the month", - yearTablePrompt: "Use the arrow keys and enter to select the year", - selectedDate: "Selected date", - selectDate: "Select date", - selectTime: "Select time", - startDate: "Start Date", - startTime: "Start Time", - endDate: "End Date", - endTime: "End Time", - prevYear: "Previous Year", - nextYear: "Next Year", - prevMonth: "Previous Month", - nextMonth: "Next Month", - year: "", - month1: "January", - month2: "February", - month3: "March", - month4: "April", - month5: "May", - month6: "June", - month7: "July", - month8: "August", - month9: "September", - month10: "October", - month11: "November", - month12: "December", - weeks: { - sun: "Sun", - mon: "Mon", - tue: "Tue", - wed: "Wed", - thu: "Thu", - fri: "Fri", - sat: "Sat" - }, - weeksFull: { - sun: "Sunday", - mon: "Monday", - tue: "Tuesday", - wed: "Wednesday", - thu: "Thursday", - fri: "Friday", - sat: "Saturday" - }, - months: { - jan: "Jan", - feb: "Feb", - mar: "Mar", - apr: "Apr", - may: "May", - jun: "Jun", - jul: "Jul", - aug: "Aug", - sep: "Sep", - oct: "Oct", - nov: "Nov", - dec: "Dec" - } - }, - inputNumber: { - decrease: "decrease number", - increase: "increase number" - }, - select: { - loading: "Loading", - noMatch: "No matching data", - noData: "No data", - placeholder: "Select" - }, - mention: { - loading: "Loading" - }, - dropdown: { - toggleDropdown: "Toggle Dropdown" - }, - cascader: { - noMatch: "No matching data", - loading: "Loading", - placeholder: "Select", - noData: "No data" - }, - pagination: { - goto: "Go to", - pagesize: "/page", - total: "Total {total}", - pageClassifier: "", - page: "Page", - prev: "Go to previous page", - next: "Go to next page", - currentPage: "page {pager}", - prevPages: "Previous {pager} pages", - nextPages: "Next {pager} pages", - deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details" - }, - dialog: { - close: "Close this dialog" - }, - drawer: { - close: "Close this dialog" - }, - messagebox: { - title: "Message", - confirm: "OK", - cancel: "Cancel", - error: "Illegal input", - close: "Close this dialog" - }, - upload: { - deleteTip: "press delete to remove", - delete: "Delete", - preview: "Preview", - continue: "Continue" - }, - slider: { - defaultLabel: "slider between {min} and {max}", - defaultRangeStartLabel: "pick start value", - defaultRangeEndLabel: "pick end value" - }, - table: { - emptyText: "No Data", - confirmFilter: "Confirm", - resetFilter: "Reset", - clearFilter: "All", - sumText: "Sum", - selectAllLabel: "Select all rows", - selectRowLabel: "Select this row", - expandRowLabel: "Expand this row", - collapseRowLabel: "Collapse this row", - sortLabel: "Sort by {column}", - filterLabel: "Filter by {column}" - }, - tag: { - close: "Close this tag" - }, - tour: { - next: "Next", - previous: "Previous", - finish: "Finish", - close: "Close this dialog" - }, - tree: { - emptyText: "No Data" - }, - transfer: { - noMatch: "No matching data", - noData: "No data", - titles: ["List 1", "List 2"], - filterPlaceholder: "Enter keyword", - noCheckedFormat: "{total} items", - hasCheckedFormat: "{checked}/{total} checked" - }, - image: { - error: "FAILED" - }, - pageHeader: { - title: "Back" - }, - popconfirm: { - confirmButtonText: "Yes", - cancelButtonText: "No" - }, - carousel: { - leftArrow: "Carousel arrow left", - rightArrow: "Carousel arrow right", - indicator: "Carousel switch to index {index}" - } - } -}; - -// node_modules/element-plus/es/hooks/use-locale/index.mjs -var buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale)); -var translate = (path, option, locale) => get_default(locale, path, path).replace( - /\{(\w+)\}/g, - (_2, key) => { - var _a; - return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`; - } -); -var buildLocaleContext = (locale) => { - const lang = computed(() => unref(locale).name); - const localeRef = isRef(locale) ? locale : ref(locale); - return { - lang, - locale: localeRef, - t: buildTranslator(locale) - }; -}; -var localeContextKey = Symbol("localeContextKey"); -var useLocale = (localeOverrides) => { - const locale = localeOverrides || inject(localeContextKey, ref()); - return buildLocaleContext(computed(() => locale.value || English)); -}; - -// node_modules/element-plus/es/utils/vue/props/runtime.mjs -var epPropKey = "__epPropKey"; -var definePropType = (val) => val; -var isEpProp = (val) => isObject(val) && !!val[epPropKey]; -var buildProp = (prop, key) => { - if (!isObject(prop) || isEpProp(prop)) - return prop; - const { values: values2, required: required4, default: defaultValue, type: type4, validator } = prop; - const _validator = values2 || validator ? (val) => { - let valid = false; - let allowedValues = []; - if (values2) { - allowedValues = Array.from(values2); - if (hasOwn(prop, "default")) { - allowedValues.push(defaultValue); - } - valid || (valid = allowedValues.includes(val)); - } - if (validator) - valid || (valid = validator(val)); - if (!valid && allowedValues.length > 0) { - const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", "); - warn( - `Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify( - val - )}.` - ); - } - return valid; - } : void 0; - const epProp = { - type: type4, - required: !!required4, - validator: _validator, - [epPropKey]: true - }; - if (hasOwn(prop, "default")) - epProp.default = defaultValue; - return epProp; -}; -var buildProps = (props2) => fromPairs_default( - Object.entries(props2).map(([key, option]) => [ - key, - buildProp(option, key) - ]) -); - -// node_modules/element-plus/es/constants/size.mjs -var componentSizes = ["", "default", "small", "large"]; -var componentSizeMap = { - large: 40, - default: 32, - small: 24 -}; - -// node_modules/element-plus/es/hooks/use-size/index.mjs -var useSizeProp = buildProp({ - type: String, - values: componentSizes, - required: false -}); -var useSizeProps = { - size: useSizeProp -}; -var SIZE_INJECTION_KEY = Symbol("size"); -var useGlobalSize = () => { - const injectedSize = inject(SIZE_INJECTION_KEY, {}); - return computed(() => { - return unref(injectedSize.size) || ""; - }); -}; - -// node_modules/element-plus/es/hooks/use-empty-values/index.mjs -var emptyValuesContextKey = Symbol("emptyValuesContextKey"); -var SCOPE = "use-empty-values"; -var DEFAULT_EMPTY_VALUES = ["", void 0, null]; -var DEFAULT_VALUE_ON_CLEAR = void 0; -var useEmptyValuesProps = buildProps({ - emptyValues: Array, - valueOnClear: { - type: definePropType([ - String, - Number, - Boolean, - Function - ]), - default: void 0, - validator: (val) => { - val = isFunction(val) ? val() : val; - if (isArray(val)) { - return val.every((item) => !item); - } - return !val; - } - } -}); -var useEmptyValues = (props2, defaultValue) => { - const config = getCurrentInstance() ? inject(emptyValuesContextKey, ref({})) : ref({}); - const emptyValues = computed( - () => props2.emptyValues || config.value.emptyValues || DEFAULT_EMPTY_VALUES - ); - const valueOnClear = computed(() => { - if (isFunction(props2.valueOnClear)) { - return props2.valueOnClear(); - } else if (props2.valueOnClear !== void 0) { - return props2.valueOnClear; - } else if (isFunction(config.value.valueOnClear)) { - return config.value.valueOnClear(); - } else if (config.value.valueOnClear !== void 0) { - return config.value.valueOnClear; - } - return defaultValue !== void 0 ? defaultValue : DEFAULT_VALUE_ON_CLEAR; - }); - const isEmptyValue2 = (value) => { - let result2 = true; - if (isArray(value)) { - result2 = emptyValues.value.some((emptyValue) => { - return isEqual_default(value, emptyValue); - }); - } else { - result2 = emptyValues.value.includes(value); - } - return result2; - }; - if (!isEmptyValue2(valueOnClear.value)) { - debugWarn(SCOPE, "value-on-clear should be a value of empty-values"); - } - return { - emptyValues, - valueOnClear, - isEmptyValue: isEmptyValue2 - }; -}; - -// node_modules/element-plus/es/utils/objects.mjs -var keysOf = (arr) => Object.keys(arr); -var entriesOf = (arr) => Object.entries(arr); -var getProp = (obj, path, defaultValue) => { - return { - get value() { - return get_default(obj, path, defaultValue); - }, - set value(val) { - set_default(obj, path, val); - } - }; -}; - -// node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.mjs -var globalConfig = ref(); -function useGlobalConfig(key, defaultValue = void 0) { - const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig; - if (key) { - return computed(() => { - var _a, _b; - return (_b = (_a = config.value) == null ? void 0 : _a[key]) != null ? _b : defaultValue; - }); - } else { - return config; - } -} -function useGlobalComponentSettings(block, sizeFallback) { - const config = useGlobalConfig(); - const ns = useNamespace( - block, - computed(() => { - var _a; - return ((_a = config.value) == null ? void 0 : _a.namespace) || defaultNamespace; - }) - ); - const locale = useLocale(computed(() => { - var _a; - return (_a = config.value) == null ? void 0 : _a.locale; - })); - const zIndex2 = useZIndex( - computed(() => { - var _a; - return ((_a = config.value) == null ? void 0 : _a.zIndex) || defaultInitialZIndex; - }) - ); - const size3 = computed(() => { - var _a; - return unref(sizeFallback) || ((_a = config.value) == null ? void 0 : _a.size) || ""; - }); - provideGlobalConfig(computed(() => unref(config) || {})); - return { - ns, - locale, - zIndex: zIndex2, - size: size3 - }; -} -var provideGlobalConfig = (config, app, global2 = false) => { - var _a; - const inSetup = !!getCurrentInstance(); - const oldConfig = inSetup ? useGlobalConfig() : void 0; - const provideFn = (_a = app == null ? void 0 : app.provide) != null ? _a : inSetup ? provide : void 0; - if (!provideFn) { - debugWarn( - "provideGlobalConfig", - "provideGlobalConfig() can only be used inside setup()." - ); - return; - } - const context = computed(() => { - const cfg = unref(config); - if (!(oldConfig == null ? void 0 : oldConfig.value)) - return cfg; - return mergeConfig(oldConfig.value, cfg); - }); - provideFn(configProviderContextKey, context); - provideFn( - localeContextKey, - computed(() => context.value.locale) - ); - provideFn( - namespaceContextKey, - computed(() => context.value.namespace) - ); - provideFn( - zIndexContextKey, - computed(() => context.value.zIndex) - ); - provideFn(SIZE_INJECTION_KEY, { - size: computed(() => context.value.size || "") - }); - provideFn( - emptyValuesContextKey, - computed(() => ({ - emptyValues: context.value.emptyValues, - valueOnClear: context.value.valueOnClear - })) - ); - if (global2 || !globalConfig.value) { - globalConfig.value = context.value; - } - return context; -}; -var mergeConfig = (a2, b2) => { - const keys3 = [.../* @__PURE__ */ new Set([...keysOf(a2), ...keysOf(b2)])]; - const obj = {}; - for (const key of keys3) { - obj[key] = b2[key] !== void 0 ? b2[key] : a2[key]; - } - return obj; -}; - -// node_modules/element-plus/es/make-installer.mjs -var makeInstaller = (components = []) => { - const install2 = (app, options) => { - if (app[INSTALLED_KEY]) - return; - app[INSTALLED_KEY] = true; - components.forEach((c2) => app.use(c2)); - if (options) - provideGlobalConfig(options, app, true); - }; - return { - version, - install: install2 - }; -}; - -// node_modules/element-plus/es/components/teleport/src/teleport.mjs -var teleportProps = buildProps({ - to: { - type: definePropType([String, Object]), - required: true - }, - disabled: Boolean -}); - -// node_modules/element-plus/es/_virtual/plugin-vue_export-helper.mjs -var _export_sfc = (sfc, props2) => { - const target2 = sfc.__vccOpts || sfc; - for (const [key, val] of props2) { - target2[key] = val; - } - return target2; -}; - -// node_modules/element-plus/es/components/teleport/src/teleport2.mjs -var _sfc_main = defineComponent({ - __name: "teleport", - props: teleportProps, - setup(__props) { - return (_ctx, _cache) => { - return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, { - key: 1, - to: _ctx.to - }, [ - renderSlot(_ctx.$slots, "default") - ], 8, ["to"])); - }; - } -}); -var Teleport2 = _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/teleport/src/teleport.vue"]]); - -// node_modules/element-plus/es/utils/vue/install.mjs -var withInstall = (main, extra) => { - main.install = (app) => { - for (const comp of [main, ...Object.values(extra != null ? extra : {})]) { - app.component(comp.name, comp); - } - }; - if (extra) { - for (const [key, comp] of Object.entries(extra)) { - main[key] = comp; - } - } - return main; -}; -var withInstallFunction = (fn2, name) => { - fn2.install = (app) => { - fn2._context = app._context; - app.config.globalProperties[name] = fn2; - }; - return fn2; -}; -var withInstallDirective = (directive, name) => { - directive.install = (app) => { - app.directive(name, directive); - }; - return directive; -}; -var withNoopInstall = (component2) => { - component2.install = NOOP; - return component2; -}; - -// node_modules/element-plus/es/components/teleport/index.mjs -var ElTeleport = withInstall(Teleport2); - -// node_modules/element-plus/es/constants/event.mjs -var UPDATE_MODEL_EVENT = "update:modelValue"; -var CHANGE_EVENT = "change"; -var INPUT_EVENT = "input"; - -// node_modules/element-plus/es/components/affix/src/affix.mjs -var affixProps = buildProps({ - zIndex: { - type: definePropType([Number, String]), - default: 100 - }, - target: { - type: String, - default: "" - }, - offset: { - type: Number, - default: 0 - }, - position: { - type: String, - values: ["top", "bottom"], - default: "top" - }, - teleported: Boolean, - appendTo: { - type: teleportProps.to.type, - default: "body" - } -}); -var affixEmits = { - scroll: ({ scrollTop, fixed }) => isNumber2(scrollTop) && isBoolean2(fixed), - [CHANGE_EVENT]: (fixed) => isBoolean2(fixed) -}; - -// node_modules/element-plus/es/utils/easings.mjs -function easeInOutCubic(t, b2, c2, d2) { - const cc = c2 - b2; - t /= d2 / 2; - if (t < 1) { - return cc / 2 * t * t * t + b2; - } - return cc / 2 * ((t -= 2) * t * t + 2) + b2; -} - -// node_modules/element-plus/es/utils/raf.mjs -var rAF = (fn2) => isClient ? window.requestAnimationFrame(fn2) : setTimeout(fn2, 16); -var cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle); - -// node_modules/element-plus/es/utils/dom/style.mjs -var SCOPE2 = "utils/dom/style"; -var classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim()); -var hasClass = (el, cls) => { - if (!el || !cls) - return false; - if (cls.includes(" ")) - throw new Error("className should not contain space."); - return el.classList.contains(cls); -}; -var addClass = (el, cls) => { - if (!el || !cls.trim()) - return; - el.classList.add(...classNameToArray(cls)); -}; -var removeClass = (el, cls) => { - if (!el || !cls.trim()) - return; - el.classList.remove(...classNameToArray(cls)); -}; -var getStyle = (element, styleName) => { - var _a; - if (!isClient || !element || !styleName) - return ""; - let key = camelize(styleName); - if (key === "float") - key = "cssFloat"; - try { - const style = element.style[key]; - if (style) - return style; - const computed2 = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, ""); - return computed2 ? computed2[key] : ""; - } catch (e) { - return element.style[key]; - } -}; -var setStyle = (element, styleName, value) => { - if (!element || !styleName) - return; - if (isObject(styleName)) { - entriesOf(styleName).forEach( - ([prop, value2]) => setStyle(element, prop, value2) - ); - } else { - const key = camelize(styleName); - element.style[key] = value; - } -}; -function addUnit(value, defaultUnit = "px") { - if (!value && value !== 0) - return ""; - if (isNumber2(value) || isStringNumber(value)) { - return `${value}${defaultUnit}`; - } else if (isString(value)) { - return value; - } - debugWarn(SCOPE2, "binding value must be a string or number"); -} - -// node_modules/element-plus/es/utils/dom/scroll.mjs -var isScroll = (el, isVertical) => { - if (!isClient) - return false; - const key = { - undefined: "overflow", - true: "overflow-y", - false: "overflow-x" - }[String(isVertical)]; - const overflow = getStyle(el, key); - return ["scroll", "auto", "overlay"].some((s2) => overflow.includes(s2)); -}; -var getScrollContainer = (el, isVertical) => { - if (!isClient) - return; - let parent2 = el; - while (parent2) { - if ([window, document, document.documentElement].includes(parent2)) - return window; - if (isScroll(parent2, isVertical)) - return parent2; - parent2 = parent2.parentNode; - } - return parent2; -}; -var scrollBarWidth; -var getScrollBarWidth = (namespace) => { - var _a; - if (!isClient) - return 0; - if (scrollBarWidth !== void 0) - return scrollBarWidth; - const outer = document.createElement("div"); - outer.className = `${namespace}-scrollbar__wrap`; - outer.style.visibility = "hidden"; - outer.style.width = "100px"; - outer.style.position = "absolute"; - outer.style.top = "-9999px"; - document.body.appendChild(outer); - const widthNoScroll = outer.offsetWidth; - outer.style.overflow = "scroll"; - const inner = document.createElement("div"); - inner.style.width = "100%"; - outer.appendChild(inner); - const widthWithScroll = inner.offsetWidth; - (_a = outer.parentNode) == null ? void 0 : _a.removeChild(outer); - scrollBarWidth = widthNoScroll - widthWithScroll; - return scrollBarWidth; -}; -function scrollIntoView(container, selected) { - if (!isClient) - return; - if (!selected) { - container.scrollTop = 0; - return; - } - const offsetParents = []; - let pointer = selected.offsetParent; - while (pointer !== null && container !== pointer && container.contains(pointer)) { - offsetParents.push(pointer); - pointer = pointer.offsetParent; - } - const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0); - const bottom = top + selected.offsetHeight; - const viewRectTop = container.scrollTop; - const viewRectBottom = viewRectTop + container.clientHeight; - if (top < viewRectTop) { - container.scrollTop = top; - } else if (bottom > viewRectBottom) { - container.scrollTop = bottom - container.clientHeight; - } -} -function animateScrollTo(container, from, to, duration, callback) { - const startTime = Date.now(); - let handle; - const scroll = () => { - const timestamp2 = Date.now(); - const time = timestamp2 - startTime; - const nextScrollTop = easeInOutCubic( - time > duration ? duration : time, - from, - to, - duration - ); - if (isWindow(container)) { - container.scrollTo(window.pageXOffset, nextScrollTop); - } else { - container.scrollTop = nextScrollTop; - } - if (time < duration) { - handle = rAF(scroll); - } else if (isFunction(callback)) { - callback(); - } - }; - scroll(); - return () => { - handle && cAF(handle); - }; -} -var getScrollElement = (target2, container) => { - if (isWindow(container)) { - return target2.ownerDocument.documentElement; - } - return container; -}; -var getScrollTop = (container) => { - if (isWindow(container)) { - return window.scrollY; - } - return container.scrollTop; -}; - -// node_modules/element-plus/es/components/affix/src/affix2.mjs -var COMPONENT_NAME = "ElAffix"; -var _sfc_main2 = defineComponent({ - ...{ - name: COMPONENT_NAME - }, - __name: "affix", - props: affixProps, - emits: affixEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("affix"); - const target2 = shallowRef(); - const root2 = shallowRef(); - const scrollContainer = shallowRef(); - const { height: windowHeight } = useWindowSize(); - const { - height: rootHeight, - width: rootWidth, - top: rootTop, - bottom: rootBottom, - left: rootLeft, - update: updateRoot - } = useElementBounding(root2, { windowScroll: false }); - const targetRect = useElementBounding(target2); - const fixed = ref(false); - const scrollTop = ref(0); - const transform2 = ref(0); - const teleportDisabled = computed(() => { - return !props2.teleported || !fixed.value; - }); - const rootStyle = computed(() => { - return { - height: fixed.value ? `${rootHeight.value}px` : "", - width: fixed.value ? `${rootWidth.value}px` : "" - }; - }); - const affixStyle = computed(() => { - if (!fixed.value) - return {}; - const offset3 = addUnit(props2.offset); - return { - height: `${rootHeight.value}px`, - width: `${rootWidth.value}px`, - top: props2.position === "top" ? offset3 : "", - bottom: props2.position === "bottom" ? offset3 : "", - left: props2.teleported ? `${rootLeft.value}px` : "", - transform: transform2.value ? `translateY(${transform2.value}px)` : "", - zIndex: props2.zIndex - }; - }); - const update2 = () => { - if (!scrollContainer.value) - return; - scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0; - const { position, target: target22, offset: offset3 } = props2; - const rootHeightOffset = offset3 + rootHeight.value; - if (position === "top") { - if (target22) { - const difference2 = targetRect.bottom.value - rootHeightOffset; - fixed.value = offset3 > rootTop.value && targetRect.bottom.value > 0; - transform2.value = difference2 < 0 ? difference2 : 0; - } else { - fixed.value = offset3 > rootTop.value; - } - } else if (target22) { - const difference2 = windowHeight.value - targetRect.top.value - rootHeightOffset; - fixed.value = windowHeight.value - offset3 < rootBottom.value && windowHeight.value > targetRect.top.value; - transform2.value = difference2 < 0 ? -difference2 : 0; - } else { - fixed.value = windowHeight.value - offset3 < rootBottom.value; - } - }; - const updateRootRect = async () => { - if (!fixed.value) { - updateRoot(); - return; - } - fixed.value = false; - await nextTick(); - updateRoot(); - fixed.value = true; - }; - const handleScroll2 = async () => { - updateRoot(); - await nextTick(); - emit("scroll", { - scrollTop: scrollTop.value, - fixed: fixed.value - }); - }; - watch(fixed, (val) => emit(CHANGE_EVENT, val)); - onMounted(() => { - var _a; - if (props2.target) { - target2.value = (_a = document.querySelector(props2.target)) != null ? _a : void 0; - if (!target2.value) - throwError(COMPONENT_NAME, `Target does not exist: ${props2.target}`); - } else { - target2.value = document.documentElement; - } - scrollContainer.value = getScrollContainer(root2.value, true); - updateRoot(); - }); - useEventListener(scrollContainer, "scroll", handleScroll2); - watchEffect(update2); - __expose({ - update: update2, - updateRoot: updateRootRect - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "root", - ref: root2, - class: normalizeClass(unref(ns).b()), - style: normalizeStyle(rootStyle.value) - }, - [ - createVNode(unref(ElTeleport), { - disabled: teleportDisabled.value, - to: _ctx.appendTo - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }), - style: normalizeStyle(affixStyle.value) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 6 - ) - ]), - _: 3 - }, 8, ["disabled", "to"]) - ], - 6 - ); - }; - } -}); -var Affix = _export_sfc(_sfc_main2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/affix/src/affix.vue"]]); - -// node_modules/element-plus/es/components/affix/index.mjs -var ElAffix = withInstall(Affix); - -// node_modules/element-plus/es/components/icon/src/icon.mjs -var iconProps = buildProps({ - size: { - type: definePropType([Number, String]) - }, - color: { - type: String - } -}); - -// node_modules/element-plus/es/components/icon/src/icon2.mjs -var _sfc_main3 = defineComponent({ - ...{ - name: "ElIcon", - inheritAttrs: false - }, - __name: "icon", - props: iconProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("icon"); - const style = computed(() => { - const { size: size3, color } = props2; - const fontSize = addUnit(size3); - if (!fontSize && !color) - return {}; - return { - fontSize, - "--color": color - }; - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "i", - mergeProps({ - class: unref(ns).b(), - style: style.value - }, _ctx.$attrs), - [ - renderSlot(_ctx.$slots, "default") - ], - 16 - ); - }; - } -}); -var Icon = _export_sfc(_sfc_main3, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]); - -// node_modules/element-plus/es/components/icon/index.mjs -var ElIcon = withInstall(Icon); - -// node_modules/element-plus/es/utils/vue/icon.mjs -var iconPropType = definePropType([ - String, - Object, - Function -]); -var CloseComponents = { - Close: close_default -}; -var TypeComponents = { - Close: close_default, - SuccessFilled: success_filled_default, - InfoFilled: info_filled_default, - WarningFilled: warning_filled_default, - CircleCloseFilled: circle_close_filled_default -}; -var TypeComponentsMap = { - primary: info_filled_default, - success: success_filled_default, - warning: warning_filled_default, - error: circle_close_filled_default, - info: info_filled_default -}; -var ValidateComponentsMap = { - validating: loading_default, - success: circle_check_default, - error: circle_close_default -}; - -// node_modules/element-plus/es/components/alert/src/alert.mjs -var alertEffects = ["light", "dark"]; -var alertProps = buildProps({ - title: { - type: String, - default: "" - }, - description: { - type: String, - default: "" - }, - type: { - type: String, - values: keysOf(TypeComponentsMap), - default: "info" - }, - closable: { - type: Boolean, - default: true - }, - closeText: { - type: String, - default: "" - }, - showIcon: Boolean, - center: Boolean, - effect: { - type: String, - values: alertEffects, - default: "light" - }, - showAfter: Number, - hideAfter: Number, - autoClose: Number -}); -var alertEmits = { - close: (evt) => evt instanceof MouseEvent -}; - -// node_modules/element-plus/es/utils/vue/vnode.mjs -var SCOPE3 = "utils/vue/vnode"; -var PatchFlags = ((PatchFlags2) => { - PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT"; - PatchFlags2[PatchFlags2["CLASS"] = 2] = "CLASS"; - PatchFlags2[PatchFlags2["STYLE"] = 4] = "STYLE"; - PatchFlags2[PatchFlags2["PROPS"] = 8] = "PROPS"; - PatchFlags2[PatchFlags2["FULL_PROPS"] = 16] = "FULL_PROPS"; - PatchFlags2[PatchFlags2["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS"; - PatchFlags2[PatchFlags2["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT"; - PatchFlags2[PatchFlags2["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT"; - PatchFlags2[PatchFlags2["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT"; - PatchFlags2[PatchFlags2["NEED_PATCH"] = 512] = "NEED_PATCH"; - PatchFlags2[PatchFlags2["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS"; - PatchFlags2[PatchFlags2["HOISTED"] = -1] = "HOISTED"; - PatchFlags2[PatchFlags2["BAIL"] = -2] = "BAIL"; - return PatchFlags2; -})(PatchFlags || {}); -function isFragment(node) { - return isVNode(node) && node.type === Fragment; -} -function isComment(node) { - return isVNode(node) && node.type === Comment; -} -function isValidElementNode(node) { - return isVNode(node) && !isFragment(node) && !isComment(node); -} -var getNormalizedProps = (node) => { - if (!isVNode(node)) { - debugWarn(SCOPE3, "[getNormalizedProps] must be a VNode"); - return {}; - } - const raw = node.props || {}; - const type4 = (isVNode(node.type) ? node.type.props : void 0) || {}; - const props2 = {}; - Object.keys(type4).forEach((key) => { - if (hasOwn(type4[key], "default")) { - props2[key] = type4[key].default; - } - }); - Object.keys(raw).forEach((key) => { - props2[camelize(key)] = raw[key]; - }); - return props2; -}; -var flattedChildren = (children) => { - const vNodes = isArray(children) ? children : [children]; - const result2 = []; - vNodes.forEach((child) => { - var _a; - if (isArray(child)) { - result2.push(...flattedChildren(child)); - } else if (isVNode(child) && ((_a = child.component) == null ? void 0 : _a.subTree)) { - result2.push(child, ...flattedChildren(child.component.subTree)); - } else if (isVNode(child) && isArray(child.children)) { - result2.push(...flattedChildren(child.children)); - } else if (isVNode(child) && child.shapeFlag === 2) { - result2.push(...flattedChildren(child.type())); - } else { - result2.push(child); - } - }); - return result2; -}; - -// node_modules/element-plus/es/components/alert/src/alert2.mjs -var _sfc_main4 = defineComponent({ - ...{ - name: "ElAlert" - }, - __name: "alert", - props: alertProps, - emits: alertEmits, - setup(__props, { emit: __emit }) { - const { Close } = TypeComponents; - const props2 = __props; - const emit = __emit; - const slots = useSlots(); - const ns = useNamespace("alert"); - const visible = ref(true); - const iconComponent = computed(() => TypeComponentsMap[props2.type]); - const hasDesc = computed(() => { - var _a; - if (props2.description) - return true; - const slotContent = (_a = slots.default) == null ? void 0 : _a.call(slots); - if (!slotContent) - return false; - const children = flattedChildren(slotContent); - return children.some((child) => !isComment(child)); - }); - const close2 = (evt) => { - visible.value = false; - emit("close", evt); - }; - if (props2.showAfter || props2.hideAfter || props2.autoClose) { - debugWarn( - "el-alert", - "The `show-after`, `hide-after`, and `auto-close` attributes were removed after 2.11.8. Please use `v-if` and `v-show` to manually replace them, visit: https://github.com/element-plus/element-plus/pull/22560" - ); - } - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, { - name: unref(ns).b("fade"), - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]), - role: "alert" - }, - [ - _ctx.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)]) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "icon", {}, () => [ - (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value))) - ]) - ]), - _: 3 - }, 8, ["class"])) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("content")) - }, - [ - _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }]) - }, - [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - hasDesc.value ? (openBlock(), createElementBlock( - "p", - { - key: 1, - class: normalizeClass(unref(ns).e("description")) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createTextVNode( - toDisplayString(_ctx.description), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.closable ? (openBlock(), createElementBlock( - Fragment, - { key: 2 }, - [ - _ctx.closeText ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]), - onClick: close2 - }, - toDisplayString(_ctx.closeText), - 3 - )) : (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass(unref(ns).e("close-btn")), - onClick: close2 - }, { - default: withCtx(() => [ - createVNode(unref(Close)) - ]), - _: 1 - }, 8, ["class"])) - ], - 64 - )) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ), [ - [vShow, visible.value] - ]) - ]), - _: 3 - }, 8, ["name"]); - }; - } -}); -var Alert = _export_sfc(_sfc_main4, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]); - -// node_modules/element-plus/es/components/alert/index.mjs -var ElAlert = withInstall(Alert); - -// node_modules/element-plus/es/utils/browser.mjs -var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent); -var isAndroid = () => isClient && /android/i.test(window.navigator.userAgent); - -// node_modules/element-plus/es/components/input/src/utils.mjs -var hiddenTextarea = void 0; -var HIDDEN_STYLE = { - height: "0", - visibility: "hidden", - overflow: isFirefox() ? "" : "hidden", - position: "absolute", - "z-index": "-1000", - top: "0", - right: "0" -}; -var CONTEXT_STYLE = [ - "letter-spacing", - "line-height", - "padding-top", - "padding-bottom", - "font-family", - "font-weight", - "font-size", - "text-rendering", - "text-transform", - "width", - "text-indent", - "padding-left", - "padding-right", - "border-width", - "box-sizing", - "word-break" -]; -var looseToNumber = (val) => { - const n = Number.parseFloat(val); - return Number.isNaN(n) ? val : n; -}; -function calculateNodeStyling(targetElement) { - const style = window.getComputedStyle(targetElement); - const boxSizing = style.getPropertyValue("box-sizing"); - const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top")); - const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width")); - const contextStyle = CONTEXT_STYLE.map((name) => [ - name, - style.getPropertyValue(name) - ]); - return { contextStyle, paddingSize, borderSize, boxSizing }; -} -function calcTextareaHeight(targetElement, minRows = 1, maxRows) { - var _a, _b; - if (!hiddenTextarea) { - hiddenTextarea = document.createElement("textarea"); - ((_a = targetElement.parentNode) != null ? _a : document.body).appendChild(hiddenTextarea); - } - const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement); - contextStyle.forEach( - ([key, value]) => hiddenTextarea == null ? void 0 : hiddenTextarea.style.setProperty(key, value) - ); - Object.entries(HIDDEN_STYLE).forEach( - ([key, value]) => hiddenTextarea == null ? void 0 : hiddenTextarea.style.setProperty(key, value, "important") - ); - hiddenTextarea.value = targetElement.value || targetElement.placeholder || ""; - let height = hiddenTextarea.scrollHeight; - const result2 = {}; - if (boxSizing === "border-box") { - height = height + borderSize; - } else if (boxSizing === "content-box") { - height = height - paddingSize; - } - hiddenTextarea.value = ""; - const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize; - if (isNumber2(minRows)) { - let minHeight = singleRowHeight * minRows; - if (boxSizing === "border-box") { - minHeight = minHeight + paddingSize + borderSize; - } - height = Math.max(minHeight, height); - result2.minHeight = `${minHeight}px`; - } - if (isNumber2(maxRows)) { - let maxHeight = singleRowHeight * maxRows; - if (boxSizing === "border-box") { - maxHeight = maxHeight + paddingSize + borderSize; - } - height = Math.min(maxHeight, height); - } - result2.height = `${height}px`; - (_b = hiddenTextarea.parentNode) == null ? void 0 : _b.removeChild(hiddenTextarea); - hiddenTextarea = void 0; - return result2; -} - -// node_modules/element-plus/es/utils/typescript.mjs -var mutable = (val) => val; - -// node_modules/element-plus/es/hooks/use-aria/index.mjs -var ariaProps = buildProps({ - ariaLabel: String, - ariaOrientation: { - type: String, - values: ["horizontal", "vertical", "undefined"] - }, - ariaControls: String -}); -var useAriaProps = (arias) => { - return pick_default(ariaProps, arias); -}; - -// node_modules/element-plus/es/components/input/src/input2.mjs -var inputProps = buildProps({ - id: { - type: String, - default: void 0 - }, - size: useSizeProp, - disabled: { - type: Boolean, - default: void 0 - }, - modelValue: { - type: definePropType([ - String, - Number, - Object - ]), - default: "" - }, - modelModifiers: { - type: definePropType(Object), - default: () => ({}) - }, - maxlength: { - type: [String, Number] - }, - minlength: { - type: [String, Number] - }, - type: { - type: definePropType(String), - default: "text" - }, - resize: { - type: String, - values: ["none", "both", "horizontal", "vertical"] - }, - autosize: { - type: definePropType([Boolean, Object]), - default: false - }, - autocomplete: { - type: definePropType(String), - default: "off" - }, - formatter: { - type: Function - }, - parser: { - type: Function - }, - placeholder: { - type: String - }, - form: { - type: String - }, - readonly: Boolean, - clearable: Boolean, - clearIcon: { - type: iconPropType, - default: circle_close_default - }, - showPassword: Boolean, - showWordLimit: Boolean, - wordLimitPosition: { - type: String, - values: ["inside", "outside"], - default: "inside" - }, - suffixIcon: { - type: iconPropType - }, - prefixIcon: { - type: iconPropType - }, - containerRole: { - type: String, - default: void 0 - }, - tabindex: { - type: [String, Number], - default: 0 - }, - validateEvent: { - type: Boolean, - default: true - }, - inputStyle: { - type: definePropType([Object, Array, String]), - default: () => mutable({}) - }, - autofocus: Boolean, - rows: { - type: Number, - default: 2 - }, - ...useAriaProps(["ariaLabel"]), - inputmode: { - type: definePropType(String), - default: void 0 - }, - name: String -}); -var inputEmits = { - [UPDATE_MODEL_EVENT]: (value) => isString(value), - input: (value) => isString(value), - change: (value, evt) => isString(value) && (evt instanceof Event || evt === void 0), - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true, - mouseleave: (evt) => evt instanceof MouseEvent, - mouseenter: (evt) => evt instanceof MouseEvent, - keydown: (evt) => evt instanceof Event, - compositionstart: (evt) => evt instanceof CompositionEvent, - compositionupdate: (evt) => evt instanceof CompositionEvent, - compositionend: (evt) => evt instanceof CompositionEvent -}; - -// node_modules/element-plus/es/hooks/use-attrs/index.mjs -var DEFAULT_EXCLUDE_KEYS = ["class", "style"]; -var LISTENER_PREFIX = /^on[A-Z]/; -var useAttrs2 = (params = {}) => { - const { excludeListeners = false, excludeKeys } = params; - const allExcludeKeys = computed(() => { - return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS); - }); - const instance = getCurrentInstance(); - if (!instance) { - debugWarn( - "use-attrs", - "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function" - ); - return computed(() => ({})); - } - return computed( - () => { - var _a; - return fromPairs_default( - Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter( - ([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key)) - ) - ); - } - ); -}; - -// node_modules/element-plus/es/hooks/use-id/index.mjs -var defaultIdInjection = { - prefix: Math.floor(Math.random() * 1e4), - current: 0 -}; -var ID_INJECTION_KEY = Symbol("elIdInjection"); -var useIdInjection = () => { - return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection; -}; -var useId = (deterministicId) => { - const idInjection = useIdInjection(); - if (!isClient && idInjection === defaultIdInjection) { - debugWarn( - "IdInjection", - `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed -usage: app.provide(ID_INJECTION_KEY, { - prefix: number, - current: number, -})` - ); - } - const namespace = useGetDerivedNamespace(); - const idRef = computedEager( - () => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}` - ); - return idRef; -}; - -// node_modules/element-plus/es/components/form/src/constants.mjs -var formContextKey = Symbol("formContextKey"); -var formItemContextKey = Symbol("formItemContextKey"); - -// node_modules/element-plus/es/components/form/src/hooks/use-form-item.mjs -var useFormItem = () => { - const form = inject(formContextKey, void 0); - const formItem = inject(formItemContextKey, void 0); - return { - form, - formItem - }; -}; -var useFormItemInputId = (props2, { - formItemContext, - disableIdGeneration, - disableIdManagement -}) => { - if (!disableIdGeneration) { - disableIdGeneration = ref(false); - } - if (!disableIdManagement) { - disableIdManagement = ref(false); - } - const instance = getCurrentInstance(); - const inLabel = () => { - let parent2 = instance == null ? void 0 : instance.parent; - while (parent2) { - if (parent2.type.name === "ElFormItem") { - return false; - } - if (parent2.type.name === "ElLabelWrap") { - return true; - } - parent2 = parent2.parent; - } - return false; - }; - const inputId = ref(); - let idUnwatch = void 0; - const isLabeledByFormItem = computed(() => { - var _a; - return !!(!(props2.label || props2.ariaLabel) && formItemContext && formItemContext.inputIds && ((_a = formItemContext.inputIds) == null ? void 0 : _a.length) <= 1); - }); - onMounted(() => { - idUnwatch = watch( - [toRef(props2, "id"), disableIdGeneration], - ([id, disableIdGeneration2]) => { - const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0; - if (newId !== inputId.value) { - if ((formItemContext == null ? void 0 : formItemContext.removeInputId) && !inLabel()) { - inputId.value && formItemContext.removeInputId(inputId.value); - if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) { - formItemContext.addInputId(newId); - } - } - inputId.value = newId; - } - }, - { immediate: true } - ); - }); - onUnmounted(() => { - idUnwatch && idUnwatch(); - if (formItemContext == null ? void 0 : formItemContext.removeInputId) { - inputId.value && formItemContext.removeInputId(inputId.value); - } - }); - return { - isLabeledByFormItem, - inputId - }; -}; - -// node_modules/element-plus/es/hooks/use-prop/index.mjs -var useProp = (name) => { - const vm = getCurrentInstance(); - return computed(() => { - var _a, _b; - return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name]; - }); -}; - -// node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs -var useFormSize = (fallback, ignore = {}) => { - const emptyRef = ref(void 0); - const size3 = ignore.prop ? emptyRef : useProp("size"); - const globalConfig2 = ignore.global ? emptyRef : useGlobalSize(); - const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0); - const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0); - return computed( - () => size3.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig2.value || "" - ); -}; -var useFormDisabled = (fallback) => { - const disabled = useProp("disabled"); - const form = inject(formContextKey, void 0); - return computed(() => { - var _a, _b, _c; - return (_c = (_b = (_a = disabled.value) != null ? _a : unref(fallback)) != null ? _b : form == null ? void 0 : form.disabled) != null ? _c : false; - }); -}; -var useSize = useFormSize; -var useDisabled = useFormDisabled; - -// node_modules/element-plus/es/utils/dom/aria.mjs -var 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])`; -var isHTMLElement = (e) => { - if (typeof Element === "undefined") - return false; - return e instanceof Element; -}; -var isVisible = (element) => { - if (false) - return true; - const computed2 = getComputedStyle(element); - return computed2.position === "fixed" ? false : element.offsetParent !== null; -}; -var obtainAllFocusableElements = (element) => { - return Array.from( - element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS) - ).filter((item) => isFocusable(item) && isVisible(item)); -}; -var isFocusable = (element) => { - if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) { - return true; - } - if (element.tabIndex < 0 || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") { - return false; - } - switch (element.nodeName) { - case "A": { - return !!element.href && element.rel !== "ignore"; - } - case "INPUT": { - return !(element.type === "hidden" || element.type === "file"); - } - case "BUTTON": - case "SELECT": - case "TEXTAREA": { - return true; - } - default: { - return false; - } - } -}; -var triggerEvent = function(elm, name, ...opts) { - let eventName; - if (name.includes("mouse") || name.includes("click")) { - eventName = "MouseEvents"; - } else if (name.includes("key")) { - eventName = "KeyboardEvent"; - } else { - eventName = "HTMLEvents"; - } - const evt = document.createEvent(eventName); - evt.initEvent(name, ...opts); - elm.dispatchEvent(evt); - return elm; -}; -var isLeaf = (el) => !el.getAttribute("aria-owns"); -var getSibling = (el, distance, elClass) => { - const { parentNode } = el; - if (!parentNode) - return null; - const siblings = parentNode.querySelectorAll(elClass); - const index = Array.prototype.indexOf.call(siblings, el); - return siblings[index + distance] || null; -}; -var focusElement = (el, options) => { - if (!el || !el.focus) - return; - let cleanup = false; - if (isHTMLElement(el) && !isFocusable(el) && !el.getAttribute("tabindex")) { - el.setAttribute("tabindex", "-1"); - cleanup = true; - } - el.focus(options); - if (isHTMLElement(el) && cleanup) { - el.removeAttribute("tabindex"); - } -}; -var focusNode = (el) => { - if (!el) - return; - focusElement(el); - !isLeaf(el) && el.click(); -}; - -// node_modules/element-plus/es/hooks/use-focus-controller/index.mjs -function useFocusController(target2, { - disabled, - beforeFocus, - afterFocus, - beforeBlur, - afterBlur -} = {}) { - const instance = getCurrentInstance(); - const { emit } = instance; - const wrapperRef = shallowRef(); - const isFocused = ref(false); - const handleFocus = (event) => { - const cancelFocus = isFunction(beforeFocus) ? beforeFocus(event) : false; - if (unref(disabled) || isFocused.value || cancelFocus) - return; - isFocused.value = true; - emit("focus", event); - afterFocus == null ? void 0 : afterFocus(); - }; - const handleBlur = (event) => { - var _a; - const cancelBlur = isFunction(beforeBlur) ? beforeBlur(event) : false; - if (unref(disabled) || event.relatedTarget && ((_a = wrapperRef.value) == null ? void 0 : _a.contains(event.relatedTarget)) || cancelBlur) - return; - isFocused.value = false; - emit("blur", event); - afterBlur == null ? void 0 : afterBlur(); - }; - const handleClick = (event) => { - var _a, _b; - if (unref(disabled) || isFocusable(event.target) || ((_a = wrapperRef.value) == null ? void 0 : _a.contains(document.activeElement)) && wrapperRef.value !== document.activeElement) - return; - (_b = target2.value) == null ? void 0 : _b.focus(); - }; - watch([wrapperRef, () => unref(disabled)], ([el, disabled2]) => { - if (!el) - return; - if (disabled2) { - el.removeAttribute("tabindex"); - } else { - el.setAttribute("tabindex", "-1"); - } - }); - useEventListener(wrapperRef, "focus", handleFocus, true); - useEventListener(wrapperRef, "blur", handleBlur, true); - useEventListener(wrapperRef, "click", handleClick, true); - if (false) { - onMounted(() => { - const targetEl = isElement2(target2.value) ? target2.value : document.querySelector("input,textarea"); - if (targetEl) { - useEventListener(targetEl, "focus", handleFocus, true); - useEventListener(targetEl, "blur", handleBlur, true); - } - }); - } - return { - isFocused, - wrapperRef, - handleFocus, - handleBlur - }; -} - -// node_modules/element-plus/es/utils/i18n.mjs -var isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text); - -// node_modules/element-plus/es/hooks/use-composition/index.mjs -function useComposition({ - afterComposition, - emit -}) { - const isComposing = ref(false); - const handleCompositionStart = (event) => { - emit == null ? void 0 : emit("compositionstart", event); - isComposing.value = true; - }; - const handleCompositionUpdate = (event) => { - var _a; - emit == null ? void 0 : emit("compositionupdate", event); - const text = (_a = event.target) == null ? void 0 : _a.value; - const lastCharacter = text[text.length - 1] || ""; - isComposing.value = !isKorean(lastCharacter); - }; - const handleCompositionEnd = (event) => { - emit == null ? void 0 : emit("compositionend", event); - if (isComposing.value) { - isComposing.value = false; - nextTick(() => afterComposition(event)); - } - }; - const handleComposition = (event) => { - event.type === "compositionend" ? handleCompositionEnd(event) : handleCompositionUpdate(event); - }; - return { - isComposing, - handleComposition, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd - }; -} - -// node_modules/element-plus/es/hooks/use-cursor/index.mjs -function useCursor(input) { - let selectionInfo; - function recordCursor() { - if (input.value == void 0) - return; - const { selectionStart, selectionEnd, value } = input.value; - if (selectionStart == null || selectionEnd == null) - return; - const beforeTxt = value.slice(0, Math.max(0, selectionStart)); - const afterTxt = value.slice(Math.max(0, selectionEnd)); - selectionInfo = { - selectionStart, - selectionEnd, - value, - beforeTxt, - afterTxt - }; - } - function setCursor() { - if (input.value == void 0 || selectionInfo == void 0) - return; - const { value } = input.value; - const { beforeTxt, afterTxt, selectionStart } = selectionInfo; - if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0) - return; - let startPos = value.length; - if (value.endsWith(afterTxt)) { - startPos = value.length - afterTxt.length; - } else if (value.startsWith(beforeTxt)) { - startPos = beforeTxt.length; - } else { - const beforeLastChar = beforeTxt[selectionStart - 1]; - const newIndex = value.indexOf(beforeLastChar, selectionStart - 1); - if (newIndex !== -1) { - startPos = newIndex + 1; - } - } - input.value.setSelectionRange(startPos, startPos); - } - return [recordCursor, setCursor]; -} - -// node_modules/element-plus/es/components/input/src/input.mjs -var _hoisted_1 = ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode"]; -var _hoisted_2 = ["id", "name", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role"]; -var COMPONENT_NAME2 = "ElInput"; -var _sfc_main5 = defineComponent({ - ...{ - name: COMPONENT_NAME2, - inheritAttrs: false - }, - __name: "input", - props: inputProps, - emits: inputEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const rawAttrs = useAttrs(); - const attrs = useAttrs2(); - const slots = useSlots(); - const containerKls = computed(() => [ - props2.type === "textarea" ? nsTextarea.b() : nsInput.b(), - nsInput.m(inputSize.value), - nsInput.is("disabled", inputDisabled.value), - nsInput.is("exceed", inputExceed.value), - { - [nsInput.b("group")]: slots.prepend || slots.append, - [nsInput.m("prefix")]: slots.prefix || props2.prefixIcon, - [nsInput.m("suffix")]: slots.suffix || props2.suffixIcon || props2.clearable || props2.showPassword, - [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value, - [nsInput.b("hidden")]: props2.type === "hidden" - }, - rawAttrs.class - ]); - const wrapperKls = computed(() => [ - nsInput.e("wrapper"), - nsInput.is("focus", isFocused.value) - ]); - const { form: elForm, formItem: elFormItem } = useFormItem(); - const { inputId } = useFormItemInputId(props2, { - formItemContext: elFormItem - }); - const inputSize = useFormSize(); - const inputDisabled = useFormDisabled(); - const nsInput = useNamespace("input"); - const nsTextarea = useNamespace("textarea"); - const input = shallowRef(); - const textarea = shallowRef(); - const hovering = ref(false); - const passwordVisible = ref(false); - const countStyle = ref(); - const textareaCalcStyle = shallowRef(props2.inputStyle); - const _ref = computed(() => input.value || textarea.value); - const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController( - _ref, - { - disabled: inputDisabled, - afterBlur() { - var _a; - if (props2.validateEvent) { - (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur").catch((err) => debugWarn(err)); - } - } - } - ); - const needStatusIcon = computed(() => { - var _a; - return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false; - }); - const validateState = computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || ""); - const validateIcon = computed( - () => validateState.value && ValidateComponentsMap[validateState.value] - ); - const passwordIcon = computed( - () => passwordVisible.value ? view_default : hide_default - ); - const containerStyle = computed(() => [ - rawAttrs.style - ]); - const textareaStyle = computed(() => [ - props2.inputStyle, - textareaCalcStyle.value, - { resize: props2.resize } - ]); - const nativeInputValue = computed( - () => isNil_default(props2.modelValue) ? "" : String(props2.modelValue) - ); - const showClear = computed( - () => props2.clearable && !inputDisabled.value && !props2.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value) - ); - const showPwdVisible = computed( - () => props2.showPassword && !inputDisabled.value && !!nativeInputValue.value - ); - const isWordLimitVisible = computed( - () => props2.showWordLimit && !!props2.maxlength && (props2.type === "text" || props2.type === "textarea") && !inputDisabled.value && !props2.readonly && !props2.showPassword - ); - const textLength = computed(() => nativeInputValue.value.length); - const inputExceed = computed( - () => !!isWordLimitVisible.value && textLength.value > Number(props2.maxlength) - ); - const suffixVisible = computed( - () => !!slots.suffix || !!props2.suffixIcon || showClear.value || props2.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value - ); - const hasModelModifiers = computed( - () => !!Object.keys(props2.modelModifiers).length - ); - const [recordCursor, setCursor] = useCursor(input); - useResizeObserver(textarea, (entries) => { - onceInitSizeTextarea(); - if (!isWordLimitVisible.value || props2.resize !== "both" && props2.resize !== "horizontal") - return; - const entry = entries[0]; - const { width } = entry.contentRect; - countStyle.value = { - right: `calc(100% - ${width + 22 - 10}px)` - }; - }); - const resizeTextarea = () => { - const { type: type4, autosize } = props2; - if (!isClient || type4 !== "textarea" || !textarea.value) - return; - if (autosize) { - const minRows = isObject(autosize) ? autosize.minRows : void 0; - const maxRows = isObject(autosize) ? autosize.maxRows : void 0; - const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows); - textareaCalcStyle.value = { - overflowY: "hidden", - ...textareaStyle2 - }; - nextTick(() => { - textarea.value.offsetHeight; - textareaCalcStyle.value = textareaStyle2; - }); - } else { - textareaCalcStyle.value = { - minHeight: calcTextareaHeight(textarea.value).minHeight - }; - } - }; - const createOnceInitResize = (resizeTextarea2) => { - let isInit = false; - return () => { - var _a; - if (isInit || !props2.autosize) - return; - const isElHidden = ((_a = textarea.value) == null ? void 0 : _a.offsetParent) === null; - if (!isElHidden) { - setTimeout(resizeTextarea2); - isInit = true; - } - }; - }; - const onceInitSizeTextarea = createOnceInitResize(resizeTextarea); - const setNativeInputValue = () => { - const input2 = _ref.value; - const formatterValue = props2.formatter ? props2.formatter(nativeInputValue.value) : nativeInputValue.value; - if (!input2 || input2.value === formatterValue || props2.type === "file") - return; - input2.value = formatterValue; - }; - const formatValue = (value) => { - const { trim: trim2, number: number4 } = props2.modelModifiers; - if (trim2) { - value = value.trim(); - } - if (number4) { - value = `${looseToNumber(value)}`; - } - if (props2.formatter && props2.parser) { - value = props2.parser(value); - } - return value; - }; - const handleInput = async (event) => { - if (isComposing.value) - return; - const { lazy } = props2.modelModifiers; - let { value } = event.target; - if (lazy) { - emit(INPUT_EVENT, value); - return; - } - value = formatValue(value); - if (String(value) === nativeInputValue.value) { - if (props2.formatter) { - setNativeInputValue(); - } - return; - } - recordCursor(); - emit(UPDATE_MODEL_EVENT, value); - emit(INPUT_EVENT, value); - await nextTick(); - if (props2.formatter && props2.parser || !hasModelModifiers.value) { - setNativeInputValue(); - } - setCursor(); - }; - const handleChange = async (event) => { - let { value } = event.target; - value = formatValue(value); - if (props2.modelModifiers.lazy) { - emit(UPDATE_MODEL_EVENT, value); - } - emit(CHANGE_EVENT, value, event); - await nextTick(); - setNativeInputValue(); - }; - const { - isComposing, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd - } = useComposition({ emit, afterComposition: handleInput }); - const handlePasswordVisible = () => { - passwordVisible.value = !passwordVisible.value; - }; - const focus = () => { - var _a; - return (_a = _ref.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - return (_a = _ref.value) == null ? void 0 : _a.blur(); - }; - const handleMouseLeave = (evt) => { - hovering.value = false; - emit("mouseleave", evt); - }; - const handleMouseEnter = (evt) => { - hovering.value = true; - emit("mouseenter", evt); - }; - const handleKeydown = (evt) => { - emit("keydown", evt); - }; - const select = () => { - var _a; - (_a = _ref.value) == null ? void 0 : _a.select(); - }; - const clear = () => { - emit(UPDATE_MODEL_EVENT, ""); - emit(CHANGE_EVENT, ""); - emit("clear"); - emit(INPUT_EVENT, ""); - }; - watch( - () => props2.modelValue, - () => { - var _a; - nextTick(() => resizeTextarea()); - if (props2.validateEvent) { - (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn(err)); - } - } - ); - watch(nativeInputValue, (newValue) => { - if (!_ref.value) { - return; - } - const { trim: trim2, number: number4 } = props2.modelModifiers; - const elValue = _ref.value.value; - const displayValue = (number4 || props2.type === "number") && !/^0\d/.test(elValue) ? `${looseToNumber(elValue)}` : elValue; - if (displayValue === newValue) { - return; - } - if (document.activeElement === _ref.value && _ref.value.type !== "range") { - if (trim2 && displayValue.trim() === newValue) { - return; - } - } - setNativeInputValue(); - }); - watch( - () => props2.type, - async () => { - await nextTick(); - setNativeInputValue(); - resizeTextarea(); - } - ); - onMounted(() => { - if (!props2.formatter && props2.parser) { - debugWarn( - COMPONENT_NAME2, - "If you set the parser, you also need to set the formatter." - ); - } - setNativeInputValue(); - nextTick(resizeTextarea); - }); - __expose({ - input, - textarea, - ref: _ref, - textareaStyle, - autosize: toRef(props2, "autosize"), - isComposing, - focus, - blur, - select, - clear, - resizeTextarea - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - containerKls.value, - { - [unref(nsInput).bm("group", "append")]: _ctx.$slots.append, - [unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend - } - ]), - style: normalizeStyle(containerStyle.value), - onMouseenter: handleMouseEnter, - onMouseleave: handleMouseLeave - }, - [ - createCommentVNode(" input "), - _ctx.type !== "textarea" ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createCommentVNode(" prepend slot "), - _ctx.$slots.prepend ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(nsInput).be("group", "prepend")) - }, - [ - renderSlot(_ctx.$slots, "prepend") - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - ref_key: "wrapperRef", - ref: wrapperRef, - class: normalizeClass(wrapperKls.value) - }, - [ - createCommentVNode(" prefix slot "), - _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass(unref(nsInput).e("prefix")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(nsInput).e("prefix-inner")) - }, - [ - renderSlot(_ctx.$slots, "prefix"), - _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(nsInput).e("icon")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode("input", mergeProps({ - id: unref(inputId), - ref_key: "input", - ref: input, - class: unref(nsInput).e("inner") - }, unref(attrs), { - name: _ctx.name, - minlength: _ctx.minlength, - maxlength: _ctx.maxlength, - type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type, - disabled: unref(inputDisabled), - readonly: _ctx.readonly, - autocomplete: _ctx.autocomplete, - tabindex: _ctx.tabindex, - "aria-label": _ctx.ariaLabel, - placeholder: _ctx.placeholder, - style: _ctx.inputStyle, - form: _ctx.form, - autofocus: _ctx.autofocus, - role: _ctx.containerRole, - inputmode: _ctx.inputmode, - onCompositionstart: _cache[0] || (_cache[0] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)), - onCompositionupdate: _cache[1] || (_cache[1] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)), - onCompositionend: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)), - onInput: handleInput, - onChange: handleChange, - onKeydown: handleKeydown - }), null, 16, _hoisted_1), - createCommentVNode(" suffix slot "), - suffixVisible.value ? (openBlock(), createElementBlock( - "span", - { - key: 1, - class: normalizeClass(unref(nsInput).e("suffix")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(nsInput).e("suffix-inner")) - }, - [ - !showClear.value || !showPwdVisible.value || !isWordLimitVisible.value ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - renderSlot(_ctx.$slots, "suffix"), - _ctx.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(nsInput).e("icon")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 64 - )) : createCommentVNode("v-if", true), - showClear.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]), - onMousedown: withModifiers(unref(NOOP), ["prevent"]), - onClick: clear - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true), - showPwdVisible.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 2, - class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]), - onClick: handlePasswordVisible, - onMousedown: withModifiers(unref(NOOP), ["prevent"]), - onMouseup: withModifiers(unref(NOOP), ["prevent"]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(passwordIcon.value))) - ]), - _: 1 - }, 8, ["class", "onMousedown", "onMouseup"])) : createCommentVNode("v-if", true), - isWordLimitVisible.value ? (openBlock(), createElementBlock( - "span", - { - key: 3, - class: normalizeClass([ - unref(nsInput).e("count"), - unref(nsInput).is("outside", _ctx.wordLimitPosition === "outside") - ]) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(nsInput).e("count-inner")) - }, - toDisplayString(textLength.value) + " / " + toDisplayString(_ctx.maxlength), - 3 - ) - ], - 2 - )) : createCommentVNode("v-if", true), - validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 4, - class: normalizeClass([ - unref(nsInput).e("icon"), - unref(nsInput).e("validateIcon"), - unref(nsInput).is("loading", validateState.value === "validating") - ]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(validateIcon.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ), - createCommentVNode(" append slot "), - _ctx.$slots.append ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(nsInput).be("group", "append")) - }, - [ - renderSlot(_ctx.$slots, "append") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 64 - )) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - createCommentVNode(" textarea "), - createBaseVNode("textarea", mergeProps({ - id: unref(inputId), - ref_key: "textarea", - ref: textarea, - class: [unref(nsTextarea).e("inner"), unref(nsInput).is("focus", unref(isFocused))] - }, unref(attrs), { - name: _ctx.name, - minlength: _ctx.minlength, - maxlength: _ctx.maxlength, - tabindex: _ctx.tabindex, - disabled: unref(inputDisabled), - readonly: _ctx.readonly, - autocomplete: _ctx.autocomplete, - style: textareaStyle.value, - "aria-label": _ctx.ariaLabel, - placeholder: _ctx.placeholder, - form: _ctx.form, - autofocus: _ctx.autofocus, - rows: _ctx.rows, - role: _ctx.containerRole, - onCompositionstart: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)), - onCompositionupdate: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)), - onCompositionend: _cache[5] || (_cache[5] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)), - onInput: handleInput, - onFocus: _cache[6] || (_cache[6] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), - onBlur: _cache[7] || (_cache[7] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)), - onChange: handleChange, - onKeydown: handleKeydown - }), null, 16, _hoisted_2), - isWordLimitVisible.value ? (openBlock(), createElementBlock( - "span", - { - key: 0, - style: normalizeStyle(countStyle.value), - class: normalizeClass([ - unref(nsInput).e("count"), - unref(nsInput).is("outside", _ctx.wordLimitPosition === "outside") - ]) - }, - toDisplayString(textLength.value) + " / " + toDisplayString(_ctx.maxlength), - 7 - )) : createCommentVNode("v-if", true) - ], - 64 - )) - ], - 38 - ); - }; - } -}); -var Input = _export_sfc(_sfc_main5, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]); - -// node_modules/element-plus/es/components/input/index.mjs -var ElInput = withInstall(Input); - -// node_modules/element-plus/es/components/scrollbar/src/util.mjs -var GAP = 4; -var BAR_MAP = { - vertical: { - offset: "offsetHeight", - scroll: "scrollTop", - scrollSize: "scrollHeight", - size: "height", - key: "vertical", - axis: "Y", - client: "clientY", - direction: "top" - }, - horizontal: { - offset: "offsetWidth", - scroll: "scrollLeft", - scrollSize: "scrollWidth", - size: "width", - key: "horizontal", - axis: "X", - client: "clientX", - direction: "left" - } -}; -var renderThumbStyle = ({ - move, - size: size3, - bar -}) => ({ - [bar.size]: size3, - transform: `translate${bar.axis}(${move}%)` -}); - -// node_modules/element-plus/es/components/scrollbar/src/constants.mjs -var scrollbarContextKey = Symbol( - "scrollbarContextKey" -); - -// node_modules/element-plus/es/components/scrollbar/src/thumb.mjs -var thumbProps = buildProps({ - vertical: Boolean, - size: String, - move: Number, - ratio: { - type: Number, - required: true - }, - always: Boolean -}); - -// node_modules/element-plus/es/components/scrollbar/src/thumb2.mjs -var COMPONENT_NAME3 = "Thumb"; -var _sfc_main6 = defineComponent({ - __name: "thumb", - props: thumbProps, - setup(__props) { - const props2 = __props; - const scrollbar = inject(scrollbarContextKey); - const ns = useNamespace("scrollbar"); - if (!scrollbar) - throwError(COMPONENT_NAME3, "can not inject scrollbar context"); - const instance = ref(); - const thumb = ref(); - const thumbState = ref({}); - const visible = ref(false); - let cursorDown = false; - let cursorLeave = false; - let baseScrollHeight = 0; - let baseScrollWidth = 0; - let originalOnSelectStart = isClient ? document.onselectstart : null; - const bar = computed(() => BAR_MAP[props2.vertical ? "vertical" : "horizontal"]); - const thumbStyle = computed( - () => renderThumbStyle({ - size: props2.size, - move: props2.move, - bar: bar.value - }) - ); - const offsetRatio = computed( - () => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props2.ratio / thumb.value[bar.value.offset] - ); - const clickThumbHandler = (e) => { - var _a; - e.stopPropagation(); - if (e.ctrlKey || [1, 2].includes(e.button)) - return; - (_a = window.getSelection()) == null ? void 0 : _a.removeAllRanges(); - startDrag(e); - const el = e.currentTarget; - if (!el) - return; - thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]); - }; - const clickTrackHandler = (e) => { - if (!thumb.value || !instance.value || !scrollbar.wrapElement) - return; - const offset3 = Math.abs( - e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client] - ); - const thumbHalf = thumb.value[bar.value.offset] / 2; - const thumbPositionPercentage = (offset3 - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset]; - scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100; - }; - const startDrag = (e) => { - e.stopImmediatePropagation(); - cursorDown = true; - baseScrollHeight = scrollbar.wrapElement.scrollHeight; - baseScrollWidth = scrollbar.wrapElement.scrollWidth; - document.addEventListener("mousemove", mouseMoveDocumentHandler); - document.addEventListener("mouseup", mouseUpDocumentHandler); - originalOnSelectStart = document.onselectstart; - document.onselectstart = () => false; - }; - const mouseMoveDocumentHandler = (e) => { - if (!instance.value || !thumb.value) - return; - if (cursorDown === false) - return; - const prevPage = thumbState.value[bar.value.axis]; - if (!prevPage) - return; - const offset3 = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1; - const thumbClickPosition = thumb.value[bar.value.offset] - prevPage; - const thumbPositionPercentage = (offset3 - thumbClickPosition) * 100 * offsetRatio.value / instance.value[bar.value.offset]; - if (bar.value.scroll === "scrollLeft") { - scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollWidth / 100; - } else { - scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollHeight / 100; - } - }; - const mouseUpDocumentHandler = () => { - cursorDown = false; - thumbState.value[bar.value.axis] = 0; - document.removeEventListener("mousemove", mouseMoveDocumentHandler); - document.removeEventListener("mouseup", mouseUpDocumentHandler); - restoreOnselectstart(); - if (cursorLeave) - visible.value = false; - }; - const mouseMoveScrollbarHandler = () => { - cursorLeave = false; - visible.value = !!props2.size; - }; - const mouseLeaveScrollbarHandler = () => { - cursorLeave = true; - visible.value = cursorDown; - }; - onBeforeUnmount(() => { - restoreOnselectstart(); - document.removeEventListener("mouseup", mouseUpDocumentHandler); - }); - const restoreOnselectstart = () => { - if (document.onselectstart !== originalOnSelectStart) - document.onselectstart = originalOnSelectStart; - }; - useEventListener( - toRef(scrollbar, "scrollbarElement"), - "mousemove", - mouseMoveScrollbarHandler - ); - useEventListener( - toRef(scrollbar, "scrollbarElement"), - "mouseleave", - mouseLeaveScrollbarHandler - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, { - name: unref(ns).b("fade"), - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode( - "div", - { - ref_key: "instance", - ref: instance, - class: normalizeClass([unref(ns).e("bar"), unref(ns).is(bar.value.key)]), - onMousedown: clickTrackHandler, - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])) - }, - [ - createBaseVNode( - "div", - { - ref_key: "thumb", - ref: thumb, - class: normalizeClass(unref(ns).e("thumb")), - style: normalizeStyle(thumbStyle.value), - onMousedown: clickThumbHandler - }, - null, - 38 - ) - ], - 34 - ), [ - [vShow, _ctx.always || visible.value] - ]) - ]), - _: 1 - }, 8, ["name"]); - }; - } -}); -var Thumb = _export_sfc(_sfc_main6, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]); - -// node_modules/element-plus/es/components/scrollbar/src/bar.mjs -var barProps = buildProps({ - always: { - type: Boolean, - default: true - }, - minSize: { - type: Number, - required: true - } -}); - -// node_modules/element-plus/es/components/scrollbar/src/bar2.mjs -var _sfc_main7 = defineComponent({ - __name: "bar", - props: barProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const scrollbar = inject(scrollbarContextKey); - const moveX = ref(0); - const moveY = ref(0); - const sizeWidth = ref(""); - const sizeHeight = ref(""); - const ratioY = ref(1); - const ratioX = ref(1); - const handleScroll2 = (wrap2) => { - if (wrap2) { - const offsetHeight = wrap2.offsetHeight - GAP; - const offsetWidth = wrap2.offsetWidth - GAP; - moveY.value = wrap2.scrollTop * 100 / offsetHeight * ratioY.value; - moveX.value = wrap2.scrollLeft * 100 / offsetWidth * ratioX.value; - } - }; - const update2 = () => { - const wrap2 = scrollbar == null ? void 0 : scrollbar.wrapElement; - if (!wrap2) - return; - const offsetHeight = wrap2.offsetHeight - GAP; - const offsetWidth = wrap2.offsetWidth - GAP; - const originalHeight = offsetHeight ** 2 / wrap2.scrollHeight; - const originalWidth = offsetWidth ** 2 / wrap2.scrollWidth; - const height = Math.max(originalHeight, props2.minSize); - const width = Math.max(originalWidth, props2.minSize); - ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height)); - ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width)); - sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ""; - sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ""; - }; - __expose({ - handleScroll: handleScroll2, - update: update2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - Fragment, - null, - [ - createVNode(Thumb, { - move: moveX.value, - ratio: ratioX.value, - size: sizeWidth.value, - always: _ctx.always - }, null, 8, ["move", "ratio", "size", "always"]), - createVNode(Thumb, { - move: moveY.value, - ratio: ratioY.value, - size: sizeHeight.value, - vertical: "", - always: _ctx.always - }, null, 8, ["move", "ratio", "size", "always"]) - ], - 64 - ); - }; - } -}); -var Bar = _export_sfc(_sfc_main7, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]); - -// node_modules/element-plus/es/components/scrollbar/src/scrollbar.mjs -var scrollbarProps = buildProps({ - distance: { - type: Number, - default: 0 - }, - height: { - type: [String, Number], - default: "" - }, - maxHeight: { - type: [String, Number], - default: "" - }, - native: Boolean, - wrapStyle: { - type: definePropType([String, Object, Array]), - default: "" - }, - wrapClass: { - type: [String, Array], - default: "" - }, - viewClass: { - type: [String, Array], - default: "" - }, - viewStyle: { - type: [String, Array, Object], - default: "" - }, - noresize: Boolean, - tag: { - type: String, - default: "div" - }, - always: Boolean, - minSize: { - type: Number, - default: 20 - }, - tabindex: { - type: [String, Number], - default: void 0 - }, - id: String, - role: String, - ...useAriaProps(["ariaLabel", "ariaOrientation"]) -}); -var scrollbarEmits = { - "end-reached": (direction2) => ["left", "right", "top", "bottom"].includes(direction2), - scroll: ({ - scrollTop, - scrollLeft - }) => [scrollTop, scrollLeft].every(isNumber2) -}; - -// node_modules/element-plus/es/components/scrollbar/src/scrollbar2.mjs -var _hoisted_12 = ["tabindex"]; -var COMPONENT_NAME4 = "ElScrollbar"; -var _sfc_main8 = defineComponent({ - ...{ - name: COMPONENT_NAME4 - }, - __name: "scrollbar", - props: scrollbarProps, - emits: scrollbarEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("scrollbar"); - let stopResizeObserver = void 0; - let stopWrapResizeObserver = void 0; - let stopResizeListener = void 0; - let wrapScrollTop = 0; - let wrapScrollLeft = 0; - let direction2 = ""; - const distanceScrollState = { - bottom: false, - top: false, - right: false, - left: false - }; - const scrollbarRef = ref(); - const wrapRef = ref(); - const resizeRef = ref(); - const barRef = ref(); - const wrapStyle = computed(() => { - const style = {}; - const height = addUnit(props2.height); - const maxHeight = addUnit(props2.maxHeight); - if (height) - style.height = height; - if (maxHeight) - style.maxHeight = maxHeight; - return [props2.wrapStyle, style]; - }); - const wrapKls = computed(() => { - return [ - props2.wrapClass, - ns.e("wrap"), - { [ns.em("wrap", "hidden-default")]: !props2.native } - ]; - }); - const resizeKls = computed(() => { - return [ns.e("view"), props2.viewClass]; - }); - const shouldSkipDirection = (direction22) => { - var _a; - return (_a = distanceScrollState[direction22]) != null ? _a : false; - }; - const DIRECTION_PAIRS = { - top: "bottom", - bottom: "top", - left: "right", - right: "left" - }; - const updateTriggerStatus = (arrivedStates) => { - const oppositeDirection = DIRECTION_PAIRS[direction2]; - if (!oppositeDirection) - return; - const arrived = arrivedStates[direction2]; - const oppositeArrived = arrivedStates[oppositeDirection]; - if (arrived && !distanceScrollState[direction2]) { - distanceScrollState[direction2] = true; - } - if (!oppositeArrived && distanceScrollState[oppositeDirection]) { - distanceScrollState[oppositeDirection] = false; - } - }; - const handleScroll2 = () => { - var _a; - if (wrapRef.value) { - (_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value); - const prevTop = wrapScrollTop; - const prevLeft = wrapScrollLeft; - wrapScrollTop = wrapRef.value.scrollTop; - wrapScrollLeft = wrapRef.value.scrollLeft; - const arrivedStates = { - bottom: wrapScrollTop + wrapRef.value.clientHeight >= wrapRef.value.scrollHeight - props2.distance, - top: wrapScrollTop <= props2.distance && prevTop !== 0, - right: wrapScrollLeft + wrapRef.value.clientWidth >= wrapRef.value.scrollWidth - props2.distance && prevLeft !== wrapScrollLeft, - left: wrapScrollLeft <= props2.distance && prevLeft !== 0 - }; - emit("scroll", { - scrollTop: wrapScrollTop, - scrollLeft: wrapScrollLeft - }); - if (prevTop !== wrapScrollTop) { - direction2 = wrapScrollTop > prevTop ? "bottom" : "top"; - } - if (prevLeft !== wrapScrollLeft) { - direction2 = wrapScrollLeft > prevLeft ? "right" : "left"; - } - if (props2.distance > 0) { - if (shouldSkipDirection(direction2)) { - return; - } - updateTriggerStatus(arrivedStates); - } - if (arrivedStates[direction2]) - emit("end-reached", direction2); - } - }; - function scrollTo2(arg1, arg2) { - if (isObject(arg1)) { - wrapRef.value.scrollTo(arg1); - } else if (isNumber2(arg1) && isNumber2(arg2)) { - wrapRef.value.scrollTo(arg1, arg2); - } - } - const setScrollTop = (value) => { - if (!isNumber2(value)) { - debugWarn(COMPONENT_NAME4, "value must be a number"); - return; - } - wrapRef.value.scrollTop = value; - }; - const setScrollLeft = (value) => { - if (!isNumber2(value)) { - debugWarn(COMPONENT_NAME4, "value must be a number"); - return; - } - wrapRef.value.scrollLeft = value; - }; - const update2 = () => { - var _a; - (_a = barRef.value) == null ? void 0 : _a.update(); - distanceScrollState[direction2] = false; - }; - watch( - () => props2.noresize, - (noresize) => { - if (noresize) { - stopResizeObserver == null ? void 0 : stopResizeObserver(); - stopWrapResizeObserver == null ? void 0 : stopWrapResizeObserver(); - stopResizeListener == null ? void 0 : stopResizeListener(); - } else { - ({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update2)); - ({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update2)); - stopResizeListener = useEventListener("resize", update2); - } - }, - { immediate: true } - ); - watch( - () => [props2.maxHeight, props2.height], - () => { - if (!props2.native) - nextTick(() => { - var _a; - update2(); - if (wrapRef.value) { - (_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value); - } - }); - } - ); - provide( - scrollbarContextKey, - reactive({ - scrollbarElement: scrollbarRef, - wrapElement: wrapRef - }) - ); - onActivated(() => { - if (wrapRef.value) { - wrapRef.value.scrollTop = wrapScrollTop; - wrapRef.value.scrollLeft = wrapScrollLeft; - } - }); - onMounted(() => { - if (!props2.native) - nextTick(() => { - update2(); - }); - }); - onUpdated(() => update2()); - __expose({ - wrapRef, - update: update2, - scrollTo: scrollTo2, - setScrollTop, - setScrollLeft, - handleScroll: handleScroll2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "scrollbarRef", - ref: scrollbarRef, - class: normalizeClass(unref(ns).b()) - }, - [ - createBaseVNode("div", { - ref_key: "wrapRef", - ref: wrapRef, - class: normalizeClass(wrapKls.value), - style: normalizeStyle(wrapStyle.value), - tabindex: _ctx.tabindex, - onScroll: handleScroll2 - }, [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { - id: _ctx.id, - ref_key: "resizeRef", - ref: resizeRef, - class: normalizeClass(resizeKls.value), - style: normalizeStyle(_ctx.viewStyle), - role: _ctx.role, - "aria-label": _ctx.ariaLabel, - "aria-orientation": _ctx.ariaOrientation - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"])) - ], 46, _hoisted_12), - !_ctx.native ? (openBlock(), createBlock(Bar, { - key: 0, - ref_key: "barRef", - ref: barRef, - always: _ctx.always, - "min-size": _ctx.minSize - }, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var Scrollbar = _export_sfc(_sfc_main8, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]); - -// node_modules/element-plus/es/components/scrollbar/index.mjs -var ElScrollbar = withInstall(Scrollbar); - -// node_modules/element-plus/es/components/popper/src/constants.mjs -var POPPER_INJECTION_KEY = Symbol("popper"); -var POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent"); - -// node_modules/element-plus/es/components/popper/src/popper.mjs -var Effect = { - LIGHT: "light", - DARK: "dark" -}; -var roleTypes = [ - "dialog", - "grid", - "group", - "listbox", - "menu", - "navigation", - "tooltip", - "tree" -]; -var popperProps = buildProps({ - role: { - type: String, - values: roleTypes, - default: "tooltip" - } -}); -var usePopperProps = popperProps; - -// node_modules/element-plus/es/components/popper/src/popper2.mjs -var _sfc_main9 = defineComponent({ - ...{ - name: "ElPopper", - inheritAttrs: false - }, - __name: "popper", - props: popperProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const triggerRef2 = ref(); - const popperInstanceRef = ref(); - const contentRef = ref(); - const referenceRef = ref(); - const role = computed(() => props2.role); - const popperProvides = { - triggerRef: triggerRef2, - popperInstanceRef, - contentRef, - referenceRef, - role - }; - __expose(popperProvides); - provide(POPPER_INJECTION_KEY, popperProvides); - return (_ctx, _cache) => { - return renderSlot(_ctx.$slots, "default"); - }; - } -}); -var Popper = _export_sfc(_sfc_main9, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]); - -// node_modules/element-plus/es/components/popper/src/arrow2.mjs -var _sfc_main10 = defineComponent({ - ...{ - name: "ElPopperArrow", - inheritAttrs: false - }, - __name: "arrow", - setup(__props, { expose: __expose }) { - const ns = useNamespace("popper"); - const { arrowRef, arrowStyle } = inject( - POPPER_CONTENT_INJECTION_KEY, - void 0 - ); - onBeforeUnmount(() => { - arrowRef.value = void 0; - }); - __expose({ - arrowRef - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "span", - { - ref_key: "arrowRef", - ref: arrowRef, - class: normalizeClass(unref(ns).e("arrow")), - style: normalizeStyle(unref(arrowStyle)), - "data-popper-arrow": "" - }, - null, - 6 - ); - }; - } -}); -var ElPopperArrow = _export_sfc(_sfc_main10, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]); - -// node_modules/element-plus/es/components/popper/src/trigger.mjs -var popperTriggerProps = buildProps({ - virtualRef: { - type: definePropType(Object) - }, - virtualTriggering: Boolean, - onMouseenter: { - type: definePropType(Function) - }, - onMouseleave: { - type: definePropType(Function) - }, - onClick: { - type: definePropType(Function) - }, - onKeydown: { - type: definePropType(Function) - }, - onFocus: { - type: definePropType(Function) - }, - onBlur: { - type: definePropType(Function) - }, - onContextmenu: { - type: definePropType(Function) - }, - id: String, - open: Boolean -}); -var usePopperTriggerProps = popperTriggerProps; - -// node_modules/element-plus/es/hooks/use-forward-ref/index.mjs -var FORWARD_REF_INJECTION_KEY = Symbol("elForwardRef"); -var useForwardRef = (forwardRef) => { - const setForwardRef = (el) => { - forwardRef.value = el; - }; - provide(FORWARD_REF_INJECTION_KEY, { - setForwardRef - }); -}; -var useForwardRefDirective = (setForwardRef) => { - return { - mounted(el) { - setForwardRef(el); - }, - updated(el) { - setForwardRef(el); - }, - unmounted() { - setForwardRef(null); - } - }; -}; - -// node_modules/element-plus/es/components/slot/src/only-child.mjs -var NAME = "ElOnlyChild"; -var OnlyChild = defineComponent({ - name: NAME, - setup(_2, { - slots, - attrs - }) { - var _a; - const forwardRefInjection = inject(FORWARD_REF_INJECTION_KEY); - const forwardRefDirective = useForwardRefDirective((_a = forwardRefInjection == null ? void 0 : forwardRefInjection.setForwardRef) != null ? _a : NOOP); - return () => { - var _a2; - const defaultSlot = (_a2 = slots.default) == null ? void 0 : _a2.call(slots, attrs); - if (!defaultSlot) - return null; - const [firstLegitNode, length] = findFirstLegitChild(defaultSlot); - if (!firstLegitNode) { - debugWarn(NAME, "no valid child node found"); - return null; - } - if (length > 1) { - debugWarn(NAME, "requires exact only one valid child."); - } - return withDirectives(cloneVNode(firstLegitNode, attrs), [[forwardRefDirective]]); - }; - } -}); -function findFirstLegitChild(node) { - if (!node) - return [null, 0]; - const children = node; - const len = children.filter((c2) => c2.type !== Comment).length; - for (const child of children) { - if (isObject(child)) { - switch (child.type) { - case Comment: - continue; - case Text: - case "svg": - return [wrapTextContent(child), len]; - case Fragment: - return findFirstLegitChild(child.children); - default: - return [child, len]; - } - } - return [wrapTextContent(child), len]; - } - return [null, 0]; -} -function wrapTextContent(s2) { - const ns = useNamespace("only-child"); - return createVNode("span", { - "class": ns.e("content") - }, [s2]); -} - -// node_modules/element-plus/es/components/popper/src/trigger2.mjs -var _sfc_main11 = defineComponent({ - ...{ - name: "ElPopperTrigger", - inheritAttrs: false - }, - __name: "trigger", - props: popperTriggerProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { role, triggerRef: triggerRef2 } = inject(POPPER_INJECTION_KEY, void 0); - useForwardRef(triggerRef2); - const ariaControls = computed(() => { - return ariaHaspopup.value ? props2.id : void 0; - }); - const ariaDescribedby = computed(() => { - if (role && role.value === "tooltip") { - return props2.open && props2.id ? props2.id : void 0; - } - return void 0; - }); - const ariaHaspopup = computed(() => { - if (role && role.value !== "tooltip") { - return role.value; - } - return void 0; - }); - const ariaExpanded = computed(() => { - return ariaHaspopup.value ? `${props2.open}` : void 0; - }); - let virtualTriggerAriaStopWatch = void 0; - const TRIGGER_ELE_EVENTS = [ - "onMouseenter", - "onMouseleave", - "onClick", - "onKeydown", - "onFocus", - "onBlur", - "onContextmenu" - ]; - onMounted(() => { - watch( - () => props2.virtualRef, - (virtualEl) => { - if (virtualEl) { - triggerRef2.value = unrefElement(virtualEl); - } - }, - { - immediate: true - } - ); - watch( - triggerRef2, - (el, prevEl) => { - virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch(); - virtualTriggerAriaStopWatch = void 0; - if (isElement2(prevEl)) { - TRIGGER_ELE_EVENTS.forEach((eventName) => { - const handler = props2[eventName]; - if (handler) { - prevEl.removeEventListener( - eventName.slice(2).toLowerCase(), - handler, - ["onFocus", "onBlur"].includes(eventName) - ); - } - }); - } - if (isElement2(el)) { - TRIGGER_ELE_EVENTS.forEach((eventName) => { - const handler = props2[eventName]; - if (handler) { - el.addEventListener( - eventName.slice(2).toLowerCase(), - handler, - ["onFocus", "onBlur"].includes(eventName) - ); - } - }); - if (isFocusable(el)) { - virtualTriggerAriaStopWatch = watch( - [ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], - (watches) => { - [ - "aria-controls", - "aria-describedby", - "aria-haspopup", - "aria-expanded" - ].forEach((key, idx) => { - isNil_default(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]); - }); - }, - { immediate: true } - ); - } - } - if (isElement2(prevEl) && isFocusable(prevEl)) { - [ - "aria-controls", - "aria-describedby", - "aria-haspopup", - "aria-expanded" - ].forEach((key) => prevEl.removeAttribute(key)); - } - }, - { - immediate: true - } - ); - }); - onBeforeUnmount(() => { - virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch(); - virtualTriggerAriaStopWatch = void 0; - if (triggerRef2.value && isElement2(triggerRef2.value)) { - const el = triggerRef2.value; - TRIGGER_ELE_EVENTS.forEach((eventName) => { - const handler = props2[eventName]; - if (handler) { - el.removeEventListener( - eventName.slice(2).toLowerCase(), - handler, - ["onFocus", "onBlur"].includes(eventName) - ); - } - }); - triggerRef2.value = void 0; - } - }); - __expose({ - triggerRef: triggerRef2 - }); - return (_ctx, _cache) => { - return !_ctx.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, { - "aria-controls": ariaControls.value, - "aria-describedby": ariaDescribedby.value, - "aria-expanded": ariaExpanded.value, - "aria-haspopup": ariaHaspopup.value - }), { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])) : createCommentVNode("v-if", true); - }; - } -}); -var ElPopperTrigger = _export_sfc(_sfc_main11, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]); - -// node_modules/element-plus/es/components/focus-trap/src/tokens.mjs -var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped"; -var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released"; -var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented"; -var FOCUS_AFTER_TRAPPED_OPTS = { - cancelable: true, - bubbles: false -}; -var FOCUSOUT_PREVENTED_OPTS = { - cancelable: true, - bubbles: false -}; -var ON_TRAP_FOCUS_EVT = "focusAfterTrapped"; -var ON_RELEASE_FOCUS_EVT = "focusAfterReleased"; -var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap"); - -// node_modules/element-plus/es/components/focus-trap/src/utils.mjs -var focusReason = ref(); -var lastUserFocusTimestamp = ref(0); -var lastAutomatedFocusTimestamp = ref(0); -var focusReasonUserCount = 0; -var obtainAllFocusableElements2 = (element) => { - const nodes = []; - const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, { - acceptNode: (node) => { - const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; - if (node.disabled || node.hidden || isHiddenInput) - return NodeFilter.FILTER_SKIP; - return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; - } - }); - while (walker.nextNode()) - nodes.push(walker.currentNode); - return nodes; -}; -var getVisibleElement = (elements, container) => { - for (const element of elements) { - if (!isHidden(element, container)) - return element; - } -}; -var isHidden = (element, container) => { - if (false) - return false; - if (getComputedStyle(element).visibility === "hidden") - return true; - while (element) { - if (container && element === container) - return false; - if (getComputedStyle(element).display === "none") - return true; - element = element.parentElement; - } - return false; -}; -var getEdges = (container) => { - const focusable = obtainAllFocusableElements2(container); - const first = getVisibleElement(focusable, container); - const last2 = getVisibleElement(focusable.reverse(), container); - return [first, last2]; -}; -var isSelectable = (element) => { - return element instanceof HTMLInputElement && "select" in element; -}; -var tryFocus = (element, shouldSelect) => { - if (element) { - const prevFocusedElement = document.activeElement; - focusElement(element, { preventScroll: true }); - lastAutomatedFocusTimestamp.value = window.performance.now(); - if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) { - element.select(); - } - } -}; -function removeFromStack(list, item) { - const copy = [...list]; - const idx = list.indexOf(item); - if (idx !== -1) { - copy.splice(idx, 1); - } - return copy; -} -var createFocusableStack = () => { - let stack = []; - const push = (layer) => { - const currentLayer = stack[0]; - if (currentLayer && layer !== currentLayer) { - currentLayer.pause(); - } - stack = removeFromStack(stack, layer); - stack.unshift(layer); - }; - const remove2 = (layer) => { - var _a, _b; - stack = removeFromStack(stack, layer); - (_b = (_a = stack[0]) == null ? void 0 : _a.resume) == null ? void 0 : _b.call(_a); - }; - return { - push, - remove: remove2 - }; -}; -var focusFirstDescendant = (elements, shouldSelect = false) => { - const prevFocusedElement = document.activeElement; - for (const element of elements) { - tryFocus(element, shouldSelect); - if (document.activeElement !== prevFocusedElement) - return; - } -}; -var focusableStack = createFocusableStack(); -var isFocusCausedByUserEvent = () => { - return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value; -}; -var notifyFocusReasonPointer = () => { - focusReason.value = "pointer"; - lastUserFocusTimestamp.value = window.performance.now(); -}; -var notifyFocusReasonKeydown = () => { - focusReason.value = "keyboard"; - lastUserFocusTimestamp.value = window.performance.now(); -}; -var useFocusReason = () => { - onMounted(() => { - if (focusReasonUserCount === 0) { - document.addEventListener("mousedown", notifyFocusReasonPointer); - document.addEventListener("touchstart", notifyFocusReasonPointer); - document.addEventListener("keydown", notifyFocusReasonKeydown); - } - focusReasonUserCount++; - }); - onBeforeUnmount(() => { - focusReasonUserCount--; - if (focusReasonUserCount <= 0) { - document.removeEventListener("mousedown", notifyFocusReasonPointer); - document.removeEventListener("touchstart", notifyFocusReasonPointer); - document.removeEventListener("keydown", notifyFocusReasonKeydown); - } - }); - return { - focusReason, - lastUserFocusTimestamp, - lastAutomatedFocusTimestamp - }; -}; -var createFocusOutPreventedEvent = (detail) => { - return new CustomEvent(FOCUSOUT_PREVENTED, { - ...FOCUSOUT_PREVENTED_OPTS, - detail - }); -}; - -// node_modules/element-plus/es/constants/aria.mjs -var EVENT_CODE = { - tab: "Tab", - enter: "Enter", - space: "Space", - left: "ArrowLeft", - up: "ArrowUp", - right: "ArrowRight", - down: "ArrowDown", - esc: "Escape", - delete: "Delete", - backspace: "Backspace", - numpadEnter: "NumpadEnter", - pageUp: "PageUp", - pageDown: "PageDown", - home: "Home", - end: "End" -}; - -// node_modules/element-plus/es/utils/dom/event.mjs -var composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => { - const handleEvent = (event) => { - const shouldPrevent = theirsHandler == null ? void 0 : theirsHandler(event); - if (checkForDefaultPrevented === false || !shouldPrevent) { - return oursHandler == null ? void 0 : oursHandler(event); - } - }; - return handleEvent; -}; -var whenMouse = (handler) => { - return (e) => e.pointerType === "mouse" ? handler(e) : void 0; -}; -var getEventCode = (event) => { - if (event.code && event.code !== "Unidentified") - return event.code; - const key = getEventKey(event); - if (key) { - if (Object.values(EVENT_CODE).includes(key)) - return key; - switch (key) { - case " ": - return EVENT_CODE.space; - default: - return ""; - } - } - return ""; -}; -var getEventKey = (event) => { - let key = event.key && event.key !== "Unidentified" ? event.key : ""; - if (!key && event.type === "keyup" && isAndroid()) { - const target2 = event.target; - key = target2.value.charAt(target2.selectionStart - 1); - } - return key; -}; - -// node_modules/element-plus/es/hooks/use-escape-keydown/index.mjs -var registeredEscapeHandlers = []; -var cachedHandler = (event) => { - const code = getEventCode(event); - if (code === EVENT_CODE.esc) { - registeredEscapeHandlers.forEach( - (registeredHandler) => registeredHandler(event) - ); - } -}; -var useEscapeKeydown = (handler) => { - onMounted(() => { - if (registeredEscapeHandlers.length === 0) { - document.addEventListener("keydown", cachedHandler); - } - if (isClient) - registeredEscapeHandlers.push(handler); - }); - onBeforeUnmount(() => { - registeredEscapeHandlers = registeredEscapeHandlers.filter( - (registeredHandler) => registeredHandler !== handler - ); - if (registeredEscapeHandlers.length === 0) { - if (isClient) - document.removeEventListener("keydown", cachedHandler); - } - }); -}; - -// node_modules/element-plus/es/components/focus-trap/src/focus-trap.mjs -var _sfc_main12 = defineComponent({ - name: "ElFocusTrap", - inheritAttrs: false, - props: { - loop: Boolean, - trapped: Boolean, - focusTrapEl: Object, - focusStartEl: { - type: [Object, String], - default: "first" - } - }, - emits: [ - ON_TRAP_FOCUS_EVT, - ON_RELEASE_FOCUS_EVT, - "focusin", - "focusout", - "focusout-prevented", - "release-requested" - ], - setup(props2, { emit }) { - const forwardRef = ref(); - let lastFocusBeforeTrapped; - let lastFocusAfterTrapped; - const { focusReason: focusReason2 } = useFocusReason(); - useEscapeKeydown((event) => { - if (props2.trapped && !focusLayer.paused) { - emit("release-requested", event); - } - }); - const focusLayer = { - paused: false, - pause() { - this.paused = true; - }, - resume() { - this.paused = false; - } - }; - const onKeydown = (e) => { - if (!props2.loop && !props2.trapped) - return; - if (focusLayer.paused) - return; - const { altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e; - const { loop } = props2; - const code = getEventCode(e); - const isTabbing = code === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey; - const currentFocusingEl = document.activeElement; - if (isTabbing && currentFocusingEl) { - const container = currentTarget; - const [first, last2] = getEdges(container); - const isTabbable = first && last2; - if (!isTabbable) { - if (currentFocusingEl === container) { - const focusoutPreventedEvent = createFocusOutPreventedEvent({ - focusReason: focusReason2.value - }); - emit("focusout-prevented", focusoutPreventedEvent); - if (!focusoutPreventedEvent.defaultPrevented) { - e.preventDefault(); - } - } - } else { - if (!shiftKey && currentFocusingEl === last2) { - const focusoutPreventedEvent = createFocusOutPreventedEvent({ - focusReason: focusReason2.value - }); - emit("focusout-prevented", focusoutPreventedEvent); - if (!focusoutPreventedEvent.defaultPrevented) { - e.preventDefault(); - if (loop) - tryFocus(first, true); - } - } else if (shiftKey && [first, container].includes(currentFocusingEl)) { - const focusoutPreventedEvent = createFocusOutPreventedEvent({ - focusReason: focusReason2.value - }); - emit("focusout-prevented", focusoutPreventedEvent); - if (!focusoutPreventedEvent.defaultPrevented) { - e.preventDefault(); - if (loop) - tryFocus(last2, true); - } - } - } - } - }; - provide(FOCUS_TRAP_INJECTION_KEY, { - focusTrapRef: forwardRef, - onKeydown - }); - watch( - () => props2.focusTrapEl, - (focusTrapEl) => { - if (focusTrapEl) { - forwardRef.value = focusTrapEl; - } - }, - { immediate: true } - ); - watch([forwardRef], ([forwardRef2], [oldForwardRef]) => { - if (forwardRef2) { - forwardRef2.addEventListener("keydown", onKeydown); - forwardRef2.addEventListener("focusin", onFocusIn); - forwardRef2.addEventListener("focusout", onFocusOut); - } - if (oldForwardRef) { - oldForwardRef.removeEventListener("keydown", onKeydown); - oldForwardRef.removeEventListener("focusin", onFocusIn); - oldForwardRef.removeEventListener("focusout", onFocusOut); - } - }); - const trapOnFocus = (e) => { - emit(ON_TRAP_FOCUS_EVT, e); - }; - const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e); - const onFocusIn = (e) => { - const trapContainer = unref(forwardRef); - if (!trapContainer) - return; - const target2 = e.target; - const relatedTarget = e.relatedTarget; - const isFocusedInTrap = target2 && trapContainer.contains(target2); - if (!props2.trapped) { - const isPrevFocusedInTrap = relatedTarget && trapContainer.contains(relatedTarget); - if (!isPrevFocusedInTrap) { - lastFocusBeforeTrapped = relatedTarget; - } - } - if (isFocusedInTrap) - emit("focusin", e); - if (focusLayer.paused) - return; - if (props2.trapped) { - if (isFocusedInTrap) { - lastFocusAfterTrapped = target2; - } else { - tryFocus(lastFocusAfterTrapped, true); - } - } - }; - const onFocusOut = (e) => { - const trapContainer = unref(forwardRef); - if (focusLayer.paused || !trapContainer) - return; - if (props2.trapped) { - const relatedTarget = e.relatedTarget; - if (!isNil_default(relatedTarget) && !trapContainer.contains(relatedTarget)) { - setTimeout(() => { - if (!focusLayer.paused && props2.trapped) { - const focusoutPreventedEvent = createFocusOutPreventedEvent({ - focusReason: focusReason2.value - }); - emit("focusout-prevented", focusoutPreventedEvent); - if (!focusoutPreventedEvent.defaultPrevented) { - tryFocus(lastFocusAfterTrapped, true); - } - } - }, 0); - } - } else { - const target2 = e.target; - const isFocusedInTrap = target2 && trapContainer.contains(target2); - if (!isFocusedInTrap) - emit("focusout", e); - } - }; - async function startTrap() { - await nextTick(); - const trapContainer = unref(forwardRef); - if (trapContainer) { - focusableStack.push(focusLayer); - const prevFocusedElement = trapContainer.contains( - document.activeElement - ) ? lastFocusBeforeTrapped : document.activeElement; - lastFocusBeforeTrapped = prevFocusedElement; - const isPrevFocusContained = trapContainer.contains(prevFocusedElement); - if (!isPrevFocusContained) { - const focusEvent = new Event( - FOCUS_AFTER_TRAPPED, - FOCUS_AFTER_TRAPPED_OPTS - ); - trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus); - trapContainer.dispatchEvent(focusEvent); - if (!focusEvent.defaultPrevented) { - nextTick(() => { - let focusStartEl = props2.focusStartEl; - if (!isString(focusStartEl)) { - tryFocus(focusStartEl); - if (document.activeElement !== focusStartEl) { - focusStartEl = "first"; - } - } - if (focusStartEl === "first") { - focusFirstDescendant( - obtainAllFocusableElements2(trapContainer), - true - ); - } - if (document.activeElement === prevFocusedElement || focusStartEl === "container") { - tryFocus(trapContainer); - } - }); - } - } - } - } - function stopTrap() { - const trapContainer = unref(forwardRef); - if (trapContainer) { - trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus); - const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, { - ...FOCUS_AFTER_TRAPPED_OPTS, - detail: { - focusReason: focusReason2.value - } - }); - trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus); - trapContainer.dispatchEvent(releasedEvent); - if (!releasedEvent.defaultPrevented && (focusReason2.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) { - tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body); - } - trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus); - focusableStack.remove(focusLayer); - lastFocusBeforeTrapped = null; - lastFocusAfterTrapped = null; - } - } - onMounted(() => { - if (props2.trapped) { - startTrap(); - } - watch( - () => props2.trapped, - (trapped) => { - if (trapped) { - startTrap(); - } else { - stopTrap(); - } - } - ); - }); - onBeforeUnmount(() => { - if (props2.trapped) { - stopTrap(); - } - if (forwardRef.value) { - forwardRef.value.removeEventListener("keydown", onKeydown); - forwardRef.value.removeEventListener("focusin", onFocusIn); - forwardRef.value.removeEventListener("focusout", onFocusOut); - forwardRef.value = void 0; - } - lastFocusBeforeTrapped = null; - lastFocusAfterTrapped = null; - }); - return { - onKeydown - }; - } -}); -function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown }); -} -var ElFocusTrap = _export_sfc(_sfc_main12, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]); - -// node_modules/@popperjs/core/dist/index.mjs -var E = "top"; -var R = "bottom"; -var W = "right"; -var P = "left"; -var me = "auto"; -var G = [E, R, W, P]; -var U = "start"; -var J = "end"; -var Xe = "clippingParents"; -var je = "viewport"; -var K = "popper"; -var Ye = "reference"; -var De = G.reduce(function(t, e) { - return t.concat([e + "-" + U, e + "-" + J]); -}, []); -var Ee = [].concat(G, [me]).reduce(function(t, e) { - return t.concat([e, e + "-" + U, e + "-" + J]); -}, []); -var Ge = "beforeRead"; -var Je = "read"; -var Ke = "afterRead"; -var Qe = "beforeMain"; -var Ze = "main"; -var et = "afterMain"; -var tt = "beforeWrite"; -var nt = "write"; -var rt = "afterWrite"; -var ot = [Ge, Je, Ke, Qe, Ze, et, tt, nt, rt]; -function C(t) { - return t ? (t.nodeName || "").toLowerCase() : null; -} -function H(t) { - if (t == null) return window; - if (t.toString() !== "[object Window]") { - var e = t.ownerDocument; - return e && e.defaultView || window; - } - return t; -} -function Q(t) { - var e = H(t).Element; - return t instanceof e || t instanceof Element; -} -function B(t) { - var e = H(t).HTMLElement; - return t instanceof e || t instanceof HTMLElement; -} -function Pe(t) { - if (typeof ShadowRoot == "undefined") return false; - var e = H(t).ShadowRoot; - return t instanceof e || t instanceof ShadowRoot; -} -function Mt(t) { - var e = t.state; - Object.keys(e.elements).forEach(function(n) { - var r = e.styles[n] || {}, o2 = e.attributes[n] || {}, i = e.elements[n]; - !B(i) || !C(i) || (Object.assign(i.style, r), Object.keys(o2).forEach(function(a2) { - var s2 = o2[a2]; - s2 === false ? i.removeAttribute(a2) : i.setAttribute(a2, s2 === true ? "" : s2); - })); - }); -} -function Rt(t) { - var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} }; - return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() { - Object.keys(e.elements).forEach(function(r) { - var o2 = e.elements[r], i = e.attributes[r] || {}, a2 = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s2 = a2.reduce(function(f2, c2) { - return f2[c2] = "", f2; - }, {}); - !B(o2) || !C(o2) || (Object.assign(o2.style, s2), Object.keys(i).forEach(function(f2) { - o2.removeAttribute(f2); - })); - }); - }; -} -var Ae = { name: "applyStyles", enabled: true, phase: "write", fn: Mt, effect: Rt, requires: ["computeStyles"] }; -function q(t) { - return t.split("-")[0]; -} -var X = Math.max; -var ve = Math.min; -var Z = Math.round; -function ee(t, e) { - e === void 0 && (e = false); - var n = t.getBoundingClientRect(), r = 1, o2 = 1; - if (B(t) && e) { - var i = t.offsetHeight, a2 = t.offsetWidth; - a2 > 0 && (r = Z(n.width) / a2 || 1), i > 0 && (o2 = Z(n.height) / i || 1); - } - return { width: n.width / r, height: n.height / o2, top: n.top / o2, right: n.right / r, bottom: n.bottom / o2, left: n.left / r, x: n.left / r, y: n.top / o2 }; -} -function ke(t) { - var e = ee(t), n = t.offsetWidth, r = t.offsetHeight; - return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r }; -} -function it(t, e) { - var n = e.getRootNode && e.getRootNode(); - if (t.contains(e)) return true; - if (n && Pe(n)) { - var r = e; - do { - if (r && t.isSameNode(r)) return true; - r = r.parentNode || r.host; - } while (r); - } - return false; -} -function N(t) { - return H(t).getComputedStyle(t); -} -function Wt(t) { - return ["table", "td", "th"].indexOf(C(t)) >= 0; -} -function I(t) { - return ((Q(t) ? t.ownerDocument : t.document) || window.document).documentElement; -} -function ge(t) { - return C(t) === "html" ? t : t.assignedSlot || t.parentNode || (Pe(t) ? t.host : null) || I(t); -} -function at2(t) { - return !B(t) || N(t).position === "fixed" ? null : t.offsetParent; -} -function Bt(t) { - var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1; - if (n && B(t)) { - var r = N(t); - if (r.position === "fixed") return null; - } - var o2 = ge(t); - for (Pe(o2) && (o2 = o2.host); B(o2) && ["html", "body"].indexOf(C(o2)) < 0; ) { - var i = N(o2); - if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none") return o2; - o2 = o2.parentNode; - } - return null; -} -function se(t) { - for (var e = H(t), n = at2(t); n && Wt(n) && N(n).position === "static"; ) n = at2(n); - return n && (C(n) === "html" || C(n) === "body" && N(n).position === "static") ? e : n || Bt(t) || e; -} -function Le(t) { - return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y"; -} -function fe(t, e, n) { - return X(t, ve(e, n)); -} -function St(t, e, n) { - var r = fe(t, e, n); - return r > n ? n : r; -} -function st() { - return { top: 0, right: 0, bottom: 0, left: 0 }; -} -function ft(t) { - return Object.assign({}, st(), t); -} -function ct(t, e) { - return e.reduce(function(n, r) { - return n[r] = t, n; - }, {}); -} -var Tt = function(t, e) { - return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, ft(typeof t != "number" ? t : ct(t, G)); -}; -function Ht(t) { - var e, n = t.state, r = t.name, o2 = t.options, i = n.elements.arrow, a2 = n.modifiersData.popperOffsets, s2 = q(n.placement), f2 = Le(s2), c2 = [P, W].indexOf(s2) >= 0, u2 = c2 ? "height" : "width"; - if (!(!i || !a2)) { - var m2 = Tt(o2.padding, n), v2 = ke(i), l2 = f2 === "y" ? E : P, h3 = f2 === "y" ? R : W, p2 = n.rects.reference[u2] + n.rects.reference[f2] - a2[f2] - n.rects.popper[u2], g = a2[f2] - n.rects.reference[f2], x2 = se(i), y = x2 ? f2 === "y" ? x2.clientHeight || 0 : x2.clientWidth || 0 : 0, $ = p2 / 2 - g / 2, d2 = m2[l2], b2 = y - v2[u2] - m2[h3], w2 = y / 2 - v2[u2] / 2 + $, O2 = fe(d2, w2, b2), j = f2; - n.modifiersData[r] = (e = {}, e[j] = O2, e.centerOffset = O2 - w2, e); - } -} -function Ct(t) { - var e = t.state, n = t.options, r = n.element, o2 = r === void 0 ? "[data-popper-arrow]" : r; - o2 != null && (typeof o2 == "string" && (o2 = e.elements.popper.querySelector(o2), !o2) || !it(e.elements.popper, o2) || (e.elements.arrow = o2)); -} -var pt = { name: "arrow", enabled: true, phase: "main", fn: Ht, effect: Ct, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; -function te(t) { - return t.split("-")[1]; -} -var qt = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; -function Vt(t) { - var e = t.x, n = t.y, r = window, o2 = r.devicePixelRatio || 1; - return { x: Z(e * o2) / o2 || 0, y: Z(n * o2) / o2 || 0 }; -} -function ut(t) { - var e, n = t.popper, r = t.popperRect, o2 = t.placement, i = t.variation, a2 = t.offsets, s2 = t.position, f2 = t.gpuAcceleration, c2 = t.adaptive, u2 = t.roundOffsets, m2 = t.isFixed, v2 = a2.x, l2 = v2 === void 0 ? 0 : v2, h3 = a2.y, p2 = h3 === void 0 ? 0 : h3, g = typeof u2 == "function" ? u2({ x: l2, y: p2 }) : { x: l2, y: p2 }; - l2 = g.x, p2 = g.y; - var x2 = a2.hasOwnProperty("x"), y = a2.hasOwnProperty("y"), $ = P, d2 = E, b2 = window; - if (c2) { - var w2 = se(n), O2 = "clientHeight", j = "clientWidth"; - if (w2 === H(n) && (w2 = I(n), N(w2).position !== "static" && s2 === "absolute" && (O2 = "scrollHeight", j = "scrollWidth")), w2 = w2, o2 === E || (o2 === P || o2 === W) && i === J) { - d2 = R; - var A2 = m2 && w2 === b2 && b2.visualViewport ? b2.visualViewport.height : w2[O2]; - p2 -= A2 - r.height, p2 *= f2 ? 1 : -1; - } - if (o2 === P || (o2 === E || o2 === R) && i === J) { - $ = W; - var k = m2 && w2 === b2 && b2.visualViewport ? b2.visualViewport.width : w2[j]; - l2 -= k - r.width, l2 *= f2 ? 1 : -1; - } - } - var D2 = Object.assign({ position: s2 }, c2 && qt), S2 = u2 === true ? Vt({ x: l2, y: p2 }) : { x: l2, y: p2 }; - if (l2 = S2.x, p2 = S2.y, f2) { - var L; - return Object.assign({}, D2, (L = {}, L[d2] = y ? "0" : "", L[$] = x2 ? "0" : "", L.transform = (b2.devicePixelRatio || 1) <= 1 ? "translate(" + l2 + "px, " + p2 + "px)" : "translate3d(" + l2 + "px, " + p2 + "px, 0)", L)); - } - return Object.assign({}, D2, (e = {}, e[d2] = y ? p2 + "px" : "", e[$] = x2 ? l2 + "px" : "", e.transform = "", e)); -} -function Nt(t) { - var e = t.state, n = t.options, r = n.gpuAcceleration, o2 = r === void 0 ? true : r, i = n.adaptive, a2 = i === void 0 ? true : i, s2 = n.roundOffsets, f2 = s2 === void 0 ? true : s2, c2 = { placement: q(e.placement), variation: te(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: o2, isFixed: e.options.strategy === "fixed" }; - e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, ut(Object.assign({}, c2, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: a2, roundOffsets: f2 })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, ut(Object.assign({}, c2, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: f2 })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement }); -} -var Me = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: Nt, data: {} }; -var ye = { passive: true }; -function It(t) { - var e = t.state, n = t.instance, r = t.options, o2 = r.scroll, i = o2 === void 0 ? true : o2, a2 = r.resize, s2 = a2 === void 0 ? true : a2, f2 = H(e.elements.popper), c2 = [].concat(e.scrollParents.reference, e.scrollParents.popper); - return i && c2.forEach(function(u2) { - u2.addEventListener("scroll", n.update, ye); - }), s2 && f2.addEventListener("resize", n.update, ye), function() { - i && c2.forEach(function(u2) { - u2.removeEventListener("scroll", n.update, ye); - }), s2 && f2.removeEventListener("resize", n.update, ye); - }; -} -var Re = { name: "eventListeners", enabled: true, phase: "write", fn: function() { -}, effect: It, data: {} }; -var _t = { left: "right", right: "left", bottom: "top", top: "bottom" }; -function be(t) { - return t.replace(/left|right|bottom|top/g, function(e) { - return _t[e]; - }); -} -var zt = { start: "end", end: "start" }; -function lt2(t) { - return t.replace(/start|end/g, function(e) { - return zt[e]; - }); -} -function We(t) { - var e = H(t), n = e.pageXOffset, r = e.pageYOffset; - return { scrollLeft: n, scrollTop: r }; -} -function Be(t) { - return ee(I(t)).left + We(t).scrollLeft; -} -function Ft(t) { - var e = H(t), n = I(t), r = e.visualViewport, o2 = n.clientWidth, i = n.clientHeight, a2 = 0, s2 = 0; - return r && (o2 = r.width, i = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a2 = r.offsetLeft, s2 = r.offsetTop)), { width: o2, height: i, x: a2 + Be(t), y: s2 }; -} -function Ut(t) { - var e, n = I(t), r = We(t), o2 = (e = t.ownerDocument) == null ? void 0 : e.body, i = X(n.scrollWidth, n.clientWidth, o2 ? o2.scrollWidth : 0, o2 ? o2.clientWidth : 0), a2 = X(n.scrollHeight, n.clientHeight, o2 ? o2.scrollHeight : 0, o2 ? o2.clientHeight : 0), s2 = -r.scrollLeft + Be(t), f2 = -r.scrollTop; - return N(o2 || n).direction === "rtl" && (s2 += X(n.clientWidth, o2 ? o2.clientWidth : 0) - i), { width: i, height: a2, x: s2, y: f2 }; -} -function Se(t) { - var e = N(t), n = e.overflow, r = e.overflowX, o2 = e.overflowY; - return /auto|scroll|overlay|hidden/.test(n + o2 + r); -} -function dt(t) { - return ["html", "body", "#document"].indexOf(C(t)) >= 0 ? t.ownerDocument.body : B(t) && Se(t) ? t : dt(ge(t)); -} -function ce(t, e) { - var n; - e === void 0 && (e = []); - var r = dt(t), o2 = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = H(r), a2 = o2 ? [i].concat(i.visualViewport || [], Se(r) ? r : []) : r, s2 = e.concat(a2); - return o2 ? s2 : s2.concat(ce(ge(a2))); -} -function Te(t) { - return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height }); -} -function Xt(t) { - var e = ee(t); - return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e; -} -function ht(t, e) { - return e === je ? Te(Ft(t)) : Q(e) ? Xt(e) : Te(Ut(I(t))); -} -function Yt(t) { - var e = ce(ge(t)), n = ["absolute", "fixed"].indexOf(N(t).position) >= 0, r = n && B(t) ? se(t) : t; - return Q(r) ? e.filter(function(o2) { - return Q(o2) && it(o2, r) && C(o2) !== "body"; - }) : []; -} -function Gt(t, e, n) { - var r = e === "clippingParents" ? Yt(t) : [].concat(e), o2 = [].concat(r, [n]), i = o2[0], a2 = o2.reduce(function(s2, f2) { - var c2 = ht(t, f2); - return s2.top = X(c2.top, s2.top), s2.right = ve(c2.right, s2.right), s2.bottom = ve(c2.bottom, s2.bottom), s2.left = X(c2.left, s2.left), s2; - }, ht(t, i)); - return a2.width = a2.right - a2.left, a2.height = a2.bottom - a2.top, a2.x = a2.left, a2.y = a2.top, a2; -} -function mt(t) { - var e = t.reference, n = t.element, r = t.placement, o2 = r ? q(r) : null, i = r ? te(r) : null, a2 = e.x + e.width / 2 - n.width / 2, s2 = e.y + e.height / 2 - n.height / 2, f2; - switch (o2) { - case E: - f2 = { x: a2, y: e.y - n.height }; - break; - case R: - f2 = { x: a2, y: e.y + e.height }; - break; - case W: - f2 = { x: e.x + e.width, y: s2 }; - break; - case P: - f2 = { x: e.x - n.width, y: s2 }; - break; - default: - f2 = { x: e.x, y: e.y }; - } - var c2 = o2 ? Le(o2) : null; - if (c2 != null) { - var u2 = c2 === "y" ? "height" : "width"; - switch (i) { - case U: - f2[c2] = f2[c2] - (e[u2] / 2 - n[u2] / 2); - break; - case J: - f2[c2] = f2[c2] + (e[u2] / 2 - n[u2] / 2); - break; - } - } - return f2; -} -function ne(t, e) { - e === void 0 && (e = {}); - var n = e, r = n.placement, o2 = r === void 0 ? t.placement : r, i = n.boundary, a2 = i === void 0 ? Xe : i, s2 = n.rootBoundary, f2 = s2 === void 0 ? je : s2, c2 = n.elementContext, u2 = c2 === void 0 ? K : c2, m2 = n.altBoundary, v2 = m2 === void 0 ? false : m2, l2 = n.padding, h3 = l2 === void 0 ? 0 : l2, p2 = ft(typeof h3 != "number" ? h3 : ct(h3, G)), g = u2 === K ? Ye : K, x2 = t.rects.popper, y = t.elements[v2 ? g : u2], $ = Gt(Q(y) ? y : y.contextElement || I(t.elements.popper), a2, f2), d2 = ee(t.elements.reference), b2 = mt({ reference: d2, element: x2, strategy: "absolute", placement: o2 }), w2 = Te(Object.assign({}, x2, b2)), O2 = u2 === K ? w2 : d2, j = { top: $.top - O2.top + p2.top, bottom: O2.bottom - $.bottom + p2.bottom, left: $.left - O2.left + p2.left, right: O2.right - $.right + p2.right }, A2 = t.modifiersData.offset; - if (u2 === K && A2) { - var k = A2[o2]; - Object.keys(j).forEach(function(D2) { - var S2 = [W, R].indexOf(D2) >= 0 ? 1 : -1, L = [E, R].indexOf(D2) >= 0 ? "y" : "x"; - j[D2] += k[L] * S2; - }); - } - return j; -} -function Jt(t, e) { - e === void 0 && (e = {}); - var n = e, r = n.placement, o2 = n.boundary, i = n.rootBoundary, a2 = n.padding, s2 = n.flipVariations, f2 = n.allowedAutoPlacements, c2 = f2 === void 0 ? Ee : f2, u2 = te(r), m2 = u2 ? s2 ? De : De.filter(function(h3) { - return te(h3) === u2; - }) : G, v2 = m2.filter(function(h3) { - return c2.indexOf(h3) >= 0; - }); - v2.length === 0 && (v2 = m2); - var l2 = v2.reduce(function(h3, p2) { - return h3[p2] = ne(t, { placement: p2, boundary: o2, rootBoundary: i, padding: a2 })[q(p2)], h3; - }, {}); - return Object.keys(l2).sort(function(h3, p2) { - return l2[h3] - l2[p2]; - }); -} -function Kt(t) { - if (q(t) === me) return []; - var e = be(t); - return [lt2(t), e, lt2(e)]; -} -function Qt(t) { - var e = t.state, n = t.options, r = t.name; - if (!e.modifiersData[r]._skip) { - for (var o2 = n.mainAxis, i = o2 === void 0 ? true : o2, a2 = n.altAxis, s2 = a2 === void 0 ? true : a2, f2 = n.fallbackPlacements, c2 = n.padding, u2 = n.boundary, m2 = n.rootBoundary, v2 = n.altBoundary, l2 = n.flipVariations, h3 = l2 === void 0 ? true : l2, p2 = n.allowedAutoPlacements, g = e.options.placement, x2 = q(g), y = x2 === g, $ = f2 || (y || !h3 ? [be(g)] : Kt(g)), d2 = [g].concat($).reduce(function(z, V) { - return z.concat(q(V) === me ? Jt(e, { placement: V, boundary: u2, rootBoundary: m2, padding: c2, flipVariations: h3, allowedAutoPlacements: p2 }) : V); - }, []), b2 = e.rects.reference, w2 = e.rects.popper, O2 = /* @__PURE__ */ new Map(), j = true, A2 = d2[0], k = 0; k < d2.length; k++) { - var D2 = d2[k], S2 = q(D2), L = te(D2) === U, re = [E, R].indexOf(S2) >= 0, oe = re ? "width" : "height", M2 = ne(e, { placement: D2, boundary: u2, rootBoundary: m2, altBoundary: v2, padding: c2 }), T2 = re ? L ? W : P : L ? R : E; - b2[oe] > w2[oe] && (T2 = be(T2)); - var pe = be(T2), _2 = []; - if (i && _2.push(M2[S2] <= 0), s2 && _2.push(M2[T2] <= 0, M2[pe] <= 0), _2.every(function(z) { - return z; - })) { - A2 = D2, j = false; - break; - } - O2.set(D2, _2); - } - if (j) for (var ue = h3 ? 3 : 1, xe = function(z) { - var V = d2.find(function(de) { - var ae = O2.get(de); - if (ae) return ae.slice(0, z).every(function(Y2) { - return Y2; - }); - }); - if (V) return A2 = V, "break"; - }, ie = ue; ie > 0; ie--) { - var le = xe(ie); - if (le === "break") break; - } - e.placement !== A2 && (e.modifiersData[r]._skip = true, e.placement = A2, e.reset = true); - } -} -var vt = { name: "flip", enabled: true, phase: "main", fn: Qt, requiresIfExists: ["offset"], data: { _skip: false } }; -function gt2(t, e, n) { - return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x }; -} -function yt(t) { - return [E, W, R, P].some(function(e) { - return t[e] >= 0; - }); -} -function Zt(t) { - var e = t.state, n = t.name, r = e.rects.reference, o2 = e.rects.popper, i = e.modifiersData.preventOverflow, a2 = ne(e, { elementContext: "reference" }), s2 = ne(e, { altBoundary: true }), f2 = gt2(a2, r), c2 = gt2(s2, o2, i), u2 = yt(f2), m2 = yt(c2); - e.modifiersData[n] = { referenceClippingOffsets: f2, popperEscapeOffsets: c2, isReferenceHidden: u2, hasPopperEscaped: m2 }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": u2, "data-popper-escaped": m2 }); -} -var bt = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: Zt }; -function en(t, e, n) { - var r = q(t), o2 = [P, E].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, a2 = i[0], s2 = i[1]; - return a2 = a2 || 0, s2 = (s2 || 0) * o2, [P, W].indexOf(r) >= 0 ? { x: s2, y: a2 } : { x: a2, y: s2 }; -} -function tn(t) { - var e = t.state, n = t.options, r = t.name, o2 = n.offset, i = o2 === void 0 ? [0, 0] : o2, a2 = Ee.reduce(function(u2, m2) { - return u2[m2] = en(m2, e.rects, i), u2; - }, {}), s2 = a2[e.placement], f2 = s2.x, c2 = s2.y; - e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += f2, e.modifiersData.popperOffsets.y += c2), e.modifiersData[r] = a2; -} -var wt = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: tn }; -function nn(t) { - var e = t.state, n = t.name; - e.modifiersData[n] = mt({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement }); -} -var He = { name: "popperOffsets", enabled: true, phase: "read", fn: nn, data: {} }; -function rn(t) { - return t === "x" ? "y" : "x"; -} -function on(t) { - var e = t.state, n = t.options, r = t.name, o2 = n.mainAxis, i = o2 === void 0 ? true : o2, a2 = n.altAxis, s2 = a2 === void 0 ? false : a2, f2 = n.boundary, c2 = n.rootBoundary, u2 = n.altBoundary, m2 = n.padding, v2 = n.tether, l2 = v2 === void 0 ? true : v2, h3 = n.tetherOffset, p2 = h3 === void 0 ? 0 : h3, g = ne(e, { boundary: f2, rootBoundary: c2, padding: m2, altBoundary: u2 }), x2 = q(e.placement), y = te(e.placement), $ = !y, d2 = Le(x2), b2 = rn(d2), w2 = e.modifiersData.popperOffsets, O2 = e.rects.reference, j = e.rects.popper, A2 = typeof p2 == "function" ? p2(Object.assign({}, e.rects, { placement: e.placement })) : p2, k = typeof A2 == "number" ? { mainAxis: A2, altAxis: A2 } : Object.assign({ mainAxis: 0, altAxis: 0 }, A2), D2 = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, S2 = { x: 0, y: 0 }; - if (w2) { - if (i) { - var L, re = d2 === "y" ? E : P, oe = d2 === "y" ? R : W, M2 = d2 === "y" ? "height" : "width", T2 = w2[d2], pe = T2 + g[re], _2 = T2 - g[oe], ue = l2 ? -j[M2] / 2 : 0, xe = y === U ? O2[M2] : j[M2], ie = y === U ? -j[M2] : -O2[M2], le = e.elements.arrow, z = l2 && le ? ke(le) : { width: 0, height: 0 }, V = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : st(), de = V[re], ae = V[oe], Y2 = fe(0, O2[M2], z[M2]), jt = $ ? O2[M2] / 2 - ue - Y2 - de - k.mainAxis : xe - Y2 - de - k.mainAxis, Dt = $ ? -O2[M2] / 2 + ue + Y2 + ae + k.mainAxis : ie + Y2 + ae + k.mainAxis, Oe = e.elements.arrow && se(e.elements.arrow), Et = Oe ? d2 === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (L = D2 == null ? void 0 : D2[d2]) != null ? L : 0, Pt = T2 + jt - Ce - Et, At = T2 + Dt - Ce, qe = fe(l2 ? ve(pe, Pt) : pe, T2, l2 ? X(_2, At) : _2); - w2[d2] = qe, S2[d2] = qe - T2; - } - if (s2) { - var Ve, kt = d2 === "x" ? E : P, Lt = d2 === "x" ? R : W, F2 = w2[b2], he = b2 === "y" ? "height" : "width", Ne = F2 + g[kt], Ie = F2 - g[Lt], $e = [E, P].indexOf(x2) !== -1, _e = (Ve = D2 == null ? void 0 : D2[b2]) != null ? Ve : 0, ze = $e ? Ne : F2 - O2[he] - j[he] - _e + k.altAxis, Fe = $e ? F2 + O2[he] + j[he] - _e - k.altAxis : Ie, Ue = l2 && $e ? St(ze, F2, Fe) : fe(l2 ? ze : Ne, F2, l2 ? Fe : Ie); - w2[b2] = Ue, S2[b2] = Ue - F2; - } - e.modifiersData[r] = S2; - } -} -var xt = { name: "preventOverflow", enabled: true, phase: "main", fn: on, requiresIfExists: ["offset"] }; -function an(t) { - return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop }; -} -function sn(t) { - return t === H(t) || !B(t) ? We(t) : an(t); -} -function fn(t) { - var e = t.getBoundingClientRect(), n = Z(e.width) / t.offsetWidth || 1, r = Z(e.height) / t.offsetHeight || 1; - return n !== 1 || r !== 1; -} -function cn(t, e, n) { - n === void 0 && (n = false); - var r = B(e), o2 = B(e) && fn(e), i = I(e), a2 = ee(t, o2), s2 = { scrollLeft: 0, scrollTop: 0 }, f2 = { x: 0, y: 0 }; - return (r || !r && !n) && ((C(e) !== "body" || Se(i)) && (s2 = sn(e)), B(e) ? (f2 = ee(e, true), f2.x += e.clientLeft, f2.y += e.clientTop) : i && (f2.x = Be(i))), { x: a2.left + s2.scrollLeft - f2.x, y: a2.top + s2.scrollTop - f2.y, width: a2.width, height: a2.height }; -} -function pn(t) { - var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; - t.forEach(function(i) { - e.set(i.name, i); - }); - function o2(i) { - n.add(i.name); - var a2 = [].concat(i.requires || [], i.requiresIfExists || []); - a2.forEach(function(s2) { - if (!n.has(s2)) { - var f2 = e.get(s2); - f2 && o2(f2); - } - }), r.push(i); - } - return t.forEach(function(i) { - n.has(i.name) || o2(i); - }), r; -} -function un(t) { - var e = pn(t); - return ot.reduce(function(n, r) { - return n.concat(e.filter(function(o2) { - return o2.phase === r; - })); - }, []); -} -function ln(t) { - var e; - return function() { - return e || (e = new Promise(function(n) { - Promise.resolve().then(function() { - e = void 0, n(t()); - }); - })), e; - }; -} -function dn(t) { - var e = t.reduce(function(n, r) { - var o2 = n[r.name]; - return n[r.name] = o2 ? Object.assign({}, o2, r, { options: Object.assign({}, o2.options, r.options), data: Object.assign({}, o2.data, r.data) }) : r, n; - }, {}); - return Object.keys(e).map(function(n) { - return e[n]; - }); -} -var Ot = { placement: "bottom", modifiers: [], strategy: "absolute" }; -function $t() { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - return !e.some(function(r) { - return !(r && typeof r.getBoundingClientRect == "function"); - }); -} -function we(t) { - t === void 0 && (t = {}); - var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o2 = e.defaultOptions, i = o2 === void 0 ? Ot : o2; - return function(a2, s2, f2) { - f2 === void 0 && (f2 = i); - var c2 = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Ot, i), modifiersData: {}, elements: { reference: a2, popper: s2 }, attributes: {}, styles: {} }, u2 = [], m2 = false, v2 = { state: c2, setOptions: function(p2) { - var g = typeof p2 == "function" ? p2(c2.options) : p2; - h3(), c2.options = Object.assign({}, i, c2.options, g), c2.scrollParents = { reference: Q(a2) ? ce(a2) : a2.contextElement ? ce(a2.contextElement) : [], popper: ce(s2) }; - var x2 = un(dn([].concat(r, c2.options.modifiers))); - return c2.orderedModifiers = x2.filter(function(y) { - return y.enabled; - }), l2(), v2.update(); - }, forceUpdate: function() { - if (!m2) { - var p2 = c2.elements, g = p2.reference, x2 = p2.popper; - if ($t(g, x2)) { - c2.rects = { reference: cn(g, se(x2), c2.options.strategy === "fixed"), popper: ke(x2) }, c2.reset = false, c2.placement = c2.options.placement, c2.orderedModifiers.forEach(function(j) { - return c2.modifiersData[j.name] = Object.assign({}, j.data); - }); - for (var y = 0; y < c2.orderedModifiers.length; y++) { - if (c2.reset === true) { - c2.reset = false, y = -1; - continue; - } - var $ = c2.orderedModifiers[y], d2 = $.fn, b2 = $.options, w2 = b2 === void 0 ? {} : b2, O2 = $.name; - typeof d2 == "function" && (c2 = d2({ state: c2, options: w2, name: O2, instance: v2 }) || c2); - } - } - } - }, update: ln(function() { - return new Promise(function(p2) { - v2.forceUpdate(), p2(c2); - }); - }), destroy: function() { - h3(), m2 = true; - } }; - if (!$t(a2, s2)) return v2; - v2.setOptions(f2).then(function(p2) { - !m2 && f2.onFirstUpdate && f2.onFirstUpdate(p2); - }); - function l2() { - c2.orderedModifiers.forEach(function(p2) { - var g = p2.name, x2 = p2.options, y = x2 === void 0 ? {} : x2, $ = p2.effect; - if (typeof $ == "function") { - var d2 = $({ state: c2, name: g, instance: v2, options: y }), b2 = function() { - }; - u2.push(d2 || b2); - } - }); - } - function h3() { - u2.forEach(function(p2) { - return p2(); - }), u2 = []; - } - return v2; - }; -} -var hn = we(); -var mn = [Re, He, Me, Ae]; -var vn = we({ defaultModifiers: mn }); -var gn = [Re, He, Me, Ae, wt, vt, xt, pt, bt]; -var yn = we({ defaultModifiers: gn }); - -// node_modules/element-plus/es/components/popper/src/arrow.mjs -var popperArrowProps = buildProps({ - arrowOffset: { - type: Number, - default: 5 - } -}); -var usePopperArrowProps = popperArrowProps; - -// node_modules/element-plus/es/components/popper/src/content.mjs -var POSITIONING_STRATEGIES = ["fixed", "absolute"]; -var popperCoreConfigProps = buildProps({ - boundariesPadding: { - type: Number, - default: 0 - }, - fallbackPlacements: { - type: definePropType(Array), - default: void 0 - }, - gpuAcceleration: { - type: Boolean, - default: true - }, - offset: { - type: Number, - default: 12 - }, - placement: { - type: String, - values: Ee, - default: "bottom" - }, - popperOptions: { - type: definePropType(Object), - default: () => ({}) - }, - strategy: { - type: String, - values: POSITIONING_STRATEGIES, - default: "absolute" - } -}); -var popperContentProps = buildProps({ - ...popperCoreConfigProps, - ...popperArrowProps, - id: String, - style: { - type: definePropType([String, Array, Object]) - }, - className: { - type: definePropType([String, Array, Object]) - }, - effect: { - type: definePropType(String), - default: "dark" - }, - visible: Boolean, - enterable: { - type: Boolean, - default: true - }, - pure: Boolean, - focusOnShow: Boolean, - trapping: Boolean, - popperClass: { - type: definePropType([String, Array, Object]) - }, - popperStyle: { - type: definePropType([String, Array, Object]) - }, - referenceEl: { - type: definePropType(Object) - }, - triggerTargetEl: { - type: definePropType(Object) - }, - stopPopperMouseEvent: { - type: Boolean, - default: true - }, - virtualTriggering: Boolean, - zIndex: Number, - ...useAriaProps(["ariaLabel"]), - loop: Boolean -}); -var popperContentEmits = { - mouseenter: (evt) => evt instanceof MouseEvent, - mouseleave: (evt) => evt instanceof MouseEvent, - focus: () => true, - blur: () => true, - close: () => true -}; -var usePopperCoreConfigProps = popperCoreConfigProps; -var usePopperContentProps = popperContentProps; -var usePopperContentEmits = popperContentEmits; - -// node_modules/element-plus/es/components/popper/src/composables/use-focus-trap.mjs -var usePopperContentFocusTrap = (props2, emit) => { - const trapped = ref(false); - const focusStartRef = ref(); - const onFocusAfterTrapped = () => { - emit("focus"); - }; - const onFocusAfterReleased = (event) => { - var _a; - if (((_a = event.detail) == null ? void 0 : _a.focusReason) !== "pointer") { - focusStartRef.value = "first"; - emit("blur"); - } - }; - const onFocusInTrap = (event) => { - if (props2.visible && !trapped.value) { - if (event.target) { - focusStartRef.value = event.target; - } - trapped.value = true; - } - }; - const onFocusoutPrevented = (event) => { - if (!props2.trapping) { - if (event.detail.focusReason === "pointer") { - event.preventDefault(); - } - trapped.value = false; - } - }; - const onReleaseRequested = () => { - trapped.value = false; - emit("close"); - }; - onBeforeUnmount(() => { - focusStartRef.value = void 0; - }); - return { - focusStartRef, - trapped, - onFocusAfterReleased, - onFocusAfterTrapped, - onFocusInTrap, - onFocusoutPrevented, - onReleaseRequested - }; -}; - -// node_modules/element-plus/es/components/popper/src/utils.mjs -var buildPopperOptions = (props2, modifiers = []) => { - const { placement, strategy, popperOptions } = props2; - const options = { - placement, - strategy, - ...popperOptions, - modifiers: [...genModifiers(props2), ...modifiers] - }; - deriveExtraModifiers(options, popperOptions == null ? void 0 : popperOptions.modifiers); - return options; -}; -var unwrapMeasurableEl = ($el) => { - if (!isClient) - return; - return unrefElement($el); -}; -function genModifiers(options) { - const { offset: offset3, gpuAcceleration, fallbackPlacements } = options; - return [ - { - name: "offset", - options: { - offset: [0, offset3 != null ? offset3 : 12] - } - }, - { - name: "preventOverflow", - options: { - padding: { - top: 0, - bottom: 0, - left: 0, - right: 0 - } - } - }, - { - name: "flip", - options: { - padding: 5, - fallbackPlacements - } - }, - { - name: "computeStyles", - options: { - gpuAcceleration - } - } - ]; -} -function deriveExtraModifiers(options, modifiers) { - if (modifiers) { - options.modifiers = [...options.modifiers, ...modifiers != null ? modifiers : []]; - } -} - -// node_modules/element-plus/es/hooks/use-popper/index.mjs -var usePopper = (referenceElementRef, popperElementRef, opts = {}) => { - const stateUpdater = { - name: "updateState", - enabled: true, - phase: "write", - fn: ({ state }) => { - const derivedState = deriveState(state); - Object.assign(states.value, derivedState); - }, - requires: ["computeStyles"] - }; - const options = computed(() => { - const { onFirstUpdate, placement, strategy, modifiers } = unref(opts); - return { - onFirstUpdate, - placement: placement || "bottom", - strategy: strategy || "absolute", - modifiers: [ - ...modifiers || [], - stateUpdater, - { name: "applyStyles", enabled: false } - ] - }; - }); - const instanceRef = shallowRef(); - const states = ref({ - styles: { - popper: { - position: unref(options).strategy, - left: "0", - top: "0" - }, - arrow: { - position: "absolute" - } - }, - attributes: {} - }); - const destroy = () => { - if (!instanceRef.value) - return; - instanceRef.value.destroy(); - instanceRef.value = void 0; - }; - watch( - options, - (newOptions) => { - const instance = unref(instanceRef); - if (instance) { - instance.setOptions(newOptions); - } - }, - { - deep: true - } - ); - watch( - [referenceElementRef, popperElementRef], - ([referenceElement, popperElement]) => { - destroy(); - if (!referenceElement || !popperElement) - return; - instanceRef.value = yn( - referenceElement, - popperElement, - unref(options) - ); - } - ); - onBeforeUnmount(() => { - destroy(); - }); - return { - state: computed(() => { - var _a; - return { ...((_a = unref(instanceRef)) == null ? void 0 : _a.state) || {} }; - }), - styles: computed(() => unref(states).styles), - attributes: computed(() => unref(states).attributes), - update: () => { - var _a; - return (_a = unref(instanceRef)) == null ? void 0 : _a.update(); - }, - forceUpdate: () => { - var _a; - return (_a = unref(instanceRef)) == null ? void 0 : _a.forceUpdate(); - }, - instanceRef: computed(() => unref(instanceRef)) - }; -}; -function deriveState(state) { - const elements = Object.keys(state.elements); - const styles = fromPairs_default( - elements.map( - (element) => [element, state.styles[element] || {}] - ) - ); - const attributes2 = fromPairs_default( - elements.map( - (element) => [element, state.attributes[element]] - ) - ); - return { - styles, - attributes: attributes2 - }; -} - -// node_modules/element-plus/es/components/popper/src/composables/use-content.mjs -var DEFAULT_ARROW_OFFSET = 0; -var usePopperContent = (props2) => { - const { popperInstanceRef, contentRef, triggerRef: triggerRef2, role } = inject( - POPPER_INJECTION_KEY, - void 0 - ); - const arrowRef = ref(); - const arrowOffset = computed(() => props2.arrowOffset); - const eventListenerModifier = computed(() => { - return { - name: "eventListeners", - enabled: !!props2.visible - }; - }); - const arrowModifier = computed(() => { - var _a; - const arrowEl = unref(arrowRef); - const offset3 = (_a = unref(arrowOffset)) != null ? _a : DEFAULT_ARROW_OFFSET; - return { - name: "arrow", - enabled: !isUndefined_default(arrowEl), - options: { - element: arrowEl, - padding: offset3 - } - }; - }); - const options = computed(() => { - return { - onFirstUpdate: () => { - update2(); - }, - ...buildPopperOptions(props2, [ - unref(arrowModifier), - unref(eventListenerModifier) - ]) - }; - }); - const computedReference = computed( - () => unwrapMeasurableEl(props2.referenceEl) || unref(triggerRef2) - ); - const { attributes: attributes2, state, styles, update: update2, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options); - watch(instanceRef, (instance) => popperInstanceRef.value = instance, { - flush: "sync" - }); - onMounted(() => { - watch( - () => { - var _a, _b; - return (_b = (_a = unref(computedReference)) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a); - }, - () => { - update2(); - } - ); - }); - onBeforeUnmount(() => { - popperInstanceRef.value = void 0; - }); - return { - attributes: attributes2, - arrowRef, - contentRef, - instanceRef, - state, - styles, - role, - forceUpdate, - update: update2 - }; -}; - -// node_modules/element-plus/es/components/popper/src/composables/use-content-dom.mjs -var usePopperContentDOM = (props2, { - attributes: attributes2, - styles, - role -}) => { - const { nextZIndex } = useZIndex(); - const ns = useNamespace("popper"); - const contentAttrs = computed(() => unref(attributes2).popper); - const contentZIndex = ref( - isNumber2(props2.zIndex) ? props2.zIndex : nextZIndex() - ); - const contentClass = computed(() => [ - ns.b(), - ns.is("pure", props2.pure), - ns.is(props2.effect), - props2.popperClass - ]); - const contentStyle = computed(() => { - return [ - { zIndex: unref(contentZIndex) }, - unref(styles).popper, - props2.popperStyle || {} - ]; - }); - const ariaModal = computed( - () => role.value === "dialog" ? "false" : void 0 - ); - const arrowStyle = computed( - () => unref(styles).arrow || {} - ); - const updateZIndex = () => { - contentZIndex.value = isNumber2(props2.zIndex) ? props2.zIndex : nextZIndex(); - }; - return { - ariaModal, - arrowStyle, - contentAttrs, - contentClass, - contentStyle, - contentZIndex, - updateZIndex - }; -}; - -// node_modules/element-plus/es/components/popper/src/content2.mjs -var _sfc_main13 = defineComponent({ - ...{ - name: "ElPopperContent" - }, - __name: "content", - props: popperContentProps, - emits: popperContentEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const emit = __emit; - const props2 = __props; - const { - focusStartRef, - trapped, - onFocusAfterReleased, - onFocusAfterTrapped, - onFocusInTrap, - onFocusoutPrevented, - onReleaseRequested - } = usePopperContentFocusTrap(props2, emit); - const { attributes: attributes2, arrowRef, contentRef, styles, instanceRef, role, update: update2 } = usePopperContent(props2); - const { - ariaModal, - arrowStyle, - contentAttrs, - contentClass, - contentStyle, - updateZIndex - } = usePopperContentDOM(props2, { - styles, - attributes: attributes2, - role - }); - const formItemContext = inject(formItemContextKey, void 0); - provide(POPPER_CONTENT_INJECTION_KEY, { - arrowStyle, - arrowRef - }); - if (formItemContext) { - provide(formItemContextKey, { - ...formItemContext, - addInputId: NOOP, - removeInputId: NOOP - }); - } - let triggerTargetAriaStopWatch = void 0; - const updatePopper = (shouldUpdateZIndex = true) => { - update2(); - shouldUpdateZIndex && updateZIndex(); - }; - const togglePopperAlive = () => { - updatePopper(false); - if (props2.visible && props2.focusOnShow) { - trapped.value = true; - } else if (props2.visible === false) { - trapped.value = false; - } - }; - onMounted(() => { - watch( - () => props2.triggerTargetEl, - (triggerTargetEl, prevTriggerTargetEl) => { - triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch(); - triggerTargetAriaStopWatch = void 0; - const el = unref(triggerTargetEl || contentRef.value); - const prevEl = unref(prevTriggerTargetEl || contentRef.value); - if (isElement2(el)) { - triggerTargetAriaStopWatch = watch( - [role, () => props2.ariaLabel, ariaModal, () => props2.id], - (watches) => { - ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => { - isNil_default(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]); - }); - }, - { immediate: true } - ); - } - if (prevEl !== el && isElement2(prevEl)) { - ["role", "aria-label", "aria-modal", "id"].forEach((key) => { - prevEl.removeAttribute(key); - }); - } - }, - { immediate: true } - ); - watch(() => props2.visible, togglePopperAlive, { immediate: true }); - }); - onBeforeUnmount(() => { - triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch(); - triggerTargetAriaStopWatch = void 0; - contentRef.value = void 0; - }); - __expose({ - popperContentRef: contentRef, - popperInstanceRef: instanceRef, - updatePopper, - contentStyle - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - mergeProps({ - ref_key: "contentRef", - ref: contentRef - }, unref(contentAttrs), { - style: unref(contentStyle), - class: unref(contentClass), - tabindex: "-1", - onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)), - onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e)) - }), - [ - createVNode(unref(ElFocusTrap), { - loop: _ctx.loop, - trapped: unref(trapped), - "trap-on-focus-in": true, - "focus-trap-el": unref(contentRef), - "focus-start-el": unref(focusStartRef), - onFocusAfterTrapped: unref(onFocusAfterTrapped), - onFocusAfterReleased: unref(onFocusAfterReleased), - onFocusin: unref(onFocusInTrap), - onFocusoutPrevented: unref(onFocusoutPrevented), - onReleaseRequested: unref(onReleaseRequested) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["loop", "trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"]) - ], - 16 - ); - }; - } -}); -var ElPopperContent = _export_sfc(_sfc_main13, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]); - -// node_modules/element-plus/es/components/popper/index.mjs -var ElPopper = withInstall(Popper); - -// node_modules/element-plus/es/components/tooltip/src/constants.mjs -var TOOLTIP_INJECTION_KEY = Symbol("elTooltip"); - -// node_modules/element-plus/es/hooks/use-timeout/index.mjs -function useTimeout() { - let timeoutHandle; - const registerTimeout = (fn2, delay2) => { - cancelTimeout(); - timeoutHandle = window.setTimeout(fn2, delay2); - }; - const cancelTimeout = () => window.clearTimeout(timeoutHandle); - tryOnScopeDispose(() => cancelTimeout()); - return { - registerTimeout, - cancelTimeout - }; -} - -// node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs -var useDelayedToggleProps = buildProps({ - showAfter: { - type: Number, - default: 0 - }, - hideAfter: { - type: Number, - default: 200 - }, - autoClose: { - type: Number, - default: 0 - } -}); -var useDelayedToggle = ({ - showAfter, - hideAfter, - autoClose, - open, - close: close2 -}) => { - const { registerTimeout } = useTimeout(); - const { - registerTimeout: registerTimeoutForAutoClose, - cancelTimeout: cancelTimeoutForAutoClose - } = useTimeout(); - const onOpen = (event, delay2 = unref(showAfter)) => { - registerTimeout(() => { - open(event); - const _autoClose = unref(autoClose); - if (isNumber2(_autoClose) && _autoClose > 0) { - registerTimeoutForAutoClose(() => { - close2(event); - }, _autoClose); - } - }, delay2); - }; - const onClose = (event, delay2 = unref(hideAfter)) => { - cancelTimeoutForAutoClose(); - registerTimeout(() => { - close2(event); - }, delay2); - }; - return { - onOpen, - onClose - }; -}; - -// node_modules/element-plus/es/components/tooltip/src/content.mjs -var useTooltipContentProps = buildProps({ - ...useDelayedToggleProps, - ...popperContentProps, - appendTo: { - type: teleportProps.to.type - }, - content: { - type: String, - default: "" - }, - rawContent: Boolean, - persistent: Boolean, - visible: { - type: definePropType(Boolean), - default: null - }, - transition: String, - teleported: { - type: Boolean, - default: true - }, - disabled: Boolean, - ...useAriaProps(["ariaLabel"]) -}); - -// node_modules/element-plus/es/components/tooltip/src/trigger.mjs -var useTooltipTriggerProps = buildProps({ - ...popperTriggerProps, - disabled: Boolean, - trigger: { - type: definePropType([String, Array]), - default: "hover" - }, - triggerKeys: { - type: definePropType(Array), - default: () => [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space] - }, - focusOnTarget: Boolean -}); - -// node_modules/element-plus/es/hooks/use-model-toggle/index.mjs -var _prop = buildProp({ - type: definePropType(Boolean), - default: null -}); -var _event = buildProp({ - type: definePropType(Function) -}); -var createModelToggleComposable = (name) => { - const updateEventKey = `update:${name}`; - const updateEventKeyRaw2 = `onUpdate:${name}`; - const useModelToggleEmits2 = [updateEventKey]; - const useModelToggleProps2 = { - [name]: _prop, - [updateEventKeyRaw2]: _event - }; - const useModelToggle2 = ({ - indicator, - toggleReason, - shouldHideWhenRouteChanges, - shouldProceed, - onShow, - onHide - }) => { - const instance = getCurrentInstance(); - const { emit } = instance; - const props2 = instance.props; - const hasUpdateHandler = computed( - () => isFunction(props2[updateEventKeyRaw2]) - ); - const isModelBindingAbsent = computed(() => props2[name] === null); - const doShow = (event) => { - if (indicator.value === true) { - return; - } - indicator.value = true; - if (toggleReason) { - toggleReason.value = event; - } - if (isFunction(onShow)) { - onShow(event); - } - }; - const doHide = (event) => { - if (indicator.value === false) { - return; - } - indicator.value = false; - if (toggleReason) { - toggleReason.value = event; - } - if (isFunction(onHide)) { - onHide(event); - } - }; - const show = (event) => { - if (props2.disabled === true || isFunction(shouldProceed) && !shouldProceed()) - return; - const shouldEmit = hasUpdateHandler.value && isClient; - if (shouldEmit) { - emit(updateEventKey, true); - } - if (isModelBindingAbsent.value || !shouldEmit) { - doShow(event); - } - }; - const hide2 = (event) => { - if (props2.disabled === true || !isClient) - return; - const shouldEmit = hasUpdateHandler.value && isClient; - if (shouldEmit) { - emit(updateEventKey, false); - } - if (isModelBindingAbsent.value || !shouldEmit) { - doHide(event); - } - }; - const onChange = (val) => { - if (!isBoolean2(val)) - return; - if (props2.disabled && val) { - if (hasUpdateHandler.value) { - emit(updateEventKey, false); - } - } else if (indicator.value !== val) { - if (val) { - doShow(); - } else { - doHide(); - } - } - }; - const toggle = () => { - if (indicator.value) { - hide2(); - } else { - show(); - } - }; - watch(() => props2[name], onChange); - if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) { - watch( - () => ({ - ...instance.proxy.$route - }), - () => { - if (shouldHideWhenRouteChanges.value && indicator.value) { - hide2(); - } - } - ); - } - onMounted(() => { - onChange(props2[name]); - }); - return { - hide: hide2, - show, - toggle, - hasUpdateHandler - }; - }; - return { - useModelToggle: useModelToggle2, - useModelToggleProps: useModelToggleProps2, - useModelToggleEmits: useModelToggleEmits2 - }; -}; -var { useModelToggle, useModelToggleProps, useModelToggleEmits } = createModelToggleComposable("modelValue"); - -// node_modules/element-plus/es/components/tooltip/src/tooltip.mjs -var { - useModelToggleProps: useTooltipModelToggleProps, - useModelToggleEmits: useTooltipModelToggleEmits, - useModelToggle: useTooltipModelToggle -} = createModelToggleComposable("visible"); -var useTooltipProps = buildProps({ - ...popperProps, - ...useTooltipModelToggleProps, - ...useTooltipContentProps, - ...useTooltipTriggerProps, - ...popperArrowProps, - showArrow: { - type: Boolean, - default: true - } -}); -var tooltipEmits = [ - ...useTooltipModelToggleEmits, - "before-show", - "before-hide", - "show", - "hide", - "open", - "close" -]; - -// node_modules/element-plus/es/components/tooltip/src/utils.mjs -var isTriggerType = (trigger, type4) => { - if (isArray(trigger)) { - return trigger.includes(type4); - } - return trigger === type4; -}; -var whenTrigger = (trigger, type4, handler) => { - return (e) => { - isTriggerType(unref(trigger), type4) && handler(e); - }; -}; - -// node_modules/element-plus/es/components/tooltip/src/trigger2.mjs -var _sfc_main14 = defineComponent({ - ...{ - name: "ElTooltipTrigger" - }, - __name: "trigger", - props: useTooltipTriggerProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const ns = useNamespace("tooltip"); - const { controlled, id, open, onOpen, onClose, onToggle } = inject( - TOOLTIP_INJECTION_KEY, - void 0 - ); - const triggerRef2 = ref(null); - const stopWhenControlledOrDisabled = () => { - if (unref(controlled) || props2.disabled) { - return true; - } - }; - const trigger = toRef(props2, "trigger"); - const onMouseenter = composeEventHandlers( - stopWhenControlledOrDisabled, - whenTrigger(trigger, "hover", (e) => { - onOpen(e); - if (props2.focusOnTarget && e.target) { - nextTick(() => { - focusElement(e.target, { preventScroll: true }); - }); - } - }) - ); - const onMouseleave = composeEventHandlers( - stopWhenControlledOrDisabled, - whenTrigger(trigger, "hover", onClose) - ); - const onClick = composeEventHandlers( - stopWhenControlledOrDisabled, - whenTrigger(trigger, "click", (e) => { - if (e.button === 0) { - onToggle(e); - } - }) - ); - const onFocus = composeEventHandlers( - stopWhenControlledOrDisabled, - whenTrigger(trigger, "focus", onOpen) - ); - const onBlur = composeEventHandlers( - stopWhenControlledOrDisabled, - whenTrigger(trigger, "focus", onClose) - ); - const onContextMenu = composeEventHandlers( - stopWhenControlledOrDisabled, - whenTrigger(trigger, "contextmenu", (e) => { - e.preventDefault(); - onToggle(e); - }) - ); - const onKeydown = composeEventHandlers( - stopWhenControlledOrDisabled, - (e) => { - const code = getEventCode(e); - if (props2.triggerKeys.includes(code)) { - e.preventDefault(); - onToggle(e); - } - } - ); - __expose({ - triggerRef: triggerRef2 - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElPopperTrigger), { - id: unref(id), - "virtual-ref": _ctx.virtualRef, - open: unref(open), - "virtual-triggering": _ctx.virtualTriggering, - class: normalizeClass(unref(ns).e("trigger")), - onBlur: unref(onBlur), - onClick: unref(onClick), - onContextmenu: unref(onContextMenu), - onFocus: unref(onFocus), - onMouseenter: unref(onMouseenter), - onMouseleave: unref(onMouseleave), - onKeydown: unref(onKeydown) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]); - }; - } -}); -var ElTooltipTrigger = _export_sfc(_sfc_main14, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]); - -// node_modules/element-plus/es/hooks/use-popper-container/index.mjs -var usePopperContainerId = () => { - const namespace = useGetDerivedNamespace(); - const idInjection = useIdInjection(); - const id = computed(() => { - return `${namespace.value}-popper-container-${idInjection.prefix}`; - }); - const selector = computed(() => `#${id.value}`); - return { - id, - selector - }; -}; -var createContainer = (id) => { - const container = document.createElement("div"); - container.id = id; - document.body.appendChild(container); - return container; -}; -var usePopperContainer = () => { - const { id, selector } = usePopperContainerId(); - onBeforeMount(() => { - if (!isClient) - return; - if (!document.body.querySelector(selector.value)) { - createContainer(id.value); - } - }); - return { - id, - selector - }; -}; - -// node_modules/element-plus/es/utils/arrays.mjs -var unique = (arr) => [...new Set(arr)]; -var extractFirst = (arr) => { - return isArray(arr) ? arr[0] : arr; -}; -var castArray2 = (arr) => { - if (!arr && arr !== 0) - return []; - return isArray(arr) ? arr : [arr]; -}; - -// node_modules/element-plus/es/components/tooltip/src/content2.mjs -var _sfc_main15 = defineComponent({ - ...{ - name: "ElTooltipContent", - inheritAttrs: false - }, - __name: "content", - props: useTooltipContentProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { selector } = usePopperContainerId(); - const ns = useNamespace("tooltip"); - const contentRef = ref(); - const popperContentRef = computedEager(() => { - var _a; - return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef; - }); - let stopHandle; - const { - controlled, - id, - open, - trigger, - onClose, - onOpen, - onShow, - onHide, - onBeforeShow, - onBeforeHide - } = inject(TOOLTIP_INJECTION_KEY, void 0); - const transitionClass = computed(() => { - return props2.transition || `${ns.namespace.value}-fade-in-linear`; - }); - const persistentRef = computed(() => { - if (false) { - if (!process.env.RUN_TEST_WITH_PERSISTENT) { - return true; - } - } - return props2.persistent; - }); - onBeforeUnmount(() => { - stopHandle == null ? void 0 : stopHandle(); - }); - const shouldRender = computed(() => { - return unref(persistentRef) ? true : unref(open); - }); - const shouldShow = computed(() => { - return props2.disabled ? false : unref(open); - }); - const appendTo = computed(() => { - return props2.appendTo || selector.value; - }); - const contentStyle = computed(() => { - var _a; - return (_a = props2.style) != null ? _a : {}; - }); - const ariaHidden = ref(true); - const onTransitionLeave = () => { - onHide(); - isFocusInsideContent() && focusElement(document.body, { preventScroll: true }); - ariaHidden.value = true; - }; - const stopWhenControlled = () => { - if (unref(controlled)) - return true; - }; - const onContentEnter = composeEventHandlers(stopWhenControlled, () => { - if (props2.enterable && isTriggerType(unref(trigger), "hover")) { - onOpen(); - } - }); - const onContentLeave = composeEventHandlers(stopWhenControlled, () => { - if (isTriggerType(unref(trigger), "hover")) { - onClose(); - } - }); - const onBeforeEnter = () => { - var _a, _b; - (_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - onBeforeShow == null ? void 0 : onBeforeShow(); - }; - const onBeforeLeave = () => { - onBeforeHide == null ? void 0 : onBeforeHide(); - }; - const onAfterShow = () => { - onShow(); - }; - const onBlur = () => { - if (!props2.virtualTriggering) { - onClose(); - } - }; - const isFocusInsideContent = (event) => { - var _a; - const popperContent = (_a = contentRef.value) == null ? void 0 : _a.popperContentRef; - const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement; - return popperContent == null ? void 0 : popperContent.contains(activeElement); - }; - watch( - () => unref(open), - (val) => { - if (!val) { - stopHandle == null ? void 0 : stopHandle(); - } else { - ariaHidden.value = false; - stopHandle = onClickOutside( - popperContentRef, - () => { - if (unref(controlled)) - return; - const needClose = castArray2(unref(trigger)).every((item) => { - return item !== "hover" && item !== "focus"; - }); - if (needClose) { - onClose(); - } - }, - { detectIframe: true } - ); - } - }, - { - flush: "post" - } - ); - watch( - () => props2.content, - () => { - var _a, _b; - (_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - } - ); - __expose({ - contentRef, - isFocusInsideContent - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTeleport), { - disabled: !_ctx.teleported, - to: appendTo.value - }, { - default: withCtx(() => [ - shouldRender.value || !ariaHidden.value ? (openBlock(), createBlock(Transition, { - key: 0, - name: transitionClass.value, - appear: !persistentRef.value, - onAfterLeave: onTransitionLeave, - onBeforeEnter, - onAfterEnter: onAfterShow, - onBeforeLeave, - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createVNode(unref(ElPopperContent), mergeProps({ - id: unref(id), - ref_key: "contentRef", - ref: contentRef - }, _ctx.$attrs, { - "aria-label": _ctx.ariaLabel, - "aria-hidden": ariaHidden.value, - "boundaries-padding": _ctx.boundariesPadding, - "fallback-placements": _ctx.fallbackPlacements, - "gpu-acceleration": _ctx.gpuAcceleration, - offset: _ctx.offset, - placement: _ctx.placement, - "popper-options": _ctx.popperOptions, - "arrow-offset": _ctx.arrowOffset, - strategy: _ctx.strategy, - effect: _ctx.effect, - enterable: _ctx.enterable, - pure: _ctx.pure, - "popper-class": _ctx.popperClass, - "popper-style": [_ctx.popperStyle, contentStyle.value], - "reference-el": _ctx.referenceEl, - "trigger-target-el": _ctx.triggerTargetEl, - visible: shouldShow.value, - "z-index": _ctx.zIndex, - loop: _ctx.loop, - onMouseenter: unref(onContentEnter), - onMouseleave: unref(onContentLeave), - onBlur, - onClose: unref(onClose) - }), { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "arrow-offset", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "loop", "onMouseenter", "onMouseleave", "onClose"]), [ - [vShow, shouldShow.value] - ]) - ]), - _: 3 - }, 8, ["name", "appear"])) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["disabled", "to"]); - }; - } -}); -var ElTooltipContent = _export_sfc(_sfc_main15, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]); - -// node_modules/element-plus/es/components/tooltip/src/tooltip2.mjs -var _hoisted_13 = ["innerHTML"]; -var _hoisted_22 = { key: 1 }; -var _sfc_main16 = defineComponent({ - ...{ - name: "ElTooltip" - }, - __name: "tooltip", - props: useTooltipProps, - emits: tooltipEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - usePopperContainer(); - const ns = useNamespace("tooltip"); - const id = useId(); - const popperRef = ref(); - const contentRef = ref(); - const updatePopper = () => { - var _a; - const popperComponent = unref(popperRef); - if (popperComponent) { - (_a = popperComponent.popperInstanceRef) == null ? void 0 : _a.update(); - } - }; - const open = ref(false); - const toggleReason = ref(); - const { show, hide: hide2, hasUpdateHandler } = useTooltipModelToggle({ - indicator: open, - toggleReason - }); - const { onOpen, onClose } = useDelayedToggle({ - showAfter: toRef(props2, "showAfter"), - hideAfter: toRef(props2, "hideAfter"), - autoClose: toRef(props2, "autoClose"), - open: show, - close: hide2 - }); - const controlled = computed( - () => isBoolean2(props2.visible) && !hasUpdateHandler.value - ); - const kls = computed(() => { - return [ns.b(), props2.popperClass]; - }); - provide(TOOLTIP_INJECTION_KEY, { - controlled, - id, - open: readonly(open), - trigger: toRef(props2, "trigger"), - onOpen, - onClose, - onToggle: (event) => { - if (unref(open)) { - onClose(event); - } else { - onOpen(event); - } - }, - onShow: () => { - emit("show", toggleReason.value); - }, - onHide: () => { - emit("hide", toggleReason.value); - }, - onBeforeShow: () => { - emit("before-show", toggleReason.value); - }, - onBeforeHide: () => { - emit("before-hide", toggleReason.value); - }, - updatePopper - }); - watch( - () => props2.disabled, - (disabled) => { - if (disabled && open.value) { - open.value = false; - } - } - ); - const isFocusInsideContent = (event) => { - var _a; - return (_a = contentRef.value) == null ? void 0 : _a.isFocusInsideContent(event); - }; - onDeactivated(() => open.value && hide2()); - onBeforeUnmount(() => { - toggleReason.value = void 0; - }); - __expose({ - popperRef, - contentRef, - isFocusInsideContent, - updatePopper, - onOpen, - onClose, - hide: hide2 - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElPopper), { - ref_key: "popperRef", - ref: popperRef, - role: _ctx.role - }, { - default: withCtx(() => [ - createVNode(ElTooltipTrigger, { - disabled: _ctx.disabled, - trigger: _ctx.trigger, - "trigger-keys": _ctx.triggerKeys, - "virtual-ref": _ctx.virtualRef, - "virtual-triggering": _ctx.virtualTriggering, - "focus-on-target": _ctx.focusOnTarget - }, { - default: withCtx(() => [ - _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering", "focus-on-target"]), - createVNode(ElTooltipContent, { - ref_key: "contentRef", - ref: contentRef, - "aria-label": _ctx.ariaLabel, - "boundaries-padding": _ctx.boundariesPadding, - content: _ctx.content, - disabled: _ctx.disabled, - effect: _ctx.effect, - enterable: _ctx.enterable, - "fallback-placements": _ctx.fallbackPlacements, - "hide-after": _ctx.hideAfter, - "gpu-acceleration": _ctx.gpuAcceleration, - offset: _ctx.offset, - persistent: _ctx.persistent, - "popper-class": kls.value, - "popper-style": _ctx.popperStyle, - placement: _ctx.placement, - "popper-options": _ctx.popperOptions, - "arrow-offset": _ctx.arrowOffset, - pure: _ctx.pure, - "raw-content": _ctx.rawContent, - "reference-el": _ctx.referenceEl, - "trigger-target-el": _ctx.triggerTargetEl, - "show-after": _ctx.showAfter, - strategy: _ctx.strategy, - teleported: _ctx.teleported, - transition: _ctx.transition, - "virtual-triggering": _ctx.virtualTriggering, - "z-index": _ctx.zIndex, - "append-to": _ctx.appendTo, - loop: _ctx.loop - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "content", {}, () => [ - _ctx.rawContent ? (openBlock(), createElementBlock("span", { - key: 0, - innerHTML: _ctx.content - }, null, 8, _hoisted_13)) : (openBlock(), createElementBlock( - "span", - _hoisted_22, - toDisplayString(_ctx.content), - 1 - )) - ]), - _ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), { key: 0 })) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "arrow-offset", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to", "loop"]) - ]), - _: 3 - }, 8, ["role"]); - }; - } -}); -var Tooltip = _export_sfc(_sfc_main16, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]); - -// node_modules/element-plus/es/components/tooltip/index.mjs -var ElTooltip = withInstall(Tooltip); - -// node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs -var autocompleteProps = buildProps({ - ...inputProps, - valueKey: { - type: String, - default: "value" - }, - modelValue: { - type: [String, Number], - default: "" - }, - debounce: { - type: Number, - default: 300 - }, - placement: { - type: definePropType(String), - values: [ - "top", - "top-start", - "top-end", - "bottom", - "bottom-start", - "bottom-end" - ], - default: "bottom-start" - }, - fetchSuggestions: { - type: definePropType([Function, Array]), - default: NOOP - }, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - triggerOnFocus: { - type: Boolean, - default: true - }, - selectWhenUnmatched: Boolean, - hideLoading: Boolean, - teleported: useTooltipContentProps.teleported, - appendTo: useTooltipContentProps.appendTo, - highlightFirstItem: Boolean, - fitInputWidth: Boolean, - loopNavigation: { - type: Boolean, - default: true - } -}); -var autocompleteEmits = { - [UPDATE_MODEL_EVENT]: (value) => isString(value) || isNumber2(value), - [INPUT_EVENT]: (value) => isString(value) || isNumber2(value), - [CHANGE_EVENT]: (value) => isString(value) || isNumber2(value), - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true, - select: (item) => isObject(item) -}; - -// node_modules/element-plus/es/components/autocomplete/src/autocomplete2.mjs -var _hoisted_14 = ["aria-expanded", "aria-owns"]; -var _hoisted_23 = { key: 0 }; -var _hoisted_3 = ["id", "aria-selected", "onClick"]; -var COMPONENT_NAME5 = "ElAutocomplete"; -var _sfc_main17 = defineComponent({ - ...{ - name: COMPONENT_NAME5, - inheritAttrs: false - }, - __name: "autocomplete", - props: autocompleteProps, - emits: autocompleteEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const passInputProps = computed(() => pick_default(props2, Object.keys(inputProps))); - const rawAttrs = useAttrs(); - const disabled = useFormDisabled(); - const ns = useNamespace("autocomplete"); - const inputRef = ref(); - const regionRef = ref(); - const popperRef = ref(); - const listboxRef = ref(); - let readonly2 = false; - let ignoreFocusEvent = false; - const suggestions = ref([]); - const highlightedIndex = ref(-1); - const dropdownWidth = ref(""); - const activated = ref(false); - const suggestionDisabled = ref(false); - const loading = ref(false); - const listboxId = useId(); - const styles = computed(() => rawAttrs.style); - const suggestionVisible = computed(() => { - const isValidData = suggestions.value.length > 0; - return (isValidData || loading.value) && activated.value; - }); - const suggestionLoading = computed(() => !props2.hideLoading && loading.value); - const refInput = computed(() => { - if (inputRef.value) { - return Array.from( - inputRef.value.$el.querySelectorAll("input") - ); - } - return []; - }); - const onSuggestionShow = () => { - if (suggestionVisible.value) { - dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`; - } - }; - const onHide = () => { - highlightedIndex.value = -1; - }; - const getData2 = async (queryString) => { - if (suggestionDisabled.value) - return; - const cb = (suggestionList) => { - loading.value = false; - if (suggestionDisabled.value) - return; - if (isArray(suggestionList)) { - suggestions.value = suggestionList; - highlightedIndex.value = props2.highlightFirstItem ? 0 : -1; - } else { - throwError(COMPONENT_NAME5, "autocomplete suggestions must be an array"); - } - }; - loading.value = true; - if (isArray(props2.fetchSuggestions)) { - cb(props2.fetchSuggestions); - } else { - const result2 = await props2.fetchSuggestions(queryString, cb); - if (isArray(result2)) - cb(result2); - } - }; - const debounce2 = computed(() => props2.debounce); - const debouncedGetData = useDebounceFn(getData2, debounce2); - const handleInput = (value) => { - const valuePresented = !!value; - emit(INPUT_EVENT, value); - emit(UPDATE_MODEL_EVENT, value); - suggestionDisabled.value = false; - activated.value || (activated.value = valuePresented); - if (!props2.triggerOnFocus && !value) { - suggestionDisabled.value = true; - suggestions.value = []; - return; - } - debouncedGetData(value); - }; - const handleMouseDown = (event) => { - var _a; - if (disabled.value) - return; - if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) { - activated.value = true; - } - }; - const handleChange = (value) => { - emit(CHANGE_EVENT, value); - }; - const handleFocus = (evt) => { - var _a; - if (!ignoreFocusEvent) { - activated.value = true; - emit("focus", evt); - const queryString = (_a = props2.modelValue) != null ? _a : ""; - if (props2.triggerOnFocus && !readonly2) { - debouncedGetData(String(queryString)); - } - } else { - ignoreFocusEvent = false; - } - }; - const handleBlur = (evt) => { - setTimeout(() => { - var _a; - if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent()) { - ignoreFocusEvent = true; - return; - } - activated.value && close2(); - emit("blur", evt); - }); - }; - const handleClear = () => { - activated.value = false; - emit(UPDATE_MODEL_EVENT, ""); - emit("clear"); - }; - const handleKeyEnter = async () => { - var _a; - if ((_a = inputRef.value) == null ? void 0 : _a.isComposing) { - return; - } - if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) { - handleSelect(suggestions.value[highlightedIndex.value]); - } else { - if (props2.selectWhenUnmatched) { - emit("select", { value: props2.modelValue }); - suggestions.value = []; - highlightedIndex.value = -1; - } - activated.value = true; - debouncedGetData(String(props2.modelValue)); - } - }; - const handleKeyEscape = (evt) => { - if (suggestionVisible.value) { - evt.preventDefault(); - evt.stopPropagation(); - close2(); - } - }; - const close2 = () => { - activated.value = false; - }; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.blur(); - }; - const handleSelect = async (item) => { - emit(INPUT_EVENT, item[props2.valueKey]); - emit(UPDATE_MODEL_EVENT, item[props2.valueKey]); - emit("select", item); - suggestions.value = []; - highlightedIndex.value = -1; - }; - const highlight = (index) => { - var _a, _b; - if (!suggestionVisible.value || loading.value) - return; - if (index < 0) { - if (!props2.loopNavigation) { - highlightedIndex.value = -1; - return; - } - index = suggestions.value.length - 1; - } - if (index >= suggestions.value.length) { - index = props2.loopNavigation ? 0 : suggestions.value.length - 1; - } - const [suggestion, suggestionList] = getSuggestionContext(); - const highlightItem = suggestionList[index]; - const scrollTop = suggestion.scrollTop; - const { offsetTop, scrollHeight } = highlightItem; - if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) { - suggestion.scrollTop = offsetTop + scrollHeight - suggestion.clientHeight; - } - if (offsetTop < scrollTop) { - suggestion.scrollTop = offsetTop; - } - highlightedIndex.value = index; - (_b = (_a = inputRef.value) == null ? void 0 : _a.ref) == null ? void 0 : _b.setAttribute( - "aria-activedescendant", - `${listboxId.value}-item-${highlightedIndex.value}` - ); - }; - const getSuggestionContext = () => { - const suggestion = regionRef.value.querySelector( - `.${ns.be("suggestion", "wrap")}` - ); - const suggestionList = suggestion.querySelectorAll( - `.${ns.be("suggestion", "list")} li` - ); - return [suggestion, suggestionList]; - }; - const stopHandle = onClickOutside(listboxRef, () => { - var _a; - if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent()) - return; - suggestionVisible.value && close2(); - }); - const handleKeydown = (e) => { - const code = getEventCode(e); - switch (code) { - case EVENT_CODE.up: - e.preventDefault(); - highlight(highlightedIndex.value - 1); - break; - case EVENT_CODE.down: - e.preventDefault(); - highlight(highlightedIndex.value + 1); - break; - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - e.preventDefault(); - handleKeyEnter(); - break; - case EVENT_CODE.tab: - close2(); - break; - case EVENT_CODE.esc: - handleKeyEscape(e); - break; - case EVENT_CODE.home: - e.preventDefault(); - highlight(0); - break; - case EVENT_CODE.end: - e.preventDefault(); - highlight(suggestions.value.length - 1); - break; - case EVENT_CODE.pageUp: - e.preventDefault(); - highlight(Math.max(0, highlightedIndex.value - 10)); - break; - case EVENT_CODE.pageDown: - e.preventDefault(); - highlight( - Math.min(suggestions.value.length - 1, highlightedIndex.value + 10) - ); - break; - } - }; - onBeforeUnmount(() => { - stopHandle == null ? void 0 : stopHandle(); - }); - onMounted(() => { - var _a; - const inputElement = (_a = inputRef.value) == null ? void 0 : _a.ref; - if (!inputElement) - return; - [ - { key: "role", value: "textbox" }, - { key: "aria-autocomplete", value: "list" }, - { key: "aria-controls", value: listboxId.value }, - { - key: "aria-activedescendant", - value: `${listboxId.value}-item-${highlightedIndex.value}` - } - ].forEach(({ key, value }) => inputElement.setAttribute(key, value)); - readonly2 = inputElement.hasAttribute("readonly"); - }); - __expose({ - highlightedIndex, - activated, - loading, - inputRef, - popperRef, - suggestions, - handleSelect, - handleKeyEnter, - focus, - blur, - close: close2, - highlight, - getData: getData2 - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTooltip), { - ref_key: "popperRef", - ref: popperRef, - visible: suggestionVisible.value, - placement: _ctx.placement, - "fallback-placements": ["bottom-start", "top-start"], - "popper-class": [unref(ns).e("popper"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - teleported: _ctx.teleported, - "append-to": _ctx.appendTo, - "gpu-acceleration": false, - pure: "", - "manual-mode": "", - effect: "light", - trigger: "click", - transition: `${unref(ns).namespace.value}-zoom-in-top`, - persistent: "", - role: "listbox", - onBeforeShow: onSuggestionShow, - onHide - }, { - content: withCtx(() => [ - createBaseVNode( - "div", - { - ref_key: "regionRef", - ref: regionRef, - class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", suggestionLoading.value)]), - style: normalizeStyle({ - [_ctx.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value, - outline: "none" - }), - role: "region" - }, - [ - _ctx.$slots.header ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).be("suggestion", "header")), - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "header") - ], - 2 - )) : createCommentVNode("v-if", true), - createVNode(unref(ElScrollbar), { - id: unref(listboxId), - tag: "ul", - "wrap-class": unref(ns).be("suggestion", "wrap"), - "view-class": unref(ns).be("suggestion", "list"), - role: "listbox" - }, { - default: withCtx(() => [ - suggestionLoading.value ? (openBlock(), createElementBlock("li", _hoisted_23, [ - renderSlot(_ctx.$slots, "loading", {}, () => [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(ns).is("loading")) - }, { - default: withCtx(() => [ - createVNode(unref(loading_default)) - ]), - _: 1 - }, 8, ["class"]) - ]) - ])) : (openBlock(true), createElementBlock( - Fragment, - { key: 1 }, - renderList(suggestions.value, (item, index) => { - return openBlock(), createElementBlock("li", { - id: `${unref(listboxId)}-item-${index}`, - key: index, - class: normalizeClass({ highlighted: highlightedIndex.value === index }), - role: "option", - "aria-selected": highlightedIndex.value === index, - onClick: ($event) => handleSelect(item) - }, [ - renderSlot(_ctx.$slots, "default", { item }, () => [ - createTextVNode( - toDisplayString(item[_ctx.valueKey]), - 1 - ) - ]) - ], 10, _hoisted_3); - }), - 128 - )) - ]), - _: 3 - }, 8, ["id", "wrap-class", "view-class"]), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).be("suggestion", "footer")), - onClick: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ) - ]), - default: withCtx(() => [ - createBaseVNode("div", { - ref_key: "listboxRef", - ref: listboxRef, - class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]), - style: normalizeStyle(styles.value), - role: "combobox", - "aria-haspopup": "listbox", - "aria-expanded": suggestionVisible.value, - "aria-owns": unref(listboxId) - }, [ - createVNode(unref(ElInput), mergeProps({ - ref_key: "inputRef", - ref: inputRef - }, mergeProps(passInputProps.value, _ctx.$attrs), { - "model-value": _ctx.modelValue, - disabled: unref(disabled), - onInput: handleInput, - onChange: handleChange, - onFocus: handleFocus, - onBlur: handleBlur, - onClear: handleClear, - onKeydown: handleKeydown, - onMousedown: handleMouseDown - }), createSlots({ - _: 2 - }, [ - _ctx.$slots.prepend ? { - name: "prepend", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "prepend") - ]), - key: "0" - } : void 0, - _ctx.$slots.append ? { - name: "append", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "append") - ]), - key: "1" - } : void 0, - _ctx.$slots.prefix ? { - name: "prefix", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "prefix") - ]), - key: "2" - } : void 0, - _ctx.$slots.suffix ? { - name: "suffix", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "suffix") - ]), - key: "3" - } : void 0 - ]), 1040, ["model-value", "disabled"]) - ], 14, _hoisted_14) - ]), - _: 3 - }, 8, ["visible", "placement", "popper-class", "popper-style", "teleported", "append-to", "transition"]); - }; - } -}); -var Autocomplete = _export_sfc(_sfc_main17, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/autocomplete/src/autocomplete.vue"]]); - -// node_modules/element-plus/es/components/autocomplete/index.mjs -var ElAutocomplete = withInstall(Autocomplete); - -// node_modules/element-plus/es/components/avatar/src/avatar.mjs -var avatarProps = buildProps({ - size: { - type: [Number, String], - values: componentSizes, - validator: (val) => isNumber2(val) - }, - shape: { - type: String, - values: ["circle", "square"] - }, - icon: { - type: iconPropType - }, - src: { - type: String, - default: "" - }, - alt: String, - srcSet: String, - fit: { - type: definePropType(String), - default: "cover" - } -}); -var avatarEmits = { - error: (evt) => evt instanceof Event -}; - -// node_modules/element-plus/es/components/avatar/src/constants.mjs -var avatarGroupContextKey = Symbol( - "avatarGroupContextKey" -); - -// node_modules/element-plus/es/components/avatar/src/avatar2.mjs -var _hoisted_15 = ["src", "alt", "srcset"]; -var _sfc_main18 = defineComponent({ - ...{ - name: "ElAvatar" - }, - __name: "avatar", - props: avatarProps, - emits: avatarEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const avatarGroupContext = inject(avatarGroupContextKey, void 0); - const ns = useNamespace("avatar"); - const hasLoadError = ref(false); - const size3 = computed(() => { - var _a; - return (_a = props2.size) != null ? _a : avatarGroupContext == null ? void 0 : avatarGroupContext.size; - }); - const shape = computed( - () => { - var _a, _b; - return (_b = (_a = props2.shape) != null ? _a : avatarGroupContext == null ? void 0 : avatarGroupContext.shape) != null ? _b : "circle"; - } - ); - const avatarClass = computed(() => { - const { icon } = props2; - const classList = [ns.b()]; - if (isString(size3.value)) - classList.push(ns.m(size3.value)); - if (icon) - classList.push(ns.m("icon")); - if (shape.value) - classList.push(ns.m(shape.value)); - return classList; - }); - const sizeStyle = computed(() => { - return isNumber2(size3.value) ? ns.cssVarBlock({ - size: addUnit(size3.value) - }) : void 0; - }); - const fitStyle = computed(() => ({ - objectFit: props2.fit - })); - watch( - () => props2.src, - () => hasLoadError.value = false - ); - function handleError(e) { - hasLoadError.value = true; - emit("error", e); - } - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "span", - { - class: normalizeClass(avatarClass.value), - style: normalizeStyle(sizeStyle.value) - }, - [ - (_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", { - key: 0, - src: _ctx.src, - alt: _ctx.alt, - srcset: _ctx.srcSet, - style: normalizeStyle(fitStyle.value), - onError: handleError - }, null, 44, _hoisted_15)) : _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - })) : renderSlot(_ctx.$slots, "default", { key: 2 }) - ], - 6 - ); - }; - } -}); -var Avatar = _export_sfc(_sfc_main18, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]); - -// node_modules/element-plus/es/components/avatar/src/avatar-group-props.mjs -var avatarGroupProps = buildProps({ - size: avatarProps.size, - shape: avatarProps.shape, - collapseAvatars: Boolean, - collapseAvatarsTooltip: Boolean, - maxCollapseAvatars: { - type: Number, - default: 1 - }, - effect: { - type: definePropType(String), - default: "light" - }, - placement: { - type: definePropType(String), - values: Ee, - default: "top" - }, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - collapseClass: String, - collapseStyle: { - type: definePropType([String, Array, Object]) - } -}); - -// node_modules/element-plus/es/components/avatar/src/avatar-group.mjs -var AvatarGroup = defineComponent({ - name: "ElAvatarGroup", - props: avatarGroupProps, - setup(props2, { - slots - }) { - const ns = useNamespace("avatar-group"); - provide(avatarGroupContextKey, reactive({ - size: toRef(props2, "size"), - shape: toRef(props2, "shape") - })); - return () => { - var _a, _b; - const avatars = flattedChildren((_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : []); - let visibleAvatars = avatars; - const showCollapseAvatar = props2.collapseAvatars && avatars.length > props2.maxCollapseAvatars; - if (showCollapseAvatar) { - visibleAvatars = avatars.slice(0, props2.maxCollapseAvatars); - const hiddenAvatars = avatars.slice(props2.maxCollapseAvatars); - visibleAvatars.push(createVNode(ElTooltip, { - "popperClass": props2.popperClass, - "popperStyle": props2.popperStyle, - "placement": props2.placement, - "effect": props2.effect, - "disabled": !props2.collapseAvatarsTooltip - }, { - default: () => createVNode(Avatar, { - "size": props2.size, - "shape": props2.shape, - "class": props2.collapseClass, - "style": props2.collapseStyle - }, { - default: () => [createTextVNode("+ "), hiddenAvatars.length] - }), - content: () => createVNode("div", { - "class": ns.e("collapse-avatars") - }, [hiddenAvatars.map((node, idx) => { - var _a2; - return isVNode(node) ? cloneVNode(node, { - key: (_a2 = node.key) != null ? _a2 : idx - }) : node; - })]) - })); - } - return createVNode("div", { - "class": ns.b() - }, [visibleAvatars]); - }; - } -}); - -// node_modules/element-plus/es/components/avatar/index.mjs -var ElAvatar = withInstall(Avatar, { - AvatarGroup -}); -var ElAvatarGroup = withNoopInstall(AvatarGroup); - -// node_modules/element-plus/es/components/backtop/src/backtop2.mjs -var backtopProps = { - visibilityHeight: { - type: Number, - default: 200 - }, - target: { - type: String, - default: "" - }, - right: { - type: Number, - default: 40 - }, - bottom: { - type: Number, - default: 40 - } -}; -var backtopEmits = { - click: (evt) => evt instanceof MouseEvent -}; - -// node_modules/element-plus/es/components/backtop/src/use-backtop.mjs -var useBackTop = (props2, emit, componentName2) => { - const el = shallowRef(); - const container = shallowRef(); - const visible = ref(false); - const handleScroll2 = () => { - if (el.value) - visible.value = el.value.scrollTop >= props2.visibilityHeight; - }; - const handleClick = (event) => { - var _a; - (_a = el.value) == null ? void 0 : _a.scrollTo({ top: 0, behavior: "smooth" }); - emit("click", event); - }; - const handleScrollThrottled = useThrottleFn(handleScroll2, 300, true); - useEventListener(container, "scroll", handleScrollThrottled); - onMounted(() => { - var _a; - container.value = document; - el.value = document.documentElement; - if (props2.target) { - el.value = (_a = document.querySelector(props2.target)) != null ? _a : void 0; - if (!el.value) { - throwError(componentName2, `target does not exist: ${props2.target}`); - } - container.value = el.value; - } - handleScroll2(); - }); - return { - visible, - handleClick - }; -}; - -// node_modules/element-plus/es/components/backtop/src/backtop.mjs -var COMPONENT_NAME6 = "ElBacktop"; -var _sfc_main19 = defineComponent({ - ...{ - name: COMPONENT_NAME6 - }, - __name: "backtop", - props: backtopProps, - emits: backtopEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("backtop"); - const { handleClick, visible } = useBackTop(props2, emit, COMPONENT_NAME6); - const backTopStyle = computed(() => ({ - right: `${props2.right}px`, - bottom: `${props2.bottom}px` - })); - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, { - name: `${unref(ns).namespace.value}-fade-in` - }, { - default: withCtx(() => [ - unref(visible) ? (openBlock(), createElementBlock( - "div", - { - key: 0, - style: normalizeStyle(backTopStyle.value), - class: normalizeClass(unref(ns).b()), - onClick: _cache[0] || (_cache[0] = withModifiers( - (...args) => unref(handleClick) && unref(handleClick)(...args), - ["stop"] - )) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(ns).e("icon")) - }, { - default: withCtx(() => [ - createVNode(unref(caret_top_default)) - ]), - _: 1 - }, 8, ["class"]) - ]) - ], - 6 - )) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["name"]); - }; - } -}); -var Backtop = _export_sfc(_sfc_main19, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/backtop/src/backtop.vue"]]); - -// node_modules/element-plus/es/components/backtop/index.mjs -var ElBacktop = withInstall(Backtop); - -// node_modules/element-plus/es/components/badge/src/badge.mjs -var badgeProps = buildProps({ - value: { - type: [String, Number], - default: "" - }, - max: { - type: Number, - default: 99 - }, - isDot: Boolean, - hidden: Boolean, - type: { - type: String, - values: ["primary", "success", "warning", "info", "danger"], - default: "danger" - }, - showZero: { - type: Boolean, - default: true - }, - color: String, - badgeStyle: { - type: definePropType([String, Object, Array]) - }, - offset: { - type: definePropType(Array), - default: [0, 0] - }, - badgeClass: { - type: String - } -}); - -// node_modules/element-plus/es/components/badge/src/badge2.mjs -var _sfc_main20 = defineComponent({ - ...{ - name: "ElBadge" - }, - __name: "badge", - props: badgeProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const ns = useNamespace("badge"); - const content = computed(() => { - if (props2.isDot) - return ""; - if (isNumber2(props2.value) && isNumber2(props2.max)) { - return props2.max < props2.value ? `${props2.max}+` : `${props2.value}`; - } - return `${props2.value}`; - }); - const style = computed(() => { - var _a; - return [ - { - backgroundColor: props2.color, - marginRight: addUnit(-props2.offset[0]), - marginTop: addUnit(props2.offset[1]) - }, - (_a = props2.badgeStyle) != null ? _a : {} - ]; - }); - __expose({ - content - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b()) - }, - [ - renderSlot(_ctx.$slots, "default"), - createVNode(Transition, { - name: `${unref(ns).namespace.value}-zoom-in-center`, - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode( - "sup", - { - class: normalizeClass([ - unref(ns).e("content"), - unref(ns).em("content", _ctx.type), - unref(ns).is("fixed", !!_ctx.$slots.default), - unref(ns).is("dot", _ctx.isDot), - unref(ns).is("hide-zero", !_ctx.showZero && _ctx.value === 0), - _ctx.badgeClass - ]), - style: normalizeStyle(style.value) - }, - [ - renderSlot(_ctx.$slots, "content", { value: content.value }, () => [ - createTextVNode( - toDisplayString(content.value), - 1 - ) - ]) - ], - 6 - ), [ - [vShow, !_ctx.hidden && (content.value || _ctx.isDot || _ctx.$slots.content)] - ]) - ]), - _: 3 - }, 8, ["name"]) - ], - 2 - ); - }; - } -}); -var Badge = _export_sfc(_sfc_main20, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]); - -// node_modules/element-plus/es/components/badge/index.mjs -var ElBadge = withInstall(Badge); - -// node_modules/element-plus/es/components/breadcrumb/src/constants.mjs -var breadcrumbKey = Symbol("breadcrumbKey"); - -// node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.mjs -var breadcrumbProps = buildProps({ - separator: { - type: String, - default: "/" - }, - separatorIcon: { - type: iconPropType - } -}); - -// node_modules/element-plus/es/components/breadcrumb/src/breadcrumb2.mjs -var _hoisted_16 = ["aria-label"]; -var _sfc_main21 = defineComponent({ - ...{ - name: "ElBreadcrumb" - }, - __name: "breadcrumb", - props: breadcrumbProps, - setup(__props) { - const { t } = useLocale(); - const props2 = __props; - const ns = useNamespace("breadcrumb"); - const breadcrumb = ref(); - provide(breadcrumbKey, props2); - onMounted(() => { - const items = breadcrumb.value.querySelectorAll(`.${ns.e("item")}`); - if (items.length) { - items[items.length - 1].setAttribute("aria-current", "page"); - } - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - ref_key: "breadcrumb", - ref: breadcrumb, - class: normalizeClass(unref(ns).b()), - "aria-label": unref(t)("el.breadcrumb.label"), - role: "navigation" - }, [ - renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_16); - }; - } -}); -var Breadcrumb = _export_sfc(_sfc_main21, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb.vue"]]); - -// node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item.mjs -var breadcrumbItemProps = buildProps({ - to: { - type: definePropType([String, Object]), - default: "" - }, - replace: Boolean -}); - -// node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item2.mjs -var _sfc_main22 = defineComponent({ - ...{ - name: "ElBreadcrumbItem" - }, - __name: "breadcrumb-item", - props: breadcrumbItemProps, - setup(__props) { - const props2 = __props; - const instance = getCurrentInstance(); - const breadcrumbContext = inject(breadcrumbKey, void 0); - const ns = useNamespace("breadcrumb"); - const router = instance.appContext.config.globalProperties.$router; - const onClick = () => { - if (!props2.to || !router) - return; - props2.replace ? router.replace(props2.to) : router.push(props2.to); - }; - return (_ctx, _cache) => { - var _a, _b; - return openBlock(), createElementBlock( - "span", - { - class: normalizeClass(unref(ns).e("item")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]), - role: "link", - onClick - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ), - ((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(ns).e("separator")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon))) - ]), - _: 1 - }, 8, ["class"])) : (openBlock(), createElementBlock( - "span", - { - key: 1, - class: normalizeClass(unref(ns).e("separator")), - role: "presentation" - }, - toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), - 3 - )) - ], - 2 - ); - }; - } -}); -var BreadcrumbItem = _export_sfc(_sfc_main22, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb-item.vue"]]); - -// node_modules/element-plus/es/components/breadcrumb/index.mjs -var ElBreadcrumb = withInstall(Breadcrumb, { - BreadcrumbItem -}); -var ElBreadcrumbItem = withNoopInstall(BreadcrumbItem); - -// node_modules/element-plus/es/components/button/src/constants.mjs -var buttonGroupContextKey = Symbol( - "buttonGroupContextKey" -); - -// node_modules/element-plus/es/hooks/use-deprecated/index.mjs -var useDeprecated = ({ from, replacement, scope, version: version4, ref: ref2, type: type4 = "API" }, condition) => { - watch( - () => unref(condition), - (val) => { - if (val) { - debugWarn( - scope, - `[${type4}] ${from} is about to be deprecated in version ${version4}, please use ${replacement} instead. -For more detail, please visit: ${ref2} -` - ); - } - }, - { - immediate: true - } - ); -}; - -// node_modules/element-plus/es/components/button/src/use-button.mjs -var useButton = (props2, emit) => { - useDeprecated( - { - from: "type.text", - replacement: "link", - version: "3.0.0", - scope: "props", - ref: "https://element-plus.org/en-US/component/button.html#button-attributes" - }, - computed(() => props2.type === "text") - ); - const buttonGroupContext = inject(buttonGroupContextKey, void 0); - const globalConfig2 = useGlobalConfig("button"); - const { form } = useFormItem(); - const _size = useFormSize(computed(() => buttonGroupContext == null ? void 0 : buttonGroupContext.size)); - const _disabled = useFormDisabled(); - const _ref = ref(); - const slots = useSlots(); - const _type = computed( - () => { - var _a; - return props2.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || ((_a = globalConfig2.value) == null ? void 0 : _a.type) || ""; - } - ); - const autoInsertSpace = computed( - () => { - var _a, _b, _c; - return (_c = (_b = props2.autoInsertSpace) != null ? _b : (_a = globalConfig2.value) == null ? void 0 : _a.autoInsertSpace) != null ? _c : false; - } - ); - const _plain = computed( - () => { - var _a, _b, _c; - return (_c = (_b = props2.plain) != null ? _b : (_a = globalConfig2.value) == null ? void 0 : _a.plain) != null ? _c : false; - } - ); - const _round = computed( - () => { - var _a, _b, _c; - return (_c = (_b = props2.round) != null ? _b : (_a = globalConfig2.value) == null ? void 0 : _a.round) != null ? _c : false; - } - ); - const _text = computed(() => { - var _a, _b, _c; - return (_c = (_b = props2.text) != null ? _b : (_a = globalConfig2.value) == null ? void 0 : _a.text) != null ? _c : false; - }); - const _props = computed(() => { - if (props2.tag === "button") { - return { - ariaDisabled: _disabled.value || props2.loading, - disabled: _disabled.value || props2.loading, - autofocus: props2.autofocus, - type: props2.nativeType - }; - } - return {}; - }); - const shouldAddSpace = computed(() => { - var _a; - const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots); - if (autoInsertSpace.value && (defaultSlot == null ? void 0 : defaultSlot.length) === 1) { - const slot = defaultSlot[0]; - if ((slot == null ? void 0 : slot.type) === Text) { - const text = slot.children; - return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(text.trim()); - } - } - return false; - }); - const handleClick = (evt) => { - if (_disabled.value || props2.loading) { - evt.stopPropagation(); - return; - } - if (props2.nativeType === "reset") { - form == null ? void 0 : form.resetFields(); - } - emit("click", evt); - }; - return { - _disabled, - _size, - _type, - _ref, - _props, - _plain, - _round, - _text, - shouldAddSpace, - handleClick - }; -}; - -// node_modules/element-plus/es/components/button/src/button.mjs -var buttonTypes = [ - "default", - "primary", - "success", - "warning", - "info", - "danger", - "text", - "" -]; -var buttonNativeTypes = ["button", "submit", "reset"]; -var buttonProps = buildProps({ - size: useSizeProp, - disabled: { - type: Boolean, - default: void 0 - }, - type: { - type: String, - values: buttonTypes, - default: "" - }, - icon: { - type: iconPropType - }, - nativeType: { - type: String, - values: buttonNativeTypes, - default: "button" - }, - loading: Boolean, - loadingIcon: { - type: iconPropType, - default: () => loading_default - }, - plain: { - type: Boolean, - default: void 0 - }, - text: { - type: Boolean, - default: void 0 - }, - link: Boolean, - bg: Boolean, - autofocus: Boolean, - round: { - type: Boolean, - default: void 0 - }, - circle: Boolean, - color: String, - dark: Boolean, - autoInsertSpace: { - type: Boolean, - default: void 0 - }, - tag: { - type: definePropType([String, Object]), - default: "button" - } -}); -var buttonEmits = { - click: (evt) => evt instanceof MouseEvent -}; - -// node_modules/@ctrl/tinycolor/dist/module/util.js -function bound01(n, max4) { - if (isOnePointZero(n)) { - n = "100%"; - } - var isPercent = isPercentage(n); - n = max4 === 360 ? n : Math.min(max4, Math.max(0, parseFloat(n))); - if (isPercent) { - n = parseInt(String(n * max4), 10) / 100; - } - if (Math.abs(n - max4) < 1e-6) { - return 1; - } - if (max4 === 360) { - n = (n < 0 ? n % max4 + max4 : n % max4) / parseFloat(String(max4)); - } else { - n = n % max4 / parseFloat(String(max4)); - } - return n; -} -function clamp01(val) { - return Math.min(1, Math.max(0, val)); -} -function isOnePointZero(n) { - return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1; -} -function isPercentage(n) { - return typeof n === "string" && n.indexOf("%") !== -1; -} -function boundAlpha(a2) { - a2 = parseFloat(a2); - if (isNaN(a2) || a2 < 0 || a2 > 1) { - a2 = 1; - } - return a2; -} -function convertToPercentage(n) { - if (n <= 1) { - return "".concat(Number(n) * 100, "%"); - } - return n; -} -function pad2(c2) { - return c2.length === 1 ? "0" + c2 : String(c2); -} - -// node_modules/@ctrl/tinycolor/dist/module/conversion.js -function rgbToRgb(r, g, b2) { - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b2, 255) * 255 - }; -} -function rgbToHsl(r, g, b2) { - r = bound01(r, 255); - g = bound01(g, 255); - b2 = bound01(b2, 255); - var max4 = Math.max(r, g, b2); - var min4 = Math.min(r, g, b2); - var h3 = 0; - var s2 = 0; - var l2 = (max4 + min4) / 2; - if (max4 === min4) { - s2 = 0; - h3 = 0; - } else { - var d2 = max4 - min4; - s2 = l2 > 0.5 ? d2 / (2 - max4 - min4) : d2 / (max4 + min4); - switch (max4) { - case r: - h3 = (g - b2) / d2 + (g < b2 ? 6 : 0); - break; - case g: - h3 = (b2 - r) / d2 + 2; - break; - case b2: - h3 = (r - g) / d2 + 4; - break; - default: - break; - } - h3 /= 6; - } - return { h: h3, s: s2, l: l2 }; -} -function hue2rgb(p2, q2, t) { - if (t < 0) { - t += 1; - } - if (t > 1) { - t -= 1; - } - if (t < 1 / 6) { - return p2 + (q2 - p2) * (6 * t); - } - if (t < 1 / 2) { - return q2; - } - if (t < 2 / 3) { - return p2 + (q2 - p2) * (2 / 3 - t) * 6; - } - return p2; -} -function hslToRgb(h3, s2, l2) { - var r; - var g; - var b2; - h3 = bound01(h3, 360); - s2 = bound01(s2, 100); - l2 = bound01(l2, 100); - if (s2 === 0) { - g = l2; - b2 = l2; - r = l2; - } else { - var q2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2; - var p2 = 2 * l2 - q2; - r = hue2rgb(p2, q2, h3 + 1 / 3); - g = hue2rgb(p2, q2, h3); - b2 = hue2rgb(p2, q2, h3 - 1 / 3); - } - return { r: r * 255, g: g * 255, b: b2 * 255 }; -} -function rgbToHsv(r, g, b2) { - r = bound01(r, 255); - g = bound01(g, 255); - b2 = bound01(b2, 255); - var max4 = Math.max(r, g, b2); - var min4 = Math.min(r, g, b2); - var h3 = 0; - var v2 = max4; - var d2 = max4 - min4; - var s2 = max4 === 0 ? 0 : d2 / max4; - if (max4 === min4) { - h3 = 0; - } else { - switch (max4) { - case r: - h3 = (g - b2) / d2 + (g < b2 ? 6 : 0); - break; - case g: - h3 = (b2 - r) / d2 + 2; - break; - case b2: - h3 = (r - g) / d2 + 4; - break; - default: - break; - } - h3 /= 6; - } - return { h: h3, s: s2, v: v2 }; -} -function hsvToRgb(h3, s2, v2) { - h3 = bound01(h3, 360) * 6; - s2 = bound01(s2, 100); - v2 = bound01(v2, 100); - var i = Math.floor(h3); - var f2 = h3 - i; - var p2 = v2 * (1 - s2); - var q2 = v2 * (1 - f2 * s2); - var t = v2 * (1 - (1 - f2) * s2); - var mod = i % 6; - var r = [v2, q2, p2, p2, t, v2][mod]; - var g = [t, v2, v2, q2, p2, p2][mod]; - var b2 = [p2, p2, t, v2, v2, q2][mod]; - return { r: r * 255, g: g * 255, b: b2 * 255 }; -} -function rgbToHex(r, g, b2, allow3Char) { - var hex2 = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b2).toString(16)) - ]; - if (allow3Char && hex2[0].startsWith(hex2[0].charAt(1)) && hex2[1].startsWith(hex2[1].charAt(1)) && hex2[2].startsWith(hex2[2].charAt(1))) { - return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0); - } - return hex2.join(""); -} -function rgbaToHex(r, g, b2, a2, allow4Char) { - var hex2 = [ - pad2(Math.round(r).toString(16)), - pad2(Math.round(g).toString(16)), - pad2(Math.round(b2).toString(16)), - pad2(convertDecimalToHex(a2)) - ]; - if (allow4Char && hex2[0].startsWith(hex2[0].charAt(1)) && hex2[1].startsWith(hex2[1].charAt(1)) && hex2[2].startsWith(hex2[2].charAt(1)) && hex2[3].startsWith(hex2[3].charAt(1))) { - return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0) + hex2[3].charAt(0); - } - return hex2.join(""); -} -function convertDecimalToHex(d2) { - return Math.round(parseFloat(d2) * 255).toString(16); -} -function convertHexToDecimal(h3) { - return parseIntFromHex(h3) / 255; -} -function parseIntFromHex(val) { - return parseInt(val, 16); -} -function numberInputToObject(color) { - return { - r: color >> 16, - g: (color & 65280) >> 8, - b: color & 255 - }; -} - -// node_modules/@ctrl/tinycolor/dist/module/css-color-names.js -var names = { - aliceblue: "#f0f8ff", - antiquewhite: "#faebd7", - aqua: "#00ffff", - aquamarine: "#7fffd4", - azure: "#f0ffff", - beige: "#f5f5dc", - bisque: "#ffe4c4", - black: "#000000", - blanchedalmond: "#ffebcd", - blue: "#0000ff", - blueviolet: "#8a2be2", - brown: "#a52a2a", - burlywood: "#deb887", - cadetblue: "#5f9ea0", - chartreuse: "#7fff00", - chocolate: "#d2691e", - coral: "#ff7f50", - cornflowerblue: "#6495ed", - cornsilk: "#fff8dc", - crimson: "#dc143c", - cyan: "#00ffff", - darkblue: "#00008b", - darkcyan: "#008b8b", - darkgoldenrod: "#b8860b", - darkgray: "#a9a9a9", - darkgreen: "#006400", - darkgrey: "#a9a9a9", - darkkhaki: "#bdb76b", - darkmagenta: "#8b008b", - darkolivegreen: "#556b2f", - darkorange: "#ff8c00", - darkorchid: "#9932cc", - darkred: "#8b0000", - darksalmon: "#e9967a", - darkseagreen: "#8fbc8f", - darkslateblue: "#483d8b", - darkslategray: "#2f4f4f", - darkslategrey: "#2f4f4f", - darkturquoise: "#00ced1", - darkviolet: "#9400d3", - deeppink: "#ff1493", - deepskyblue: "#00bfff", - dimgray: "#696969", - dimgrey: "#696969", - dodgerblue: "#1e90ff", - firebrick: "#b22222", - floralwhite: "#fffaf0", - forestgreen: "#228b22", - fuchsia: "#ff00ff", - gainsboro: "#dcdcdc", - ghostwhite: "#f8f8ff", - goldenrod: "#daa520", - gold: "#ffd700", - gray: "#808080", - green: "#008000", - greenyellow: "#adff2f", - grey: "#808080", - honeydew: "#f0fff0", - hotpink: "#ff69b4", - indianred: "#cd5c5c", - indigo: "#4b0082", - ivory: "#fffff0", - khaki: "#f0e68c", - lavenderblush: "#fff0f5", - lavender: "#e6e6fa", - lawngreen: "#7cfc00", - lemonchiffon: "#fffacd", - lightblue: "#add8e6", - lightcoral: "#f08080", - lightcyan: "#e0ffff", - lightgoldenrodyellow: "#fafad2", - lightgray: "#d3d3d3", - lightgreen: "#90ee90", - lightgrey: "#d3d3d3", - lightpink: "#ffb6c1", - lightsalmon: "#ffa07a", - lightseagreen: "#20b2aa", - lightskyblue: "#87cefa", - lightslategray: "#778899", - lightslategrey: "#778899", - lightsteelblue: "#b0c4de", - lightyellow: "#ffffe0", - lime: "#00ff00", - limegreen: "#32cd32", - linen: "#faf0e6", - magenta: "#ff00ff", - maroon: "#800000", - mediumaquamarine: "#66cdaa", - mediumblue: "#0000cd", - mediumorchid: "#ba55d3", - mediumpurple: "#9370db", - mediumseagreen: "#3cb371", - mediumslateblue: "#7b68ee", - mediumspringgreen: "#00fa9a", - mediumturquoise: "#48d1cc", - mediumvioletred: "#c71585", - midnightblue: "#191970", - mintcream: "#f5fffa", - mistyrose: "#ffe4e1", - moccasin: "#ffe4b5", - navajowhite: "#ffdead", - navy: "#000080", - oldlace: "#fdf5e6", - olive: "#808000", - olivedrab: "#6b8e23", - orange: "#ffa500", - orangered: "#ff4500", - orchid: "#da70d6", - palegoldenrod: "#eee8aa", - palegreen: "#98fb98", - paleturquoise: "#afeeee", - palevioletred: "#db7093", - papayawhip: "#ffefd5", - peachpuff: "#ffdab9", - peru: "#cd853f", - pink: "#ffc0cb", - plum: "#dda0dd", - powderblue: "#b0e0e6", - purple: "#800080", - rebeccapurple: "#663399", - red: "#ff0000", - rosybrown: "#bc8f8f", - royalblue: "#4169e1", - saddlebrown: "#8b4513", - salmon: "#fa8072", - sandybrown: "#f4a460", - seagreen: "#2e8b57", - seashell: "#fff5ee", - sienna: "#a0522d", - silver: "#c0c0c0", - skyblue: "#87ceeb", - slateblue: "#6a5acd", - slategray: "#708090", - slategrey: "#708090", - snow: "#fffafa", - springgreen: "#00ff7f", - steelblue: "#4682b4", - tan: "#d2b48c", - teal: "#008080", - thistle: "#d8bfd8", - tomato: "#ff6347", - turquoise: "#40e0d0", - violet: "#ee82ee", - wheat: "#f5deb3", - white: "#ffffff", - whitesmoke: "#f5f5f5", - yellow: "#ffff00", - yellowgreen: "#9acd32" -}; - -// node_modules/@ctrl/tinycolor/dist/module/format-input.js -function inputToRGB(color) { - var rgb = { r: 0, g: 0, b: 0 }; - var a2 = 1; - var s2 = null; - var v2 = null; - var l2 = null; - var ok = false; - var format2 = false; - if (typeof color === "string") { - color = stringInputToObject(color); - } - if (typeof color === "object") { - if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format2 = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { - s2 = convertToPercentage(color.s); - v2 = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, s2, v2); - ok = true; - format2 = "hsv"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { - s2 = convertToPercentage(color.s); - l2 = convertToPercentage(color.l); - rgb = hslToRgb(color.h, s2, l2); - ok = true; - format2 = "hsl"; - } - if (Object.prototype.hasOwnProperty.call(color, "a")) { - a2 = color.a; - } - } - a2 = boundAlpha(a2); - return { - ok, - format: color.format || format2, - r: Math.min(255, Math.max(rgb.r, 0)), - g: Math.min(255, Math.max(rgb.g, 0)), - b: Math.min(255, Math.max(rgb.b, 0)), - a: a2 - }; -} -var CSS_INTEGER = "[-\\+]?\\d+%?"; -var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; -var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")"); -var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?"); -var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?"); -var matchers = { - CSS_UNIT: new RegExp(CSS_UNIT), - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), - hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, - hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ -}; -function stringInputToObject(color) { - color = color.trim().toLowerCase(); - if (color.length === 0) { - return false; - } - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } else if (color === "transparent") { - return { r: 0, g: 0, b: 0, a: 0, format: "name" }; - } - var match = matchers.rgb.exec(color); - if (match) { - return { r: match[1], g: match[2], b: match[3] }; - } - match = matchers.rgba.exec(color); - if (match) { - return { r: match[1], g: match[2], b: match[3], a: match[4] }; - } - match = matchers.hsl.exec(color); - if (match) { - return { h: match[1], s: match[2], l: match[3] }; - } - match = matchers.hsla.exec(color); - if (match) { - return { h: match[1], s: match[2], l: match[3], a: match[4] }; - } - match = matchers.hsv.exec(color); - if (match) { - return { h: match[1], s: match[2], v: match[3] }; - } - match = matchers.hsva.exec(color); - if (match) { - return { h: match[1], s: match[2], v: match[3], a: match[4] }; - } - match = matchers.hex8.exec(color); - if (match) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8" - }; - } - match = matchers.hex6.exec(color); - if (match) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - format: named ? "name" : "hex" - }; - } - match = matchers.hex4.exec(color); - if (match) { - return { - r: parseIntFromHex(match[1] + match[1]), - g: parseIntFromHex(match[2] + match[2]), - b: parseIntFromHex(match[3] + match[3]), - a: convertHexToDecimal(match[4] + match[4]), - format: named ? "name" : "hex8" - }; - } - match = matchers.hex3.exec(color); - if (match) { - return { - r: parseIntFromHex(match[1] + match[1]), - g: parseIntFromHex(match[2] + match[2]), - b: parseIntFromHex(match[3] + match[3]), - format: named ? "name" : "hex" - }; - } - return false; -} -function isValidCSSUnit(color) { - return Boolean(matchers.CSS_UNIT.exec(String(color))); -} - -// node_modules/@ctrl/tinycolor/dist/module/index.js -var TinyColor = ( - /** @class */ - function() { - function TinyColor2(color, opts) { - if (color === void 0) { - color = ""; - } - if (opts === void 0) { - opts = {}; - } - var _a; - if (color instanceof TinyColor2) { - return color; - } - if (typeof color === "number") { - color = numberInputToObject(color); - } - this.originalInput = color; - var rgb = inputToRGB(color); - this.originalInput = color; - this.r = rgb.r; - this.g = rgb.g; - this.b = rgb.b; - this.a = rgb.a; - this.roundA = Math.round(100 * this.a) / 100; - this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format; - this.gradientType = opts.gradientType; - if (this.r < 1) { - this.r = Math.round(this.r); - } - if (this.g < 1) { - this.g = Math.round(this.g); - } - if (this.b < 1) { - this.b = Math.round(this.b); - } - this.isValid = rgb.ok; - } - TinyColor2.prototype.isDark = function() { - return this.getBrightness() < 128; - }; - TinyColor2.prototype.isLight = function() { - return !this.isDark(); - }; - TinyColor2.prototype.getBrightness = function() { - var rgb = this.toRgb(); - return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3; - }; - TinyColor2.prototype.getLuminance = function() { - var rgb = this.toRgb(); - var R2; - var G2; - var B2; - var RsRGB = rgb.r / 255; - var GsRGB = rgb.g / 255; - var BsRGB = rgb.b / 255; - if (RsRGB <= 0.03928) { - R2 = RsRGB / 12.92; - } else { - R2 = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - } - if (GsRGB <= 0.03928) { - G2 = GsRGB / 12.92; - } else { - G2 = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - } - if (BsRGB <= 0.03928) { - B2 = BsRGB / 12.92; - } else { - B2 = Math.pow((BsRGB + 0.055) / 1.055, 2.4); - } - return 0.2126 * R2 + 0.7152 * G2 + 0.0722 * B2; - }; - TinyColor2.prototype.getAlpha = function() { - return this.a; - }; - TinyColor2.prototype.setAlpha = function(alpha) { - this.a = boundAlpha(alpha); - this.roundA = Math.round(100 * this.a) / 100; - return this; - }; - TinyColor2.prototype.isMonochrome = function() { - var s2 = this.toHsl().s; - return s2 === 0; - }; - TinyColor2.prototype.toHsv = function() { - var hsv = rgbToHsv(this.r, this.g, this.b); - return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a }; - }; - TinyColor2.prototype.toHsvString = function() { - var hsv = rgbToHsv(this.r, this.g, this.b); - var h3 = Math.round(hsv.h * 360); - var s2 = Math.round(hsv.s * 100); - var v2 = Math.round(hsv.v * 100); - return this.a === 1 ? "hsv(".concat(h3, ", ").concat(s2, "%, ").concat(v2, "%)") : "hsva(".concat(h3, ", ").concat(s2, "%, ").concat(v2, "%, ").concat(this.roundA, ")"); - }; - TinyColor2.prototype.toHsl = function() { - var hsl = rgbToHsl(this.r, this.g, this.b); - return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a }; - }; - TinyColor2.prototype.toHslString = function() { - var hsl = rgbToHsl(this.r, this.g, this.b); - var h3 = Math.round(hsl.h * 360); - var s2 = Math.round(hsl.s * 100); - var l2 = Math.round(hsl.l * 100); - return this.a === 1 ? "hsl(".concat(h3, ", ").concat(s2, "%, ").concat(l2, "%)") : "hsla(".concat(h3, ", ").concat(s2, "%, ").concat(l2, "%, ").concat(this.roundA, ")"); - }; - TinyColor2.prototype.toHex = function(allow3Char) { - if (allow3Char === void 0) { - allow3Char = false; - } - return rgbToHex(this.r, this.g, this.b, allow3Char); - }; - TinyColor2.prototype.toHexString = function(allow3Char) { - if (allow3Char === void 0) { - allow3Char = false; - } - return "#" + this.toHex(allow3Char); - }; - TinyColor2.prototype.toHex8 = function(allow4Char) { - if (allow4Char === void 0) { - allow4Char = false; - } - return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char); - }; - TinyColor2.prototype.toHex8String = function(allow4Char) { - if (allow4Char === void 0) { - allow4Char = false; - } - return "#" + this.toHex8(allow4Char); - }; - TinyColor2.prototype.toHexShortString = function(allowShortChar) { - if (allowShortChar === void 0) { - allowShortChar = false; - } - return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar); - }; - TinyColor2.prototype.toRgb = function() { - return { - r: Math.round(this.r), - g: Math.round(this.g), - b: Math.round(this.b), - a: this.a - }; - }; - TinyColor2.prototype.toRgbString = function() { - var r = Math.round(this.r); - var g = Math.round(this.g); - var b2 = Math.round(this.b); - return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b2, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b2, ", ").concat(this.roundA, ")"); - }; - TinyColor2.prototype.toPercentageRgb = function() { - var fmt = function(x2) { - return "".concat(Math.round(bound01(x2, 255) * 100), "%"); - }; - return { - r: fmt(this.r), - g: fmt(this.g), - b: fmt(this.b), - a: this.a - }; - }; - TinyColor2.prototype.toPercentageRgbString = function() { - var rnd = function(x2) { - return Math.round(bound01(x2, 255) * 100); - }; - return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")"); - }; - TinyColor2.prototype.toName = function() { - if (this.a === 0) { - return "transparent"; - } - if (this.a < 1) { - return false; - } - var hex2 = "#" + rgbToHex(this.r, this.g, this.b, false); - for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) { - var _b = _a[_i], key = _b[0], value = _b[1]; - if (hex2 === value) { - return key; - } - } - return false; - }; - TinyColor2.prototype.toString = function(format2) { - var formatSet = Boolean(format2); - format2 = format2 !== null && format2 !== void 0 ? format2 : this.format; - var formattedString = false; - var hasAlpha = this.a < 1 && this.a >= 0; - var needsAlphaFormat = !formatSet && hasAlpha && (format2.startsWith("hex") || format2 === "name"); - if (needsAlphaFormat) { - if (format2 === "name" && this.a === 0) { - return this.toName(); - } - return this.toRgbString(); - } - if (format2 === "rgb") { - formattedString = this.toRgbString(); - } - if (format2 === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format2 === "hex" || format2 === "hex6") { - formattedString = this.toHexString(); - } - if (format2 === "hex3") { - formattedString = this.toHexString(true); - } - if (format2 === "hex4") { - formattedString = this.toHex8String(true); - } - if (format2 === "hex8") { - formattedString = this.toHex8String(); - } - if (format2 === "name") { - formattedString = this.toName(); - } - if (format2 === "hsl") { - formattedString = this.toHslString(); - } - if (format2 === "hsv") { - formattedString = this.toHsvString(); - } - return formattedString || this.toHexString(); - }; - TinyColor2.prototype.toNumber = function() { - return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); - }; - TinyColor2.prototype.clone = function() { - return new TinyColor2(this.toString()); - }; - TinyColor2.prototype.lighten = function(amount) { - if (amount === void 0) { - amount = 10; - } - var hsl = this.toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return new TinyColor2(hsl); - }; - TinyColor2.prototype.brighten = function(amount) { - if (amount === void 0) { - amount = 10; - } - var rgb = this.toRgb(); - rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); - rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))); - rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); - return new TinyColor2(rgb); - }; - TinyColor2.prototype.darken = function(amount) { - if (amount === void 0) { - amount = 10; - } - var hsl = this.toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return new TinyColor2(hsl); - }; - TinyColor2.prototype.tint = function(amount) { - if (amount === void 0) { - amount = 10; - } - return this.mix("white", amount); - }; - TinyColor2.prototype.shade = function(amount) { - if (amount === void 0) { - amount = 10; - } - return this.mix("black", amount); - }; - TinyColor2.prototype.desaturate = function(amount) { - if (amount === void 0) { - amount = 10; - } - var hsl = this.toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return new TinyColor2(hsl); - }; - TinyColor2.prototype.saturate = function(amount) { - if (amount === void 0) { - amount = 10; - } - var hsl = this.toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return new TinyColor2(hsl); - }; - TinyColor2.prototype.greyscale = function() { - return this.desaturate(100); - }; - TinyColor2.prototype.spin = function(amount) { - var hsl = this.toHsl(); - var hue = (hsl.h + amount) % 360; - hsl.h = hue < 0 ? 360 + hue : hue; - return new TinyColor2(hsl); - }; - TinyColor2.prototype.mix = function(color, amount) { - if (amount === void 0) { - amount = 50; - } - var rgb1 = this.toRgb(); - var rgb2 = new TinyColor2(color).toRgb(); - var p2 = amount / 100; - var rgba = { - r: (rgb2.r - rgb1.r) * p2 + rgb1.r, - g: (rgb2.g - rgb1.g) * p2 + rgb1.g, - b: (rgb2.b - rgb1.b) * p2 + rgb1.b, - a: (rgb2.a - rgb1.a) * p2 + rgb1.a - }; - return new TinyColor2(rgba); - }; - TinyColor2.prototype.analogous = function(results, slices) { - if (results === void 0) { - results = 6; - } - if (slices === void 0) { - slices = 30; - } - var hsl = this.toHsl(); - var part = 360 / slices; - var ret = [this]; - for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) { - hsl.h = (hsl.h + part) % 360; - ret.push(new TinyColor2(hsl)); - } - return ret; - }; - TinyColor2.prototype.complement = function() { - var hsl = this.toHsl(); - hsl.h = (hsl.h + 180) % 360; - return new TinyColor2(hsl); - }; - TinyColor2.prototype.monochromatic = function(results) { - if (results === void 0) { - results = 6; - } - var hsv = this.toHsv(); - var h3 = hsv.h; - var s2 = hsv.s; - var v2 = hsv.v; - var res = []; - var modification = 1 / results; - while (results--) { - res.push(new TinyColor2({ h: h3, s: s2, v: v2 })); - v2 = (v2 + modification) % 1; - } - return res; - }; - TinyColor2.prototype.splitcomplement = function() { - var hsl = this.toHsl(); - var h3 = hsl.h; - return [ - this, - new TinyColor2({ h: (h3 + 72) % 360, s: hsl.s, l: hsl.l }), - new TinyColor2({ h: (h3 + 216) % 360, s: hsl.s, l: hsl.l }) - ]; - }; - TinyColor2.prototype.onBackground = function(background) { - var fg = this.toRgb(); - var bg = new TinyColor2(background).toRgb(); - var alpha = fg.a + bg.a * (1 - fg.a); - return new TinyColor2({ - r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha, - g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha, - b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha, - a: alpha - }); - }; - TinyColor2.prototype.triad = function() { - return this.polyad(3); - }; - TinyColor2.prototype.tetrad = function() { - return this.polyad(4); - }; - TinyColor2.prototype.polyad = function(n) { - var hsl = this.toHsl(); - var h3 = hsl.h; - var result2 = [this]; - var increment = 360 / n; - for (var i = 1; i < n; i++) { - result2.push(new TinyColor2({ h: (h3 + i * increment) % 360, s: hsl.s, l: hsl.l })); - } - return result2; - }; - TinyColor2.prototype.equals = function(color) { - return this.toRgbString() === new TinyColor2(color).toRgbString(); - }; - return TinyColor2; - }() -); - -// node_modules/element-plus/es/components/button/src/button-custom.mjs -function darken(color, amount = 20) { - return color.mix("#141414", amount).toString(); -} -function useButtonCustomStyle(props2) { - const _disabled = useFormDisabled(); - const ns = useNamespace("button"); - return computed(() => { - let styles = {}; - let buttonColor = props2.color; - if (buttonColor) { - const match = buttonColor.match(/var\((.*?)\)/); - if (match) { - buttonColor = window.getComputedStyle(window.document.documentElement).getPropertyValue(match[1]); - } - const color = new TinyColor(buttonColor); - const activeBgColor = props2.dark ? color.tint(20).toString() : darken(color, 20); - if (props2.plain) { - styles = ns.cssVarBlock({ - "bg-color": props2.dark ? darken(color, 90) : color.tint(90).toString(), - "text-color": buttonColor, - "border-color": props2.dark ? darken(color, 50) : color.tint(50).toString(), - "hover-text-color": `var(${ns.cssVarName("color-white")})`, - "hover-bg-color": buttonColor, - "hover-border-color": buttonColor, - "active-bg-color": activeBgColor, - "active-text-color": `var(${ns.cssVarName("color-white")})`, - "active-border-color": activeBgColor - }); - if (_disabled.value) { - styles[ns.cssVarBlockName("disabled-bg-color")] = props2.dark ? darken(color, 90) : color.tint(90).toString(); - styles[ns.cssVarBlockName("disabled-text-color")] = props2.dark ? darken(color, 50) : color.tint(50).toString(); - styles[ns.cssVarBlockName("disabled-border-color")] = props2.dark ? darken(color, 80) : color.tint(80).toString(); - } - } else { - const hoverBgColor = props2.dark ? darken(color, 30) : color.tint(30).toString(); - const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`; - styles = ns.cssVarBlock({ - "bg-color": buttonColor, - "text-color": textColor, - "border-color": buttonColor, - "hover-bg-color": hoverBgColor, - "hover-text-color": textColor, - "hover-border-color": hoverBgColor, - "active-bg-color": activeBgColor, - "active-border-color": activeBgColor - }); - if (_disabled.value) { - const disabledButtonColor = props2.dark ? darken(color, 50) : color.tint(50).toString(); - styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor; - styles[ns.cssVarBlockName("disabled-text-color")] = props2.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`; - styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor; - } - } - } - return styles; - }); -} - -// node_modules/element-plus/es/components/button/src/button2.mjs -var _sfc_main23 = defineComponent({ - ...{ - name: "ElButton" - }, - __name: "button", - props: buttonProps, - emits: buttonEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const buttonStyle = useButtonCustomStyle(props2); - const ns = useNamespace("button"); - const { - _ref, - _size, - _type, - _disabled, - _props, - _plain, - _round, - _text, - shouldAddSpace, - handleClick - } = useButton(props2, emit); - const buttonKls = computed(() => [ - ns.b(), - ns.m(_type.value), - ns.m(_size.value), - ns.is("disabled", _disabled.value), - ns.is("loading", props2.loading), - ns.is("plain", _plain.value), - ns.is("round", _round.value), - ns.is("circle", props2.circle), - ns.is("text", _text.value), - ns.is("link", props2.link), - ns.is("has-bg", props2.bg) - ]); - __expose({ - ref: _ref, - size: _size, - type: _type, - disabled: _disabled, - shouldAddSpace - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({ - ref_key: "_ref", - ref: _ref - }, unref(_props), { - class: buttonKls.value, - style: unref(buttonStyle), - onClick: unref(handleClick) - }), { - default: withCtx(() => [ - _ctx.loading ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass(unref(ns).is("loading")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon))) - ]), - _: 1 - }, 8, ["class"])) - ], - 64 - )) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { - default: withCtx(() => [ - _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 }) - ]), - _: 3 - })) : createCommentVNode("v-if", true), - _ctx.$slots.default ? (openBlock(), createElementBlock( - "span", - { - key: 2, - class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) }) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 16, ["class", "style", "onClick"]); - }; - } -}); -var Button = _export_sfc(_sfc_main23, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]); - -// node_modules/element-plus/es/components/button/src/button-group.mjs -var buttonGroupProps = { - size: buttonProps.size, - type: buttonProps.type, - direction: { - type: definePropType(String), - values: ["horizontal", "vertical"], - default: "horizontal" - } -}; - -// node_modules/element-plus/es/components/button/src/button-group2.mjs -var _sfc_main24 = defineComponent({ - ...{ - name: "ElButtonGroup" - }, - __name: "button-group", - props: buttonGroupProps, - setup(__props) { - const props2 = __props; - provide( - buttonGroupContextKey, - reactive({ - size: toRef(props2, "size"), - type: toRef(props2, "type") - }) - ); - const ns = useNamespace("button"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props2.direction)]) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ); - }; - } -}); -var ButtonGroup = _export_sfc(_sfc_main24, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]); - -// node_modules/element-plus/es/components/button/index.mjs -var ElButton = withInstall(Button, { - ButtonGroup -}); -var ElButtonGroup = withNoopInstall(ButtonGroup); - -// node_modules/element-plus/es/components/time-picker/src/utils.mjs -var import_dayjs = __toESM(require_dayjs_min(), 1); -var buildTimeList = (value, bound) => { - return [ - value > 0 ? value - 1 : void 0, - value, - value < bound ? value + 1 : void 0 - ]; -}; -var rangeArr = (n) => Array.from(Array.from({ length: n }).keys()); -var extractDateFormat = (format2) => { - return format2.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim(); -}; -var extractTimeFormat = (format2) => { - return format2.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim(); -}; -var dateEquals = function(a2, b2) { - const aIsDate = isDate(a2); - const bIsDate = isDate(b2); - if (aIsDate && bIsDate) { - return a2.getTime() === b2.getTime(); - } - if (!aIsDate && !bIsDate) { - return a2 === b2; - } - return false; -}; -var valueEquals = function(a2, b2) { - const aIsArray = isArray(a2); - const bIsArray = isArray(b2); - if (aIsArray && bIsArray) { - if (a2.length !== b2.length) { - return false; - } - return a2.every((item, index) => dateEquals(item, b2[index])); - } - if (!aIsArray && !bIsArray) { - return dateEquals(a2, b2); - } - return false; -}; -var parseDate = function(date4, format2, lang) { - const day = isEmpty2(format2) || format2 === "x" ? (0, import_dayjs.default)(date4).locale(lang) : (0, import_dayjs.default)(date4, format2).locale(lang); - return day.isValid() ? day : void 0; -}; -var formatter = function(date4, format2, lang) { - if (isEmpty2(format2)) - return date4; - if (format2 === "x") - return +date4; - return (0, import_dayjs.default)(date4).locale(lang).format(format2); -}; -var makeList = (total2, method5) => { - var _a; - const arr = []; - const disabledArr = method5 == null ? void 0 : method5(); - for (let i = 0; i < total2; i++) { - arr.push((_a = disabledArr == null ? void 0 : disabledArr.includes(i)) != null ? _a : false); - } - return arr; -}; -var dayOrDaysToDate = (dayOrDays) => { - return isArray(dayOrDays) ? dayOrDays.map((d2) => d2.toDate()) : dayOrDays.toDate(); -}; - -// node_modules/element-plus/es/components/calendar/src/date-table.mjs -var getPrevMonthLastDays = (date4, count) => { - const lastDay = date4.subtract(1, "month").endOf("month").date(); - return rangeArr(count).map((_2, index) => lastDay - (count - index - 1)); -}; -var getMonthDays = (date4) => { - const days = date4.daysInMonth(); - return rangeArr(days).map((_2, index) => index + 1); -}; -var toNestedArr = (days) => rangeArr(days.length / 7).map((index) => { - const start = index * 7; - return days.slice(start, start + 7); -}); -var dateTableProps = buildProps({ - selectedDay: { - type: definePropType(Object) - }, - range: { - type: definePropType(Array) - }, - date: { - type: definePropType(Object), - required: true - }, - hideHeader: { - type: Boolean - } -}); -var dateTableEmits = { - pick: (value) => isObject(value) -}; - -// node_modules/element-plus/es/components/calendar/src/use-date-table.mjs -var import_dayjs2 = __toESM(require_dayjs_min(), 1); -var import_localeData = __toESM(require_localeData(), 1); - -// node_modules/element-plus/es/constants/date.mjs -var datePickTypes = [ - "year", - "years", - "month", - "months", - "date", - "dates", - "week", - "datetime", - "datetimerange", - "daterange", - "monthrange", - "yearrange" -]; -var WEEK_DAYS = [ - "sun", - "mon", - "tue", - "wed", - "thu", - "fri", - "sat" -]; - -// node_modules/element-plus/es/components/calendar/src/use-date-table.mjs -var useDateTable = (props2, emit) => { - import_dayjs2.default.extend(import_localeData.default); - const firstDayOfWeek = import_dayjs2.default.localeData().firstDayOfWeek(); - const { t, lang } = useLocale(); - const now2 = (0, import_dayjs2.default)().locale(lang.value); - const isInRange = computed(() => !!props2.range && !!props2.range.length); - const rows = computed(() => { - let days = []; - if (isInRange.value) { - const [start, end] = props2.range; - const currentMonthRange = rangeArr( - end.date() - start.date() + 1 - ).map((index) => ({ - text: start.date() + index, - type: "current" - })); - let remaining = currentMonthRange.length % 7; - remaining = remaining === 0 ? 0 : 7 - remaining; - const nextMonthRange = rangeArr(remaining).map( - (_2, index) => ({ - text: index + 1, - type: "next" - }) - ); - days = currentMonthRange.concat(nextMonthRange); - } else { - const firstDay = props2.date.startOf("month").day(); - const prevMonthDays = getPrevMonthLastDays( - props2.date, - (firstDay - firstDayOfWeek + 7) % 7 - ).map((day) => ({ - text: day, - type: "prev" - })); - const currentMonthDays = getMonthDays(props2.date).map( - (day) => ({ - text: day, - type: "current" - }) - ); - days = [...prevMonthDays, ...currentMonthDays]; - const remaining = 7 - (days.length % 7 || 7); - const nextMonthDays = rangeArr(remaining).map( - (_2, index) => ({ - text: index + 1, - type: "next" - }) - ); - days = days.concat(nextMonthDays); - } - return toNestedArr(days); - }); - const weekDays = computed(() => { - const start = firstDayOfWeek; - if (start === 0) { - return WEEK_DAYS.map((_2) => t(`el.datepicker.weeks.${_2}`)); - } else { - return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_2) => t(`el.datepicker.weeks.${_2}`)); - } - }); - const getFormattedDate = (day, type4) => { - switch (type4) { - case "prev": - return props2.date.startOf("month").subtract(1, "month").date(day); - case "next": - return props2.date.startOf("month").add(1, "month").date(day); - case "current": - return props2.date.date(day); - } - }; - const handlePickDay = ({ text, type: type4 }) => { - const date4 = getFormattedDate(text, type4); - emit("pick", date4); - }; - const getSlotData = ({ text, type: type4 }) => { - const day = getFormattedDate(text, type4); - return { - isSelected: day.isSame(props2.selectedDay), - type: `${type4}-month`, - day: day.format("YYYY-MM-DD"), - date: day.toDate() - }; - }; - return { - now: now2, - isInRange, - rows, - weekDays, - getFormattedDate, - handlePickDay, - getSlotData - }; -}; - -// node_modules/element-plus/es/components/calendar/src/date-table2.mjs -var _hoisted_17 = { key: 0 }; -var _hoisted_24 = ["onClick"]; -var _sfc_main25 = defineComponent({ - ...{ - name: "DateTable" - }, - __name: "date-table", - props: dateTableProps, - emits: dateTableEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { - isInRange, - now: now2, - rows, - weekDays, - getFormattedDate, - handlePickDay, - getSlotData - } = useDateTable(props2, emit); - const nsTable = useNamespace("calendar-table"); - const nsDay = useNamespace("calendar-day"); - const getCellClass = ({ text, type: type4 }) => { - const classes = [type4]; - if (type4 === "current") { - const date4 = getFormattedDate(text, type4); - if (date4.isSame(props2.selectedDay, "day")) { - classes.push(nsDay.is("selected")); - } - if (date4.isSame(now2, "day")) { - classes.push(nsDay.is("today")); - } - } - return classes; - }; - __expose({ - getFormattedDate - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "table", - { - class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]), - cellspacing: "0", - cellpadding: "0" - }, - [ - !_ctx.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_17, [ - createBaseVNode("tr", null, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(weekDays), (day) => { - return openBlock(), createElementBlock( - "th", - { - key: day, - scope: "col" - }, - toDisplayString(day), - 1 - ); - }), - 128 - )) - ]) - ])) : createCommentVNode("v-if", true), - createBaseVNode("tbody", null, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(rows), (row, index) => { - return openBlock(), createElementBlock( - "tr", - { - key: index, - class: normalizeClass({ - [unref(nsTable).e("row")]: true, - [unref(nsTable).em("row", "hide-border")]: index === 0 && _ctx.hideHeader - }) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(row, (cell, key) => { - return openBlock(), createElementBlock("td", { - key, - class: normalizeClass(getCellClass(cell)), - onClick: ($event) => unref(handlePickDay)(cell) - }, [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsDay).b()) - }, - [ - renderSlot(_ctx.$slots, "date-cell", { - data: unref(getSlotData)(cell) - }, () => [ - createBaseVNode( - "span", - null, - toDisplayString(cell.text), - 1 - ) - ]) - ], - 2 - ) - ], 10, _hoisted_24); - }), - 128 - )) - ], - 2 - ); - }), - 128 - )) - ]) - ], - 2 - ); - }; - } -}); -var DateTable = _export_sfc(_sfc_main25, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/calendar/src/date-table.vue"]]); - -// node_modules/element-plus/es/components/calendar/src/use-calendar.mjs -var import_dayjs3 = __toESM(require_dayjs_min(), 1); -var adjacentMonth = (start, end) => { - const firstMonthLastDay = start.endOf("month"); - const lastMonthFirstDay = end.startOf("month"); - const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week"); - const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay; - return [ - [start, firstMonthLastDay], - [lastMonthStartDay.startOf("week"), end] - ]; -}; -var threeConsecutiveMonth = (start, end) => { - const firstMonthLastDay = start.endOf("month"); - const secondMonthFirstDay = start.add(1, "month").startOf("month"); - const secondMonthStartDay = firstMonthLastDay.isSame( - secondMonthFirstDay, - "week" - ) ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay; - const secondMonthLastDay = secondMonthStartDay.endOf("month"); - const lastMonthFirstDay = end.startOf("month"); - const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay; - return [ - [start, firstMonthLastDay], - [secondMonthStartDay.startOf("week"), secondMonthLastDay], - [lastMonthStartDay.startOf("week"), end] - ]; -}; -var useCalendar = (props2, emit, componentName2) => { - const { lang } = useLocale(); - const selectedDay = ref(); - const now2 = (0, import_dayjs3.default)().locale(lang.value); - const realSelectedDay = computed({ - get() { - if (!props2.modelValue) - return selectedDay.value; - return date4.value; - }, - set(val) { - if (!val) - return; - selectedDay.value = val; - const result2 = val.toDate(); - emit(INPUT_EVENT, result2); - emit(UPDATE_MODEL_EVENT, result2); - } - }); - const validatedRange = computed(() => { - if (!props2.range || !isArray(props2.range) || props2.range.length !== 2 || props2.range.some((item) => !isDate(item))) - return []; - const rangeArrDayjs = props2.range.map((_2) => (0, import_dayjs3.default)(_2).locale(lang.value)); - const [startDayjs, endDayjs] = rangeArrDayjs; - if (startDayjs.isAfter(endDayjs)) { - debugWarn(componentName2, "end time should be greater than start time"); - return []; - } - if (startDayjs.isSame(endDayjs, "month")) { - return calculateValidatedDateRange(startDayjs, endDayjs); - } else { - if (startDayjs.add(1, "month").month() !== endDayjs.month()) { - debugWarn( - componentName2, - "start time and end time interval must not exceed two months" - ); - return []; - } - return calculateValidatedDateRange(startDayjs, endDayjs); - } - }); - const date4 = computed(() => { - if (!props2.modelValue) { - return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now2); - } else { - return (0, import_dayjs3.default)(props2.modelValue).locale(lang.value); - } - }); - const prevMonthDayjs = computed(() => date4.value.subtract(1, "month").date(1)); - const nextMonthDayjs = computed(() => date4.value.add(1, "month").date(1)); - const prevYearDayjs = computed(() => date4.value.subtract(1, "year").date(1)); - const nextYearDayjs = computed(() => date4.value.add(1, "year").date(1)); - const calculateValidatedDateRange = (startDayjs, endDayjs) => { - const firstDay = startDayjs.startOf("week"); - const lastDay = endDayjs.endOf("week"); - const firstMonth = firstDay.get("month"); - const lastMonth = lastDay.get("month"); - if (firstMonth === lastMonth) { - return [[firstDay, lastDay]]; - } else if ((firstMonth + 1) % 12 === lastMonth) { - return adjacentMonth(firstDay, lastDay); - } else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) { - return threeConsecutiveMonth(firstDay, lastDay); - } else { - debugWarn( - componentName2, - "start time and end time interval must not exceed two months" - ); - return []; - } - }; - const pickDay = (day) => { - realSelectedDay.value = day; - }; - const selectDate = (type4) => { - const dateMap = { - "prev-month": prevMonthDayjs.value, - "next-month": nextMonthDayjs.value, - "prev-year": prevYearDayjs.value, - "next-year": nextYearDayjs.value, - today: now2 - }; - const day = dateMap[type4]; - if (!day.isSame(date4.value, "day")) { - pickDay(day); - } - }; - const handleDateChange = (date22) => { - if (date22 === "today") { - selectDate("today"); - } else { - pickDay(date22); - } - }; - return { - calculateValidatedDateRange, - date: date4, - realSelectedDay, - pickDay, - selectDate, - validatedRange, - handleDateChange - }; -}; - -// node_modules/element-plus/es/components/calendar/src/calendar.mjs -var isValidRange = (range4) => isArray(range4) && range4.length === 2 && range4.every((item) => isDate(item)); -var calendarProps = buildProps({ - modelValue: { - type: Date - }, - range: { - type: definePropType(Array), - validator: isValidRange - }, - controllerType: { - type: String, - values: ["button", "select"], - default: "button" - }, - formatter: { - type: definePropType(Function) - } -}); -var calendarEmits = { - [UPDATE_MODEL_EVENT]: (value) => isDate(value), - [INPUT_EVENT]: (value) => isDate(value) -}; - -// node_modules/element-plus/es/components/calendar/src/select-controller2.mjs -var import_dayjs4 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/tag/src/tag2.mjs -var tagProps = buildProps({ - type: { - type: String, - values: ["primary", "success", "info", "warning", "danger"], - default: "primary" - }, - closable: Boolean, - disableTransitions: Boolean, - hit: Boolean, - color: String, - size: { - type: String, - values: componentSizes - }, - effect: { - type: String, - values: ["dark", "light", "plain"], - default: "light" - }, - round: Boolean -}); -var tagEmits = { - close: (evt) => evt instanceof MouseEvent, - click: (evt) => evt instanceof MouseEvent -}; - -// node_modules/element-plus/es/components/tag/src/tag.mjs -var _hoisted_18 = ["aria-label"]; -var _hoisted_25 = ["aria-label"]; -var _sfc_main26 = defineComponent({ - ...{ - name: "ElTag" - }, - __name: "tag", - props: tagProps, - emits: tagEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const tagSize = useFormSize(); - const { t } = useLocale(); - const ns = useNamespace("tag"); - const containerKls = computed(() => { - const { type: type4, hit, effect, closable, round: round3 } = props2; - return [ - ns.b(), - ns.is("closable", closable), - ns.m(type4 || "primary"), - ns.m(tagSize.value), - ns.m(effect), - ns.is("hit", hit), - ns.is("round", round3) - ]; - }); - const handleClose = (event) => { - emit("close", event); - }; - const handleClick = (event) => { - emit("click", event); - }; - const handleVNodeMounted = (vnode) => { - var _a, _b, _c; - if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) { - vnode.component.subTree.component.bum = null; - } - }; - return (_ctx, _cache) => { - return _ctx.disableTransitions ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass(containerKls.value), - style: normalizeStyle({ backgroundColor: _ctx.color }), - onClick: handleClick - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("content")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ), - _ctx.closable ? (openBlock(), createElementBlock("button", { - key: 0, - "aria-label": unref(t)("el.tag.close"), - class: normalizeClass(unref(ns).e("close")), - type: "button", - onClick: withModifiers(handleClose, ["stop"]) - }, [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }) - ], 10, _hoisted_18)) : createCommentVNode("v-if", true) - ], - 6 - )) : (openBlock(), createBlock(Transition, { - key: 1, - name: `${unref(ns).namespace.value}-zoom-in-center`, - appear: "", - onVnodeMounted: handleVNodeMounted - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(containerKls.value), - style: normalizeStyle({ backgroundColor: _ctx.color }), - onClick: handleClick - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("content")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ), - _ctx.closable ? (openBlock(), createElementBlock("button", { - key: 0, - "aria-label": unref(t)("el.tag.close"), - class: normalizeClass(unref(ns).e("close")), - type: "button", - onClick: withModifiers(handleClose, ["stop"]) - }, [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }) - ], 10, _hoisted_25)) : createCommentVNode("v-if", true) - ], - 6 - ) - ]), - _: 3 - }, 8, ["name"])); - }; - } -}); -var Tag = _export_sfc(_sfc_main26, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]); - -// node_modules/element-plus/es/components/tag/index.mjs -var ElTag = withInstall(Tag); - -// node_modules/element-plus/es/components/select-v2/src/useProps.mjs -var defaultProps = { - label: "label", - value: "value", - disabled: "disabled", - options: "options" -}; -function useProps(props2) { - const aliasProps = ref({ ...defaultProps, ...props2.props }); - let cache2 = { ...props2.props }; - watch( - () => props2.props, - (val) => { - if (!isEqual_default(val, cache2)) { - aliasProps.value = { ...defaultProps, ...val }; - cache2 = { ...val }; - } - }, - { deep: true } - ); - const getLabel = (option) => get_default(option, aliasProps.value.label); - const getValue3 = (option) => get_default(option, aliasProps.value.value); - const getDisabled = (option) => get_default(option, aliasProps.value.disabled); - const getOptions = (option) => get_default(option, aliasProps.value.options); - return { - aliasProps, - getLabel, - getValue: getValue3, - getDisabled, - getOptions - }; -} - -// node_modules/element-plus/es/components/select/src/token.mjs -var selectGroupKey = Symbol("ElSelectGroup"); -var selectKey = Symbol("ElSelect"); - -// node_modules/element-plus/es/components/select/src/option.mjs -var COMPONENT_NAME7 = "ElOption"; -var optionProps = buildProps({ - value: { - type: [String, Number, Boolean, Object], - required: true - }, - label: { - type: [String, Number] - }, - created: Boolean, - disabled: Boolean -}); - -// node_modules/element-plus/es/utils/strings.mjs -var escapeStringRegexp = (string3 = "") => string3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); -var capitalize3 = (str) => capitalize(str); - -// node_modules/element-plus/es/components/select/src/useOption.mjs -function useOption(props2, states) { - const select = inject(selectKey); - if (!select) { - throwError(COMPONENT_NAME7, "usage: "); - } - const selectGroup = inject(selectGroupKey, { disabled: false }); - const itemSelected = computed(() => { - return contains(castArray_default(select.props.modelValue), props2.value); - }); - const limitReached = computed(() => { - var _a; - if (select.props.multiple) { - const modelValue = castArray_default((_a = select.props.modelValue) != null ? _a : []); - return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0; - } else { - return false; - } - }); - const currentLabel = computed(() => { - var _a; - return (_a = props2.label) != null ? _a : isObject(props2.value) ? "" : props2.value; - }); - const currentValue = computed(() => { - return props2.value || props2.label || ""; - }); - const isDisabled = computed(() => { - return props2.disabled || states.groupDisabled || limitReached.value; - }); - const instance = getCurrentInstance(); - const contains = (arr = [], target2) => { - if (!isObject(props2.value)) { - return arr && arr.includes(target2); - } else { - const valueKey = select.props.valueKey; - return arr && arr.some((item) => { - return toRaw(get_default(item, valueKey)) === get_default(target2, valueKey); - }); - } - }; - const hoverItem = () => { - if (!isDisabled.value) { - select.states.hoveringIndex = select.optionsArray.indexOf(instance.proxy); - } - }; - const updateOption = (query) => { - const regexp4 = new RegExp(escapeStringRegexp(query), "i"); - states.visible = regexp4.test(String(currentLabel.value)) || props2.created; - }; - watch( - () => currentLabel.value, - () => { - if (!props2.created && !select.props.remote) - select.setSelected(); - } - ); - watch( - () => props2.value, - (val, oldVal) => { - const { remote, valueKey } = select.props; - const shouldUpdate = remote ? val !== oldVal : !isEqual_default(val, oldVal); - if (shouldUpdate) { - select.onOptionDestroy(oldVal, instance.proxy); - select.onOptionCreate(instance.proxy); - } - if (!props2.created && !remote) { - if (valueKey && isObject(val) && isObject(oldVal) && val[valueKey] === oldVal[valueKey]) { - return; - } - select.setSelected(); - } - } - ); - watch( - () => selectGroup.disabled, - () => { - states.groupDisabled = selectGroup.disabled; - }, - { immediate: true } - ); - return { - select, - currentLabel, - currentValue, - itemSelected, - isDisabled, - hoverItem, - updateOption - }; -} - -// node_modules/element-plus/es/components/select/src/option2.mjs -var _sfc_main27 = defineComponent({ - name: COMPONENT_NAME7, - componentName: COMPONENT_NAME7, - props: optionProps, - setup(props2) { - const ns = useNamespace("select"); - const id = useId(); - const containerKls = computed(() => [ - ns.be("dropdown", "item"), - ns.is("disabled", unref(isDisabled)), - ns.is("selected", unref(itemSelected)), - ns.is("hovering", unref(hover)) - ]); - const states = reactive({ - index: -1, - groupDisabled: false, - visible: true, - hover: false - }); - const { - currentLabel, - itemSelected, - isDisabled, - select, - hoverItem, - updateOption - } = useOption(props2, states); - const { visible, hover } = toRefs(states); - const vm = getCurrentInstance().proxy; - select.onOptionCreate(vm); - onBeforeUnmount(() => { - const key = vm.value; - nextTick(() => { - const { selected: selectedOptions } = select.states; - const doesSelected = selectedOptions.some((item) => { - return item.value === vm.value; - }); - if (select.states.cachedOptions.get(key) === vm && !doesSelected) { - select.states.cachedOptions.delete(key); - } - }); - select.onOptionDestroy(key, vm); - }); - function selectOptionClick() { - if (!isDisabled.value) { - select.handleOptionSelect(vm); - } - } - return { - ns, - id, - containerKls, - currentLabel, - itemSelected, - isDisabled, - select, - visible, - hover, - states, - hoverItem, - updateOption, - selectOptionClick - }; - } -}); -var _hoisted_19 = ["id", "aria-disabled", "aria-selected"]; -function _sfc_render2(_ctx, _cache, $props, $setup, $data, $options) { - return withDirectives((openBlock(), createElementBlock("li", { - id: _ctx.id, - class: normalizeClass(_ctx.containerKls), - role: "option", - "aria-disabled": _ctx.isDisabled || void 0, - "aria-selected": _ctx.itemSelected, - onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)), - onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"])) - }, [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.currentLabel), - 1 - ) - ]) - ], 42, _hoisted_19)), [ - [vShow, _ctx.visible] - ]); -} -var Option = _export_sfc(_sfc_main27, [["render", _sfc_render2], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]); - -// node_modules/element-plus/es/constants/form.mjs -var MINIMUM_INPUT_WIDTH = 11; -var BORDER_HORIZONTAL_WIDTH = 2; - -// node_modules/element-plus/es/components/select/src/select-dropdown.mjs -var _sfc_main28 = defineComponent({ - name: "ElSelectDropdown", - componentName: "ElSelectDropdown", - setup() { - const select = inject(selectKey); - const ns = useNamespace("select"); - const popperClass = computed(() => select.props.popperClass); - const isMultiple = computed(() => select.props.multiple); - const isFitInputWidth = computed(() => select.props.fitInputWidth); - const minWidth = ref(""); - function updateMinWidth() { - var _a; - const offsetWidth = (_a = select.selectRef) == null ? void 0 : _a.offsetWidth; - if (offsetWidth) { - minWidth.value = `${offsetWidth - BORDER_HORIZONTAL_WIDTH}px`; - } else { - minWidth.value = ""; - } - } - onMounted(() => { - updateMinWidth(); - useResizeObserver(select.selectRef, updateMinWidth); - }); - return { - ns, - minWidth, - popperClass, - isMultiple, - isFitInputWidth - }; - } -}); -function _sfc_render3(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]), - style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth }) - }, - [ - _ctx.$slots.header ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(_ctx.ns.be("dropdown", "header")) - }, - [ - renderSlot(_ctx.$slots, "header") - ], - 2 - )) : createCommentVNode("v-if", true), - renderSlot(_ctx.$slots, "default"), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(_ctx.ns.be("dropdown", "footer")) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ); -} -var ElSelectMenu = _export_sfc(_sfc_main28, [["render", _sfc_render3], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]); - -// node_modules/element-plus/es/components/select/src/useSelect.mjs -var useSelect = (props2, emit) => { - const { t } = useLocale(); - const slots = useSlots(); - const contentId = useId(); - const nsSelect = useNamespace("select"); - const nsInput = useNamespace("input"); - const states = reactive({ - inputValue: "", - options: /* @__PURE__ */ new Map(), - cachedOptions: /* @__PURE__ */ new Map(), - optionValues: [], - selected: [], - selectionWidth: 0, - collapseItemWidth: 0, - selectedLabel: "", - hoveringIndex: -1, - previousQuery: null, - inputHovering: false, - menuVisibleOnFocus: false, - isBeforeHide: false - }); - const selectRef = ref(); - const selectionRef = ref(); - const tooltipRef = ref(); - const tagTooltipRef = ref(); - const inputRef = ref(); - const prefixRef = ref(); - const suffixRef = ref(); - const menuRef = ref(); - const tagMenuRef = ref(); - const collapseItemRef = ref(); - const scrollbarRef = ref(); - const expanded = ref(false); - const hoverOption = ref(); - const debouncing = ref(false); - const { form, formItem } = useFormItem(); - const { inputId } = useFormItemInputId(props2, { - formItemContext: formItem - }); - const { valueOnClear, isEmptyValue: isEmptyValue2 } = useEmptyValues(props2); - const { - isComposing, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd - } = useComposition({ - afterComposition: (e) => onInput(e) - }); - const selectDisabled = useFormDisabled(); - const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, { - disabled: selectDisabled, - afterFocus() { - if (props2.automaticDropdown && !expanded.value) { - expanded.value = true; - states.menuVisibleOnFocus = true; - } - }, - beforeBlur(event) { - var _a, _b; - return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event)); - }, - afterBlur() { - var _a; - expanded.value = false; - states.menuVisibleOnFocus = false; - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err)); - } - } - }); - const hasModelValue = computed(() => { - return isArray(props2.modelValue) ? props2.modelValue.length > 0 : !isEmptyValue2(props2.modelValue); - }); - const needStatusIcon = computed(() => { - var _a; - return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false; - }); - const showClearBtn = computed(() => { - return props2.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering); - }); - const iconComponent = computed( - () => props2.remote && props2.filterable && !props2.remoteShowSuffix ? "" : props2.suffixIcon - ); - const iconReverse = computed( - () => nsSelect.is("reverse", !!(iconComponent.value && expanded.value)) - ); - const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || ""); - const validateIcon = computed( - () => validateState.value && ValidateComponentsMap[validateState.value] - ); - const debounce2 = computed(() => props2.remote ? props2.debounce : 0); - const isRemoteSearchEmpty = computed( - () => props2.remote && !states.inputValue && states.options.size === 0 - ); - const emptyText = computed(() => { - if (props2.loading) { - return props2.loadingText || t("el.select.loading"); - } else { - if (props2.filterable && states.inputValue && states.options.size > 0 && filteredOptionsCount.value === 0) { - return props2.noMatchText || t("el.select.noMatch"); - } - if (states.options.size === 0) { - return props2.noDataText || t("el.select.noData"); - } - } - return null; - }); - const filteredOptionsCount = computed( - () => optionsArray.value.filter((option) => option.visible).length - ); - const optionsArray = computed(() => { - const list = Array.from(states.options.values()); - const newList = []; - states.optionValues.forEach((item) => { - const index = list.findIndex((i) => i.value === item); - if (index > -1) { - newList.push(list[index]); - } - }); - return newList.length >= list.length ? newList : list; - }); - const cachedOptionsArray = computed( - () => Array.from(states.cachedOptions.values()) - ); - const showNewOption = computed(() => { - const hasExistingOption = optionsArray.value.filter((option) => { - return !option.created; - }).some((option) => { - return option.currentLabel === states.inputValue; - }); - return props2.filterable && props2.allowCreate && states.inputValue !== "" && !hasExistingOption; - }); - const updateOptions2 = () => { - if (props2.filterable && isFunction(props2.filterMethod)) - return; - if (props2.filterable && props2.remote && isFunction(props2.remoteMethod)) - return; - optionsArray.value.forEach((option) => { - var _a; - (_a = option.updateOption) == null ? void 0 : _a.call(option, states.inputValue); - }); - }; - const selectSize = useFormSize(); - const collapseTagSize = computed( - () => ["small"].includes(selectSize.value) ? "small" : "default" - ); - const dropdownMenuVisible = computed({ - get() { - return expanded.value && (props2.loading || !isRemoteSearchEmpty.value || props2.remote && !!slots.empty) && (!debouncing.value || !isEmpty2(states.previousQuery)); - }, - set(val) { - expanded.value = val; - } - }); - const shouldShowPlaceholder = computed(() => { - if (props2.multiple && !isUndefined2(props2.modelValue)) { - return castArray_default(props2.modelValue).length === 0 && !states.inputValue; - } - const value = isArray(props2.modelValue) ? props2.modelValue[0] : props2.modelValue; - return props2.filterable || isUndefined2(value) ? !states.inputValue : true; - }); - const currentPlaceholder = computed(() => { - var _a; - const _placeholder = (_a = props2.placeholder) != null ? _a : t("el.select.placeholder"); - return props2.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel; - }); - const mouseEnterEventName = computed(() => isIOS ? null : "mouseenter"); - watch( - () => props2.modelValue, - (val, oldVal) => { - if (props2.multiple) { - if (props2.filterable && !props2.reserveKeyword) { - states.inputValue = ""; - handleQueryChange(""); - } - } - setSelected(); - if (!isEqual_default(val, oldVal) && props2.validateEvent) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - }, - { - flush: "post", - deep: true - } - ); - watch( - () => expanded.value, - (val) => { - if (val) { - handleQueryChange(states.inputValue); - } else { - states.inputValue = ""; - states.previousQuery = null; - states.isBeforeHide = true; - } - } - ); - watch( - () => states.options.entries(), - () => { - if (!isClient) - return; - setSelected(); - if (props2.defaultFirstOption && (props2.filterable || props2.remote) && filteredOptionsCount.value) { - checkDefaultFirstOption(); - } - }, - { - flush: "post" - } - ); - watch([() => states.hoveringIndex, optionsArray], ([val]) => { - if (isNumber2(val) && val > -1) { - hoverOption.value = optionsArray.value[val] || {}; - } else { - hoverOption.value = {}; - } - optionsArray.value.forEach((option) => { - option.hover = hoverOption.value === option; - }); - }); - watchEffect(() => { - if (states.isBeforeHide) - return; - updateOptions2(); - }); - const handleQueryChange = (val) => { - if (states.previousQuery === val || isComposing.value) { - return; - } - states.previousQuery = val; - if (props2.filterable && isFunction(props2.filterMethod)) { - props2.filterMethod(val); - } else if (props2.filterable && props2.remote && isFunction(props2.remoteMethod)) { - props2.remoteMethod(val); - } - if (props2.defaultFirstOption && (props2.filterable || props2.remote) && filteredOptionsCount.value) { - nextTick(checkDefaultFirstOption); - } else { - nextTick(updateHoveringIndex); - } - }; - const checkDefaultFirstOption = () => { - const optionsInDropdown = optionsArray.value.filter( - (n) => n.visible && !n.disabled && !n.states.groupDisabled - ); - const userCreatedOption = optionsInDropdown.find((n) => n.created); - const firstOriginOption = optionsInDropdown[0]; - const valueList = optionsArray.value.map((item) => item.value); - states.hoveringIndex = getValueIndex( - valueList, - userCreatedOption || firstOriginOption - ); - }; - const setSelected = () => { - if (!props2.multiple) { - const value = isArray(props2.modelValue) ? props2.modelValue[0] : props2.modelValue; - const option = getOption(value); - states.selectedLabel = option.currentLabel; - states.selected = [option]; - return; - } else { - states.selectedLabel = ""; - } - const result2 = []; - if (!isUndefined2(props2.modelValue)) { - castArray_default(props2.modelValue).forEach((value) => { - result2.push(getOption(value)); - }); - } - states.selected = result2; - }; - const getOption = (value) => { - let option; - const isObjectValue = isPlainObject(value); - for (let i = states.cachedOptions.size - 1; i >= 0; i--) { - const cachedOption = cachedOptionsArray.value[i]; - const isEqualValue = isObjectValue ? get_default(cachedOption.value, props2.valueKey) === get_default(value, props2.valueKey) : cachedOption.value === value; - if (isEqualValue) { - option = { - index: optionsArray.value.filter((opt) => !opt.created).indexOf(cachedOption), - value, - currentLabel: cachedOption.currentLabel, - get isDisabled() { - return cachedOption.isDisabled; - } - }; - break; - } - } - if (option) - return option; - const label = isObjectValue ? value.label : value != null ? value : ""; - const newOption = { - index: -1, - value, - currentLabel: label - }; - return newOption; - }; - const updateHoveringIndex = () => { - const length = states.selected.length; - if (length > 0) { - const lastOption = states.selected[length - 1]; - states.hoveringIndex = optionsArray.value.findIndex( - (item) => getValueKey(lastOption) === getValueKey(item) - ); - } else { - states.hoveringIndex = -1; - } - }; - const resetSelectionWidth = () => { - states.selectionWidth = Number.parseFloat( - window.getComputedStyle(selectionRef.value).width - ); - }; - const resetCollapseItemWidth = () => { - states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width; - }; - const updateTooltip = () => { - var _a, _b; - (_b = (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - }; - const updateTagTooltip = () => { - var _a, _b; - (_b = (_a = tagTooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - }; - const onInputChange = () => { - if (states.inputValue.length > 0 && !expanded.value) { - expanded.value = true; - } - handleQueryChange(states.inputValue); - }; - const onInput = (event) => { - states.inputValue = event.target.value; - if (props2.remote) { - debouncing.value = true; - debouncedOnInputChange(); - } else { - return onInputChange(); - } - }; - const debouncedOnInputChange = useDebounceFn(() => { - onInputChange(); - debouncing.value = false; - }, debounce2); - const emitChange = (val) => { - if (!isEqual_default(props2.modelValue, val)) { - emit(CHANGE_EVENT, val); - } - }; - const getLastNotDisabledIndex = (value) => findLastIndex_default(value, (it2) => { - const option = states.cachedOptions.get(it2); - return !(option == null ? void 0 : option.disabled) && !(option == null ? void 0 : option.states.groupDisabled); - }); - const deletePrevTag = (e) => { - const code = getEventCode(e); - if (!props2.multiple) - return; - if (code === EVENT_CODE.delete) - return; - if (e.target.value.length <= 0) { - const value = castArray_default(props2.modelValue).slice(); - const lastNotDisabledIndex = getLastNotDisabledIndex(value); - if (lastNotDisabledIndex < 0) - return; - const removeTagValue = value[lastNotDisabledIndex]; - value.splice(lastNotDisabledIndex, 1); - emit(UPDATE_MODEL_EVENT, value); - emitChange(value); - emit("remove-tag", removeTagValue); - } - }; - const deleteTag = (event, tag) => { - const index = states.selected.indexOf(tag); - if (index > -1 && !selectDisabled.value) { - const value = castArray_default(props2.modelValue).slice(); - value.splice(index, 1); - emit(UPDATE_MODEL_EVENT, value); - emitChange(value); - emit("remove-tag", tag.value); - } - event.stopPropagation(); - focus(); - }; - const deleteSelected = (event) => { - event.stopPropagation(); - const value = props2.multiple ? [] : valueOnClear.value; - if (props2.multiple) { - for (const item of states.selected) { - if (item.isDisabled) - value.push(item.value); - } - } - emit(UPDATE_MODEL_EVENT, value); - emitChange(value); - states.hoveringIndex = -1; - expanded.value = false; - emit("clear"); - focus(); - }; - const handleOptionSelect = (option) => { - var _a; - if (props2.multiple) { - const value = castArray_default((_a = props2.modelValue) != null ? _a : []).slice(); - const optionIndex = getValueIndex(value, option); - if (optionIndex > -1) { - value.splice(optionIndex, 1); - } else if (props2.multipleLimit <= 0 || value.length < props2.multipleLimit) { - value.push(option.value); - } - emit(UPDATE_MODEL_EVENT, value); - emitChange(value); - if (option.created) { - handleQueryChange(""); - } - if (props2.filterable && !props2.reserveKeyword) { - states.inputValue = ""; - } - } else { - !isEqual_default(props2.modelValue, option.value) && emit(UPDATE_MODEL_EVENT, option.value); - emitChange(option.value); - expanded.value = false; - } - focus(); - if (expanded.value) - return; - nextTick(() => { - scrollToOption(option); - }); - }; - const getValueIndex = (arr, option) => { - if (isUndefined2(option)) - return -1; - if (!isObject(option.value)) - return arr.indexOf(option.value); - return arr.findIndex((item) => { - return isEqual_default(get_default(item, props2.valueKey), getValueKey(option)); - }); - }; - const scrollToOption = (option) => { - var _a, _b, _c, _d, _e; - const targetOption = isArray(option) ? option[option.length - 1] : option; - let target2 = null; - if (!isNil_default(targetOption == null ? void 0 : targetOption.value)) { - const options = optionsArray.value.filter( - (item) => item.value === targetOption.value - ); - if (options.length > 0) { - target2 = options[0].$el; - } - } - if (tooltipRef.value && target2) { - const menu = (_d = (_c = (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef) == null ? void 0 : _c.querySelector) == null ? void 0 : _d.call( - _c, - `.${nsSelect.be("dropdown", "wrap")}` - ); - if (menu) { - scrollIntoView(menu, target2); - } - } - (_e = scrollbarRef.value) == null ? void 0 : _e.handleScroll(); - }; - const onOptionCreate = (vm) => { - states.options.set(vm.value, vm); - states.cachedOptions.set(vm.value, vm); - }; - const onOptionDestroy = (key, vm) => { - if (states.options.get(key) === vm) { - states.options.delete(key); - } - }; - const popperRef = computed(() => { - var _a, _b; - return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef; - }); - const handleMenuEnter = () => { - states.isBeforeHide = false; - nextTick(() => { - var _a; - (_a = scrollbarRef.value) == null ? void 0 : _a.update(); - scrollToOption(states.selected); - }); - }; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - if (expanded.value) { - expanded.value = false; - nextTick(() => { - var _a2; - return (_a2 = inputRef.value) == null ? void 0 : _a2.blur(); - }); - return; - } - (_a = inputRef.value) == null ? void 0 : _a.blur(); - }; - const handleClearClick = (event) => { - deleteSelected(event); - }; - const handleClickOutside = (event) => { - expanded.value = false; - if (isFocused.value) { - const _event2 = new FocusEvent("blur", event); - nextTick(() => handleBlur(_event2)); - } - }; - const handleEsc = () => { - if (states.inputValue.length > 0) { - states.inputValue = ""; - } else { - expanded.value = false; - } - }; - const toggleMenu = (event) => { - var _a; - if (selectDisabled.value || props2.filterable && expanded.value && event && !((_a = suffixRef.value) == null ? void 0 : _a.contains(event.target))) - return; - if (isIOS) - states.inputHovering = true; - if (states.menuVisibleOnFocus) { - states.menuVisibleOnFocus = false; - } else { - expanded.value = !expanded.value; - } - }; - const selectOption = () => { - if (!expanded.value) { - toggleMenu(); - } else { - const option = optionsArray.value[states.hoveringIndex]; - if (option && !option.isDisabled) { - handleOptionSelect(option); - } - } - }; - const getValueKey = (item) => { - return isObject(item.value) ? get_default(item.value, props2.valueKey) : item.value; - }; - const optionsAllDisabled = computed( - () => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled) - ); - const showTagList = computed(() => { - if (!props2.multiple) { - return []; - } - return props2.collapseTags ? states.selected.slice(0, props2.maxCollapseTags) : states.selected; - }); - const collapseTagList = computed(() => { - if (!props2.multiple) { - return []; - } - return props2.collapseTags ? states.selected.slice(props2.maxCollapseTags) : []; - }); - const navigateOptions = (direction2) => { - if (!expanded.value) { - expanded.value = true; - return; - } - if (states.options.size === 0 || filteredOptionsCount.value === 0 || isComposing.value) - return; - if (!optionsAllDisabled.value) { - if (direction2 === "next") { - states.hoveringIndex++; - if (states.hoveringIndex === states.options.size) { - states.hoveringIndex = 0; - } - } else if (direction2 === "prev") { - states.hoveringIndex--; - if (states.hoveringIndex < 0) { - states.hoveringIndex = states.options.size - 1; - } - } - const option = optionsArray.value[states.hoveringIndex]; - if (option.isDisabled || !option.visible) { - navigateOptions(direction2); - } - nextTick(() => scrollToOption(hoverOption.value)); - } - }; - const findFocusableIndex = (arr, start, step2, len) => { - for (let i = start; i >= 0 && i < len; i += step2) { - const obj = arr[i]; - if (!(obj == null ? void 0 : obj.isDisabled) && (obj == null ? void 0 : obj.visible)) { - return i; - } - } - return null; - }; - const focusOption = (targetIndex, mode) => { - var _a; - const len = states.options.size; - if (len === 0) - return; - const start = clamp_default(targetIndex, 0, len - 1); - const options = optionsArray.value; - const direction2 = mode === "up" ? -1 : 1; - const newIndex = (_a = findFocusableIndex(options, start, direction2, len)) != null ? _a : findFocusableIndex(options, start - direction2, -direction2, len); - if (newIndex != null) { - states.hoveringIndex = newIndex; - nextTick(() => scrollToOption(hoverOption.value)); - } - }; - const handleKeydown = (e) => { - const code = getEventCode(e); - let isPreventDefault = true; - switch (code) { - case EVENT_CODE.up: - navigateOptions("prev"); - break; - case EVENT_CODE.down: - navigateOptions("next"); - break; - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - if (!isComposing.value) { - selectOption(); - } - break; - case EVENT_CODE.esc: - handleEsc(); - break; - case EVENT_CODE.backspace: - isPreventDefault = false; - deletePrevTag(e); - return; - case EVENT_CODE.home: - if (!expanded.value) - return; - focusOption(0, "down"); - break; - case EVENT_CODE.end: - if (!expanded.value) - return; - focusOption(states.options.size - 1, "up"); - break; - case EVENT_CODE.pageUp: - if (!expanded.value) - return; - focusOption(states.hoveringIndex - 10, "up"); - break; - case EVENT_CODE.pageDown: - if (!expanded.value) - return; - focusOption(states.hoveringIndex + 10, "down"); - break; - default: - isPreventDefault = false; - break; - } - if (isPreventDefault) { - e.preventDefault(); - e.stopPropagation(); - } - }; - const getGapWidth = () => { - if (!selectionRef.value) - return 0; - const style = window.getComputedStyle(selectionRef.value); - return Number.parseFloat(style.gap || "6px"); - }; - const tagStyle = computed(() => { - const gapWidth = getGapWidth(); - const inputSlotWidth = props2.filterable ? gapWidth + MINIMUM_INPUT_WIDTH : 0; - const maxWidth = collapseItemRef.value && props2.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth; - return { maxWidth: `${maxWidth}px` }; - }); - const collapseTagStyle = computed(() => { - return { maxWidth: `${states.selectionWidth}px` }; - }); - const popupScroll = (data) => { - emit("popup-scroll", data); - }; - useResizeObserver(selectionRef, resetSelectionWidth); - useResizeObserver(wrapperRef, updateTooltip); - useResizeObserver(tagMenuRef, updateTagTooltip); - useResizeObserver(collapseItemRef, resetCollapseItemWidth); - let stop; - watch( - () => dropdownMenuVisible.value, - (newVal) => { - if (newVal) { - stop = useResizeObserver(menuRef, updateTooltip).stop; - } else { - stop == null ? void 0 : stop(); - stop = void 0; - } - emit("visible-change", newVal); - } - ); - onMounted(() => { - setSelected(); - }); - return { - inputId, - contentId, - nsSelect, - nsInput, - states, - isFocused, - expanded, - optionsArray, - hoverOption, - selectSize, - filteredOptionsCount, - updateTooltip, - updateTagTooltip, - debouncedOnInputChange, - onInput, - deletePrevTag, - deleteTag, - deleteSelected, - handleOptionSelect, - scrollToOption, - hasModelValue, - shouldShowPlaceholder, - currentPlaceholder, - mouseEnterEventName, - needStatusIcon, - showClearBtn, - iconComponent, - iconReverse, - validateState, - validateIcon, - showNewOption, - updateOptions: updateOptions2, - collapseTagSize, - setSelected, - selectDisabled, - emptyText, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd, - handleKeydown, - onOptionCreate, - onOptionDestroy, - handleMenuEnter, - focus, - blur, - handleClearClick, - handleClickOutside, - handleEsc, - toggleMenu, - selectOption, - getValueKey, - navigateOptions, - dropdownMenuVisible, - showTagList, - collapseTagList, - popupScroll, - getOption, - tagStyle, - collapseTagStyle, - popperRef, - inputRef, - tooltipRef, - tagTooltipRef, - prefixRef, - suffixRef, - selectRef, - wrapperRef, - selectionRef, - scrollbarRef, - menuRef, - tagMenuRef, - collapseItemRef - }; -}; - -// node_modules/element-plus/es/components/select/src/options.mjs -var ElOptions = defineComponent({ - name: "ElOptions", - setup(_2, { slots }) { - const select = inject(selectKey); - let cachedValueList = []; - return () => { - var _a, _b; - const children = (_a = slots.default) == null ? void 0 : _a.call(slots); - const valueList = []; - function filterOptions(children2) { - if (!isArray(children2)) - return; - children2.forEach((item) => { - var _a2, _b2, _c, _d; - const name = (_a2 = (item == null ? void 0 : item.type) || {}) == null ? void 0 : _a2.name; - if (name === "ElOptionGroup") { - filterOptions( - !isString(item.children) && !isArray(item.children) && isFunction((_b2 = item.children) == null ? void 0 : _b2.default) ? (_c = item.children) == null ? void 0 : _c.default() : item.children - ); - } else if (name === "ElOption") { - valueList.push((_d = item.props) == null ? void 0 : _d.value); - } else if (isArray(item.children)) { - filterOptions(item.children); - } - }); - } - if (children.length) { - filterOptions((_b = children[0]) == null ? void 0 : _b.children); - } - if (!isEqual_default(valueList, cachedValueList)) { - cachedValueList = valueList; - if (select) { - select.states.optionValues = valueList; - } - } - return children; - }; - } -}); - -// node_modules/element-plus/es/components/select/src/select.mjs -var selectProps = buildProps({ - name: String, - id: String, - modelValue: { - type: definePropType([ - Array, - String, - Number, - Boolean, - Object - ]), - default: void 0 - }, - autocomplete: { - type: String, - default: "off" - }, - automaticDropdown: Boolean, - size: useSizeProp, - effect: { - type: definePropType(String), - default: "light" - }, - disabled: { - type: Boolean, - default: void 0 - }, - clearable: Boolean, - filterable: Boolean, - allowCreate: Boolean, - loading: Boolean, - popperClass: { - type: String, - default: "" - }, - popperStyle: { - type: definePropType([String, Object]) - }, - popperOptions: { - type: definePropType(Object), - default: () => ({}) - }, - remote: Boolean, - debounce: { - type: Number, - default: 300 - }, - loadingText: String, - noMatchText: String, - noDataText: String, - remoteMethod: { - type: definePropType(Function) - }, - filterMethod: { - type: definePropType(Function) - }, - multiple: Boolean, - multipleLimit: { - type: Number, - default: 0 - }, - placeholder: { - type: String - }, - defaultFirstOption: Boolean, - reserveKeyword: { - type: Boolean, - default: true - }, - valueKey: { - type: String, - default: "value" - }, - collapseTags: Boolean, - collapseTagsTooltip: Boolean, - maxCollapseTags: { - type: Number, - default: 1 - }, - teleported: useTooltipContentProps.teleported, - persistent: { - type: Boolean, - default: true - }, - clearIcon: { - type: iconPropType, - default: circle_close_default - }, - fitInputWidth: Boolean, - suffixIcon: { - type: iconPropType, - default: arrow_down_default - }, - tagType: { ...tagProps.type, default: "info" }, - tagEffect: { ...tagProps.effect, default: "light" }, - validateEvent: { - type: Boolean, - default: true - }, - remoteShowSuffix: Boolean, - showArrow: { - type: Boolean, - default: true - }, - offset: { - type: Number, - default: 12 - }, - placement: { - type: definePropType(String), - values: Ee, - default: "bottom-start" - }, - fallbackPlacements: { - type: definePropType(Array), - default: ["bottom-start", "top-start", "right", "left"] - }, - tabindex: { - type: [String, Number], - default: 0 - }, - appendTo: useTooltipContentProps.appendTo, - options: { - type: definePropType(Array) - }, - props: { - type: definePropType(Object), - default: () => defaultProps - }, - ...useEmptyValuesProps, - ...useAriaProps(["ariaLabel"]) -}); -var selectEmits = { - [UPDATE_MODEL_EVENT]: (val) => true, - [CHANGE_EVENT]: (val) => true, - "popup-scroll": scrollbarEmits.scroll, - "remove-tag": (val) => true, - "visible-change": (visible) => true, - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true -}; - -// node_modules/element-plus/es/components/select/src/option-group.mjs -var _sfc_main29 = defineComponent({ - name: "ElOptionGroup", - componentName: "ElOptionGroup", - props: { - label: String, - disabled: Boolean - }, - setup(props2) { - const ns = useNamespace("select"); - const groupRef = ref(); - const instance = getCurrentInstance(); - const children = ref([]); - provide( - selectGroupKey, - reactive({ - ...toRefs(props2) - }) - ); - const visible = computed( - () => children.value.some((option) => option.visible === true) - ); - const isOption = (node) => { - var _a; - return node.type.name === "ElOption" && !!((_a = node.component) == null ? void 0 : _a.proxy); - }; - const flattedChildren2 = (node) => { - const nodes = castArray_default(node); - const children2 = []; - nodes.forEach((child) => { - var _a; - if (!isVNode(child)) - return; - if (isOption(child)) { - children2.push(child.component.proxy); - } else if (isArray(child.children) && child.children.length) { - children2.push(...flattedChildren2(child.children)); - } else if ((_a = child.component) == null ? void 0 : _a.subTree) { - children2.push(...flattedChildren2(child.component.subTree)); - } - }); - return children2; - }; - const updateChildren = () => { - children.value = flattedChildren2(instance.subTree); - }; - onMounted(() => { - updateChildren(); - }); - useMutationObserver(groupRef, updateChildren, { - attributes: true, - subtree: true, - childList: true - }); - return { - groupRef, - visible, - ns - }; - } -}); -function _sfc_render4(_ctx, _cache, $props, $setup, $data, $options) { - return withDirectives((openBlock(), createElementBlock( - "ul", - { - ref: "groupRef", - class: normalizeClass(_ctx.ns.be("group", "wrap")) - }, - [ - createBaseVNode( - "li", - { - class: normalizeClass(_ctx.ns.be("group", "title")) - }, - toDisplayString(_ctx.label), - 3 - ), - createBaseVNode("li", null, [ - createBaseVNode( - "ul", - { - class: normalizeClass(_ctx.ns.b("group")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ) - ]) - ], - 2 - )), [ - [vShow, _ctx.visible] - ]); -} -var OptionGroup = _export_sfc(_sfc_main29, [["render", _sfc_render4], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]); - -// node_modules/element-plus/es/directives/click-outside/index.mjs -var nodeList = /* @__PURE__ */ new Map(); -if (isClient) { - let startClick; - document.addEventListener("mousedown", (e) => startClick = e); - document.addEventListener("mouseup", (e) => { - if (startClick) { - for (const handlers2 of nodeList.values()) { - for (const { documentHandler } of handlers2) { - documentHandler(e, startClick); - } - } - startClick = void 0; - } - }); -} -function createDocumentHandler(el, binding) { - let excludes = []; - if (isArray(binding.arg)) { - excludes = binding.arg; - } else if (isElement2(binding.arg)) { - excludes.push(binding.arg); - } - return function(mouseup, mousedown) { - const popperRef = binding.instance.popperRef; - const mouseUpTarget = mouseup.target; - const mouseDownTarget = mousedown == null ? void 0 : mousedown.target; - const isBound = !binding || !binding.instance; - const isTargetExists = !mouseUpTarget || !mouseDownTarget; - const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget); - const isSelf = el === mouseUpTarget; - const isTargetExcluded = excludes.length && excludes.some((item) => item == null ? void 0 : item.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget); - const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget)); - if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) { - return; - } - binding.value(mouseup, mousedown); - }; -} -var ClickOutside = { - beforeMount(el, binding) { - if (!nodeList.has(el)) { - nodeList.set(el, []); - } - nodeList.get(el).push({ - documentHandler: createDocumentHandler(el, binding), - bindingFn: binding.value - }); - }, - updated(el, binding) { - if (!nodeList.has(el)) { - nodeList.set(el, []); - } - const handlers2 = nodeList.get(el); - const oldHandlerIndex = handlers2.findIndex( - (item) => item.bindingFn === binding.oldValue - ); - const newHandler = { - documentHandler: createDocumentHandler(el, binding), - bindingFn: binding.value - }; - if (oldHandlerIndex >= 0) { - handlers2.splice(oldHandlerIndex, 1, newHandler); - } else { - handlers2.push(newHandler); - } - }, - unmounted(el) { - nodeList.delete(el); - } -}; - -// node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs -function useCalcInputWidth() { - const calculatorRef = shallowRef(); - const calculatorWidth = ref(0); - const inputStyle = computed(() => ({ - minWidth: `${Math.max(calculatorWidth.value, MINIMUM_INPUT_WIDTH)}px` - })); - const resetCalculatorWidth = () => { - var _a, _b; - calculatorWidth.value = (_b = (_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 0; - }; - useResizeObserver(calculatorRef, resetCalculatorWidth); - return { - calculatorRef, - calculatorWidth, - inputStyle - }; -} - -// node_modules/element-plus/es/components/select/src/select2.mjs -var COMPONENT_NAME8 = "ElSelect"; -var warnHandlerMap = /* @__PURE__ */ new WeakMap(); -var createSelectWarnHandler = (appContext) => { - return (...args) => { - var _a, _b; - const message2 = args[0]; - if (!message2 || message2.includes( - 'Slot "default" invoked outside of the render function' - ) && ((_a = args[2]) == null ? void 0 : _a.includes("ElTreeSelect"))) - return; - const original = (_b = warnHandlerMap.get(appContext)) == null ? void 0 : _b.originalWarnHandler; - if (original) { - original(...args); - return; - } - console.warn(...args); - }; -}; -var getWarnHandlerRecord = (appContext) => { - let record = warnHandlerMap.get(appContext); - if (!record) { - record = { - originalWarnHandler: appContext.config.warnHandler, - handler: createSelectWarnHandler(appContext), - count: 0 - }; - warnHandlerMap.set(appContext, record); - } - return record; -}; -var _sfc_main30 = defineComponent({ - name: COMPONENT_NAME8, - componentName: COMPONENT_NAME8, - components: { - ElSelectMenu, - ElOption: Option, - ElOptions, - ElOptionGroup: OptionGroup, - ElTag, - ElScrollbar, - ElTooltip, - ElIcon - }, - directives: { ClickOutside }, - props: selectProps, - emits: [ - UPDATE_MODEL_EVENT, - CHANGE_EVENT, - "remove-tag", - "clear", - "visible-change", - "focus", - "blur", - "popup-scroll" - ], - setup(props2, { emit, slots }) { - const instance = getCurrentInstance(); - const warnRecord = getWarnHandlerRecord(instance.appContext); - warnRecord.count += 1; - instance.appContext.config.warnHandler = warnRecord.handler; - const modelValue = computed(() => { - const { modelValue: rawModelValue, multiple } = props2; - const fallback = multiple ? [] : void 0; - if (isArray(rawModelValue)) { - return multiple ? rawModelValue : fallback; - } - return multiple ? fallback : rawModelValue; - }); - const _props = reactive({ - ...toRefs(props2), - modelValue - }); - const API = useSelect(_props, emit); - const { calculatorRef, inputStyle } = useCalcInputWidth(); - const { getLabel, getValue: getValue3, getOptions, getDisabled } = useProps(props2); - const getOptionProps = (option) => ({ - label: getLabel(option), - value: getValue3(option), - disabled: getDisabled(option) - }); - const flatTreeSelectData = (data) => { - return data.reduce((acc, item) => { - acc.push(item); - if (item.children && item.children.length > 0) { - acc.push(...flatTreeSelectData(item.children)); - } - return acc; - }, []); - }; - const manuallyRenderSlots = (vnodes) => { - const children = flattedChildren(vnodes || []); - children.forEach((item) => { - var _a; - if (isObject(item) && (item.type.name === "ElOption" || item.type.name === "ElTree")) { - const _name = item.type.name; - if (_name === "ElTree") { - const treeData = ((_a = item.props) == null ? void 0 : _a.data) || []; - const flatData = flatTreeSelectData(treeData); - flatData.forEach((treeItem) => { - treeItem.currentLabel = treeItem.label || (isObject(treeItem.value) ? "" : treeItem.value); - API.onOptionCreate(treeItem); - }); - } else if (_name === "ElOption") { - const obj = { ...item.props }; - obj.currentLabel = obj.label || (isObject(obj.value) ? "" : obj.value); - API.onOptionCreate(obj); - } - } - }); - }; - watch( - () => { - var _a; - return [(_a = slots.default) == null ? void 0 : _a.call(slots), modelValue.value]; - }, - () => { - var _a; - if (props2.persistent || API.expanded.value) { - return; - } - API.states.options.clear(); - manuallyRenderSlots((_a = slots.default) == null ? void 0 : _a.call(slots)); - }, - { - immediate: true - } - ); - provide( - selectKey, - reactive({ - props: _props, - states: API.states, - selectRef: API.selectRef, - optionsArray: API.optionsArray, - setSelected: API.setSelected, - handleOptionSelect: API.handleOptionSelect, - onOptionCreate: API.onOptionCreate, - onOptionDestroy: API.onOptionDestroy - }) - ); - const selectedLabel = computed(() => { - if (!props2.multiple) { - return API.states.selectedLabel; - } - return API.states.selected.map((i) => i.currentLabel); - }); - onBeforeUnmount(() => { - const record = warnHandlerMap.get(instance.appContext); - if (!record) - return; - record.count -= 1; - if (record.count <= 0) { - instance.appContext.config.warnHandler = record.originalWarnHandler; - warnHandlerMap.delete(instance.appContext); - } - }); - return { - ...API, - modelValue, - selectedLabel, - calculatorRef, - inputStyle, - getLabel, - getValue: getValue3, - getOptions, - getDisabled, - getOptionProps - }; - } -}); -var _hoisted_110 = ["id", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"]; -var _hoisted_26 = ["textContent"]; -var _hoisted_32 = { key: 1 }; -function _sfc_render5(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_tag = resolveComponent("el-tag"); - const _component_el_tooltip = resolveComponent("el-tooltip"); - const _component_el_icon = resolveComponent("el-icon"); - const _component_el_option = resolveComponent("el-option"); - const _component_el_option_group = resolveComponent("el-option-group"); - const _component_el_options = resolveComponent("el-options"); - const _component_el_scrollbar = resolveComponent("el-scrollbar"); - const _component_el_select_menu = resolveComponent("el-select-menu"); - const _directive_click_outside = resolveDirective("click-outside"); - return withDirectives((openBlock(), createElementBlock( - "div", - mergeProps({ - ref: "selectRef", - class: [_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)] - }, { - [toHandlerKey(_ctx.mouseEnterEventName)]: _cache[11] || (_cache[11] = ($event) => _ctx.states.inputHovering = true) - }, { - onMouseleave: _cache[12] || (_cache[12] = ($event) => _ctx.states.inputHovering = false) - }), - [ - createVNode(_component_el_tooltip, { - ref: "tooltipRef", - visible: _ctx.dropdownMenuVisible, - placement: _ctx.placement, - teleported: _ctx.teleported, - "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - "popper-options": _ctx.popperOptions, - "fallback-placements": _ctx.fallbackPlacements, - effect: _ctx.effect, - pure: "", - trigger: "click", - transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`, - "stop-popper-mouse-event": false, - "gpu-acceleration": false, - persistent: _ctx.persistent, - "append-to": _ctx.appendTo, - "show-arrow": _ctx.showArrow, - offset: _ctx.offset, - onBeforeShow: _ctx.handleMenuEnter, - onHide: _cache[10] || (_cache[10] = ($event) => _ctx.states.isBeforeHide = false) - }, { - default: withCtx(() => { - var _a; - return [ - createBaseVNode( - "div", - { - ref: "wrapperRef", - class: normalizeClass([ - _ctx.nsSelect.e("wrapper"), - _ctx.nsSelect.is("focused", _ctx.isFocused), - _ctx.nsSelect.is("hovering", _ctx.states.inputHovering), - _ctx.nsSelect.is("filterable", _ctx.filterable), - _ctx.nsSelect.is("disabled", _ctx.selectDisabled) - ]), - onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"])) - }, - [ - _ctx.$slots.prefix ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref: "prefixRef", - class: normalizeClass(_ctx.nsSelect.e("prefix")) - }, - [ - renderSlot(_ctx.$slots, "prefix") - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - ref: "selectionRef", - class: normalizeClass([ - _ctx.nsSelect.e("selection"), - _ctx.nsSelect.is( - "near", - _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length - ) - ]) - }, - [ - _ctx.multiple ? renderSlot(_ctx.$slots, "tag", { - key: 0, - data: _ctx.states.selected, - deleteTag: _ctx.deleteTag, - selectDisabled: _ctx.selectDisabled - }, () => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.showTagList, (item) => { - return openBlock(), createElementBlock( - "div", - { - key: _ctx.getValueKey(item), - class: normalizeClass(_ctx.nsSelect.e("selected-item")) - }, - [ - createVNode(_component_el_tag, { - closable: !_ctx.selectDisabled && !item.isDisabled, - size: _ctx.collapseTagSize, - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "", - style: normalizeStyle(_ctx.tagStyle), - onClose: ($event) => _ctx.deleteTag($event, item) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.nsSelect.e("tags-text")) - }, - [ - renderSlot(_ctx.$slots, "label", { - index: item.index, - label: item.currentLabel, - value: item.value - }, () => [ - createTextVNode( - toDisplayString(item.currentLabel), - 1 - ) - ]) - ], - 2 - ) - ]), - _: 2 - }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) - ], - 2 - ); - }), - 128 - )), - _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, { - key: 0, - ref: "tagTooltipRef", - disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip, - "fallback-placements": ["bottom", "top", "right", "left"], - effect: _ctx.effect, - placement: "bottom", - "popper-class": _ctx.popperClass, - "popper-style": _ctx.popperStyle, - teleported: _ctx.teleported, - "popper-options": _ctx.popperOptions - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - ref: "collapseItemRef", - class: normalizeClass(_ctx.nsSelect.e("selected-item")) - }, - [ - createVNode(_component_el_tag, { - closable: false, - size: _ctx.collapseTagSize, - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "", - style: normalizeStyle(_ctx.collapseTagStyle) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.nsSelect.e("tags-text")) - }, - " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), - 3 - ) - ]), - _: 1 - }, 8, ["size", "type", "effect", "style"]) - ], - 2 - ) - ]), - content: withCtx(() => [ - createBaseVNode( - "div", - { - ref: "tagMenuRef", - class: normalizeClass(_ctx.nsSelect.e("selection")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.collapseTagList, (item) => { - return openBlock(), createElementBlock( - "div", - { - key: _ctx.getValueKey(item), - class: normalizeClass(_ctx.nsSelect.e("selected-item")) - }, - [ - createVNode(_component_el_tag, { - class: "in-tooltip", - closable: !_ctx.selectDisabled && !item.isDisabled, - size: _ctx.collapseTagSize, - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "", - onClose: ($event) => _ctx.deleteTag($event, item) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.nsSelect.e("tags-text")) - }, - [ - renderSlot(_ctx.$slots, "label", { - index: item.index, - label: item.currentLabel, - value: item.value - }, () => [ - createTextVNode( - toDisplayString(item.currentLabel), - 1 - ) - ]) - ], - 2 - ) - ]), - _: 2 - }, 1032, ["closable", "size", "type", "effect", "onClose"]) - ], - 2 - ); - }), - 128 - )) - ], - 2 - ) - ]), - _: 3 - }, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported", "popper-options"])) : createCommentVNode("v-if", true) - ]) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass([ - _ctx.nsSelect.e("selected-item"), - _ctx.nsSelect.e("input-wrapper"), - _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled) - ]) - }, - [ - withDirectives(createBaseVNode("input", { - id: _ctx.inputId, - ref: "inputRef", - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.states.inputValue = $event), - type: "text", - name: _ctx.name, - class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]), - disabled: _ctx.selectDisabled, - autocomplete: _ctx.autocomplete, - style: normalizeStyle(_ctx.inputStyle), - tabindex: _ctx.tabindex, - role: "combobox", - readonly: !_ctx.filterable, - spellcheck: "false", - "aria-activedescendant": ((_a = _ctx.hoverOption) == null ? void 0 : _a.id) || "", - "aria-controls": _ctx.contentId, - "aria-expanded": _ctx.dropdownMenuVisible, - "aria-label": _ctx.ariaLabel, - "aria-autocomplete": "none", - "aria-haspopup": "listbox", - onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)), - onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)), - onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)), - onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)), - onInput: _cache[5] || (_cache[5] = (...args) => _ctx.onInput && _ctx.onInput(...args)), - onClick: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"])) - }, null, 46, _hoisted_110), [ - [vModelText, _ctx.states.inputValue] - ]), - _ctx.filterable ? (openBlock(), createElementBlock("span", { - key: 0, - ref: "calculatorRef", - "aria-hidden": "true", - class: normalizeClass(_ctx.nsSelect.e("input-calculator")), - textContent: toDisplayString(_ctx.states.inputValue) - }, null, 10, _hoisted_26)) : createCommentVNode("v-if", true) - ], - 2 - ), - _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([ - _ctx.nsSelect.e("selected-item"), - _ctx.nsSelect.e("placeholder"), - _ctx.nsSelect.is( - "transparent", - !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue - ) - ]) - }, - [ - _ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", { - key: 0, - index: _ctx.getOption(_ctx.modelValue).index, - label: _ctx.currentPlaceholder, - value: _ctx.modelValue - }, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.currentPlaceholder), - 1 - ) - ]) : (openBlock(), createElementBlock( - "span", - _hoisted_32, - toDisplayString(_ctx.currentPlaceholder), - 1 - )) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ), - createBaseVNode( - "div", - { - ref: "suffixRef", - class: normalizeClass(_ctx.nsSelect.e("suffix")) - }, - [ - _ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, { - key: 0, - class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon"), _ctx.iconReverse]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, { - key: 1, - class: normalizeClass([ - _ctx.nsSelect.e("caret"), - _ctx.nsSelect.e("icon"), - _ctx.nsSelect.e("clear") - ]), - onClick: _ctx.handleClearClick - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), - _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, { - key: 2, - class: normalizeClass([ - _ctx.nsInput.e("icon"), - _ctx.nsInput.e("validateIcon"), - _ctx.nsInput.is("loading", _ctx.validateState === "validating") - ]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ) - ]; - }), - content: withCtx(() => [ - createVNode( - _component_el_select_menu, - { ref: "menuRef" }, - { - default: withCtx(() => [ - _ctx.$slots.header ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")), - onClick: _cache[8] || (_cache[8] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "header") - ], - 2 - )) : createCommentVNode("v-if", true), - withDirectives(createVNode(_component_el_scrollbar, { - id: _ctx.contentId, - ref: "scrollbarRef", - tag: "ul", - "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"), - "view-class": _ctx.nsSelect.be("dropdown", "list"), - class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]), - role: "listbox", - "aria-label": _ctx.ariaLabel, - "aria-orientation": "vertical", - onScroll: _ctx.popupScroll - }, { - default: withCtx(() => [ - _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, { - key: 0, - value: _ctx.states.inputValue, - created: true - }, null, 8, ["value"])) : createCommentVNode("v-if", true), - createVNode(_component_el_options, null, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default", {}, () => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.options, (option, index) => { - var _a; - return openBlock(), createElementBlock( - Fragment, - { key: index }, - [ - ((_a = _ctx.getOptions(option)) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_el_option_group, { - key: 0, - label: _ctx.getLabel(option), - disabled: _ctx.getDisabled(option) - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.getOptions(option), (item) => { - return openBlock(), createBlock( - _component_el_option, - mergeProps({ - key: _ctx.getValue(item) - }, { ref_for: true }, _ctx.getOptionProps(item)), - null, - 16 - ); - }), - 128 - )) - ]), - _: 2 - }, 1032, ["label", "disabled"])) : (openBlock(), createBlock( - _component_el_option, - mergeProps({ - key: 1, - ref_for: true - }, _ctx.getOptionProps(option)), - null, - 16 - )) - ], - 64 - ); - }), - 128 - )) - ]) - ]), - _: 3 - }) - ]), - _: 3 - }, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [ - [vShow, _ctx.states.options.size > 0 && !_ctx.loading] - ]), - _ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading")) - }, - [ - renderSlot(_ctx.$slots, "loading") - ], - 2 - )) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.emptyText), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "div", - { - key: 3, - class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")), - onClick: _cache[9] || (_cache[9] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 3 - }, - 512 - ) - ]), - _: 3 - }, 8, ["visible", "placement", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow"]) - ], - 16 - )), [ - [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef] - ]); -} -var Select = _export_sfc(_sfc_main30, [["render", _sfc_render5], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]); - -// node_modules/element-plus/es/components/select/index.mjs -var ElSelect = withInstall(Select, { - Option, - OptionGroup -}); -var ElOption = withNoopInstall(Option); -var ElOptionGroup = withNoopInstall(OptionGroup); - -// node_modules/element-plus/es/components/calendar/src/select-controller.mjs -var selectControllerProps = buildProps({ - date: { - type: definePropType(Object), - required: true - }, - formatter: { - type: definePropType(Function) - } -}); -var selectControllerEmits = { - "date-change": (date4) => isObject(date4) || isString(date4) -}; - -// node_modules/element-plus/es/components/calendar/src/select-controller2.mjs -var _sfc_main31 = defineComponent({ - ...{ - name: "SelectController" - }, - __name: "select-controller", - props: selectControllerProps, - emits: selectControllerEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const nsSelect = useNamespace("calendar-select"); - const { t, lang } = useLocale(); - const monthOptions = Array.from({ length: 12 }, (_2, index) => { - const actualMonth = index + 1; - const label = isFunction(props2.formatter) ? props2.formatter(actualMonth, "month") : actualMonth; - return { - value: actualMonth, - label - }; - }); - const yearValue = computed(() => props2.date.year()); - const monthValue = computed(() => props2.date.month() + 1); - const yearOptions = computed(() => { - const years = []; - for (let i = -10; i < 10; i++) { - const year = yearValue.value + i; - if (year > 0) { - const label = isFunction(props2.formatter) ? props2.formatter(year, "year") : year; - years.push({ value: year, label }); - } - } - return years; - }); - const handleYearChange = (year) => { - emit( - "date-change", - (0, import_dayjs4.default)(new Date(year, monthValue.value - 1, 1)).locale(lang.value) - ); - }; - const handleMonthChange = (month) => { - emit( - "date-change", - (0, import_dayjs4.default)(new Date(yearValue.value, month - 1, 1)).locale(lang.value) - ); - }; - const selectToday = () => { - emit("date-change", "today"); - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - Fragment, - null, - [ - createVNode(unref(ElSelect), { - "model-value": yearValue.value, - size: "small", - class: normalizeClass(unref(nsSelect).e("year")), - "validate-event": false, - options: yearOptions.value, - onChange: handleYearChange - }, null, 8, ["model-value", "class", "options"]), - createVNode(unref(ElSelect), { - "model-value": monthValue.value, - size: "small", - class: normalizeClass(unref(nsSelect).e("month")), - "validate-event": false, - options: unref(monthOptions), - onChange: handleMonthChange - }, null, 8, ["model-value", "class", "options"]), - createVNode(unref(ElButton), { - size: "small", - onClick: selectToday - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.today")), - 1 - ) - ]), - _: 1 - }) - ], - 64 - ); - }; - } -}); -var SelectController = _export_sfc(_sfc_main31, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/calendar/src/select-controller.vue"]]); - -// node_modules/element-plus/es/components/calendar/src/calendar2.mjs -var COMPONENT_NAME9 = "ElCalendar"; -var _sfc_main32 = defineComponent({ - ...{ - name: COMPONENT_NAME9 - }, - __name: "calendar", - props: calendarProps, - emits: calendarEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const ns = useNamespace("calendar"); - const props2 = __props; - const emit = __emit; - const { - calculateValidatedDateRange, - date: date4, - pickDay, - realSelectedDay, - selectDate, - validatedRange, - handleDateChange - } = useCalendar(props2, emit, COMPONENT_NAME9); - const { t } = useLocale(); - const i18nDate = computed(() => { - const pickedMonth = `el.datepicker.month${date4.value.format("M")}`; - return `${date4.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`; - }); - __expose({ - selectedDay: realSelectedDay, - pickDay, - selectDate, - calculateValidatedDateRange - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b()) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("header")) - }, - [ - renderSlot(_ctx.$slots, "header", { date: i18nDate.value }, () => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("title")) - }, - toDisplayString(i18nDate.value), - 3 - ), - unref(validatedRange).length === 0 && _ctx.controllerType === "button" ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("button-group")) - }, - [ - createVNode(unref(ElButtonGroup), null, { - default: withCtx(() => [ - createVNode(unref(ElButton), { - size: "small", - onClick: _cache[0] || (_cache[0] = ($event) => unref(selectDate)("prev-month")) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.prevMonth")), - 1 - ) - ]), - _: 1 - }), - createVNode(unref(ElButton), { - size: "small", - onClick: _cache[1] || (_cache[1] = ($event) => unref(selectDate)("today")) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.today")), - 1 - ) - ]), - _: 1 - }), - createVNode(unref(ElButton), { - size: "small", - onClick: _cache[2] || (_cache[2] = ($event) => unref(selectDate)("next-month")) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.nextMonth")), - 1 - ) - ]), - _: 1 - }) - ]), - _: 1 - }) - ], - 2 - )) : unref(validatedRange).length === 0 && _ctx.controllerType === "select" ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("select-controller")) - }, - [ - createVNode(SelectController, { - date: unref(date4), - formatter: _ctx.formatter, - onDateChange: unref(handleDateChange) - }, null, 8, ["date", "formatter", "onDateChange"]) - ], - 2 - )) : createCommentVNode("v-if", true) - ]) - ], - 2 - ), - unref(validatedRange).length === 0 ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("body")) - }, - [ - createVNode(DateTable, { - date: unref(date4), - "selected-day": unref(realSelectedDay), - onPick: unref(pickDay) - }, createSlots({ - _: 2 - }, [ - _ctx.$slots["date-cell"] ? { - name: "date-cell", - fn: withCtx((data) => [ - renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data))) - ]), - key: "0" - } : void 0 - ]), 1032, ["date", "selected-day", "onPick"]) - ], - 2 - )) : (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("body")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(validatedRange), (range_, index) => { - return openBlock(), createBlock(DateTable, { - key: index, - date: range_[0], - "selected-day": unref(realSelectedDay), - range: range_, - "hide-header": index !== 0, - onPick: unref(pickDay) - }, createSlots({ - _: 2 - }, [ - _ctx.$slots["date-cell"] ? { - name: "date-cell", - fn: withCtx((data) => [ - renderSlot(_ctx.$slots, "date-cell", mergeProps({ ref_for: true }, data)) - ]), - key: "0" - } : void 0 - ]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]); - }), - 128 - )) - ], - 2 - )) - ], - 2 - ); - }; - } -}); -var Calendar = _export_sfc(_sfc_main32, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/calendar/src/calendar.vue"]]); - -// node_modules/element-plus/es/components/calendar/index.mjs -var ElCalendar = withInstall(Calendar); - -// node_modules/element-plus/es/components/card/src/card.mjs -var cardProps = buildProps({ - header: { - type: String, - default: "" - }, - footer: { - type: String, - default: "" - }, - bodyStyle: { - type: definePropType([String, Object, Array]), - default: "" - }, - headerClass: String, - bodyClass: String, - footerClass: String, - shadow: { - type: String, - values: ["always", "hover", "never"], - default: void 0 - } -}); -var cardContextKey = Symbol("cardContextKey"); - -// node_modules/element-plus/es/components/card/src/card2.mjs -var _sfc_main33 = defineComponent({ - ...{ - name: "ElCard" - }, - __name: "card", - props: cardProps, - setup(__props) { - const globalConfig2 = useGlobalConfig("card"); - const ns = useNamespace("card"); - return (_ctx, _cache) => { - var _a; - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - unref(ns).b(), - unref(ns).is(`${_ctx.shadow || ((_a = unref(globalConfig2)) == null ? void 0 : _a.shadow) || "always"}-shadow`) - ]) - }, - [ - _ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(ns).e("header"), _ctx.headerClass]) - }, - [ - renderSlot(_ctx.$slots, "header", {}, () => [ - createTextVNode( - toDisplayString(_ctx.header), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]), - style: normalizeStyle(_ctx.bodyStyle) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 6 - ), - _ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass]) - }, - [ - renderSlot(_ctx.$slots, "footer", {}, () => [ - createTextVNode( - toDisplayString(_ctx.footer), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var Card = _export_sfc(_sfc_main33, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/card/src/card.vue"]]); - -// node_modules/element-plus/es/components/card/index.mjs -var ElCard = withInstall(Card); - -// node_modules/element-plus/es/components/carousel/src/carousel.mjs -var carouselProps = buildProps({ - initialIndex: { - type: Number, - default: 0 - }, - height: { - type: String, - default: "" - }, - trigger: { - type: String, - values: ["hover", "click"], - default: "hover" - }, - autoplay: { - type: Boolean, - default: true - }, - interval: { - type: Number, - default: 3e3 - }, - indicatorPosition: { - type: String, - values: ["", "none", "outside"], - default: "" - }, - arrow: { - type: String, - values: ["always", "hover", "never"], - default: "hover" - }, - type: { - type: String, - values: ["", "card"], - default: "" - }, - cardScale: { - type: Number, - default: 0.83 - }, - loop: { - type: Boolean, - default: true - }, - direction: { - type: String, - values: ["horizontal", "vertical"], - default: "horizontal" - }, - pauseOnHover: { - type: Boolean, - default: true - }, - motionBlur: Boolean -}); -var carouselEmits = { - change: (current, prev) => [current, prev].every(isNumber2) -}; - -// node_modules/element-plus/es/components/carousel/src/constants.mjs -var carouselContextKey = Symbol("carouselContextKey"); -var CAROUSEL_ITEM_NAME = "ElCarouselItem"; - -// node_modules/element-plus/es/hooks/use-ordered-children/index.mjs -var getOrderedChildren = (vm, childComponentName, children) => { - const nodes = flattedChildren(vm.subTree).filter( - (n) => { - var _a; - return isVNode(n) && ((_a = n.type) == null ? void 0 : _a.name) === childComponentName && !!n.component; - } - ); - const uids = nodes.map((n) => n.component.uid); - return uids.map((uid2) => children[uid2]).filter((p2) => !!p2); -}; -var useOrderedChildren = (vm, childComponentName) => { - const children = shallowRef({}); - const orderedChildren = shallowRef([]); - const nodesMap = /* @__PURE__ */ new WeakMap(); - const addChild = (child) => { - children.value[child.uid] = child; - triggerRef(children); - onMounted(() => { - const childNode = child.getVnode().el; - const parentNode = childNode.parentNode; - if (!nodesMap.has(parentNode)) { - nodesMap.set(parentNode, []); - const originalFn = parentNode.insertBefore.bind(parentNode); - parentNode.insertBefore = (node, anchor) => { - const shouldSortChildren = nodesMap.get(parentNode).some((el) => node === el || anchor === el); - if (shouldSortChildren) - triggerRef(children); - return originalFn(node, anchor); - }; - } - nodesMap.get(parentNode).push(childNode); - }); - }; - const removeChild = (child) => { - delete children.value[child.uid]; - triggerRef(children); - const childNode = child.getVnode().el; - const parentNode = childNode.parentNode; - const childNodes = nodesMap.get(parentNode); - const index = childNodes.indexOf(childNode); - childNodes.splice(index, 1); - }; - const sortChildren = () => { - orderedChildren.value = getOrderedChildren( - vm, - childComponentName, - children.value - ); - }; - const IsolatedRenderer = (props2) => { - return props2.render(); - }; - const ChildrenSorter = defineComponent({ - setup(_2, { slots }) { - return () => { - sortChildren(); - return slots.default ? h(IsolatedRenderer, { - render: slots.default - }) : null; - }; - } - }); - return { - children: orderedChildren, - addChild, - removeChild, - ChildrenSorter - }; -}; - -// node_modules/element-plus/es/components/carousel/src/use-carousel.mjs -var THROTTLE_TIME = 300; -var useCarousel = (props2, emit, componentName2) => { - const { - children: items, - addChild: addItem, - removeChild: removeItem, - ChildrenSorter: ItemsSorter - } = useOrderedChildren( - getCurrentInstance(), - CAROUSEL_ITEM_NAME - ); - const slots = useSlots(); - const activeIndex = ref(-1); - const timer = ref(null); - const hover = ref(false); - const root2 = ref(); - const containerHeight = ref(0); - const isItemsTwoLength = ref(true); - const arrowDisplay = computed( - () => props2.arrow !== "never" && !unref(isVertical) - ); - const hasLabel = computed(() => { - return items.value.some((item) => item.props.label.toString().length > 0); - }); - const isCardType = computed(() => props2.type === "card"); - const isVertical = computed(() => props2.direction === "vertical"); - const containerStyle = computed(() => { - if (props2.height !== "auto") { - return { - height: props2.height - }; - } - return { - height: `${containerHeight.value}px`, - overflow: "hidden" - }; - }); - const throttledArrowClick = throttle_default( - (index) => { - setActiveItem(index); - }, - THROTTLE_TIME, - { trailing: true } - ); - const throttledIndicatorHover = throttle_default((index) => { - handleIndicatorHover(index); - }, THROTTLE_TIME); - const isTwoLengthShow = (index) => { - if (!isItemsTwoLength.value) - return true; - return activeIndex.value <= 1 ? index <= 1 : index > 1; - }; - function pauseTimer() { - if (timer.value) { - clearInterval(timer.value); - timer.value = null; - } - } - function startTimer() { - if (props2.interval <= 0 || !props2.autoplay || timer.value) - return; - timer.value = setInterval(() => playSlides(), props2.interval); - } - const playSlides = () => { - if (activeIndex.value < items.value.length - 1) { - activeIndex.value = activeIndex.value + 1; - } else if (props2.loop) { - activeIndex.value = 0; - } - }; - function setActiveItem(index) { - if (isString(index)) { - const filteredItems = items.value.filter( - (item) => item.props.name === index - ); - if (filteredItems.length > 0) { - index = items.value.indexOf(filteredItems[0]); - } - } - index = Number(index); - if (Number.isNaN(index) || index !== Math.floor(index)) { - debugWarn(componentName2, "index must be integer."); - return; - } - const itemCount = items.value.length; - const oldIndex = activeIndex.value; - if (index < 0) { - activeIndex.value = props2.loop ? itemCount - 1 : 0; - } else if (index >= itemCount) { - activeIndex.value = props2.loop ? 0 : itemCount - 1; - } else { - activeIndex.value = index; - } - if (oldIndex === activeIndex.value) { - resetItemPosition(oldIndex); - } - resetTimer(); - } - function resetItemPosition(oldIndex) { - items.value.forEach((item, index) => { - item.translateItem(index, activeIndex.value, oldIndex); - }); - } - function itemInStage(item, index) { - var _a, _b, _c, _d; - const _items = unref(items); - const itemCount = _items.length; - if (itemCount === 0 || !item.states.inStage) - return false; - const nextItemIndex = index + 1; - const prevItemIndex = index - 1; - const lastItemIndex = itemCount - 1; - const isLastItemActive = _items[lastItemIndex].states.active; - const isFirstItemActive = _items[0].states.active; - const isNextItemActive = (_b = (_a = _items[nextItemIndex]) == null ? void 0 : _a.states) == null ? void 0 : _b.active; - const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active; - if (index === lastItemIndex && isFirstItemActive || isNextItemActive) { - return "left"; - } else if (index === 0 && isLastItemActive || isPrevItemActive) { - return "right"; - } - return false; - } - function handleMouseEnter() { - hover.value = true; - if (props2.pauseOnHover) { - pauseTimer(); - } - } - function handleMouseLeave() { - hover.value = false; - startTimer(); - } - function handleButtonEnter(arrow3) { - if (unref(isVertical)) - return; - items.value.forEach((item, index) => { - if (arrow3 === itemInStage(item, index)) { - item.states.hover = true; - } - }); - } - function handleButtonLeave() { - if (unref(isVertical)) - return; - items.value.forEach((item) => { - item.states.hover = false; - }); - } - function handleIndicatorClick(index) { - activeIndex.value = index; - } - function handleIndicatorHover(index) { - if (props2.trigger === "hover" && index !== activeIndex.value) { - activeIndex.value = index; - } - } - function prev() { - setActiveItem(activeIndex.value - 1); - } - function next() { - setActiveItem(activeIndex.value + 1); - } - function resetTimer() { - pauseTimer(); - if (!props2.pauseOnHover) - startTimer(); - } - function setContainerHeight(height) { - if (props2.height !== "auto") - return; - containerHeight.value = height; - } - function PlaceholderItem() { - var _a; - const defaultSlots = (_a = slots.default) == null ? void 0 : _a.call(slots); - if (!defaultSlots) - return null; - const flatSlots = flattedChildren(defaultSlots); - const normalizeSlots = flatSlots.filter((slot) => { - return isVNode(slot) && slot.type.name === CAROUSEL_ITEM_NAME; - }); - if ((normalizeSlots == null ? void 0 : normalizeSlots.length) === 2 && props2.loop && !isCardType.value) { - isItemsTwoLength.value = true; - return normalizeSlots; - } - isItemsTwoLength.value = false; - return null; - } - watch( - () => activeIndex.value, - (current, prev2) => { - resetItemPosition(prev2); - if (isItemsTwoLength.value) { - current = current % 2; - prev2 = prev2 % 2; - } - if (prev2 > -1) { - emit(CHANGE_EVENT, current, prev2); - } - } - ); - const exposeActiveIndex = computed({ - get: () => { - return isItemsTwoLength.value ? activeIndex.value % 2 : activeIndex.value; - }, - set: (value) => activeIndex.value = value - }); - watch( - () => props2.autoplay, - (autoplay) => { - autoplay ? startTimer() : pauseTimer(); - } - ); - watch( - () => props2.loop, - () => { - setActiveItem(activeIndex.value); - } - ); - watch( - () => props2.interval, - () => { - resetTimer(); - } - ); - const resizeObserver = shallowRef(); - onMounted(() => { - watch( - () => items.value, - () => { - if (items.value.length > 0) - setActiveItem(props2.initialIndex); - }, - { - immediate: true - } - ); - resizeObserver.value = useResizeObserver(root2.value, () => { - resetItemPosition(); - }); - startTimer(); - }); - onBeforeUnmount(() => { - pauseTimer(); - if (root2.value && resizeObserver.value) - resizeObserver.value.stop(); - }); - provide(carouselContextKey, { - root: root2, - isCardType, - isVertical, - items, - loop: props2.loop, - cardScale: props2.cardScale, - addItem, - removeItem, - setActiveItem, - setContainerHeight - }); - return { - root: root2, - activeIndex, - exposeActiveIndex, - arrowDisplay, - hasLabel, - hover, - isCardType, - items, - isVertical, - containerStyle, - isItemsTwoLength, - handleButtonEnter, - handleButtonLeave, - handleIndicatorClick, - handleMouseEnter, - handleMouseLeave, - setActiveItem, - prev, - next, - PlaceholderItem, - isTwoLengthShow, - ItemsSorter, - throttledArrowClick, - throttledIndicatorHover - }; -}; - -// node_modules/element-plus/es/components/carousel/src/carousel2.mjs -var _hoisted_111 = ["aria-label"]; -var _hoisted_27 = ["aria-label"]; -var _hoisted_33 = ["onMouseenter", "onClick"]; -var _hoisted_4 = ["aria-label"]; -var _hoisted_5 = { key: 0 }; -var _hoisted_6 = { - key: 2, - xmlns: "http://www.w3.org/2000/svg", - version: "1.1", - style: { "display": "none" } -}; -var COMPONENT_NAME10 = "ElCarousel"; -var _sfc_main34 = defineComponent({ - ...{ - name: COMPONENT_NAME10 - }, - __name: "carousel", - props: carouselProps, - emits: carouselEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { - root: root2, - activeIndex, - exposeActiveIndex, - arrowDisplay, - hasLabel, - hover, - isCardType, - items, - isVertical, - containerStyle, - handleButtonEnter, - handleButtonLeave, - handleIndicatorClick, - handleMouseEnter, - handleMouseLeave, - setActiveItem, - prev, - next, - PlaceholderItem, - isTwoLengthShow, - ItemsSorter, - throttledArrowClick, - throttledIndicatorHover - } = useCarousel(props2, emit, COMPONENT_NAME10); - const ns = useNamespace("carousel"); - const { t } = useLocale(); - const carouselClasses = computed(() => { - const classes = [ns.b(), ns.m(props2.direction)]; - if (unref(isCardType)) { - classes.push(ns.m("card")); - } - return classes; - }); - const indicatorsClasses = computed(() => { - const classes = [ns.e("indicators"), ns.em("indicators", props2.direction)]; - if (unref(hasLabel)) { - classes.push(ns.em("indicators", "labels")); - } - if (props2.indicatorPosition === "outside") { - classes.push(ns.em("indicators", "outside")); - } - if (unref(isVertical)) { - classes.push(ns.em("indicators", "right")); - } - return classes; - }); - function handleTransitionStart(e) { - if (!props2.motionBlur) - return; - const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`; - e.currentTarget.classList.add(kls); - } - function handleTransitionEnd(e) { - if (!props2.motionBlur) - return; - const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`; - e.currentTarget.classList.remove(kls); - } - __expose({ - activeIndex: exposeActiveIndex, - setActiveItem, - prev, - next - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "root", - ref: root2, - class: normalizeClass(carouselClasses.value), - onMouseenter: _cache[6] || (_cache[6] = withModifiers( - (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args), - ["stop"] - )), - onMouseleave: _cache[7] || (_cache[7] = withModifiers( - (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args), - ["stop"] - )) - }, - [ - unref(arrowDisplay) ? (openBlock(), createBlock(Transition, { - key: 0, - name: "carousel-arrow-left", - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "left")]), - "aria-label": unref(t)("el.carousel.leftArrow"), - onMouseenter: _cache[0] || (_cache[0] = ($event) => unref(handleButtonEnter)("left")), - onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)), - onClick: _cache[2] || (_cache[2] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"])) - }, [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_left_default)) - ]), - _: 1 - }) - ], 42, _hoisted_111), [ - [vShow, (_ctx.arrow === "always" || unref(hover)) && (_ctx.loop || unref(activeIndex) > 0)] - ]) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - unref(arrowDisplay) ? (openBlock(), createBlock(Transition, { - key: 1, - name: "carousel-arrow-right", - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "right")]), - "aria-label": unref(t)("el.carousel.rightArrow"), - onMouseenter: _cache[3] || (_cache[3] = ($event) => unref(handleButtonEnter)("right")), - onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)), - onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"])) - }, [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ], 42, _hoisted_27), [ - [ - vShow, - (_ctx.arrow === "always" || unref(hover)) && (_ctx.loop || unref(activeIndex) < unref(items).length - 1) - ] - ]) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("container")), - style: normalizeStyle(unref(containerStyle)), - onTransitionstart: handleTransitionStart, - onTransitionend: handleTransitionEnd - }, - [ - createVNode(unref(PlaceholderItem)), - renderSlot(_ctx.$slots, "default") - ], - 38 - ), - createVNode(unref(ItemsSorter), null, { - default: withCtx(() => [ - _ctx.indicatorPosition !== "none" ? (openBlock(), createElementBlock( - "ul", - { - key: 0, - class: normalizeClass(indicatorsClasses.value) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(items), (item, index) => { - return withDirectives((openBlock(), createElementBlock("li", { - key: index, - class: normalizeClass([ - unref(ns).e("indicator"), - unref(ns).em("indicator", _ctx.direction), - unref(ns).is("active", index === unref(activeIndex)) - ]), - onMouseenter: ($event) => unref(throttledIndicatorHover)(index), - onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"]) - }, [ - createBaseVNode("button", { - class: normalizeClass(unref(ns).e("button")), - "aria-label": unref(t)("el.carousel.indicator", { index: index + 1 }) - }, [ - unref(hasLabel) ? (openBlock(), createElementBlock( - "span", - _hoisted_5, - toDisplayString(item.props.label), - 1 - )) : createCommentVNode("v-if", true) - ], 10, _hoisted_4) - ], 42, _hoisted_33)), [ - [vShow, unref(isTwoLengthShow)(index)] - ]); - }), - 128 - )) - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 1 - }), - _ctx.motionBlur ? (openBlock(), createElementBlock("svg", _hoisted_6, [..._cache[8] || (_cache[8] = [ - createBaseVNode( - "defs", - null, - [ - createBaseVNode("filter", { id: "elCarouselHorizontal" }, [ - createBaseVNode("feGaussianBlur", { - in: "SourceGraphic", - stdDeviation: "12,0" - }) - ]), - createBaseVNode("filter", { id: "elCarouselVertical" }, [ - createBaseVNode("feGaussianBlur", { - in: "SourceGraphic", - stdDeviation: "0,10" - }) - ]) - ], - -1 - ) - ])])) : createCommentVNode("v-if", true) - ], - 34 - ); - }; - } -}); -var Carousel = _export_sfc(_sfc_main34, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/carousel/src/carousel.vue"]]); - -// node_modules/element-plus/es/components/carousel/src/carousel-item.mjs -var carouselItemProps = buildProps({ - name: { type: String, default: "" }, - label: { - type: [String, Number], - default: "" - } -}); - -// node_modules/element-plus/es/components/carousel/src/use-carousel-item.mjs -var useCarouselItem = (props2) => { - const carouselContext = inject(carouselContextKey); - const instance = getCurrentInstance(); - if (!carouselContext) { - debugWarn( - CAROUSEL_ITEM_NAME, - "usage: " - ); - } - if (!instance) { - debugWarn( - CAROUSEL_ITEM_NAME, - "compositional hook can only be invoked inside setups" - ); - } - const carouselItemRef = ref(); - const hover = ref(false); - const translate2 = ref(0); - const scale = ref(1); - const active = ref(false); - const ready = ref(false); - const inStage = ref(false); - const animating = ref(false); - const { isCardType, isVertical, cardScale } = carouselContext; - function processIndex(index, activeIndex, length) { - const lastItemIndex = length - 1; - const prevItemIndex = activeIndex - 1; - const nextItemIndex = activeIndex + 1; - const halfItemIndex = length / 2; - if (activeIndex === 0 && index === lastItemIndex) { - return -1; - } else if (activeIndex === lastItemIndex && index === 0) { - return length; - } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) { - return length + 1; - } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) { - return -2; - } - return index; - } - function calcCardTranslate(index, activeIndex) { - var _a, _b; - const parentWidth = unref(isVertical) ? ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetHeight) || 0 : ((_b = carouselContext.root.value) == null ? void 0 : _b.offsetWidth) || 0; - if (inStage.value) { - return parentWidth * ((2 - cardScale) * (index - activeIndex) + 1) / 4; - } else if (index < activeIndex) { - return -(1 + cardScale) * parentWidth / 4; - } else { - return (3 + cardScale) * parentWidth / 4; - } - } - function calcTranslate(index, activeIndex, isVertical2) { - const rootEl = carouselContext.root.value; - if (!rootEl) - return 0; - const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0; - return distance * (index - activeIndex); - } - const translateItem = (index, activeIndex, oldIndex) => { - var _a; - const _isCardType = unref(isCardType); - const carouselItemLength = (_a = carouselContext.items.value.length) != null ? _a : Number.NaN; - const isActive = index === activeIndex; - if (!_isCardType && !isUndefined2(oldIndex)) { - animating.value = isActive || index === oldIndex; - } - if (!isActive && carouselItemLength > 2 && carouselContext.loop) { - index = processIndex(index, activeIndex, carouselItemLength); - } - const _isVertical = unref(isVertical); - active.value = isActive; - if (_isCardType) { - inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1; - translate2.value = calcCardTranslate(index, activeIndex); - scale.value = unref(active) ? 1 : cardScale; - } else { - translate2.value = calcTranslate(index, activeIndex, _isVertical); - } - ready.value = true; - if (isActive && carouselItemRef.value) { - carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight); - } - }; - function handleItemClick() { - if (carouselContext && unref(isCardType)) { - const index = carouselContext.items.value.findIndex( - ({ uid: uid2 }) => uid2 === instance.uid - ); - carouselContext.setActiveItem(index); - } - } - const carouselItemContext = { - props: props2, - states: reactive({ - hover, - translate: translate2, - scale, - active, - ready, - inStage, - animating - }), - uid: instance.uid, - getVnode: () => instance.vnode, - translateItem - }; - carouselContext.addItem(carouselItemContext); - onBeforeUnmount(() => { - carouselContext.removeItem(carouselItemContext); - }); - return { - carouselItemRef, - active, - animating, - hover, - inStage, - isVertical, - translate: translate2, - isCardType, - scale, - ready, - handleItemClick - }; -}; - -// node_modules/element-plus/es/components/carousel/src/carousel-item2.mjs -var _sfc_main35 = defineComponent({ - ...{ - name: CAROUSEL_ITEM_NAME - }, - __name: "carousel-item", - props: carouselItemProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("carousel"); - const { - carouselItemRef, - active, - animating, - hover, - inStage, - isVertical, - translate: translate2, - isCardType, - scale, - ready, - handleItemClick - } = useCarouselItem(props2); - const itemKls = computed(() => [ - ns.e("item"), - ns.is("active", active.value), - ns.is("in-stage", inStage.value), - ns.is("hover", hover.value), - ns.is("animating", animating.value), - { - [ns.em("item", "card")]: isCardType.value, - [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value - } - ]); - const itemStyle = computed(() => { - const translateType = `translate${unref(isVertical) ? "Y" : "X"}`; - const _translate = `${translateType}(${unref(translate2)}px)`; - const _scale = `scale(${unref(scale)})`; - const transform2 = [_translate, _scale].join(" "); - return { - transform: transform2 - }; - }); - return (_ctx, _cache) => { - return withDirectives((openBlock(), createElementBlock( - "div", - { - ref_key: "carouselItemRef", - ref: carouselItemRef, - class: normalizeClass(itemKls.value), - style: normalizeStyle(itemStyle.value), - onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args)) - }, - [ - unref(isCardType) ? withDirectives((openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("mask")) - }, - null, - 2 - )), [ - [vShow, !unref(active)] - ]) : createCommentVNode("v-if", true), - renderSlot(_ctx.$slots, "default") - ], - 6 - )), [ - [vShow, unref(ready)] - ]); - }; - } -}); -var CarouselItem = _export_sfc(_sfc_main35, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/carousel/src/carousel-item.vue"]]); - -// node_modules/element-plus/es/components/carousel/index.mjs -var ElCarousel = withInstall(Carousel, { - CarouselItem -}); -var ElCarouselItem = withNoopInstall(CarouselItem); - -// node_modules/element-plus/es/components/checkbox/src/checkbox.mjs -var checkboxProps = { - modelValue: { - type: [Number, String, Boolean], - default: void 0 - }, - label: { - type: [String, Boolean, Number, Object], - default: void 0 - }, - value: { - type: [String, Boolean, Number, Object], - default: void 0 - }, - indeterminate: Boolean, - disabled: { - type: Boolean, - default: void 0 - }, - checked: Boolean, - name: { - type: String, - default: void 0 - }, - trueValue: { - type: [String, Number], - default: void 0 - }, - falseValue: { - type: [String, Number], - default: void 0 - }, - trueLabel: { - type: [String, Number], - default: void 0 - }, - falseLabel: { - type: [String, Number], - default: void 0 - }, - id: { - type: String, - default: void 0 - }, - border: Boolean, - size: useSizeProp, - tabindex: [String, Number], - validateEvent: { - type: Boolean, - default: true - }, - ariaLabel: String, - ...useAriaProps(["ariaControls"]) -}; -var checkboxEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val), - change: (val) => isString(val) || isNumber2(val) || isBoolean2(val) -}; - -// node_modules/element-plus/es/components/checkbox/src/constants.mjs -var checkboxGroupContextKey = Symbol("checkboxGroupContextKey"); - -// node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-disabled.mjs -var useCheckboxDisabled = ({ - model, - isChecked -}) => { - const checkboxGroup = inject(checkboxGroupContextKey, void 0); - const formContext = inject(formContextKey, void 0); - const isLimitDisabled = computed(() => { - var _a, _b; - const max4 = (_a = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a.value; - const min4 = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value; - return !isUndefined2(max4) && model.value.length >= max4 && !isChecked.value || !isUndefined2(min4) && model.value.length <= min4 && isChecked.value; - }); - const isDisabled = useFormDisabled( - computed(() => { - var _a, _b; - if (checkboxGroup === void 0) { - return (_a = formContext == null ? void 0 : formContext.disabled) != null ? _a : isLimitDisabled.value; - } else { - return ((_b = checkboxGroup.disabled) == null ? void 0 : _b.value) || isLimitDisabled.value; - } - }) - ); - return { - isDisabled, - isLimitDisabled - }; -}; - -// node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-event.mjs -var useCheckboxEvent = (props2, { - model, - isLimitExceeded, - hasOwnLabel, - isDisabled, - isLabeledByFormItem -}) => { - const checkboxGroup = inject(checkboxGroupContextKey, void 0); - const { formItem } = useFormItem(); - const { emit } = getCurrentInstance(); - function getLabeledValue(value) { - var _a, _b, _c, _d; - return [true, props2.trueValue, props2.trueLabel].includes(value) ? (_b = (_a = props2.trueValue) != null ? _a : props2.trueLabel) != null ? _b : true : (_d = (_c = props2.falseValue) != null ? _c : props2.falseLabel) != null ? _d : false; - } - function emitChangeEvent(checked, e) { - emit(CHANGE_EVENT, getLabeledValue(checked), e); - } - function handleChange(e) { - if (isLimitExceeded.value) - return; - const target2 = e.target; - emit(CHANGE_EVENT, getLabeledValue(target2.checked), e); - } - async function onClickRoot(e) { - if (isLimitExceeded.value) - return; - if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) { - const eventTargets = e.composedPath(); - const hasLabel = eventTargets.some( - (item) => item.tagName === "LABEL" - ); - if (!hasLabel) { - model.value = getLabeledValue( - [false, props2.falseValue, props2.falseLabel].includes(model.value) - ); - await nextTick(); - emitChangeEvent(model.value, e); - } - } - } - const validateEvent = computed( - () => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props2.validateEvent - ); - watch( - () => props2.modelValue, - () => { - if (validateEvent.value) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - } - ); - return { - handleChange, - onClickRoot - }; -}; - -// node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-model.mjs -var useCheckboxModel = (props2) => { - const selfModel = ref(false); - const { emit } = getCurrentInstance(); - const checkboxGroup = inject(checkboxGroupContextKey, void 0); - const isGroup = computed(() => isUndefined2(checkboxGroup) === false); - const isLimitExceeded = ref(false); - const model = computed({ - get() { - var _a, _b; - return isGroup.value ? (_a = checkboxGroup == null ? void 0 : checkboxGroup.modelValue) == null ? void 0 : _a.value : (_b = props2.modelValue) != null ? _b : selfModel.value; - }, - set(val) { - var _a, _b; - if (isGroup.value && isArray(val)) { - isLimitExceeded.value = ((_a = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a.value) !== void 0 && val.length > (checkboxGroup == null ? void 0 : checkboxGroup.max.value) && val.length > model.value.length; - isLimitExceeded.value === false && ((_b = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _b.call(checkboxGroup, val)); - } else { - emit(UPDATE_MODEL_EVENT, val); - selfModel.value = val; - } - } - }); - return { - model, - isGroup, - isLimitExceeded - }; -}; - -// node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-status.mjs -var useCheckboxStatus = (props2, slots, { model }) => { - const checkboxGroup = inject(checkboxGroupContextKey, void 0); - const isFocused = ref(false); - const actualValue = computed(() => { - if (!isPropAbsent(props2.value)) { - return props2.value; - } - return props2.label; - }); - const isChecked = computed(() => { - const value = model.value; - if (isBoolean2(value)) { - return value; - } else if (isArray(value)) { - if (isObject(actualValue.value)) { - return value.map(toRaw).some((o2) => isEqual_default(o2, actualValue.value)); - } else { - return value.map(toRaw).includes(actualValue.value); - } - } else if (value !== null && value !== void 0) { - return value === props2.trueValue || value === props2.trueLabel; - } else { - return !!value; - } - }); - const checkboxButtonSize = useFormSize( - computed(() => { - var _a; - return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value; - }), - { - prop: true - } - ); - const checkboxSize = useFormSize(computed(() => { - var _a; - return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value; - })); - const hasOwnLabel = computed(() => { - return !!slots.default || !isPropAbsent(actualValue.value); - }); - return { - checkboxButtonSize, - isChecked, - isFocused, - checkboxSize, - hasOwnLabel, - actualValue - }; -}; - -// node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox.mjs -var useCheckbox = (props2, slots) => { - const { formItem: elFormItem } = useFormItem(); - const { model, isGroup, isLimitExceeded } = useCheckboxModel(props2); - const { - isFocused, - isChecked, - checkboxButtonSize, - checkboxSize, - hasOwnLabel, - actualValue - } = useCheckboxStatus(props2, slots, { model }); - const { isDisabled } = useCheckboxDisabled({ model, isChecked }); - const { inputId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext: elFormItem, - disableIdGeneration: hasOwnLabel, - disableIdManagement: isGroup - }); - const { handleChange, onClickRoot } = useCheckboxEvent(props2, { - model, - isLimitExceeded, - hasOwnLabel, - isDisabled, - isLabeledByFormItem - }); - const setStoreValue = () => { - function addToStore() { - var _a, _b; - if (isArray(model.value) && !model.value.includes(actualValue.value)) { - model.value.push(actualValue.value); - } else { - model.value = (_b = (_a = props2.trueValue) != null ? _a : props2.trueLabel) != null ? _b : true; - } - } - props2.checked && addToStore(); - }; - setStoreValue(); - useDeprecated( - { - from: "label act as value", - replacement: "value", - version: "3.0.0", - scope: "el-checkbox", - ref: "https://element-plus.org/en-US/component/checkbox.html" - }, - computed(() => isGroup.value && isPropAbsent(props2.value)) - ); - useDeprecated( - { - from: "true-label", - replacement: "true-value", - version: "3.0.0", - scope: "el-checkbox", - ref: "https://element-plus.org/en-US/component/checkbox.html" - }, - computed(() => !!props2.trueLabel) - ); - useDeprecated( - { - from: "false-label", - replacement: "false-value", - version: "3.0.0", - scope: "el-checkbox", - ref: "https://element-plus.org/en-US/component/checkbox.html" - }, - computed(() => !!props2.falseLabel) - ); - return { - inputId, - isLabeledByFormItem, - isChecked, - isDisabled, - isFocused, - checkboxButtonSize, - checkboxSize, - hasOwnLabel, - model, - actualValue, - handleChange, - onClickRoot - }; -}; - -// node_modules/element-plus/es/components/checkbox/src/checkbox2.mjs -var _hoisted_112 = ["id", "indeterminate", "name", "tabindex", "disabled"]; -var _sfc_main36 = defineComponent({ - ...{ - name: "ElCheckbox" - }, - __name: "checkbox", - props: checkboxProps, - emits: checkboxEmits, - setup(__props) { - const props2 = __props; - const slots = useSlots(); - const { - inputId, - isLabeledByFormItem, - isChecked, - isDisabled, - isFocused, - checkboxSize, - hasOwnLabel, - model, - actualValue, - handleChange, - onClickRoot - } = useCheckbox(props2, slots); - const inputBindings = computed(() => { - var _a, _b, _c, _d; - if (props2.trueValue || props2.falseValue || props2.trueLabel || props2.falseLabel) { - return { - "true-value": (_b = (_a = props2.trueValue) != null ? _a : props2.trueLabel) != null ? _b : true, - "false-value": (_d = (_c = props2.falseValue) != null ? _c : props2.falseLabel) != null ? _d : false - }; - } - return { - value: actualValue.value - }; - }); - const ns = useNamespace("checkbox"); - const compKls = computed(() => { - return [ - ns.b(), - ns.m(checkboxSize.value), - ns.is("disabled", isDisabled.value), - ns.is("bordered", props2.border), - ns.is("checked", isChecked.value) - ]; - }); - const spanKls = computed(() => { - return [ - ns.e("input"), - ns.is("disabled", isDisabled.value), - ns.is("checked", isChecked.value), - ns.is("indeterminate", props2.indeterminate), - ns.is("focus", isFocused.value) - ]; - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), { - for: !unref(hasOwnLabel) && unref(isLabeledByFormItem) ? null : unref(inputId), - class: normalizeClass(compKls.value), - "aria-controls": _ctx.indeterminate ? _ctx.ariaControls : null, - "aria-checked": _ctx.indeterminate ? "mixed" : void 0, - "aria-label": _ctx.ariaLabel, - onClick: unref(onClickRoot) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(spanKls.value) - }, - [ - withDirectives(createBaseVNode("input", mergeProps({ - id: unref(inputId), - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null), - class: unref(ns).e("original"), - type: "checkbox", - indeterminate: _ctx.indeterminate, - name: _ctx.name, - tabindex: _ctx.tabindex, - disabled: unref(isDisabled) - }, inputBindings.value, { - onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)), - onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true), - onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false), - onClick: _cache[4] || (_cache[4] = withModifiers(() => { - }, ["stop"])) - }), null, 16, _hoisted_112), [ - [vModelCheckbox, unref(model)] - ]), - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("inner")) - }, - null, - 2 - ) - ], - 2 - ), - unref(hasOwnLabel) ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass(unref(ns).e("label")) - }, - [ - renderSlot(_ctx.$slots, "default"), - !_ctx.$slots.default ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createTextVNode( - toDisplayString(_ctx.label), - 1 - ) - ], - 64 - )) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["for", "class", "aria-controls", "aria-checked", "aria-label", "onClick"]); - }; - } -}); -var Checkbox = _export_sfc(_sfc_main36, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]); - -// node_modules/element-plus/es/components/checkbox/src/checkbox-button.mjs -var _hoisted_113 = ["name", "tabindex", "disabled"]; -var _sfc_main37 = defineComponent({ - ...{ - name: "ElCheckboxButton" - }, - __name: "checkbox-button", - props: checkboxProps, - emits: checkboxEmits, - setup(__props) { - const props2 = __props; - const slots = useSlots(); - const { - isFocused, - isChecked, - isDisabled, - checkboxButtonSize, - model, - actualValue, - handleChange - } = useCheckbox(props2, slots); - const inputBindings = computed(() => { - var _a, _b, _c, _d; - if (props2.trueValue || props2.falseValue || props2.trueLabel || props2.falseLabel) { - return { - "true-value": (_b = (_a = props2.trueValue) != null ? _a : props2.trueLabel) != null ? _b : true, - "false-value": (_d = (_c = props2.falseValue) != null ? _c : props2.falseLabel) != null ? _d : false - }; - } - return { - value: actualValue.value - }; - }); - const checkboxGroup = inject(checkboxGroupContextKey, void 0); - const ns = useNamespace("checkbox"); - const activeStyle = computed(() => { - var _a, _b, _c, _d; - const fillValue = (_b = (_a = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a.value) != null ? _b : ""; - return { - backgroundColor: fillValue, - borderColor: fillValue, - color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : "", - boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0 - }; - }); - const labelKls = computed(() => { - return [ - ns.b("button"), - ns.bm("button", checkboxButtonSize.value), - ns.is("disabled", isDisabled.value), - ns.is("checked", isChecked.value), - ns.is("focus", isFocused.value) - ]; - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "label", - { - class: normalizeClass(labelKls.value) - }, - [ - withDirectives(createBaseVNode("input", mergeProps({ - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null), - class: unref(ns).be("button", "original"), - type: "checkbox", - name: _ctx.name, - tabindex: _ctx.tabindex, - disabled: unref(isDisabled) - }, inputBindings.value, { - onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)), - onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true), - onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false), - onClick: _cache[4] || (_cache[4] = withModifiers(() => { - }, ["stop"])) - }), null, 16, _hoisted_113), [ - [vModelCheckbox, unref(model)] - ]), - _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass(unref(ns).be("button", "inner")), - style: normalizeStyle(unref(isChecked) ? activeStyle.value : void 0) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createTextVNode( - toDisplayString(_ctx.label), - 1 - ) - ]) - ], - 6 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var CheckboxButton = _export_sfc(_sfc_main37, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]); - -// node_modules/element-plus/es/components/checkbox/src/checkbox-group.mjs -var checkboxGroupProps = buildProps({ - modelValue: { - type: definePropType(Array), - default: () => [] - }, - disabled: { - type: Boolean, - default: void 0 - }, - min: Number, - max: Number, - size: useSizeProp, - fill: String, - textColor: String, - tag: { - type: String, - default: "div" - }, - validateEvent: { - type: Boolean, - default: true - }, - options: { - type: definePropType(Array) - }, - props: { - type: definePropType(Object), - default: () => checkboxDefaultProps - }, - type: { - type: String, - values: ["checkbox", "button"], - default: "checkbox" - }, - ...useAriaProps(["ariaLabel"]) -}); -var checkboxGroupEmits = { - [UPDATE_MODEL_EVENT]: (val) => isArray(val), - change: (val) => isArray(val) -}; -var checkboxDefaultProps = { - label: "label", - value: "value", - disabled: "disabled" -}; - -// node_modules/element-plus/es/components/checkbox/src/checkbox-group2.mjs -var _sfc_main38 = defineComponent({ - ...{ - name: "ElCheckboxGroup" - }, - __name: "checkbox-group", - props: checkboxGroupProps, - emits: checkboxGroupEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("checkbox"); - const checkboxDisabled = useFormDisabled(); - const { formItem } = useFormItem(); - const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext: formItem - }); - const changeEvent = async (value) => { - emit(UPDATE_MODEL_EVENT, value); - await nextTick(); - emit(CHANGE_EVENT, value); - }; - const modelValue = computed({ - get() { - return props2.modelValue; - }, - set(val) { - changeEvent(val); - } - }); - const aliasProps = computed(() => ({ - ...checkboxDefaultProps, - ...props2.props - })); - const getOptionProps = (option) => { - const { label, value, disabled } = aliasProps.value; - const base = { - label: option[label], - value: option[value], - disabled: option[disabled] - }; - return { ...omit_default(option, [label, value, disabled]), ...base }; - }; - const optionComponent = computed( - () => props2.type === "button" ? CheckboxButton : Checkbox - ); - provide(checkboxGroupContextKey, { - ...pick_default(toRefs(props2), [ - "size", - "min", - "max", - "validateEvent", - "fill", - "textColor" - ]), - disabled: checkboxDisabled, - modelValue, - changeEvent - }); - watch( - () => props2.modelValue, - (newVal, oldValue) => { - if (props2.validateEvent && !isEqual_default(newVal, oldValue)) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - } - ); - return (_ctx, _cache) => { - var _a; - return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { - id: unref(groupId), - class: normalizeClass(unref(ns).b("group")), - role: "group", - "aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0, - "aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItem)) == null ? void 0 : _a.labelId : void 0 - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default", {}, () => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.options, (item, index) => { - return openBlock(), createBlock( - resolveDynamicComponent(optionComponent.value), - mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), - null, - 16 - ); - }), - 128 - )) - ]) - ]), - _: 3 - }, 8, ["id", "class", "aria-label", "aria-labelledby"]); - }; - } -}); -var CheckboxGroup = _export_sfc(_sfc_main38, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]); - -// node_modules/element-plus/es/components/checkbox/index.mjs -var ElCheckbox = withInstall(Checkbox, { - CheckboxButton, - CheckboxGroup -}); -var ElCheckboxButton = withNoopInstall(CheckboxButton); -var ElCheckboxGroup = withNoopInstall(CheckboxGroup); - -// node_modules/element-plus/es/components/radio/src/radio.mjs -var radioPropsBase = buildProps({ - modelValue: { - type: [String, Number, Boolean], - default: void 0 - }, - size: useSizeProp, - disabled: { - type: Boolean, - default: void 0 - }, - label: { - type: [String, Number, Boolean], - default: void 0 - }, - value: { - type: [String, Number, Boolean], - default: void 0 - }, - name: { - type: String, - default: void 0 - } -}); -var radioProps = buildProps({ - ...radioPropsBase, - border: Boolean -}); -var radioEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val), - [CHANGE_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val) -}; - -// node_modules/element-plus/es/components/radio/src/constants.mjs -var radioGroupKey = Symbol("radioGroupKey"); - -// node_modules/element-plus/es/components/radio/src/use-radio.mjs -var useRadio = (props2, emit) => { - const radioRef = ref(); - const radioGroup = inject(radioGroupKey, void 0); - const isGroup = computed(() => !!radioGroup); - const actualValue = computed(() => { - if (!isPropAbsent(props2.value)) { - return props2.value; - } - return props2.label; - }); - const modelValue = computed({ - get() { - return isGroup.value ? radioGroup.modelValue : props2.modelValue; - }, - set(val) { - if (isGroup.value) { - radioGroup.changeEvent(val); - } else { - emit && emit(UPDATE_MODEL_EVENT, val); - } - radioRef.value.checked = props2.modelValue === actualValue.value; - } - }); - const size3 = useFormSize(computed(() => radioGroup == null ? void 0 : radioGroup.size)); - const disabled = useFormDisabled(computed(() => radioGroup == null ? void 0 : radioGroup.disabled)); - const focus = ref(false); - const tabIndex = computed(() => { - return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0; - }); - useDeprecated( - { - from: "label act as value", - replacement: "value", - version: "3.0.0", - scope: "el-radio", - ref: "https://element-plus.org/en-US/component/radio.html" - }, - computed(() => isGroup.value && isPropAbsent(props2.value)) - ); - return { - radioRef, - isGroup, - radioGroup, - focus, - size: size3, - disabled, - tabIndex, - modelValue, - actualValue - }; -}; - -// node_modules/element-plus/es/components/radio/src/radio2.mjs -var _hoisted_114 = ["value", "name", "disabled", "checked"]; -var _sfc_main39 = defineComponent({ - ...{ - name: "ElRadio" - }, - __name: "radio", - props: radioProps, - emits: radioEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("radio"); - const { radioRef, radioGroup, focus, size: size3, disabled, modelValue, actualValue } = useRadio(props2, emit); - function handleChange() { - nextTick(() => emit(CHANGE_EVENT, modelValue.value)); - } - return (_ctx, _cache) => { - var _a; - return openBlock(), createElementBlock( - "label", - { - class: normalizeClass([ - unref(ns).b(), - unref(ns).is("disabled", unref(disabled)), - unref(ns).is("focus", unref(focus)), - unref(ns).is("bordered", _ctx.border), - unref(ns).is("checked", unref(modelValue) === unref(actualValue)), - unref(ns).m(unref(size3)) - ]) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass([ - unref(ns).e("input"), - unref(ns).is("disabled", unref(disabled)), - unref(ns).is("checked", unref(modelValue) === unref(actualValue)) - ]) - }, - [ - withDirectives(createBaseVNode("input", { - ref_key: "radioRef", - ref: radioRef, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null), - class: normalizeClass(unref(ns).e("original")), - value: unref(actualValue), - name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name), - disabled: unref(disabled), - checked: unref(modelValue) === unref(actualValue), - type: "radio", - onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true), - onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false), - onChange: handleChange, - onClick: _cache[3] || (_cache[3] = withModifiers(() => { - }, ["stop"])) - }, null, 42, _hoisted_114), [ - [vModelRadio, unref(modelValue)] - ]), - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("inner")) - }, - null, - 2 - ) - ], - 2 - ), - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("label")), - onKeydown: _cache[4] || (_cache[4] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createTextVNode( - toDisplayString(_ctx.label), - 1 - ) - ]) - ], - 34 - ) - ], - 2 - ); - }; - } -}); -var Radio = _export_sfc(_sfc_main39, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]); - -// node_modules/element-plus/es/components/radio/src/radio-button.mjs -var radioButtonProps = buildProps({ - ...radioPropsBase -}); - -// node_modules/element-plus/es/components/radio/src/radio-button2.mjs -var _hoisted_115 = ["value", "name", "disabled"]; -var _sfc_main40 = defineComponent({ - ...{ - name: "ElRadioButton" - }, - __name: "radio-button", - props: radioButtonProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("radio"); - const { radioRef, focus, size: size3, disabled, modelValue, radioGroup, actualValue } = useRadio(props2); - const activeStyle = computed(() => { - return { - backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "", - borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "", - boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "", - color: (radioGroup == null ? void 0 : radioGroup.textColor) || "" - }; - }); - return (_ctx, _cache) => { - var _a; - return openBlock(), createElementBlock( - "label", - { - class: normalizeClass([ - unref(ns).b("button"), - unref(ns).is("active", unref(modelValue) === unref(actualValue)), - unref(ns).is("disabled", unref(disabled)), - unref(ns).is("focus", unref(focus)), - unref(ns).bm("button", unref(size3)) - ]) - }, - [ - withDirectives(createBaseVNode("input", { - ref_key: "radioRef", - ref: radioRef, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null), - class: normalizeClass(unref(ns).be("button", "original-radio")), - value: unref(actualValue), - type: "radio", - name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name), - disabled: unref(disabled), - onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true), - onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false), - onClick: _cache[3] || (_cache[3] = withModifiers(() => { - }, ["stop"])) - }, null, 42, _hoisted_115), [ - [vModelRadio, unref(modelValue)] - ]), - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).be("button", "inner")), - style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}), - onKeydown: _cache[4] || (_cache[4] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createTextVNode( - toDisplayString(_ctx.label), - 1 - ) - ]) - ], - 38 - ) - ], - 2 - ); - }; - } -}); -var RadioButton = _export_sfc(_sfc_main40, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]); - -// node_modules/element-plus/es/components/radio/src/radio-group.mjs -var radioGroupProps = buildProps({ - id: { - type: String, - default: void 0 - }, - size: useSizeProp, - disabled: { - type: Boolean, - default: void 0 - }, - modelValue: { - type: [String, Number, Boolean], - default: void 0 - }, - fill: { - type: String, - default: "" - }, - textColor: { - type: String, - default: "" - }, - name: { - type: String, - default: void 0 - }, - validateEvent: { - type: Boolean, - default: true - }, - options: { - type: definePropType(Array) - }, - props: { - type: definePropType(Object), - default: () => radioDefaultProps - }, - type: { - type: String, - values: ["radio", "button"], - default: "radio" - }, - ...useAriaProps(["ariaLabel"]) -}); -var radioGroupEmits = radioEmits; -var radioDefaultProps = { - label: "label", - value: "value", - disabled: "disabled" -}; - -// node_modules/element-plus/es/components/radio/src/radio-group2.mjs -var _hoisted_116 = ["id", "aria-label", "aria-labelledby"]; -var _sfc_main41 = defineComponent({ - ...{ - name: "ElRadioGroup" - }, - __name: "radio-group", - props: radioGroupProps, - emits: radioGroupEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("radio"); - const radioId = useId(); - const radioGroupRef = ref(); - const { formItem } = useFormItem(); - const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext: formItem - }); - const changeEvent = (value) => { - emit(UPDATE_MODEL_EVENT, value); - nextTick(() => emit(CHANGE_EVENT, value)); - }; - onMounted(() => { - const radios = radioGroupRef.value.querySelectorAll("[type=radio]"); - const firstLabel = radios[0]; - if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) { - firstLabel.tabIndex = 0; - } - }); - const name = computed(() => { - return props2.name || radioId.value; - }); - const aliasProps = computed(() => ({ - ...radioDefaultProps, - ...props2.props - })); - const getOptionProps = (option) => { - const { label, value, disabled } = aliasProps.value; - const base = { - label: option[label], - value: option[value], - disabled: option[disabled] - }; - return { ...omit_default(option, [label, value, disabled]), ...base }; - }; - const optionComponent = computed( - () => props2.type === "button" ? RadioButton : Radio - ); - provide( - radioGroupKey, - reactive({ - ...toRefs(props2), - changeEvent, - name - }) - ); - watch( - () => props2.modelValue, - (newVal, oldValue) => { - if (props2.validateEvent && !isEqual_default(newVal, oldValue)) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - } - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - id: unref(groupId), - ref_key: "radioGroupRef", - ref: radioGroupRef, - class: normalizeClass(unref(ns).b("group")), - role: "radiogroup", - "aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0, - "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0 - }, [ - renderSlot(_ctx.$slots, "default", {}, () => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.options, (item, index) => { - return openBlock(), createBlock( - resolveDynamicComponent(optionComponent.value), - mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), - null, - 16 - ); - }), - 128 - )) - ]) - ], 10, _hoisted_116); - }; - } -}); -var RadioGroup = _export_sfc(_sfc_main41, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]); - -// node_modules/element-plus/es/components/radio/index.mjs -var ElRadio = withInstall(Radio, { - RadioButton, - RadioGroup -}); -var ElRadioGroup = withNoopInstall(RadioGroup); -var ElRadioButton = withNoopInstall(RadioButton); - -// node_modules/element-plus/es/components/cascader-panel/src/types.mjs -var CASCADER_PANEL_INJECTION_KEY = Symbol(); - -// node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs -function isVNodeEmpty(vnodes) { - return !!(isArray(vnodes) ? vnodes.every(({ - type: type4 - }) => type4 === Comment) : (vnodes == null ? void 0 : vnodes.type) === Comment); -} -var NodeContent = defineComponent({ - name: "NodeContent", - props: { - node: { - type: Object, - required: true - } - }, - setup(props2) { - const ns = useNamespace("cascader-node"); - const { - renderLabelFn - } = inject(CASCADER_PANEL_INJECTION_KEY); - const { - node - } = props2; - const { - data, - label: nodeLabel - } = node; - const label = () => { - const renderLabel = renderLabelFn == null ? void 0 : renderLabelFn({ - node, - data - }); - return isVNodeEmpty(renderLabel) ? nodeLabel : renderLabel != null ? renderLabel : nodeLabel; - }; - return () => createVNode("span", { - "class": ns.e("label") - }, [label()]); - } -}); - -// node_modules/element-plus/es/components/cascader-panel/src/node2.mjs -var _hoisted_117 = ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"]; -var _sfc_main42 = defineComponent({ - ...{ - name: "ElCascaderNode" - }, - __name: "node", - props: { - node: { - type: Object, - required: true - }, - menuId: String - }, - emits: ["expand"], - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const panel = inject(CASCADER_PANEL_INJECTION_KEY); - const ns = useNamespace("cascader-node"); - const isHoverMenu = computed(() => panel.isHoverMenu); - const multiple = computed(() => panel.config.multiple); - const checkStrictly = computed(() => panel.config.checkStrictly); - const showPrefix = computed(() => panel.config.showPrefix); - const checkedNodeId = computed(() => { - var _a; - return (_a = panel.checkedNodes[0]) == null ? void 0 : _a.uid; - }); - const isDisabled = computed(() => props2.node.isDisabled); - const isLeaf2 = computed(() => props2.node.isLeaf); - const expandable = computed( - () => checkStrictly.value && !isLeaf2.value || !isDisabled.value - ); - const inExpandingPath = computed(() => isInPath(panel.expandingNode)); - const inCheckedPath = computed( - () => checkStrictly.value && panel.checkedNodes.some(isInPath) - ); - const isInPath = (node) => { - var _a; - const { level, uid: uid2 } = props2.node; - return ((_a = node == null ? void 0 : node.pathNodes[level - 1]) == null ? void 0 : _a.uid) === uid2; - }; - const doExpand = () => { - if (inExpandingPath.value) - return; - panel.expandNode(props2.node); - }; - const doCheck = (checked) => { - const { node } = props2; - if (checked === node.checked) - return; - panel.handleCheckChange(node, checked); - }; - const doLoad = () => { - panel.lazyLoad(props2.node, () => { - if (!isLeaf2.value) - doExpand(); - }); - }; - const handleHoverExpand = (e) => { - if (!isHoverMenu.value) - return; - handleExpand(); - !isLeaf2.value && emit("expand", e); - }; - const handleExpand = () => { - const { node } = props2; - if (!expandable.value || node.loading) - return; - node.loaded ? doExpand() : doLoad(); - }; - const handleClick = () => { - if (isLeaf2.value && !isDisabled.value && !checkStrictly.value && !multiple.value) { - handleCheck(true); - } else if ((panel.config.checkOnClickNode && (multiple.value || checkStrictly.value) || isLeaf2.value && panel.config.checkOnClickLeaf) && !isDisabled.value) { - handleSelectCheck(!props2.node.checked); - } else if (!isHoverMenu.value) { - handleExpand(); - } - }; - const handleSelectCheck = (checked) => { - if (checkStrictly.value) { - doCheck(checked); - if (props2.node.loaded) { - doExpand(); - } - } else { - handleCheck(checked); - } - }; - const handleCheck = (checked) => { - if (!props2.node.loaded) { - doLoad(); - } else { - doCheck(checked); - !checkStrictly.value && doExpand(); - } - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock("li", { - id: `${__props.menuId}-${__props.node.uid}`, - role: "menuitem", - "aria-haspopup": !isLeaf2.value, - "aria-owns": isLeaf2.value ? void 0 : __props.menuId, - "aria-expanded": inExpandingPath.value, - tabindex: expandable.value ? -1 : void 0, - class: normalizeClass([ - unref(ns).b(), - unref(ns).is("selectable", checkStrictly.value), - unref(ns).is("active", __props.node.checked), - unref(ns).is("disabled", !expandable.value), - inExpandingPath.value && "in-active-path", - inCheckedPath.value && "in-checked-path" - ]), - onMouseenter: handleHoverExpand, - onFocus: handleHoverExpand, - onClick: handleClick - }, [ - createCommentVNode(" prefix "), - multiple.value && showPrefix.value ? (openBlock(), createBlock(unref(ElCheckbox), { - key: 0, - "model-value": __props.node.checked, - indeterminate: __props.node.indeterminate, - disabled: isDisabled.value, - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])), - "onUpdate:modelValue": handleSelectCheck - }, null, 8, ["model-value", "indeterminate", "disabled"])) : checkStrictly.value && showPrefix.value ? (openBlock(), createBlock(unref(ElRadio), { - key: 1, - "model-value": checkedNodeId.value, - label: __props.node.uid, - disabled: isDisabled.value, - "onUpdate:modelValue": handleSelectCheck, - onClick: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["stop"])) - }, { - default: withCtx(() => [ - 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 "), - _cache[2] || (_cache[2] = createBaseVNode( - "span", - null, - null, - -1 - )) - ]), - _: 1 - }, 8, ["model-value", "label", "disabled"])) : isLeaf2.value && __props.node.checked ? (openBlock(), createBlock(unref(ElIcon), { - key: 2, - class: normalizeClass(unref(ns).e("prefix")) - }, { - default: withCtx(() => [ - createVNode(unref(check_default)) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - createCommentVNode(" content "), - createVNode(unref(NodeContent), { node: __props.node }, null, 8, ["node"]), - createCommentVNode(" postfix "), - !isLeaf2.value ? (openBlock(), createElementBlock( - Fragment, - { key: 3 }, - [ - __props.node.loading ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([unref(ns).is("loading"), unref(ns).e("postfix")]) - }, { - default: withCtx(() => [ - createVNode(unref(loading_default)) - ]), - _: 1 - }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass(["arrow-right", unref(ns).e("postfix")]) - }, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }, 8, ["class"])) - ], - 64 - )) : createCommentVNode("v-if", true) - ], 42, _hoisted_117); - }; - } -}); -var ElCascaderNode = _export_sfc(_sfc_main42, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]); - -// node_modules/element-plus/es/components/cascader-panel/src/menu.mjs -var _sfc_main43 = defineComponent({ - ...{ - name: "ElCascaderMenu" - }, - __name: "menu", - props: { - nodes: { - type: Array, - required: true - }, - index: { - type: Number, - required: true - } - }, - setup(__props) { - const props2 = __props; - const instance = getCurrentInstance(); - const ns = useNamespace("cascader-menu"); - const { t } = useLocale(); - const id = useId(); - let activeNode; - let hoverTimer; - const panel = inject(CASCADER_PANEL_INJECTION_KEY); - const hoverZone = ref(); - const isEmpty3 = computed(() => !props2.nodes.length); - const isLoading = computed(() => !panel.initialLoaded); - const menuId = computed(() => `${id.value}-${props2.index}`); - const handleExpand = (e) => { - activeNode = e.target; - }; - const handleMouseMove = (e) => { - var _a; - if (!panel.isHoverMenu || !activeNode || !hoverZone.value) - return; - if (activeNode.contains(e.target)) { - clearHoverTimer(); - const el = instance.vnode.el; - const { left } = el.getBoundingClientRect(); - const { offsetWidth, offsetHeight } = el; - const startX = e.clientX - left; - const top = activeNode.offsetTop; - const bottom = top + activeNode.offsetHeight; - const scrollTop = ((_a = el.querySelector(`.${ns.e("wrap")}`)) == null ? void 0 : _a.scrollTop) || 0; - hoverZone.value.innerHTML = ` - - - `; - } else if (!hoverTimer) { - hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold); - } - }; - const clearHoverTimer = () => { - if (!hoverTimer) - return; - clearTimeout(hoverTimer); - hoverTimer = void 0; - }; - const clearHoverZone = () => { - if (!hoverZone.value) - return; - hoverZone.value.innerHTML = ""; - clearHoverTimer(); - }; - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElScrollbar), { - key: menuId.value, - tag: "ul", - role: "menu", - class: normalizeClass(unref(ns).b()), - "wrap-class": unref(ns).e("wrap"), - "view-class": [unref(ns).e("list"), unref(ns).is("empty", isEmpty3.value)], - onMousemove: handleMouseMove, - onMouseleave: clearHoverZone - }, { - default: withCtx(() => { - var _a; - return [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(__props.nodes, (node) => { - return openBlock(), createBlock(ElCascaderNode, { - key: node.uid, - node, - "menu-id": menuId.value, - onExpand: handleExpand - }, null, 8, ["node", "menu-id"]); - }), - 128 - )), - isLoading.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("empty-text")) - }, - [ - createVNode(unref(ElIcon), { - size: "14", - class: normalizeClass(unref(ns).is("loading")) - }, { - default: withCtx(() => [ - createVNode(unref(loading_default)) - ]), - _: 1 - }, 8, ["class"]), - createTextVNode( - " " + toDisplayString(unref(t)("el.cascader.loading")), - 1 - ) - ], - 2 - )) : isEmpty3.value ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("empty-text")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => [ - createTextVNode( - toDisplayString(unref(t)("el.cascader.noData")), - 1 - ) - ]) - ], - 2 - )) : ((_a = unref(panel)) == null ? void 0 : _a.isHoverMenu) ? (openBlock(), createElementBlock( - Fragment, - { key: 2 }, - [ - createCommentVNode(" eslint-disable vue/html-self-closing "), - (openBlock(), createElementBlock( - "svg", - { - ref_key: "hoverZone", - ref: hoverZone, - class: normalizeClass(unref(ns).e("hover-zone")) - }, - null, - 2 - )) - ], - 2112 - )) : createCommentVNode("v-if", true), - createCommentVNode(" eslint-enable vue/html-self-closing ") - ]; - }), - _: 3 - }, 8, ["class", "wrap-class", "view-class"]); - }; - } -}); -var ElCascaderMenu = _export_sfc(_sfc_main43, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]); - -// node_modules/element-plus/es/components/cascader-panel/src/node.mjs -var uid = 0; -var calculatePathNodes = (node) => { - const nodes = [node]; - let { parent: parent2 } = node; - while (parent2) { - nodes.unshift(parent2); - parent2 = parent2.parent; - } - return nodes; -}; -var Node2 = class _Node { - constructor(data, config, parent2, root2 = false) { - this.data = data; - this.config = config; - this.parent = parent2; - this.root = root2; - this.uid = uid++; - this.checked = false; - this.indeterminate = false; - this.loading = false; - const { value: valueKey, label: labelKey, children: childrenKey } = config; - const childrenData = data[childrenKey]; - const pathNodes = calculatePathNodes(this); - this.level = root2 ? 0 : parent2 ? parent2.level + 1 : 1; - this.value = data[valueKey]; - this.label = data[labelKey]; - this.pathNodes = pathNodes; - this.pathValues = pathNodes.map((node) => node.value); - this.pathLabels = pathNodes.map((node) => node.label); - this.childrenData = childrenData; - this.children = (childrenData || []).map( - (child) => new _Node(child, config, this) - ); - this.loaded = !config.lazy || this.isLeaf || !isEmpty2(childrenData); - this.text = ""; - } - get isDisabled() { - const { data, parent: parent2, config } = this; - const { disabled, checkStrictly } = config; - const isDisabled = isFunction(disabled) ? disabled(data, this) : !!data[disabled]; - return isDisabled || !checkStrictly && !!(parent2 == null ? void 0 : parent2.isDisabled); - } - get isLeaf() { - const { data, config, childrenData, loaded } = this; - const { lazy, leaf } = config; - const isLeaf2 = isFunction(leaf) ? leaf(data, this) : data[leaf]; - return isUndefined2(isLeaf2) ? lazy && !loaded ? false : !(isArray(childrenData) && childrenData.length) : !!isLeaf2; - } - get valueByOption() { - return this.config.emitPath ? this.pathValues : this.value; - } - appendChild(childData) { - const { childrenData, children } = this; - const node = new _Node(childData, this.config, this); - if (isArray(childrenData)) { - childrenData.push(childData); - } else { - this.childrenData = [childData]; - } - children.push(node); - return node; - } - calcText(allLevels, separator) { - const text = allLevels ? this.pathLabels.join(separator) : this.label; - this.text = text; - return text; - } - broadcast(checked) { - this.children.forEach((child) => { - var _a; - if (child) { - child.broadcast(checked); - (_a = child.onParentCheck) == null ? void 0 : _a.call(child, checked); - } - }); - } - emit() { - var _a; - const { parent: parent2 } = this; - if (parent2) { - (_a = parent2.onChildCheck) == null ? void 0 : _a.call(parent2); - parent2.emit(); - } - } - onParentCheck(checked) { - if (!this.isDisabled) { - this.setCheckState(checked); - } - } - onChildCheck() { - const { children } = this; - const validChildren = children.filter((child) => !child.isDisabled); - const checked = validChildren.length ? validChildren.every((child) => child.checked) : false; - this.setCheckState(checked); - } - setCheckState(checked) { - const totalNum = this.children.length; - const checkedNum = this.children.reduce((c2, p2) => { - const num = p2.checked ? 1 : p2.indeterminate ? 0.5 : 0; - return c2 + num; - }, 0); - this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked; - this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0; - } - doCheck(checked) { - if (this.checked === checked) - return; - const { checkStrictly, multiple } = this.config; - if (checkStrictly || !multiple) { - this.checked = checked; - } else { - this.broadcast(checked); - this.setCheckState(checked); - this.emit(); - } - } -}; - -// node_modules/element-plus/es/components/cascader-panel/src/store.mjs -var flatNodes = (nodes, leafOnly) => { - return nodes.reduce((res, node) => { - if (node.isLeaf) { - res.push(node); - } else { - !leafOnly && res.push(node); - res = res.concat(flatNodes(node.children, leafOnly)); - } - return res; - }, []); -}; -var Store = class { - constructor(data, config) { - this.config = config; - const nodes = (data || []).map( - (nodeData) => new Node2(nodeData, this.config) - ); - this.nodes = nodes; - this.allNodes = flatNodes(nodes, false); - this.leafNodes = flatNodes(nodes, true); - } - getNodes() { - return this.nodes; - } - getFlattedNodes(leafOnly) { - return leafOnly ? this.leafNodes : this.allNodes; - } - appendNode(nodeData, parentNode) { - const node = parentNode ? parentNode.appendChild(nodeData) : new Node2(nodeData, this.config); - if (!parentNode) - this.nodes.push(node); - this.appendAllNodesAndLeafNodes(node); - } - appendNodes(nodeDataList, parentNode) { - if (nodeDataList.length > 0) { - nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode)); - } else { - parentNode && parentNode.isLeaf && this.leafNodes.push(parentNode); - } - } - appendAllNodesAndLeafNodes(node) { - this.allNodes.push(node); - node.isLeaf && this.leafNodes.push(node); - if (node.children) { - node.children.forEach((subNode) => { - this.appendAllNodesAndLeafNodes(subNode); - }); - } - } - getNodeByValue(value, leafOnly = false) { - if (isPropAbsent(value)) - return null; - const node = this.getFlattedNodes(leafOnly).find( - (node2) => isEqual_default(node2.value, value) || isEqual_default(node2.pathValues, value) - ); - return node || null; - } - getSameNode(node) { - if (!node) - return null; - const node_ = this.getFlattedNodes(false).find( - ({ value, level }) => isEqual_default(node.value, value) && node.level === level - ); - return node_ || null; - } -}; - -// node_modules/element-plus/es/components/cascader-panel/src/config.mjs -var CommonProps = buildProps({ - modelValue: { - type: definePropType([Number, String, Array, Object]) - }, - options: { - type: definePropType(Array), - default: () => [] - }, - props: { - type: definePropType(Object), - default: () => ({}) - } -}); -var DefaultProps = { - expandTrigger: "click", - multiple: false, - checkStrictly: false, - emitPath: true, - lazy: false, - lazyLoad: NOOP, - value: "value", - label: "label", - children: "children", - leaf: "leaf", - disabled: "disabled", - hoverThreshold: 500, - checkOnClickNode: false, - checkOnClickLeaf: true, - showPrefix: true -}; -var cascaderPanelProps = buildProps({ - ...CommonProps, - border: { - type: Boolean, - default: true - }, - renderLabel: { - type: Function - } -}); -var emitChangeFn = (value) => true; -var cascaderPanelEmits = { - [UPDATE_MODEL_EVENT]: emitChangeFn, - [CHANGE_EVENT]: emitChangeFn, - close: () => true, - "expand-change": (value) => value -}; -var useCascaderConfig = (props2) => { - return computed(() => ({ - ...DefaultProps, - ...props2.props - })); -}; - -// node_modules/element-plus/es/components/cascader-panel/src/utils.mjs -var getMenuIndex = (el) => { - if (!el) - return 0; - const pieces = el.id.split("-"); - return Number(pieces[pieces.length - 2]); -}; -var checkNode = (el) => { - if (!el) - return; - const input = el.querySelector("input"); - if (input) { - input.click(); - } else if (isLeaf(el)) { - el.click(); - } -}; -var sortByOriginalOrder = (oldNodes, newNodes) => { - const newNodesCopy = newNodes.slice(0); - const newIds = newNodesCopy.map((node) => node.uid); - const res = oldNodes.reduce((acc, item) => { - const index = newIds.indexOf(item.uid); - if (index > -1) { - acc.push(item); - newNodesCopy.splice(index, 1); - newIds.splice(index, 1); - } - return acc; - }, []); - res.push(...newNodesCopy); - return res; -}; - -// node_modules/element-plus/es/components/cascader-panel/src/index.mjs -var _sfc_main44 = defineComponent({ - ...{ - name: "ElCascaderPanel" - }, - __name: "index", - props: cascaderPanelProps, - emits: cascaderPanelEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - let manualChecked = false; - const ns = useNamespace("cascader"); - const config = useCascaderConfig(props2); - const slots = useSlots(); - let store; - const initialLoaded = ref(true); - const initialLoadedOnce = ref(false); - const menuList = ref([]); - const checkedValue = ref(); - const menus = ref([]); - const expandingNode = ref(); - const checkedNodes = ref([]); - const isHoverMenu = computed(() => config.value.expandTrigger === "hover"); - const renderLabelFn = computed(() => props2.renderLabel || slots.default); - const initStore = () => { - const { options } = props2; - const cfg = config.value; - manualChecked = false; - store = new Store(options, cfg); - menus.value = [store.getNodes()]; - if (cfg.lazy && isEmpty2(props2.options)) { - initialLoaded.value = false; - lazyLoad(void 0, (list) => { - if (list) { - store = new Store(list, cfg); - menus.value = [store.getNodes()]; - } - initialLoaded.value = true; - syncCheckedValue(false, true); - }); - } else { - syncCheckedValue(false, true); - } - }; - const lazyLoad = (node, cb) => { - const cfg = config.value; - node = node || new Node2({}, cfg, void 0, true); - node.loading = true; - const resolve = (dataList) => { - const _node = node; - const parent2 = _node.root ? null : _node; - _node.loading = false; - _node.loaded = true; - _node.childrenData = _node.childrenData || []; - dataList && (store == null ? void 0 : store.appendNodes(dataList, parent2)); - dataList && (cb == null ? void 0 : cb(dataList)); - if (node.level === 0) { - initialLoadedOnce.value = true; - } - }; - const reject2 = () => { - node.loading = false; - node.loaded = false; - if (node.level === 0) { - initialLoaded.value = true; - } - }; - cfg.lazyLoad(node, resolve, reject2); - }; - const expandNode = (node, silent) => { - var _a; - const { level } = node; - const newMenus = menus.value.slice(0, level); - let newExpandingNode; - if (node.isLeaf) { - newExpandingNode = node.pathNodes[level - 2]; - } else { - newExpandingNode = node; - newMenus.push(node.children); - } - if (((_a = expandingNode.value) == null ? void 0 : _a.uid) !== (newExpandingNode == null ? void 0 : newExpandingNode.uid)) { - expandingNode.value = node; - menus.value = newMenus; - !silent && emit("expand-change", (node == null ? void 0 : node.pathValues) || []); - } - }; - const handleCheckChange = (node, checked, emitClose = true) => { - const { checkStrictly, multiple } = config.value; - const oldNode = checkedNodes.value[0]; - manualChecked = true; - !multiple && (oldNode == null ? void 0 : oldNode.doCheck(false)); - node.doCheck(checked); - calculateCheckedValue(); - emitClose && !multiple && !checkStrictly && emit("close"); - !emitClose && !multiple && expandParentNode(node); - }; - const expandParentNode = (node) => { - if (!node) - return; - node = node.parent; - expandParentNode(node); - node && expandNode(node); - }; - const getFlattedNodes = (leafOnly) => store == null ? void 0 : store.getFlattedNodes(leafOnly); - const getCheckedNodes = (leafOnly) => { - var _a; - return (_a = getFlattedNodes(leafOnly)) == null ? void 0 : _a.filter(({ checked }) => checked !== false); - }; - const clearCheckedNodes = () => { - checkedNodes.value.forEach((node) => node.doCheck(false)); - calculateCheckedValue(); - menus.value = menus.value.slice(0, 1); - expandingNode.value = void 0; - emit("expand-change", []); - }; - const calculateCheckedValue = () => { - var _a; - const { checkStrictly, multiple } = config.value; - const oldNodes = checkedNodes.value; - const newNodes = getCheckedNodes(!checkStrictly); - const nodes = sortByOriginalOrder(oldNodes, newNodes); - const values2 = nodes.map((node) => node.valueByOption); - checkedNodes.value = nodes; - checkedValue.value = multiple ? values2 : (_a = values2[0]) != null ? _a : null; - }; - const syncCheckedValue = (loaded = false, forced = false) => { - const { modelValue } = props2; - const { lazy, multiple, checkStrictly } = config.value; - const leafOnly = !checkStrictly; - if (!initialLoaded.value || manualChecked || !forced && isEqual_default(modelValue, checkedValue.value)) - return; - if (lazy && !loaded) { - const values2 = unique( - flattenDeep_default(castArray2(modelValue)) - ); - const nodes = values2.map((val) => store == null ? void 0 : store.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading); - if (nodes.length) { - nodes.forEach((node) => { - lazyLoad(node, () => syncCheckedValue(false, forced)); - }); - } else { - syncCheckedValue(true, forced); - } - } else { - const values2 = multiple ? castArray2(modelValue) : [modelValue]; - const nodes = unique( - values2.map( - (val) => store == null ? void 0 : store.getNodeByValue(val, leafOnly) - ) - ); - syncMenuState(nodes, forced); - checkedValue.value = cloneDeep_default(modelValue != null ? modelValue : void 0); - } - }; - const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => { - const { checkStrictly } = config.value; - const oldNodes = checkedNodes.value; - const newNodes = newCheckedNodes.filter( - (node) => !!node && (checkStrictly || node.isLeaf) - ); - const oldExpandingNode = store == null ? void 0 : store.getSameNode(expandingNode.value); - const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0]; - if (newExpandingNode) { - newExpandingNode.pathNodes.forEach((node) => expandNode(node, true)); - } else { - expandingNode.value = void 0; - } - oldNodes.forEach((node) => node.doCheck(false)); - reactive(newNodes).forEach((node) => node.doCheck(true)); - checkedNodes.value = newNodes; - nextTick(scrollToExpandingNode); - }; - const scrollToExpandingNode = () => { - if (!isClient) - return; - menuList.value.forEach((menu) => { - const menuElement = menu == null ? void 0 : menu.$el; - if (menuElement) { - const container = menuElement.querySelector( - `.${ns.namespace.value}-scrollbar__wrap` - ); - let activeNode = menuElement.querySelector( - `.${ns.b("node")}.in-active-path` - ); - if (!activeNode) { - const activeElements = menuElement.querySelectorAll( - `.${ns.b("node")}.${ns.is("active")}` - ); - activeNode = activeElements[activeElements.length - 1]; - } - scrollIntoView(container, activeNode); - } - }); - }; - const handleKeyDown = (e) => { - const target2 = e.target; - const code = getEventCode(e); - switch (code) { - case EVENT_CODE.up: - case EVENT_CODE.down: { - e.preventDefault(); - const distance = code === EVENT_CODE.up ? -1 : 1; - focusNode( - getSibling( - target2, - distance, - `.${ns.b("node")}[tabindex="-1"]` - ) - ); - break; - } - case EVENT_CODE.left: { - e.preventDefault(); - const preMenu = menuList.value[getMenuIndex(target2) - 1]; - const expandedNode = preMenu == null ? void 0 : preMenu.$el.querySelector( - `.${ns.b("node")}[aria-expanded="true"]` - ); - focusNode(expandedNode); - break; - } - case EVENT_CODE.right: { - e.preventDefault(); - const nextMenu = menuList.value[getMenuIndex(target2) + 1]; - const firstNode = nextMenu == null ? void 0 : nextMenu.$el.querySelector( - `.${ns.b("node")}[tabindex="-1"]` - ); - focusNode(firstNode); - break; - } - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - checkNode(target2); - break; - } - }; - provide( - CASCADER_PANEL_INJECTION_KEY, - reactive({ - config, - expandingNode, - checkedNodes, - isHoverMenu, - initialLoaded, - renderLabelFn, - lazyLoad, - expandNode, - handleCheckChange - }) - ); - watch( - config, - (newVal, oldVal) => { - if (isEqual_default(newVal, oldVal)) - return; - initStore(); - }, - { - immediate: true - } - ); - watch(() => props2.options, initStore, { - deep: true - }); - watch( - () => props2.modelValue, - () => { - manualChecked = false; - syncCheckedValue(); - }, - { - deep: true - } - ); - watch( - () => checkedValue.value, - (val) => { - if (!isEqual_default(val, props2.modelValue)) { - emit(UPDATE_MODEL_EVENT, val); - emit(CHANGE_EVENT, val); - } - } - ); - const loadLazyRootNodes = () => { - if (initialLoadedOnce.value) - return; - initStore(); - }; - onBeforeUpdate(() => menuList.value = []); - onMounted(() => !isEmpty2(props2.modelValue) && syncCheckedValue()); - __expose({ - menuList, - menus, - checkedNodes, - handleKeyDown, - handleCheckChange, - getFlattedNodes, - getCheckedNodes, - clearCheckedNodes, - calculateCheckedValue, - scrollToExpandingNode, - loadLazyRootNodes - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b("panel"), unref(ns).is("bordered", _ctx.border)]), - onKeydown: handleKeyDown - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(menus.value, (menu, index) => { - return openBlock(), createBlock(ElCascaderMenu, { - key: index, - ref_for: true, - ref: (item) => menuList.value[index] = item, - index, - nodes: [...menu] - }, { - empty: withCtx(() => [ - renderSlot(_ctx.$slots, "empty") - ]), - _: 3 - }, 8, ["index", "nodes"]); - }), - 128 - )) - ], - 34 - ); - }; - } -}); -var CascaderPanel = _export_sfc(_sfc_main44, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/index.vue"]]); - -// node_modules/element-plus/es/components/cascader-panel/index.mjs -var ElCascaderPanel = withInstall(CascaderPanel); - -// node_modules/element-plus/es/components/cascader/src/cascader2.mjs -var cascaderProps = buildProps({ - ...CommonProps, - size: useSizeProp, - placeholder: String, - disabled: { - type: Boolean, - default: void 0 - }, - clearable: Boolean, - clearIcon: { - type: iconPropType, - default: circle_close_default - }, - filterable: Boolean, - filterMethod: { - type: definePropType( - Function - ), - default: (node, keyword) => node.text.includes(keyword) - }, - separator: { - type: String, - default: " / " - }, - showAllLevels: { - type: Boolean, - default: true - }, - collapseTags: Boolean, - maxCollapseTags: { - type: Number, - default: 1 - }, - collapseTagsTooltip: Boolean, - maxCollapseTagsTooltipHeight: { - type: [String, Number] - }, - debounce: { - type: Number, - default: 300 - }, - beforeFilter: { - type: definePropType(Function), - default: () => true - }, - placement: { - type: definePropType(String), - values: Ee, - default: "bottom-start" - }, - fallbackPlacements: { - type: definePropType(Array), - default: ["bottom-start", "bottom", "top-start", "top", "right", "left"] - }, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - teleported: useTooltipContentProps.teleported, - effect: { - type: definePropType(String), - default: "light" - }, - tagType: { ...tagProps.type, default: "info" }, - tagEffect: { ...tagProps.effect, default: "light" }, - validateEvent: { - type: Boolean, - default: true - }, - persistent: { - type: Boolean, - default: true - }, - showCheckedStrategy: { - type: String, - values: ["parent", "child"], - default: "child" - }, - checkOnClickNode: Boolean, - showPrefix: { - type: Boolean, - default: true - }, - ...useEmptyValuesProps -}); -var emitChangeFn2 = (value) => true; -var cascaderEmits = { - [UPDATE_MODEL_EVENT]: emitChangeFn2, - [CHANGE_EVENT]: emitChangeFn2, - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true, - visibleChange: (val) => isBoolean2(val), - expandChange: (val) => !!val, - removeTag: (val) => !!val -}; - -// node_modules/element-plus/es/components/cascader/src/cascader.mjs -var _hoisted_118 = ["placeholder"]; -var _hoisted_28 = ["onClick"]; -var _sfc_main45 = defineComponent({ - ...{ - name: "ElCascader" - }, - __name: "cascader", - props: cascaderProps, - emits: cascaderEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const popperOptions = { - modifiers: [ - { - name: "arrowPosition", - enabled: true, - phase: "main", - fn: ({ state }) => { - const { modifiersData, placement } = state; - if (["right", "left", "bottom", "top"].includes(placement)) - return; - if (modifiersData.arrow) { - modifiersData.arrow.x = 35; - } - }, - requires: ["arrow"] - } - ] - }; - const props2 = __props; - const emit = __emit; - const attrs = useAttrs(); - const slots = useSlots(); - let inputInitialHeight = 0; - let pressDeleteCount = 0; - const nsCascader = useNamespace("cascader"); - const nsInput = useNamespace("input"); - const sizeMapPadding = { - small: 7, - default: 11, - large: 15 - }; - const { t } = useLocale(); - const { formItem } = useFormItem(); - const isDisabled = useFormDisabled(); - const { valueOnClear } = useEmptyValues(props2); - const { isComposing, handleComposition } = useComposition({ - afterComposition(event) { - var _a; - const text = (_a = event.target) == null ? void 0 : _a.value; - handleInput(text); - } - }); - const tooltipRef = ref(); - const tagTooltipRef = ref(); - const inputRef = ref(); - const tagWrapper = ref(); - const cascaderPanelRef = ref(); - const suggestionPanel = ref(); - const popperVisible = ref(false); - const inputHover = ref(false); - const filtering = ref(false); - const inputValue = ref(""); - const searchInputValue = ref(""); - const tags = ref([]); - const suggestions = ref([]); - const showTagList = computed(() => { - if (!props2.props.multiple) { - return []; - } - return props2.collapseTags ? tags.value.slice(0, props2.maxCollapseTags) : tags.value; - }); - const collapseTagList = computed(() => { - if (!props2.props.multiple) { - return []; - } - return props2.collapseTags ? tags.value.slice(props2.maxCollapseTags) : []; - }); - const cascaderStyle = computed(() => { - return attrs.style; - }); - const inputPlaceholder = computed( - () => { - var _a; - return (_a = props2.placeholder) != null ? _a : t("el.cascader.placeholder"); - } - ); - const currentPlaceholder = computed( - () => searchInputValue.value || tags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value - ); - const realSize = useFormSize(); - const tagSize = computed( - () => realSize.value === "small" ? "small" : "default" - ); - const multiple = computed(() => !!props2.props.multiple); - const readonly2 = computed(() => !props2.filterable || multiple.value); - const searchKeyword = computed( - () => multiple.value ? searchInputValue.value : inputValue.value - ); - const checkedNodes = computed( - () => { - var _a; - return ((_a = cascaderPanelRef.value) == null ? void 0 : _a.checkedNodes) || []; - } - ); - const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, { - disabled: isDisabled, - beforeBlur(event) { - var _a, _b; - return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event)); - }, - afterBlur() { - var _a; - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err)); - } - } - }); - const clearBtnVisible = computed(() => { - if (!props2.clearable || isDisabled.value || filtering.value || !inputHover.value && !isFocused.value) - return false; - return !!checkedNodes.value.length; - }); - const presentText = computed(() => { - const { showAllLevels, separator } = props2; - const nodes = checkedNodes.value; - return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : ""; - }); - const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || ""); - const checkedValue = computed({ - get() { - return cloneDeep_default(props2.modelValue); - }, - set(val) { - const value = val != null ? val : valueOnClear.value; - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value); - if (props2.validateEvent) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - } - }); - const cascaderKls = computed(() => { - return [ - nsCascader.b(), - nsCascader.m(realSize.value), - nsCascader.is("disabled", isDisabled.value), - attrs.class - ]; - }); - const cascaderIconKls = computed(() => { - return [ - nsInput.e("icon"), - "icon-arrow-down", - nsCascader.is("reverse", popperVisible.value) - ]; - }); - const inputClass = computed(() => nsCascader.is("focus", isFocused.value)); - const contentRef = computed(() => { - var _a, _b; - return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef; - }); - const handleClickOutside = (event) => { - if (isFocused.value) { - const _event2 = new FocusEvent("blur", event); - handleBlur(_event2); - } - togglePopperVisible(false); - }; - const togglePopperVisible = (visible) => { - var _a, _b; - if (isDisabled.value) - return; - visible = visible != null ? visible : !popperVisible.value; - if (visible !== popperVisible.value) { - popperVisible.value = visible; - (_b = (_a = inputRef.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`); - if (visible) { - updatePopperPosition(); - cascaderPanelRef.value && nextTick(cascaderPanelRef.value.scrollToExpandingNode); - } else if (props2.filterable) { - syncPresentTextValue(); - } - emit("visibleChange", visible); - } - }; - const updatePopperPosition = () => { - nextTick(() => { - var _a; - (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper(); - }); - }; - const hideSuggestionPanel = () => { - filtering.value = false; - }; - const genTag3 = (node) => { - const { showAllLevels, separator } = props2; - return { - node, - key: node.uid, - text: node.calcText(showAllLevels, separator), - hitState: false, - closable: !isDisabled.value && !node.isDisabled - }; - }; - const deleteTag = (tag) => { - var _a; - const node = tag.node; - node.doCheck(false); - (_a = cascaderPanelRef.value) == null ? void 0 : _a.calculateCheckedValue(); - emit("removeTag", node.valueByOption); - }; - const getStrategyCheckedNodes = () => { - switch (props2.showCheckedStrategy) { - case "child": - return checkedNodes.value; - case "parent": { - const clickedNodes = getCheckedNodes(false); - const clickedNodesValue = clickedNodes.map((o2) => o2.value); - const parentNodes = clickedNodes.filter( - (o2) => !o2.parent || !clickedNodesValue.includes(o2.parent.value) - ); - return parentNodes; - } - default: - return []; - } - }; - const calculatePresentTags = () => { - if (!multiple.value) - return; - const nodes = getStrategyCheckedNodes(); - const allTags = []; - nodes.forEach((node) => allTags.push(genTag3(node))); - tags.value = allTags; - }; - const calculateSuggestions = () => { - var _a, _b; - const { filterMethod, showAllLevels, separator } = props2; - const res = (_b = (_a = cascaderPanelRef.value) == null ? void 0 : _a.getFlattedNodes(!props2.props.checkStrictly)) == null ? void 0 : _b.filter((node) => { - if (node.isDisabled) - return false; - node.calcText(showAllLevels, separator); - return filterMethod(node, searchKeyword.value); - }); - if (multiple.value) { - tags.value.forEach((tag) => { - tag.hitState = false; - }); - } - filtering.value = true; - suggestions.value = res; - updatePopperPosition(); - }; - const focusFirstNode = () => { - var _a; - let firstNode; - if (filtering.value && suggestionPanel.value) { - firstNode = suggestionPanel.value.$el.querySelector( - `.${nsCascader.e("suggestion-item")}` - ); - } else { - firstNode = (_a = cascaderPanelRef.value) == null ? void 0 : _a.$el.querySelector( - `.${nsCascader.b("node")}[tabindex="-1"]` - ); - } - if (firstNode) { - firstNode.focus(); - !filtering.value && firstNode.click(); - } - }; - const updateStyle = () => { - var _a, _b, _c; - const inputInner = (_a = inputRef.value) == null ? void 0 : _a.input; - const tagWrapperEl = tagWrapper.value; - const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el; - if (!isClient || !inputInner) - return; - if (suggestionPanelEl) { - const suggestionList = suggestionPanelEl.querySelector( - `.${nsCascader.e("suggestion-list")}` - ); - suggestionList.style.minWidth = `${inputInner.offsetWidth}px`; - } - if (tagWrapperEl) { - const { offsetHeight } = tagWrapperEl; - const height = tags.value.length > 0 ? `${Math.max(offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`; - inputInner.style.height = height; - if (slots.prefix) { - const prefix = (_c = inputRef.value) == null ? void 0 : _c.$el.querySelector( - `.${nsInput.e("prefix")}` - ); - let left = 0; - if (prefix) { - left = prefix.offsetWidth; - if (left > 0) { - left += sizeMapPadding[realSize.value || "default"]; - } - } - tagWrapperEl.style.left = `${left}px`; - } else { - tagWrapperEl.style.left = `0`; - } - updatePopperPosition(); - } - }; - const getCheckedNodes = (leafOnly) => { - var _a; - return (_a = cascaderPanelRef.value) == null ? void 0 : _a.getCheckedNodes(leafOnly); - }; - const handleExpandChange = (value) => { - updatePopperPosition(); - emit("expandChange", value); - }; - const handleKeyDown = (e) => { - if (isComposing.value) - return; - const code = getEventCode(e); - switch (code) { - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - togglePopperVisible(); - break; - case EVENT_CODE.down: - togglePopperVisible(true); - nextTick(focusFirstNode); - e.preventDefault(); - break; - case EVENT_CODE.esc: - if (popperVisible.value === true) { - e.preventDefault(); - e.stopPropagation(); - togglePopperVisible(false); - } - break; - case EVENT_CODE.tab: - togglePopperVisible(false); - break; - } - }; - const handleClear = () => { - var _a; - (_a = cascaderPanelRef.value) == null ? void 0 : _a.clearCheckedNodes(); - if (!popperVisible.value && props2.filterable) { - syncPresentTextValue(); - } - togglePopperVisible(false); - emit("clear"); - }; - const syncPresentTextValue = () => { - const { value } = presentText; - inputValue.value = value; - searchInputValue.value = value; - }; - const handleSuggestionClick = (node) => { - var _a, _b; - const { checked } = node; - if (multiple.value) { - (_a = cascaderPanelRef.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false); - } else { - !checked && ((_b = cascaderPanelRef.value) == null ? void 0 : _b.handleCheckChange(node, true, false)); - togglePopperVisible(false); - } - }; - const handleSuggestionKeyDown = (e) => { - const target2 = e.target; - const code = getEventCode(e); - switch (code) { - case EVENT_CODE.up: - case EVENT_CODE.down: { - e.preventDefault(); - const distance = code === EVENT_CODE.up ? -1 : 1; - focusNode( - getSibling( - target2, - distance, - `.${nsCascader.e("suggestion-item")}[tabindex="-1"]` - ) - ); - break; - } - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - target2.click(); - break; - } - }; - const handleDelete = () => { - const lastTag = tags.value[tags.value.length - 1]; - pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1; - if (!lastTag || !pressDeleteCount || props2.collapseTags && tags.value.length > 1) - return; - if (lastTag.hitState) { - deleteTag(lastTag); - } else { - lastTag.hitState = true; - } - }; - const debounce2 = computed(() => props2.debounce); - const handleFilter = useDebounceFn(() => { - const { value } = searchKeyword; - if (!value) - return; - const passed = props2.beforeFilter(value); - if (isPromise(passed)) { - passed.then(calculateSuggestions).catch(() => { - }); - } else if (passed !== false) { - calculateSuggestions(); - } else { - hideSuggestionPanel(); - } - }, debounce2); - const handleInput = (val, e) => { - !popperVisible.value && togglePopperVisible(true); - if (e == null ? void 0 : e.isComposing) - return; - val ? handleFilter() : hideSuggestionPanel(); - }; - const getInputInnerHeight = (inputInner) => Number.parseFloat( - useCssVar(nsInput.cssVarName("input-height"), inputInner).value - ) - 2; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.blur(); - }; - watch(filtering, updatePopperPosition); - watch( - [ - checkedNodes, - isDisabled, - () => props2.collapseTags, - () => props2.maxCollapseTags - ], - calculatePresentTags - ); - watch(tags, () => { - nextTick(() => updateStyle()); - }); - watch(realSize, async () => { - await nextTick(); - const inputInner = inputRef.value.input; - inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight; - updateStyle(); - }); - watch(presentText, syncPresentTextValue, { immediate: true }); - watch( - () => popperVisible.value, - (val) => { - var _a; - if (val && props2.props.lazy && props2.props.lazyLoad) { - (_a = cascaderPanelRef.value) == null ? void 0 : _a.loadLazyRootNodes(); - } - } - ); - onMounted(() => { - const inputInner = inputRef.value.input; - const inputInnerHeight = getInputInnerHeight(inputInner); - inputInitialHeight = inputInner.offsetHeight || inputInnerHeight; - useResizeObserver(inputInner, updateStyle); - }); - __expose({ - getCheckedNodes, - cascaderPanelRef, - togglePopperVisible, - contentRef, - presentText, - focus, - blur - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTooltip), { - ref_key: "tooltipRef", - ref: tooltipRef, - visible: popperVisible.value, - teleported: _ctx.teleported, - "popper-class": [unref(nsCascader).e("dropdown"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - "popper-options": popperOptions, - "fallback-placements": _ctx.fallbackPlacements, - "stop-popper-mouse-event": false, - "gpu-acceleration": false, - placement: _ctx.placement, - transition: `${unref(nsCascader).namespace.value}-zoom-in-top`, - effect: _ctx.effect, - pure: "", - persistent: _ctx.persistent, - onHide: hideSuggestionPanel - }, { - default: withCtx(() => [ - withDirectives((openBlock(), createElementBlock( - "div", - { - ref_key: "wrapperRef", - ref: wrapperRef, - class: normalizeClass(cascaderKls.value), - style: normalizeStyle(cascaderStyle.value), - onClick: _cache[8] || (_cache[8] = () => togglePopperVisible(readonly2.value ? void 0 : true)), - onKeydown: handleKeyDown, - onMouseenter: _cache[9] || (_cache[9] = ($event) => inputHover.value = true), - onMouseleave: _cache[10] || (_cache[10] = ($event) => inputHover.value = false) - }, - [ - createVNode(unref(ElInput), { - ref_key: "inputRef", - ref: inputRef, - modelValue: inputValue.value, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event), - placeholder: currentPlaceholder.value, - readonly: readonly2.value, - disabled: unref(isDisabled), - "validate-event": false, - size: unref(realSize), - class: normalizeClass(inputClass.value), - tabindex: multiple.value && _ctx.filterable && !unref(isDisabled) ? -1 : void 0, - onCompositionstart: unref(handleComposition), - onCompositionupdate: unref(handleComposition), - onCompositionend: unref(handleComposition), - onInput: handleInput - }, createSlots({ - suffix: withCtx(() => [ - clearBtnVisible.value ? (openBlock(), createBlock(unref(ElIcon), { - key: "clear", - class: normalizeClass([unref(nsInput).e("icon"), "icon-circle-close"]), - onClick: withModifiers(handleClear, ["stop"]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), { - key: "arrow-down", - class: normalizeClass(cascaderIconKls.value), - onClick: _cache[0] || (_cache[0] = withModifiers(($event) => togglePopperVisible(), ["stop"])) - }, { - default: withCtx(() => [ - createVNode(unref(arrow_down_default)) - ]), - _: 1 - }, 8, ["class"])) - ]), - _: 2 - }, [ - _ctx.$slots.prefix ? { - name: "prefix", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "prefix") - ]), - key: "0" - } : void 0 - ]), 1032, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]), - multiple.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref_key: "tagWrapper", - ref: tagWrapper, - class: normalizeClass([ - unref(nsCascader).e("tags"), - unref(nsCascader).is("validate", Boolean(validateState.value)) - ]) - }, - [ - renderSlot(_ctx.$slots, "tag", { - data: tags.value, - deleteTag - }, () => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(showTagList.value, (tag) => { - return openBlock(), createBlock(unref(ElTag), { - key: tag.key, - type: _ctx.tagType, - size: tagSize.value, - effect: _ctx.tagEffect, - hit: tag.hitState, - closable: tag.closable, - "disable-transitions": "", - onClose: ($event) => deleteTag(tag) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - null, - toDisplayString(tag.text), - 1 - ) - ]), - _: 2 - }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]); - }), - 128 - )) - ]), - _ctx.collapseTags && tags.value.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), { - key: 0, - ref_key: "tagTooltipRef", - ref: tagTooltipRef, - disabled: popperVisible.value || !_ctx.collapseTagsTooltip, - "fallback-placements": ["bottom", "top", "right", "left"], - placement: "bottom", - "popper-class": _ctx.popperClass, - "popper-style": _ctx.popperStyle, - effect: _ctx.effect, - persistent: _ctx.persistent - }, { - default: withCtx(() => [ - createVNode(unref(ElTag), { - closable: false, - size: tagSize.value, - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "" - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(nsCascader).e("tags-text")) - }, - " + " + toDisplayString(tags.value.length - _ctx.maxCollapseTags), - 3 - ) - ]), - _: 1 - }, 8, ["size", "type", "effect"]) - ]), - content: withCtx(() => [ - createVNode(unref(ElScrollbar), { "max-height": _ctx.maxCollapseTagsTooltipHeight }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsCascader).e("collapse-tags")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(collapseTagList.value, (tag, idx) => { - return openBlock(), createElementBlock( - "div", - { - key: idx, - class: normalizeClass(unref(nsCascader).e("collapse-tag")) - }, - [ - (openBlock(), createBlock(unref(ElTag), { - key: tag.key, - class: "in-tooltip", - type: _ctx.tagType, - size: tagSize.value, - effect: _ctx.tagEffect, - hit: tag.hitState, - closable: tag.closable, - "disable-transitions": "", - onClose: ($event) => deleteTag(tag) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - null, - toDisplayString(tag.text), - 1 - ) - ]), - _: 2 - }, 1032, ["type", "size", "effect", "hit", "closable", "onClose"])) - ], - 2 - ); - }), - 128 - )) - ], - 2 - ) - ]), - _: 1 - }, 8, ["max-height"]) - ]), - _: 1 - }, 8, ["disabled", "popper-class", "popper-style", "effect", "persistent"])) : createCommentVNode("v-if", true), - _ctx.filterable && !unref(isDisabled) ? withDirectives((openBlock(), createElementBlock("input", { - key: 1, - "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchInputValue.value = $event), - type: "text", - class: normalizeClass(unref(nsCascader).e("search-input")), - placeholder: presentText.value ? "" : inputPlaceholder.value, - onInput: _cache[3] || (_cache[3] = (e) => handleInput(searchInputValue.value, e)), - onClick: _cache[4] || (_cache[4] = withModifiers(($event) => togglePopperVisible(true), ["stop"])), - onKeydown: withKeys(handleDelete, ["delete"]), - onCompositionstart: _cache[5] || (_cache[5] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)), - onCompositionupdate: _cache[6] || (_cache[6] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)), - onCompositionend: _cache[7] || (_cache[7] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)) - }, null, 42, _hoisted_118)), [ - [vModelText, searchInputValue.value] - ]) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 38 - )), [ - [unref(ClickOutside), handleClickOutside, contentRef.value] - ]) - ]), - content: withCtx(() => [ - _ctx.$slots.header ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(nsCascader).e("header")), - onClick: _cache[11] || (_cache[11] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "header") - ], - 2 - )) : createCommentVNode("v-if", true), - withDirectives(createVNode(unref(ElCascaderPanel), { - ref_key: "cascaderPanelRef", - ref: cascaderPanelRef, - modelValue: checkedValue.value, - "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => checkedValue.value = $event), - options: _ctx.options, - props: props2.props, - border: false, - "render-label": _ctx.$slots.default, - onExpandChange: handleExpandChange, - onClose: _cache[13] || (_cache[13] = ($event) => _ctx.$nextTick(() => togglePopperVisible(false))) - }, { - empty: withCtx(() => [ - renderSlot(_ctx.$slots, "empty") - ]), - _: 3 - }, 8, ["modelValue", "options", "props", "render-label"]), [ - [vShow, !filtering.value] - ]), - _ctx.filterable ? withDirectives((openBlock(), createBlock(unref(ElScrollbar), { - key: 1, - ref_key: "suggestionPanel", - ref: suggestionPanel, - tag: "ul", - class: normalizeClass(unref(nsCascader).e("suggestion-panel")), - "view-class": unref(nsCascader).e("suggestion-list"), - onKeydown: handleSuggestionKeyDown - }, { - default: withCtx(() => [ - suggestions.value.length ? (openBlock(true), createElementBlock( - Fragment, - { key: 0 }, - renderList(suggestions.value, (item) => { - return openBlock(), createElementBlock("li", { - key: item.uid, - class: normalizeClass([ - unref(nsCascader).e("suggestion-item"), - unref(nsCascader).is("checked", item.checked) - ]), - tabindex: -1, - onClick: ($event) => handleSuggestionClick(item) - }, [ - renderSlot(_ctx.$slots, "suggestion-item", { item }, () => [ - createBaseVNode( - "span", - null, - toDisplayString(item.text), - 1 - ), - item.checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - createVNode(unref(check_default)) - ]), - _: 1 - })) : createCommentVNode("v-if", true) - ]) - ], 10, _hoisted_28); - }), - 128 - )) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [ - createBaseVNode( - "li", - { - class: normalizeClass(unref(nsCascader).e("empty-text")) - }, - toDisplayString(unref(t)("el.cascader.noMatch")), - 3 - ) - ]) - ]), - _: 3 - }, 8, ["class", "view-class"])), [ - [vShow, filtering.value] - ]) : createCommentVNode("v-if", true), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass(unref(nsCascader).e("footer")), - onClick: _cache[14] || (_cache[14] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["visible", "teleported", "popper-class", "popper-style", "fallback-placements", "placement", "transition", "effect", "persistent"]); - }; - } -}); -var Cascader = _export_sfc(_sfc_main45, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader/src/cascader.vue"]]); - -// node_modules/element-plus/es/components/cascader/index.mjs -var ElCascader = withInstall(Cascader); - -// node_modules/element-plus/es/components/check-tag/src/check-tag.mjs -var checkTagProps = buildProps({ - checked: Boolean, - disabled: Boolean, - type: { - type: String, - values: ["primary", "success", "info", "warning", "danger"], - default: "primary" - } -}); -var checkTagEmits = { - "update:checked": (value) => isBoolean2(value), - [CHANGE_EVENT]: (value) => isBoolean2(value) -}; - -// node_modules/element-plus/es/components/check-tag/src/check-tag2.mjs -var _sfc_main46 = defineComponent({ - ...{ - name: "ElCheckTag" - }, - __name: "check-tag", - props: checkTagProps, - emits: checkTagEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("check-tag"); - const containerKls = computed(() => [ - ns.b(), - ns.is("checked", props2.checked), - ns.is("disabled", props2.disabled), - ns.m(props2.type || "primary") - ]); - const handleChange = () => { - if (props2.disabled) - return; - const checked = !props2.checked; - emit(CHANGE_EVENT, checked); - emit("update:checked", checked); - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "span", - { - class: normalizeClass(containerKls.value), - onClick: handleChange - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ); - }; - } -}); -var CheckTag = _export_sfc(_sfc_main46, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/check-tag/src/check-tag.vue"]]); - -// node_modules/element-plus/es/components/check-tag/index.mjs -var ElCheckTag = withInstall(CheckTag); - -// node_modules/element-plus/es/components/col/src/col.mjs -var colProps = buildProps({ - tag: { - type: String, - default: "div" - }, - span: { - type: Number, - default: 24 - }, - offset: { - type: Number, - default: 0 - }, - pull: { - type: Number, - default: 0 - }, - push: { - type: Number, - default: 0 - }, - xs: { - type: definePropType([Number, Object]), - default: () => mutable({}) - }, - sm: { - type: definePropType([Number, Object]), - default: () => mutable({}) - }, - md: { - type: definePropType([Number, Object]), - default: () => mutable({}) - }, - lg: { - type: definePropType([Number, Object]), - default: () => mutable({}) - }, - xl: { - type: definePropType([Number, Object]), - default: () => mutable({}) - } -}); - -// node_modules/element-plus/es/components/row/src/constants.mjs -var rowContextKey = Symbol("rowContextKey"); - -// node_modules/element-plus/es/components/col/src/col2.mjs -var _sfc_main47 = defineComponent({ - ...{ - name: "ElCol" - }, - __name: "col", - props: colProps, - setup(__props) { - const props2 = __props; - const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) }); - const ns = useNamespace("col"); - const style = computed(() => { - const styles = {}; - if (gutter.value) { - styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`; - } - return styles; - }); - const colKls = computed(() => { - const classes = []; - const pos = ["span", "offset", "pull", "push"]; - pos.forEach((prop) => { - const size3 = props2[prop]; - if (isNumber2(size3)) { - if (prop === "span") - classes.push(ns.b(`${props2[prop]}`)); - else if (size3 > 0) - classes.push(ns.b(`${prop}-${props2[prop]}`)); - } - }); - const sizes = ["xs", "sm", "md", "lg", "xl"]; - sizes.forEach((size3) => { - if (isNumber2(props2[size3])) { - classes.push(ns.b(`${size3}-${props2[size3]}`)); - } else if (isObject(props2[size3])) { - Object.entries(props2[size3]).forEach(([prop, sizeProp]) => { - classes.push( - prop !== "span" ? ns.b(`${size3}-${prop}-${sizeProp}`) : ns.b(`${size3}-${sizeProp}`) - ); - }); - } - }); - if (gutter.value) { - classes.push(ns.is("guttered")); - } - return [ns.b(), classes]; - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { - class: normalizeClass(colKls.value), - style: normalizeStyle(style.value) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["class", "style"]); - }; - } -}); -var Col = _export_sfc(_sfc_main47, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]); - -// node_modules/element-plus/es/components/col/index.mjs -var ElCol = withInstall(Col); - -// node_modules/element-plus/es/components/collapse/src/collapse.mjs -var emitChangeFn3 = (value) => isNumber2(value) || isString(value) || isArray(value); -var collapseProps = buildProps({ - accordion: Boolean, - modelValue: { - type: definePropType([Array, String, Number]), - default: () => mutable([]) - }, - expandIconPosition: { - type: definePropType([String]), - default: "right" - }, - beforeCollapse: { - type: definePropType( - Function - ) - } -}); -var collapseEmits = { - [UPDATE_MODEL_EVENT]: emitChangeFn3, - [CHANGE_EVENT]: emitChangeFn3 -}; - -// node_modules/element-plus/es/components/collapse/src/constants.mjs -var collapseContextKey = Symbol("collapseContextKey"); - -// node_modules/element-plus/es/components/collapse/src/use-collapse.mjs -var SCOPE4 = "ElCollapse"; -var useCollapse = (props2, emit) => { - const activeNames = ref(castArray_default(props2.modelValue)); - const setActiveNames = (_activeNames) => { - activeNames.value = _activeNames; - const value = props2.accordion ? activeNames.value[0] : activeNames.value; - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value); - }; - const handleChange = (name) => { - if (props2.accordion) { - setActiveNames([activeNames.value[0] === name ? "" : name]); - } else { - const _activeNames = [...activeNames.value]; - const index = _activeNames.indexOf(name); - if (index > -1) { - _activeNames.splice(index, 1); - } else { - _activeNames.push(name); - } - setActiveNames(_activeNames); - } - }; - const handleItemClick = async (name) => { - const { beforeCollapse } = props2; - if (!beforeCollapse) { - handleChange(name); - return; - } - const shouldChange = beforeCollapse(name); - const isPromiseOrBool = [ - isPromise(shouldChange), - isBoolean2(shouldChange) - ].includes(true); - if (!isPromiseOrBool) { - throwError( - SCOPE4, - "beforeCollapse must return type `Promise` or `boolean`" - ); - } - if (isPromise(shouldChange)) { - shouldChange.then((result2) => { - if (result2 !== false) { - handleChange(name); - } - }).catch((e) => { - debugWarn(SCOPE4, `some error occurred: ${e}`); - }); - } else if (shouldChange) { - handleChange(name); - } - }; - watch( - () => props2.modelValue, - () => activeNames.value = castArray_default(props2.modelValue), - { deep: true } - ); - provide(collapseContextKey, { - activeNames, - handleItemClick - }); - return { - activeNames, - setActiveNames - }; -}; -var useCollapseDOM = (props2) => { - const ns = useNamespace("collapse"); - const rootKls = computed(() => [ - ns.b(), - ns.b(`icon-position-${props2.expandIconPosition}`) - ]); - return { - rootKls - }; -}; - -// node_modules/element-plus/es/components/collapse/src/collapse2.mjs -var _sfc_main48 = defineComponent({ - ...{ - name: "ElCollapse" - }, - __name: "collapse", - props: collapseProps, - emits: collapseEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { activeNames, setActiveNames } = useCollapse(props2, emit); - const { rootKls } = useCollapseDOM(props2); - __expose({ - activeNames, - setActiveNames - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(rootKls)) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ); - }; - } -}); -var Collapse = _export_sfc(_sfc_main48, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse.vue"]]); - -// node_modules/element-plus/es/components/collapse-transition/src/collapse-transition.mjs -var _sfc_main49 = defineComponent({ - ...{ - name: "ElCollapseTransition" - }, - __name: "collapse-transition", - setup(__props) { - const ns = useNamespace("collapse-transition"); - const reset = (el) => { - el.style.maxHeight = ""; - el.style.overflow = el.dataset.oldOverflow; - el.style.paddingTop = el.dataset.oldPaddingTop; - el.style.paddingBottom = el.dataset.oldPaddingBottom; - }; - const on2 = { - beforeEnter(el) { - if (!el.dataset) - el.dataset = {}; - el.dataset.oldPaddingTop = el.style.paddingTop; - el.dataset.oldPaddingBottom = el.style.paddingBottom; - if (el.style.height) - el.dataset.elExistsHeight = el.style.height; - el.style.maxHeight = 0; - el.style.paddingTop = 0; - el.style.paddingBottom = 0; - }, - enter(el) { - requestAnimationFrame(() => { - el.dataset.oldOverflow = el.style.overflow; - if (el.dataset.elExistsHeight) { - el.style.maxHeight = el.dataset.elExistsHeight; - } else if (el.scrollHeight !== 0) { - el.style.maxHeight = `${el.scrollHeight}px`; - } else { - el.style.maxHeight = 0; - } - el.style.paddingTop = el.dataset.oldPaddingTop; - el.style.paddingBottom = el.dataset.oldPaddingBottom; - el.style.overflow = "hidden"; - }); - }, - afterEnter(el) { - el.style.maxHeight = ""; - el.style.overflow = el.dataset.oldOverflow; - }, - enterCancelled(el) { - reset(el); - }, - beforeLeave(el) { - if (!el.dataset) - el.dataset = {}; - el.dataset.oldPaddingTop = el.style.paddingTop; - el.dataset.oldPaddingBottom = el.style.paddingBottom; - el.dataset.oldOverflow = el.style.overflow; - el.style.maxHeight = `${el.scrollHeight}px`; - el.style.overflow = "hidden"; - }, - leave(el) { - if (el.scrollHeight !== 0) { - el.style.maxHeight = 0; - el.style.paddingTop = 0; - el.style.paddingBottom = 0; - } - }, - afterLeave(el) { - reset(el); - }, - leaveCancelled(el) { - reset(el); - } - }; - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, mergeProps({ - name: unref(ns).b() - }, toHandlers(on2)), { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 16, ["name"]); - }; - } -}); -var CollapseTransition = _export_sfc(_sfc_main49, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]); - -// node_modules/element-plus/es/components/collapse-transition/index.mjs -var ElCollapseTransition = withInstall(CollapseTransition); - -// node_modules/element-plus/es/components/collapse/src/collapse-item.mjs -var collapseItemProps = buildProps({ - title: { - type: String, - default: "" - }, - name: { - type: definePropType([String, Number]), - default: void 0 - }, - icon: { - type: iconPropType, - default: arrow_right_default - }, - disabled: Boolean -}); - -// node_modules/element-plus/es/components/collapse/src/use-collapse-item.mjs -var useCollapseItem = (props2) => { - const collapse = inject(collapseContextKey); - const { namespace } = useNamespace("collapse"); - const focusing = ref(false); - const isClick = ref(false); - const idInjection = useIdInjection(); - const id = computed(() => idInjection.current++); - const name = computed(() => { - var _a; - return (_a = props2.name) != null ? _a : `${namespace.value}-id-${idInjection.prefix}-${unref(id)}`; - }); - const isActive = computed( - () => collapse == null ? void 0 : collapse.activeNames.value.includes(unref(name)) - ); - const handleFocus = () => { - setTimeout(() => { - if (!isClick.value) { - focusing.value = true; - } else { - isClick.value = false; - } - }, 50); - }; - const handleHeaderClick = (e) => { - if (props2.disabled) - return; - const target2 = e.target; - if (target2 == null ? void 0 : target2.closest("input, textarea, select")) - return; - collapse == null ? void 0 : collapse.handleItemClick(unref(name)); - focusing.value = false; - isClick.value = true; - }; - const handleEnterClick = (e) => { - const target2 = e.target; - if (target2 == null ? void 0 : target2.closest("input, textarea, select")) - return; - e.preventDefault(); - collapse == null ? void 0 : collapse.handleItemClick(unref(name)); - }; - return { - focusing, - id, - isActive, - handleFocus, - handleHeaderClick, - handleEnterClick - }; -}; -var useCollapseItemDOM = (props2, { focusing, isActive, id }) => { - const ns = useNamespace("collapse"); - const rootKls = computed(() => [ - ns.b("item"), - ns.is("active", unref(isActive)), - ns.is("disabled", props2.disabled) - ]); - const headKls = computed(() => [ - ns.be("item", "header"), - ns.is("active", unref(isActive)), - { focusing: unref(focusing) && !props2.disabled } - ]); - const arrowKls = computed(() => [ - ns.be("item", "arrow"), - ns.is("active", unref(isActive)) - ]); - const itemTitleKls = computed(() => [ns.be("item", "title")]); - const itemWrapperKls = computed(() => ns.be("item", "wrap")); - const itemContentKls = computed(() => ns.be("item", "content")); - const scopedContentId = computed(() => ns.b(`content-${unref(id)}`)); - const scopedHeadId = computed(() => ns.b(`head-${unref(id)}`)); - return { - itemTitleKls, - arrowKls, - headKls, - rootKls, - itemWrapperKls, - itemContentKls, - scopedContentId, - scopedHeadId - }; -}; - -// node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs -var _hoisted_119 = ["id", "aria-expanded", "aria-controls", "aria-describedby", "tabindex", "aria-disabled"]; -var _hoisted_29 = ["id", "aria-hidden", "aria-labelledby"]; -var _sfc_main50 = defineComponent({ - ...{ - name: "ElCollapseItem" - }, - __name: "collapse-item", - props: collapseItemProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { - focusing, - id, - isActive, - handleFocus, - handleHeaderClick, - handleEnterClick - } = useCollapseItem(props2); - const { - arrowKls, - headKls, - rootKls, - itemTitleKls, - itemWrapperKls, - itemContentKls, - scopedContentId, - scopedHeadId - } = useCollapseItemDOM(props2, { focusing, isActive, id }); - __expose({ - isActive - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(rootKls)) - }, - [ - createBaseVNode("div", { - id: unref(scopedHeadId), - class: normalizeClass(unref(headKls)), - "aria-expanded": unref(isActive), - "aria-controls": unref(scopedContentId), - "aria-describedby": unref(scopedContentId), - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - role: "button", - onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)), - onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers( - (...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), - ["stop"] - ), ["space", "enter"])), - onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), - onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false) - }, [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(itemTitleKls)) - }, - [ - renderSlot(_ctx.$slots, "title", { isActive: unref(isActive) }, () => [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ]) - ], - 2 - ), - renderSlot(_ctx.$slots, "icon", { isActive: unref(isActive) }, () => [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(arrowKls)) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - }, 8, ["class"]) - ]) - ], 42, _hoisted_119), - createVNode(unref(ElCollapseTransition), null, { - default: withCtx(() => [ - withDirectives(createBaseVNode("div", { - id: unref(scopedContentId), - role: "region", - class: normalizeClass(unref(itemWrapperKls)), - "aria-hidden": !unref(isActive), - "aria-labelledby": unref(scopedHeadId) - }, [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(itemContentKls)) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ) - ], 10, _hoisted_29), [ - [vShow, unref(isActive)] - ]) - ]), - _: 3 - }) - ], - 2 - ); - }; - } -}); -var CollapseItem = _export_sfc(_sfc_main50, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse-item.vue"]]); - -// node_modules/element-plus/es/components/collapse/index.mjs -var ElCollapse = withInstall(Collapse, { - CollapseItem -}); -var ElCollapseItem = withNoopInstall(CollapseItem); - -// node_modules/element-plus/es/components/color-picker-panel/src/props/slider.mjs -var alphaSliderProps = buildProps({ - color: { - type: definePropType(Object), - required: true - }, - vertical: Boolean, - disabled: Boolean -}); -var hueSliderProps = alphaSliderProps; - -// node_modules/element-plus/es/components/color-picker-panel/src/utils/draggable.mjs -var isDragging = false; -function draggable(element, options) { - if (!isClient) - return; - const moveFn = function(event) { - var _a; - (_a = options.drag) == null ? void 0 : _a.call(options, event); - }; - const upFn = function(event) { - var _a; - document.removeEventListener("mousemove", moveFn); - document.removeEventListener("mouseup", upFn); - document.removeEventListener("touchmove", moveFn); - document.removeEventListener("touchend", upFn); - document.onselectstart = null; - document.ondragstart = null; - isDragging = false; - (_a = options.end) == null ? void 0 : _a.call(options, event); - }; - const downFn = function(event) { - var _a; - if (isDragging) - return; - document.onselectstart = () => false; - document.ondragstart = () => false; - document.addEventListener("mousemove", moveFn); - document.addEventListener("mouseup", upFn); - document.addEventListener("touchmove", moveFn); - document.addEventListener("touchend", upFn); - isDragging = true; - (_a = options.start) == null ? void 0 : _a.call(options, event); - }; - element.addEventListener("mousedown", downFn); - element.addEventListener("touchstart", downFn, { passive: false }); -} - -// node_modules/element-plus/es/utils/dom/position.mjs -var getOffsetTop = (el) => { - let offset3 = 0; - let parent2 = el; - while (parent2) { - offset3 += parent2.offsetTop; - parent2 = parent2.offsetParent; - } - return offset3; -}; -var getOffsetTopDistance = (el, containerEl) => { - return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl)); -}; -var getClientXY = (event) => { - let clientX; - let clientY; - if (event.type === "touchend") { - clientY = event.changedTouches[0].clientY; - clientX = event.changedTouches[0].clientX; - } else if (event.type.startsWith("touch")) { - clientY = event.touches[0].clientY; - clientX = event.touches[0].clientX; - } else { - clientY = event.clientY; - clientX = event.clientX; - } - return { - clientX, - clientY - }; -}; - -// node_modules/element-plus/es/components/color-picker-panel/src/composables/use-slider.mjs -var useSlider = (props2, { key, minValue: minValue3, maxValue: maxValue3 }) => { - const instance = getCurrentInstance(); - const thumb = shallowRef(); - const bar = shallowRef(); - const currentValue = computed(() => props2.color.get(key)); - function handleClick(event) { - var _a; - if (props2.disabled) - return; - const target2 = event.target; - if (target2 !== thumb.value) { - handleDrag(event); - } - (_a = thumb.value) == null ? void 0 : _a.focus(); - } - function handleDrag(event) { - if (!bar.value || !thumb.value || props2.disabled) - return; - const el = instance.vnode.el; - const rect = el.getBoundingClientRect(); - const { clientX, clientY } = getClientXY(event); - let value; - if (!props2.vertical) { - let left = clientX - rect.left; - left = Math.max(thumb.value.offsetWidth / 2, left); - left = Math.min(left, rect.width - thumb.value.offsetWidth / 2); - value = Math.round( - (left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * maxValue3 - ); - } else { - let top = clientY - rect.top; - top = Math.max(thumb.value.offsetHeight / 2, top); - top = Math.min(top, rect.height - thumb.value.offsetHeight / 2); - value = Math.round( - (top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * maxValue3 - ); - } - props2.color.set(key, value); - } - function handleKeydown(event) { - if (props2.disabled) - return; - const { shiftKey } = event; - const code = getEventCode(event); - const step2 = shiftKey ? 10 : 1; - const reverse2 = key === "hue" ? -1 : 1; - let isPreventDefault = true; - switch (code) { - case EVENT_CODE.left: - case EVENT_CODE.down: - incrementPosition(-step2 * reverse2); - break; - case EVENT_CODE.right: - case EVENT_CODE.up: - incrementPosition(step2 * reverse2); - break; - case EVENT_CODE.home: - props2.color.set(key, key === "hue" ? maxValue3 : minValue3); - break; - case EVENT_CODE.end: - props2.color.set(key, key === "hue" ? minValue3 : maxValue3); - break; - case EVENT_CODE.pageDown: - incrementPosition(-4 * reverse2); - break; - case EVENT_CODE.pageUp: - incrementPosition(4 * reverse2); - break; - default: - isPreventDefault = false; - break; - } - isPreventDefault && event.preventDefault(); - } - function incrementPosition(step2) { - let next = currentValue.value + step2; - next = next < minValue3 ? minValue3 : next > maxValue3 ? maxValue3 : next; - props2.color.set(key, next); - } - return { - thumb, - bar, - currentValue, - handleDrag, - handleClick, - handleKeydown - }; -}; -var useSliderDOM = (props2, { - namespace, - maxValue: maxValue3, - bar, - thumb, - currentValue, - handleDrag, - getBackground -}) => { - const instance = getCurrentInstance(); - const ns = useNamespace(namespace); - const thumbLeft = ref(0); - const thumbTop = ref(0); - const background = ref(); - function getThumbLeft() { - if (!thumb.value) - return 0; - if (props2.vertical) - return 0; - const el = instance.vnode.el; - const value = currentValue.value; - if (!el) - return 0; - return Math.round( - value * (el.offsetWidth - thumb.value.offsetWidth / 2) / maxValue3 - ); - } - function getThumbTop() { - if (!thumb.value) - return 0; - const el = instance.vnode.el; - if (!props2.vertical) - return 0; - const value = currentValue.value; - if (!el) - return 0; - return Math.round( - value * (el.offsetHeight - thumb.value.offsetHeight / 2) / maxValue3 - ); - } - function update2() { - thumbLeft.value = getThumbLeft(); - thumbTop.value = getThumbTop(); - background.value = getBackground == null ? void 0 : getBackground(); - } - onMounted(() => { - if (!bar.value || !thumb.value) - return; - const dragConfig = { - drag: (event) => { - handleDrag(event); - }, - end: (event) => { - handleDrag(event); - } - }; - draggable(bar.value, dragConfig); - draggable(thumb.value, dragConfig); - update2(); - }); - watch(currentValue, () => update2()); - watch( - () => props2.color.value, - () => update2() - ); - const rootKls = computed(() => [ - ns.b(), - ns.is("vertical", props2.vertical), - ns.is("disabled", props2.disabled) - ]); - const barKls = computed(() => ns.e("bar")); - const thumbKls = computed(() => ns.e("thumb")); - const barStyle = computed(() => ({ background: background.value })); - const thumbStyle = computed(() => ({ - left: addUnit(thumbLeft.value), - top: addUnit(thumbTop.value) - })); - return { - rootKls, - barKls, - barStyle, - thumbKls, - thumbStyle, - thumbLeft, - thumbTop, - update: update2 - }; -}; - -// node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.mjs -var _hoisted_120 = ["aria-label", "aria-valuenow", "aria-valuetext", "aria-orientation", "tabindex", "aria-disabled"]; -var minValue = 0; -var maxValue = 100; -var _sfc_main51 = defineComponent({ - ...{ - name: "ElColorAlphaSlider" - }, - __name: "alpha-slider", - props: alphaSliderProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props2, { key: "alpha", minValue, maxValue }); - const { rootKls, barKls, barStyle, thumbKls, thumbStyle, update: update2 } = useSliderDOM(props2, { - namespace: "color-alpha-slider", - maxValue, - currentValue, - bar, - thumb, - handleDrag, - getBackground - }); - const { t } = useLocale(); - const ariaLabel = computed(() => t("el.colorpicker.alphaLabel")); - const ariaValuetext = computed(() => { - return t("el.colorpicker.alphaDescription", { - alpha: currentValue.value, - color: props2.color.value - }); - }); - function getBackground() { - if (props2.color && props2.color.value) { - const { r, g, b: b2 } = props2.color.toRgb(); - return `linear-gradient(to right, rgba(${r}, ${g}, ${b2}, 0) 0%, rgba(${r}, ${g}, ${b2}, 1) 100%)`; - } - return ""; - } - __expose({ - update: update2, - bar, - thumb - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(rootKls)) - }, - [ - createBaseVNode( - "div", - { - ref_key: "bar", - ref: bar, - class: normalizeClass(unref(barKls)), - style: normalizeStyle(unref(barStyle)), - onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args)) - }, - null, - 6 - ), - createBaseVNode("div", { - ref_key: "thumb", - ref: thumb, - class: normalizeClass(unref(thumbKls)), - style: normalizeStyle(unref(thumbStyle)), - "aria-label": ariaLabel.value, - "aria-valuenow": unref(currentValue), - "aria-valuetext": ariaValuetext.value, - "aria-orientation": _ctx.vertical ? "vertical" : "horizontal", - "aria-valuemin": minValue, - "aria-valuemax": maxValue, - role: "slider", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)) - }, null, 46, _hoisted_120) - ], - 2 - ); - }; - } -}); -var AlphaSlider = _export_sfc(_sfc_main51, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/alpha-slider.vue"]]); - -// node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.mjs -var _hoisted_121 = ["aria-label", "aria-valuenow", "aria-valuetext", "aria-orientation", "tabindex", "aria-disabled"]; -var minValue2 = 0; -var maxValue2 = 360; -var _sfc_main52 = defineComponent({ - ...{ - name: "ElColorHueSlider" - }, - __name: "hue-slider", - props: hueSliderProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props2, { key: "hue", minValue: minValue2, maxValue: maxValue2 }); - const { rootKls, barKls, thumbKls, thumbStyle, thumbTop, update: update2 } = useSliderDOM(props2, { - namespace: "color-hue-slider", - maxValue: maxValue2, - currentValue, - bar, - thumb, - handleDrag - }); - const { t } = useLocale(); - const ariaLabel = computed(() => t("el.colorpicker.hueLabel")); - const ariaValuetext = computed(() => { - return t("el.colorpicker.hueDescription", { - hue: currentValue.value, - color: props2.color.value - }); - }); - __expose({ - bar, - thumb, - thumbTop, - update: update2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(rootKls)) - }, - [ - createBaseVNode( - "div", - { - ref_key: "bar", - ref: bar, - class: normalizeClass(unref(barKls)), - onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args)) - }, - null, - 2 - ), - createBaseVNode("div", { - ref_key: "thumb", - ref: thumb, - class: normalizeClass(unref(thumbKls)), - style: normalizeStyle(unref(thumbStyle)), - "aria-label": ariaLabel.value, - "aria-valuenow": unref(currentValue), - "aria-valuetext": ariaValuetext.value, - "aria-orientation": _ctx.vertical ? "vertical" : "horizontal", - "aria-valuemin": minValue2, - "aria-valuemax": maxValue2, - role: "slider", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)) - }, null, 46, _hoisted_121) - ], - 2 - ); - }; - } -}); -var HueSlider = _export_sfc(_sfc_main52, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/hue-slider.vue"]]); - -// node_modules/element-plus/es/components/color-picker-panel/src/props/predefine.mjs -var predefineProps = buildProps({ - colors: { - type: definePropType(Array), - required: true - }, - color: { - type: definePropType(Object), - required: true - }, - enableAlpha: { - type: Boolean, - required: true - }, - disabled: Boolean -}); - -// node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel.mjs -var colorPickerPanelProps = buildProps({ - modelValue: { - type: definePropType(String), - default: void 0 - }, - border: { - type: Boolean, - default: true - }, - showAlpha: Boolean, - colorFormat: String, - disabled: Boolean, - predefine: { - type: definePropType(Array) - }, - validateEvent: { - type: Boolean, - default: true - } -}); -var colorPickerPanelEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil_default(val) -}; -var ROOT_COMMON_COLOR_INJECTION_KEY = Symbol("colorCommonPickerKey"); -var colorPickerPanelContextKey = Symbol("colorPickerPanelContextKey"); - -// node_modules/element-plus/es/components/color-picker-panel/src/utils/color.mjs -var Color = class { - constructor(options = {}) { - this._hue = 0; - this._saturation = 100; - this._value = 100; - this._alpha = 100; - this._tiny = new TinyColor(); - this._isValid = false; - this.enableAlpha = false; - this.format = ""; - this.value = ""; - for (const option in options) { - if (hasOwn(options, option)) { - this[option] = options[option]; - } - } - if (options.value) { - this.fromString(options.value); - } else { - this.doOnChange(); - } - } - set(prop, value) { - if (arguments.length === 1 && typeof prop === "object") { - for (const p2 in prop) { - if (hasOwn(prop, p2)) { - this.set(p2, prop[p2]); - } - } - return; - } - this[`_${prop}`] = value; - this._isValid = true; - this.doOnChange(); - } - get(prop) { - if (["hue", "saturation", "value", "alpha"].includes(prop)) { - return Math.round(this[`_${prop}`]); - } - return this[`_${prop}`]; - } - toRgb() { - return this._isValid ? this._tiny.toRgb() : { r: 255, g: 255, b: 255, a: 0 }; - } - fromString(value) { - const color = new TinyColor(value); - this._isValid = color.isValid; - if (color.isValid) { - const { h: h3, s: s2, v: v2, a: a2 } = color.toHsv(); - this._hue = h3; - this._saturation = s2 * 100; - this._value = v2 * 100; - this._alpha = a2 * 100; - } else { - this._hue = 0; - this._saturation = 100; - this._value = 100; - this._alpha = 100; - } - this.doOnChange(); - } - clear() { - this._isValid = false; - this.value = ""; - this._hue = 0; - this._saturation = 100; - this._value = 100; - this._alpha = 100; - } - compare(color) { - const compareColor = new TinyColor({ - h: color._hue, - s: color._saturation / 100, - v: color._value / 100, - a: color._alpha / 100 - }); - return this._tiny.equals(compareColor); - } - doOnChange() { - const { _hue, _saturation, _value, _alpha, format: format2, enableAlpha } = this; - let _format = format2 || (enableAlpha ? "rgb" : "hex"); - if (format2 === "hex" && enableAlpha) { - _format = "hex8"; - } - this._tiny = new TinyColor({ - h: _hue, - s: _saturation / 100, - v: _value / 100, - a: _alpha / 100 - }); - this.value = this._isValid ? this._tiny.toString(_format) : ""; - } -}; - -// node_modules/element-plus/es/components/color-picker-panel/src/composables/use-predefine.mjs -var usePredefine = (props2) => { - const { currentColor } = inject(colorPickerPanelContextKey); - const rgbaColors = ref(parseColors(props2.colors, props2.color)); - watch( - () => currentColor.value, - (val) => { - const color = new Color({ - value: val, - enableAlpha: props2.enableAlpha - }); - rgbaColors.value.forEach((item) => { - item.selected = color.compare(item); - }); - } - ); - watchEffect(() => { - rgbaColors.value = parseColors(props2.colors, props2.color); - }); - function handleSelect(index) { - props2.color.fromString(props2.colors[index]); - } - function parseColors(colors, color) { - return colors.map((value) => { - const c2 = new Color({ - value, - enableAlpha: props2.enableAlpha - }); - c2.selected = c2.compare(color); - return c2; - }); - } - return { - rgbaColors, - handleSelect - }; -}; -var usePredefineDOM = (props2) => { - const ns = useNamespace("color-predefine"); - const rootKls = computed(() => [ns.b(), ns.is("disabled", props2.disabled)]); - const colorsKls = computed(() => ns.e("colors")); - function colorSelectorKls(item) { - return [ - ns.e("color-selector"), - ns.is("alpha", item.get("alpha") < 100), - { selected: item.selected } - ]; - } - return { - rootKls, - colorsKls, - colorSelectorKls - }; -}; - -// node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.mjs -var _hoisted_122 = ["disabled", "aria-label", "onClick"]; -var _sfc_main53 = defineComponent({ - ...{ - name: "ElColorPredefine" - }, - __name: "predefine", - props: predefineProps, - setup(__props) { - const props2 = __props; - const { rgbaColors, handleSelect } = usePredefine(props2); - const { rootKls, colorsKls, colorSelectorKls } = usePredefineDOM(props2); - const { t } = useLocale(); - const ariaLabel = (value) => { - return t("el.colorpicker.predefineDescription", { value }); - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(rootKls)) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(colorsKls)) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(rgbaColors), (item, index) => { - return openBlock(), createElementBlock("button", { - key: _ctx.colors[index], - type: "button", - disabled: _ctx.disabled, - "aria-label": ariaLabel(item.value), - class: normalizeClass(unref(colorSelectorKls)(item)), - onClick: ($event) => unref(handleSelect)(index) - }, [ - createBaseVNode( - "div", - { - style: normalizeStyle({ backgroundColor: item.value }) - }, - null, - 4 - ) - ], 10, _hoisted_122); - }), - 128 - )) - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var Predefine = _export_sfc(_sfc_main53, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/predefine.vue"]]); - -// node_modules/element-plus/es/components/color-picker-panel/src/props/sv-panel.mjs -var svPanelProps = buildProps({ - color: { - type: definePropType(Object), - required: true - }, - disabled: Boolean -}); - -// node_modules/element-plus/es/components/color-picker-panel/src/composables/use-sv-panel.mjs -var useSvPanel = (props2) => { - const instance = getCurrentInstance(); - const cursorRef = ref(); - const cursorTop = ref(0); - const cursorLeft = ref(0); - const background = ref("hsl(0, 100%, 50%)"); - const saturation = computed(() => props2.color.get("saturation")); - const brightness = computed(() => props2.color.get("value")); - const hue = computed(() => props2.color.get("hue")); - function handleClick(event) { - var _a; - if (props2.disabled) - return; - const target2 = event.target; - if (target2 !== cursorRef.value) { - handleDrag(event); - } - (_a = cursorRef.value) == null ? void 0 : _a.focus({ preventScroll: true }); - } - function handleDrag(event) { - if (props2.disabled) - return; - const el = instance.vnode.el; - const rect = el.getBoundingClientRect(); - const { clientX, clientY } = getClientXY(event); - let left = clientX - rect.left; - let top = clientY - rect.top; - left = Math.max(0, left); - left = Math.min(left, rect.width); - top = Math.max(0, top); - top = Math.min(top, rect.height); - cursorLeft.value = left; - cursorTop.value = top; - props2.color.set({ - saturation: left / rect.width * 100, - value: 100 - top / rect.height * 100 - }); - } - function handleKeydown(event) { - if (props2.disabled) - return; - const { shiftKey } = event; - const code = getEventCode(event); - const step2 = shiftKey ? 10 : 1; - let isPreventDefault = true; - switch (code) { - case EVENT_CODE.left: - incrementSaturation(-step2); - break; - case EVENT_CODE.right: - incrementSaturation(step2); - break; - case EVENT_CODE.up: - incrementBrightness(step2); - break; - case EVENT_CODE.down: - incrementBrightness(-step2); - break; - default: - isPreventDefault = false; - break; - } - isPreventDefault && event.preventDefault(); - } - function incrementSaturation(step2) { - let next = saturation.value + step2; - next = next < 0 ? 0 : next > 100 ? 100 : next; - props2.color.set("saturation", next); - } - function incrementBrightness(step2) { - let next = brightness.value + step2; - next = next < 0 ? 0 : next > 100 ? 100 : next; - props2.color.set("value", next); - } - return { - cursorRef, - cursorTop, - cursorLeft, - background, - saturation, - brightness, - hue, - handleClick, - handleDrag, - handleKeydown - }; -}; -var useSvPanelDOM = (props2, { - cursorTop, - cursorLeft, - background, - handleDrag -}) => { - const instance = getCurrentInstance(); - const ns = useNamespace("color-svpanel"); - function update2() { - const saturation = props2.color.get("saturation"); - const brightness = props2.color.get("value"); - const el = instance.vnode.el; - const { clientWidth: width, clientHeight: height } = el; - cursorLeft.value = saturation * width / 100; - cursorTop.value = (100 - brightness) * height / 100; - background.value = `hsl(${props2.color.get("hue")}, 100%, 50%)`; - } - onMounted(() => { - draggable(instance.vnode.el, { - drag: (event) => { - handleDrag(event); - }, - end: (event) => { - handleDrag(event); - } - }); - update2(); - }); - watch( - [ - () => props2.color.get("hue"), - () => props2.color.get("value"), - () => props2.color.value - ], - () => update2() - ); - const rootKls = computed(() => ns.b()); - const cursorKls = computed(() => ns.e("cursor")); - const rootStyle = computed(() => ({ - backgroundColor: background.value - })); - const cursorStyle = computed(() => ({ - top: addUnit(cursorTop.value), - left: addUnit(cursorLeft.value) - })); - return { - rootKls, - cursorKls, - rootStyle, - cursorStyle, - update: update2 - }; -}; - -// node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.mjs -var _hoisted_123 = ["tabindex", "aria-disabled", "aria-label", "aria-valuenow", "aria-valuetext"]; -var _sfc_main54 = defineComponent({ - ...{ - name: "ElSvPanel" - }, - __name: "sv-panel", - props: svPanelProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { - cursorRef, - cursorTop, - cursorLeft, - background, - saturation, - brightness, - handleClick, - handleDrag, - handleKeydown - } = useSvPanel(props2); - const { rootKls, cursorKls, rootStyle, cursorStyle, update: update2 } = useSvPanelDOM( - props2, - { - cursorTop, - cursorLeft, - background, - handleDrag - } - ); - const { t } = useLocale(); - const ariaLabel = computed(() => t("el.colorpicker.svLabel")); - const ariaValuetext = computed(() => { - return t("el.colorpicker.svDescription", { - saturation: saturation.value, - brightness: brightness.value, - color: props2.color.value - }); - }); - __expose({ - update: update2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(rootKls)), - style: normalizeStyle(unref(rootStyle)), - onClick: _cache[1] || (_cache[1] = (...args) => unref(handleClick) && unref(handleClick)(...args)) - }, - [ - createBaseVNode("div", { - ref_key: "cursorRef", - ref: cursorRef, - class: normalizeClass(unref(cursorKls)), - style: normalizeStyle(unref(cursorStyle)), - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - role: "slider", - "aria-valuemin": "0,0", - "aria-valuemax": "100,100", - "aria-label": ariaLabel.value, - "aria-valuenow": `${unref(saturation)},${unref(brightness)}`, - "aria-valuetext": ariaValuetext.value, - onKeydown: _cache[0] || (_cache[0] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)) - }, null, 46, _hoisted_123) - ], - 6 - ); - }; - } -}); -var SvPanel = _export_sfc(_sfc_main54, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/sv-panel.vue"]]); - -// node_modules/element-plus/es/components/color-picker-panel/src/composables/use-common-color.mjs -var useCommonColor = (props2, emit) => { - const color = reactive( - new Color({ - enableAlpha: props2.showAlpha, - format: props2.colorFormat || "", - value: props2.modelValue - }) - ); - watch( - () => [props2.colorFormat, props2.showAlpha], - () => { - color.enableAlpha = props2.showAlpha; - color.format = props2.colorFormat || color.format; - color.doOnChange(); - emit(UPDATE_MODEL_EVENT, color.value); - } - ); - return { - color - }; -}; - -// node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel2.mjs -var _sfc_main55 = defineComponent({ - ...{ - name: "ElColorPickerPanel" - }, - __name: "color-picker-panel", - props: colorPickerPanelProps, - emits: colorPickerPanelEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("color-picker-panel"); - const { formItem } = useFormItem(); - const disabled = useFormDisabled(); - const hueRef = ref(); - const svRef = ref(); - const alphaRef = ref(); - const inputRef = ref(); - const customInput = ref(""); - const { color } = inject( - ROOT_COMMON_COLOR_INJECTION_KEY, - () => useCommonColor(props2, emit), - true - ); - function handleConfirm() { - color.fromString(customInput.value); - if (color.value !== customInput.value) { - customInput.value = color.value; - } - } - function handleFocusout() { - var _a; - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err)); - } - } - function update2() { - var _a, _b, _c; - (_a = hueRef.value) == null ? void 0 : _a.update(); - (_b = svRef.value) == null ? void 0 : _b.update(); - (_c = alphaRef.value) == null ? void 0 : _c.update(); - } - onMounted(() => { - if (props2.modelValue) { - customInput.value = color.value; - } - nextTick(update2); - }); - watch( - () => props2.modelValue, - (newVal) => { - if (newVal !== color.value) { - newVal ? color.fromString(newVal) : color.clear(); - } - } - ); - watch( - () => color.value, - (val) => { - emit(UPDATE_MODEL_EVENT, val); - customInput.value = val; - if (props2.validateEvent) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - } - ); - provide(colorPickerPanelContextKey, { - currentColor: computed(() => color.value) - }); - __expose({ - color, - inputRef, - update: update2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b(), unref(ns).is("disabled", unref(disabled)), unref(ns).is("border", _ctx.border)]), - onFocusout: handleFocusout - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("wrapper")) - }, - [ - createVNode(HueSlider, { - ref_key: "hueRef", - ref: hueRef, - class: "hue-slider", - color: unref(color), - vertical: "", - disabled: unref(disabled) - }, null, 8, ["color", "disabled"]), - createVNode(SvPanel, { - ref_key: "svRef", - ref: svRef, - color: unref(color), - disabled: unref(disabled) - }, null, 8, ["color", "disabled"]) - ], - 2 - ), - _ctx.showAlpha ? (openBlock(), createBlock(AlphaSlider, { - key: 0, - ref_key: "alphaRef", - ref: alphaRef, - color: unref(color), - disabled: unref(disabled) - }, null, 8, ["color", "disabled"])) : createCommentVNode("v-if", true), - _ctx.predefine ? (openBlock(), createBlock(Predefine, { - key: 1, - ref: "predefine", - "enable-alpha": _ctx.showAlpha, - color: unref(color), - colors: _ctx.predefine, - disabled: unref(disabled) - }, null, 8, ["enable-alpha", "color", "colors", "disabled"])) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("footer")) - }, - [ - createVNode(unref(ElInput), { - ref_key: "inputRef", - ref: inputRef, - modelValue: customInput.value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event), - "validate-event": false, - size: "small", - disabled: unref(disabled), - onChange: handleConfirm - }, null, 8, ["modelValue", "disabled"]), - renderSlot(_ctx.$slots, "footer") - ], - 2 - ) - ], - 34 - ); - }; - } -}); -var ColorPickerPanel = _export_sfc(_sfc_main55, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/color-picker-panel.vue"]]); - -// node_modules/element-plus/es/components/color-picker-panel/index.mjs -var ElColorPickerPanel = withInstall(ColorPickerPanel); - -// node_modules/element-plus/es/components/color-picker/src/color-picker.mjs -var colorPickerProps = buildProps({ - persistent: { - type: Boolean, - default: true - }, - modelValue: { - type: definePropType(String), - default: void 0 - }, - id: String, - showAlpha: Boolean, - colorFormat: String, - disabled: { - type: Boolean, - default: void 0 - }, - clearable: { - type: Boolean, - default: true - }, - size: useSizeProp, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - tabindex: { - type: [String, Number], - default: 0 - }, - teleported: useTooltipContentProps.teleported, - appendTo: useTooltipContentProps.appendTo, - predefine: { - type: definePropType(Array) - }, - validateEvent: { - type: Boolean, - default: true - }, - ...useEmptyValuesProps, - ...useAriaProps(["ariaLabel"]) -}); -var colorPickerEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil_default(val), - [CHANGE_EVENT]: (val) => isString(val) || isNil_default(val), - activeChange: (val) => isString(val) || isNil_default(val), - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true -}; - -// node_modules/element-plus/es/components/color-picker/src/color-picker2.mjs -var _hoisted_124 = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"]; -var _sfc_main56 = defineComponent({ - ...{ - name: "ElColorPicker" - }, - __name: "color-picker", - props: colorPickerProps, - emits: colorPickerEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { t } = useLocale(); - const ns = useNamespace("color"); - const { formItem } = useFormItem(); - const colorSize = useFormSize(); - const colorDisabled = useFormDisabled(); - const { valueOnClear, isEmptyValue: isEmptyValue2 } = useEmptyValues(props2, null); - const commonColor = useCommonColor(props2, emit); - const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext: formItem - }); - const popper = ref(); - const triggerRef2 = ref(); - const pickerPanelRef = ref(); - const showPicker = ref(false); - const showPanelColor = ref(false); - let shouldActiveChange = true; - const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef2, { - disabled: colorDisabled, - beforeBlur(event) { - var _a; - return (_a = popper.value) == null ? void 0 : _a.isFocusInsideContent(event); - }, - afterBlur() { - var _a; - setShowPicker(false); - resetColor(); - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err)); - } - } - }); - const color = reactiveComputed( - () => { - var _a, _b; - return (_b = (_a = pickerPanelRef.value) == null ? void 0 : _a.color) != null ? _b : commonColor.color; - } - ); - const panelProps = computed( - () => pick_default(props2, Object.keys(colorPickerPanelProps)) - ); - const displayedColor = computed(() => { - if (!props2.modelValue && !showPanelColor.value) { - return "transparent"; - } - return displayedRgb(color, props2.showAlpha); - }); - const currentColor = computed(() => { - return !props2.modelValue && !showPanelColor.value ? "" : color.value; - }); - const buttonAriaLabel = computed(() => { - return !isLabeledByFormItem.value ? props2.ariaLabel || t("el.colorpicker.defaultLabel") : void 0; - }); - const buttonAriaLabelledby = computed(() => { - return isLabeledByFormItem.value ? formItem == null ? void 0 : formItem.labelId : void 0; - }); - const btnKls = computed(() => { - return [ - ns.b("picker"), - ns.is("disabled", colorDisabled.value), - ns.bm("picker", colorSize.value), - ns.is("focused", isFocused.value) - ]; - }); - function displayedRgb(color2, showAlpha) { - const { r, g, b: b2, a: a2 } = color2.toRgb(); - return showAlpha ? `rgba(${r}, ${g}, ${b2}, ${a2})` : `rgb(${r}, ${g}, ${b2})`; - } - function setShowPicker(value) { - showPicker.value = value; - } - const debounceSetShowPicker = debounce_default(setShowPicker, 100, { leading: true }); - function show() { - if (colorDisabled.value) - return; - setShowPicker(true); - } - function hide2() { - debounceSetShowPicker(false); - resetColor(); - } - function resetColor() { - nextTick(() => { - if (props2.modelValue) { - color.fromString(props2.modelValue); - } else { - color.value = ""; - nextTick(() => { - showPanelColor.value = false; - }); - } - }); - } - function handleTrigger() { - if (colorDisabled.value) - return; - if (showPicker.value) { - resetColor(); - } - debounceSetShowPicker(!showPicker.value); - } - function confirmValue() { - const value = isEmptyValue2(color.value) ? valueOnClear.value : color.value; - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value); - if (props2.validateEvent) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - debounceSetShowPicker(false); - nextTick(() => { - const newColor = new Color({ - enableAlpha: props2.showAlpha, - format: props2.colorFormat || "", - value: props2.modelValue - }); - if (!color.compare(newColor)) { - resetColor(); - } - }); - } - function clear() { - debounceSetShowPicker(false); - emit(UPDATE_MODEL_EVENT, valueOnClear.value); - emit(CHANGE_EVENT, valueOnClear.value); - if (props2.modelValue !== valueOnClear.value && props2.validateEvent) { - formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)); - } - resetColor(); - emit("clear"); - } - function handleShowTooltip() { - var _a, _b; - (_b = (_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.inputRef) == null ? void 0 : _b.focus(); - } - function handleClickOutside() { - if (!showPicker.value) - return; - hide2(); - isFocused.value && focus(); - } - function handleEsc(event) { - event.preventDefault(); - event.stopPropagation(); - setShowPicker(false); - resetColor(); - } - function handleKeyDown(event) { - const code = getEventCode(event); - switch (code) { - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - case EVENT_CODE.space: - event.preventDefault(); - event.stopPropagation(); - show(); - break; - case EVENT_CODE.esc: - handleEsc(event); - break; - } - } - function focus() { - triggerRef2.value.focus(); - } - function blur() { - triggerRef2.value.blur(); - } - watch( - () => currentColor.value, - (val) => { - shouldActiveChange && emit("activeChange", val); - shouldActiveChange = true; - } - ); - watch( - () => color.value, - () => { - if (!props2.modelValue && !showPanelColor.value) { - showPanelColor.value = true; - } - } - ); - watch( - () => props2.modelValue, - (newVal) => { - if (!newVal) { - showPanelColor.value = false; - } else if (newVal && newVal !== color.value) { - shouldActiveChange = false; - color.fromString(newVal); - } - } - ); - watch( - () => showPicker.value, - () => { - pickerPanelRef.value && nextTick(pickerPanelRef.value.update); - } - ); - provide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor); - __expose({ - color, - show, - hide: hide2, - focus, - blur - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTooltip), { - ref_key: "popper", - ref: popper, - visible: showPicker.value, - "show-arrow": false, - "fallback-placements": ["bottom", "top", "right", "left"], - offset: 0, - "gpu-acceleration": false, - "popper-class": [unref(ns).be("picker", "panel"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - "stop-popper-mouse-event": false, - pure: "", - loop: "", - role: "dialog", - effect: "light", - trigger: "click", - teleported: _ctx.teleported, - transition: `${unref(ns).namespace.value}-zoom-in-top`, - persistent: _ctx.persistent, - "append-to": _ctx.appendTo, - onShow: handleShowTooltip, - onHide: _cache[2] || (_cache[2] = ($event) => setShowPicker(false)) - }, { - content: withCtx(() => [ - withDirectives((openBlock(), createBlock( - unref(ElColorPickerPanel), - mergeProps({ - ref_key: "pickerPanelRef", - ref: pickerPanelRef - }, panelProps.value, { - border: false, - "validate-event": false, - onKeydown: withKeys(handleEsc, ["esc"]) - }), - { - footer: withCtx(() => [ - createBaseVNode("div", null, [ - _ctx.clearable ? (openBlock(), createBlock(unref(ElButton), { - key: 0, - class: normalizeClass(unref(ns).be("footer", "link-btn")), - text: "", - size: "small", - onClick: clear - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.colorpicker.clear")), - 1 - ) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - createVNode(unref(ElButton), { - plain: "", - size: "small", - class: normalizeClass(unref(ns).be("footer", "btn")), - onClick: confirmValue - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.colorpicker.confirm")), - 1 - ) - ]), - _: 1 - }, 8, ["class"]) - ]) - ]), - _: 1 - }, - 16 - )), [ - [unref(ClickOutside), handleClickOutside, triggerRef2.value] - ]) - ]), - default: withCtx(() => [ - createBaseVNode("div", mergeProps({ - id: unref(buttonId), - ref_key: "triggerRef", - ref: triggerRef2 - }, _ctx.$attrs, { - class: btnKls.value, - role: "button", - "aria-label": buttonAriaLabel.value, - "aria-labelledby": buttonAriaLabelledby.value, - "aria-description": unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }), - "aria-disabled": unref(colorDisabled), - tabindex: unref(colorDisabled) ? void 0 : _ctx.tabindex, - onKeydown: handleKeyDown, - onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)), - onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)) - }), [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).be("picker", "trigger")), - onClick: handleTrigger - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass([unref(ns).be("picker", "color"), unref(ns).is("alpha", _ctx.showAlpha)]) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).be("picker", "color-inner")), - style: normalizeStyle({ - backgroundColor: displayedColor.value - }) - }, - [ - withDirectives(createVNode(unref(ElIcon), { - class: normalizeClass([unref(ns).be("picker", "icon"), unref(ns).is("icon-arrow-down")]) - }, { - default: withCtx(() => [ - createVNode(unref(arrow_down_default)) - ]), - _: 1 - }, 8, ["class"]), [ - [vShow, _ctx.modelValue || showPanelColor.value] - ]), - withDirectives(createVNode(unref(ElIcon), { - class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")]) - }, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }, 8, ["class"]), [ - [vShow, !_ctx.modelValue && !showPanelColor.value] - ]) - ], - 6 - ) - ], - 2 - ) - ], - 2 - ) - ], 16, _hoisted_124) - ]), - _: 1 - }, 8, ["visible", "popper-class", "popper-style", "teleported", "transition", "persistent", "append-to"]); - }; - } -}); -var ColorPicker = _export_sfc(_sfc_main56, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/color-picker.vue"]]); - -// node_modules/element-plus/es/components/color-picker/index.mjs -var ElColorPicker = withInstall(ColorPicker); - -// node_modules/element-plus/es/components/config-provider/src/config-provider-props.mjs -var configProviderProps = buildProps({ - a11y: { - type: Boolean, - default: true - }, - locale: { - type: definePropType(Object) - }, - size: useSizeProp, - button: { - type: definePropType(Object) - }, - card: { - type: definePropType(Object) - }, - dialog: { - type: definePropType(Object) - }, - link: { - type: definePropType(Object) - }, - experimentalFeatures: { - type: definePropType(Object) - }, - keyboardNavigation: { - type: Boolean, - default: true - }, - message: { - type: definePropType(Object) - }, - zIndex: Number, - namespace: { - type: String, - default: "el" - }, - ...useEmptyValuesProps -}); - -// node_modules/element-plus/es/components/config-provider/src/config-provider.mjs -var messageConfig = { - placement: "top" -}; -var ConfigProvider = defineComponent({ - name: "ElConfigProvider", - props: configProviderProps, - setup(props2, { slots }) { - const config = provideGlobalConfig(props2); - watch( - () => props2.message, - (val) => { - var _a, _b; - Object.assign(messageConfig, (_b = (_a = config == null ? void 0 : config.value) == null ? void 0 : _a.message) != null ? _b : {}, val != null ? val : {}); - }, - { immediate: true, deep: true } - ); - return () => renderSlot(slots, "default", { config: config == null ? void 0 : config.value }); - } -}); - -// node_modules/element-plus/es/components/config-provider/index.mjs -var ElConfigProvider = withInstall(ConfigProvider); - -// node_modules/element-plus/es/components/container/src/container.mjs -var _sfc_main57 = defineComponent({ - ...{ - name: "ElContainer" - }, - __name: "container", - props: buildProps({ - direction: { - type: String, - values: ["horizontal", "vertical"] - } - }), - setup(__props) { - const props2 = __props; - const slots = useSlots(); - const ns = useNamespace("container"); - const isVertical = computed(() => { - if (props2.direction === "vertical") { - return true; - } else if (props2.direction === "horizontal") { - return false; - } - if (slots && slots.default) { - const vNodes = slots.default(); - return vNodes.some((vNode) => { - const tag = vNode.type.name; - return tag === "ElHeader" || tag === "ElFooter"; - }); - } else { - return false; - } - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "section", - { - class: normalizeClass([unref(ns).b(), unref(ns).is("vertical", isVertical.value)]) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ); - }; - } -}); -var Container = _export_sfc(_sfc_main57, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/container.vue"]]); - -// node_modules/element-plus/es/components/container/src/aside.mjs -var _sfc_main58 = defineComponent({ - ...{ - name: "ElAside" - }, - __name: "aside", - props: { - width: { - type: String, - default: null - } - }, - setup(__props) { - const props2 = __props; - const ns = useNamespace("aside"); - const style = computed( - () => props2.width ? ns.cssVarBlock({ width: props2.width }) : {} - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "aside", - { - class: normalizeClass(unref(ns).b()), - style: normalizeStyle(style.value) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 6 - ); - }; - } -}); -var Aside = _export_sfc(_sfc_main58, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/aside.vue"]]); - -// node_modules/element-plus/es/components/container/src/footer.mjs -var _sfc_main59 = defineComponent({ - ...{ - name: "ElFooter" - }, - __name: "footer", - props: { - height: { - type: String, - default: null - } - }, - setup(__props) { - const props2 = __props; - const ns = useNamespace("footer"); - const style = computed( - () => props2.height ? ns.cssVarBlock({ height: props2.height }) : {} - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "footer", - { - class: normalizeClass(unref(ns).b()), - style: normalizeStyle(style.value) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 6 - ); - }; - } -}); -var Footer = _export_sfc(_sfc_main59, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/footer.vue"]]); - -// node_modules/element-plus/es/components/container/src/header.mjs -var _sfc_main60 = defineComponent({ - ...{ - name: "ElHeader" - }, - __name: "header", - props: { - height: { - type: String, - default: null - } - }, - setup(__props) { - const props2 = __props; - const ns = useNamespace("header"); - const style = computed(() => { - return props2.height ? ns.cssVarBlock({ - height: props2.height - }) : {}; - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "header", - { - class: normalizeClass(unref(ns).b()), - style: normalizeStyle(style.value) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 6 - ); - }; - } -}); -var Header = _export_sfc(_sfc_main60, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/header.vue"]]); - -// node_modules/element-plus/es/components/container/src/main.mjs -var _sfc_main61 = defineComponent({ - ...{ - name: "ElMain" - }, - __name: "main", - setup(__props) { - const ns = useNamespace("main"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "main", - { - class: normalizeClass(unref(ns).b()) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ); - }; - } -}); -var Main = _export_sfc(_sfc_main61, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/main.vue"]]); - -// node_modules/element-plus/es/components/container/index.mjs -var ElContainer = withInstall(Container, { - Aside, - Footer, - Header, - Main -}); -var ElAside = withNoopInstall(Aside); -var ElFooter = withNoopInstall(Footer); -var ElHeader = withNoopInstall(Header); -var ElMain = withNoopInstall(Main); - -// node_modules/element-plus/es/components/time-picker/src/time-picker.mjs -var import_dayjs7 = __toESM(require_dayjs_min(), 1); -var import_customParseFormat = __toESM(require_customParseFormat(), 1); - -// node_modules/element-plus/es/components/time-picker/src/constants.mjs -var timeUnits = ["hours", "minutes", "seconds"]; -var PICKER_BASE_INJECTION_KEY = "EP_PICKER_BASE"; -var PICKER_POPPER_OPTIONS_INJECTION_KEY = "ElPopperOptions"; -var ROOT_COMMON_PICKER_INJECTION_KEY = Symbol("commonPickerContextKey"); -var DEFAULT_FORMATS_TIME = "HH:mm:ss"; -var DEFAULT_FORMATS_DATE = "YYYY-MM-DD"; -var DEFAULT_FORMATS_DATEPICKER = { - date: DEFAULT_FORMATS_DATE, - dates: DEFAULT_FORMATS_DATE, - week: "gggg[w]ww", - year: "YYYY", - years: "YYYY", - month: "YYYY-MM", - months: "YYYY-MM", - datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`, - monthrange: "YYYY-MM", - yearrange: "YYYY", - daterange: DEFAULT_FORMATS_DATE, - datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}` -}; - -// node_modules/element-plus/es/components/time-picker/src/composables/use-common-picker.mjs -var useCommonPicker = (props2, emit) => { - const { lang } = useLocale(); - const pickerVisible = ref(false); - const pickerActualVisible = ref(false); - const userInput = ref(null); - const valueIsEmpty = computed(() => { - const { modelValue } = props2; - return !modelValue || isArray(modelValue) && !modelValue.filter(Boolean).length; - }); - const emitInput = (input) => { - if (!valueEquals(props2.modelValue, input)) { - let formatted; - if (isArray(input)) { - formatted = input.map( - (item) => formatter(item, props2.valueFormat, lang.value) - ); - } else if (input) { - formatted = formatter(input, props2.valueFormat, lang.value); - } - const emitVal = input ? formatted : input; - emit(UPDATE_MODEL_EVENT, emitVal, lang.value); - } - }; - const parsedValue = computed(() => { - var _a; - let dayOrDays; - if (valueIsEmpty.value) { - if (pickerOptions.value.getDefaultValue) { - dayOrDays = pickerOptions.value.getDefaultValue(); - } - } else { - if (isArray(props2.modelValue)) { - dayOrDays = props2.modelValue.map( - (d2) => parseDate(d2, props2.valueFormat, lang.value) - ); - } else { - dayOrDays = parseDate( - (_a = props2.modelValue) != null ? _a : "", - props2.valueFormat, - lang.value - ); - } - } - if (pickerOptions.value.getRangeAvailableTime) { - const availableResult = pickerOptions.value.getRangeAvailableTime( - dayOrDays - ); - if (!isEqual_default(availableResult, dayOrDays)) { - dayOrDays = availableResult; - if (!valueIsEmpty.value) { - emitInput(dayOrDaysToDate(dayOrDays)); - } - } - } - if (isArray(dayOrDays) && dayOrDays.some((day) => !day)) { - dayOrDays = []; - } - return dayOrDays; - }); - const pickerOptions = ref({}); - const onSetPickerOption = (e) => { - pickerOptions.value[e[0]] = e[1]; - pickerOptions.value.panelReady = true; - }; - const onCalendarChange = (e) => { - emit("calendar-change", e); - }; - const onPanelChange = (value, mode, view) => { - emit("panel-change", value, mode, view); - }; - const onPick = (date4 = "", visible = false) => { - pickerVisible.value = visible; - let result2; - if (isArray(date4)) { - result2 = date4.map((_2) => _2.toDate()); - } else { - result2 = date4 ? date4.toDate() : date4; - } - userInput.value = null; - emitInput(result2); - }; - return { - parsedValue, - pickerActualVisible, - pickerOptions, - pickerVisible, - userInput, - valueIsEmpty, - emitInput, - onCalendarChange, - onPanelChange, - onPick, - onSetPickerOption - }; -}; - -// node_modules/element-plus/es/components/time-picker/src/props/shared.mjs -var disabledTimeListsProps = buildProps({ - disabledHours: { - type: definePropType(Function) - }, - disabledMinutes: { - type: definePropType(Function) - }, - disabledSeconds: { - type: definePropType(Function) - } -}); -var timePanelSharedProps = buildProps({ - visible: Boolean, - actualVisible: { - type: Boolean, - default: void 0 - }, - format: { - type: String, - default: "" - } -}); - -// node_modules/element-plus/es/components/time-picker/src/common/props.mjs -var timePickerDefaultProps = buildProps({ - automaticDropdown: { - type: Boolean, - default: true - }, - id: { - type: definePropType([Array, String]) - }, - name: { - type: definePropType([Array, String]) - }, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - format: String, - valueFormat: String, - dateFormat: String, - timeFormat: String, - type: { - type: String, - default: "" - }, - clearable: { - type: Boolean, - default: true - }, - clearIcon: { - type: definePropType([String, Object]), - default: circle_close_default - }, - editable: { - type: Boolean, - default: true - }, - prefixIcon: { - type: definePropType([String, Object]), - default: "" - }, - size: useSizeProp, - readonly: Boolean, - disabled: { - type: Boolean, - default: void 0 - }, - placeholder: { - type: String, - default: "" - }, - popperOptions: { - type: definePropType(Object), - default: () => ({}) - }, - modelValue: { - type: definePropType([Date, Array, String, Number]), - default: "" - }, - rangeSeparator: { - type: String, - default: "-" - }, - startPlaceholder: String, - endPlaceholder: String, - defaultValue: { - type: definePropType([Date, Array]) - }, - defaultTime: { - type: definePropType([Date, Array]) - }, - isRange: Boolean, - ...disabledTimeListsProps, - disabledDate: { - type: Function - }, - cellClassName: { - type: Function - }, - shortcuts: { - type: Array, - default: () => [] - }, - arrowControl: Boolean, - tabindex: { - type: definePropType([String, Number]), - default: 0 - }, - validateEvent: { - type: Boolean, - default: true - }, - unlinkPanels: Boolean, - placement: { - type: definePropType(String), - values: Ee, - default: "bottom" - }, - fallbackPlacements: { - type: definePropType(Array), - default: ["bottom", "top", "right", "left"] - }, - ...useEmptyValuesProps, - ...useAriaProps(["ariaLabel"]), - showNow: { - type: Boolean, - default: true - }, - showConfirm: { - type: Boolean, - default: true - }, - showFooter: { - type: Boolean, - default: true - }, - showWeekNumber: Boolean -}); -var timePickerRangeTriggerProps = buildProps({ - id: { - type: definePropType(Array) - }, - name: { - type: definePropType(Array) - }, - modelValue: { - type: definePropType([Array, String]) - }, - startPlaceholder: String, - endPlaceholder: String, - disabled: Boolean -}); -var timePickerRngeTriggerProps = timePickerRangeTriggerProps; - -// node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.mjs -var _hoisted_125 = ["id", "name", "placeholder", "value", "disabled"]; -var _hoisted_210 = ["id", "name", "placeholder", "value", "disabled"]; -var _sfc_main62 = defineComponent({ - ...{ - name: "PickerRangeTrigger", - inheritAttrs: false - }, - __name: "picker-range-trigger", - props: timePickerRangeTriggerProps, - emits: [ - "mouseenter", - "mouseleave", - "click", - "touchstart", - "focus", - "blur", - "startInput", - "endInput", - "startChange", - "endChange" - ], - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { formItem } = useFormItem(); - const { inputId } = useFormItemInputId( - reactive({ id: computed(() => { - var _a; - return (_a = props2.id) == null ? void 0 : _a[0]; - }) }), - { - formItemContext: formItem - } - ); - const attrs = useAttrs2(); - const nsDate = useNamespace("date"); - const nsRange = useNamespace("range"); - const inputRef = ref(); - const endInputRef = ref(); - const { wrapperRef, isFocused } = useFocusController(inputRef, { - disabled: computed(() => props2.disabled) - }); - const handleClick = (evt) => { - emit("click", evt); - }; - const handleMouseEnter = (evt) => { - emit("mouseenter", evt); - }; - const handleMouseLeave = (evt) => { - emit("mouseleave", evt); - }; - const handleTouchStart = (evt) => { - emit("touchstart", evt); - }; - const handleStartInput = (evt) => { - emit("startInput", evt); - }; - const handleEndInput = (evt) => { - emit("endInput", evt); - }; - const handleStartChange = (evt) => { - emit("startChange", evt); - }; - const handleEndChange = (evt) => { - emit("endChange", evt); - }; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a, _b; - (_a = inputRef.value) == null ? void 0 : _a.blur(); - (_b = endInputRef.value) == null ? void 0 : _b.blur(); - }; - __expose({ - focus, - blur - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "wrapperRef", - ref: wrapperRef, - class: normalizeClass([unref(nsDate).is("active", unref(isFocused)), _ctx.$attrs.class]), - style: normalizeStyle( - _ctx.$attrs.style - ), - onClick: handleClick, - onMouseenter: handleMouseEnter, - onMouseleave: handleMouseLeave, - onTouchstartPassive: handleTouchStart - }, - [ - renderSlot(_ctx.$slots, "prefix"), - createBaseVNode("input", mergeProps(unref(attrs), { - id: unref(inputId), - ref_key: "inputRef", - ref: inputRef, - name: _ctx.name && _ctx.name[0], - placeholder: _ctx.startPlaceholder, - value: _ctx.modelValue && _ctx.modelValue[0], - class: unref(nsRange).b("input"), - disabled: _ctx.disabled, - onInput: handleStartInput, - onChange: handleStartChange - }), null, 16, _hoisted_125), - renderSlot(_ctx.$slots, "range-separator"), - createBaseVNode("input", mergeProps(unref(attrs), { - id: _ctx.id && _ctx.id[1], - ref_key: "endInputRef", - ref: endInputRef, - name: _ctx.name && _ctx.name[1], - placeholder: _ctx.endPlaceholder, - value: _ctx.modelValue && _ctx.modelValue[1], - class: unref(nsRange).b("input"), - disabled: _ctx.disabled, - onInput: handleEndInput, - onChange: handleEndChange - }), null, 16, _hoisted_210), - renderSlot(_ctx.$slots, "suffix") - ], - 38 - ); - }; - } -}); -var PickerRangeTrigger = _export_sfc(_sfc_main62, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/common/picker-range-trigger.vue"]]); - -// node_modules/element-plus/es/components/time-picker/src/common/picker.mjs -var _sfc_main63 = defineComponent({ - ...{ - name: "Picker" - }, - __name: "picker", - props: timePickerDefaultProps, - emits: [ - UPDATE_MODEL_EVENT, - CHANGE_EVENT, - "focus", - "blur", - "clear", - "calendar-change", - "panel-change", - "visible-change", - "keydown" - ], - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const attrs = useAttrs(); - const nsDate = useNamespace("date"); - const nsInput = useNamespace("input"); - const nsRange = useNamespace("range"); - const { formItem } = useFormItem(); - const elPopperOptions = inject( - PICKER_POPPER_OPTIONS_INJECTION_KEY, - {} - ); - const emptyValues = useEmptyValues(props2, null); - const refPopper = ref(); - const inputRef = ref(); - const valueOnOpen = ref(null); - let hasJustTabExitedInput = false; - const pickerDisabled = useFormDisabled(); - const commonPicker = useCommonPicker(props2, emit); - const { - parsedValue, - pickerActualVisible, - userInput, - pickerVisible, - pickerOptions, - valueIsEmpty, - emitInput, - onPick, - onSetPickerOption, - onCalendarChange, - onPanelChange - } = commonPicker; - const { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, { - disabled: pickerDisabled, - beforeFocus() { - return props2.readonly; - }, - afterFocus() { - if (!props2.automaticDropdown) - return; - pickerVisible.value = true; - }, - beforeBlur(event) { - var _a; - return !hasJustTabExitedInput && ((_a = refPopper.value) == null ? void 0 : _a.isFocusInsideContent(event)); - }, - afterBlur() { - handleChange(); - pickerVisible.value = false; - hasJustTabExitedInput = false; - props2.validateEvent && (formItem == null ? void 0 : formItem.validate("blur").catch((err) => debugWarn(err))); - } - }); - const hovering = ref(false); - const rangeInputKls = computed(() => [ - nsDate.b("editor"), - nsDate.bm("editor", props2.type), - nsInput.e("wrapper"), - nsDate.is("disabled", pickerDisabled.value), - nsDate.is("active", pickerVisible.value), - nsRange.b("editor"), - pickerSize ? nsRange.bm("editor", pickerSize.value) : "", - attrs.class - ]); - const clearIconKls = computed(() => [ - nsInput.e("icon"), - nsRange.e("close-icon"), - !showClearBtn.value ? nsRange.em("close-icon", "hidden") : "" - ]); - watch(pickerVisible, (val) => { - if (!val) { - userInput.value = null; - nextTick(() => { - emitChange(props2.modelValue); - }); - } else { - nextTick(() => { - if (val) { - valueOnOpen.value = props2.modelValue; - } - }); - } - }); - const emitChange = (val, isClear) => { - if (isClear || !valueEquals(val, valueOnOpen.value)) { - emit(CHANGE_EVENT, val); - isClear && (valueOnOpen.value = val); - props2.validateEvent && (formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err))); - } - }; - const emitKeydown = (e) => { - emit("keydown", e); - }; - const refInput = computed(() => { - if (inputRef.value) { - return Array.from( - inputRef.value.$el.querySelectorAll("input") - ); - } - return []; - }); - const setSelectionRange = (start, end, pos) => { - const _inputs = refInput.value; - if (!_inputs.length) - return; - if (!pos || pos === "min") { - _inputs[0].setSelectionRange(start, end); - _inputs[0].focus(); - } else if (pos === "max") { - _inputs[1].setSelectionRange(start, end); - _inputs[1].focus(); - } - }; - const onBeforeShow = () => { - pickerActualVisible.value = true; - }; - const onShow = () => { - emit("visible-change", true); - }; - const onHide = () => { - pickerActualVisible.value = false; - pickerVisible.value = false; - emit("visible-change", false); - }; - const handleOpen = () => { - pickerVisible.value = true; - }; - const handleClose = () => { - pickerVisible.value = false; - }; - const displayValue = computed(() => { - const formattedValue = formatToString(parsedValue.value); - if (isArray(userInput.value)) { - return [ - userInput.value[0] || formattedValue && formattedValue[0] || "", - userInput.value[1] || formattedValue && formattedValue[1] || "" - ]; - } else if (userInput.value !== null) { - return userInput.value; - } - if (!isTimePicker.value && valueIsEmpty.value) - return ""; - if (!pickerVisible.value && valueIsEmpty.value) - return ""; - if (formattedValue) { - return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value ? formattedValue.join(", ") : formattedValue; - } - return ""; - }); - const isTimeLikePicker = computed(() => props2.type.includes("time")); - const isTimePicker = computed(() => props2.type.startsWith("time")); - const isDatesPicker = computed(() => props2.type === "dates"); - const isMonthsPicker = computed(() => props2.type === "months"); - const isYearsPicker = computed(() => props2.type === "years"); - const triggerIcon = computed( - () => props2.prefixIcon || (isTimeLikePicker.value ? clock_default : calendar_default) - ); - const showClearBtn = computed( - () => props2.clearable && !pickerDisabled.value && !props2.readonly && !valueIsEmpty.value && (hovering.value || isFocused.value) - ); - const onClear = (event) => { - if (props2.readonly || pickerDisabled.value) - return; - if (showClearBtn.value) { - event == null ? void 0 : event.stopPropagation(); - if (pickerOptions.value.handleClear) { - pickerOptions.value.handleClear(); - } else { - emitInput(emptyValues.valueOnClear.value); - } - emitChange(emptyValues.valueOnClear.value, true); - onHide(); - } - emit("clear"); - }; - const onMouseDownInput = async (event) => { - var _a; - if (props2.readonly || pickerDisabled.value) - return; - if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || isFocused.value || !props2.automaticDropdown) { - pickerVisible.value = true; - } - }; - const onMouseEnter = () => { - if (props2.readonly || pickerDisabled.value) - return; - if (!valueIsEmpty.value && props2.clearable) { - hovering.value = true; - } - }; - const onMouseLeave = () => { - hovering.value = false; - }; - const onTouchStartInput = (event) => { - var _a; - if (props2.readonly || pickerDisabled.value) - return; - if (((_a = event.touches[0].target) == null ? void 0 : _a.tagName) !== "INPUT" || isFocused.value || !props2.automaticDropdown) { - pickerVisible.value = true; - } - }; - const isRangeInput = computed(() => { - return props2.type.includes("range"); - }); - const pickerSize = useFormSize(); - const popperEl = computed(() => { - var _a, _b; - return (_b = (_a = unref(refPopper)) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef; - }); - const stophandle = onClickOutside( - inputRef, - (e) => { - const unrefedPopperEl = unref(popperEl); - const inputEl = unrefElement(inputRef); - if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || inputEl && e.composedPath().includes(inputEl)) - return; - pickerVisible.value = false; - } - ); - onBeforeUnmount(() => { - stophandle == null ? void 0 : stophandle(); - }); - const handleChange = () => { - if (userInput.value) { - const value = parseUserInputToDayjs(displayValue.value); - if (value) { - if (isValidValue3(value)) { - emitInput(dayOrDaysToDate(value)); - } - userInput.value = null; - } - } - if (userInput.value === "") { - emitInput(emptyValues.valueOnClear.value); - emitChange(emptyValues.valueOnClear.value, true); - userInput.value = null; - } - }; - const parseUserInputToDayjs = (value) => { - if (!value) - return null; - return pickerOptions.value.parseUserInput(value); - }; - const formatToString = (value) => { - if (!value) - return null; - const res = isArray(value) ? value.map((_2) => _2.format(props2.format)) : value.format(props2.format); - return res; - }; - const isValidValue3 = (value) => { - return pickerOptions.value.isValidValue(value); - }; - const handleKeydownInput = async (event) => { - if (props2.readonly || pickerDisabled.value) - return; - const code = getEventCode(event); - emitKeydown(event); - if (code === EVENT_CODE.esc) { - if (pickerVisible.value === true) { - pickerVisible.value = false; - event.preventDefault(); - event.stopPropagation(); - } - return; - } - if (code === EVENT_CODE.down) { - if (pickerOptions.value.handleFocusPicker) { - event.preventDefault(); - event.stopPropagation(); - } - if (pickerVisible.value === false) { - pickerVisible.value = true; - await nextTick(); - } - if (pickerOptions.value.handleFocusPicker) { - pickerOptions.value.handleFocusPicker(); - return; - } - } - if (code === EVENT_CODE.tab) { - hasJustTabExitedInput = true; - return; - } - if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) { - if (!pickerVisible.value) { - pickerVisible.value = true; - } else if (userInput.value === null || userInput.value === "" || isValidValue3(parseUserInputToDayjs(displayValue.value))) { - handleChange(); - pickerVisible.value = false; - } - event.preventDefault(); - event.stopPropagation(); - return; - } - if (userInput.value) { - event.stopPropagation(); - return; - } - if (pickerOptions.value.handleKeydownInput) { - pickerOptions.value.handleKeydownInput(event); - } - }; - const onUserInput = (e) => { - userInput.value = e; - if (!pickerVisible.value) { - pickerVisible.value = true; - } - }; - const handleStartInput = (event) => { - const target2 = event.target; - if (userInput.value) { - userInput.value = [target2.value, userInput.value[1]]; - } else { - userInput.value = [target2.value, null]; - } - }; - const handleEndInput = (event) => { - const target2 = event.target; - if (userInput.value) { - userInput.value = [userInput.value[0], target2.value]; - } else { - userInput.value = [null, target2.value]; - } - }; - const handleStartChange = () => { - var _a; - const values2 = userInput.value; - const value = parseUserInputToDayjs(values2 && values2[0]); - const parsedVal = unref(parsedValue); - if (value && value.isValid()) { - userInput.value = [ - formatToString(value), - ((_a = displayValue.value) == null ? void 0 : _a[1]) || null - ]; - const newValue = [value, parsedVal && (parsedVal[1] || null)]; - if (isValidValue3(newValue)) { - emitInput(dayOrDaysToDate(newValue)); - userInput.value = null; - } - } - }; - const handleEndChange = () => { - var _a; - const values2 = unref(userInput); - const value = parseUserInputToDayjs(values2 && values2[1]); - const parsedVal = unref(parsedValue); - if (value && value.isValid()) { - userInput.value = [ - ((_a = unref(displayValue)) == null ? void 0 : _a[0]) || null, - formatToString(value) - ]; - const newValue = [parsedVal && parsedVal[0], value]; - if (isValidValue3(newValue)) { - emitInput(dayOrDaysToDate(newValue)); - userInput.value = null; - } - } - }; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.blur(); - }; - provide(PICKER_BASE_INJECTION_KEY, { - props: props2, - emptyValues - }); - provide(ROOT_COMMON_PICKER_INJECTION_KEY, commonPicker); - __expose({ - focus, - blur, - handleOpen, - handleClose, - onPick - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTooltip), mergeProps({ - ref_key: "refPopper", - ref: refPopper, - visible: unref(pickerVisible), - effect: "light", - pure: "", - trigger: "click" - }, _ctx.$attrs, { - role: "dialog", - teleported: "", - transition: `${unref(nsDate).namespace.value}-zoom-in-top`, - "popper-class": [`${unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass], - "popper-style": _ctx.popperStyle, - "popper-options": unref(elPopperOptions), - "fallback-placements": _ctx.fallbackPlacements, - "gpu-acceleration": false, - placement: _ctx.placement, - "stop-popper-mouse-event": false, - "hide-after": 0, - persistent: "", - onBeforeShow, - onShow, - onHide - }), { - default: withCtx(() => [ - !isRangeInput.value ? (openBlock(), createBlock(unref(ElInput), { - key: 0, - id: _ctx.id, - ref_key: "inputRef", - ref: inputRef, - "container-role": "combobox", - "model-value": displayValue.value, - name: _ctx.name, - size: unref(pickerSize), - disabled: unref(pickerDisabled), - placeholder: _ctx.placeholder, - class: normalizeClass([ - unref(nsDate).b("editor"), - unref(nsDate).bm("editor", _ctx.type), - unref(nsDate).is("focus", unref(pickerVisible)), - _ctx.$attrs.class - ]), - style: normalizeStyle(_ctx.$attrs.style), - readonly: !_ctx.editable || _ctx.readonly || isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value || _ctx.type === "week", - "aria-label": _ctx.ariaLabel, - tabindex: _ctx.tabindex, - "validate-event": false, - onInput: onUserInput, - onFocus: unref(handleFocus), - onBlur: unref(handleBlur), - onKeydown: handleKeydownInput, - onChange: handleChange, - onMousedown: onMouseDownInput, - onMouseenter: onMouseEnter, - onMouseleave: onMouseLeave, - onTouchstartPassive: onTouchStartInput, - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])) - }, { - prefix: withCtx(() => [ - triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(nsInput).e("icon")), - onMousedown: withModifiers(onMouseDownInput, ["prevent"]), - onTouchstartPassive: onTouchStartInput - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ]), - suffix: withCtx(() => [ - showClearBtn.value && _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(`${unref(nsInput).e("icon")} clear-icon`), - onMousedown: withModifiers(unref(NOOP), ["prevent"]), - onClick: onClear - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true) - ]), - _: 1 - }, 8, ["id", "model-value", "name", "size", "disabled", "placeholder", "class", "style", "readonly", "aria-label", "tabindex", "onFocus", "onBlur"])) : (openBlock(), createBlock(PickerRangeTrigger, { - key: 1, - id: _ctx.id, - ref_key: "inputRef", - ref: inputRef, - "model-value": displayValue.value, - name: _ctx.name, - disabled: unref(pickerDisabled), - readonly: !_ctx.editable || _ctx.readonly, - "start-placeholder": _ctx.startPlaceholder, - "end-placeholder": _ctx.endPlaceholder, - class: normalizeClass(rangeInputKls.value), - style: normalizeStyle(_ctx.$attrs.style), - "aria-label": _ctx.ariaLabel, - tabindex: _ctx.tabindex, - autocomplete: "off", - role: "combobox", - onClick: onMouseDownInput, - onFocus: unref(handleFocus), - onBlur: unref(handleBlur), - onStartInput: handleStartInput, - onStartChange: handleStartChange, - onEndInput: handleEndInput, - onEndChange: handleEndChange, - onMousedown: onMouseDownInput, - onMouseenter: onMouseEnter, - onMouseleave: onMouseLeave, - onTouchstartPassive: onTouchStartInput, - onKeydown: handleKeydownInput - }, { - prefix: withCtx(() => [ - triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([unref(nsInput).e("icon"), unref(nsRange).e("icon")]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ]), - "range-separator": withCtx(() => [ - renderSlot(_ctx.$slots, "range-separator", {}, () => [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(nsRange).b("separator")) - }, - toDisplayString(_ctx.rangeSeparator), - 3 - ) - ]) - ]), - suffix: withCtx(() => [ - _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(clearIconKls.value), - onMousedown: withModifiers(unref(NOOP), ["prevent"]), - onClick: onClear - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"])) - ]), - content: withCtx(() => [ - renderSlot(_ctx.$slots, "default", { - visible: unref(pickerVisible), - actualVisible: unref(pickerActualVisible), - parsedValue: unref(parsedValue), - format: _ctx.format, - dateFormat: _ctx.dateFormat, - timeFormat: _ctx.timeFormat, - unlinkPanels: _ctx.unlinkPanels, - type: _ctx.type, - defaultValue: _ctx.defaultValue, - showNow: _ctx.showNow, - showConfirm: _ctx.showConfirm, - showFooter: _ctx.showFooter, - showWeekNumber: _ctx.showWeekNumber, - onPick: _cache[1] || (_cache[1] = (...args) => unref(onPick) && unref(onPick)(...args)), - onSelectRange: setSelectionRange, - onSetPickerOption: _cache[2] || (_cache[2] = (...args) => unref(onSetPickerOption) && unref(onSetPickerOption)(...args)), - onCalendarChange: _cache[3] || (_cache[3] = (...args) => unref(onCalendarChange) && unref(onCalendarChange)(...args)), - onClear, - onPanelChange: _cache[4] || (_cache[4] = (...args) => unref(onPanelChange) && unref(onPanelChange)(...args)), - onMousedown: _cache[5] || (_cache[5] = withModifiers(() => { - }, ["stop"])) - }) - ]), - _: 3 - }, 16, ["visible", "transition", "popper-class", "popper-style", "popper-options", "fallback-placements", "placement"]); - }; - } -}); -var CommonPicker = _export_sfc(_sfc_main63, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/common/picker.vue"]]); - -// node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs -var import_dayjs5 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/time-picker/src/props/panel-time-picker.mjs -var panelTimePickerProps = buildProps({ - ...timePanelSharedProps, - datetimeRole: String, - parsedValue: { - type: definePropType(Object) - } -}); - -// node_modules/element-plus/es/components/time-picker/src/composables/use-time-panel.mjs -var useTimePanel = ({ - getAvailableHours, - getAvailableMinutes, - getAvailableSeconds -}) => { - const getAvailableTime = (date4, role, first, compareDate) => { - const availableTimeGetters = { - hour: getAvailableHours, - minute: getAvailableMinutes, - second: getAvailableSeconds - }; - let result2 = date4; - ["hour", "minute", "second"].forEach((type4) => { - if (availableTimeGetters[type4]) { - let availableTimeSlots; - const method5 = availableTimeGetters[type4]; - switch (type4) { - case "minute": { - availableTimeSlots = method5( - result2.hour(), - role, - compareDate - ); - break; - } - case "second": { - availableTimeSlots = method5( - result2.hour(), - result2.minute(), - role, - compareDate - ); - break; - } - default: { - availableTimeSlots = method5( - role, - compareDate - ); - break; - } - } - if ((availableTimeSlots == null ? void 0 : availableTimeSlots.length) && !availableTimeSlots.includes(result2[type4]())) { - const pos = first ? 0 : availableTimeSlots.length - 1; - result2 = result2[type4](availableTimeSlots[pos]); - } - } - }); - return result2; - }; - const timePickerOptions = {}; - const onSetOption = ([key, val]) => { - timePickerOptions[key] = val; - }; - return { - timePickerOptions, - getAvailableTime, - onSetOption - }; -}; - -// node_modules/element-plus/es/components/time-picker/src/composables/use-time-picker.mjs -var makeAvailableArr = (disabledList) => { - const trueOrNumber = (isDisabled, index) => isDisabled || index; - const getNumber = (predicate) => predicate !== true; - return disabledList.map(trueOrNumber).filter(getNumber); -}; -var getTimeLists = (disabledHours, disabledMinutes, disabledSeconds) => { - const getHoursList = (role, compare) => { - return makeList(24, disabledHours && (() => disabledHours == null ? void 0 : disabledHours(role, compare))); - }; - const getMinutesList = (hour, role, compare) => { - return makeList( - 60, - disabledMinutes && (() => disabledMinutes == null ? void 0 : disabledMinutes(hour, role, compare)) - ); - }; - const getSecondsList = (hour, minute, role, compare) => { - return makeList( - 60, - disabledSeconds && (() => disabledSeconds == null ? void 0 : disabledSeconds(hour, minute, role, compare)) - ); - }; - return { - getHoursList, - getMinutesList, - getSecondsList - }; -}; -var buildAvailableTimeSlotGetter = (disabledHours, disabledMinutes, disabledSeconds) => { - const { getHoursList, getMinutesList, getSecondsList } = getTimeLists( - disabledHours, - disabledMinutes, - disabledSeconds - ); - const getAvailableHours = (role, compare) => { - return makeAvailableArr(getHoursList(role, compare)); - }; - const getAvailableMinutes = (hour, role, compare) => { - return makeAvailableArr(getMinutesList(hour, role, compare)); - }; - const getAvailableSeconds = (hour, minute, role, compare) => { - return makeAvailableArr(getSecondsList(hour, minute, role, compare)); - }; - return { - getAvailableHours, - getAvailableMinutes, - getAvailableSeconds - }; -}; -var useOldValue = (props2) => { - const oldValue = ref(props2.parsedValue); - watch( - () => props2.visible, - (val) => { - if (!val) { - oldValue.value = props2.parsedValue; - } - } - ); - return oldValue; -}; - -// node_modules/element-plus/es/components/time-picker/src/props/basic-time-spinner.mjs -var basicTimeSpinnerProps = buildProps({ - role: { - type: String, - required: true - }, - spinnerDate: { - type: definePropType(Object), - required: true - }, - showSeconds: { - type: Boolean, - default: true - }, - arrowControl: Boolean, - amPmMode: { - type: definePropType(String), - default: "" - }, - ...disabledTimeListsProps -}); - -// node_modules/element-plus/es/directives/repeat-click/index.mjs -var REPEAT_INTERVAL = 100; -var REPEAT_DELAY = 600; -var SCOPE5 = "_RepeatClick"; -var vRepeatClick = { - beforeMount(el, binding) { - const value = binding.value; - const { interval = REPEAT_INTERVAL, delay: delay2 = REPEAT_DELAY } = isFunction( - value - ) ? {} : value; - let intervalId; - let delayId; - const handler = () => isFunction(value) ? value() : value.handler(); - const clear = () => { - if (delayId) { - clearTimeout(delayId); - delayId = void 0; - } - if (intervalId) { - clearInterval(intervalId); - intervalId = void 0; - } - }; - const start = (evt) => { - if (evt.button !== 0) - return; - clear(); - handler(); - document.addEventListener("mouseup", clear, { once: true }); - delayId = setTimeout(() => { - intervalId = setInterval(() => { - handler(); - }, interval); - }, delay2); - }; - el[SCOPE5] = { start, clear }; - el.addEventListener("mousedown", start); - }, - unmounted(el) { - if (!el[SCOPE5]) - return; - const { start, clear } = el[SCOPE5]; - if (start) { - el.removeEventListener("mousedown", start); - } - if (clear) { - clear(); - document.removeEventListener("mouseup", clear); - } - el[SCOPE5] = null; - } -}; - -// node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs -var _hoisted_126 = ["onClick"]; -var _hoisted_211 = ["onMouseenter"]; -var _sfc_main64 = defineComponent({ - __name: "basic-time-spinner", - props: basicTimeSpinnerProps, - emits: [CHANGE_EVENT, "select-range", "set-option"], - setup(__props, { emit: __emit }) { - const props2 = __props; - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const { isRange, format: format2 } = pickerBase.props; - const emit = __emit; - const ns = useNamespace("time"); - const { getHoursList, getMinutesList, getSecondsList } = getTimeLists( - props2.disabledHours, - props2.disabledMinutes, - props2.disabledSeconds - ); - let isScrolling = false; - const currentScrollbar = ref(); - const listHoursRef = ref(); - const listMinutesRef = ref(); - const listSecondsRef = ref(); - const listRefsMap = { - hours: listHoursRef, - minutes: listMinutesRef, - seconds: listSecondsRef - }; - const spinnerItems = computed(() => { - return props2.showSeconds ? timeUnits : timeUnits.slice(0, 2); - }); - const timePartials = computed(() => { - const { spinnerDate } = props2; - const hours = spinnerDate.hour(); - const minutes = spinnerDate.minute(); - const seconds = spinnerDate.second(); - return { hours, minutes, seconds }; - }); - const timeList = computed(() => { - const { hours, minutes } = unref(timePartials); - const { role, spinnerDate } = props2; - const compare = !isRange ? spinnerDate : void 0; - return { - hours: getHoursList(role, compare), - minutes: getMinutesList(hours, role, compare), - seconds: getSecondsList(hours, minutes, role, compare) - }; - }); - const arrowControlTimeList = computed(() => { - const { hours, minutes, seconds } = unref(timePartials); - return { - hours: buildTimeList(hours, 23), - minutes: buildTimeList(minutes, 59), - seconds: buildTimeList(seconds, 59) - }; - }); - const debouncedResetScroll = debounce_default((type4) => { - isScrolling = false; - adjustCurrentSpinner(type4); - }, 200); - const getAmPmFlag = (hour) => { - const shouldShowAmPm = !!props2.amPmMode; - if (!shouldShowAmPm) - return ""; - const isCapital = props2.amPmMode === "A"; - let content = hour < 12 ? " am" : " pm"; - if (isCapital) - content = content.toUpperCase(); - return content; - }; - const emitSelectRange = (type4) => { - let range4 = [0, 0]; - const actualFormat = format2 || DEFAULT_FORMATS_TIME; - const hourIndex = actualFormat.indexOf("HH"); - const minuteIndex = actualFormat.indexOf("mm"); - const secondIndex = actualFormat.indexOf("ss"); - switch (type4) { - case "hours": - if (hourIndex !== -1) { - range4 = [hourIndex, hourIndex + 2]; - } - break; - case "minutes": - if (minuteIndex !== -1) { - range4 = [minuteIndex, minuteIndex + 2]; - } - break; - case "seconds": - if (secondIndex !== -1) { - range4 = [secondIndex, secondIndex + 2]; - } - break; - } - const [left, right] = range4; - emit("select-range", left, right); - currentScrollbar.value = type4; - }; - const adjustCurrentSpinner = (type4) => { - adjustSpinner(type4, unref(timePartials)[type4]); - }; - const adjustSpinners = () => { - adjustCurrentSpinner("hours"); - adjustCurrentSpinner("minutes"); - adjustCurrentSpinner("seconds"); - }; - const getScrollbarElement = (el) => el.querySelector(`.${ns.namespace.value}-scrollbar__wrap`); - const adjustSpinner = (type4, value) => { - if (props2.arrowControl) - return; - const scrollbar = unref(listRefsMap[type4]); - if (scrollbar && scrollbar.$el) { - getScrollbarElement(scrollbar.$el).scrollTop = Math.max( - 0, - value * typeItemHeight(type4) - ); - } - }; - const typeItemHeight = (type4) => { - const scrollbar = unref(listRefsMap[type4]); - const listItem = scrollbar == null ? void 0 : scrollbar.$el.querySelector("li"); - if (listItem) { - return Number.parseFloat(getStyle(listItem, "height")) || 0; - } - return 0; - }; - const onIncrement = () => { - scrollDown(1); - }; - const onDecrement = () => { - scrollDown(-1); - }; - const scrollDown = (step2) => { - if (!currentScrollbar.value) { - emitSelectRange("hours"); - } - const label = currentScrollbar.value; - const now2 = unref(timePartials)[label]; - const total2 = currentScrollbar.value === "hours" ? 24 : 60; - const next = findNextUnDisabled(label, now2, step2, total2); - modifyDateField(label, next); - adjustSpinner(label, next); - nextTick(() => emitSelectRange(label)); - }; - const findNextUnDisabled = (type4, now2, step2, total2) => { - let next = (now2 + step2 + total2) % total2; - const list = unref(timeList)[type4]; - while (list[next] && next !== now2) { - next = (next + step2 + total2) % total2; - } - return next; - }; - const modifyDateField = (type4, value) => { - const list = unref(timeList)[type4]; - const isDisabled = list[value]; - if (isDisabled) - return; - const { hours, minutes, seconds } = unref(timePartials); - let changeTo; - switch (type4) { - case "hours": - changeTo = props2.spinnerDate.hour(value).minute(minutes).second(seconds); - break; - case "minutes": - changeTo = props2.spinnerDate.hour(hours).minute(value).second(seconds); - break; - case "seconds": - changeTo = props2.spinnerDate.hour(hours).minute(minutes).second(value); - break; - } - emit(CHANGE_EVENT, changeTo); - }; - const handleClick = (type4, { value, disabled }) => { - if (!disabled) { - modifyDateField(type4, value); - emitSelectRange(type4); - adjustSpinner(type4, value); - } - }; - const handleScroll2 = (type4) => { - const scrollbar = unref(listRefsMap[type4]); - if (!scrollbar) - return; - isScrolling = true; - debouncedResetScroll(type4); - const value = Math.min( - Math.round( - (getScrollbarElement(scrollbar.$el).scrollTop - (scrollBarHeight(type4) * 0.5 - 10) / typeItemHeight(type4) + 3) / typeItemHeight(type4) - ), - type4 === "hours" ? 23 : 59 - ); - modifyDateField(type4, value); - }; - const scrollBarHeight = (type4) => { - return unref(listRefsMap[type4]).$el.offsetHeight; - }; - const bindScrollEvent = () => { - const bindFunction = (type4) => { - const scrollbar = unref(listRefsMap[type4]); - if (scrollbar && scrollbar.$el) { - getScrollbarElement(scrollbar.$el).onscroll = () => { - handleScroll2(type4); - }; - } - }; - bindFunction("hours"); - bindFunction("minutes"); - bindFunction("seconds"); - }; - onMounted(() => { - nextTick(() => { - !props2.arrowControl && bindScrollEvent(); - adjustSpinners(); - if (props2.role === "start") - emitSelectRange("hours"); - }); - }); - const setRef = (scrollbar, type4) => { - listRefsMap[type4].value = scrollbar != null ? scrollbar : void 0; - }; - emit("set-option", [`${props2.role}_scrollDown`, scrollDown]); - emit("set-option", [`${props2.role}_emitSelectRange`, emitSelectRange]); - watch( - () => props2.spinnerDate, - () => { - if (isScrolling) - return; - adjustSpinners(); - } - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b("spinner"), { "has-seconds": _ctx.showSeconds }]) - }, - [ - !_ctx.arrowControl ? (openBlock(true), createElementBlock( - Fragment, - { key: 0 }, - renderList(spinnerItems.value, (item) => { - return openBlock(), createBlock(unref(ElScrollbar), { - key: item, - ref_for: true, - ref: (scrollbar) => setRef(scrollbar, item), - class: normalizeClass(unref(ns).be("spinner", "wrapper")), - "wrap-style": "max-height: inherit;", - "view-class": unref(ns).be("spinner", "list"), - noresize: "", - tag: "ul", - onMouseenter: ($event) => emitSelectRange(item), - onMousemove: ($event) => adjustCurrentSpinner(item) - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(timeList.value[item], (disabled, key) => { - return openBlock(), createElementBlock("li", { - key, - class: normalizeClass([ - unref(ns).be("spinner", "item"), - unref(ns).is("active", key === timePartials.value[item]), - unref(ns).is("disabled", disabled) - ]), - onClick: ($event) => handleClick(item, { value: key, disabled }) - }, [ - item === "hours" ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createTextVNode( - toDisplayString(("0" + (_ctx.amPmMode ? key % 12 || 12 : key)).slice(-2)) + toDisplayString(getAmPmFlag(key)), - 1 - ) - ], - 64 - )) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - createTextVNode( - toDisplayString(("0" + key).slice(-2)), - 1 - ) - ], - 64 - )) - ], 10, _hoisted_126); - }), - 128 - )) - ]), - _: 2 - }, 1032, ["class", "view-class", "onMouseenter", "onMousemove"]); - }), - 128 - )) : createCommentVNode("v-if", true), - _ctx.arrowControl ? (openBlock(true), createElementBlock( - Fragment, - { key: 1 }, - renderList(spinnerItems.value, (item) => { - return openBlock(), createElementBlock("div", { - key: item, - class: normalizeClass([unref(ns).be("spinner", "wrapper"), unref(ns).is("arrow")]), - onMouseenter: ($event) => emitSelectRange(item) - }, [ - withDirectives((openBlock(), createBlock(unref(ElIcon), { - class: normalizeClass(["arrow-up", unref(ns).be("spinner", "arrow")]) - }, { - default: withCtx(() => [ - createVNode(unref(arrow_up_default)) - ]), - _: 1 - }, 8, ["class"])), [ - [unref(vRepeatClick), onDecrement] - ]), - withDirectives((openBlock(), createBlock(unref(ElIcon), { - class: normalizeClass(["arrow-down", unref(ns).be("spinner", "arrow")]) - }, { - default: withCtx(() => [ - createVNode(unref(arrow_down_default)) - ]), - _: 1 - }, 8, ["class"])), [ - [unref(vRepeatClick), onIncrement] - ]), - createBaseVNode( - "ul", - { - class: normalizeClass(unref(ns).be("spinner", "list")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(arrowControlTimeList.value[item], (time, key) => { - return openBlock(), createElementBlock( - "li", - { - key, - class: normalizeClass([ - unref(ns).be("spinner", "item"), - unref(ns).is("active", time === timePartials.value[item]), - unref(ns).is("disabled", timeList.value[item][time]) - ]) - }, - [ - unref(isNumber2)(time) ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - item === "hours" ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createTextVNode( - toDisplayString(("0" + (_ctx.amPmMode ? time % 12 || 12 : time)).slice(-2)) + toDisplayString(getAmPmFlag(time)), - 1 - ) - ], - 64 - )) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - createTextVNode( - toDisplayString(("0" + time).slice(-2)), - 1 - ) - ], - 64 - )) - ], - 64 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }), - 128 - )) - ], - 2 - ) - ], 42, _hoisted_211); - }), - 128 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var TimeSpinner = _export_sfc(_sfc_main64, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue"]]); - -// node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs -var _sfc_main65 = defineComponent({ - __name: "panel-time-pick", - props: panelTimePickerProps, - emits: ["pick", "select-range", "set-picker-option"], - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const { - arrowControl, - disabledHours, - disabledMinutes, - disabledSeconds, - defaultValue - } = pickerBase.props; - const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours, disabledMinutes, disabledSeconds); - const ns = useNamespace("time"); - const { t, lang } = useLocale(); - const selectionRange = ref([0, 2]); - const oldValue = useOldValue(props2); - const transitionName = computed(() => { - return isUndefined2(props2.actualVisible) ? `${ns.namespace.value}-zoom-in-top` : ""; - }); - const showSeconds = computed(() => { - return props2.format.includes("ss"); - }); - const amPmMode = computed(() => { - if (props2.format.includes("A")) - return "A"; - if (props2.format.includes("a")) - return "a"; - return ""; - }); - const isValidValue3 = (_date) => { - const parsedDate = (0, import_dayjs5.default)(_date).locale(lang.value); - const result2 = getRangeAvailableTime(parsedDate); - return parsedDate.isSame(result2); - }; - const handleCancel = () => { - const old = oldValue.value; - emit("pick", old, false); - nextTick(() => { - oldValue.value = old; - }); - }; - const handleConfirm = (visible = false, first = false) => { - if (first) - return; - emit("pick", props2.parsedValue, visible); - }; - const handleChange = (_date) => { - if (!props2.visible) { - return; - } - const result2 = getRangeAvailableTime(_date).millisecond(0); - emit("pick", result2, true); - }; - const setSelectionRange = (start, end) => { - emit("select-range", start, end); - selectionRange.value = [start, end]; - }; - const changeSelectionRange = (step2) => { - const actualFormat = props2.format; - const hourIndex = actualFormat.indexOf("HH"); - const minuteIndex = actualFormat.indexOf("mm"); - const secondIndex = actualFormat.indexOf("ss"); - const list = []; - const mapping = []; - if (hourIndex !== -1) { - list.push(hourIndex); - mapping.push("hours"); - } - if (minuteIndex !== -1) { - list.push(minuteIndex); - mapping.push("minutes"); - } - if (secondIndex !== -1 && showSeconds.value) { - list.push(secondIndex); - mapping.push("seconds"); - } - const index = list.indexOf(selectionRange.value[0]); - const next = (index + step2 + list.length) % list.length; - timePickerOptions["start_emitSelectRange"](mapping[next]); - }; - const handleKeydown = (event) => { - const code = getEventCode(event); - const { left, right, up, down } = EVENT_CODE; - if ([left, right].includes(code)) { - const step2 = code === left ? -1 : 1; - changeSelectionRange(step2); - event.preventDefault(); - return; - } - if ([up, down].includes(code)) { - const step2 = code === up ? -1 : 1; - timePickerOptions["start_scrollDown"](step2); - event.preventDefault(); - return; - } - }; - const { timePickerOptions, onSetOption, getAvailableTime } = useTimePanel({ - getAvailableHours, - getAvailableMinutes, - getAvailableSeconds - }); - const getRangeAvailableTime = (date4) => { - return getAvailableTime(date4, props2.datetimeRole || "", true); - }; - const parseUserInput = (value) => { - if (!value) - return null; - return (0, import_dayjs5.default)(value, props2.format).locale(lang.value); - }; - const getDefaultValue2 = () => { - return (0, import_dayjs5.default)(defaultValue).locale(lang.value); - }; - emit("set-picker-option", ["isValidValue", isValidValue3]); - emit("set-picker-option", ["parseUserInput", parseUserInput]); - emit("set-picker-option", ["handleKeydownInput", handleKeydown]); - emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]); - emit("set-picker-option", ["getDefaultValue", getDefaultValue2]); - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, { name: transitionName.value }, { - default: withCtx(() => [ - _ctx.actualVisible || _ctx.visible ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).b("panel")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).be("panel", "content"), { "has-seconds": showSeconds.value }]) - }, - [ - createVNode(TimeSpinner, { - ref: "spinner", - role: _ctx.datetimeRole || "start", - "arrow-control": unref(arrowControl), - "show-seconds": showSeconds.value, - "am-pm-mode": amPmMode.value, - "spinner-date": _ctx.parsedValue, - "disabled-hours": unref(disabledHours), - "disabled-minutes": unref(disabledMinutes), - "disabled-seconds": unref(disabledSeconds), - onChange: handleChange, - onSetOption: unref(onSetOption), - onSelectRange: setSelectionRange - }, null, 8, ["role", "arrow-control", "show-seconds", "am-pm-mode", "spinner-date", "disabled-hours", "disabled-minutes", "disabled-seconds", "onSetOption"]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).be("panel", "footer")) - }, - [ - createBaseVNode( - "button", - { - type: "button", - class: normalizeClass([unref(ns).be("panel", "btn"), "cancel"]), - onClick: handleCancel - }, - toDisplayString(unref(t)("el.datepicker.cancel")), - 3 - ), - createBaseVNode( - "button", - { - type: "button", - class: normalizeClass([unref(ns).be("panel", "btn"), "confirm"]), - onClick: _cache[0] || (_cache[0] = ($event) => handleConfirm()) - }, - toDisplayString(unref(t)("el.datepicker.confirm")), - 3 - ) - ], - 2 - ) - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 1 - }, 8, ["name"]); - }; - } -}); -var TimePickPanel = _export_sfc(_sfc_main65, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-pick.vue"]]); - -// node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs -var import_dayjs6 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/time-picker/src/props/panel-time-range.mjs -var panelTimeRangeProps = buildProps({ - ...timePanelSharedProps, - parsedValue: { - type: definePropType(Array) - } -}); - -// node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs -var _hoisted_127 = ["disabled"]; -var _sfc_main66 = defineComponent({ - __name: "panel-time-range", - props: panelTimeRangeProps, - emits: ["pick", "select-range", "set-picker-option"], - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const makeSelectRange = (start, end) => { - const result2 = []; - for (let i = start; i <= end; i++) { - result2.push(i); - } - return result2; - }; - const { t, lang } = useLocale(); - const nsTime = useNamespace("time"); - const nsPicker = useNamespace("picker"); - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const { - arrowControl, - disabledHours, - disabledMinutes, - disabledSeconds, - defaultValue - } = pickerBase.props; - const startContainerKls = computed(() => [ - nsTime.be("range-picker", "body"), - nsTime.be("panel", "content"), - nsTime.is("arrow", arrowControl), - showSeconds.value ? "has-seconds" : "" - ]); - const endContainerKls = computed(() => [ - nsTime.be("range-picker", "body"), - nsTime.be("panel", "content"), - nsTime.is("arrow", arrowControl), - showSeconds.value ? "has-seconds" : "" - ]); - const startTime = computed(() => props2.parsedValue[0]); - const endTime = computed(() => props2.parsedValue[1]); - const oldValue = useOldValue(props2); - const handleCancel = () => { - const old = oldValue.value; - emit("pick", old, false); - nextTick(() => { - oldValue.value = old; - }); - }; - const showSeconds = computed(() => { - return props2.format.includes("ss"); - }); - const amPmMode = computed(() => { - if (props2.format.includes("A")) - return "A"; - if (props2.format.includes("a")) - return "a"; - return ""; - }); - const handleConfirm = (visible = false) => { - emit("pick", [startTime.value, endTime.value], visible); - }; - const handleMinChange = (date4) => { - handleChange(date4.millisecond(0), endTime.value); - }; - const handleMaxChange = (date4) => { - handleChange(startTime.value, date4.millisecond(0)); - }; - const isValidValue3 = (_date) => { - const parsedDate = _date.map((_2) => (0, import_dayjs6.default)(_2).locale(lang.value)); - const result2 = getRangeAvailableTime(parsedDate); - return parsedDate[0].isSame(result2[0]) && parsedDate[1].isSame(result2[1]); - }; - const handleChange = (start, end) => { - if (!props2.visible) { - return; - } - emit("pick", [start, end], true); - }; - const btnConfirmDisabled = computed(() => { - return startTime.value > endTime.value; - }); - const selectionRange = ref([0, 2]); - const setMinSelectionRange = (start, end) => { - emit("select-range", start, end, "min"); - selectionRange.value = [start, end]; - }; - const offset3 = computed(() => showSeconds.value ? 11 : 8); - const setMaxSelectionRange = (start, end) => { - emit("select-range", start, end, "max"); - const _offset = unref(offset3); - selectionRange.value = [start + _offset, end + _offset]; - }; - const changeSelectionRange = (step2) => { - const list = showSeconds.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11]; - const mapping = ["hours", "minutes"].concat( - showSeconds.value ? ["seconds"] : [] - ); - const index = list.indexOf(selectionRange.value[0]); - const next = (index + step2 + list.length) % list.length; - const half = list.length / 2; - if (next < half) { - timePickerOptions["start_emitSelectRange"](mapping[next]); - } else { - timePickerOptions["end_emitSelectRange"](mapping[next - half]); - } - }; - const handleKeydown = (event) => { - const code = getEventCode(event); - const { left, right, up, down } = EVENT_CODE; - if ([left, right].includes(code)) { - const step2 = code === left ? -1 : 1; - changeSelectionRange(step2); - event.preventDefault(); - return; - } - if ([up, down].includes(code)) { - const step2 = code === up ? -1 : 1; - const role = selectionRange.value[0] < offset3.value ? "start" : "end"; - timePickerOptions[`${role}_scrollDown`](step2); - event.preventDefault(); - return; - } - }; - const disabledHours_ = (role, compare) => { - const defaultDisable = disabledHours ? disabledHours(role) : []; - const isStart = role === "start"; - const compareDate = compare || (isStart ? endTime.value : startTime.value); - const compareHour = compareDate.hour(); - const nextDisable = isStart ? makeSelectRange(compareHour + 1, 23) : makeSelectRange(0, compareHour - 1); - return union_default(defaultDisable, nextDisable); - }; - const disabledMinutes_ = (hour, role, compare) => { - const defaultDisable = disabledMinutes ? disabledMinutes(hour, role) : []; - const isStart = role === "start"; - const compareDate = compare || (isStart ? endTime.value : startTime.value); - const compareHour = compareDate.hour(); - if (hour !== compareHour) { - return defaultDisable; - } - const compareMinute = compareDate.minute(); - const nextDisable = isStart ? makeSelectRange(compareMinute + 1, 59) : makeSelectRange(0, compareMinute - 1); - return union_default(defaultDisable, nextDisable); - }; - const disabledSeconds_ = (hour, minute, role, compare) => { - const defaultDisable = disabledSeconds ? disabledSeconds(hour, minute, role) : []; - const isStart = role === "start"; - const compareDate = compare || (isStart ? endTime.value : startTime.value); - const compareHour = compareDate.hour(); - const compareMinute = compareDate.minute(); - if (hour !== compareHour || minute !== compareMinute) { - return defaultDisable; - } - const compareSecond = compareDate.second(); - const nextDisable = isStart ? makeSelectRange(compareSecond + 1, 59) : makeSelectRange(0, compareSecond - 1); - return union_default(defaultDisable, nextDisable); - }; - const getRangeAvailableTime = ([start, end]) => { - return [ - getAvailableTime(start, "start", true, end), - getAvailableTime(end, "end", false, start) - ]; - }; - const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter( - disabledHours_, - disabledMinutes_, - disabledSeconds_ - ); - const { - timePickerOptions, - getAvailableTime, - onSetOption - } = useTimePanel({ - getAvailableHours, - getAvailableMinutes, - getAvailableSeconds - }); - const parseUserInput = (days) => { - if (!days) - return null; - if (isArray(days)) { - return days.map((d2) => (0, import_dayjs6.default)(d2, props2.format).locale(lang.value)); - } - return (0, import_dayjs6.default)(days, props2.format).locale(lang.value); - }; - const getDefaultValue2 = () => { - if (isArray(defaultValue)) { - return defaultValue.map((d2) => (0, import_dayjs6.default)(d2).locale(lang.value)); - } - const defaultDay = (0, import_dayjs6.default)(defaultValue).locale(lang.value); - return [defaultDay, defaultDay.add(60, "m")]; - }; - emit("set-picker-option", ["parseUserInput", parseUserInput]); - emit("set-picker-option", ["isValidValue", isValidValue3]); - emit("set-picker-option", ["handleKeydownInput", handleKeydown]); - emit("set-picker-option", ["getDefaultValue", getDefaultValue2]); - emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]); - return (_ctx, _cache) => { - return _ctx.actualVisible ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(nsTime).b("range-picker"), unref(nsPicker).b("panel")]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsTime).be("range-picker", "content")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsTime).be("range-picker", "cell")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsTime).be("range-picker", "header")) - }, - toDisplayString(unref(t)("el.datepicker.startTime")), - 3 - ), - createBaseVNode( - "div", - { - class: normalizeClass(startContainerKls.value) - }, - [ - createVNode(TimeSpinner, { - ref: "minSpinner", - role: "start", - "show-seconds": showSeconds.value, - "am-pm-mode": amPmMode.value, - "arrow-control": unref(arrowControl), - "spinner-date": startTime.value, - "disabled-hours": disabledHours_, - "disabled-minutes": disabledMinutes_, - "disabled-seconds": disabledSeconds_, - onChange: handleMinChange, - onSetOption: unref(onSetOption), - onSelectRange: setMinSelectionRange - }, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"]) - ], - 2 - ) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsTime).be("range-picker", "cell")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsTime).be("range-picker", "header")) - }, - toDisplayString(unref(t)("el.datepicker.endTime")), - 3 - ), - createBaseVNode( - "div", - { - class: normalizeClass(endContainerKls.value) - }, - [ - createVNode(TimeSpinner, { - ref: "maxSpinner", - role: "end", - "show-seconds": showSeconds.value, - "am-pm-mode": amPmMode.value, - "arrow-control": unref(arrowControl), - "spinner-date": endTime.value, - "disabled-hours": disabledHours_, - "disabled-minutes": disabledMinutes_, - "disabled-seconds": disabledSeconds_, - onChange: handleMaxChange, - onSetOption: unref(onSetOption), - onSelectRange: setMaxSelectionRange - }, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"]) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsTime).be("panel", "footer")) - }, - [ - createBaseVNode( - "button", - { - type: "button", - class: normalizeClass([unref(nsTime).be("panel", "btn"), "cancel"]), - onClick: _cache[0] || (_cache[0] = ($event) => handleCancel()) - }, - toDisplayString(unref(t)("el.datepicker.cancel")), - 3 - ), - createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(nsTime).be("panel", "btn"), "confirm"]), - disabled: btnConfirmDisabled.value, - onClick: _cache[1] || (_cache[1] = ($event) => handleConfirm()) - }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_127) - ], - 2 - ) - ], - 2 - )) : createCommentVNode("v-if", true); - }; - } -}); -var TimeRangePanel = _export_sfc(_sfc_main66, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-range.vue"]]); - -// node_modules/element-plus/es/components/time-picker/src/time-picker.mjs -import_dayjs7.default.extend(import_customParseFormat.default); -var TimePicker = defineComponent({ - name: "ElTimePicker", - install: null, - props: { - ...timePickerDefaultProps, - isRange: Boolean - }, - emits: [UPDATE_MODEL_EVENT], - setup(props2, ctx) { - const commonPicker = ref(); - const [type4, Panel] = props2.isRange ? ["timerange", TimeRangePanel] : ["time", TimePickPanel]; - const modelUpdater = (value) => ctx.emit(UPDATE_MODEL_EVENT, value); - provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, props2.popperOptions); - ctx.expose({ - focus: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.focus(); - }, - blur: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.blur(); - }, - handleOpen: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.handleOpen(); - }, - handleClose: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.handleClose(); - } - }); - return () => { - var _a; - const format2 = (_a = props2.format) != null ? _a : DEFAULT_FORMATS_TIME; - return createVNode(CommonPicker, mergeProps(props2, { - "ref": commonPicker, - "type": type4, - "format": format2, - "onUpdate:modelValue": modelUpdater - }), { - default: (props22) => createVNode(Panel, props22, null) - }); - }; - } -}); - -// node_modules/element-plus/es/components/time-picker/index.mjs -var ElTimePicker = withInstall(TimePicker); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-panel.mjs -var import_dayjs18 = __toESM(require_dayjs_min(), 1); -var import_customParseFormat2 = __toESM(require_customParseFormat(), 1); -var import_advancedFormat = __toESM(require_advancedFormat(), 1); -var import_localeData2 = __toESM(require_localeData(), 1); -var import_weekOfYear = __toESM(require_weekOfYear(), 1); -var import_weekYear = __toESM(require_weekYear(), 1); -var import_dayOfYear = __toESM(require_dayOfYear(), 1); -var import_isSameOrAfter = __toESM(require_isSameOrAfter(), 1); -var import_isSameOrBefore = __toESM(require_isSameOrBefore(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/date-picker-panel.mjs -var datePickerPanelProps = buildProps({ - valueFormat: String, - dateFormat: String, - timeFormat: String, - disabled: { - type: Boolean, - default: void 0 - }, - modelValue: { - type: definePropType([Date, Array, String, Number]), - default: "" - }, - defaultValue: { - type: definePropType([Date, Array]) - }, - defaultTime: { - type: definePropType([Date, Array]) - }, - isRange: Boolean, - ...disabledTimeListsProps, - disabledDate: { - type: Function - }, - cellClassName: { - type: Function - }, - shortcuts: { - type: Array, - default: () => [] - }, - arrowControl: Boolean, - unlinkPanels: Boolean, - showNow: { - type: Boolean, - default: true - }, - showConfirm: Boolean, - showFooter: Boolean, - showWeekNumber: Boolean, - type: { - type: definePropType(String), - default: "date" - }, - clearable: { - type: Boolean, - default: true - }, - border: { - type: Boolean, - default: true - }, - editable: { - type: Boolean, - default: true - } -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/constants.mjs -var ROOT_PICKER_INJECTION_KEY = Symbol("rootPickerContextKey"); -var ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY = "ElIsDefaultFormat"; - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs -var import_dayjs12 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/shared.mjs -var selectionModes = [ - "date", - "dates", - "year", - "years", - "month", - "months", - "week", - "range" -]; -var datePickerSharedProps = buildProps({ - cellClassName: { - type: definePropType(Function) - }, - disabledDate: { - type: definePropType(Function) - }, - date: { - type: definePropType(Object), - required: true - }, - minDate: { - type: definePropType(Object) - }, - maxDate: { - type: definePropType(Object) - }, - parsedValue: { - type: definePropType([Object, Array]) - }, - rangeState: { - type: definePropType(Object), - default: () => ({ - endDate: null, - selecting: false - }) - }, - disabled: Boolean -}); -var panelSharedProps = buildProps({ - type: { - type: definePropType(String), - required: true, - values: datePickTypes - }, - dateFormat: String, - timeFormat: String, - showNow: { - type: Boolean, - default: true - }, - showConfirm: Boolean, - showFooter: { - type: Boolean, - default: true - }, - showWeekNumber: Boolean, - border: Boolean, - disabled: Boolean, - editable: { - type: Boolean, - default: true - } -}); -var panelRangeSharedProps = buildProps({ - unlinkPanels: Boolean, - visible: { - type: Boolean, - default: true - }, - showConfirm: Boolean, - showFooter: { - type: Boolean, - default: true - }, - border: Boolean, - disabled: Boolean, - parsedValue: { - type: definePropType(Array) - } -}); -var selectionModeWithDefault = (mode) => { - return { - type: String, - values: selectionModes, - default: mode - }; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-pick.mjs -var panelDatePickProps = buildProps({ - ...panelSharedProps, - parsedValue: { - type: definePropType([Object, Array]) - }, - visible: { - type: Boolean, - default: true - }, - format: { - type: String, - default: "" - } -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/utils.mjs -var import_dayjs8 = __toESM(require_dayjs_min(), 1); -var isValidRange2 = (range4) => { - if (!isArray(range4)) - return false; - const [left, right] = range4; - return import_dayjs8.default.isDayjs(left) && import_dayjs8.default.isDayjs(right) && (0, import_dayjs8.default)(left).isValid() && (0, import_dayjs8.default)(right).isValid() && left.isSameOrBefore(right); -}; -var getDefaultValue = (defaultValue, { lang, step: step2 = 1, unit: unit4, unlinkPanels }) => { - let start; - if (isArray(defaultValue)) { - let [left, right] = defaultValue.map((d2) => (0, import_dayjs8.default)(d2).locale(lang)); - if (!unlinkPanels) { - right = left.add(step2, unit4); - } - return [left, right]; - } else if (defaultValue) { - start = (0, import_dayjs8.default)(defaultValue); - } else { - start = (0, import_dayjs8.default)(); - } - start = start.locale(lang); - return [start, start.add(step2, unit4)]; -}; -var buildPickerTable = (dimension, rows, { - columnIndexOffset, - startDate, - nextEndDate, - now: now2, - unit: unit4, - relativeDateGetter, - setCellMetadata, - setRowMetadata -}) => { - for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) { - const row = rows[rowIndex]; - for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) { - let cell = row[columnIndex + columnIndexOffset]; - if (!cell) { - cell = { - row: rowIndex, - column: columnIndex, - type: "normal", - inRange: false, - start: false, - end: false - }; - } - const index = rowIndex * dimension.column + columnIndex; - const nextStartDate = relativeDateGetter(index); - cell.dayjs = nextStartDate; - cell.date = nextStartDate.toDate(); - cell.timestamp = nextStartDate.valueOf(); - cell.type = "normal"; - cell.inRange = !!(startDate && nextStartDate.isSameOrAfter(startDate, unit4) && nextEndDate && nextStartDate.isSameOrBefore(nextEndDate, unit4)) || !!(startDate && nextStartDate.isSameOrBefore(startDate, unit4) && nextEndDate && nextStartDate.isSameOrAfter(nextEndDate, unit4)); - if (startDate == null ? void 0 : startDate.isSameOrAfter(nextEndDate)) { - cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit4); - cell.end = startDate && nextStartDate.isSame(startDate, unit4); - } else { - cell.start = !!startDate && nextStartDate.isSame(startDate, unit4); - cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit4); - } - const isToday = nextStartDate.isSame(now2, unit4); - if (isToday) { - cell.type = "today"; - } - setCellMetadata == null ? void 0 : setCellMetadata(cell, { rowIndex, columnIndex }); - row[columnIndex + columnIndexOffset] = cell; - } - setRowMetadata == null ? void 0 : setRowMetadata(row); - } -}; -var datesInMonth = (date4, year, month, lang) => { - const firstDay = (0, import_dayjs8.default)().locale(lang).startOf("month").month(month).year(year).hour(date4.hour()).minute(date4.minute()).second(date4.second()); - const numOfDays = firstDay.daysInMonth(); - return rangeArr(numOfDays).map((n) => firstDay.add(n, "day").toDate()); -}; -var getValidDateOfMonth = (date4, year, month, lang, disabledDate) => { - const _value = (0, import_dayjs8.default)().year(year).month(month).startOf("month").hour(date4.hour()).minute(date4.minute()).second(date4.second()); - const _date = datesInMonth(date4, year, month, lang).find((date22) => { - return !(disabledDate == null ? void 0 : disabledDate(date22)); - }); - if (_date) { - return (0, import_dayjs8.default)(_date).locale(lang); - } - return _value.locale(lang); -}; -var getValidDateOfYear = (value, lang, disabledDate) => { - const year = value.year(); - if (!(disabledDate == null ? void 0 : disabledDate(value.toDate()))) { - return value.locale(lang); - } - const month = value.month(); - if (!datesInMonth(value, year, month, lang).every(disabledDate)) { - return getValidDateOfMonth(value, year, month, lang, disabledDate); - } - for (let i = 0; i < 12; i++) { - if (!datesInMonth(value, year, i, lang).every(disabledDate)) { - return getValidDateOfMonth(value, year, i, lang, disabledDate); - } - } - return value; -}; -var correctlyParseUserInput = (value, format2, lang, defaultFormat) => { - if (isArray(value)) { - return value.map( - (v2) => correctlyParseUserInput(v2, format2, lang, defaultFormat) - ); - } - if (isString(value)) { - const dayjsValue = (defaultFormat == null ? void 0 : defaultFormat.value) ? (0, import_dayjs8.default)(value) : (0, import_dayjs8.default)(value, format2); - if (!dayjsValue.isValid()) { - return dayjsValue; - } - } - return (0, import_dayjs8.default)(value, format2).locale(lang); -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/props/basic-date-table.mjs -var basicDateTableProps = buildProps({ - ...datePickerSharedProps, - showWeekNumber: Boolean, - selectionMode: selectionModeWithDefault("date") -}); -var basicDateTableEmits = ["changerange", "pick", "select"]; - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs -var import_dayjs9 = __toESM(require_dayjs_min(), 1); -var isNormalDay = (type4 = "") => { - return ["normal", "today"].includes(type4); -}; -var useBasicDateTable = (props2, emit) => { - const { lang } = useLocale(); - const tbodyRef = ref(); - const currentCellRef = ref(); - const lastRow = ref(); - const lastColumn = ref(); - const tableRows = ref([[], [], [], [], [], []]); - let focusWithClick = false; - const firstDayOfWeek = props2.date.$locale().weekStart || 7; - const WEEKS_CONSTANT = props2.date.locale("en").localeData().weekdaysShort().map((_2) => _2.toLowerCase()); - const offsetDay = computed(() => { - return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek; - }); - const startDate = computed(() => { - const startDayOfMonth = props2.date.startOf("month"); - return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day"); - }); - const WEEKS = computed(() => { - return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice( - firstDayOfWeek, - firstDayOfWeek + 7 - ); - }); - const hasCurrent = computed(() => { - return flatten_default(unref(rows)).some((row) => { - return row.isCurrent; - }); - }); - const days = computed(() => { - const startOfMonth = props2.date.startOf("month"); - const startOfMonthDay = startOfMonth.day() || 7; - const dateCountOfMonth = startOfMonth.daysInMonth(); - const dateCountOfLastMonth = startOfMonth.subtract(1, "month").daysInMonth(); - return { - startOfMonthDay, - dateCountOfMonth, - dateCountOfLastMonth - }; - }); - const selectedDate = computed(() => { - return props2.selectionMode === "dates" ? castArray2(props2.parsedValue) : []; - }); - const setDateText = (cell, { count, rowIndex, columnIndex }) => { - const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days); - const offset3 = unref(offsetDay); - if (rowIndex >= 0 && rowIndex <= 1) { - const numberOfDaysFromPreviousMonth = startOfMonthDay + offset3 < 0 ? 7 + startOfMonthDay + offset3 : startOfMonthDay + offset3; - if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) { - cell.text = count; - return true; - } else { - cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7; - cell.type = "prev-month"; - } - } else { - if (count <= dateCountOfMonth) { - cell.text = count; - } else { - cell.text = count - dateCountOfMonth; - cell.type = "next-month"; - } - return true; - } - return false; - }; - const setCellMetadata = (cell, { columnIndex, rowIndex }, count) => { - const { disabledDate, cellClassName } = props2; - const _selectedDate = unref(selectedDate); - const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex }); - const cellDate = cell.dayjs.toDate(); - cell.selected = _selectedDate.find((d2) => d2.isSame(cell.dayjs, "day")); - cell.isSelected = !!cell.selected; - cell.isCurrent = isCurrent(cell); - cell.disabled = disabledDate == null ? void 0 : disabledDate(cellDate); - cell.customClass = cellClassName == null ? void 0 : cellClassName(cellDate); - return shouldIncrement; - }; - const setRowMetadata = (row) => { - if (props2.selectionMode === "week") { - const [start, end] = props2.showWeekNumber ? [1, 7] : [0, 6]; - const isActive = isWeekActive(row[start + 1]); - row[start].inRange = isActive; - row[start].start = isActive; - row[end].inRange = isActive; - row[end].end = isActive; - } - }; - const rows = computed(() => { - const { minDate, maxDate, rangeState, showWeekNumber } = props2; - const offset3 = unref(offsetDay); - const rows_ = unref(tableRows); - const dateUnit = "day"; - let count = 1; - buildPickerTable({ row: 6, column: 7 }, rows_, { - startDate: minDate, - columnIndexOffset: showWeekNumber ? 1 : 0, - nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null, - now: (0, import_dayjs9.default)().locale(unref(lang)).startOf(dateUnit), - unit: dateUnit, - relativeDateGetter: (idx) => unref(startDate).add(idx - offset3, dateUnit), - setCellMetadata: (...args) => { - if (setCellMetadata(...args, count)) { - count += 1; - } - }, - setRowMetadata - }); - if (showWeekNumber) { - for (let rowIndex = 0; rowIndex < 6; rowIndex++) { - if (rows_[rowIndex][1].dayjs) { - rows_[rowIndex][0] = { - type: "week", - text: rows_[rowIndex][1].dayjs.week() - }; - } - } - } - return rows_; - }); - watch( - () => props2.date, - async () => { - var _a; - if ((_a = unref(tbodyRef)) == null ? void 0 : _a.contains(document.activeElement)) { - await nextTick(); - await focus(); - } - } - ); - const focus = async () => { - var _a; - return (_a = unref(currentCellRef)) == null ? void 0 : _a.focus(); - }; - const isCurrent = (cell) => { - return props2.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props2.parsedValue); - }; - const cellMatchesDate = (cell, date4) => { - if (!date4) - return false; - return (0, import_dayjs9.default)(date4).locale(unref(lang)).isSame(props2.date.date(Number(cell.text)), "day"); - }; - const getDateOfCell = (row, column2) => { - const offsetFromStart = row * 7 + (column2 - (props2.showWeekNumber ? 1 : 0)) - unref(offsetDay); - return unref(startDate).add(offsetFromStart, "day"); - }; - const handleMouseMove = (event) => { - var _a; - if (!props2.rangeState.selecting) - return; - let target2 = event.target; - if (target2.tagName === "SPAN") { - target2 = (_a = target2.parentNode) == null ? void 0 : _a.parentNode; - } - if (target2.tagName === "DIV") { - target2 = target2.parentNode; - } - if (target2.tagName !== "TD") - return; - const row = target2.parentNode.rowIndex - 1; - const column2 = target2.cellIndex; - if (unref(rows)[row][column2].disabled) - return; - if (row !== unref(lastRow) || column2 !== unref(lastColumn)) { - lastRow.value = row; - lastColumn.value = column2; - emit("changerange", { - selecting: true, - endDate: getDateOfCell(row, column2) - }); - } - }; - const isSelectedCell = (cell) => { - return !unref(hasCurrent) && (cell == null ? void 0 : cell.text) === 1 && isNormalDay(cell.type) || cell.isCurrent; - }; - const handleFocus = (event) => { - if (focusWithClick || unref(hasCurrent) || props2.selectionMode !== "date") - return; - handlePickDate(event, true); - }; - const handleMouseDown = (event) => { - const target2 = event.target.closest("td"); - if (!target2) - return; - focusWithClick = true; - }; - const handleMouseUp = (event) => { - const target2 = event.target.closest("td"); - if (!target2) - return; - focusWithClick = false; - }; - const handleRangePick = (newDate) => { - if (!props2.rangeState.selecting || !props2.minDate) { - emit("pick", { minDate: newDate, maxDate: null }); - emit("select", true); - } else { - if (newDate >= props2.minDate) { - emit("pick", { minDate: props2.minDate, maxDate: newDate }); - } else { - emit("pick", { minDate: newDate, maxDate: props2.minDate }); - } - emit("select", false); - } - }; - const handleWeekPick = (newDate) => { - const weekNumber = newDate.week(); - const value = `${newDate.year()}w${weekNumber}`; - emit("pick", { - year: newDate.year(), - week: weekNumber, - value, - date: newDate.startOf("week") - }); - }; - const handleDatesPick = (newDate, selected) => { - const newValue = selected ? castArray2(props2.parsedValue).filter( - (d2) => (d2 == null ? void 0 : d2.valueOf()) !== newDate.valueOf() - ) : castArray2(props2.parsedValue).concat([newDate]); - emit("pick", newValue); - }; - const handlePickDate = (event, isKeyboardMovement = false) => { - if (props2.disabled) - return; - const target2 = event.target.closest("td"); - if (!target2) - return; - const row = target2.parentNode.rowIndex - 1; - const column2 = target2.cellIndex; - const cell = unref(rows)[row][column2]; - if (cell.disabled || cell.type === "week") - return; - const newDate = getDateOfCell(row, column2); - switch (props2.selectionMode) { - case "range": { - handleRangePick(newDate); - break; - } - case "date": { - emit("pick", newDate, isKeyboardMovement); - break; - } - case "week": { - handleWeekPick(newDate); - break; - } - case "dates": { - handleDatesPick(newDate, !!cell.selected); - break; - } - } - }; - const isWeekActive = (cell) => { - if (props2.selectionMode !== "week") - return false; - let newDate = props2.date.startOf("day"); - if (cell.type === "prev-month") { - newDate = newDate.subtract(1, "month"); - } - if (cell.type === "next-month") { - newDate = newDate.add(1, "month"); - } - newDate = newDate.date(Number.parseInt(cell.text, 10)); - if (props2.parsedValue && !isArray(props2.parsedValue)) { - const dayOffset = (props2.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1; - const weekDate = props2.parsedValue.subtract(dayOffset, "day"); - return weekDate.isSame(newDate, "day"); - } - return false; - }; - return { - WEEKS, - rows, - tbodyRef, - currentCellRef, - focus, - isCurrent, - isWeekActive, - isSelectedCell, - handlePickDate, - handleMouseUp, - handleMouseDown, - handleMouseMove, - handleFocus - }; -}; -var useBasicDateTableDOM = (props2, { - isCurrent, - isWeekActive -}) => { - const ns = useNamespace("date-table"); - const { t } = useLocale(); - const tableKls = computed(() => [ - ns.b(), - ns.is("week-mode", props2.selectionMode === "week" && !props2.disabled) - ]); - const tableLabel = computed(() => t("el.datepicker.dateTablePrompt")); - const getCellClasses = (cell) => { - const classes = []; - if (isNormalDay(cell.type) && !cell.disabled) { - classes.push("available"); - if (cell.type === "today") { - classes.push("today"); - } - } else { - classes.push(cell.type); - } - if (isCurrent(cell)) { - classes.push("current"); - } - if (cell.inRange && (isNormalDay(cell.type) || props2.selectionMode === "week")) { - classes.push("in-range"); - if (cell.start) { - classes.push("start-date"); - } - if (cell.end) { - classes.push("end-date"); - } - } - if (cell.disabled || props2.disabled) { - classes.push("disabled"); - } - if (cell.selected) { - classes.push("selected"); - } - if (cell.customClass) { - classes.push(cell.customClass); - } - return classes.join(" "); - }; - const getRowKls = (cell) => [ - ns.e("row"), - { current: isWeekActive(cell) } - ]; - return { - tableKls, - tableLabel, - weekHeaderClass: ns.e("week-header"), - getCellClasses, - getRowKls, - t - }; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/props/basic-cell.mjs -var basicCellProps = buildProps({ - cell: { - type: definePropType(Object) - } -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-cell-render.mjs -var ElDatePickerCell = defineComponent({ - name: "ElDatePickerCell", - props: basicCellProps, - setup(props2) { - const ns = useNamespace("date-table-cell"); - const { - slots - } = inject(ROOT_PICKER_INJECTION_KEY); - return () => { - const { - cell - } = props2; - return renderSlot(slots, "default", { - ...cell - }, () => { - var _a; - return [createVNode("div", { - "class": ns.b() - }, [createVNode("span", { - "class": ns.e("text") - }, [(_a = cell == null ? void 0 : cell.renderText) != null ? _a : cell == null ? void 0 : cell.text])])]; - }); - }; - } -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.mjs -var _hoisted_128 = ["aria-label"]; -var _hoisted_212 = ["aria-label"]; -var _hoisted_34 = ["aria-current", "aria-selected", "tabindex", "aria-disabled"]; -var _sfc_main67 = defineComponent({ - __name: "basic-date-table", - props: basicDateTableProps, - emits: basicDateTableEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { - WEEKS, - rows, - tbodyRef, - currentCellRef, - focus, - isCurrent, - isWeekActive, - isSelectedCell, - handlePickDate, - handleMouseUp, - handleMouseDown, - handleMouseMove, - handleFocus - } = useBasicDateTable(props2, emit); - const { tableLabel, tableKls, getCellClasses, getRowKls, weekHeaderClass, t } = useBasicDateTableDOM(props2, { - isCurrent, - isWeekActive - }); - let isUnmounting = false; - onBeforeUnmount(() => { - isUnmounting = true; - }); - __expose({ - focus - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("table", { - "aria-label": unref(tableLabel), - class: normalizeClass(unref(tableKls)), - cellspacing: "0", - cellpadding: "0", - role: "grid", - onClick: _cache[1] || (_cache[1] = (...args) => unref(handlePickDate) && unref(handlePickDate)(...args)), - onMousemove: _cache[2] || (_cache[2] = (...args) => unref(handleMouseMove) && unref(handleMouseMove)(...args)), - onMousedown: _cache[3] || (_cache[3] = (...args) => unref(handleMouseDown) && unref(handleMouseDown)(...args)), - onMouseup: _cache[4] || (_cache[4] = (...args) => unref(handleMouseUp) && unref(handleMouseUp)(...args)) - }, [ - createBaseVNode( - "tbody", - { - ref_key: "tbodyRef", - ref: tbodyRef - }, - [ - createBaseVNode("tr", null, [ - _ctx.showWeekNumber ? (openBlock(), createElementBlock( - "th", - { - key: 0, - scope: "col", - class: normalizeClass(unref(weekHeaderClass)) - }, - null, - 2 - )) : createCommentVNode("v-if", true), - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(WEEKS), (week, key) => { - return openBlock(), createElementBlock("th", { - key, - "aria-label": unref(t)("el.datepicker.weeksFull." + week), - scope: "col" - }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_212); - }), - 128 - )) - ]), - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(rows), (row, rowKey2) => { - return openBlock(), createElementBlock( - "tr", - { - key: rowKey2, - class: normalizeClass(unref(getRowKls)(_ctx.showWeekNumber ? row[2] : row[1])) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(row, (cell, columnKey) => { - return openBlock(), createElementBlock("td", { - key: `${rowKey2}.${columnKey}`, - ref_for: true, - ref: (el) => !unref(isUnmounting) && unref(isSelectedCell)(cell) && (currentCellRef.value = el), - class: normalizeClass(unref(getCellClasses)(cell)), - "aria-current": cell.isCurrent ? "date" : void 0, - "aria-selected": cell.isCurrent, - tabindex: _ctx.disabled ? void 0 : unref(isSelectedCell)(cell) ? 0 : -1, - "aria-disabled": _ctx.disabled, - onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)) - }, [ - createVNode(unref(ElDatePickerCell), { cell }, null, 8, ["cell"]) - ], 42, _hoisted_34); - }), - 128 - )) - ], - 2 - ); - }), - 128 - )) - ], - 512 - ) - ], 42, _hoisted_128); - }; - } -}); -var DateTable2 = _export_sfc(_sfc_main67, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/basic-date-table.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.mjs -var import_dayjs10 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/basic-month-table.mjs -var basicMonthTableProps = buildProps({ - ...datePickerSharedProps, - selectionMode: selectionModeWithDefault("month") -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.mjs -var _hoisted_129 = ["aria-label"]; -var _hoisted_213 = ["aria-selected", "aria-label", "tabindex", "onKeydown"]; -var _sfc_main68 = defineComponent({ - __name: "basic-month-table", - props: basicMonthTableProps, - emits: ["changerange", "pick", "select"], - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("month-table"); - const { t, lang } = useLocale(); - const tbodyRef = ref(); - const currentCellRef = ref(); - const months = ref( - props2.date.locale("en").localeData().monthsShort().map((_2) => _2.toLowerCase()) - ); - const tableRows = ref([[], [], []]); - const lastRow = ref(); - const lastColumn = ref(); - const rows = computed(() => { - var _a, _b, _c; - const rows2 = tableRows.value; - const now2 = (0, import_dayjs10.default)().locale(lang.value).startOf("month"); - for (let i = 0; i < 3; i++) { - const row = rows2[i]; - for (let j = 0; j < 4; j++) { - const cell = row[j] || (row[j] = { - row: i, - column: j, - type: "normal", - inRange: false, - start: false, - end: false, - text: -1, - disabled: false, - isSelected: false, - customClass: void 0, - date: void 0, - dayjs: void 0, - isCurrent: void 0, - selected: void 0, - renderText: void 0, - timestamp: void 0 - }); - cell.type = "normal"; - const index = i * 4 + j; - const calTime = props2.date.startOf("year").month(index); - const calEndDate = props2.rangeState.endDate || props2.maxDate || props2.rangeState.selecting && props2.minDate || null; - cell.inRange = !!(props2.minDate && calTime.isSameOrAfter(props2.minDate, "month") && calEndDate && calTime.isSameOrBefore(calEndDate, "month")) || !!(props2.minDate && calTime.isSameOrBefore(props2.minDate, "month") && calEndDate && calTime.isSameOrAfter(calEndDate, "month")); - if ((_a = props2.minDate) == null ? void 0 : _a.isSameOrAfter(calEndDate)) { - cell.start = !!(calEndDate && calTime.isSame(calEndDate, "month")); - cell.end = props2.minDate && calTime.isSame(props2.minDate, "month"); - } else { - cell.start = !!(props2.minDate && calTime.isSame(props2.minDate, "month")); - cell.end = !!(calEndDate && calTime.isSame(calEndDate, "month")); - } - const isToday = now2.isSame(calTime); - if (isToday) { - cell.type = "today"; - } - const cellDate = calTime.toDate(); - cell.text = index; - cell.disabled = ((_b = props2.disabledDate) == null ? void 0 : _b.call(props2, cellDate)) || false; - cell.date = cellDate; - cell.customClass = (_c = props2.cellClassName) == null ? void 0 : _c.call(props2, cellDate); - cell.dayjs = calTime; - cell.timestamp = calTime.valueOf(); - cell.isSelected = isSelectedCell(cell); - } - } - return rows2; - }); - const focus = () => { - var _a; - (_a = currentCellRef.value) == null ? void 0 : _a.focus(); - }; - const getCellStyle = (cell) => { - const style = {}; - const year = props2.date.year(); - const today = /* @__PURE__ */ new Date(); - const month = cell.text; - style.disabled = props2.disabled || (props2.disabledDate ? datesInMonth(props2.date, year, month, lang.value).every( - props2.disabledDate - ) : false); - style.current = castArray2(props2.parsedValue).some( - (date4) => import_dayjs10.default.isDayjs(date4) && date4.year() === year && date4.month() === month - ); - style.today = today.getFullYear() === year && today.getMonth() === month; - if (cell.customClass) { - style[cell.customClass] = true; - } - if (cell.inRange) { - style["in-range"] = true; - if (cell.start) { - style["start-date"] = true; - } - if (cell.end) { - style["end-date"] = true; - } - } - return style; - }; - const isSelectedCell = (cell) => { - const year = props2.date.year(); - const month = cell.text; - return castArray2(props2.date).some( - (date4) => date4.year() === year && date4.month() === month - ); - }; - const handleMouseMove = (event) => { - var _a; - if (!props2.rangeState.selecting) - return; - let target2 = event.target; - if (target2.tagName === "SPAN") { - target2 = (_a = target2.parentNode) == null ? void 0 : _a.parentNode; - } - if (target2.tagName === "DIV") { - target2 = target2.parentNode; - } - if (target2.tagName !== "TD") - return; - const row = target2.parentNode.rowIndex; - const column2 = target2.cellIndex; - if (rows.value[row][column2].disabled) - return; - if (row !== lastRow.value || column2 !== lastColumn.value) { - lastRow.value = row; - lastColumn.value = column2; - emit("changerange", { - selecting: true, - endDate: props2.date.startOf("year").month(row * 4 + column2) - }); - } - }; - const handleMonthTableClick = (event) => { - var _a; - if (props2.disabled) - return; - const target2 = (_a = event.target) == null ? void 0 : _a.closest( - "td" - ); - if ((target2 == null ? void 0 : target2.tagName) !== "TD") - return; - if (hasClass(target2, "disabled")) - return; - const column2 = target2.cellIndex; - const row = target2.parentNode.rowIndex; - const month = row * 4 + column2; - const newDate = props2.date.startOf("year").month(month); - if (props2.selectionMode === "months") { - if (event.type === "keydown") { - emit("pick", castArray2(props2.parsedValue), false); - return; - } - const newMonth = getValidDateOfMonth( - props2.date, - props2.date.year(), - month, - lang.value, - props2.disabledDate - ); - const newValue = hasClass(target2, "current") ? castArray2(props2.parsedValue).filter( - (d2) => (d2 == null ? void 0 : d2.year()) !== newMonth.year() || (d2 == null ? void 0 : d2.month()) !== newMonth.month() - ) : castArray2(props2.parsedValue).concat([(0, import_dayjs10.default)(newMonth)]); - emit("pick", newValue); - } else if (props2.selectionMode === "range") { - if (!props2.rangeState.selecting) { - emit("pick", { minDate: newDate, maxDate: null }); - emit("select", true); - } else { - if (props2.minDate && newDate >= props2.minDate) { - emit("pick", { minDate: props2.minDate, maxDate: newDate }); - } else { - emit("pick", { minDate: newDate, maxDate: props2.minDate }); - } - emit("select", false); - } - } else { - emit("pick", month); - } - }; - watch( - () => props2.date, - async () => { - var _a, _b; - if ((_a = tbodyRef.value) == null ? void 0 : _a.contains(document.activeElement)) { - await nextTick(); - (_b = currentCellRef.value) == null ? void 0 : _b.focus(); - } - } - ); - __expose({ - focus - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("table", { - role: "grid", - "aria-label": unref(t)("el.datepicker.monthTablePrompt"), - class: normalizeClass(unref(ns).b()), - onClick: handleMonthTableClick, - onMousemove: handleMouseMove - }, [ - createBaseVNode( - "tbody", - { - ref_key: "tbodyRef", - ref: tbodyRef - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(rows.value, (row, key) => { - return openBlock(), createElementBlock("tr", { key }, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(row, (cell, key_) => { - return openBlock(), createElementBlock("td", { - key: key_, - ref_for: true, - ref: (el) => cell.isSelected && (currentCellRef.value = el), - class: normalizeClass(getCellStyle(cell)), - "aria-selected": !!cell.isSelected, - "aria-label": unref(t)(`el.datepicker.month${+cell.text + 1}`), - tabindex: cell.isSelected ? 0 : -1, - onKeydown: [ - withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["space"]), - withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["enter"]) - ] - }, [ - createVNode(unref(ElDatePickerCell), { - cell: { - ...cell, - renderText: unref(t)("el.datepicker.months." + months.value[cell.text]) - } - }, null, 8, ["cell"]) - ], 42, _hoisted_213); - }), - 128 - )) - ]); - }), - 128 - )) - ], - 512 - ) - ], 42, _hoisted_129); - }; - } -}); -var MonthTable = _export_sfc(_sfc_main68, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/basic-month-table.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.mjs -var import_dayjs11 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/basic-year-table.mjs -var basicYearTableProps = buildProps({ - ...datePickerSharedProps, - selectionMode: selectionModeWithDefault("year") -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.mjs -var _hoisted_130 = ["aria-label"]; -var _hoisted_214 = ["aria-selected", "aria-label", "tabindex", "onKeydown"]; -var _sfc_main69 = defineComponent({ - __name: "basic-year-table", - props: basicYearTableProps, - emits: ["changerange", "pick", "select"], - setup(__props, { expose: __expose, emit: __emit }) { - const datesInYear = (year, lang2) => { - const firstDay = (0, import_dayjs11.default)(String(year)).locale(lang2).startOf("year"); - const lastDay = firstDay.endOf("year"); - const numOfDays = lastDay.dayOfYear(); - return rangeArr(numOfDays).map((n) => firstDay.add(n, "day").toDate()); - }; - const props2 = __props; - const emit = __emit; - const ns = useNamespace("year-table"); - const { t, lang } = useLocale(); - const tbodyRef = ref(); - const currentCellRef = ref(); - const startYear = computed(() => { - return Math.floor(props2.date.year() / 10) * 10; - }); - const tableRows = ref([[], [], []]); - const lastRow = ref(); - const lastColumn = ref(); - const rows = computed(() => { - var _a, _b, _c; - const rows2 = tableRows.value; - const now2 = (0, import_dayjs11.default)().locale(lang.value).startOf("year"); - for (let i = 0; i < 3; i++) { - const row = rows2[i]; - for (let j = 0; j < 4; j++) { - if (i * 4 + j >= 10) { - break; - } - let cell = row[j]; - if (!cell) { - cell = { - row: i, - column: j, - type: "normal", - inRange: false, - start: false, - end: false, - text: -1, - disabled: false, - isSelected: false, - customClass: void 0, - date: void 0, - dayjs: void 0, - isCurrent: void 0, - selected: void 0, - renderText: void 0, - timestamp: void 0 - }; - } - cell.type = "normal"; - const index = i * 4 + j + startYear.value; - const calTime = (0, import_dayjs11.default)().year(index); - const calEndDate = props2.rangeState.endDate || props2.maxDate || props2.rangeState.selecting && props2.minDate || null; - cell.inRange = !!(props2.minDate && calTime.isSameOrAfter(props2.minDate, "year") && calEndDate && calTime.isSameOrBefore(calEndDate, "year")) || !!(props2.minDate && calTime.isSameOrBefore(props2.minDate, "year") && calEndDate && calTime.isSameOrAfter(calEndDate, "year")); - if ((_a = props2.minDate) == null ? void 0 : _a.isSameOrAfter(calEndDate)) { - cell.start = !!(calEndDate && calTime.isSame(calEndDate, "year")); - cell.end = !!(props2.minDate && calTime.isSame(props2.minDate, "year")); - } else { - cell.start = !!(props2.minDate && calTime.isSame(props2.minDate, "year")); - cell.end = !!(calEndDate && calTime.isSame(calEndDate, "year")); - } - const isToday = now2.isSame(calTime); - if (isToday) { - cell.type = "today"; - } - cell.text = index; - const cellDate = calTime.toDate(); - cell.disabled = ((_b = props2.disabledDate) == null ? void 0 : _b.call(props2, cellDate)) || false; - cell.date = cellDate; - cell.customClass = (_c = props2.cellClassName) == null ? void 0 : _c.call(props2, cellDate); - cell.dayjs = calTime; - cell.timestamp = calTime.valueOf(); - cell.isSelected = isSelectedCell(cell); - row[j] = cell; - } - } - return rows2; - }); - const focus = () => { - var _a; - (_a = currentCellRef.value) == null ? void 0 : _a.focus(); - }; - const getCellKls = (cell) => { - const kls = {}; - const today = (0, import_dayjs11.default)().locale(lang.value); - const year = cell.text; - kls.disabled = props2.disabled || (props2.disabledDate ? datesInYear(year, lang.value).every(props2.disabledDate) : false); - kls.today = today.year() === year; - kls.current = castArray2(props2.parsedValue).some((d2) => d2.year() === year); - if (cell.customClass) { - kls[cell.customClass] = true; - } - if (cell.inRange) { - kls["in-range"] = true; - if (cell.start) { - kls["start-date"] = true; - } - if (cell.end) { - kls["end-date"] = true; - } - } - return kls; - }; - const isSelectedCell = (cell) => { - const year = cell.text; - return castArray2(props2.date).some((date4) => date4.year() === year); - }; - const handleYearTableClick = (event) => { - var _a; - if (props2.disabled) - return; - const target2 = (_a = event.target) == null ? void 0 : _a.closest( - "td" - ); - if (!target2 || !target2.textContent || hasClass(target2, "disabled")) - return; - const column2 = target2.cellIndex; - const row = target2.parentNode.rowIndex; - const selectedYear = row * 4 + column2 + startYear.value; - const newDate = (0, import_dayjs11.default)().year(selectedYear); - if (props2.selectionMode === "range") { - if (!props2.rangeState.selecting) { - emit("pick", { minDate: newDate, maxDate: null }); - emit("select", true); - } else { - if (props2.minDate && newDate >= props2.minDate) { - emit("pick", { minDate: props2.minDate, maxDate: newDate }); - } else { - emit("pick", { minDate: newDate, maxDate: props2.minDate }); - } - emit("select", false); - } - } else if (props2.selectionMode === "years") { - if (event.type === "keydown") { - emit("pick", castArray2(props2.parsedValue), false); - return; - } - const vaildYear = getValidDateOfYear( - newDate.startOf("year"), - lang.value, - props2.disabledDate - ); - const newValue = hasClass(target2, "current") ? castArray2(props2.parsedValue).filter((d2) => (d2 == null ? void 0 : d2.year()) !== selectedYear) : castArray2(props2.parsedValue).concat([vaildYear]); - emit("pick", newValue); - } else { - emit("pick", selectedYear); - } - }; - const handleMouseMove = (event) => { - var _a; - if (!props2.rangeState.selecting) - return; - const target2 = (_a = event.target) == null ? void 0 : _a.closest( - "td" - ); - if (!target2) - return; - const row = target2.parentNode.rowIndex; - const column2 = target2.cellIndex; - if (rows.value[row][column2].disabled) - return; - if (row !== lastRow.value || column2 !== lastColumn.value) { - lastRow.value = row; - lastColumn.value = column2; - emit("changerange", { - selecting: true, - endDate: (0, import_dayjs11.default)().year(startYear.value).add(row * 4 + column2, "year") - }); - } - }; - watch( - () => props2.date, - async () => { - var _a, _b; - if ((_a = tbodyRef.value) == null ? void 0 : _a.contains(document.activeElement)) { - await nextTick(); - (_b = currentCellRef.value) == null ? void 0 : _b.focus(); - } - } - ); - __expose({ - focus - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("table", { - role: "grid", - "aria-label": unref(t)("el.datepicker.yearTablePrompt"), - class: normalizeClass(unref(ns).b()), - onClick: handleYearTableClick, - onMousemove: handleMouseMove - }, [ - createBaseVNode( - "tbody", - { - ref_key: "tbodyRef", - ref: tbodyRef - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(rows.value, (row, rowKey2) => { - return openBlock(), createElementBlock("tr", { key: rowKey2 }, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(row, (cell, cellKey) => { - return openBlock(), createElementBlock("td", { - key: `${rowKey2}_${cellKey}`, - ref_for: true, - ref: (el) => cell.isSelected && (currentCellRef.value = el), - class: normalizeClass(["available", getCellKls(cell)]), - "aria-selected": cell.isSelected, - "aria-label": String(cell.text), - tabindex: cell.isSelected ? 0 : -1, - onKeydown: [ - withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["space"]), - withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["enter"]) - ] - }, [ - createVNode(unref(ElDatePickerCell), { cell }, null, 8, ["cell"]) - ], 42, _hoisted_214); - }), - 128 - )) - ]); - }), - 128 - )) - ], - 512 - ) - ], 42, _hoisted_130); - }; - } -}); -var YearTable = _export_sfc(_sfc_main69, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/basic-year-table.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs -var _hoisted_131 = ["disabled", "onClick"]; -var _hoisted_215 = ["aria-label", "disabled"]; -var _hoisted_35 = ["aria-label", "disabled"]; -var _hoisted_42 = ["tabindex", "aria-disabled"]; -var _hoisted_52 = ["tabindex", "aria-disabled"]; -var _hoisted_62 = ["aria-label", "disabled"]; -var _hoisted_7 = ["aria-label", "disabled"]; -var _sfc_main70 = defineComponent({ - __name: "panel-date-pick", - props: panelDatePickProps, - emits: ["pick", "set-picker-option", "panel-change"], - setup(__props, { emit: __emit }) { - const timeWithinRange = (_2, __, ___) => true; - const props2 = __props; - const contextEmit = __emit; - const ppNs = useNamespace("picker-panel"); - const dpNs = useNamespace("date-picker"); - const attrs = useAttrs(); - const slots = useSlots(); - const { t, lang } = useLocale(); - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const isDefaultFormat = inject( - ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, - void 0 - ); - const { shortcuts, disabledDate, cellClassName, defaultTime } = pickerBase.props; - const defaultValue = toRef(pickerBase.props, "defaultValue"); - const currentViewRef = ref(); - const innerDate = ref((0, import_dayjs12.default)().locale(lang.value)); - const isChangeToNow = ref(false); - let isShortcut = false; - const defaultTimeD = computed(() => { - return (0, import_dayjs12.default)(defaultTime).locale(lang.value); - }); - const month = computed(() => { - return innerDate.value.month(); - }); - const year = computed(() => { - return innerDate.value.year(); - }); - const selectableRange = ref([]); - const userInputDate = ref(null); - const userInputTime = ref(null); - const checkDateWithinRange = (date4) => { - return selectableRange.value.length > 0 ? timeWithinRange(date4, selectableRange.value, props2.format || "HH:mm:ss") : true; - }; - const formatEmit = (emitDayjs) => { - if (defaultTime && !visibleTime.value && !isChangeToNow.value && !isShortcut) { - return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date()); - } - if (showTime.value) - return emitDayjs.millisecond(0); - return emitDayjs.startOf("day"); - }; - const emit = (value, ...args) => { - if (!value) { - contextEmit("pick", value, ...args); - } else if (isArray(value)) { - const dates = value.map(formatEmit); - contextEmit("pick", dates, ...args); - } else { - contextEmit("pick", formatEmit(value), ...args); - } - userInputDate.value = null; - userInputTime.value = null; - isChangeToNow.value = false; - isShortcut = false; - }; - const handleDatePick = async (value, keepOpen) => { - if (selectionMode.value === "date" && import_dayjs12.default.isDayjs(value)) { - const parsedDateValue = extractFirst(props2.parsedValue); - let newDate = parsedDateValue ? parsedDateValue.year(value.year()).month(value.month()).date(value.date()) : value; - if (!checkDateWithinRange(newDate)) { - newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date()); - } - innerDate.value = newDate; - emit(newDate, showTime.value || keepOpen); - } else if (selectionMode.value === "week") { - emit(value.date); - } else if (selectionMode.value === "dates") { - emit(value, true); - } - }; - const moveByMonth = (forward) => { - const action = forward ? "add" : "subtract"; - innerDate.value = innerDate.value[action](1, "month"); - handlePanelChange("month"); - }; - const moveByYear = (forward) => { - const currentDate = innerDate.value; - const action = forward ? "add" : "subtract"; - innerDate.value = currentView.value === "year" ? currentDate[action](10, "year") : currentDate[action](1, "year"); - handlePanelChange("year"); - }; - const currentView = ref("date"); - const yearLabel = computed(() => { - const yearTranslation = t("el.datepicker.year"); - if (currentView.value === "year") { - const startYear = Math.floor(year.value / 10) * 10; - if (yearTranslation) { - return `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}`; - } - return `${startYear} - ${startYear + 9}`; - } - return `${year.value} ${yearTranslation}`; - }); - const handleShortcutClick = (shortcut) => { - const shortcutValue = isFunction(shortcut.value) ? shortcut.value() : shortcut.value; - if (shortcutValue) { - isShortcut = true; - emit((0, import_dayjs12.default)(shortcutValue).locale(lang.value)); - return; - } - if (shortcut.onClick) { - shortcut.onClick({ - attrs, - slots, - emit: contextEmit - }); - } - }; - const selectionMode = computed(() => { - const { type: type4 } = props2; - if (["week", "month", "months", "year", "years", "dates"].includes(type4)) - return type4; - return "date"; - }); - const isMultipleType = computed(() => { - return selectionMode.value === "dates" || selectionMode.value === "months" || selectionMode.value === "years"; - }); - const keyboardMode = computed(() => { - return selectionMode.value === "date" ? currentView.value : selectionMode.value; - }); - const hasShortcuts = computed(() => !!shortcuts.length); - const handleMonthPick = async (month2, keepOpen) => { - if (selectionMode.value === "month") { - innerDate.value = getValidDateOfMonth( - innerDate.value, - innerDate.value.year(), - month2, - lang.value, - disabledDate - ); - emit(innerDate.value, false); - } else if (selectionMode.value === "months") { - emit(month2, keepOpen != null ? keepOpen : true); - } else { - innerDate.value = getValidDateOfMonth( - innerDate.value, - innerDate.value.year(), - month2, - lang.value, - disabledDate - ); - currentView.value = "date"; - if (["month", "year", "date", "week"].includes(selectionMode.value)) { - emit(innerDate.value, true); - await nextTick(); - handleFocusPicker(); - } - } - handlePanelChange("month"); - }; - const handleYearPick = async (year2, keepOpen) => { - if (selectionMode.value === "year") { - const data = innerDate.value.startOf("year").year(year2); - innerDate.value = getValidDateOfYear(data, lang.value, disabledDate); - emit(innerDate.value, false); - } else if (selectionMode.value === "years") { - emit(year2, keepOpen != null ? keepOpen : true); - } else { - const data = innerDate.value.year(year2); - innerDate.value = getValidDateOfYear(data, lang.value, disabledDate); - currentView.value = "month"; - if (["month", "year", "date", "week"].includes(selectionMode.value)) { - emit(innerDate.value, true); - await nextTick(); - handleFocusPicker(); - } - } - handlePanelChange("year"); - }; - const dateDisabled = useFormDisabled(); - const showPicker = async (view) => { - if (dateDisabled.value) - return; - currentView.value = view; - await nextTick(); - handleFocusPicker(); - }; - const showTime = computed( - () => props2.type === "datetime" || props2.type === "datetimerange" - ); - const footerVisible = computed(() => { - const showDateFooter = showTime.value || selectionMode.value === "dates"; - const showYearFooter = selectionMode.value === "years"; - const showMonthFooter = selectionMode.value === "months"; - const isDateView = currentView.value === "date"; - const isYearView = currentView.value === "year"; - const isMonthView = currentView.value === "month"; - return showDateFooter && isDateView || showYearFooter && isYearView || showMonthFooter && isMonthView; - }); - const footerFilled = computed( - () => !isMultipleType.value && props2.showNow || props2.showConfirm - ); - const disabledConfirm = computed(() => { - if (!disabledDate) - return false; - if (!props2.parsedValue) - return true; - if (isArray(props2.parsedValue)) { - return disabledDate(props2.parsedValue[0].toDate()); - } - return disabledDate(props2.parsedValue.toDate()); - }); - const onConfirm = () => { - if (isMultipleType.value) { - emit(props2.parsedValue); - } else { - let result2 = extractFirst(props2.parsedValue); - if (!result2) { - const defaultTimeD2 = (0, import_dayjs12.default)(defaultTime).locale(lang.value); - const defaultValueD = getDefaultValue2(); - result2 = defaultTimeD2.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date()); - } - innerDate.value = result2; - emit(result2); - } - }; - const disabledNow = computed(() => { - if (!disabledDate) - return false; - return disabledDate((0, import_dayjs12.default)().locale(lang.value).toDate()); - }); - const changeToNow = () => { - const now2 = (0, import_dayjs12.default)().locale(lang.value); - const nowDate = now2.toDate(); - isChangeToNow.value = true; - if ((!disabledDate || !disabledDate(nowDate)) && checkDateWithinRange(nowDate)) { - innerDate.value = (0, import_dayjs12.default)().locale(lang.value); - emit(innerDate.value); - } - }; - const timeFormat = computed(() => { - return props2.timeFormat || extractTimeFormat(props2.format) || DEFAULT_FORMATS_TIME; - }); - const dateFormat = computed(() => { - return props2.dateFormat || extractDateFormat(props2.format) || DEFAULT_FORMATS_DATE; - }); - const visibleTime = computed(() => { - if (userInputTime.value) - return userInputTime.value; - if (!props2.parsedValue && !defaultValue.value) - return; - const dateValue = extractFirst(props2.parsedValue) || innerDate.value; - return dateValue.format(timeFormat.value); - }); - const visibleDate = computed(() => { - if (userInputDate.value) - return userInputDate.value; - if (!props2.parsedValue && !defaultValue.value) - return; - const dateValue = extractFirst(props2.parsedValue) || innerDate.value; - return dateValue.format(dateFormat.value); - }); - const timePickerVisible = ref(false); - const onTimePickerInputFocus = () => { - timePickerVisible.value = true; - }; - const handleTimePickClose = () => { - timePickerVisible.value = false; - }; - const getUnits = (date4) => { - return { - hour: date4.hour(), - minute: date4.minute(), - second: date4.second(), - year: date4.year(), - month: date4.month(), - date: date4.date() - }; - }; - const handleTimePick = (value, visible, first) => { - const { hour, minute, second } = getUnits(value); - const parsedDateValue = extractFirst(props2.parsedValue); - const newDate = parsedDateValue ? parsedDateValue.hour(hour).minute(minute).second(second) : value; - innerDate.value = newDate; - emit(innerDate.value, true); - if (!first) { - timePickerVisible.value = visible; - } - }; - const handleVisibleTimeChange = (value) => { - const newDate = (0, import_dayjs12.default)(value, timeFormat.value).locale(lang.value); - if (newDate.isValid() && checkDateWithinRange(newDate)) { - const { year: year2, month: month2, date: date4 } = getUnits(innerDate.value); - innerDate.value = newDate.year(year2).month(month2).date(date4); - userInputTime.value = null; - timePickerVisible.value = false; - emit(innerDate.value, true); - } - }; - const handleVisibleDateChange = (value) => { - const newDate = correctlyParseUserInput( - value, - dateFormat.value, - lang.value, - isDefaultFormat - ); - if (newDate.isValid()) { - if (disabledDate && disabledDate(newDate.toDate())) { - return; - } - const { hour, minute, second } = getUnits(innerDate.value); - innerDate.value = newDate.hour(hour).minute(minute).second(second); - userInputDate.value = null; - emit(innerDate.value, true); - } - }; - const isValidValue3 = (date4) => { - return import_dayjs12.default.isDayjs(date4) && date4.isValid() && (disabledDate ? !disabledDate(date4.toDate()) : true); - }; - const parseUserInput = (value) => { - return correctlyParseUserInput( - value, - props2.format, - lang.value, - isDefaultFormat - ); - }; - const getDefaultValue2 = () => { - const parseDate2 = (0, import_dayjs12.default)(defaultValue.value).locale(lang.value); - if (!defaultValue.value) { - const defaultTimeDValue = defaultTimeD.value; - return (0, import_dayjs12.default)().hour(defaultTimeDValue.hour()).minute(defaultTimeDValue.minute()).second(defaultTimeDValue.second()).locale(lang.value); - } - return parseDate2; - }; - const handleFocusPicker = () => { - var _a; - if (["week", "month", "year", "date"].includes(selectionMode.value)) { - (_a = currentViewRef.value) == null ? void 0 : _a.focus(); - } - }; - const _handleFocusPicker = () => { - handleFocusPicker(); - if (selectionMode.value === "week") { - handleKeyControl(EVENT_CODE.down); - } - }; - const handleKeydownTable = (event) => { - const code = getEventCode(event); - const validCode = [ - EVENT_CODE.up, - EVENT_CODE.down, - EVENT_CODE.left, - EVENT_CODE.right, - EVENT_CODE.home, - EVENT_CODE.end, - EVENT_CODE.pageUp, - EVENT_CODE.pageDown - ]; - if (validCode.includes(code)) { - handleKeyControl(code); - event.stopPropagation(); - event.preventDefault(); - } - if ([EVENT_CODE.enter, EVENT_CODE.space, EVENT_CODE.numpadEnter].includes( - code - ) && userInputDate.value === null && userInputTime.value === null) { - event.preventDefault(); - emit(innerDate.value, false); - } - }; - const handleKeyControl = (code) => { - var _a; - const { up, down, left, right, home, end, pageUp, pageDown } = EVENT_CODE; - const mapping = { - year: { - [up]: -4, - [down]: 4, - [left]: -1, - [right]: 1, - offset: (date4, step2) => date4.setFullYear(date4.getFullYear() + step2) - }, - month: { - [up]: -4, - [down]: 4, - [left]: -1, - [right]: 1, - offset: (date4, step2) => date4.setMonth(date4.getMonth() + step2) - }, - week: { - [up]: -1, - [down]: 1, - [left]: -1, - [right]: 1, - offset: (date4, step2) => date4.setDate(date4.getDate() + step2 * 7) - }, - date: { - [up]: -7, - [down]: 7, - [left]: -1, - [right]: 1, - [home]: (date4) => -date4.getDay(), - [end]: (date4) => -date4.getDay() + 6, - [pageUp]: (date4) => -new Date(date4.getFullYear(), date4.getMonth(), 0).getDate(), - [pageDown]: (date4) => new Date(date4.getFullYear(), date4.getMonth() + 1, 0).getDate(), - offset: (date4, step2) => date4.setDate(date4.getDate() + step2) - } - }; - const newDate = innerDate.value.toDate(); - while (Math.abs(innerDate.value.diff(newDate, "year", true)) < 1) { - const map2 = mapping[keyboardMode.value]; - if (!map2) - return; - map2.offset( - newDate, - isFunction(map2[code]) ? map2[code](newDate) : (_a = map2[code]) != null ? _a : 0 - ); - if (disabledDate && disabledDate(newDate)) { - break; - } - const result2 = (0, import_dayjs12.default)(newDate).locale(lang.value); - innerDate.value = result2; - contextEmit("pick", result2, true); - break; - } - }; - const handlePanelChange = (mode) => { - contextEmit("panel-change", innerDate.value.toDate(), mode, currentView.value); - }; - watch( - () => selectionMode.value, - (val) => { - if (["month", "year"].includes(val)) { - currentView.value = val; - return; - } else if (val === "years") { - currentView.value = "year"; - return; - } else if (val === "months") { - currentView.value = "month"; - return; - } - currentView.value = "date"; - }, - { immediate: true } - ); - watch( - () => defaultValue.value, - (val) => { - if (val) { - innerDate.value = getDefaultValue2(); - } - }, - { immediate: true } - ); - watch( - () => props2.parsedValue, - (val) => { - if (val) { - if (isMultipleType.value) - return; - if (isArray(val)) - return; - innerDate.value = val; - } else { - innerDate.value = getDefaultValue2(); - } - }, - { immediate: true } - ); - contextEmit("set-picker-option", ["isValidValue", isValidValue3]); - contextEmit("set-picker-option", ["parseUserInput", parseUserInput]); - contextEmit("set-picker-option", ["handleFocusPicker", _handleFocusPicker]); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - unref(ppNs).b(), - unref(dpNs).b(), - unref(ppNs).is("border", _ctx.border), - unref(ppNs).is("disabled", unref(dateDisabled)), - { - "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value, - "has-time": showTime.value - } - ]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "sidebar", { - class: normalizeClass(unref(ppNs).e("sidebar")) - }), - hasShortcuts.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ppNs).e("sidebar")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(shortcuts), (shortcut, key) => { - return openBlock(), createElementBlock("button", { - key, - type: "button", - disabled: unref(dateDisabled), - class: normalizeClass(unref(ppNs).e("shortcut")), - onClick: ($event) => handleShortcutClick(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_131); - }), - 128 - )) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body")) - }, - [ - showTime.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(dpNs).e("time-header")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(dpNs).e("editor-wrap")) - }, - [ - createVNode(unref(ElInput), { - placeholder: unref(t)("el.datepicker.selectDate"), - "model-value": visibleDate.value, - size: "small", - "validate-event": false, - disabled: unref(dateDisabled), - readonly: !_ctx.editable, - onInput: _cache[0] || (_cache[0] = (val) => userInputDate.value = val), - onChange: handleVisibleDateChange - }, null, 8, ["placeholder", "model-value", "disabled", "readonly"]) - ], - 2 - ), - withDirectives((openBlock(), createElementBlock( - "span", - { - class: normalizeClass(unref(dpNs).e("editor-wrap")) - }, - [ - createVNode(unref(ElInput), { - placeholder: unref(t)("el.datepicker.selectTime"), - "model-value": visibleTime.value, - size: "small", - "validate-event": false, - disabled: unref(dateDisabled), - readonly: !_ctx.editable, - onFocus: onTimePickerInputFocus, - onInput: _cache[1] || (_cache[1] = (val) => userInputTime.value = val), - onChange: handleVisibleTimeChange - }, null, 8, ["placeholder", "model-value", "disabled", "readonly"]), - createVNode(unref(TimePickPanel), { - visible: timePickerVisible.value, - format: timeFormat.value, - "parsed-value": innerDate.value, - onPick: handleTimePick - }, null, 8, ["visible", "format", "parsed-value"]) - ], - 2 - )), [ - [unref(ClickOutside), handleTimePickClose] - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - withDirectives(createBaseVNode( - "div", - { - class: normalizeClass([ - unref(dpNs).e("header"), - (currentView.value === "year" || currentView.value === "month") && unref(dpNs).em("header", "bordered") - ]) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(dpNs).e("prev-btn")) - }, - [ - createBaseVNode("button", { - type: "button", - "aria-label": unref(t)(`el.datepicker.prevYear`), - class: normalizeClass(["d-arrow-left", unref(ppNs).e("icon-btn")]), - disabled: unref(dateDisabled), - onClick: _cache[2] || (_cache[2] = ($event) => moveByYear(false)) - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_215), - withDirectives(createBaseVNode("button", { - type: "button", - "aria-label": unref(t)(`el.datepicker.prevMonth`), - class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]), - disabled: unref(dateDisabled), - onClick: _cache[3] || (_cache[3] = ($event) => moveByMonth(false)) - }, [ - renderSlot(_ctx.$slots, "prev-month", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_35), [ - [vShow, currentView.value === "date"] - ]) - ], - 2 - ), - createBaseVNode("span", { - role: "button", - class: normalizeClass(unref(dpNs).e("header-label")), - "aria-live": "polite", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - onKeydown: _cache[4] || (_cache[4] = withKeys(($event) => showPicker("year"), ["enter"])), - onClick: _cache[5] || (_cache[5] = ($event) => showPicker("year")) - }, toDisplayString(yearLabel.value), 43, _hoisted_42), - withDirectives(createBaseVNode("span", { - role: "button", - "aria-live": "polite", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - class: normalizeClass([ - unref(dpNs).e("header-label"), - { active: currentView.value === "month" } - ]), - onKeydown: _cache[6] || (_cache[6] = withKeys(($event) => showPicker("month"), ["enter"])), - onClick: _cache[7] || (_cache[7] = ($event) => showPicker("month")) - }, toDisplayString(unref(t)(`el.datepicker.month${month.value + 1}`)), 43, _hoisted_52), [ - [vShow, currentView.value === "date"] - ]), - createBaseVNode( - "span", - { - class: normalizeClass(unref(dpNs).e("next-btn")) - }, - [ - withDirectives(createBaseVNode("button", { - type: "button", - "aria-label": unref(t)(`el.datepicker.nextMonth`), - class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]), - disabled: unref(dateDisabled), - onClick: _cache[8] || (_cache[8] = ($event) => moveByMonth(true)) - }, [ - renderSlot(_ctx.$slots, "next-month", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_62), [ - [vShow, currentView.value === "date"] - ]), - createBaseVNode("button", { - type: "button", - "aria-label": unref(t)(`el.datepicker.nextYear`), - class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]), - disabled: unref(dateDisabled), - onClick: _cache[9] || (_cache[9] = ($event) => moveByYear(true)) - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_7) - ], - 2 - ) - ], - 2 - ), [ - [vShow, currentView.value !== "time"] - ]), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("content")), - onKeydown: handleKeydownTable - }, - [ - currentView.value === "date" ? (openBlock(), createBlock(DateTable2, { - key: 0, - ref_key: "currentViewRef", - ref: currentViewRef, - "selection-mode": selectionMode.value, - date: innerDate.value, - "parsed-value": _ctx.parsedValue, - "disabled-date": unref(disabledDate), - disabled: unref(dateDisabled), - "cell-class-name": unref(cellClassName), - "show-week-number": _ctx.showWeekNumber, - onPick: handleDatePick - }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "disabled", "cell-class-name", "show-week-number"])) : createCommentVNode("v-if", true), - currentView.value === "year" ? (openBlock(), createBlock(YearTable, { - key: 1, - ref_key: "currentViewRef", - ref: currentViewRef, - "selection-mode": selectionMode.value, - date: innerDate.value, - "disabled-date": unref(disabledDate), - disabled: unref(dateDisabled), - "parsed-value": _ctx.parsedValue, - "cell-class-name": unref(cellClassName), - onPick: handleYearPick - }, null, 8, ["selection-mode", "date", "disabled-date", "disabled", "parsed-value", "cell-class-name"])) : createCommentVNode("v-if", true), - currentView.value === "month" ? (openBlock(), createBlock(MonthTable, { - key: 2, - ref_key: "currentViewRef", - ref: currentViewRef, - "selection-mode": selectionMode.value, - date: innerDate.value, - "parsed-value": _ctx.parsedValue, - "disabled-date": unref(disabledDate), - disabled: unref(dateDisabled), - "cell-class-name": unref(cellClassName), - onPick: handleMonthPick - }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "disabled", "cell-class-name"])) : createCommentVNode("v-if", true) - ], - 34 - ) - ], - 2 - ) - ], - 2 - ), - _ctx.showFooter && footerVisible.value && footerFilled.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ppNs).e("footer")) - }, - [ - withDirectives(createVNode(unref(ElButton), { - text: "", - size: "small", - class: normalizeClass(unref(ppNs).e("link-btn")), - disabled: disabledNow.value, - onClick: changeToNow - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.now")), - 1 - ) - ]), - _: 1 - }, 8, ["class", "disabled"]), [ - [vShow, !isMultipleType.value && _ctx.showNow] - ]), - _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), { - key: 0, - plain: "", - size: "small", - class: normalizeClass(unref(ppNs).e("link-btn")), - disabled: disabledConfirm.value, - onClick: onConfirm - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.confirm")), - 1 - ) - ]), - _: 1 - }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var DatePickPanel = _export_sfc(_sfc_main70, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs -var import_dayjs15 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-range.mjs -var panelDateRangeProps = buildProps({ - ...panelSharedProps, - ...panelRangeSharedProps -}); - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-range-picker.mjs -var import_dayjs14 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-shortcut.mjs -var import_dayjs13 = __toESM(require_dayjs_min(), 1); -var useShortcut = (lang) => { - const { emit } = getCurrentInstance(); - const attrs = useAttrs(); - const slots = useSlots(); - const handleShortcutClick = (shortcut) => { - const shortcutValues = isFunction(shortcut.value) ? shortcut.value() : shortcut.value; - if (shortcutValues) { - emit("pick", [ - (0, import_dayjs13.default)(shortcutValues[0]).locale(lang.value), - (0, import_dayjs13.default)(shortcutValues[1]).locale(lang.value) - ]); - return; - } - if (shortcut.onClick) { - shortcut.onClick({ - attrs, - slots, - emit - }); - } - }; - return handleShortcutClick; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-range-picker.mjs -var useRangePicker = (props2, { - defaultValue, - defaultTime, - leftDate, - rightDate, - step: step2, - unit: unit4, - sortDates -}) => { - const { emit } = getCurrentInstance(); - const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY); - const drpNs = useNamespace("date-range-picker"); - const { t, lang } = useLocale(); - const handleShortcutClick = useShortcut(lang); - const minDate = ref(); - const maxDate = ref(); - const rangeState = ref({ - endDate: null, - selecting: false - }); - const handleChangeRange = (val) => { - rangeState.value = val; - }; - const handleRangeConfirm = (visible = false) => { - const _minDate = unref(minDate); - const _maxDate = unref(maxDate); - if (isValidRange2([_minDate, _maxDate])) { - emit("pick", [_minDate, _maxDate], visible); - } - }; - const onSelect = (selecting) => { - rangeState.value.selecting = selecting; - if (!selecting) { - rangeState.value.endDate = null; - } - }; - const parseValue = (parsedValue) => { - if (isArray(parsedValue) && parsedValue.length === 2) { - const [start, end] = parsedValue; - minDate.value = start; - leftDate.value = start; - maxDate.value = end; - sortDates(unref(minDate), unref(maxDate)); - } else { - restoreDefault(); - } - }; - const restoreDefault = () => { - let [start, end] = getDefaultValue(unref(defaultValue), { - lang: unref(lang), - step: step2, - unit: unit4, - unlinkPanels: props2.unlinkPanels - }); - const getShift = (day) => { - return day.diff(day.startOf("d"), "ms"); - }; - const maybeTimes = unref(defaultTime); - if (maybeTimes) { - let leftShift = 0; - let rightShift = 0; - if (isArray(maybeTimes)) { - const [timeStart, timeEnd] = maybeTimes.map(import_dayjs14.default); - leftShift = getShift(timeStart); - rightShift = getShift(timeEnd); - } else { - const shift3 = getShift((0, import_dayjs14.default)(maybeTimes)); - leftShift = shift3; - rightShift = shift3; - } - start = start.startOf("d").add(leftShift, "ms"); - end = end.startOf("d").add(rightShift, "ms"); - } - minDate.value = void 0; - maxDate.value = void 0; - leftDate.value = start; - rightDate.value = end; - }; - watch( - defaultValue, - (val) => { - if (val) { - restoreDefault(); - } - }, - { immediate: true } - ); - watch( - () => props2.parsedValue, - (parsedValue) => { - if (!(parsedValue == null ? void 0 : parsedValue.length) || !isEqual_default(parsedValue, [minDate.value, maxDate.value])) { - parseValue(parsedValue); - } - }, - { - immediate: true - } - ); - watch( - () => props2.visible, - () => { - if (props2.visible) { - parseValue(props2.parsedValue); - } - }, - { immediate: true } - ); - return { - minDate, - maxDate, - rangeState, - lang, - ppNs: pickerNs, - drpNs, - handleChangeRange, - handleRangeConfirm, - handleShortcutClick, - onSelect, - parseValue, - t - }; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-panel-date-range.mjs -var usePanelDateRange = (props2, emit, leftDate, rightDate) => { - const leftCurrentView = ref("date"); - const leftCurrentViewRef = ref(); - const rightCurrentView = ref("date"); - const rightCurrentViewRef = ref(); - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const { disabledDate } = pickerBase.props; - const { t, lang } = useLocale(); - const leftYear = computed(() => { - return leftDate.value.year(); - }); - const leftMonth = computed(() => { - return leftDate.value.month(); - }); - const rightYear = computed(() => { - return rightDate.value.year(); - }); - const rightMonth = computed(() => { - return rightDate.value.month(); - }); - function computedYearLabel(currentView, yearValue) { - const yearTranslation = t("el.datepicker.year"); - if (currentView.value === "year") { - const startYear = Math.floor(yearValue.value / 10) * 10; - return yearTranslation ? `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}` : `${startYear} - ${startYear + 9}`; - } - return `${yearValue.value} ${yearTranslation}`; - } - function focusPicker(currentViewRef) { - currentViewRef == null ? void 0 : currentViewRef.focus(); - } - async function showPicker(pickerType, view) { - if (props2.disabled) - return; - const currentView = pickerType === "left" ? leftCurrentView : rightCurrentView; - const currentViewRef = pickerType === "left" ? leftCurrentViewRef : rightCurrentViewRef; - currentView.value = view; - await nextTick(); - focusPicker(currentViewRef.value); - } - async function handlePick(mode, pickerType, value) { - if (props2.disabled) - return; - const isLeftPicker = pickerType === "left"; - const startDate = isLeftPicker ? leftDate : rightDate; - const endDate = isLeftPicker ? rightDate : leftDate; - const currentView = isLeftPicker ? leftCurrentView : rightCurrentView; - const currentViewRef = isLeftPicker ? leftCurrentViewRef : rightCurrentViewRef; - if (mode === "year") { - const data = startDate.value.year(value); - startDate.value = getValidDateOfYear(data, lang.value, disabledDate); - } - if (mode === "month") { - startDate.value = getValidDateOfMonth( - startDate.value, - startDate.value.year(), - value, - lang.value, - disabledDate - ); - } - if (!props2.unlinkPanels) { - endDate.value = pickerType === "left" ? startDate.value.add(1, "month") : startDate.value.subtract(1, "month"); - } - currentView.value = mode === "year" ? "month" : "date"; - await nextTick(); - focusPicker(currentViewRef.value); - handlePanelChange(mode); - } - function handlePanelChange(mode) { - emit( - "panel-change", - [leftDate.value.toDate(), rightDate.value.toDate()], - mode - ); - } - function adjustDateByView(currentView, date4, forward) { - const action = forward ? "add" : "subtract"; - return currentView === "year" ? date4[action](10, "year") : date4[action](1, "year"); - } - return { - leftCurrentView, - rightCurrentView, - leftCurrentViewRef, - rightCurrentViewRef, - leftYear, - rightYear, - leftMonth, - rightMonth, - leftYearLabel: computed(() => computedYearLabel(leftCurrentView, leftYear)), - rightYearLabel: computed( - () => computedYearLabel(rightCurrentView, rightYear) - ), - showLeftPicker: (view) => showPicker("left", view), - showRightPicker: (view) => showPicker("right", view), - handleLeftYearPick: (year) => handlePick("year", "left", year), - handleRightYearPick: (year) => handlePick("year", "right", year), - handleLeftMonthPick: (month) => handlePick("month", "left", month), - handleRightMonthPick: (month) => handlePick("month", "right", month), - handlePanelChange, - adjustDateByView - }; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs -var _hoisted_132 = ["disabled", "onClick"]; -var _hoisted_216 = ["aria-label", "disabled"]; -var _hoisted_36 = ["aria-label", "disabled"]; -var _hoisted_43 = ["disabled", "aria-label"]; -var _hoisted_53 = ["disabled", "aria-label"]; -var _hoisted_63 = ["tabindex", "aria-disabled"]; -var _hoisted_72 = ["tabindex", "aria-disabled"]; -var _hoisted_8 = ["disabled", "aria-label"]; -var _hoisted_9 = ["disabled", "aria-label"]; -var _hoisted_10 = ["aria-label", "disabled"]; -var _hoisted_11 = ["disabled", "aria-label"]; -var _hoisted_1210 = ["tabindex", "aria-disabled"]; -var _hoisted_133 = ["tabindex", "aria-disabled"]; -var unit = "month"; -var _sfc_main71 = defineComponent({ - __name: "panel-date-range", - props: panelDateRangeProps, - emits: [ - "pick", - "set-picker-option", - "calendar-change", - "panel-change", - "clear" - ], - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const isDefaultFormat = inject( - ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, - void 0 - ); - const { disabledDate, cellClassName, defaultTime, clearable } = pickerBase.props; - const format2 = toRef(pickerBase.props, "format"); - const shortcuts = toRef(pickerBase.props, "shortcuts"); - const defaultValue = toRef(pickerBase.props, "defaultValue"); - const { lang } = useLocale(); - const leftDate = ref((0, import_dayjs15.default)().locale(lang.value)); - const rightDate = ref((0, import_dayjs15.default)().locale(lang.value).add(1, unit)); - const { - minDate, - maxDate, - rangeState, - ppNs, - drpNs, - handleChangeRange, - handleRangeConfirm, - handleShortcutClick, - onSelect, - parseValue, - t - } = useRangePicker(props2, { - defaultValue, - defaultTime, - leftDate, - rightDate, - unit, - sortDates - }); - watch( - () => props2.visible, - (visible) => { - if (!visible && rangeState.value.selecting) { - parseValue(props2.parsedValue); - onSelect(false); - } - } - ); - const dateUserInput = ref({ - min: null, - max: null - }); - const timeUserInput = ref({ - min: null, - max: null - }); - const { - leftCurrentView, - rightCurrentView, - leftCurrentViewRef, - rightCurrentViewRef, - leftYear, - rightYear, - leftMonth, - rightMonth, - leftYearLabel, - rightYearLabel, - showLeftPicker, - showRightPicker, - handleLeftYearPick, - handleRightYearPick, - handleLeftMonthPick, - handleRightMonthPick, - handlePanelChange, - adjustDateByView - } = usePanelDateRange(props2, emit, leftDate, rightDate); - const hasShortcuts = computed(() => !!shortcuts.value.length); - const minVisibleDate = computed(() => { - if (dateUserInput.value.min !== null) - return dateUserInput.value.min; - if (minDate.value) - return minDate.value.format(dateFormat.value); - return ""; - }); - const maxVisibleDate = computed(() => { - if (dateUserInput.value.max !== null) - return dateUserInput.value.max; - if (maxDate.value || minDate.value) - return (maxDate.value || minDate.value).format(dateFormat.value); - return ""; - }); - const minVisibleTime = computed(() => { - if (timeUserInput.value.min !== null) - return timeUserInput.value.min; - if (minDate.value) - return minDate.value.format(timeFormat.value); - return ""; - }); - const maxVisibleTime = computed(() => { - if (timeUserInput.value.max !== null) - return timeUserInput.value.max; - if (maxDate.value || minDate.value) - return (maxDate.value || minDate.value).format(timeFormat.value); - return ""; - }); - const timeFormat = computed(() => { - return props2.timeFormat || extractTimeFormat(format2.value || "") || DEFAULT_FORMATS_TIME; - }); - const dateFormat = computed(() => { - return props2.dateFormat || extractDateFormat(format2.value || "") || DEFAULT_FORMATS_DATE; - }); - const isValidValue3 = (date4) => { - return isValidRange2(date4) && (disabledDate ? !disabledDate(date4[0].toDate()) && !disabledDate(date4[1].toDate()) : true); - }; - const leftPrevYear = () => { - leftDate.value = adjustDateByView( - leftCurrentView.value, - leftDate.value, - false - ); - if (!props2.unlinkPanels) { - rightDate.value = leftDate.value.add(1, "month"); - } - handlePanelChange("year"); - }; - const leftPrevMonth = () => { - leftDate.value = leftDate.value.subtract(1, "month"); - if (!props2.unlinkPanels) { - rightDate.value = leftDate.value.add(1, "month"); - } - handlePanelChange("month"); - }; - const rightNextYear = () => { - if (!props2.unlinkPanels) { - leftDate.value = adjustDateByView( - rightCurrentView.value, - leftDate.value, - true - ); - rightDate.value = leftDate.value.add(1, "month"); - } else { - rightDate.value = adjustDateByView( - rightCurrentView.value, - rightDate.value, - true - ); - } - handlePanelChange("year"); - }; - const rightNextMonth = () => { - if (!props2.unlinkPanels) { - leftDate.value = leftDate.value.add(1, "month"); - rightDate.value = leftDate.value.add(1, "month"); - } else { - rightDate.value = rightDate.value.add(1, "month"); - } - handlePanelChange("month"); - }; - const leftNextYear = () => { - leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, true); - handlePanelChange("year"); - }; - const leftNextMonth = () => { - leftDate.value = leftDate.value.add(1, "month"); - handlePanelChange("month"); - }; - const rightPrevYear = () => { - rightDate.value = adjustDateByView( - rightCurrentView.value, - rightDate.value, - false - ); - handlePanelChange("year"); - }; - const rightPrevMonth = () => { - rightDate.value = rightDate.value.subtract(1, "month"); - handlePanelChange("month"); - }; - const enableMonthArrow = computed(() => { - const nextMonth = (leftMonth.value + 1) % 12; - const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0; - return props2.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value); - }); - const enableYearArrow = computed(() => { - return props2.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12; - }); - const dateRangeDisabled = useFormDisabled(); - const btnDisabled = computed(() => { - return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidRange2([minDate.value, maxDate.value]) && !dateRangeDisabled.value); - }); - const showTime = computed( - () => props2.type === "datetime" || props2.type === "datetimerange" - ); - const formatEmit = (emitDayjs, index) => { - if (!emitDayjs) - return; - if (defaultTime) { - const defaultTimeD = (0, import_dayjs15.default)( - defaultTime[index] || defaultTime - ).locale(lang.value); - return defaultTimeD.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date()); - } - return emitDayjs; - }; - const handleRangePick = (val, close2 = true) => { - const min_ = val.minDate; - const max_ = val.maxDate; - const minDate_ = formatEmit(min_, 0); - const maxDate_ = formatEmit(max_, 1); - if (maxDate.value === maxDate_ && minDate.value === minDate_) { - return; - } - emit("calendar-change", [min_.toDate(), max_ && max_.toDate()]); - maxDate.value = maxDate_; - minDate.value = minDate_; - if (!showTime.value && close2) { - close2 = !minDate_ || !maxDate_; - } - handleRangeConfirm(close2); - }; - const minTimePickerVisible = ref(false); - const maxTimePickerVisible = ref(false); - const handleMinTimeClose = () => { - minTimePickerVisible.value = false; - }; - const handleMaxTimeClose = () => { - maxTimePickerVisible.value = false; - }; - const handleDateInput = (value, type4) => { - dateUserInput.value[type4] = value; - const parsedValueD = (0, import_dayjs15.default)(value, dateFormat.value).locale(lang.value); - if (parsedValueD.isValid()) { - if (disabledDate && disabledDate(parsedValueD.toDate())) { - return; - } - if (type4 === "min") { - leftDate.value = parsedValueD; - minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date()); - if (!props2.unlinkPanels && (!maxDate.value || maxDate.value.isBefore(minDate.value))) { - rightDate.value = parsedValueD.add(1, "month"); - maxDate.value = minDate.value.add(1, "month"); - } - } else { - rightDate.value = parsedValueD; - maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date()); - if (!props2.unlinkPanels && (!minDate.value || minDate.value.isAfter(maxDate.value))) { - leftDate.value = parsedValueD.subtract(1, "month"); - minDate.value = maxDate.value.subtract(1, "month"); - } - } - sortDates(minDate.value, maxDate.value); - handleRangeConfirm(true); - } - }; - const handleDateChange = (_2, type4) => { - dateUserInput.value[type4] = null; - }; - const handleTimeInput = (value, type4) => { - timeUserInput.value[type4] = value; - const parsedValueD = (0, import_dayjs15.default)(value, timeFormat.value).locale(lang.value); - if (parsedValueD.isValid()) { - if (type4 === "min") { - minTimePickerVisible.value = true; - minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second()); - leftDate.value = minDate.value; - } else { - maxTimePickerVisible.value = true; - maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second()); - rightDate.value = maxDate.value; - } - } - }; - const handleTimeChange = (_value, type4) => { - timeUserInput.value[type4] = null; - if (type4 === "min") { - leftDate.value = minDate.value; - minTimePickerVisible.value = false; - if (!maxDate.value || maxDate.value.isBefore(minDate.value)) { - maxDate.value = minDate.value; - } - } else { - rightDate.value = maxDate.value; - maxTimePickerVisible.value = false; - if (maxDate.value && maxDate.value.isBefore(minDate.value)) { - minDate.value = maxDate.value; - } - } - handleRangeConfirm(true); - }; - const handleMinTimePick = (value, visible, first) => { - if (timeUserInput.value.min) - return; - if (value) { - minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second()); - } - if (!first) { - minTimePickerVisible.value = visible; - } - if (!maxDate.value || maxDate.value.isBefore(minDate.value)) { - maxDate.value = minDate.value; - rightDate.value = value; - nextTick(() => { - parseValue(props2.parsedValue); - }); - } - handleRangeConfirm(true); - }; - const handleMaxTimePick = (value, visible, first) => { - if (timeUserInput.value.max) - return; - if (value) { - maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second()); - } - if (!first) { - maxTimePickerVisible.value = visible; - } - if (maxDate.value && maxDate.value.isBefore(minDate.value)) { - minDate.value = maxDate.value; - } - handleRangeConfirm(true); - }; - const onClear = () => { - handleClear(); - emit("clear"); - }; - const handleClear = () => { - let valueOnClear = null; - if (pickerBase == null ? void 0 : pickerBase.emptyValues) { - valueOnClear = pickerBase.emptyValues.valueOnClear.value; - } - leftDate.value = getDefaultValue(unref(defaultValue), { - lang: unref(lang), - unit: "month", - unlinkPanels: props2.unlinkPanels - })[0]; - rightDate.value = leftDate.value.add(1, "month"); - maxDate.value = void 0; - minDate.value = void 0; - handleRangeConfirm(true); - emit("pick", valueOnClear); - }; - const parseUserInput = (value) => { - return correctlyParseUserInput( - value, - format2.value || "", - lang.value, - isDefaultFormat - ); - }; - function sortDates(minDate2, maxDate2) { - if (props2.unlinkPanels && maxDate2) { - const minDateYear = (minDate2 == null ? void 0 : minDate2.year()) || 0; - const minDateMonth = (minDate2 == null ? void 0 : minDate2.month()) || 0; - const maxDateYear = maxDate2.year(); - const maxDateMonth = maxDate2.month(); - rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate2.add(1, unit) : maxDate2; - } else { - rightDate.value = leftDate.value.add(1, unit); - if (maxDate2) { - rightDate.value = rightDate.value.hour(maxDate2.hour()).minute(maxDate2.minute()).second(maxDate2.second()); - } - } - } - emit("set-picker-option", ["isValidValue", isValidValue3]); - emit("set-picker-option", ["parseUserInput", parseUserInput]); - emit("set-picker-option", ["handleClear", handleClear]); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - unref(ppNs).b(), - unref(drpNs).b(), - unref(ppNs).is("border", _ctx.border), - unref(ppNs).is("disabled", unref(dateRangeDisabled)), - { - "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value, - "has-time": showTime.value - } - ]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "sidebar", { - class: normalizeClass(unref(ppNs).e("sidebar")) - }), - hasShortcuts.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ppNs).e("sidebar")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(shortcuts.value, (shortcut, key) => { - return openBlock(), createElementBlock("button", { - key, - type: "button", - disabled: unref(dateRangeDisabled), - class: normalizeClass(unref(ppNs).e("shortcut")), - onClick: ($event) => unref(handleShortcutClick)(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_132); - }), - 128 - )) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body")) - }, - [ - showTime.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(drpNs).e("time-header")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(drpNs).e("editors-wrap")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(drpNs).e("time-picker-wrap")) - }, - [ - createVNode(unref(ElInput), { - size: "small", - disabled: unref(rangeState).selecting || unref(dateRangeDisabled), - placeholder: unref(t)("el.datepicker.startDate"), - class: normalizeClass(unref(drpNs).e("editor")), - "model-value": minVisibleDate.value, - "validate-event": false, - readonly: !_ctx.editable, - onInput: _cache[0] || (_cache[0] = (val) => handleDateInput(val, "min")), - onChange: _cache[1] || (_cache[1] = (val) => handleDateChange(val, "min")) - }, null, 8, ["disabled", "placeholder", "class", "model-value", "readonly"]) - ], - 2 - ), - withDirectives((openBlock(), createElementBlock( - "span", - { - class: normalizeClass(unref(drpNs).e("time-picker-wrap")) - }, - [ - createVNode(unref(ElInput), { - size: "small", - class: normalizeClass(unref(drpNs).e("editor")), - disabled: unref(rangeState).selecting || unref(dateRangeDisabled), - placeholder: unref(t)("el.datepicker.startTime"), - "model-value": minVisibleTime.value, - "validate-event": false, - readonly: !_ctx.editable, - onFocus: _cache[2] || (_cache[2] = ($event) => minTimePickerVisible.value = true), - onInput: _cache[3] || (_cache[3] = (val) => handleTimeInput(val, "min")), - onChange: _cache[4] || (_cache[4] = (val) => handleTimeChange(val, "min")) - }, null, 8, ["class", "disabled", "placeholder", "model-value", "readonly"]), - createVNode(unref(TimePickPanel), { - visible: minTimePickerVisible.value, - format: timeFormat.value, - "datetime-role": "start", - "parsed-value": unref(minDate) || leftDate.value, - onPick: handleMinTimePick - }, null, 8, ["visible", "format", "parsed-value"]) - ], - 2 - )), [ - [unref(ClickOutside), handleMinTimeClose] - ]) - ], - 2 - ), - createBaseVNode("span", null, [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ]), - createBaseVNode( - "span", - { - class: normalizeClass([unref(drpNs).e("editors-wrap"), "is-right"]) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(drpNs).e("time-picker-wrap")) - }, - [ - createVNode(unref(ElInput), { - size: "small", - class: normalizeClass(unref(drpNs).e("editor")), - disabled: unref(rangeState).selecting || unref(dateRangeDisabled), - placeholder: unref(t)("el.datepicker.endDate"), - "model-value": maxVisibleDate.value, - readonly: !unref(minDate) || !_ctx.editable, - "validate-event": false, - onInput: _cache[5] || (_cache[5] = (val) => handleDateInput(val, "max")), - onChange: _cache[6] || (_cache[6] = (val) => handleDateChange(val, "max")) - }, null, 8, ["class", "disabled", "placeholder", "model-value", "readonly"]) - ], - 2 - ), - withDirectives((openBlock(), createElementBlock( - "span", - { - class: normalizeClass(unref(drpNs).e("time-picker-wrap")) - }, - [ - createVNode(unref(ElInput), { - size: "small", - class: normalizeClass(unref(drpNs).e("editor")), - disabled: unref(rangeState).selecting || unref(dateRangeDisabled), - placeholder: unref(t)("el.datepicker.endTime"), - "model-value": maxVisibleTime.value, - readonly: !unref(minDate) || !_ctx.editable, - "validate-event": false, - onFocus: _cache[7] || (_cache[7] = ($event) => unref(minDate) && (maxTimePickerVisible.value = true)), - onInput: _cache[8] || (_cache[8] = (val) => handleTimeInput(val, "max")), - onChange: _cache[9] || (_cache[9] = (val) => handleTimeChange(val, "max")) - }, null, 8, ["class", "disabled", "placeholder", "model-value", "readonly"]), - createVNode(unref(TimePickPanel), { - "datetime-role": "end", - visible: maxTimePickerVisible.value, - format: timeFormat.value, - "parsed-value": unref(maxDate) || rightDate.value, - onPick: handleMaxTimePick - }, null, 8, ["visible", "format", "parsed-value"]) - ], - 2 - )), [ - [unref(ClickOutside), handleMaxTimeClose] - ]) - ], - 2 - ) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(drpNs).e("header")) - }, - [ - createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevYear`), - disabled: unref(dateRangeDisabled), - onClick: leftPrevYear - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_216), - withDirectives(createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevMonth`), - disabled: unref(dateRangeDisabled), - onClick: leftPrevMonth - }, [ - renderSlot(_ctx.$slots, "prev-month", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_36), [ - [vShow, unref(leftCurrentView) === "date"] - ]), - _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - disabled: !enableYearArrow.value || unref(dateRangeDisabled), - class: normalizeClass([[ - unref(ppNs).e("icon-btn"), - unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled)) - ], "d-arrow-right"]), - "aria-label": unref(t)(`el.datepicker.nextYear`), - onClick: leftNextYear - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_43)) : createCommentVNode("v-if", true), - _ctx.unlinkPanels && unref(leftCurrentView) === "date" ? (openBlock(), createElementBlock("button", { - key: 1, - type: "button", - disabled: !enableMonthArrow.value || unref(dateRangeDisabled), - class: normalizeClass([[ - unref(ppNs).e("icon-btn"), - unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled)) - ], "arrow-right"]), - "aria-label": unref(t)(`el.datepicker.nextMonth`), - onClick: leftNextMonth - }, [ - renderSlot(_ctx.$slots, "next-month", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_53)) : createCommentVNode("v-if", true), - createBaseVNode("div", null, [ - createBaseVNode("span", { - role: "button", - class: normalizeClass(unref(drpNs).e("header-label")), - "aria-live": "polite", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - onKeydown: _cache[10] || (_cache[10] = withKeys(($event) => unref(showLeftPicker)("year"), ["enter"])), - onClick: _cache[11] || (_cache[11] = ($event) => unref(showLeftPicker)("year")) - }, toDisplayString(unref(leftYearLabel)), 43, _hoisted_63), - withDirectives(createBaseVNode("span", { - role: "button", - "aria-live": "polite", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - class: normalizeClass([ - unref(drpNs).e("header-label"), - { active: unref(leftCurrentView) === "month" } - ]), - onKeydown: _cache[12] || (_cache[12] = withKeys(($event) => unref(showLeftPicker)("month"), ["enter"])), - onClick: _cache[13] || (_cache[13] = ($event) => unref(showLeftPicker)("month")) - }, toDisplayString(unref(t)(`el.datepicker.month${leftDate.value.month() + 1}`)), 43, _hoisted_72), [ - [vShow, unref(leftCurrentView) === "date"] - ]) - ]) - ], - 2 - ), - unref(leftCurrentView) === "date" ? (openBlock(), createBlock(DateTable2, { - key: 0, - ref_key: "leftCurrentViewRef", - ref: leftCurrentViewRef, - "selection-mode": "range", - date: leftDate.value, - "min-date": unref(minDate), - "max-date": unref(maxDate), - "range-state": unref(rangeState), - "disabled-date": unref(disabledDate), - "cell-class-name": unref(cellClassName), - "show-week-number": _ctx.showWeekNumber, - disabled: unref(dateRangeDisabled), - onChangerange: unref(handleChangeRange), - onPick: handleRangePick, - onSelect: unref(onSelect) - }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "cell-class-name", "show-week-number", "disabled", "onChangerange", "onSelect"])) : createCommentVNode("v-if", true), - unref(leftCurrentView) === "year" ? (openBlock(), createBlock(YearTable, { - key: 1, - ref_key: "leftCurrentViewRef", - ref: leftCurrentViewRef, - "selection-mode": "year", - date: leftDate.value, - "disabled-date": unref(disabledDate), - "parsed-value": _ctx.parsedValue, - disabled: unref(dateRangeDisabled), - onPick: unref(handleLeftYearPick) - }, null, 8, ["date", "disabled-date", "parsed-value", "disabled", "onPick"])) : createCommentVNode("v-if", true), - unref(leftCurrentView) === "month" ? (openBlock(), createBlock(MonthTable, { - key: 2, - ref_key: "leftCurrentViewRef", - ref: leftCurrentViewRef, - "selection-mode": "month", - date: leftDate.value, - "parsed-value": _ctx.parsedValue, - "disabled-date": unref(disabledDate), - disabled: unref(dateRangeDisabled), - onPick: unref(handleLeftMonthPick) - }, null, 8, ["date", "parsed-value", "disabled-date", "disabled", "onPick"])) : createCommentVNode("v-if", true) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(drpNs).e("header")) - }, - [ - _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - disabled: !enableYearArrow.value || unref(dateRangeDisabled), - class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevYear`), - onClick: rightPrevYear - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_8)) : createCommentVNode("v-if", true), - _ctx.unlinkPanels && unref(rightCurrentView) === "date" ? (openBlock(), createElementBlock("button", { - key: 1, - type: "button", - disabled: !enableMonthArrow.value || unref(dateRangeDisabled), - class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]), - "aria-label": unref(t)(`el.datepicker.prevMonth`), - onClick: rightPrevMonth - }, [ - renderSlot(_ctx.$slots, "prev-month", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_9)) : createCommentVNode("v-if", true), - createBaseVNode("button", { - type: "button", - "aria-label": unref(t)(`el.datepicker.nextYear`), - class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]), - disabled: unref(dateRangeDisabled), - onClick: rightNextYear - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_10), - withDirectives(createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]), - disabled: unref(dateRangeDisabled), - "aria-label": unref(t)(`el.datepicker.nextMonth`), - onClick: rightNextMonth - }, [ - renderSlot(_ctx.$slots, "next-month", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_11), [ - [vShow, unref(rightCurrentView) === "date"] - ]), - createBaseVNode("div", null, [ - createBaseVNode("span", { - role: "button", - class: normalizeClass(unref(drpNs).e("header-label")), - "aria-live": "polite", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - onKeydown: _cache[14] || (_cache[14] = withKeys(($event) => unref(showRightPicker)("year"), ["enter"])), - onClick: _cache[15] || (_cache[15] = ($event) => unref(showRightPicker)("year")) - }, toDisplayString(unref(rightYearLabel)), 43, _hoisted_1210), - withDirectives(createBaseVNode("span", { - role: "button", - "aria-live": "polite", - tabindex: _ctx.disabled ? void 0 : 0, - "aria-disabled": _ctx.disabled, - class: normalizeClass([ - unref(drpNs).e("header-label"), - { active: unref(rightCurrentView) === "month" } - ]), - onKeydown: _cache[16] || (_cache[16] = withKeys(($event) => unref(showRightPicker)("month"), ["enter"])), - onClick: _cache[17] || (_cache[17] = ($event) => unref(showRightPicker)("month")) - }, toDisplayString(unref(t)(`el.datepicker.month${rightDate.value.month() + 1}`)), 43, _hoisted_133), [ - [vShow, unref(rightCurrentView) === "date"] - ]) - ]) - ], - 2 - ), - unref(rightCurrentView) === "date" ? (openBlock(), createBlock(DateTable2, { - key: 0, - ref_key: "rightCurrentViewRef", - ref: rightCurrentViewRef, - "selection-mode": "range", - date: rightDate.value, - "min-date": unref(minDate), - "max-date": unref(maxDate), - "range-state": unref(rangeState), - "disabled-date": unref(disabledDate), - "cell-class-name": unref(cellClassName), - "show-week-number": _ctx.showWeekNumber, - disabled: unref(dateRangeDisabled), - onChangerange: unref(handleChangeRange), - onPick: handleRangePick, - onSelect: unref(onSelect) - }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "cell-class-name", "show-week-number", "disabled", "onChangerange", "onSelect"])) : createCommentVNode("v-if", true), - unref(rightCurrentView) === "year" ? (openBlock(), createBlock(YearTable, { - key: 1, - ref_key: "rightCurrentViewRef", - ref: rightCurrentViewRef, - "selection-mode": "year", - date: rightDate.value, - "disabled-date": unref(disabledDate), - "parsed-value": _ctx.parsedValue, - disabled: unref(dateRangeDisabled), - onPick: unref(handleRightYearPick) - }, null, 8, ["date", "disabled-date", "parsed-value", "disabled", "onPick"])) : createCommentVNode("v-if", true), - unref(rightCurrentView) === "month" ? (openBlock(), createBlock(MonthTable, { - key: 2, - ref_key: "rightCurrentViewRef", - ref: rightCurrentViewRef, - "selection-mode": "month", - date: rightDate.value, - "parsed-value": _ctx.parsedValue, - "disabled-date": unref(disabledDate), - disabled: unref(dateRangeDisabled), - onPick: unref(handleRightMonthPick) - }, null, 8, ["date", "parsed-value", "disabled-date", "disabled", "onPick"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ), - _ctx.showFooter && showTime.value && (_ctx.showConfirm || unref(clearable)) ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ppNs).e("footer")) - }, - [ - unref(clearable) ? (openBlock(), createBlock(unref(ElButton), { - key: 0, - text: "", - size: "small", - class: normalizeClass(unref(ppNs).e("link-btn")), - onClick: onClear - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.clear")), - 1 - ) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), { - key: 1, - plain: "", - size: "small", - class: normalizeClass(unref(ppNs).e("link-btn")), - disabled: btnDisabled.value, - onClick: _cache[18] || (_cache[18] = ($event) => unref(handleRangeConfirm)(false)) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(unref(t)("el.datepicker.confirm")), - 1 - ) - ]), - _: 1 - }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var DateRangePickPanel = _export_sfc(_sfc_main71, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-date-range.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs -var import_dayjs16 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/panel-month-range.mjs -var panelMonthRangeProps = buildProps({ - ...panelRangeSharedProps -}); -var panelMonthRangeEmits = [ - "pick", - "set-picker-option", - "calendar-change" -]; - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-month-range-header.mjs -var useMonthRangeHeader = ({ - unlinkPanels, - leftDate, - rightDate -}) => { - const { t } = useLocale(); - const leftPrevYear = () => { - leftDate.value = leftDate.value.subtract(1, "year"); - if (!unlinkPanels.value) { - rightDate.value = rightDate.value.subtract(1, "year"); - } - }; - const rightNextYear = () => { - if (!unlinkPanels.value) { - leftDate.value = leftDate.value.add(1, "year"); - } - rightDate.value = rightDate.value.add(1, "year"); - }; - const leftNextYear = () => { - leftDate.value = leftDate.value.add(1, "year"); - }; - const rightPrevYear = () => { - rightDate.value = rightDate.value.subtract(1, "year"); - }; - const leftLabel = computed(() => { - return `${leftDate.value.year()} ${t("el.datepicker.year")}`; - }); - const rightLabel = computed(() => { - return `${rightDate.value.year()} ${t("el.datepicker.year")}`; - }); - const leftYear = computed(() => { - return leftDate.value.year(); - }); - const rightYear = computed(() => { - return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year(); - }); - return { - leftPrevYear, - rightNextYear, - leftNextYear, - rightPrevYear, - leftLabel, - rightLabel, - leftYear, - rightYear - }; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs -var _hoisted_134 = ["disabled", "onClick"]; -var _hoisted_217 = ["disabled"]; -var _hoisted_37 = ["disabled"]; -var _hoisted_44 = ["disabled"]; -var _hoisted_54 = ["disabled"]; -var unit2 = "year"; -var _sfc_main72 = defineComponent({ - ...{ - name: "DatePickerMonthRange" - }, - __name: "panel-month-range", - props: panelMonthRangeProps, - emits: panelMonthRangeEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { lang } = useLocale(); - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const isDefaultFormat = inject( - ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, - void 0 - ); - const { shortcuts, disabledDate, cellClassName } = pickerBase.props; - const format2 = toRef(pickerBase.props, "format"); - const defaultValue = toRef(pickerBase.props, "defaultValue"); - const leftDate = ref((0, import_dayjs16.default)().locale(lang.value)); - const rightDate = ref((0, import_dayjs16.default)().locale(lang.value).add(1, unit2)); - const { - minDate, - maxDate, - rangeState, - ppNs, - drpNs, - handleChangeRange, - handleRangeConfirm, - handleShortcutClick, - onSelect, - parseValue - } = useRangePicker(props2, { - defaultValue, - leftDate, - rightDate, - unit: unit2, - sortDates - }); - const hasShortcuts = computed(() => !!shortcuts.length); - const { - leftPrevYear, - rightNextYear, - leftNextYear, - rightPrevYear, - leftLabel, - rightLabel, - leftYear, - rightYear - } = useMonthRangeHeader({ - unlinkPanels: toRef(props2, "unlinkPanels"), - leftDate, - rightDate - }); - const enableYearArrow = computed(() => { - return props2.unlinkPanels && rightYear.value > leftYear.value + 1; - }); - const handleRangePick = (val, close2 = true) => { - const minDate_ = val.minDate; - const maxDate_ = val.maxDate; - if (maxDate.value === maxDate_ && minDate.value === minDate_) { - return; - } - emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]); - maxDate.value = maxDate_; - minDate.value = minDate_; - if (!close2) - return; - handleRangeConfirm(); - }; - const handleClear = () => { - let valueOnClear = null; - if (pickerBase == null ? void 0 : pickerBase.emptyValues) { - valueOnClear = pickerBase.emptyValues.valueOnClear.value; - } - leftDate.value = getDefaultValue(unref(defaultValue), { - lang: unref(lang), - unit: "year", - unlinkPanels: props2.unlinkPanels - })[0]; - rightDate.value = leftDate.value.add(1, "year"); - emit("pick", valueOnClear); - }; - const parseUserInput = (value) => { - return correctlyParseUserInput( - value, - format2.value, - lang.value, - isDefaultFormat - ); - }; - function sortDates(minDate2, maxDate2) { - if (props2.unlinkPanels && maxDate2) { - const minDateYear = (minDate2 == null ? void 0 : minDate2.year()) || 0; - const maxDateYear = maxDate2.year(); - rightDate.value = minDateYear === maxDateYear ? maxDate2.add(1, unit2) : maxDate2; - } else { - rightDate.value = leftDate.value.add(1, unit2); - } - } - const monthRangeDisabled = useFormDisabled(); - watch( - () => props2.visible, - (visible) => { - if (!visible && rangeState.value.selecting) { - parseValue(props2.parsedValue); - onSelect(false); - } - } - ); - emit("set-picker-option", ["isValidValue", isValidRange2]); - emit("set-picker-option", ["parseUserInput", parseUserInput]); - emit("set-picker-option", ["handleClear", handleClear]); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - unref(ppNs).b(), - unref(drpNs).b(), - unref(ppNs).is("border", _ctx.border), - unref(ppNs).is("disabled", unref(monthRangeDisabled)), - { - "has-sidebar": Boolean(_ctx.$slots.sidebar) || hasShortcuts.value - } - ]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "sidebar", { - class: normalizeClass(unref(ppNs).e("sidebar")) - }), - hasShortcuts.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ppNs).e("sidebar")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(shortcuts), (shortcut, key) => { - return openBlock(), createElementBlock("button", { - key, - type: "button", - class: normalizeClass(unref(ppNs).e("shortcut")), - disabled: unref(monthRangeDisabled), - onClick: ($event) => unref(handleShortcutClick)(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_134); - }), - 128 - )) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(drpNs).e("header")) - }, - [ - createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]), - disabled: unref(monthRangeDisabled), - onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_217), - _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - disabled: !enableYearArrow.value || unref(monthRangeDisabled), - class: normalizeClass([[ - unref(ppNs).e("icon-btn"), - unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled)) - ], "d-arrow-right"]), - onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_37)) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - null, - toDisplayString(unref(leftLabel)), - 1 - ) - ], - 2 - ), - createVNode(MonthTable, { - "selection-mode": "range", - date: leftDate.value, - "min-date": unref(minDate), - "max-date": unref(maxDate), - "range-state": unref(rangeState), - "disabled-date": unref(disabledDate), - disabled: unref(monthRangeDisabled), - "cell-class-name": unref(cellClassName), - onChangerange: unref(handleChangeRange), - onPick: handleRangePick, - onSelect: unref(onSelect) - }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "disabled", "cell-class-name", "onChangerange", "onSelect"]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(drpNs).e("header")) - }, - [ - _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - disabled: !enableYearArrow.value || unref(monthRangeDisabled), - class: normalizeClass([[ - unref(ppNs).e("icon-btn"), - unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled)) - ], "d-arrow-left"]), - onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_44)) : createCommentVNode("v-if", true), - createBaseVNode("button", { - type: "button", - class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]), - disabled: unref(monthRangeDisabled), - onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_54), - createBaseVNode( - "div", - null, - toDisplayString(unref(rightLabel)), - 1 - ) - ], - 2 - ), - createVNode(MonthTable, { - "selection-mode": "range", - date: rightDate.value, - "min-date": unref(minDate), - "max-date": unref(maxDate), - "range-state": unref(rangeState), - "disabled-date": unref(disabledDate), - disabled: unref(monthRangeDisabled), - "cell-class-name": unref(cellClassName), - onChangerange: unref(handleChangeRange), - onPick: handleRangePick, - onSelect: unref(onSelect) - }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "disabled", "cell-class-name", "onChangerange", "onSelect"]) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var MonthRangePickPanel = _export_sfc(_sfc_main72, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-month-range.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs -var import_dayjs17 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/components/date-picker-panel/src/props/panel-year-range.mjs -var panelYearRangeProps = buildProps({ - ...panelRangeSharedProps -}); -var panelYearRangeEmits = [ - "pick", - "set-picker-option", - "calendar-change" -]; - -// node_modules/element-plus/es/components/date-picker-panel/src/composables/use-year-range-header.mjs -var useYearRangeHeader = ({ - unlinkPanels, - leftDate, - rightDate -}) => { - const leftPrevYear = () => { - leftDate.value = leftDate.value.subtract(10, "year"); - if (!unlinkPanels.value) { - rightDate.value = rightDate.value.subtract(10, "year"); - } - }; - const rightNextYear = () => { - if (!unlinkPanels.value) { - leftDate.value = leftDate.value.add(10, "year"); - } - rightDate.value = rightDate.value.add(10, "year"); - }; - const leftNextYear = () => { - leftDate.value = leftDate.value.add(10, "year"); - }; - const rightPrevYear = () => { - rightDate.value = rightDate.value.subtract(10, "year"); - }; - const leftLabel = computed(() => { - const leftStartDate = Math.floor(leftDate.value.year() / 10) * 10; - return `${leftStartDate}-${leftStartDate + 9}`; - }); - const rightLabel = computed(() => { - const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10; - return `${rightStartDate}-${rightStartDate + 9}`; - }); - const leftYear = computed(() => { - const leftEndDate = Math.floor(leftDate.value.year() / 10) * 10 + 9; - return leftEndDate; - }); - const rightYear = computed(() => { - const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10; - return rightStartDate; - }); - return { - leftPrevYear, - rightNextYear, - leftNextYear, - rightPrevYear, - leftLabel, - rightLabel, - leftYear, - rightYear - }; -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs -var _hoisted_135 = ["disabled", "onClick"]; -var _hoisted_218 = ["disabled"]; -var _hoisted_38 = ["disabled"]; -var _hoisted_45 = ["disabled"]; -var _hoisted_55 = ["disabled"]; -var step = 10; -var unit3 = "year"; -var _sfc_main73 = defineComponent({ - ...{ - name: "DatePickerYearRange" - }, - __name: "panel-year-range", - props: panelYearRangeProps, - emits: panelYearRangeEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { lang } = useLocale(); - const leftDate = ref((0, import_dayjs17.default)().locale(lang.value)); - const rightDate = ref((0, import_dayjs17.default)().locale(lang.value).add(step, unit3)); - const isDefaultFormat = inject( - ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, - void 0 - ); - const pickerBase = inject(PICKER_BASE_INJECTION_KEY); - const { shortcuts, disabledDate, cellClassName } = pickerBase.props; - const format2 = toRef(pickerBase.props, "format"); - const defaultValue = toRef(pickerBase.props, "defaultValue"); - const { - minDate, - maxDate, - rangeState, - ppNs, - drpNs, - handleChangeRange, - handleRangeConfirm, - handleShortcutClick, - onSelect, - parseValue - } = useRangePicker(props2, { - defaultValue, - leftDate, - rightDate, - step, - unit: unit3, - sortDates - }); - const { - leftPrevYear, - rightNextYear, - leftNextYear, - rightPrevYear, - leftLabel, - rightLabel, - leftYear, - rightYear - } = useYearRangeHeader({ - unlinkPanels: toRef(props2, "unlinkPanels"), - leftDate, - rightDate - }); - const yearRangeDisabled = useFormDisabled(); - const hasShortcuts = computed(() => !!shortcuts.length); - const panelKls = computed(() => [ - ppNs.b(), - drpNs.b(), - ppNs.is("border", props2.border), - ppNs.is("disabled", yearRangeDisabled.value), - { - "has-sidebar": Boolean(useSlots().sidebar) || hasShortcuts.value - } - ]); - const leftPanelKls = computed(() => { - return { - content: [ppNs.e("content"), drpNs.e("content"), "is-left"], - arrowLeftBtn: [ppNs.e("icon-btn"), "d-arrow-left"], - arrowRightBtn: [ - ppNs.e("icon-btn"), - ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value), - "d-arrow-right" - ] - }; - }); - const rightPanelKls = computed(() => { - return { - content: [ppNs.e("content"), drpNs.e("content"), "is-right"], - arrowLeftBtn: [ - ppNs.e("icon-btn"), - ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value), - "d-arrow-left" - ], - arrowRightBtn: [ppNs.e("icon-btn"), "d-arrow-right"] - }; - }); - const enableYearArrow = computed(() => { - return props2.unlinkPanels && rightYear.value > leftYear.value + 1; - }); - const handleRangePick = (val, close2 = true) => { - const minDate_ = val.minDate; - const maxDate_ = val.maxDate; - if (maxDate.value === maxDate_ && minDate.value === minDate_) { - return; - } - emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]); - maxDate.value = maxDate_; - minDate.value = minDate_; - if (!close2) - return; - handleRangeConfirm(); - }; - const parseUserInput = (value) => { - return correctlyParseUserInput( - value, - format2.value, - lang.value, - isDefaultFormat - ); - }; - const isValidValue3 = (date4) => { - return isValidRange2(date4) && (disabledDate ? !disabledDate(date4[0].toDate()) && !disabledDate(date4[1].toDate()) : true); - }; - const handleClear = () => { - let valueOnClear = null; - if (pickerBase == null ? void 0 : pickerBase.emptyValues) { - valueOnClear = pickerBase.emptyValues.valueOnClear.value; - } - const defaultArr = getDefaultValue(unref(defaultValue), { - lang: unref(lang), - step, - unit: unit3, - unlinkPanels: props2.unlinkPanels - }); - leftDate.value = defaultArr[0]; - rightDate.value = defaultArr[1]; - emit("pick", valueOnClear); - }; - function sortDates(minDate2, maxDate2) { - if (props2.unlinkPanels && maxDate2) { - const minDateYear = (minDate2 == null ? void 0 : minDate2.year()) || 0; - const maxDateYear = maxDate2.year(); - rightDate.value = minDateYear + step > maxDateYear ? maxDate2.add(step, unit3) : maxDate2; - } else { - rightDate.value = leftDate.value.add(step, unit3); - } - } - watch( - () => props2.visible, - (visible) => { - if (!visible && rangeState.value.selecting) { - parseValue(props2.parsedValue); - onSelect(false); - } - } - ); - emit("set-picker-option", ["isValidValue", isValidValue3]); - emit("set-picker-option", ["parseUserInput", parseUserInput]); - emit("set-picker-option", ["handleClear", handleClear]); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(panelKls.value) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "sidebar", { - class: normalizeClass(unref(ppNs).e("sidebar")) - }), - hasShortcuts.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ppNs).e("sidebar")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(shortcuts), (shortcut, key) => { - return openBlock(), createElementBlock("button", { - key, - type: "button", - class: normalizeClass(unref(ppNs).e("shortcut")), - disabled: unref(yearRangeDisabled), - onClick: ($event) => unref(handleShortcutClick)(shortcut) - }, toDisplayString(shortcut.text), 11, _hoisted_135); - }), - 128 - )) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ppNs).e("body")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(leftPanelKls.value.content) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(drpNs).e("header")) - }, - [ - createBaseVNode("button", { - type: "button", - class: normalizeClass(leftPanelKls.value.arrowLeftBtn), - disabled: unref(yearRangeDisabled), - onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_218), - _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - disabled: !enableYearArrow.value || unref(yearRangeDisabled), - class: normalizeClass(leftPanelKls.value.arrowRightBtn), - onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_38)) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - null, - toDisplayString(unref(leftLabel)), - 1 - ) - ], - 2 - ), - createVNode(YearTable, { - "selection-mode": "range", - date: leftDate.value, - "min-date": unref(minDate), - "max-date": unref(maxDate), - "range-state": unref(rangeState), - "disabled-date": unref(disabledDate), - disabled: unref(yearRangeDisabled), - "cell-class-name": unref(cellClassName), - onChangerange: unref(handleChangeRange), - onPick: handleRangePick, - onSelect: unref(onSelect) - }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "disabled", "cell-class-name", "onChangerange", "onSelect"]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(rightPanelKls.value.content) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(drpNs).e("header")) - }, - [ - _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - disabled: !enableYearArrow.value || unref(yearRangeDisabled), - class: normalizeClass(rightPanelKls.value.arrowLeftBtn), - onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "prev-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_left_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_45)) : createCommentVNode("v-if", true), - createBaseVNode("button", { - type: "button", - class: normalizeClass(rightPanelKls.value.arrowRightBtn), - disabled: unref(yearRangeDisabled), - onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args)) - }, [ - renderSlot(_ctx.$slots, "next-year", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(d_arrow_right_default)) - ]), - _: 1 - }) - ]) - ], 10, _hoisted_55), - createBaseVNode( - "div", - null, - toDisplayString(unref(rightLabel)), - 1 - ) - ], - 2 - ), - createVNode(YearTable, { - "selection-mode": "range", - date: rightDate.value, - "min-date": unref(minDate), - "max-date": unref(maxDate), - "range-state": unref(rangeState), - "disabled-date": unref(disabledDate), - disabled: unref(yearRangeDisabled), - "cell-class-name": unref(cellClassName), - onChangerange: unref(handleChangeRange), - onPick: handleRangePick, - onSelect: unref(onSelect) - }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "disabled", "cell-class-name", "onChangerange", "onSelect"]) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var YearRangePickPanel = _export_sfc(_sfc_main73, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-year-range.vue"]]); - -// node_modules/element-plus/es/components/date-picker-panel/src/panel-utils.mjs -var getPanel = function(type4) { - switch (type4) { - case "daterange": - case "datetimerange": { - return DateRangePickPanel; - } - case "monthrange": { - return MonthRangePickPanel; - } - case "yearrange": { - return YearRangePickPanel; - } - default: { - return DatePickPanel; - } - } -}; - -// node_modules/element-plus/es/components/date-picker-panel/src/date-picker-panel.mjs -function _isSlot(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -import_dayjs18.default.extend(import_localeData2.default); -import_dayjs18.default.extend(import_advancedFormat.default); -import_dayjs18.default.extend(import_customParseFormat2.default); -import_dayjs18.default.extend(import_weekOfYear.default); -import_dayjs18.default.extend(import_weekYear.default); -import_dayjs18.default.extend(import_dayOfYear.default); -import_dayjs18.default.extend(import_isSameOrAfter.default); -import_dayjs18.default.extend(import_isSameOrBefore.default); -var DatePickerPanel = defineComponent({ - name: "ElDatePickerPanel", - install: null, - inheritAttrs: false, - props: datePickerPanelProps, - emits: [UPDATE_MODEL_EVENT, "calendar-change", "panel-change", "visible-change", "clear"], - setup(props2, { - slots, - emit, - attrs - }) { - const ns = useNamespace("picker-panel"); - const pickerInjection = inject(PICKER_BASE_INJECTION_KEY, void 0); - if (isUndefined2(pickerInjection)) { - const _props = reactive({ - ...toRefs(props2) - }); - provide(PICKER_BASE_INJECTION_KEY, { - props: _props - }); - } - provide(ROOT_PICKER_INJECTION_KEY, { - slots, - pickerNs: ns - }); - const { - parsedValue, - onCalendarChange, - onPanelChange, - onSetPickerOption, - onPick - } = inject(ROOT_COMMON_PICKER_INJECTION_KEY, () => useCommonPicker(props2, emit), true); - return () => { - const Component = getPanel(props2.type); - return createVNode(Component, mergeProps(omit_default(attrs, "onPick"), props2, { - "parsedValue": parsedValue.value, - "onSet-picker-option": onSetPickerOption, - "onCalendar-change": onCalendarChange, - "onPanel-change": onPanelChange, - "onClear": () => emit("clear"), - "onPick": onPick - }), _isSlot(slots) ? slots : { - default: () => [slots] - }); - }; - } -}); - -// node_modules/element-plus/es/components/date-picker-panel/index.mjs -var ElDatePickerPanel = withInstall(DatePickerPanel); - -// node_modules/element-plus/es/components/date-picker/src/props.mjs -var datePickerProps = buildProps({ - ...timePickerDefaultProps, - type: { - type: definePropType(String), - default: "date" - } -}); - -// node_modules/element-plus/es/components/date-picker/src/date-picker.mjs -function _isSlot2(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var DatePicker = defineComponent({ - name: "ElDatePicker", - install: null, - props: datePickerProps, - emits: [UPDATE_MODEL_EVENT], - setup(props2, { - expose, - emit, - slots - }) { - const isDefaultFormat = computed(() => { - return !props2.format; - }); - provide(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, isDefaultFormat); - provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, reactive(toRef(props2, "popperOptions"))); - const commonPicker = ref(); - const refProps = { - focus: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.focus(); - }, - blur: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.blur(); - }, - handleOpen: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.handleOpen(); - }, - handleClose: () => { - var _a; - (_a = commonPicker.value) == null ? void 0 : _a.handleClose(); - } - }; - expose(refProps); - const onModelValueUpdated = (val) => { - emit(UPDATE_MODEL_EVENT, val); - }; - return () => { - var _a; - const format2 = (_a = props2.format) != null ? _a : DEFAULT_FORMATS_DATEPICKER[props2.type] || DEFAULT_FORMATS_DATE; - return createVNode(CommonPicker, mergeProps(props2, { - "format": format2, - "type": props2.type, - "ref": commonPicker, - "onUpdate:modelValue": onModelValueUpdated - }), { - default: (scopedProps) => createVNode(ElDatePickerPanel, mergeProps({ - "disabled": props2.disabled, - "editable": props2.editable, - "border": false - }, scopedProps), _isSlot2(slots) ? slots : { - default: () => [slots] - }), - "range-separator": slots["range-separator"] - }); - }; - } -}); - -// node_modules/element-plus/es/components/date-picker/index.mjs -var ElDatePicker = withInstall(DatePicker); - -// node_modules/element-plus/es/components/descriptions/src/token.mjs -var descriptionsKey = Symbol("elDescriptions"); - -// node_modules/element-plus/es/components/descriptions/src/descriptions-cell.mjs -var ElDescriptionsCell = defineComponent({ - name: "ElDescriptionsCell", - props: { - cell: { - type: Object - }, - tag: { - type: String, - default: "td" - }, - type: { - type: String - } - }, - setup() { - const descriptions = inject(descriptionsKey, {}); - return { - descriptions - }; - }, - render() { - var _a, _b, _c, _d; - const item = getNormalizedProps( - this.cell - ); - const directives = (((_a = this.cell) == null ? void 0 : _a.dirs) || []).map((dire) => { - const { dir, arg, modifiers, value } = dire; - return [dir, value, arg, modifiers]; - }); - const { border, direction: direction2 } = this.descriptions; - const isVertical = direction2 === "vertical"; - const renderLabel = () => { - var _a2, _b2, _c2; - return ((_c2 = (_b2 = (_a2 = this.cell) == null ? void 0 : _a2.children) == null ? void 0 : _b2.label) == null ? void 0 : _c2.call(_b2)) || item.label; - }; - const renderContent = () => { - var _a2, _b2, _c2; - return (_c2 = (_b2 = (_a2 = this.cell) == null ? void 0 : _a2.children) == null ? void 0 : _b2.default) == null ? void 0 : _c2.call(_b2); - }; - const span = item.span; - const rowspan = item.rowspan; - const align = item.align ? `is-${item.align}` : ""; - const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align; - const className = item.className; - const labelClassName = item.labelClassName; - const width = this.type === "label" ? (_c = (_b = item.labelWidth) != null ? _b : this.descriptions.labelWidth) != null ? _c : item.width : item.width; - const style = { - width: addUnit(width), - minWidth: addUnit(item.minWidth) - }; - const ns = useNamespace("descriptions"); - switch (this.type) { - case "label": - return withDirectives( - h( - this.tag, - { - style, - class: [ - ns.e("cell"), - ns.e("label"), - ns.is("bordered-label", border), - ns.is("vertical-label", isVertical), - labelAlign, - labelClassName - ], - colSpan: isVertical ? span : 1, - rowspan: isVertical ? 1 : rowspan - }, - renderLabel() - ), - directives - ); - case "content": - return withDirectives( - h( - this.tag, - { - style, - class: [ - ns.e("cell"), - ns.e("content"), - ns.is("bordered-content", border), - ns.is("vertical-content", isVertical), - align, - className - ], - colSpan: isVertical ? span : span * 2 - 1, - rowspan: isVertical ? rowspan * 2 - 1 : rowspan - }, - renderContent() - ), - directives - ); - default: { - const label = renderLabel(); - const labelStyle = {}; - const width2 = addUnit((_d = item.labelWidth) != null ? _d : this.descriptions.labelWidth); - if (width2) { - labelStyle.width = width2; - labelStyle.display = "inline-block"; - } - return withDirectives( - h( - "td", - { - style, - class: [ns.e("cell"), align], - colSpan: span, - rowspan - }, - [ - !isNil_default(label) ? h( - "span", - { - style: labelStyle, - class: [ns.e("label"), labelClassName] - }, - label - ) : void 0, - h( - "span", - { - class: [ns.e("content"), className] - }, - renderContent() - ) - ] - ), - directives - ); - } - } - } -}); - -// node_modules/element-plus/es/components/descriptions/src/descriptions-row.mjs -var descriptionsRowProps = buildProps({ - row: { - type: definePropType(Array), - default: () => [] - } -}); - -// node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs -var _hoisted_136 = { key: 1 }; -var _sfc_main74 = defineComponent({ - ...{ - name: "ElDescriptionsRow" - }, - __name: "descriptions-row", - props: descriptionsRowProps, - setup(__props) { - const descriptions = inject(descriptionsKey, {}); - return (_ctx, _cache) => { - return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createBaseVNode("tr", null, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.row, (cell, _index) => { - return openBlock(), createBlock(unref(ElDescriptionsCell), { - key: `tr1-${_index}`, - cell, - tag: "th", - type: "label" - }, null, 8, ["cell"]); - }), - 128 - )) - ]), - createBaseVNode("tr", null, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.row, (cell, _index) => { - return openBlock(), createBlock(unref(ElDescriptionsCell), { - key: `tr2-${_index}`, - cell, - tag: "td", - type: "content" - }, null, 8, ["cell"]); - }), - 128 - )) - ]) - ], - 64 - )) : (openBlock(), createElementBlock("tr", _hoisted_136, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.row, (cell, _index) => { - return openBlock(), createElementBlock( - Fragment, - { - key: `tr3-${_index}` - }, - [ - unref(descriptions).border ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createVNode(unref(ElDescriptionsCell), { - cell, - tag: "td", - type: "label" - }, null, 8, ["cell"]), - createVNode(unref(ElDescriptionsCell), { - cell, - tag: "td", - type: "content" - }, null, 8, ["cell"]) - ], - 64 - )) : (openBlock(), createBlock(unref(ElDescriptionsCell), { - key: 1, - cell, - tag: "td", - type: "both" - }, null, 8, ["cell"])) - ], - 64 - ); - }), - 128 - )) - ])); - }; - } -}); -var ElDescriptionsRow = _export_sfc(_sfc_main74, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]); - -// node_modules/element-plus/es/components/descriptions/src/description.mjs -var descriptionProps = buildProps({ - border: Boolean, - column: { - type: Number, - default: 3 - }, - direction: { - type: String, - values: ["horizontal", "vertical"], - default: "horizontal" - }, - size: useSizeProp, - title: { - type: String, - default: "" - }, - extra: { - type: String, - default: "" - }, - labelWidth: { - type: [String, Number] - } -}); - -// node_modules/element-plus/es/components/descriptions/src/constants.mjs -var COMPONENT_NAME11 = "ElDescriptionsItem"; - -// node_modules/element-plus/es/components/descriptions/src/description2.mjs -var _sfc_main75 = defineComponent({ - ...{ - name: "ElDescriptions" - }, - __name: "description", - props: descriptionProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("descriptions"); - const descriptionsSize = useFormSize(); - const slots = useSlots(); - provide(descriptionsKey, props2); - const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]); - const filledNode = (node, span, count, isLast = false) => { - if (!node.props) { - node.props = {}; - } - if (span > count) { - node.props.span = count; - } - if (isLast) { - node.props.span = span; - } - return node; - }; - const getRows = () => { - if (!slots.default) - return []; - const children = flattedChildren(slots.default()).filter( - (node) => { - var _a; - return ((_a = node == null ? void 0 : node.type) == null ? void 0 : _a.name) === COMPONENT_NAME11; - } - ); - const rows = []; - let temp = []; - let count = props2.column; - let totalSpan = 0; - const rowspanTemp = []; - children.forEach((node, index) => { - var _a, _b, _c; - const span = ((_a = node.props) == null ? void 0 : _a.span) || 1; - const rowspan = ((_b = node.props) == null ? void 0 : _b.rowspan) || 1; - const rowNo = rows.length; - rowspanTemp[rowNo] || (rowspanTemp[rowNo] = 0); - if (rowspan > 1) { - for (let i = 1; i < rowspan; i++) { - rowspanTemp[_c = rowNo + i] || (rowspanTemp[_c] = 0); - rowspanTemp[rowNo + i]++; - totalSpan++; - } - } - if (rowspanTemp[rowNo] > 0) { - count -= rowspanTemp[rowNo]; - rowspanTemp[rowNo] = 0; - } - if (index < children.length - 1) { - totalSpan += span > count ? count : span; - } - if (index === children.length - 1) { - const lastSpan = props2.column - totalSpan % props2.column; - temp.push(filledNode(node, lastSpan, count, true)); - rows.push(temp); - return; - } - if (span < count) { - count -= span; - temp.push(node); - } else { - temp.push(filledNode(node, span, count)); - rows.push(temp); - count = props2.column; - temp = []; - } - }); - return rows; - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(descriptionKls.value) - }, - [ - _ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("header")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("title")) - }, - [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("extra")) - }, - [ - renderSlot(_ctx.$slots, "extra", {}, () => [ - createTextVNode( - toDisplayString(_ctx.extra), - 1 - ) - ]) - ], - 2 - ) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("body")) - }, - [ - createBaseVNode( - "table", - { - class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", _ctx.border)]) - }, - [ - createBaseVNode("tbody", null, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(getRows(), (row, _index) => { - return openBlock(), createBlock(ElDescriptionsRow, { - key: _index, - row - }, null, 8, ["row"]); - }), - 128 - )) - ]) - ], - 2 - ) - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var Descriptions = _export_sfc(_sfc_main75, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/description.vue"]]); - -// node_modules/element-plus/es/constants/column-alignment.mjs -var columnAlignment = ["left", "center", "right"]; - -// node_modules/element-plus/es/components/descriptions/src/description-item.mjs -var descriptionItemProps = buildProps({ - label: { - type: String, - default: "" - }, - span: { - type: Number, - default: 1 - }, - rowspan: { - type: Number, - default: 1 - }, - width: { - type: [String, Number], - default: "" - }, - minWidth: { - type: [String, Number], - default: "" - }, - labelWidth: { - type: [String, Number] - }, - align: { - type: String, - values: columnAlignment, - default: "left" - }, - labelAlign: { - type: String, - values: columnAlignment - }, - className: { - type: String, - default: "" - }, - labelClassName: { - type: String, - default: "" - } -}); -var DescriptionItem = defineComponent({ - name: COMPONENT_NAME11, - props: descriptionItemProps -}); - -// node_modules/element-plus/es/components/descriptions/index.mjs -var ElDescriptions = withInstall(Descriptions, { - DescriptionsItem: DescriptionItem -}); -var ElDescriptionsItem = withNoopInstall(DescriptionItem); - -// node_modules/element-plus/es/hooks/use-same-target/index.mjs -var useSameTarget = (handleClick) => { - if (!handleClick) { - return { onClick: NOOP, onMousedown: NOOP, onMouseup: NOOP }; - } - let mousedownTarget = false; - let mouseupTarget = false; - const onClick = (e) => { - if (mousedownTarget && mouseupTarget) { - handleClick(e); - } - mousedownTarget = mouseupTarget = false; - }; - const onMousedown = (e) => { - mousedownTarget = e.target === e.currentTarget; - }; - const onMouseup = (e) => { - mouseupTarget = e.target === e.currentTarget; - }; - return { onClick, onMousedown, onMouseup }; -}; - -// node_modules/element-plus/es/components/overlay/src/overlay.mjs -var overlayProps = buildProps({ - mask: { - type: Boolean, - default: true - }, - customMaskEvent: Boolean, - overlayClass: { - type: definePropType([ - String, - Array, - Object - ]) - }, - zIndex: { - type: definePropType([String, Number]) - } -}); -var overlayEmits = { - click: (evt) => evt instanceof MouseEvent -}; -var BLOCK = "overlay"; -var Overlay = defineComponent({ - name: "ElOverlay", - props: overlayProps, - emits: overlayEmits, - setup(props2, { slots, emit }) { - const ns = useNamespace(BLOCK); - const onMaskClick = (e) => { - emit("click", e); - }; - const { onClick, onMousedown, onMouseup } = useSameTarget( - props2.customMaskEvent ? void 0 : onMaskClick - ); - return () => { - return props2.mask ? createVNode( - "div", - { - class: [ns.b(), props2.overlayClass], - style: { - zIndex: props2.zIndex - }, - onClick, - onMousedown, - onMouseup - }, - [renderSlot(slots, "default")], - PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, - ["onClick", "onMouseup", "onMousedown"] - ) : h( - "div", - { - class: props2.overlayClass, - style: { - zIndex: props2.zIndex, - position: "fixed", - top: "0px", - right: "0px", - bottom: "0px", - left: "0px" - } - }, - [renderSlot(slots, "default")] - ); - }; - } -}); - -// node_modules/element-plus/es/components/overlay/index.mjs -var ElOverlay = Overlay; - -// node_modules/element-plus/es/components/dialog/src/constants.mjs -var dialogInjectionKey = Symbol("dialogInjectionKey"); -var DEFAULT_DIALOG_TRANSITION = "dialog-fade"; - -// node_modules/element-plus/es/components/dialog/src/dialog-content.mjs -var dialogContentProps = buildProps({ - center: Boolean, - alignCenter: { - type: Boolean, - default: void 0 - }, - closeIcon: { - type: iconPropType - }, - draggable: { - type: Boolean, - default: void 0 - }, - overflow: { - type: Boolean, - default: void 0 - }, - fullscreen: Boolean, - headerClass: String, - bodyClass: String, - footerClass: String, - showClose: { - type: Boolean, - default: true - }, - title: { - type: String, - default: "" - }, - ariaLevel: { - type: String, - default: "2" - } -}); -var dialogContentEmits = { - close: () => true -}; - -// node_modules/element-plus/es/hooks/use-draggable/index.mjs -var useDraggable = (targetRef, dragRef, draggable2, overflow) => { - const transform2 = { - offsetX: 0, - offsetY: 0 - }; - const isDragging2 = ref(false); - const adjustPosition = (moveX, moveY) => { - if (targetRef.value) { - const { offsetX, offsetY } = transform2; - const targetRect = targetRef.value.getBoundingClientRect(); - const targetLeft = targetRect.left; - const targetTop = targetRect.top; - const targetWidth = targetRect.width; - const targetHeight = targetRect.height; - const clientWidth = document.documentElement.clientWidth; - const clientHeight = document.documentElement.clientHeight; - const minLeft = -targetLeft + offsetX; - const minTop = -targetTop + offsetY; - const maxLeft = clientWidth - targetLeft - targetWidth + offsetX; - const maxTop = clientHeight - targetTop - (targetHeight < clientHeight ? targetHeight : 0) + offsetY; - if (!(overflow == null ? void 0 : overflow.value)) { - moveX = Math.min(Math.max(moveX, minLeft), maxLeft); - moveY = Math.min(Math.max(moveY, minTop), maxTop); - } - transform2.offsetX = moveX; - transform2.offsetY = moveY; - targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit( - moveY - )})`; - } - }; - const onMousedown = (e) => { - const downX = e.clientX; - const downY = e.clientY; - const { offsetX, offsetY } = transform2; - const onMousemove = (e2) => { - if (!isDragging2.value) { - isDragging2.value = true; - } - const moveX = offsetX + e2.clientX - downX; - const moveY = offsetY + e2.clientY - downY; - adjustPosition(moveX, moveY); - }; - const onMouseup = () => { - isDragging2.value = false; - document.removeEventListener("mousemove", onMousemove); - document.removeEventListener("mouseup", onMouseup); - }; - document.addEventListener("mousemove", onMousemove); - document.addEventListener("mouseup", onMouseup); - }; - const onDraggable = () => { - if (dragRef.value && targetRef.value) { - dragRef.value.addEventListener("mousedown", onMousedown); - window.addEventListener("resize", updatePosition); - } - }; - const offDraggable = () => { - if (dragRef.value && targetRef.value) { - dragRef.value.removeEventListener("mousedown", onMousedown); - window.removeEventListener("resize", updatePosition); - } - }; - const resetPosition = () => { - transform2.offsetX = 0; - transform2.offsetY = 0; - if (targetRef.value) { - targetRef.value.style.transform = ""; - } - }; - const updatePosition = () => { - const { offsetX, offsetY } = transform2; - adjustPosition(offsetX, offsetY); - }; - onMounted(() => { - watchEffect(() => { - if (draggable2.value) { - onDraggable(); - } else { - offDraggable(); - } - }); - }); - onBeforeUnmount(() => { - offDraggable(); - }); - return { - isDragging: isDragging2, - resetPosition, - updatePosition - }; -}; - -// node_modules/element-plus/es/utils/vue/refs.mjs -var composeRefs = (...refs) => { - return (el) => { - refs.forEach((ref2) => { - ref2.value = el; - }); - }; -}; - -// node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs -var _hoisted_137 = ["aria-level"]; -var _hoisted_219 = ["aria-label"]; -var _hoisted_39 = ["id"]; -var _sfc_main76 = defineComponent({ - ...{ name: "ElDialogContent" }, - __name: "dialog-content", - props: dialogContentProps, - emits: dialogContentEmits, - setup(__props, { expose: __expose }) { - const { t } = useLocale(); - const { Close } = CloseComponents; - const props2 = __props; - const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey); - const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY); - const composedDialogRef = composeRefs(focusTrapRef, dialogRef); - const draggable2 = computed(() => !!props2.draggable); - const overflow = computed(() => !!props2.overflow); - const { resetPosition, updatePosition, isDragging: isDragging2 } = useDraggable( - dialogRef, - headerRef, - draggable2, - overflow - ); - const dialogKls = computed(() => [ - ns.b(), - ns.is("fullscreen", props2.fullscreen), - ns.is("draggable", draggable2.value), - ns.is("dragging", isDragging2.value), - ns.is("align-center", !!props2.alignCenter), - { [ns.m("center")]: props2.center } - ]); - __expose({ - resetPosition, - updatePosition - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref: unref(composedDialogRef), - class: normalizeClass(dialogKls.value), - style: normalizeStyle(unref(style)), - tabindex: "-1" - }, - [ - createBaseVNode( - "header", - { - ref_key: "headerRef", - ref: headerRef, - class: normalizeClass([unref(ns).e("header"), _ctx.headerClass, { "show-close": _ctx.showClose }]) - }, - [ - renderSlot(_ctx.$slots, "header", {}, () => [ - createBaseVNode("span", { - role: "heading", - "aria-level": _ctx.ariaLevel, - class: normalizeClass(unref(ns).e("title")) - }, toDisplayString(_ctx.title), 11, _hoisted_137) - ]), - _ctx.showClose ? (openBlock(), createElementBlock("button", { - key: 0, - "aria-label": unref(t)("el.dialog.close"), - class: normalizeClass(unref(ns).e("headerbtn")), - type: "button", - onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close")) - }, [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(ns).e("close")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || unref(Close)))) - ]), - _: 1 - }, 8, ["class"]) - ], 10, _hoisted_219)) : createCommentVNode("v-if", true) - ], - 2 - ), - createBaseVNode("div", { - id: unref(bodyId), - class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]) - }, [ - renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_39), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "footer", - { - key: 0, - class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass]) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ); - }; - } -}); -var ElDialogContent = _export_sfc(_sfc_main76, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]); - -// node_modules/element-plus/es/components/dialog/src/dialog.mjs -var dialogProps = buildProps({ - ...dialogContentProps, - appendToBody: Boolean, - appendTo: { - type: teleportProps.to.type, - default: "body" - }, - beforeClose: { - type: definePropType(Function) - }, - destroyOnClose: Boolean, - closeOnClickModal: { - type: Boolean, - default: true - }, - closeOnPressEscape: { - type: Boolean, - default: true - }, - lockScroll: { - type: Boolean, - default: true - }, - modal: { - type: Boolean, - default: true - }, - modalPenetrable: Boolean, - openDelay: { - type: Number, - default: 0 - }, - closeDelay: { - type: Number, - default: 0 - }, - top: { - type: String - }, - modelValue: Boolean, - modalClass: String, - headerClass: String, - bodyClass: String, - footerClass: String, - width: { - type: [String, Number] - }, - zIndex: { - type: Number - }, - trapFocus: Boolean, - headerAriaLevel: { - type: String, - default: "2" - }, - transition: { - type: definePropType([String, Object]), - default: void 0 - } -}); -var dialogEmits = { - open: () => true, - opened: () => true, - close: () => true, - closed: () => true, - [UPDATE_MODEL_EVENT]: (value) => isBoolean2(value), - openAutoFocus: () => true, - closeAutoFocus: () => true -}; -var dialogContextKey = Symbol("dialogContextKey"); - -// node_modules/element-plus/es/hooks/use-lockscreen/index.mjs -var useLockscreen = (trigger, options = {}) => { - if (!isRef(trigger)) { - throwError( - "[useLockscreen]", - "You need to pass a ref param to this function" - ); - } - const ns = options.ns || useNamespace("popup"); - const hiddenCls = computed(() => ns.bm("parent", "hidden")); - let scrollBarWidth2 = 0; - let withoutHiddenClass = false; - let bodyWidth = "0"; - let cleaned = false; - const cleanup = () => { - if (cleaned) - return; - cleaned = true; - setTimeout(() => { - if (typeof document === "undefined") - return; - if (withoutHiddenClass && document) { - document.body.style.width = bodyWidth; - removeClass(document.body, hiddenCls.value); - } - }, 200); - }; - watch(trigger, (val) => { - if (!val) { - cleanup(); - return; - } - cleaned = false; - withoutHiddenClass = !hasClass(document.body, hiddenCls.value); - if (withoutHiddenClass) { - bodyWidth = document.body.style.width; - addClass(document.body, hiddenCls.value); - } - scrollBarWidth2 = getScrollBarWidth(ns.namespace.value); - const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight; - const bodyOverflowY = getStyle(document.body, "overflowY"); - if (scrollBarWidth2 > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) { - document.body.style.width = `calc(100% - ${scrollBarWidth2}px)`; - } - }); - onScopeDispose(() => cleanup()); -}; - -// node_modules/element-plus/es/components/dialog/src/use-dialog.mjs -var COMPONENT_NAME12 = "ElDialog"; -var useDialog = (props2, targetRef) => { - var _a; - const instance = getCurrentInstance(); - const emit = instance.emit; - const { nextZIndex } = useZIndex(); - let lastPosition = ""; - const titleId = useId(); - const bodyId = useId(); - const visible = ref(false); - const closed = ref(false); - const rendered = ref(false); - const zIndex2 = ref((_a = props2.zIndex) != null ? _a : nextZIndex()); - const closing = ref(false); - let openTimer = void 0; - let closeTimer = void 0; - const config = useGlobalConfig(); - const namespace = computed(() => { - var _a2, _b; - return (_b = (_a2 = config.value) == null ? void 0 : _a2.namespace) != null ? _b : defaultNamespace; - }); - const globalConfig2 = computed(() => { - var _a2; - return (_a2 = config.value) == null ? void 0 : _a2.dialog; - }); - const style = computed(() => { - const style2 = {}; - const varPrefix = `--${namespace.value}-dialog`; - if (!props2.fullscreen) { - if (props2.top) { - style2[`${varPrefix}-margin-top`] = props2.top; - } - const width = addUnit(props2.width); - if (width) { - style2[`${varPrefix}-width`] = width; - } - } - return style2; - }); - const _draggable = computed( - () => { - var _a2, _b, _c; - return ((_c = (_b = props2.draggable) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.draggable) != null ? _c : false) && !props2.fullscreen; - } - ); - const _alignCenter = computed( - () => { - var _a2, _b, _c; - return (_c = (_b = props2.alignCenter) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.alignCenter) != null ? _c : false; - } - ); - const _overflow = computed( - () => { - var _a2, _b, _c; - return (_c = (_b = props2.overflow) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.overflow) != null ? _c : false; - } - ); - const overlayDialogStyle = computed(() => { - if (_alignCenter.value) { - return { display: "flex" }; - } - return {}; - }); - const transitionConfig = computed(() => { - var _a2, _b, _c; - const transition = (_c = (_b = props2.transition) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.transition) != null ? _c : DEFAULT_DIALOG_TRANSITION; - const baseConfig = { - name: transition, - onAfterEnter: afterEnter, - onBeforeLeave: beforeLeave, - onAfterLeave: afterLeave - }; - if (isObject(transition)) { - const config2 = { ...transition }; - const _mergeHook = (userHook, defaultHook) => { - return (el) => { - if (isArray(userHook)) { - userHook.forEach((fn2) => { - if (isFunction(fn2)) - fn2(el); - }); - } else if (isFunction(userHook)) { - userHook(el); - } - defaultHook(); - }; - }; - config2.onAfterEnter = _mergeHook(config2.onAfterEnter, afterEnter); - config2.onBeforeLeave = _mergeHook(config2.onBeforeLeave, beforeLeave); - config2.onAfterLeave = _mergeHook(config2.onAfterLeave, afterLeave); - if (!config2.name) { - config2.name = DEFAULT_DIALOG_TRANSITION; - debugWarn( - COMPONENT_NAME12, - `transition.name is missing when using object syntax, fallback to '${DEFAULT_DIALOG_TRANSITION}'` - ); - } - return config2; - } - return baseConfig; - }); - function afterEnter() { - emit("opened"); - } - function afterLeave() { - emit("closed"); - emit(UPDATE_MODEL_EVENT, false); - if (props2.destroyOnClose) { - rendered.value = false; - } - closing.value = false; - } - function beforeLeave() { - closing.value = true; - emit("close"); - } - function open() { - closeTimer == null ? void 0 : closeTimer(); - openTimer == null ? void 0 : openTimer(); - if (props2.openDelay && props2.openDelay > 0) { - ({ stop: openTimer } = useTimeoutFn(() => doOpen(), props2.openDelay)); - } else { - doOpen(); - } - } - function close2() { - openTimer == null ? void 0 : openTimer(); - closeTimer == null ? void 0 : closeTimer(); - if (props2.closeDelay && props2.closeDelay > 0) { - ({ stop: closeTimer } = useTimeoutFn(() => doClose(), props2.closeDelay)); - } else { - doClose(); - } - } - function handleClose() { - function hide2(shouldCancel) { - if (shouldCancel) - return; - closed.value = true; - visible.value = false; - } - if (props2.beforeClose) { - props2.beforeClose(hide2); - } else { - close2(); - } - } - function onModalClick() { - if (props2.closeOnClickModal) { - handleClose(); - } - } - function doOpen() { - if (!isClient) - return; - visible.value = true; - } - function doClose() { - visible.value = false; - } - function onOpenAutoFocus() { - emit("openAutoFocus"); - } - function onCloseAutoFocus() { - emit("closeAutoFocus"); - } - function onFocusoutPrevented(event) { - var _a2; - if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) === "pointer") { - event.preventDefault(); - } - } - if (props2.lockScroll) { - useLockscreen(visible); - } - function onCloseRequested() { - if (props2.closeOnPressEscape) { - handleClose(); - } - } - watch( - () => props2.zIndex, - () => { - var _a2; - zIndex2.value = (_a2 = props2.zIndex) != null ? _a2 : nextZIndex(); - } - ); - watch( - () => props2.modelValue, - (val) => { - var _a2; - if (val) { - closed.value = false; - closing.value = false; - open(); - rendered.value = true; - zIndex2.value = (_a2 = props2.zIndex) != null ? _a2 : nextZIndex(); - nextTick(() => { - emit("open"); - if (targetRef.value) { - targetRef.value.parentElement.scrollTop = 0; - targetRef.value.parentElement.scrollLeft = 0; - targetRef.value.scrollTop = 0; - } - }); - } else { - if (visible.value) { - close2(); - } - } - } - ); - watch( - () => props2.fullscreen, - (val) => { - if (!targetRef.value) - return; - if (val) { - lastPosition = targetRef.value.style.transform; - targetRef.value.style.transform = ""; - } else { - targetRef.value.style.transform = lastPosition; - } - } - ); - onMounted(() => { - if (props2.modelValue) { - visible.value = true; - rendered.value = true; - open(); - } - }); - return { - afterEnter, - afterLeave, - beforeLeave, - handleClose, - onModalClick, - close: close2, - doClose, - onOpenAutoFocus, - onCloseAutoFocus, - onCloseRequested, - onFocusoutPrevented, - titleId, - bodyId, - closed, - style, - overlayDialogStyle, - rendered, - visible, - zIndex: zIndex2, - transitionConfig, - _draggable, - _alignCenter, - _overflow, - closing - }; -}; - -// node_modules/element-plus/es/components/dialog/src/dialog2.mjs -var _hoisted_138 = ["aria-label", "aria-labelledby", "aria-describedby"]; -var _sfc_main77 = defineComponent({ - ...{ - name: "ElDialog", - inheritAttrs: false - }, - __name: "dialog", - props: dialogProps, - emits: dialogEmits, - setup(__props, { expose: __expose }) { - const props2 = __props; - const slots = useSlots(); - useDeprecated( - { - scope: "el-dialog", - from: "the title slot", - replacement: "the header slot", - version: "3.0.0", - ref: "https://element-plus.org/en-US/component/dialog.html#slots" - }, - computed(() => !!slots.title) - ); - const ns = useNamespace("dialog"); - const dialogRef = ref(); - const headerRef = ref(); - const dialogContentRef = ref(); - const { - visible, - titleId, - bodyId, - style, - overlayDialogStyle, - rendered, - transitionConfig, - zIndex: zIndex2, - _draggable, - _alignCenter, - _overflow, - handleClose, - onModalClick, - onOpenAutoFocus, - onCloseAutoFocus, - onCloseRequested, - onFocusoutPrevented, - closing - } = useDialog(props2, dialogRef); - provide(dialogInjectionKey, { - dialogRef, - headerRef, - bodyId, - ns, - rendered, - style - }); - const overlayEvent = useSameTarget(onModalClick); - const penetrable = computed( - () => props2.modalPenetrable && !props2.modal && !props2.fullscreen - ); - const resetPosition = () => { - var _a; - (_a = dialogContentRef.value) == null ? void 0 : _a.resetPosition(); - }; - __expose({ - visible, - dialogContentRef, - resetPosition, - handleClose - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTeleport), { - to: _ctx.appendTo, - disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody - }, { - default: withCtx(() => [ - createVNode( - Transition, - mergeProps(unref(transitionConfig), { persisted: "" }), - { - default: withCtx(() => { - var _a; - return [ - withDirectives(createVNode(unref(ElOverlay), { - "custom-mask-event": "", - mask: _ctx.modal, - "overlay-class": [ - (_a = _ctx.modalClass) != null ? _a : "", - `${unref(ns).namespace.value}-modal-dialog`, - unref(ns).is("penetrable", penetrable.value) - ], - "z-index": unref(zIndex2) - }, { - default: withCtx(() => [ - createBaseVNode("div", { - role: "dialog", - "aria-modal": "true", - "aria-label": _ctx.title || void 0, - "aria-labelledby": !_ctx.title ? unref(titleId) : void 0, - "aria-describedby": unref(bodyId), - class: normalizeClass([ - `${unref(ns).namespace.value}-overlay-dialog`, - unref(ns).is("closing", unref(closing)) - ]), - style: normalizeStyle(unref(overlayDialogStyle)), - onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)), - onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)), - onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args)) - }, [ - createVNode(unref(ElFocusTrap), { - loop: "", - trapped: unref(visible), - "focus-start-el": "container", - onFocusAfterTrapped: unref(onOpenAutoFocus), - onFocusAfterReleased: unref(onCloseAutoFocus), - onFocusoutPrevented: unref(onFocusoutPrevented), - onReleaseRequested: unref(onCloseRequested) - }, { - default: withCtx(() => [ - unref(rendered) ? (openBlock(), createBlock(ElDialogContent, mergeProps({ - key: 0, - ref_key: "dialogContentRef", - ref: dialogContentRef - }, _ctx.$attrs, { - center: _ctx.center, - "align-center": unref(_alignCenter), - "close-icon": _ctx.closeIcon, - draggable: unref(_draggable), - overflow: unref(_overflow), - fullscreen: _ctx.fullscreen, - "header-class": _ctx.headerClass, - "body-class": _ctx.bodyClass, - "footer-class": _ctx.footerClass, - "show-close": _ctx.showClose, - title: _ctx.title, - "aria-level": _ctx.headerAriaLevel, - onClose: unref(handleClose) - }), createSlots({ - header: withCtx(() => [ - !_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", { - key: 0, - close: unref(handleClose), - titleId: unref(titleId), - titleClass: unref(ns).e("title") - }) : renderSlot(_ctx.$slots, "title", { key: 1 }) - ]), - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 2 - }, [ - _ctx.$slots.footer ? { - name: "footer", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "footer") - ]), - key: "0" - } : void 0 - ]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"]) - ], 46, _hoisted_138) - ]), - _: 3 - }, 8, ["mask", "overlay-class", "z-index"]), [ - [vShow, unref(visible)] - ]) - ]; - }), - _: 3 - }, - 16 - ) - ]), - _: 3 - }, 8, ["to", "disabled"]); - }; - } -}); -var Dialog = _export_sfc(_sfc_main77, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]); - -// node_modules/element-plus/es/components/dialog/index.mjs -var ElDialog = withInstall(Dialog); - -// node_modules/element-plus/es/components/divider/src/divider.mjs -var dividerProps = buildProps({ - direction: { - type: String, - values: ["horizontal", "vertical"], - default: "horizontal" - }, - contentPosition: { - type: String, - values: ["left", "center", "right"], - default: "center" - }, - borderStyle: { - type: definePropType(String), - default: "solid" - } -}); - -// node_modules/element-plus/es/components/divider/src/divider2.mjs -var _sfc_main78 = defineComponent({ - ...{ - name: "ElDivider" - }, - __name: "divider", - props: dividerProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("divider"); - const dividerStyle = computed(() => { - return ns.cssVar({ - "border-style": props2.borderStyle - }); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.direction)]), - style: normalizeStyle(dividerStyle.value), - role: "separator" - }, - [ - _ctx.$slots.default && _ctx.direction !== "vertical" ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(ns).e("text"), unref(ns).is(_ctx.contentPosition)]) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ); - }; - } -}); -var Divider = _export_sfc(_sfc_main78, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]); - -// node_modules/element-plus/es/components/divider/index.mjs -var ElDivider = withInstall(Divider); - -// node_modules/element-plus/es/components/drawer/src/drawer.mjs -var drawerProps = buildProps({ - ...dialogProps, - direction: { - type: String, - default: "rtl", - values: ["ltr", "rtl", "ttb", "btt"] - }, - resizable: Boolean, - size: { - type: [String, Number], - default: "30%" - }, - withHeader: { - type: Boolean, - default: true - }, - modalFade: { - type: Boolean, - default: true - }, - headerAriaLevel: { - type: String, - default: "2" - } -}); -var drawerEmits = { - ...dialogEmits, - "resize-start": (evt, size3) => evt instanceof MouseEvent && typeof size3 === "number", - resize: (evt, size3) => evt instanceof MouseEvent && typeof size3 === "number", - "resize-end": (evt, size3) => evt instanceof MouseEvent && typeof size3 === "number" -}; - -// node_modules/element-plus/es/components/drawer/src/composables/useResizable.mjs -function useResizable(props2, target2, emit) { - const { width, height } = useWindowSize(); - const isHorizontal2 = computed(() => ["ltr", "rtl"].includes(props2.direction)); - const sign = computed( - () => ["ltr", "ttb"].includes(props2.direction) ? 1 : -1 - ); - const windowSize = computed( - () => isHorizontal2.value ? width.value : height.value - ); - const getSize = computed(() => { - return clamp2( - startSize.value + sign.value * offset3.value, - 4, - windowSize.value - ); - }); - const startSize = ref(0); - const offset3 = ref(0); - const isResizing = ref(false); - const hasStartedDragging = ref(false); - let startPos = []; - let cleanups = []; - const getActualSize = () => { - var _a; - const drawerEl = (_a = target2.value) == null ? void 0 : _a.closest('[aria-modal="true"]'); - if (drawerEl) { - return isHorizontal2.value ? drawerEl.offsetWidth : drawerEl.offsetHeight; - } - return 100; - }; - watch( - () => [props2.size, props2.resizable], - () => { - hasStartedDragging.value = false; - startSize.value = 0; - offset3.value = 0; - onMouseUp(); - } - ); - const onMousedown = (e) => { - if (!props2.resizable) - return; - if (!hasStartedDragging.value) { - startSize.value = getActualSize(); - hasStartedDragging.value = true; - } - startPos = [e.pageX, e.pageY]; - isResizing.value = true; - emit("resize-start", e, startSize.value); - cleanups.push( - useEventListener(window, "mouseup", onMouseUp), - useEventListener(window, "mousemove", onMouseMove) - ); - }; - const onMouseMove = (e) => { - const { pageX, pageY } = e; - const offsetX = pageX - startPos[0]; - const offsetY = pageY - startPos[1]; - offset3.value = isHorizontal2.value ? offsetX : offsetY; - emit("resize", e, getSize.value); - }; - const onMouseUp = (e) => { - if (!isResizing.value) - return; - startPos = []; - startSize.value = getSize.value; - offset3.value = 0; - isResizing.value = false; - cleanups.forEach((cleanup2) => cleanup2 == null ? void 0 : cleanup2()); - cleanups = []; - if (e) { - emit("resize-end", e, startSize.value); - } - }; - const cleanup = useEventListener(target2, "mousedown", onMousedown); - onBeforeUnmount(() => { - cleanup(); - onMouseUp(); - }); - return { - size: computed(() => { - return hasStartedDragging.value ? `${getSize.value}px` : addUnit(props2.size); - }), - isResizing, - isHorizontal: isHorizontal2 - }; -} - -// node_modules/element-plus/es/components/drawer/src/drawer2.mjs -var _hoisted_139 = ["aria-label", "aria-labelledby", "aria-describedby"]; -var _hoisted_220 = ["id", "aria-level"]; -var _hoisted_310 = ["aria-label"]; -var _hoisted_46 = ["id"]; -var _sfc_main79 = defineComponent({ - ...{ - name: "ElDrawer", - inheritAttrs: false - }, - __name: "drawer", - props: drawerProps, - emits: drawerEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const slots = useSlots(); - useDeprecated( - { - scope: "el-drawer", - from: "the title slot", - replacement: "the header slot", - version: "3.0.0", - ref: "https://element-plus.org/en-US/component/drawer.html#slots" - }, - computed(() => !!slots.title) - ); - const drawerRef = ref(); - const focusStartRef = ref(); - const draggerRef = ref(); - const ns = useNamespace("drawer"); - const { t } = useLocale(); - const { - afterEnter, - afterLeave, - beforeLeave, - visible, - rendered, - titleId, - bodyId, - zIndex: zIndex2, - onModalClick, - onOpenAutoFocus, - onCloseAutoFocus, - onFocusoutPrevented, - onCloseRequested, - handleClose - } = useDialog(props2, drawerRef); - const { isHorizontal: isHorizontal2, size: size3, isResizing } = useResizable(props2, draggerRef, emit); - const penetrable = computed(() => props2.modalPenetrable && !props2.modal); - __expose({ - handleClose, - afterEnter, - afterLeave - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTeleport), { - to: _ctx.appendTo, - disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody - }, { - default: withCtx(() => [ - createVNode(Transition, { - name: unref(ns).b("fade"), - onAfterEnter: unref(afterEnter), - onAfterLeave: unref(afterLeave), - onBeforeLeave: unref(beforeLeave), - persisted: "" - }, { - default: withCtx(() => { - var _a; - return [ - withDirectives(createVNode(unref(ElOverlay), { - mask: _ctx.modal, - "overlay-class": [ - unref(ns).is("drawer"), - (_a = _ctx.modalClass) != null ? _a : "", - `${unref(ns).namespace.value}-modal-drawer`, - unref(ns).is("penetrable", penetrable.value) - ], - "z-index": unref(zIndex2), - onClick: unref(onModalClick) - }, { - default: withCtx(() => [ - createVNode(unref(ElFocusTrap), { - loop: "", - trapped: unref(visible), - "focus-trap-el": drawerRef.value, - "focus-start-el": focusStartRef.value, - onFocusAfterTrapped: unref(onOpenAutoFocus), - onFocusAfterReleased: unref(onCloseAutoFocus), - onFocusoutPrevented: unref(onFocusoutPrevented), - onReleaseRequested: unref(onCloseRequested) - }, { - default: withCtx(() => [ - createBaseVNode("div", mergeProps({ - ref_key: "drawerRef", - ref: drawerRef, - "aria-modal": "true", - "aria-label": _ctx.title || void 0, - "aria-labelledby": !_ctx.title ? unref(titleId) : void 0, - "aria-describedby": unref(bodyId) - }, _ctx.$attrs, { - class: [ - unref(ns).b(), - _ctx.direction, - unref(visible) && "open", - unref(ns).is("dragging", unref(isResizing)) - ], - style: { [unref(isHorizontal2) ? "width" : "height"]: unref(size3) }, - role: "dialog", - onClick: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["stop"])) - }), [ - createBaseVNode( - "span", - { - ref_key: "focusStartRef", - ref: focusStartRef, - class: normalizeClass(unref(ns).e("sr-focus")), - tabindex: "-1" - }, - null, - 2 - ), - _ctx.withHeader ? (openBlock(), createElementBlock( - "header", - { - key: 0, - class: normalizeClass([unref(ns).e("header"), _ctx.headerClass]) - }, - [ - !_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", { - key: 0, - close: unref(handleClose), - titleId: unref(titleId), - titleClass: unref(ns).e("title") - }, () => [ - createBaseVNode("span", { - id: unref(titleId), - role: "heading", - "aria-level": _ctx.headerAriaLevel, - class: normalizeClass(unref(ns).e("title")) - }, toDisplayString(_ctx.title), 11, _hoisted_220) - ]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [ - createCommentVNode(" DEPRECATED SLOT ") - ]), - _ctx.showClose ? (openBlock(), createElementBlock("button", { - key: 2, - "aria-label": unref(t)("el.drawer.close"), - class: normalizeClass(unref(ns).e("close-btn")), - type: "button", - onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClose) && unref(handleClose)(...args)) - }, [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(ns).e("close")) - }, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }, 8, ["class"]) - ], 10, _hoisted_310)) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true), - unref(rendered) ? (openBlock(), createElementBlock("div", { - key: 1, - id: unref(bodyId), - class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]) - }, [ - renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_46)) : createCommentVNode("v-if", true), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass]) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.resizable ? (openBlock(), createElementBlock( - "div", - { - key: 3, - ref_key: "draggerRef", - ref: draggerRef, - style: normalizeStyle({ zIndex: unref(zIndex2) }), - class: normalizeClass(unref(ns).e("dragger")) - }, - null, - 6 - )) : createCommentVNode("v-if", true) - ], 16, _hoisted_139) - ]), - _: 3 - }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"]) - ]), - _: 3 - }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [ - [vShow, unref(visible)] - ]) - ]; - }), - _: 3 - }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"]) - ]), - _: 3 - }, 8, ["to", "disabled"]); - }; - } -}); -var Drawer = _export_sfc(_sfc_main79, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/drawer/src/drawer.vue"]]); - -// node_modules/element-plus/es/components/drawer/index.mjs -var ElDrawer = withInstall(Drawer); - -// node_modules/element-plus/es/components/collection/src/collection2.mjs -var _sfc_main80 = defineComponent({ - inheritAttrs: false -}); -function _sfc_render6(_ctx, _cache, $props, $setup, $data, $options) { - return renderSlot(_ctx.$slots, "default"); -} -var Collection = _export_sfc(_sfc_main80, [["render", _sfc_render6], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]); - -// node_modules/element-plus/es/components/collection/src/collection-item.mjs -var _sfc_main81 = defineComponent({ - name: "ElCollectionItem", - inheritAttrs: false -}); -function _sfc_render7(_ctx, _cache, $props, $setup, $data, $options) { - return renderSlot(_ctx.$slots, "default"); -} -var CollectionItem = _export_sfc(_sfc_main81, [["render", _sfc_render7], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]); - -// node_modules/element-plus/es/components/collection/src/collection.mjs -var COLLECTION_ITEM_SIGN = `data-el-collection-item`; -var createCollectionWithScope = (name) => { - const COLLECTION_NAME = `El${name}Collection`; - const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`; - const COLLECTION_INJECTION_KEY2 = Symbol(COLLECTION_NAME); - const COLLECTION_ITEM_INJECTION_KEY2 = Symbol(COLLECTION_ITEM_NAME); - const ElCollection2 = Object.assign({}, Collection, { - name: COLLECTION_NAME, - setup() { - const collectionRef = ref(); - const itemMap = /* @__PURE__ */ new Map(); - const getItems = () => { - const collectionEl = unref(collectionRef); - if (!collectionEl) - return []; - const orderedNodes = Array.from( - collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`) - ); - const items = [...itemMap.values()]; - return items.sort( - (a2, b2) => orderedNodes.indexOf(a2.ref) - orderedNodes.indexOf(b2.ref) - ); - }; - provide(COLLECTION_INJECTION_KEY2, { - itemMap, - getItems, - collectionRef - }); - } - }); - const ElCollectionItem2 = Object.assign({}, CollectionItem, { - name: COLLECTION_ITEM_NAME, - setup(_2, { attrs }) { - const collectionItemRef = ref(); - const collectionInjection = inject(COLLECTION_INJECTION_KEY2, void 0); - provide(COLLECTION_ITEM_INJECTION_KEY2, { - collectionItemRef - }); - onMounted(() => { - const collectionItemEl = unref(collectionItemRef); - if (collectionItemEl) { - collectionInjection.itemMap.set(collectionItemEl, { - ref: collectionItemEl, - ...attrs - }); - } - }); - onBeforeUnmount(() => { - const collectionItemEl = unref(collectionItemRef); - collectionInjection.itemMap.delete(collectionItemEl); - }); - } - }); - return { - COLLECTION_INJECTION_KEY: COLLECTION_INJECTION_KEY2, - COLLECTION_ITEM_INJECTION_KEY: COLLECTION_ITEM_INJECTION_KEY2, - ElCollection: ElCollection2, - ElCollectionItem: ElCollectionItem2 - }; -}; - -// node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs -var rovingFocusGroupProps = buildProps({ - style: { type: definePropType([String, Array, Object]) }, - currentTabId: { - type: definePropType(String) - }, - defaultCurrentTabId: String, - loop: Boolean, - dir: { - type: String, - values: ["ltr", "rtl"], - default: "ltr" - }, - orientation: { - type: definePropType(String) - }, - onBlur: Function, - onFocus: Function, - onMousedown: Function -}); -var { - ElCollection, - ElCollectionItem, - COLLECTION_INJECTION_KEY, - COLLECTION_ITEM_INJECTION_KEY -} = createCollectionWithScope("RovingFocusGroup"); - -// node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs -var ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup"); -var ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem"); - -// node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs -var MAP_KEY_TO_FOCUS_INTENT = { - ArrowLeft: "prev", - ArrowUp: "prev", - ArrowRight: "next", - ArrowDown: "next", - PageUp: "first", - Home: "first", - PageDown: "last", - End: "last" -}; -var getDirectionAwareKey = (key, dir) => { - if (dir !== "rtl") - return key; - switch (key) { - case EVENT_CODE.right: - return EVENT_CODE.left; - case EVENT_CODE.left: - return EVENT_CODE.right; - default: - return key; - } -}; -var getFocusIntent = (event, orientation, dir) => { - const code = getEventCode(event); - const key = getDirectionAwareKey(code, dir); - if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key)) - return void 0; - if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key)) - return void 0; - return MAP_KEY_TO_FOCUS_INTENT[key]; -}; -var reorderArray = (array4, atIdx) => { - return array4.map((_2, idx) => array4[(idx + atIdx) % array4.length]); -}; -var focusFirst = (elements) => { - const { activeElement: prevActive } = document; - for (const element of elements) { - if (element === prevActive) - return; - element.focus(); - if (prevActive !== document.activeElement) - return; - } -}; - -// node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs -var CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange"; -var ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus"; -var EVT_OPTS = { bubbles: false, cancelable: true }; -var _sfc_main82 = defineComponent({ - name: "ElRovingFocusGroupImpl", - inheritAttrs: false, - props: rovingFocusGroupProps, - emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"], - setup(props2, { emit }) { - var _a; - const currentTabbedId = ref( - (_a = props2.currentTabId || props2.defaultCurrentTabId) != null ? _a : null - ); - const isBackingOut = ref(false); - const isClickFocus = ref(false); - const rovingFocusGroupRef = ref(); - const { getItems } = inject( - COLLECTION_INJECTION_KEY, - void 0 - ); - const rovingFocusGroupRootStyle = computed(() => { - return [ - { - outline: "none" - }, - props2.style - ]; - }); - const onItemFocus = (tabbedId) => { - emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId); - }; - const onItemShiftTab = () => { - isBackingOut.value = true; - }; - const onMousedown = composeEventHandlers( - (e) => { - var _a2; - (_a2 = props2.onMousedown) == null ? void 0 : _a2.call(props2, e); - }, - () => { - isClickFocus.value = true; - } - ); - const onFocus = composeEventHandlers( - (e) => { - var _a2; - (_a2 = props2.onFocus) == null ? void 0 : _a2.call(props2, e); - }, - (e) => { - const isKeyboardFocus = !unref(isClickFocus); - const { target: target2, currentTarget } = e; - if (target2 === currentTarget && isKeyboardFocus && !unref(isBackingOut)) { - const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS); - currentTarget == null ? void 0 : currentTarget.dispatchEvent(entryFocusEvt); - if (!entryFocusEvt.defaultPrevented) { - const items = getItems().filter((item) => item.focusable); - const activeItem = items.find((item) => item.active); - const currentItem = items.find( - (item) => item.id === unref(currentTabbedId) - ); - const candidates = [activeItem, currentItem, ...items].filter( - Boolean - ); - const candidateNodes = candidates.map((item) => item.ref); - focusFirst(candidateNodes); - } - } - isClickFocus.value = false; - } - ); - const onBlur = composeEventHandlers( - (e) => { - var _a2; - (_a2 = props2.onBlur) == null ? void 0 : _a2.call(props2, e); - }, - () => { - isBackingOut.value = false; - } - ); - const handleEntryFocus = (...args) => { - emit("entryFocus", ...args); - }; - const onKeydown = (e) => { - const focusIntent = getFocusIntent(e); - if (focusIntent) { - e.preventDefault(); - const items = getItems().filter((item) => item.focusable); - let elements = items.map((item) => item.ref); - switch (focusIntent) { - case "last": { - elements.reverse(); - break; - } - case "prev": - case "next": { - if (focusIntent === "prev") { - elements.reverse(); - } - const currentIdx = elements.indexOf(e.currentTarget); - elements = props2.loop ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1); - break; - } - } - nextTick(() => { - focusFirst(elements); - }); - } - }; - provide(ROVING_FOCUS_GROUP_INJECTION_KEY, { - currentTabbedId: readonly(currentTabbedId), - loop: toRef(props2, "loop"), - tabIndex: computed(() => { - return unref(isBackingOut) ? -1 : 0; - }), - rovingFocusGroupRef, - rovingFocusGroupRootStyle, - orientation: toRef(props2, "orientation"), - dir: toRef(props2, "dir"), - onItemFocus, - onItemShiftTab, - onBlur, - onFocus, - onMousedown, - onKeydown - }); - watch( - () => props2.currentTabId, - (val) => { - currentTabbedId.value = val != null ? val : null; - } - ); - useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus); - } -}); -function _sfc_render8(_ctx, _cache, $props, $setup, $data, $options) { - return renderSlot(_ctx.$slots, "default"); -} -var ElRovingFocusGroupImpl = _export_sfc(_sfc_main82, [["render", _sfc_render8], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group-impl.vue"]]); - -// node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs -var _sfc_main83 = defineComponent({ - name: "ElRovingFocusGroup", - components: { - ElFocusGroupCollection: ElCollection, - ElRovingFocusGroupImpl - } -}); -function _sfc_render9(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl"); - const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection"); - return openBlock(), createBlock(_component_el_focus_group_collection, null, { - default: withCtx(() => [ - createVNode( - _component_el_roving_focus_group_impl, - normalizeProps(guardReactiveProps(_ctx.$attrs)), - { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, - 16 - ) - ]), - _: 3 - }); -} -var ElRovingFocusGroup = _export_sfc(_sfc_main83, [["render", _sfc_render9], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group.vue"]]); - -// node_modules/element-plus/es/components/dropdown/src/dropdown.mjs -var dropdownProps = buildProps({ - trigger: { - ...useTooltipTriggerProps.trigger, - type: definePropType([ - String, - Array - ]) - }, - triggerKeys: { - type: definePropType(Array), - default: () => [ - EVENT_CODE.enter, - EVENT_CODE.numpadEnter, - EVENT_CODE.space, - EVENT_CODE.down - ] - }, - virtualTriggering: useTooltipTriggerProps.virtualTriggering, - virtualRef: useTooltipTriggerProps.virtualRef, - effect: { - ...useTooltipContentProps.effect, - default: "light" - }, - type: { - type: definePropType(String) - }, - placement: { - type: definePropType(String), - default: "bottom" - }, - popperOptions: { - type: definePropType(Object), - default: () => ({}) - }, - id: String, - size: { - type: String, - default: "" - }, - splitButton: Boolean, - hideOnClick: { - type: Boolean, - default: true - }, - loop: { - type: Boolean, - default: true - }, - showArrow: { - type: Boolean, - default: true - }, - showTimeout: { - type: Number, - default: 150 - }, - hideTimeout: { - type: Number, - default: 150 - }, - tabindex: { - type: definePropType([Number, String]), - default: 0 - }, - maxHeight: { - type: definePropType([Number, String]), - default: "" - }, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - disabled: Boolean, - role: { - type: String, - values: roleTypes, - default: "menu" - }, - buttonProps: { - type: definePropType(Object) - }, - teleported: useTooltipContentProps.teleported, - appendTo: useTooltipContentProps.appendTo, - persistent: { - type: Boolean, - default: true - } -}); -var dropdownItemProps = buildProps({ - command: { - type: [Object, String, Number], - default: () => ({}) - }, - disabled: Boolean, - divided: Boolean, - textValue: String, - icon: { - type: iconPropType - } -}); -var dropdownMenuProps = buildProps({ - onKeydown: { type: definePropType(Function) } -}); -var FIRST_KEYS = [ - EVENT_CODE.down, - EVENT_CODE.pageDown, - EVENT_CODE.home -]; -var LAST_KEYS = [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end]; -var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]; - -// node_modules/element-plus/es/components/dropdown/src/tokens.mjs -var DROPDOWN_INJECTION_KEY = Symbol("elDropdown"); -var DROPDOWN_INSTANCE_INJECTION_KEY = "elDropdown"; - -// node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs -var { ButtonGroup: ElButtonGroup2 } = ElButton; -var _sfc_main84 = defineComponent({ - name: "ElDropdown", - components: { - ElButton, - ElButtonGroup: ElButtonGroup2, - ElScrollbar, - ElTooltip, - ElRovingFocusGroup, - ElOnlyChild: OnlyChild, - ElIcon, - ArrowDown: arrow_down_default - }, - props: dropdownProps, - emits: ["visible-change", "click", "command"], - setup(props2, { emit }) { - const _instance = getCurrentInstance(); - const ns = useNamespace("dropdown"); - const { t } = useLocale(); - const triggeringElementRef = ref(); - const referenceElementRef = ref(); - const popperRef = ref(); - const contentRef = ref(); - const scrollbar = ref(null); - const currentTabId = ref(null); - const isUsingKeyboard = ref(false); - const wrapStyle = computed(() => ({ - maxHeight: addUnit(props2.maxHeight) - })); - const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)]); - const trigger = computed(() => castArray_default(props2.trigger)); - const defaultTriggerId = useId().value; - const triggerId = computed(() => props2.id || defaultTriggerId); - function handleClick() { - var _a; - (_a = popperRef.value) == null ? void 0 : _a.onClose(void 0, 0); - } - function handleClose() { - var _a; - (_a = popperRef.value) == null ? void 0 : _a.onClose(); - } - function handleOpen() { - var _a; - (_a = popperRef.value) == null ? void 0 : _a.onOpen(); - } - const dropdownSize = useFormSize(); - function commandHandler(...args) { - emit("command", ...args); - } - function onItemEnter() { - } - function onItemLeave() { - const contentEl = unref(contentRef); - trigger.value.includes("hover") && (contentEl == null ? void 0 : contentEl.focus({ - preventScroll: true - })); - currentTabId.value = null; - } - function handleCurrentTabIdChange(id) { - currentTabId.value = id; - } - function handleBeforeShowTooltip() { - emit("visible-change", true); - } - function handleShowTooltip(event) { - var _a; - isUsingKeyboard.value = (event == null ? void 0 : event.type) === "keydown"; - (_a = contentRef.value) == null ? void 0 : _a.focus(); - } - function handleBeforeHideTooltip() { - emit("visible-change", false); - } - provide(DROPDOWN_INJECTION_KEY, { - contentRef, - role: computed(() => props2.role), - triggerId, - isUsingKeyboard, - onItemEnter, - onItemLeave, - handleClose - }); - provide(DROPDOWN_INSTANCE_INJECTION_KEY, { - instance: _instance, - dropdownSize, - handleClick, - commandHandler, - trigger: toRef(props2, "trigger"), - hideOnClick: toRef(props2, "hideOnClick") - }); - const handlerMainButtonClick = (event) => { - emit("click", event); - }; - return { - t, - ns, - scrollbar, - wrapStyle, - dropdownTriggerKls, - dropdownSize, - triggerId, - currentTabId, - handleCurrentTabIdChange, - handlerMainButtonClick, - handleClose, - handleOpen, - handleBeforeShowTooltip, - handleShowTooltip, - handleBeforeHideTooltip, - popperRef, - contentRef, - triggeringElementRef, - referenceElementRef - }; - } -}); -function _sfc_render10(_ctx, _cache, $props, $setup, $data, $options) { - var _a; - const _component_el_roving_focus_group = resolveComponent("el-roving-focus-group"); - const _component_el_scrollbar = resolveComponent("el-scrollbar"); - const _component_el_only_child = resolveComponent("el-only-child"); - const _component_el_tooltip = resolveComponent("el-tooltip"); - const _component_el_button = resolveComponent("el-button"); - const _component_arrow_down = resolveComponent("arrow-down"); - const _component_el_icon = resolveComponent("el-icon"); - const _component_el_button_group = resolveComponent("el-button-group"); - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("disabled", _ctx.disabled)]) - }, - [ - createVNode(_component_el_tooltip, { - ref: "popperRef", - role: _ctx.role, - effect: _ctx.effect, - "fallback-placements": ["bottom", "top"], - "popper-options": _ctx.popperOptions, - "gpu-acceleration": false, - placement: _ctx.placement, - "popper-class": [_ctx.ns.e("popper"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - trigger: _ctx.trigger, - "trigger-keys": _ctx.triggerKeys, - "trigger-target-el": _ctx.contentRef, - "show-arrow": _ctx.showArrow, - "show-after": _ctx.trigger === "hover" ? _ctx.showTimeout : 0, - "hide-after": _ctx.trigger === "hover" ? _ctx.hideTimeout : 0, - "virtual-ref": (_a = _ctx.virtualRef) != null ? _a : _ctx.triggeringElementRef, - "virtual-triggering": _ctx.virtualTriggering || _ctx.splitButton, - disabled: _ctx.disabled, - transition: `${_ctx.ns.namespace.value}-zoom-in-top`, - teleported: _ctx.teleported, - "append-to": _ctx.appendTo, - pure: "", - "focus-on-target": "", - persistent: _ctx.persistent, - onBeforeShow: _ctx.handleBeforeShowTooltip, - onShow: _ctx.handleShowTooltip, - onBeforeHide: _ctx.handleBeforeHideTooltip - }, createSlots({ - content: withCtx(() => [ - createVNode(_component_el_scrollbar, { - ref: "scrollbar", - "wrap-style": _ctx.wrapStyle, - tag: "div", - "view-class": _ctx.ns.e("list") - }, { - default: withCtx(() => [ - createVNode(_component_el_roving_focus_group, { - loop: _ctx.loop, - "current-tab-id": _ctx.currentTabId, - orientation: "horizontal", - onCurrentTabIdChange: _ctx.handleCurrentTabIdChange - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "dropdown") - ]), - _: 3 - }, 8, ["loop", "current-tab-id", "onCurrentTabIdChange"]) - ]), - _: 3 - }, 8, ["wrap-style", "view-class"]) - ]), - _: 2 - }, [ - !_ctx.splitButton ? { - name: "default", - fn: withCtx(() => [ - createVNode(_component_el_only_child, { - id: _ctx.triggerId, - ref: "triggeringElementRef", - role: "button", - tabindex: _ctx.tabindex - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["id", "tabindex"]) - ]), - key: "0" - } : void 0 - ]), 1032, ["role", "effect", "popper-options", "placement", "popper-class", "popper-style", "trigger", "trigger-keys", "trigger-target-el", "show-arrow", "show-after", "hide-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "append-to", "persistent", "onBeforeShow", "onShow", "onBeforeHide"]), - _ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, { - default: withCtx(() => [ - createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, { - size: _ctx.dropdownSize, - type: _ctx.type, - disabled: _ctx.disabled, - tabindex: _ctx.tabindex, - onClick: _ctx.handlerMainButtonClick - }), { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 16, ["size", "type", "disabled", "tabindex", "onClick"]), - createVNode(_component_el_button, mergeProps({ - id: _ctx.triggerId, - ref: "triggeringElementRef" - }, _ctx.buttonProps, { - role: "button", - size: _ctx.dropdownSize, - type: _ctx.type, - class: _ctx.ns.e("caret-button"), - disabled: _ctx.disabled, - tabindex: _ctx.tabindex, - "aria-label": _ctx.t("el.dropdown.toggleDropdown") - }), { - default: withCtx(() => [ - createVNode(_component_el_icon, { - class: normalizeClass(_ctx.ns.e("icon")) - }, { - default: withCtx(() => [ - createVNode(_component_arrow_down) - ]), - _: 1 - }, 8, ["class"]) - ]), - _: 1 - }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"]) - ]), - _: 3 - })) : createCommentVNode("v-if", true) - ], - 2 - ); -} -var Dropdown = _export_sfc(_sfc_main84, [["render", _sfc_render10], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown.vue"]]); - -// node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs -var _sfc_main85 = defineComponent({ - components: { - ElRovingFocusCollectionItem: ElCollectionItem - }, - props: { - focusable: { - type: Boolean, - default: true - }, - active: Boolean - }, - emits: ["mousedown", "focus", "keydown"], - setup(props2, { emit }) { - const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject( - ROVING_FOCUS_GROUP_INJECTION_KEY, - void 0 - ); - const id = useId(); - const rovingFocusGroupItemRef = ref(); - const handleMousedown = composeEventHandlers( - (e) => { - emit("mousedown", e); - }, - (e) => { - if (!props2.focusable) { - e.preventDefault(); - } else { - onItemFocus(unref(id)); - } - } - ); - const handleFocus = composeEventHandlers( - (e) => { - emit("focus", e); - }, - () => { - onItemFocus(unref(id)); - } - ); - const handleKeydown = composeEventHandlers( - (e) => { - emit("keydown", e); - }, - (e) => { - const { shiftKey, target: target2, currentTarget } = e; - const code = getEventCode(e); - if (code === EVENT_CODE.tab && shiftKey) { - onItemShiftTab(); - return; - } - if (target2 !== currentTarget) - return; - onKeydown(e); - } - ); - const isCurrentTab = computed(() => currentTabbedId.value === unref(id)); - provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, { - rovingFocusGroupItemRef, - tabIndex: computed(() => unref(isCurrentTab) ? 0 : -1), - handleMousedown, - handleFocus, - handleKeydown - }); - return { - id, - handleKeydown, - handleFocus, - handleMousedown - }; - } -}); -function _sfc_render11(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item"); - return openBlock(), createBlock(_component_el_roving_focus_collection_item, { - id: _ctx.id, - focusable: _ctx.focusable, - active: _ctx.active - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["id", "focusable", "active"]); -} -var ElRovingFocusItem = _export_sfc(_sfc_main85, [["render", _sfc_render11], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-item.vue"]]); - -// node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.mjs -var _sfc_main86 = defineComponent({ - name: "DropdownItemImpl", - components: { - ElIcon - }, - props: dropdownItemProps, - emits: ["pointermove", "pointerleave", "click", "clickimpl"], - setup(_2, { emit }) { - const ns = useNamespace("dropdown"); - const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, void 0); - const { collectionItemRef: rovingFocusCollectionItemRef } = inject( - COLLECTION_ITEM_INJECTION_KEY, - void 0 - ); - const { - rovingFocusGroupItemRef, - tabIndex, - handleFocus, - handleKeydown: handleItemKeydown, - handleMousedown - } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, void 0); - const itemRef = composeRefs( - rovingFocusCollectionItemRef, - rovingFocusGroupItemRef - ); - const role = computed(() => { - if (menuRole.value === "menu") { - return "menuitem"; - } else if (menuRole.value === "navigation") { - return "link"; - } - return "button"; - }); - const handleKeydown = composeEventHandlers((e) => { - const code = getEventCode(e); - if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space].includes( - code - )) { - e.preventDefault(); - e.stopImmediatePropagation(); - emit("clickimpl", e); - return true; - } - }, handleItemKeydown); - return { - ns, - itemRef, - dataset: { - [COLLECTION_ITEM_SIGN]: "" - }, - role, - tabIndex, - handleFocus, - handleKeydown, - handleMousedown - }; - } -}); -var _hoisted_140 = ["aria-disabled", "tabindex", "role"]; -function _sfc_render12(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_icon = resolveComponent("el-icon"); - return openBlock(), createElementBlock( - Fragment, - null, - [ - _ctx.divided ? (openBlock(), createElementBlock( - "li", - { - key: 0, - role: "separator", - class: normalizeClass(_ctx.ns.bem("menu", "item", "divided")) - }, - null, - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode("li", mergeProps({ ref: _ctx.itemRef }, { ..._ctx.dataset, ..._ctx.$attrs }, { - "aria-disabled": _ctx.disabled, - class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)], - tabindex: _ctx.tabIndex, - role: _ctx.role, - onClick: _cache[0] || (_cache[0] = (e) => _ctx.$emit("clickimpl", e)), - onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), - onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])), - onMousedown: _cache[3] || (_cache[3] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)), - onPointermove: _cache[4] || (_cache[4] = (e) => _ctx.$emit("pointermove", e)), - onPointerleave: _cache[5] || (_cache[5] = (e) => _ctx.$emit("pointerleave", e)) - }), [ - _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "icon", {}, () => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]) - ]), - _: 3 - })) : createCommentVNode("v-if", true), - renderSlot(_ctx.$slots, "default") - ], 16, _hoisted_140) - ], - 64 - ); -} -var ElDropdownItemImpl = _export_sfc(_sfc_main86, [["render", _sfc_render12], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item-impl.vue"]]); - -// node_modules/element-plus/es/components/dropdown/src/useDropdown.mjs -var useDropdown = () => { - const elDropdown = inject( - DROPDOWN_INSTANCE_INJECTION_KEY, - {} - ); - const _elDropdownSize = computed(() => elDropdown == null ? void 0 : elDropdown.dropdownSize); - return { - elDropdown, - _elDropdownSize - }; -}; - -// node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs -var _sfc_main87 = defineComponent({ - name: "ElDropdownItem", - components: { - ElRovingFocusItem, - ElDropdownItemImpl - }, - inheritAttrs: false, - props: dropdownItemProps, - emits: ["pointermove", "pointerleave", "click"], - setup(props2, { emit, attrs }) { - const { elDropdown } = useDropdown(); - const _instance = getCurrentInstance(); - const { onItemEnter, onItemLeave } = inject( - DROPDOWN_INJECTION_KEY, - void 0 - ); - const handlePointerMove = composeEventHandlers( - (e) => { - emit("pointermove", e); - return e.defaultPrevented; - }, - whenMouse((e) => { - if (props2.disabled) { - onItemLeave(e); - return; - } - const target2 = e.currentTarget; - if (target2 === document.activeElement || target2.contains(document.activeElement)) { - return; - } - onItemEnter(e); - if (!e.defaultPrevented) { - target2 == null ? void 0 : target2.focus({ - preventScroll: true - }); - } - }) - ); - const handlePointerLeave = composeEventHandlers((e) => { - emit("pointerleave", e); - return e.defaultPrevented; - }, whenMouse(onItemLeave)); - const handleClick = composeEventHandlers( - (e) => { - if (props2.disabled) { - return; - } - emit("click", e); - return e.type !== "keydown" && e.defaultPrevented; - }, - (e) => { - var _a, _b, _c; - if (props2.disabled) { - e.stopImmediatePropagation(); - return; - } - if ((_a = elDropdown == null ? void 0 : elDropdown.hideOnClick) == null ? void 0 : _a.value) { - (_b = elDropdown.handleClick) == null ? void 0 : _b.call(elDropdown); - } - (_c = elDropdown.commandHandler) == null ? void 0 : _c.call(elDropdown, props2.command, _instance, e); - } - ); - const propsAndAttrs = computed(() => ({ ...props2, ...attrs })); - return { - handleClick, - handlePointerMove, - handlePointerLeave, - propsAndAttrs - }; - } -}); -function _sfc_render13(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_dropdown_item_impl = resolveComponent("el-dropdown-item-impl"); - const _component_el_roving_focus_item = resolveComponent("el-roving-focus-item"); - return openBlock(), createBlock(_component_el_roving_focus_item, { - focusable: !_ctx.disabled - }, { - default: withCtx(() => [ - createVNode(_component_el_dropdown_item_impl, mergeProps(_ctx.propsAndAttrs, { - onPointerleave: _ctx.handlePointerLeave, - onPointermove: _ctx.handlePointerMove, - onClickimpl: _ctx.handleClick - }), createSlots({ - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 2 - }, [ - _ctx.$slots.icon ? { - name: "icon", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "icon") - ]), - key: "0" - } : void 0 - ]), 1040, ["onPointerleave", "onPointermove", "onClickimpl"]) - ]), - _: 3 - }, 8, ["focusable"]); -} -var DropdownItem = _export_sfc(_sfc_main87, [["render", _sfc_render13], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item.vue"]]); - -// node_modules/element-plus/es/components/dropdown/src/dropdown-menu.mjs -var _sfc_main88 = defineComponent({ - name: "ElDropdownMenu", - props: dropdownMenuProps, - setup(props2) { - const ns = useNamespace("dropdown"); - const { _elDropdownSize } = useDropdown(); - const size3 = _elDropdownSize.value; - const { contentRef, role, triggerId, isUsingKeyboard, handleClose } = inject(DROPDOWN_INJECTION_KEY, void 0); - const { - rovingFocusGroupRef, - rovingFocusGroupRootStyle, - onBlur, - onFocus, - onKeydown, - onMousedown - } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0); - const { collectionRef: rovingFocusGroupCollectionRef } = inject( - COLLECTION_INJECTION_KEY, - void 0 - ); - const dropdownKls = computed(() => { - return [ns.b("menu"), ns.bm("menu", size3 == null ? void 0 : size3.value)]; - }); - const dropdownListWrapperRef = composeRefs( - contentRef, - rovingFocusGroupRef, - rovingFocusGroupCollectionRef - ); - const handleKeydown = composeEventHandlers( - (e) => { - var _a; - (_a = props2.onKeydown) == null ? void 0 : _a.call(props2, e); - }, - (e) => { - const { currentTarget, target: target2 } = e; - const code = getEventCode(e); - currentTarget.contains( - target2 - ); - if (EVENT_CODE.tab === code) { - return handleClose(); - } - onKeydown(e); - } - ); - function handleFocus(e) { - isUsingKeyboard.value && onFocus(e); - } - return { - size: size3, - rovingFocusGroupRootStyle, - dropdownKls, - role, - triggerId, - dropdownListWrapperRef, - handleKeydown, - onBlur, - handleFocus, - onMousedown - }; - } -}); -var _hoisted_141 = ["role", "aria-labelledby"]; -function _sfc_render14(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("ul", { - ref: _ctx.dropdownListWrapperRef, - class: normalizeClass(_ctx.dropdownKls), - style: normalizeStyle(_ctx.rovingFocusGroupRootStyle), - tabindex: -1, - role: _ctx.role, - "aria-labelledby": _ctx.triggerId, - onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), - onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)), - onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])), - onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.onMousedown && _ctx.onMousedown(...args), ["self"])) - }, [ - renderSlot(_ctx.$slots, "default") - ], 46, _hoisted_141); -} -var DropdownMenu = _export_sfc(_sfc_main88, [["render", _sfc_render14], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-menu.vue"]]); - -// node_modules/element-plus/es/components/dropdown/index.mjs -var ElDropdown = withInstall(Dropdown, { - DropdownItem, - DropdownMenu -}); -var ElDropdownItem = withNoopInstall(DropdownItem); -var ElDropdownMenu = withNoopInstall(DropdownMenu); - -// node_modules/element-plus/es/components/empty/src/img-empty.mjs -var _hoisted_142 = { - viewBox: "0 0 79 86", - version: "1.1", - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink" -}; -var _hoisted_221 = ["id"]; -var _hoisted_311 = ["stop-color"]; -var _hoisted_47 = ["stop-color"]; -var _hoisted_56 = ["id"]; -var _hoisted_64 = ["stop-color"]; -var _hoisted_73 = ["stop-color"]; -var _hoisted_82 = ["id"]; -var _hoisted_92 = { - stroke: "none", - "stroke-width": "1", - fill: "none", - "fill-rule": "evenodd" -}; -var _hoisted_102 = { transform: "translate(-1268.000000, -535.000000)" }; -var _hoisted_1110 = { transform: "translate(1268.000000, 535.000000)" }; -var _hoisted_1211 = ["fill"]; -var _hoisted_1310 = ["fill"]; -var _hoisted_143 = { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" }; -var _hoisted_152 = ["fill"]; -var _hoisted_162 = ["fill"]; -var _hoisted_172 = ["fill"]; -var _hoisted_182 = ["fill"]; -var _hoisted_192 = ["fill"]; -var _hoisted_20 = { transform: "translate(53.000000, 45.000000)" }; -var _hoisted_21 = ["fill", "xlink:href"]; -var _hoisted_222 = ["fill", "mask"]; -var _hoisted_232 = ["fill"]; -var _sfc_main89 = defineComponent({ - ...{ - name: "ImgEmpty" - }, - __name: "img-empty", - setup(__props) { - const ns = useNamespace("empty"); - const id = useId(); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("svg", _hoisted_142, [ - createBaseVNode("defs", null, [ - createBaseVNode("linearGradient", { - id: `linearGradient-1-${unref(id)}`, - x1: "38.8503086%", - y1: "0%", - x2: "61.1496914%", - y2: "100%" - }, [ - createBaseVNode("stop", { - "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`, - offset: "0%" - }, null, 8, _hoisted_311), - createBaseVNode("stop", { - "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-4")})`, - offset: "100%" - }, null, 8, _hoisted_47) - ], 8, _hoisted_221), - createBaseVNode("linearGradient", { - id: `linearGradient-2-${unref(id)}`, - x1: "0%", - y1: "9.5%", - x2: "100%", - y2: "90.5%" - }, [ - createBaseVNode("stop", { - "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`, - offset: "0%" - }, null, 8, _hoisted_64), - createBaseVNode("stop", { - "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`, - offset: "100%" - }, null, 8, _hoisted_73) - ], 8, _hoisted_56), - createBaseVNode("rect", { - id: `path-3-${unref(id)}`, - x: "0", - y: "0", - width: "17", - height: "36" - }, null, 8, _hoisted_82) - ]), - createBaseVNode("g", _hoisted_92, [ - createBaseVNode("g", _hoisted_102, [ - createBaseVNode("g", _hoisted_1110, [ - createBaseVNode("path", { - 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", - fill: `var(${unref(ns).cssVarBlockName("fill-color-3")})` - }, null, 8, _hoisted_1211), - createBaseVNode("polygon", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`, - transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ", - points: "13 58 53 58 42 45 2 45" - }, null, 8, _hoisted_1310), - createBaseVNode("g", _hoisted_143, [ - createBaseVNode("polygon", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`, - transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ", - points: "2.84078316e-14 3 18 3 23 7 5 7" - }, null, 8, _hoisted_152), - createBaseVNode("polygon", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-5")})`, - points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43" - }, null, 8, _hoisted_162), - createBaseVNode("rect", { - fill: `url(#linearGradient-1-${unref(id)})`, - transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ", - x: "38", - y: "7", - width: "17", - height: "36" - }, null, 8, _hoisted_172), - createBaseVNode("polygon", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`, - transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ", - points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12" - }, null, 8, _hoisted_182) - ]), - createBaseVNode("rect", { - fill: `url(#linearGradient-2-${unref(id)})`, - x: "13", - y: "45", - width: "40", - height: "36" - }, null, 8, _hoisted_192), - createBaseVNode("g", _hoisted_20, [ - createBaseVNode("use", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-8")})`, - transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ", - "xlink:href": `#path-3-${unref(id)}` - }, null, 8, _hoisted_21), - createBaseVNode("polygon", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-9")})`, - mask: `url(#mask-4-${unref(id)})`, - transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ", - points: "7 0 24 0 20 18 7 16.5" - }, null, 8, _hoisted_222) - ]), - createBaseVNode("polygon", { - fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`, - transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ", - points: "62 45 79 45 70 58 53 58" - }, null, 8, _hoisted_232) - ]) - ]) - ]) - ]); - }; - } -}); -var ImgEmpty = _export_sfc(_sfc_main89, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/empty/src/img-empty.vue"]]); - -// node_modules/element-plus/es/components/empty/src/empty.mjs -var emptyProps = buildProps({ - image: { - type: String, - default: "" - }, - imageSize: Number, - description: { - type: String, - default: "" - } -}); - -// node_modules/element-plus/es/components/empty/src/empty2.mjs -var _hoisted_144 = ["src"]; -var _hoisted_223 = { key: 1 }; -var _sfc_main90 = defineComponent({ - ...{ - name: "ElEmpty" - }, - __name: "empty", - props: emptyProps, - setup(__props) { - const props2 = __props; - const { t } = useLocale(); - const ns = useNamespace("empty"); - const emptyDescription = computed( - () => props2.description || t("el.table.emptyText") - ); - const imageStyle = computed(() => ({ - width: addUnit(props2.imageSize) - })); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b()) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("image")), - style: normalizeStyle(imageStyle.value) - }, - [ - _ctx.image ? (openBlock(), createElementBlock("img", { - key: 0, - src: _ctx.image, - ondragstart: "return false" - }, null, 8, _hoisted_144)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [ - createVNode(ImgEmpty) - ]) - ], - 6 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("description")) - }, - [ - _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock( - "p", - _hoisted_223, - toDisplayString(emptyDescription.value), - 1 - )) - ], - 2 - ), - _ctx.$slots.default ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("bottom")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var Empty = _export_sfc(_sfc_main90, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/empty/src/empty.vue"]]); - -// node_modules/element-plus/es/components/empty/index.mjs -var ElEmpty = withInstall(Empty); - -// node_modules/element-plus/es/components/form/src/form.mjs -var formMetaProps = buildProps({ - size: { - type: String, - values: componentSizes - }, - disabled: Boolean -}); -var formProps = buildProps({ - ...formMetaProps, - model: Object, - rules: { - type: definePropType(Object) - }, - labelPosition: { - type: String, - values: ["left", "right", "top"], - default: "right" - }, - requireAsteriskPosition: { - type: String, - values: ["left", "right"], - default: "left" - }, - labelWidth: { - type: [String, Number], - default: "" - }, - labelSuffix: { - type: String, - default: "" - }, - inline: Boolean, - inlineMessage: Boolean, - statusIcon: Boolean, - showMessage: { - type: Boolean, - default: true - }, - validateOnRuleChange: { - type: Boolean, - default: true - }, - hideRequiredAsterisk: Boolean, - scrollToError: Boolean, - scrollIntoViewOptions: { - type: definePropType([Object, Boolean]), - default: true - } -}); -var formEmits = { - validate: (prop, isValid, message2) => (isArray(prop) || isString(prop)) && isBoolean2(isValid) && isString(message2) -}; - -// node_modules/element-plus/es/components/form/src/utils.mjs -var SCOPE6 = "ElForm"; -function useFormLabelWidth() { - const potentialLabelWidthArr = ref([]); - const autoLabelWidth = computed(() => { - if (!potentialLabelWidthArr.value.length) - return "0"; - const max4 = Math.max(...potentialLabelWidthArr.value); - return max4 ? `${max4}px` : ""; - }); - function getLabelWidthIndex(width) { - const index = potentialLabelWidthArr.value.indexOf(width); - if (index === -1 && autoLabelWidth.value === "0") { - debugWarn(SCOPE6, `unexpected width ${width}`); - } - return index; - } - function registerLabelWidth(val, oldVal) { - if (val && oldVal) { - const index = getLabelWidthIndex(oldVal); - potentialLabelWidthArr.value.splice(index, 1, val); - } else if (val) { - potentialLabelWidthArr.value.push(val); - } - } - function deregisterLabelWidth(val) { - const index = getLabelWidthIndex(val); - if (index > -1) { - potentialLabelWidthArr.value.splice(index, 1); - } - } - return { - autoLabelWidth, - registerLabelWidth, - deregisterLabelWidth - }; -} -var filterFields = (fields, props2) => { - const normalized = castArray_default(props2).map( - (prop) => isArray(prop) ? prop.join(".") : prop - ); - return normalized.length > 0 ? fields.filter( - (field) => field.propString && normalized.includes(field.propString) - ) : fields; -}; - -// node_modules/element-plus/es/components/form/src/form2.mjs -var COMPONENT_NAME13 = "ElForm"; -var _sfc_main91 = defineComponent({ - ...{ - name: COMPONENT_NAME13 - }, - __name: "form", - props: formProps, - emits: formEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const formRef = ref(); - const fields = reactive([]); - const formSize = useFormSize(); - const ns = useNamespace("form"); - const formClasses = computed(() => { - const { labelPosition, inline: inline2 } = props2; - return [ - ns.b(), - ns.m(formSize.value || "default"), - { - [ns.m(`label-${labelPosition}`)]: labelPosition, - [ns.m("inline")]: inline2 - } - ]; - }); - const getField = (prop) => { - return filterFields(fields, [prop])[0]; - }; - const addField = (field) => { - fields.push(field); - }; - const removeField = (field) => { - if (field.prop) { - fields.splice(fields.indexOf(field), 1); - } - }; - const setInitialValues = (initModel) => { - if (!props2.model) { - debugWarn(COMPONENT_NAME13, "model is required for setInitialValues to work."); - return; - } - if (!initModel) { - debugWarn( - COMPONENT_NAME13, - "initModel is required for setInitialValues to work." - ); - return; - } - fields.forEach((field) => { - if (field.prop) { - if (has_default(initModel, field.prop)) { - const initValue = getProp(initModel, field.prop).value; - field.setInitialValue(initValue); - } - } - }); - }; - const resetFields = (properties = []) => { - if (!props2.model) { - debugWarn(COMPONENT_NAME13, "model is required for resetFields to work."); - return; - } - filterFields(fields, properties).forEach((field) => field.resetField()); - }; - const clearValidate = (props22 = []) => { - filterFields(fields, props22).forEach((field) => field.clearValidate()); - }; - const isValidatable = computed(() => { - const hasModel = !!props2.model; - if (!hasModel) { - debugWarn(COMPONENT_NAME13, "model is required for validate to work."); - } - return hasModel; - }); - const obtainValidateFields = (props22) => { - if (fields.length === 0) - return []; - const filteredFields = filterFields(fields, props22); - if (!filteredFields.length) { - debugWarn(COMPONENT_NAME13, "please pass correct props!"); - return []; - } - return filteredFields; - }; - const validate = async (callback) => validateField(void 0, callback); - const doValidateField = async (props22 = []) => { - if (!isValidatable.value) - return false; - const fields2 = obtainValidateFields(props22); - if (fields2.length === 0) - return true; - let validationErrors = {}; - for (const field of fields2) { - try { - await field.validate(""); - if (field.validateState === "error" && !field.error) - field.resetField(); - } catch (fields3) { - validationErrors = { - ...validationErrors, - ...fields3 - }; - } - } - if (Object.keys(validationErrors).length === 0) - return true; - return Promise.reject(validationErrors); - }; - const validateField = async (modelProps = [], callback) => { - let result2 = false; - const shouldThrow = !isFunction(callback); - try { - result2 = await doValidateField(modelProps); - if (result2 === true) { - await (callback == null ? void 0 : callback(result2)); - } - return result2; - } catch (e) { - if (e instanceof Error) - throw e; - const invalidFields = e; - if (props2.scrollToError) { - if (formRef.value) { - const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`); - formItem == null ? void 0 : formItem.scrollIntoView(props2.scrollIntoViewOptions); - } - } - !result2 && await (callback == null ? void 0 : callback(false, invalidFields)); - return shouldThrow && Promise.reject(invalidFields); - } - }; - const scrollToField = (prop) => { - var _a; - const field = getField(prop); - if (field) { - (_a = field.$el) == null ? void 0 : _a.scrollIntoView(props2.scrollIntoViewOptions); - } - }; - watch( - () => props2.rules, - () => { - if (props2.validateOnRuleChange) { - validate().catch((err) => debugWarn(err)); - } - }, - { deep: true, flush: "post" } - ); - provide( - formContextKey, - reactive({ - ...toRefs(props2), - emit, - resetFields, - clearValidate, - validateField, - getField, - addField, - removeField, - setInitialValues, - ...useFormLabelWidth() - }) - ); - __expose({ - validate, - validateField, - resetFields, - clearValidate, - scrollToField, - getField, - fields, - setInitialValues - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "form", - { - ref_key: "formRef", - ref: formRef, - class: normalizeClass(formClasses.value) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ); - }; - } -}); -var Form = _export_sfc(_sfc_main91, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]); - -// node_modules/async-validator/dist-web/index.js -function _extends() { - _extends = Object.assign ? Object.assign.bind() : function(target2) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target2[key] = source[key]; - } - } - } - return target2; - }; - return _extends.apply(this, arguments); -} -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf(subClass, superClass); -} -function _getPrototypeOf(o2) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o3) { - return o3.__proto__ || Object.getPrototypeOf(o3); - }; - return _getPrototypeOf(o2); -} -function _setPrototypeOf(o2, p2) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) { - o3.__proto__ = p3; - return o3; - }; - return _setPrototypeOf(o2, p2); -} -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { - })); - return true; - } catch (e) { - return false; - } -} -function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct.bind(); - } else { - _construct = function _construct2(Parent2, args2, Class2) { - var a2 = [null]; - a2.push.apply(a2, args2); - var Constructor = Function.bind.apply(Parent2, a2); - var instance = new Constructor(); - if (Class2) _setPrototypeOf(instance, Class2.prototype); - return instance; - }; - } - return _construct.apply(null, arguments); -} -function _isNativeFunction(fn2) { - return Function.toString.call(fn2).indexOf("[native code]") !== -1; -} -function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0; - _wrapNativeSuper = function _wrapNativeSuper2(Class2) { - if (Class2 === null || !_isNativeFunction(Class2)) return Class2; - if (typeof Class2 !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - if (typeof _cache !== "undefined") { - if (_cache.has(Class2)) return _cache.get(Class2); - _cache.set(Class2, Wrapper); - } - function Wrapper() { - return _construct(Class2, arguments, _getPrototypeOf(this).constructor); - } - Wrapper.prototype = Object.create(Class2.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class2); - }; - return _wrapNativeSuper(Class); -} -var formatRegExp = /%[sdj%]/g; -var warning = function warning2() { -}; -if (typeof process !== "undefined" && process.env && true && typeof window !== "undefined" && typeof document !== "undefined") { - warning = function warning3(type4, errors) { - if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") { - if (errors.every(function(e) { - return typeof e === "string"; - })) { - console.warn(type4, errors); - } - } - }; -} -function convertFieldsError(errors) { - if (!errors || !errors.length) return null; - var fields = {}; - errors.forEach(function(error) { - var field = error.field; - fields[field] = fields[field] || []; - fields[field].push(error); - }); - return fields; -} -function format(template2) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - var i = 0; - var len = args.length; - if (typeof template2 === "function") { - return template2.apply(null, args); - } - if (typeof template2 === "string") { - var str = template2.replace(formatRegExp, function(x2) { - if (x2 === "%%") { - return "%"; - } - if (i >= len) { - return x2; - } - switch (x2) { - case "%s": - return String(args[i++]); - case "%d": - return Number(args[i++]); - case "%j": - try { - return JSON.stringify(args[i++]); - } catch (_2) { - return "[Circular]"; - } - break; - default: - return x2; - } - }); - return str; - } - return template2; -} -function isNativeStringType(type4) { - return type4 === "string" || type4 === "url" || type4 === "hex" || type4 === "email" || type4 === "date" || type4 === "pattern"; -} -function isEmptyValue(value, type4) { - if (value === void 0 || value === null) { - return true; - } - if (type4 === "array" && Array.isArray(value) && !value.length) { - return true; - } - if (isNativeStringType(type4) && typeof value === "string" && !value) { - return true; - } - return false; -} -function asyncParallelArray(arr, func, callback) { - var results = []; - var total2 = 0; - var arrLength = arr.length; - function count(errors) { - results.push.apply(results, errors || []); - total2++; - if (total2 === arrLength) { - callback(results); - } - } - arr.forEach(function(a2) { - func(a2, count); - }); -} -function asyncSerialArray(arr, func, callback) { - var index = 0; - var arrLength = arr.length; - function next(errors) { - if (errors && errors.length) { - callback(errors); - return; - } - var original = index; - index = index + 1; - if (original < arrLength) { - func(arr[original], next); - } else { - callback([]); - } - } - next([]); -} -function flattenObjArr(objArr) { - var ret = []; - Object.keys(objArr).forEach(function(k) { - ret.push.apply(ret, objArr[k] || []); - }); - return ret; -} -var AsyncValidationError = function(_Error) { - _inheritsLoose(AsyncValidationError2, _Error); - function AsyncValidationError2(errors, fields) { - var _this; - _this = _Error.call(this, "Async Validation Error") || this; - _this.errors = errors; - _this.fields = fields; - return _this; - } - return AsyncValidationError2; -}(_wrapNativeSuper(Error)); -function asyncMap(objArr, option, func, callback, source) { - if (option.first) { - var _pending = new Promise(function(resolve, reject2) { - var next = function next2(errors) { - callback(errors); - return errors.length ? reject2(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source); - }; - var flattenArr = flattenObjArr(objArr); - asyncSerialArray(flattenArr, func, next); - }); - _pending["catch"](function(e) { - return e; - }); - return _pending; - } - var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || []; - var objArrKeys = Object.keys(objArr); - var objArrLength = objArrKeys.length; - var total2 = 0; - var results = []; - var pending = new Promise(function(resolve, reject2) { - var next = function next2(errors) { - results.push.apply(results, errors); - total2++; - if (total2 === objArrLength) { - callback(results); - return results.length ? reject2(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source); - } - }; - if (!objArrKeys.length) { - callback(results); - resolve(source); - } - objArrKeys.forEach(function(key) { - var arr = objArr[key]; - if (firstFields.indexOf(key) !== -1) { - asyncSerialArray(arr, func, next); - } else { - asyncParallelArray(arr, func, next); - } - }); - }); - pending["catch"](function(e) { - return e; - }); - return pending; -} -function isErrorObj(obj) { - return !!(obj && obj.message !== void 0); -} -function getValue2(value, path) { - var v2 = value; - for (var i = 0; i < path.length; i++) { - if (v2 == void 0) { - return v2; - } - v2 = v2[path[i]]; - } - return v2; -} -function complementError(rule, source) { - return function(oe) { - var fieldValue; - if (rule.fullFields) { - fieldValue = getValue2(source, rule.fullFields); - } else { - fieldValue = source[oe.field || rule.fullField]; - } - if (isErrorObj(oe)) { - oe.field = oe.field || rule.fullField; - oe.fieldValue = fieldValue; - return oe; - } - return { - message: typeof oe === "function" ? oe() : oe, - fieldValue, - field: oe.field || rule.fullField - }; - }; -} -function deepMerge(target2, source) { - if (source) { - for (var s2 in source) { - if (source.hasOwnProperty(s2)) { - var value = source[s2]; - if (typeof value === "object" && typeof target2[s2] === "object") { - target2[s2] = _extends({}, target2[s2], value); - } else { - target2[s2] = value; - } - } - } - } - return target2; -} -var required$1 = function required(rule, value, source, errors, options, type4) { - if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type4 || rule.type))) { - errors.push(format(options.messages.required, rule.fullField)); - } -}; -var whitespace = function whitespace2(rule, value, source, errors, options) { - if (/^\s+$/.test(value) || value === "") { - errors.push(format(options.messages.whitespace, rule.fullField)); - } -}; -var urlReg; -var getUrlRegex = function() { - if (urlReg) { - return urlReg; - } - var word = "[a-fA-F\\d:]"; - var b2 = function b3(options) { - return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : ""; - }; - var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"; - var v6seg = "[a-fA-F\\d]{1,4}"; - var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(); - var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)"); - var v4exact = new RegExp("^" + v4 + "$"); - var v6exact = new RegExp("^" + v6 + "$"); - var ip = function ip2(options) { - return options && options.exact ? v46Exact : new RegExp("(?:" + b2(options) + v4 + b2(options) + ")|(?:" + b2(options) + v6 + b2(options) + ")", "g"); - }; - ip.v4 = function(options) { - return options && options.exact ? v4exact : new RegExp("" + b2(options) + v4 + b2(options), "g"); - }; - ip.v6 = function(options) { - return options && options.exact ? v6exact : new RegExp("" + b2(options) + v6 + b2(options), "g"); - }; - var protocol = "(?:(?:[a-z]+:)?//)"; - var auth = "(?:\\S+(?::\\S*)?@)?"; - var ipv4 = ip.v4().source; - var ipv6 = ip.v6().source; - var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)"; - var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"; - var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))"; - var port = "(?::\\d{2,5})?"; - var path = '(?:[/?#][^\\s"]*)?'; - var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path; - urlReg = new RegExp("(?:^" + regex + "$)", "i"); - return urlReg; -}; -var pattern$2 = { - // http://emailregex.com/ - email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/, - // url: new RegExp( - // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', - // 'i', - // ), - hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i -}; -var types = { - integer: function integer(value) { - return types.number(value) && parseInt(value, 10) === value; - }, - "float": function float(value) { - return types.number(value) && !types.integer(value); - }, - array: function array(value) { - return Array.isArray(value); - }, - regexp: function regexp(value) { - if (value instanceof RegExp) { - return true; - } - try { - return !!new RegExp(value); - } catch (e) { - return false; - } - }, - date: function date(value) { - return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime()); - }, - number: function number(value) { - if (isNaN(value)) { - return false; - } - return typeof value === "number"; - }, - object: function object(value) { - return typeof value === "object" && !types.array(value); - }, - method: function method2(value) { - return typeof value === "function"; - }, - email: function email(value) { - return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email); - }, - url: function url(value) { - return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex()); - }, - hex: function hex(value) { - return typeof value === "string" && !!value.match(pattern$2.hex); - } -}; -var type$1 = function type(rule, value, source, errors, options) { - if (rule.required && value === void 0) { - required$1(rule, value, source, errors, options); - return; - } - var custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"]; - var ruleType = rule.type; - if (custom.indexOf(ruleType) > -1) { - if (!types[ruleType](value)) { - errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); - } - } else if (ruleType && typeof value !== rule.type) { - errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); - } -}; -var range2 = function range3(rule, value, source, errors, options) { - var len = typeof rule.len === "number"; - var min4 = typeof rule.min === "number"; - var max4 = typeof rule.max === "number"; - var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - var val = value; - var key = null; - var num = typeof value === "number"; - var str = typeof value === "string"; - var arr = Array.isArray(value); - if (num) { - key = "number"; - } else if (str) { - key = "string"; - } else if (arr) { - key = "array"; - } - if (!key) { - return false; - } - if (arr) { - val = value.length; - } - if (str) { - val = value.replace(spRegexp, "_").length; - } - if (len) { - if (val !== rule.len) { - errors.push(format(options.messages[key].len, rule.fullField, rule.len)); - } - } else if (min4 && !max4 && val < rule.min) { - errors.push(format(options.messages[key].min, rule.fullField, rule.min)); - } else if (max4 && !min4 && val > rule.max) { - errors.push(format(options.messages[key].max, rule.fullField, rule.max)); - } else if (min4 && max4 && (val < rule.min || val > rule.max)) { - errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)); - } -}; -var ENUM$1 = "enum"; -var enumerable$1 = function enumerable(rule, value, source, errors, options) { - rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : []; - if (rule[ENUM$1].indexOf(value) === -1) { - errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", "))); - } -}; -var pattern$1 = function pattern(rule, value, source, errors, options) { - if (rule.pattern) { - if (rule.pattern instanceof RegExp) { - rule.pattern.lastIndex = 0; - if (!rule.pattern.test(value)) { - errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); - } - } else if (typeof rule.pattern === "string") { - var _pattern = new RegExp(rule.pattern); - if (!_pattern.test(value)) { - errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); - } - } - } -}; -var rules = { - required: required$1, - whitespace, - type: type$1, - range: range2, - "enum": enumerable$1, - pattern: pattern$1 -}; -var string = function string2(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value, "string") && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options, "string"); - if (!isEmptyValue(value, "string")) { - rules.type(rule, value, source, errors, options); - rules.range(rule, value, source, errors, options); - rules.pattern(rule, value, source, errors, options); - if (rule.whitespace === true) { - rules.whitespace(rule, value, source, errors, options); - } - } - } - callback(errors); -}; -var method3 = function method4(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules.type(rule, value, source, errors, options); - } - } - callback(errors); -}; -var number2 = function number3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (value === "") { - value = void 0; - } - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules.type(rule, value, source, errors, options); - rules.range(rule, value, source, errors, options); - } - } - callback(errors); -}; -var _boolean = function _boolean2(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules.type(rule, value, source, errors, options); - } - } - callback(errors); -}; -var regexp2 = function regexp3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (!isEmptyValue(value)) { - rules.type(rule, value, source, errors, options); - } - } - callback(errors); -}; -var integer2 = function integer3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules.type(rule, value, source, errors, options); - rules.range(rule, value, source, errors, options); - } - } - callback(errors); -}; -var floatFn = function floatFn2(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules.type(rule, value, source, errors, options); - rules.range(rule, value, source, errors, options); - } - } - callback(errors); -}; -var array2 = function array3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if ((value === void 0 || value === null) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options, "array"); - if (value !== void 0 && value !== null) { - rules.type(rule, value, source, errors, options); - rules.range(rule, value, source, errors, options); - } - } - callback(errors); -}; -var object2 = function object3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules.type(rule, value, source, errors, options); - } - } - callback(errors); -}; -var ENUM = "enum"; -var enumerable2 = function enumerable3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (value !== void 0) { - rules[ENUM](rule, value, source, errors, options); - } - } - callback(errors); -}; -var pattern2 = function pattern3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value, "string") && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (!isEmptyValue(value, "string")) { - rules.pattern(rule, value, source, errors, options); - } - } - callback(errors); -}; -var date2 = function date3(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value, "date") && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - if (!isEmptyValue(value, "date")) { - var dateObject; - if (value instanceof Date) { - dateObject = value; - } else { - dateObject = new Date(value); - } - rules.type(rule, dateObject, source, errors, options); - if (dateObject) { - rules.range(rule, dateObject.getTime(), source, errors, options); - } - } - } - callback(errors); -}; -var required2 = function required3(rule, value, callback, source, options) { - var errors = []; - var type4 = Array.isArray(value) ? "array" : typeof value; - rules.required(rule, value, source, errors, options, type4); - callback(errors); -}; -var type2 = function type3(rule, value, callback, source, options) { - var ruleType = rule.type; - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value, ruleType) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options, ruleType); - if (!isEmptyValue(value, ruleType)) { - rules.type(rule, value, source, errors, options); - } - } - callback(errors); -}; -var any = function any2(rule, value, callback, source, options) { - var errors = []; - var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback(); - } - rules.required(rule, value, source, errors, options); - } - callback(errors); -}; -var validators = { - string, - method: method3, - number: number2, - "boolean": _boolean, - regexp: regexp2, - integer: integer2, - "float": floatFn, - array: array2, - object: object2, - "enum": enumerable2, - pattern: pattern2, - date: date2, - url: type2, - hex: type2, - email: type2, - required: required2, - any -}; -function newMessages() { - return { - "default": "Validation error on field %s", - required: "%s is required", - "enum": "%s must be one of %s", - whitespace: "%s cannot be empty", - date: { - format: "%s date %s is invalid for format %s", - parse: "%s date could not be parsed, %s is invalid ", - invalid: "%s date %s is invalid" - }, - types: { - string: "%s is not a %s", - method: "%s is not a %s (function)", - array: "%s is not an %s", - object: "%s is not an %s", - number: "%s is not a %s", - date: "%s is not a %s", - "boolean": "%s is not a %s", - integer: "%s is not an %s", - "float": "%s is not a %s", - regexp: "%s is not a valid %s", - email: "%s is not a valid %s", - url: "%s is not a valid %s", - hex: "%s is not a valid %s" - }, - string: { - len: "%s must be exactly %s characters", - min: "%s must be at least %s characters", - max: "%s cannot be longer than %s characters", - range: "%s must be between %s and %s characters" - }, - number: { - len: "%s must equal %s", - min: "%s cannot be less than %s", - max: "%s cannot be greater than %s", - range: "%s must be between %s and %s" - }, - array: { - len: "%s must be exactly %s in length", - min: "%s cannot be less than %s in length", - max: "%s cannot be greater than %s in length", - range: "%s must be between %s and %s in length" - }, - pattern: { - mismatch: "%s value %s does not match pattern %s" - }, - clone: function clone2() { - var cloned = JSON.parse(JSON.stringify(this)); - cloned.clone = this.clone; - return cloned; - } - }; -} -var messages = newMessages(); -var Schema = function() { - function Schema2(descriptor) { - this.rules = null; - this._messages = messages; - this.define(descriptor); - } - var _proto = Schema2.prototype; - _proto.define = function define2(rules2) { - var _this = this; - if (!rules2) { - throw new Error("Cannot configure a schema with no rules"); - } - if (typeof rules2 !== "object" || Array.isArray(rules2)) { - throw new Error("Rules must be an object"); - } - this.rules = {}; - Object.keys(rules2).forEach(function(name) { - var item = rules2[name]; - _this.rules[name] = Array.isArray(item) ? item : [item]; - }); - }; - _proto.messages = function messages2(_messages) { - if (_messages) { - this._messages = deepMerge(newMessages(), _messages); - } - return this._messages; - }; - _proto.validate = function validate(source_, o2, oc) { - var _this2 = this; - if (o2 === void 0) { - o2 = {}; - } - if (oc === void 0) { - oc = function oc2() { - }; - } - var source = source_; - var options = o2; - var callback = oc; - if (typeof options === "function") { - callback = options; - options = {}; - } - if (!this.rules || Object.keys(this.rules).length === 0) { - if (callback) { - callback(null, source); - } - return Promise.resolve(source); - } - function complete(results) { - var errors = []; - var fields = {}; - function add2(e) { - if (Array.isArray(e)) { - var _errors; - errors = (_errors = errors).concat.apply(_errors, e); - } else { - errors.push(e); - } - } - for (var i = 0; i < results.length; i++) { - add2(results[i]); - } - if (!errors.length) { - callback(null, source); - } else { - fields = convertFieldsError(errors); - callback(errors, fields); - } - } - if (options.messages) { - var messages$1 = this.messages(); - if (messages$1 === messages) { - messages$1 = newMessages(); - } - deepMerge(messages$1, options.messages); - options.messages = messages$1; - } else { - options.messages = this.messages(); - } - var series = {}; - var keys3 = options.keys || Object.keys(this.rules); - keys3.forEach(function(z) { - var arr = _this2.rules[z]; - var value = source[z]; - arr.forEach(function(r) { - var rule = r; - if (typeof rule.transform === "function") { - if (source === source_) { - source = _extends({}, source); - } - value = source[z] = rule.transform(value); - } - if (typeof rule === "function") { - rule = { - validator: rule - }; - } else { - rule = _extends({}, rule); - } - rule.validator = _this2.getValidationMethod(rule); - if (!rule.validator) { - return; - } - rule.field = z; - rule.fullField = rule.fullField || z; - rule.type = _this2.getType(rule); - series[z] = series[z] || []; - series[z].push({ - rule, - value, - source, - field: z - }); - }); - }); - var errorFields = {}; - return asyncMap(series, options, function(data, doIt) { - var rule = data.rule; - var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object"); - deep = deep && (rule.required || !rule.required && data.value); - rule.field = data.field; - function addFullField(key, schema) { - return _extends({}, schema, { - fullField: rule.fullField + "." + key, - fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key] - }); - } - function cb(e) { - if (e === void 0) { - e = []; - } - var errorList = Array.isArray(e) ? e : [e]; - if (!options.suppressWarning && errorList.length) { - Schema2.warning("async-validator:", errorList); - } - if (errorList.length && rule.message !== void 0) { - errorList = [].concat(rule.message); - } - var filledErrors = errorList.map(complementError(rule, source)); - if (options.first && filledErrors.length) { - errorFields[rule.field] = 1; - return doIt(filledErrors); - } - if (!deep) { - doIt(filledErrors); - } else { - if (rule.required && !data.value) { - if (rule.message !== void 0) { - filledErrors = [].concat(rule.message).map(complementError(rule, source)); - } else if (options.error) { - filledErrors = [options.error(rule, format(options.messages.required, rule.field))]; - } - return doIt(filledErrors); - } - var fieldsSchema = {}; - if (rule.defaultField) { - Object.keys(data.value).map(function(key) { - fieldsSchema[key] = rule.defaultField; - }); - } - fieldsSchema = _extends({}, fieldsSchema, data.rule.fields); - var paredFieldsSchema = {}; - Object.keys(fieldsSchema).forEach(function(field) { - var fieldSchema = fieldsSchema[field]; - var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema]; - paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field)); - }); - var schema = new Schema2(paredFieldsSchema); - schema.messages(options.messages); - if (data.rule.options) { - data.rule.options.messages = options.messages; - data.rule.options.error = options.error; - } - schema.validate(data.value, data.rule.options || options, function(errs) { - var finalErrors = []; - if (filledErrors && filledErrors.length) { - finalErrors.push.apply(finalErrors, filledErrors); - } - if (errs && errs.length) { - finalErrors.push.apply(finalErrors, errs); - } - doIt(finalErrors.length ? finalErrors : null); - }); - } - } - var res; - if (rule.asyncValidator) { - res = rule.asyncValidator(rule, data.value, cb, data.source, options); - } else if (rule.validator) { - try { - res = rule.validator(rule, data.value, cb, data.source, options); - } catch (error) { - console.error == null ? void 0 : console.error(error); - if (!options.suppressValidatorError) { - setTimeout(function() { - throw error; - }, 0); - } - cb(error.message); - } - if (res === true) { - cb(); - } else if (res === false) { - cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails"); - } else if (res instanceof Array) { - cb(res); - } else if (res instanceof Error) { - cb(res.message); - } - } - if (res && res.then) { - res.then(function() { - return cb(); - }, function(e) { - return cb(e); - }); - } - }, function(results) { - complete(results); - }, source); - }; - _proto.getType = function getType(rule) { - if (rule.type === void 0 && rule.pattern instanceof RegExp) { - rule.type = "pattern"; - } - if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) { - throw new Error(format("Unknown rule type %s", rule.type)); - } - return rule.type || "string"; - }; - _proto.getValidationMethod = function getValidationMethod(rule) { - if (typeof rule.validator === "function") { - return rule.validator; - } - var keys3 = Object.keys(rule); - var messageIndex = keys3.indexOf("message"); - if (messageIndex !== -1) { - keys3.splice(messageIndex, 1); - } - if (keys3.length === 1 && keys3[0] === "required") { - return validators.required; - } - return validators[this.getType(rule)] || void 0; - }; - return Schema2; -}(); -Schema.register = function register(type4, validator) { - if (typeof validator !== "function") { - throw new Error("Cannot register a validator by type, validator is not a function"); - } - validators[type4] = validator; -}; -Schema.warning = warning; -Schema.messages = messages; -Schema.validators = validators; - -// node_modules/element-plus/es/components/form/src/form-item2.mjs -var formItemValidateStates = [ - "", - "error", - "validating", - "success" -]; -var formItemProps = buildProps({ - label: String, - labelWidth: { - type: [String, Number] - }, - labelPosition: { - type: String, - values: ["left", "right", "top", ""], - default: "" - }, - prop: { - type: definePropType([String, Array]) - }, - required: { - type: Boolean, - default: void 0 - }, - rules: { - type: definePropType([Object, Array]) - }, - error: String, - validateStatus: { - type: String, - values: formItemValidateStates - }, - for: String, - inlineMessage: { - type: Boolean, - default: void 0 - }, - showMessage: { - type: Boolean, - default: true - }, - size: { - type: String, - values: componentSizes - } -}); - -// node_modules/element-plus/es/components/form/src/form-label-wrap.mjs -var COMPONENT_NAME14 = "ElLabelWrap"; -var FormLabelWrap = defineComponent({ - name: COMPONENT_NAME14, - props: { - isAutoWidth: Boolean, - updateAll: Boolean - }, - setup(props2, { - slots - }) { - const formContext = inject(formContextKey, void 0); - const formItemContext = inject(formItemContextKey); - if (!formItemContext) - throwError(COMPONENT_NAME14, "usage: "); - const ns = useNamespace("form"); - const el = ref(); - const computedWidth = ref(0); - const getLabelWidth = () => { - var _a; - if ((_a = el.value) == null ? void 0 : _a.firstElementChild) { - const width = window.getComputedStyle(el.value.firstElementChild).width; - return Math.ceil(Number.parseFloat(width)); - } else { - return 0; - } - }; - const updateLabelWidth = (action = "update") => { - nextTick(() => { - if (slots.default && props2.isAutoWidth) { - if (action === "update") { - computedWidth.value = getLabelWidth(); - } else if (action === "remove") { - formContext == null ? void 0 : formContext.deregisterLabelWidth(computedWidth.value); - } - } - }); - }; - const updateLabelWidthFn = () => updateLabelWidth("update"); - onMounted(() => { - updateLabelWidthFn(); - }); - onBeforeUnmount(() => { - updateLabelWidth("remove"); - }); - onUpdated(() => updateLabelWidthFn()); - watch(computedWidth, (val, oldVal) => { - if (props2.updateAll) { - formContext == null ? void 0 : formContext.registerLabelWidth(val, oldVal); - } - }); - useResizeObserver(computed(() => { - var _a, _b; - return (_b = (_a = el.value) == null ? void 0 : _a.firstElementChild) != null ? _b : null; - }), updateLabelWidthFn); - return () => { - var _a, _b; - if (!slots) - return null; - const { - isAutoWidth - } = props2; - if (isAutoWidth) { - const autoLabelWidth = formContext == null ? void 0 : formContext.autoLabelWidth; - const hasLabel = formItemContext == null ? void 0 : formItemContext.hasLabel; - const style = {}; - if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") { - const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value); - const labelPosition = formItemContext.labelPosition || formContext.labelPosition; - const marginPosition = labelPosition === "left" ? "marginRight" : "marginLeft"; - if (marginWidth) { - style[marginPosition] = `${marginWidth}px`; - } - } - return createVNode("div", { - "ref": el, - "class": [ns.be("item", "label-wrap")], - "style": style - }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]); - } else { - return createVNode(Fragment, { - "ref": el - }, [(_b = slots.default) == null ? void 0 : _b.call(slots)]); - } - }; - } -}); - -// node_modules/element-plus/es/components/form/src/form-item.mjs -var _hoisted_145 = ["role", "aria-labelledby"]; -var _sfc_main92 = defineComponent({ - ...{ - name: "ElFormItem" - }, - __name: "form-item", - props: formItemProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const slots = useSlots(); - const formContext = inject(formContextKey, void 0); - const parentFormItemContext = inject(formItemContextKey, void 0); - const _size = useFormSize(void 0, { formItem: false }); - const ns = useNamespace("form-item"); - const labelId = useId().value; - const inputIds = ref([]); - const validateState = ref(""); - const validateStateDebounced = refDebounced(validateState, 100); - const validateMessage = ref(""); - const formItemRef = ref(); - let initialValue = void 0; - let isResettingField = false; - const labelPosition = computed( - () => props2.labelPosition || (formContext == null ? void 0 : formContext.labelPosition) - ); - const labelStyle = computed(() => { - var _a; - if (labelPosition.value === "top") { - return {}; - } - const labelWidth = addUnit((_a = props2.labelWidth) != null ? _a : formContext == null ? void 0 : formContext.labelWidth); - return { width: labelWidth }; - }); - const contentStyle = computed(() => { - var _a; - if (labelPosition.value === "top" || (formContext == null ? void 0 : formContext.inline)) { - return {}; - } - if (!props2.label && !props2.labelWidth && isNested) { - return {}; - } - const labelWidth = addUnit((_a = props2.labelWidth) != null ? _a : formContext == null ? void 0 : formContext.labelWidth); - if (!props2.label && !slots.label) { - return { marginLeft: labelWidth }; - } - return {}; - }); - const formItemClasses = computed(() => [ - ns.b(), - ns.m(_size.value), - ns.is("error", validateState.value === "error"), - ns.is("validating", validateState.value === "validating"), - ns.is("success", validateState.value === "success"), - ns.is("required", isRequired.value || props2.required), - ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk), - (formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left", - { - [ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon, - [ns.m(`label-${labelPosition.value}`)]: labelPosition.value - } - ]); - const _inlineMessage = computed( - () => isBoolean2(props2.inlineMessage) ? props2.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false - ); - const validateClasses = computed(() => [ - ns.e("error"), - { [ns.em("error", "inline")]: _inlineMessage.value } - ]); - const propString = computed(() => { - if (!props2.prop) - return ""; - return isArray(props2.prop) ? props2.prop.join(".") : props2.prop; - }); - const hasLabel = computed(() => { - return !!(props2.label || slots.label); - }); - const labelFor = computed(() => { - var _a; - return (_a = props2.for) != null ? _a : inputIds.value.length === 1 ? inputIds.value[0] : void 0; - }); - const isGroup = computed(() => { - return !labelFor.value && hasLabel.value; - }); - const isNested = !!parentFormItemContext; - const fieldValue = computed(() => { - const model = formContext == null ? void 0 : formContext.model; - if (!model || !props2.prop) { - return; - } - return getProp(model, props2.prop).value; - }); - const normalizedRules = computed(() => { - const { required: required4 } = props2; - const rules2 = []; - if (props2.rules) { - rules2.push(...castArray_default(props2.rules)); - } - const formRules = formContext == null ? void 0 : formContext.rules; - if (formRules && props2.prop) { - const _rules = getProp( - formRules, - props2.prop - ).value; - if (_rules) { - rules2.push(...castArray_default(_rules)); - } - } - if (required4 !== void 0) { - const requiredRules = rules2.map((rule, i) => [rule, i]).filter(([rule]) => "required" in rule); - if (requiredRules.length > 0) { - for (const [rule, i] of requiredRules) { - if (rule.required === required4) - continue; - rules2[i] = { ...rule, required: required4 }; - } - } else { - rules2.push({ required: required4 }); - } - } - return rules2; - }); - const validateEnabled = computed(() => normalizedRules.value.length > 0); - const getFilteredRule = (trigger) => { - const rules2 = normalizedRules.value; - return rules2.filter((rule) => { - if (!rule.trigger || !trigger) - return true; - if (isArray(rule.trigger)) { - return rule.trigger.includes(trigger); - } else { - return rule.trigger === trigger; - } - }).map(({ trigger: trigger2, ...rule }) => rule); - }; - const isRequired = computed( - () => normalizedRules.value.some((rule) => rule.required) - ); - const shouldShowError = computed( - () => { - var _a; - return validateStateDebounced.value === "error" && props2.showMessage && ((_a = formContext == null ? void 0 : formContext.showMessage) != null ? _a : true); - } - ); - const currentLabel = computed( - () => `${props2.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}` - ); - const setValidationState = (state) => { - validateState.value = state; - }; - const onValidationFailed = (error) => { - var _a, _b; - const { errors, fields } = error; - if (!errors || !fields) { - console.error(error); - } - setValidationState("error"); - validateMessage.value = errors ? (_b = (_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) != null ? _b : `${props2.prop} is required` : ""; - formContext == null ? void 0 : formContext.emit("validate", props2.prop, false, validateMessage.value); - }; - const onValidationSucceeded = () => { - setValidationState("success"); - formContext == null ? void 0 : formContext.emit("validate", props2.prop, true, ""); - }; - const doValidate = async (rules2) => { - const modelName = propString.value; - const validator = new Schema({ - [modelName]: rules2 - }); - return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => { - onValidationSucceeded(); - return true; - }).catch((err) => { - onValidationFailed(err); - return Promise.reject(err); - }); - }; - const validate = async (trigger, callback) => { - if (isResettingField || !props2.prop) { - return false; - } - const hasCallback = isFunction(callback); - if (!validateEnabled.value) { - callback == null ? void 0 : callback(false); - return false; - } - const rules2 = getFilteredRule(trigger); - if (rules2.length === 0) { - callback == null ? void 0 : callback(true); - return true; - } - setValidationState("validating"); - return doValidate(rules2).then(() => { - callback == null ? void 0 : callback(true); - return true; - }).catch((err) => { - const { fields } = err; - callback == null ? void 0 : callback(false, fields); - return hasCallback ? false : Promise.reject(fields); - }); - }; - const clearValidate = () => { - setValidationState(""); - validateMessage.value = ""; - isResettingField = false; - }; - const resetField = async () => { - const model = formContext == null ? void 0 : formContext.model; - if (!model || !props2.prop) - return; - const computedValue = getProp(model, props2.prop); - isResettingField = true; - computedValue.value = clone_default(initialValue); - await nextTick(); - clearValidate(); - isResettingField = false; - }; - const addInputId = (id) => { - if (!inputIds.value.includes(id)) { - inputIds.value.push(id); - } - }; - const removeInputId = (id) => { - inputIds.value = inputIds.value.filter((listId) => listId !== id); - }; - const setInitialValue = (value) => { - initialValue = clone_default(value); - }; - watch( - () => props2.error, - (val) => { - validateMessage.value = val || ""; - setValidationState(val ? "error" : ""); - }, - { immediate: true } - ); - watch( - () => props2.validateStatus, - (val) => setValidationState(val || "") - ); - const context = reactive({ - ...toRefs(props2), - $el: formItemRef, - size: _size, - validateMessage, - validateState, - labelId, - inputIds, - isGroup, - hasLabel, - fieldValue, - addInputId, - removeInputId, - resetField, - clearValidate, - validate, - propString, - setInitialValue - }); - provide(formItemContextKey, context); - onMounted(() => { - if (props2.prop) { - formContext == null ? void 0 : formContext.addField(context); - initialValue = clone_default(fieldValue.value); - } - }); - onBeforeUnmount(() => { - formContext == null ? void 0 : formContext.removeField(context); - }); - __expose({ - size: _size, - validateMessage, - validateState, - validate, - clearValidate, - resetField, - setInitialValue - }); - return (_ctx, _cache) => { - var _a; - return openBlock(), createElementBlock("div", { - ref_key: "formItemRef", - ref: formItemRef, - class: normalizeClass(formItemClasses.value), - role: isGroup.value ? "group" : void 0, - "aria-labelledby": isGroup.value ? unref(labelId) : void 0 - }, [ - createVNode(unref(FormLabelWrap), { - "is-auto-width": labelStyle.value.width === "auto", - "update-all": ((_a = unref(formContext)) == null ? void 0 : _a.labelWidth) === "auto" - }, { - default: withCtx(() => [ - !!(_ctx.label || _ctx.$slots.label) ? (openBlock(), createBlock(resolveDynamicComponent(labelFor.value ? "label" : "div"), { - key: 0, - id: unref(labelId), - for: labelFor.value, - class: normalizeClass(unref(ns).e("label")), - style: normalizeStyle(labelStyle.value) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "label", { label: currentLabel.value }, () => [ - createTextVNode( - toDisplayString(currentLabel.value), - 1 - ) - ]) - ]), - _: 3 - }, 8, ["id", "for", "class", "style"])) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["is-auto-width", "update-all"]), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("content")), - style: normalizeStyle(contentStyle.value) - }, - [ - renderSlot(_ctx.$slots, "default"), - createVNode(TransitionGroup, { - name: `${unref(ns).namespace.value}-zoom-in-top` - }, { - default: withCtx(() => [ - shouldShowError.value ? renderSlot(_ctx.$slots, "error", { - key: 0, - error: validateMessage.value - }, () => [ - createBaseVNode( - "div", - { - class: normalizeClass(validateClasses.value) - }, - toDisplayString(validateMessage.value), - 3 - ) - ]) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["name"]) - ], - 6 - ) - ], 10, _hoisted_145); - }; - } -}); -var FormItem = _export_sfc(_sfc_main92, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]); - -// node_modules/element-plus/es/components/form/index.mjs -var ElForm = withInstall(Form, { - FormItem -}); -var ElFormItem = withNoopInstall(FormItem); - -// node_modules/element-plus/es/components/image-viewer/src/image-viewer.mjs -var imageViewerProps = buildProps({ - urlList: { - type: definePropType(Array), - default: () => mutable([]) - }, - zIndex: { - type: Number - }, - initialIndex: { - type: Number, - default: 0 - }, - infinite: { - type: Boolean, - default: true - }, - hideOnClickModal: Boolean, - teleported: Boolean, - closeOnPressEscape: { - type: Boolean, - default: true - }, - zoomRate: { - type: Number, - default: 1.2 - }, - scale: { - type: Number, - default: 1 - }, - minScale: { - type: Number, - default: 0.2 - }, - maxScale: { - type: Number, - default: 7 - }, - showProgress: Boolean, - crossorigin: { - type: definePropType(String) - } -}); -var imageViewerEmits = { - close: () => true, - error: (evt) => evt instanceof Event, - switch: (index) => isNumber2(index), - rotate: (deg) => isNumber2(deg) -}; - -// node_modules/element-plus/es/components/image-viewer/src/image-viewer2.mjs -var _hoisted_146 = ["src", "crossorigin"]; -var _sfc_main93 = defineComponent({ - ...{ - name: "ElImageViewer" - }, - __name: "image-viewer", - props: imageViewerProps, - emits: imageViewerEmits, - setup(__props, { expose: __expose, emit: __emit }) { - var _a; - const modes = { - CONTAIN: { - name: "contain", - icon: markRaw(full_screen_default) - }, - ORIGINAL: { - name: "original", - icon: markRaw(scale_to_original_default) - } - }; - const props2 = __props; - const emit = __emit; - let stopWheelListener; - const { t } = useLocale(); - const ns = useNamespace("image-viewer"); - const { nextZIndex } = useZIndex(); - const wrapper = ref(); - const imgRef = ref(); - const scopeEventListener = effectScope(); - const scaleClamped = computed(() => { - const { scale, minScale, maxScale } = props2; - return clamp2(scale, minScale, maxScale); - }); - const loading = ref(true); - const loadError = ref(false); - const visible = ref(false); - const activeIndex = ref(props2.initialIndex); - const mode = shallowRef(modes.CONTAIN); - const transform2 = ref({ - scale: scaleClamped.value, - deg: 0, - offsetX: 0, - offsetY: 0, - enableTransition: false - }); - const zIndex2 = ref((_a = props2.zIndex) != null ? _a : nextZIndex()); - useLockscreen(visible, { ns }); - const isSingle = computed(() => { - const { urlList } = props2; - return urlList.length <= 1; - }); - const isFirst = computed(() => activeIndex.value === 0); - const isLast = computed(() => activeIndex.value === props2.urlList.length - 1); - const currentImg = computed(() => props2.urlList[activeIndex.value]); - const arrowPrevKls = computed(() => [ - ns.e("btn"), - ns.e("prev"), - ns.is("disabled", !props2.infinite && isFirst.value) - ]); - const arrowNextKls = computed(() => [ - ns.e("btn"), - ns.e("next"), - ns.is("disabled", !props2.infinite && isLast.value) - ]); - const imgStyle = computed(() => { - const { scale, deg, offsetX, offsetY, enableTransition } = transform2.value; - let translateX = offsetX / scale; - let translateY = offsetY / scale; - const radian = deg * Math.PI / 180; - const cosRadian = Math.cos(radian); - const sinRadian = Math.sin(radian); - translateX = translateX * cosRadian + translateY * sinRadian; - translateY = translateY * cosRadian - offsetX / scale * sinRadian; - const style = { - transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`, - transition: enableTransition ? "transform .3s" : "" - }; - if (mode.value.name === modes.CONTAIN.name) { - style.maxWidth = style.maxHeight = "100%"; - } - return style; - }); - const progress = computed( - () => `${activeIndex.value + 1} / ${props2.urlList.length}` - ); - function hide2() { - unregisterEventListener(); - stopWheelListener == null ? void 0 : stopWheelListener(); - visible.value = false; - emit("close"); - } - function registerEventListener() { - const keydownHandler = throttle_default((e) => { - const code = getEventCode(e); - switch (code) { - case EVENT_CODE.esc: - props2.closeOnPressEscape && hide2(); - break; - case EVENT_CODE.space: - toggleMode(); - break; - case EVENT_CODE.left: - prev(); - break; - case EVENT_CODE.up: - handleActions("zoomIn"); - break; - case EVENT_CODE.right: - next(); - break; - case EVENT_CODE.down: - handleActions("zoomOut"); - break; - } - }); - const mousewheelHandler = throttle_default((e) => { - const delta = e.deltaY || e.deltaX; - handleActions(delta < 0 ? "zoomIn" : "zoomOut", { - zoomRate: props2.zoomRate, - enableTransition: false - }); - }); - scopeEventListener.run(() => { - useEventListener(document, "keydown", keydownHandler); - useEventListener(wrapper, "wheel", mousewheelHandler); - }); - } - function unregisterEventListener() { - scopeEventListener.stop(); - } - function handleImgLoad() { - loading.value = false; - } - function handleImgError(e) { - loadError.value = true; - loading.value = false; - emit("error", e); - e.target.alt = t("el.image.error"); - } - function handleMouseDown(e) { - if (loading.value || e.button !== 0 || !wrapper.value) - return; - transform2.value.enableTransition = false; - const { offsetX, offsetY } = transform2.value; - const startX = e.pageX; - const startY = e.pageY; - const dragHandler = throttle_default((ev) => { - transform2.value = { - ...transform2.value, - offsetX: offsetX + ev.pageX - startX, - offsetY: offsetY + ev.pageY - startY - }; - }); - const removeMousemove = useEventListener(document, "mousemove", dragHandler); - const removeMouseup = useEventListener(document, "mouseup", () => { - removeMousemove(); - removeMouseup(); - }); - e.preventDefault(); - } - function handleTouchStart(e) { - if (loading.value || !wrapper.value || e.touches.length !== 1) - return; - transform2.value.enableTransition = false; - const { offsetX, offsetY } = transform2.value; - const { pageX: startX, pageY: startY } = e.touches[0]; - const dragHandler = throttle_default((ev) => { - const targetTouch = ev.touches[0]; - transform2.value = { - ...transform2.value, - offsetX: offsetX + targetTouch.pageX - startX, - offsetY: offsetY + targetTouch.pageY - startY - }; - }); - const removeTouchmove = useEventListener(document, "touchmove", dragHandler); - const removeTouchend = useEventListener(document, "touchend", () => { - removeTouchmove(); - removeTouchend(); - }); - e.preventDefault(); - } - function reset() { - transform2.value = { - scale: scaleClamped.value, - deg: 0, - offsetX: 0, - offsetY: 0, - enableTransition: false - }; - } - function toggleMode() { - if (loading.value || loadError.value) - return; - const modeNames = keysOf(modes); - const modeValues = Object.values(modes); - const currentMode = mode.value.name; - const index = modeValues.findIndex((i) => i.name === currentMode); - const nextIndex = (index + 1) % modeNames.length; - mode.value = modes[modeNames[nextIndex]]; - reset(); - } - function setActiveItem(index) { - loadError.value = false; - const len = props2.urlList.length; - activeIndex.value = (index + len) % len; - } - function prev() { - if (isFirst.value && !props2.infinite) - return; - setActiveItem(activeIndex.value - 1); - } - function next() { - if (isLast.value && !props2.infinite) - return; - setActiveItem(activeIndex.value + 1); - } - function handleActions(action, options = {}) { - if (loading.value || loadError.value) - return; - const { minScale, maxScale } = props2; - const { zoomRate, rotateDeg, enableTransition } = { - zoomRate: props2.zoomRate, - rotateDeg: 90, - enableTransition: true, - ...options - }; - switch (action) { - case "zoomOut": - if (transform2.value.scale > minScale) { - transform2.value.scale = Number.parseFloat( - (transform2.value.scale / zoomRate).toFixed(3) - ); - } - break; - case "zoomIn": - if (transform2.value.scale < maxScale) { - transform2.value.scale = Number.parseFloat( - (transform2.value.scale * zoomRate).toFixed(3) - ); - } - break; - case "clockwise": - transform2.value.deg += rotateDeg; - emit("rotate", transform2.value.deg); - break; - case "anticlockwise": - transform2.value.deg -= rotateDeg; - emit("rotate", transform2.value.deg); - break; - } - transform2.value.enableTransition = enableTransition; - } - function onFocusoutPrevented(event) { - var _a2; - if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) === "pointer") { - event.preventDefault(); - } - } - function onCloseRequested() { - if (props2.closeOnPressEscape) { - hide2(); - } - } - function wheelHandler(e) { - if (!e.ctrlKey) - return; - if (e.deltaY < 0) { - e.preventDefault(); - return false; - } else if (e.deltaY > 0) { - e.preventDefault(); - return false; - } - } - watch( - () => scaleClamped.value, - (val) => { - transform2.value.scale = val; - } - ); - watch(currentImg, () => { - nextTick(() => { - const $img = imgRef.value; - if (!($img == null ? void 0 : $img.complete)) { - loading.value = true; - } - }); - }); - watch(activeIndex, (val) => { - reset(); - emit("switch", val); - }); - onMounted(() => { - visible.value = true; - registerEventListener(); - stopWheelListener = useEventListener("wheel", wheelHandler, { - passive: false - }); - }); - __expose({ - setActiveItem - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTeleport), { - to: "body", - disabled: !_ctx.teleported - }, { - default: withCtx(() => [ - createVNode(Transition, { - name: "viewer-fade", - appear: "" - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - ref_key: "wrapper", - ref: wrapper, - tabindex: -1, - class: normalizeClass(unref(ns).e("wrapper")), - style: normalizeStyle({ zIndex: zIndex2.value }) - }, - [ - createVNode(unref(ElFocusTrap), { - loop: "", - trapped: "", - "focus-trap-el": wrapper.value, - "focus-start-el": "container", - onFocusoutPrevented, - onReleaseRequested: onCloseRequested - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("mask")), - onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.hideOnClickModal && hide2(), ["self"])) - }, - null, - 2 - ), - createCommentVNode(" CLOSE "), - createBaseVNode( - "span", - { - class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]), - onClick: hide2 - }, - [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }) - ], - 2 - ), - createCommentVNode(" ARROW "), - !isSingle.value ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(arrowPrevKls.value), - onClick: prev - }, - [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_left_default)) - ]), - _: 1 - }) - ], - 2 - ), - createBaseVNode( - "span", - { - class: normalizeClass(arrowNextKls.value), - onClick: next - }, - [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ], - 2 - ) - ], - 64 - )) : createCommentVNode("v-if", true), - _ctx.$slots.progress || _ctx.showProgress ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")]) - }, - [ - renderSlot(_ctx.$slots, "progress", { - activeIndex: activeIndex.value, - total: _ctx.urlList.length - }, () => [ - createTextVNode( - toDisplayString(progress.value), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - createCommentVNode(" ACTIONS "), - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("actions__inner")) - }, - [ - renderSlot(_ctx.$slots, "toolbar", { - actions: handleActions, - prev, - next, - reset: toggleMode, - activeIndex: activeIndex.value, - setActiveItem - }, () => [ - createVNode(unref(ElIcon), { - onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut")) - }, { - default: withCtx(() => [ - createVNode(unref(zoom_out_default)) - ]), - _: 1 - }), - createVNode(unref(ElIcon), { - onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn")) - }, { - default: withCtx(() => [ - createVNode(unref(zoom_in_default)) - ]), - _: 1 - }), - createBaseVNode( - "i", - { - class: normalizeClass(unref(ns).e("actions__divider")) - }, - null, - 2 - ), - createVNode(unref(ElIcon), { onClick: toggleMode }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(mode.value.icon))) - ]), - _: 1 - }), - createBaseVNode( - "i", - { - class: normalizeClass(unref(ns).e("actions__divider")) - }, - null, - 2 - ), - createVNode(unref(ElIcon), { - onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise")) - }, { - default: withCtx(() => [ - createVNode(unref(refresh_left_default)) - ]), - _: 1 - }), - createVNode(unref(ElIcon), { - onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise")) - }, { - default: withCtx(() => [ - createVNode(unref(refresh_right_default)) - ]), - _: 1 - }) - ]) - ], - 2 - ) - ], - 2 - ), - createCommentVNode(" CANVAS "), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("canvas")) - }, - [ - loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", { - key: 0, - activeIndex: activeIndex.value, - src: currentImg.value - }) : (openBlock(), createElementBlock("img", { - ref_key: "imgRef", - ref: imgRef, - key: currentImg.value, - src: currentImg.value, - style: normalizeStyle(imgStyle.value), - class: normalizeClass(unref(ns).e("img")), - crossorigin: _ctx.crossorigin, - onLoad: handleImgLoad, - onError: handleImgError, - onMousedown: handleMouseDown, - onTouchstart: handleTouchStart - }, null, 46, _hoisted_146)) - ], - 2 - ), - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["focus-trap-el"]) - ], - 6 - ) - ]), - _: 3 - }) - ]), - _: 3 - }, 8, ["disabled"]); - }; - } -}); -var ImageViewer = _export_sfc(_sfc_main93, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image-viewer/src/image-viewer.vue"]]); - -// node_modules/element-plus/es/components/image-viewer/index.mjs -var ElImageViewer = withInstall(ImageViewer); - -// node_modules/element-plus/es/components/image/src/image.mjs -var imageProps = buildProps({ - hideOnClickModal: Boolean, - src: { - type: String, - default: "" - }, - fit: { - type: String, - values: ["", "contain", "cover", "fill", "none", "scale-down"], - default: "" - }, - loading: { - type: String, - values: ["eager", "lazy"] - }, - lazy: Boolean, - scrollContainer: { - type: definePropType([String, Object]) - }, - previewSrcList: { - type: definePropType(Array), - default: () => mutable([]) - }, - previewTeleported: Boolean, - zIndex: { - type: Number - }, - initialIndex: { - type: Number, - default: 0 - }, - infinite: { - type: Boolean, - default: true - }, - closeOnPressEscape: { - type: Boolean, - default: true - }, - zoomRate: { - type: Number, - default: 1.2 - }, - scale: { - type: Number, - default: 1 - }, - minScale: { - type: Number, - default: 0.2 - }, - maxScale: { - type: Number, - default: 7 - }, - showProgress: Boolean, - crossorigin: { - type: definePropType(String) - } -}); -var imageEmits = { - load: (evt) => evt instanceof Event, - error: (evt) => evt instanceof Event, - switch: (val) => isNumber2(val), - close: () => true, - show: () => true -}; - -// node_modules/element-plus/es/components/image/src/image2.mjs -var _hoisted_147 = ["src", "loading", "crossorigin"]; -var _hoisted_224 = { key: 0 }; -var _sfc_main94 = defineComponent({ - ...{ - name: "ElImage", - inheritAttrs: false - }, - __name: "image", - props: imageProps, - emits: imageEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { t } = useLocale(); - const ns = useNamespace("image"); - const rawAttrs = useAttrs(); - const containerAttrs = computed(() => { - return fromPairs_default( - Object.entries(rawAttrs).filter( - ([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key) - ) - ); - }); - const imgAttrs = useAttrs2({ - excludeListeners: true, - excludeKeys: computed(() => { - return Object.keys(containerAttrs.value); - }) - }); - const imageSrc = ref(); - const hasLoadError = ref(false); - const isLoading = ref(true); - const showViewer = ref(false); - const container = ref(); - const _scrollContainer = ref(); - const supportLoading = isClient && "loading" in HTMLImageElement.prototype; - let stopScrollListener; - const imageKls = computed(() => [ - ns.e("inner"), - preview.value && ns.e("preview"), - isLoading.value && ns.is("loading") - ]); - const imageStyle = computed(() => { - const { fit } = props2; - if (isClient && fit) { - return { objectFit: fit }; - } - return {}; - }); - const preview = computed(() => { - const { previewSrcList } = props2; - return isArray(previewSrcList) && previewSrcList.length > 0; - }); - const imageIndex = computed(() => { - const { previewSrcList, initialIndex } = props2; - let previewIndex = initialIndex; - if (initialIndex > previewSrcList.length - 1) { - previewIndex = 0; - } - return previewIndex; - }); - const isManual = computed(() => { - if (props2.loading === "eager") - return false; - return !supportLoading && props2.loading === "lazy" || props2.lazy; - }); - const loadImage = () => { - if (!isClient) - return; - isLoading.value = true; - hasLoadError.value = false; - imageSrc.value = props2.src; - }; - function handleLoad(event) { - isLoading.value = false; - hasLoadError.value = false; - emit("load", event); - } - function handleError(event) { - isLoading.value = false; - hasLoadError.value = true; - emit("error", event); - } - function handleLazyLoad(isIntersecting) { - if (isIntersecting) { - loadImage(); - removeLazyLoadListener(); - } - } - const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true); - async function addLazyLoadListener() { - var _a; - if (!isClient) - return; - await nextTick(); - const { scrollContainer } = props2; - if (isElement2(scrollContainer)) { - _scrollContainer.value = scrollContainer; - } else if (isString(scrollContainer) && scrollContainer !== "") { - _scrollContainer.value = (_a = document.querySelector(scrollContainer)) != null ? _a : void 0; - } else if (container.value) { - const scrollContainer2 = getScrollContainer(container.value); - _scrollContainer.value = isWindow(scrollContainer2) ? void 0 : scrollContainer2; - } - const { stop } = useIntersectionObserver( - container, - ([entry]) => { - lazyLoadHandler(entry.isIntersecting); - }, - { root: _scrollContainer } - ); - stopScrollListener = stop; - } - function removeLazyLoadListener() { - if (!isClient || !lazyLoadHandler) - return; - stopScrollListener == null ? void 0 : stopScrollListener(); - _scrollContainer.value = void 0; - stopScrollListener = void 0; - } - function clickHandler() { - if (!preview.value) - return; - showViewer.value = true; - emit("show"); - } - function closeViewer() { - showViewer.value = false; - emit("close"); - } - function switchViewer(val) { - emit("switch", val); - } - watch( - () => props2.src, - () => { - if (isManual.value) { - isLoading.value = true; - hasLoadError.value = false; - removeLazyLoadListener(); - addLazyLoadListener(); - } else { - loadImage(); - } - } - ); - onMounted(() => { - if (isManual.value) { - addLazyLoadListener(); - } else { - loadImage(); - } - }); - __expose({ - showPreview: clickHandler - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - mergeProps({ - ref_key: "container", - ref: container - }, containerAttrs.value, { - class: [unref(ns).b(), _ctx.$attrs.class] - }), - [ - hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("error")) - }, - toDisplayString(unref(t)("el.image.error")), - 3 - ) - ]) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), { - src: imageSrc.value, - loading: _ctx.loading, - style: imageStyle.value, - class: imageKls.value, - crossorigin: _ctx.crossorigin, - onClick: clickHandler, - onLoad: handleLoad, - onError: handleError - }), null, 16, _hoisted_147)) : createCommentVNode("v-if", true), - isLoading.value ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("wrapper")) - }, - [ - renderSlot(_ctx.$slots, "placeholder", {}, () => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("placeholder")) - }, - null, - 2 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 64 - )), - preview.value ? (openBlock(), createElementBlock( - Fragment, - { key: 2 }, - [ - showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), { - key: 0, - "z-index": _ctx.zIndex, - "initial-index": imageIndex.value, - infinite: _ctx.infinite, - "zoom-rate": _ctx.zoomRate, - "min-scale": _ctx.minScale, - "max-scale": _ctx.maxScale, - "show-progress": _ctx.showProgress, - "url-list": _ctx.previewSrcList, - scale: _ctx.scale, - crossorigin: _ctx.crossorigin, - "hide-on-click-modal": _ctx.hideOnClickModal, - teleported: _ctx.previewTeleported, - "close-on-press-escape": _ctx.closeOnPressEscape, - onClose: closeViewer, - onSwitch: switchViewer - }, createSlots({ - toolbar: withCtx((toolbar) => [ - renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar))) - ]), - default: withCtx(() => [ - _ctx.$slots.viewer ? (openBlock(), createElementBlock("div", _hoisted_224, [ - renderSlot(_ctx.$slots, "viewer") - ])) : createCommentVNode("v-if", true) - ]), - _: 2 - }, [ - _ctx.$slots.progress ? { - name: "progress", - fn: withCtx((progress) => [ - renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress))) - ]), - key: "0" - } : void 0, - _ctx.$slots["viewer-error"] ? { - name: "viewer-error", - fn: withCtx((viewerError) => [ - renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError))) - ]), - key: "1" - } : void 0 - ]), 1032, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "show-progress", "url-list", "scale", "crossorigin", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true) - ], - 64 - )) : createCommentVNode("v-if", true) - ], - 16 - ); - }; - } -}); -var Image2 = _export_sfc(_sfc_main94, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image/src/image.vue"]]); - -// node_modules/element-plus/es/components/image/index.mjs -var ElImage = withInstall(Image2); - -// node_modules/element-plus/es/components/input-number/src/input-number.mjs -var inputNumberProps = buildProps({ - id: { - type: String, - default: void 0 - }, - step: { - type: Number, - default: 1 - }, - stepStrictly: Boolean, - max: { - type: Number, - default: Number.MAX_SAFE_INTEGER - }, - min: { - type: Number, - default: Number.MIN_SAFE_INTEGER - }, - modelValue: { - type: [Number, null] - }, - readonly: Boolean, - disabled: { - type: Boolean, - default: void 0 - }, - size: useSizeProp, - controls: { - type: Boolean, - default: true - }, - controlsPosition: { - type: String, - default: "", - values: ["", "right"] - }, - valueOnClear: { - type: definePropType([String, Number, null]), - validator: (val) => val === null || isNumber2(val) || ["min", "max"].includes(val), - default: null - }, - name: String, - placeholder: String, - precision: { - type: Number, - validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10) - }, - validateEvent: { - type: Boolean, - default: true - }, - ...useAriaProps(["ariaLabel"]), - inputmode: { - type: definePropType(String), - default: void 0 - }, - align: { - type: definePropType(String), - default: "center" - }, - disabledScientific: Boolean -}); -var inputNumberEmits = { - [CHANGE_EVENT]: (cur, prev) => prev !== cur, - blur: (e) => e instanceof FocusEvent, - focus: (e) => e instanceof FocusEvent, - [INPUT_EVENT]: (val) => isNumber2(val) || isNil_default(val), - [UPDATE_MODEL_EVENT]: (val) => isNumber2(val) || isNil_default(val) -}; - -// node_modules/element-plus/es/components/input-number/src/input-number2.mjs -var _hoisted_148 = ["aria-label"]; -var _hoisted_225 = ["aria-label"]; -var _sfc_main95 = defineComponent({ - ...{ - name: "ElInputNumber" - }, - __name: "input-number", - props: inputNumberProps, - emits: inputNumberEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { t } = useLocale(); - const ns = useNamespace("input-number"); - const input = ref(); - const data = reactive({ - currentValue: props2.modelValue, - userInput: null - }); - const { formItem } = useFormItem(); - const minDisabled = computed( - () => isNumber2(props2.modelValue) && props2.modelValue <= props2.min - ); - const maxDisabled = computed( - () => isNumber2(props2.modelValue) && props2.modelValue >= props2.max - ); - const numPrecision = computed(() => { - const stepPrecision = getPrecision(props2.step); - if (!isUndefined2(props2.precision)) { - if (stepPrecision > props2.precision) { - debugWarn( - "InputNumber", - "precision should not be less than the decimal places of step" - ); - } - return props2.precision; - } else { - return Math.max(getPrecision(props2.modelValue), stepPrecision); - } - }); - const controlsAtRight = computed(() => { - return props2.controls && props2.controlsPosition === "right"; - }); - const inputNumberSize = useFormSize(); - const inputNumberDisabled = useFormDisabled(); - const displayValue = computed(() => { - if (data.userInput !== null) { - return data.userInput; - } - let currentValue = data.currentValue; - if (isNil_default(currentValue)) - return ""; - if (isNumber2(currentValue)) { - if (Number.isNaN(currentValue)) - return ""; - if (!isUndefined2(props2.precision)) { - currentValue = currentValue.toFixed(props2.precision); - } - } - return currentValue; - }); - const toPrecision = (num, pre) => { - if (isUndefined2(pre)) - pre = numPrecision.value; - if (pre === 0) - return Math.round(num); - let snum = String(num); - const pointPos = snum.indexOf("."); - if (pointPos === -1) - return num; - const nums = snum.replace(".", "").split(""); - const datum = nums[pointPos + pre]; - if (!datum) - return num; - const length = snum.length; - if (snum.charAt(length - 1) === "5") { - snum = `${snum.slice(0, Math.max(0, length - 1))}6`; - } - return Number.parseFloat(Number(snum).toFixed(pre)); - }; - const getPrecision = (value) => { - if (isNil_default(value)) - return 0; - const valueString = value.toString(); - const dotPosition = valueString.indexOf("."); - let precision = 0; - if (dotPosition !== -1) { - precision = valueString.length - dotPosition - 1; - } - return precision; - }; - const ensurePrecision = (val, coefficient = 1) => { - if (!isNumber2(val)) - return data.currentValue; - if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) { - debugWarn( - "InputNumber", - "The value has reached the maximum safe integer limit." - ); - return val; - } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) { - debugWarn( - "InputNumber", - "The value has reached the minimum safe integer limit." - ); - return val; - } - return toPrecision(val + props2.step * coefficient); - }; - const handleKeydown = (event) => { - const code = getEventCode(event); - const key = getEventKey(event); - if (props2.disabledScientific && ["e", "E"].includes(key)) { - event.preventDefault(); - return; - } - switch (code) { - case EVENT_CODE.up: { - event.preventDefault(); - increase(); - break; - } - case EVENT_CODE.down: { - event.preventDefault(); - decrease(); - break; - } - } - }; - const increase = () => { - if (props2.readonly || inputNumberDisabled.value || maxDisabled.value) - return; - const value = Number(displayValue.value) || 0; - const newVal = ensurePrecision(value); - setCurrentValue(newVal); - emit(INPUT_EVENT, data.currentValue); - setCurrentValueToModelValue(); - }; - const decrease = () => { - if (props2.readonly || inputNumberDisabled.value || minDisabled.value) - return; - const value = Number(displayValue.value) || 0; - const newVal = ensurePrecision(value, -1); - setCurrentValue(newVal); - emit(INPUT_EVENT, data.currentValue); - setCurrentValueToModelValue(); - }; - const verifyValue = (value, update2) => { - const { max: max4, min: min4, step: step2, precision, stepStrictly, valueOnClear } = props2; - if (max4 < min4) { - throwError("InputNumber", "min should not be greater than max."); - } - let newVal = Number(value); - if (isNil_default(value) || Number.isNaN(newVal)) { - return null; - } - if (value === "") { - if (valueOnClear === null) { - return null; - } - newVal = isString(valueOnClear) ? { min: min4, max: max4 }[valueOnClear] : valueOnClear; - } - if (stepStrictly) { - newVal = toPrecision( - Math.round(toPrecision(newVal / step2)) * step2, - precision - ); - if (newVal !== value) { - update2 && emit(UPDATE_MODEL_EVENT, newVal); - } - } - if (!isUndefined2(precision)) { - newVal = toPrecision(newVal, precision); - } - if (newVal > max4 || newVal < min4) { - newVal = newVal > max4 ? max4 : min4; - update2 && emit(UPDATE_MODEL_EVENT, newVal); - } - return newVal; - }; - const setCurrentValue = (value, emitChange = true) => { - var _a; - const oldVal = data.currentValue; - const newVal = verifyValue(value); - if (!emitChange) { - emit(UPDATE_MODEL_EVENT, newVal); - return; - } - data.userInput = null; - if (oldVal === newVal && value) - return; - emit(UPDATE_MODEL_EVENT, newVal); - if (oldVal !== newVal) { - emit(CHANGE_EVENT, newVal, oldVal); - } - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err)); - } - data.currentValue = newVal; - }; - const handleInput = (value) => { - data.userInput = value; - const newVal = value === "" ? null : Number(value); - emit(INPUT_EVENT, newVal); - setCurrentValue(newVal, false); - }; - const handleInputChange = (value) => { - const newVal = value !== "" ? Number(value) : ""; - if (isNumber2(newVal) && !Number.isNaN(newVal) || value === "") { - setCurrentValue(newVal); - } - setCurrentValueToModelValue(); - data.userInput = null; - }; - const focus = () => { - var _a, _b; - (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a); - }; - const blur = () => { - var _a, _b; - (_b = (_a = input.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a); - }; - const handleFocus = (event) => { - emit("focus", event); - }; - const handleBlur = (event) => { - var _a, _b; - data.userInput = null; - if (data.currentValue === null && ((_a = input.value) == null ? void 0 : _a.input)) { - input.value.input.value = ""; - } - emit("blur", event); - if (props2.validateEvent) { - (_b = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _b.call(formItem, "blur").catch((err) => debugWarn(err)); - } - }; - const setCurrentValueToModelValue = () => { - if (data.currentValue !== props2.modelValue) { - data.currentValue = props2.modelValue; - } - }; - const handleWheel = (e) => { - if (document.activeElement === e.target) - e.preventDefault(); - }; - watch( - () => props2.modelValue, - (value, oldValue) => { - const newValue = verifyValue(value, true); - if (data.userInput === null && newValue !== oldValue) { - data.currentValue = newValue; - } - }, - { immediate: true } - ); - watch( - () => props2.precision, - () => { - data.currentValue = verifyValue(props2.modelValue); - } - ); - onMounted(() => { - var _a; - const { min: min4, max: max4, modelValue } = props2; - const innerInput = (_a = input.value) == null ? void 0 : _a.input; - innerInput.setAttribute("role", "spinbutton"); - if (Number.isFinite(max4)) { - innerInput.setAttribute("aria-valuemax", String(max4)); - } else { - innerInput.removeAttribute("aria-valuemax"); - } - if (Number.isFinite(min4)) { - innerInput.setAttribute("aria-valuemin", String(min4)); - } else { - innerInput.removeAttribute("aria-valuemin"); - } - innerInput.setAttribute( - "aria-valuenow", - data.currentValue || data.currentValue === 0 ? String(data.currentValue) : "" - ); - innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value)); - if (!isNumber2(modelValue) && modelValue != null) { - let val = Number(modelValue); - if (Number.isNaN(val)) { - val = null; - } - emit(UPDATE_MODEL_EVENT, val); - } - innerInput.addEventListener("wheel", handleWheel, { passive: false }); - }); - onUpdated(() => { - var _a, _b; - const innerInput = (_a = input.value) == null ? void 0 : _a.input; - innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${(_b = data.currentValue) != null ? _b : ""}`); - }); - __expose({ - focus, - blur - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - unref(ns).b(), - unref(ns).m(unref(inputNumberSize)), - unref(ns).is("disabled", unref(inputNumberDisabled)), - unref(ns).is("without-controls", !_ctx.controls), - unref(ns).is("controls-right", controlsAtRight.value), - unref(ns).is(_ctx.align, !!_ctx.align) - ]), - onDragstart: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["prevent"])) - }, - [ - _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", { - key: 0, - role: "button", - "aria-label": unref(t)("el.inputNumber.decrease"), - class: normalizeClass([unref(ns).e("decrease"), unref(ns).is("disabled", minDisabled.value)]), - onKeydown: withKeys(decrease, ["enter"]) - }, [ - renderSlot(_ctx.$slots, "decrease-icon", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_down_default), { key: 0 })) : (openBlock(), createBlock(unref(minus_default), { key: 1 })) - ]), - _: 1 - }) - ]) - ], 42, _hoisted_148)), [ - [unref(vRepeatClick), decrease] - ]) : createCommentVNode("v-if", true), - _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", { - key: 1, - role: "button", - "aria-label": unref(t)("el.inputNumber.increase"), - class: normalizeClass([unref(ns).e("increase"), unref(ns).is("disabled", maxDisabled.value)]), - onKeydown: withKeys(increase, ["enter"]) - }, [ - renderSlot(_ctx.$slots, "increase-icon", {}, () => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_up_default), { key: 0 })) : (openBlock(), createBlock(unref(plus_default), { key: 1 })) - ]), - _: 1 - }) - ]) - ], 42, _hoisted_225)), [ - [unref(vRepeatClick), increase] - ]) : createCommentVNode("v-if", true), - createVNode(unref(ElInput), { - id: _ctx.id, - ref_key: "input", - ref: input, - type: "number", - step: _ctx.step, - "model-value": displayValue.value, - placeholder: _ctx.placeholder, - readonly: _ctx.readonly, - disabled: unref(inputNumberDisabled), - size: unref(inputNumberSize), - max: _ctx.max, - min: _ctx.min, - name: _ctx.name, - "aria-label": _ctx.ariaLabel, - "validate-event": false, - inputmode: _ctx.inputmode, - onKeydown: handleKeydown, - onBlur: handleBlur, - onFocus: handleFocus, - onInput: handleInput, - onChange: handleInputChange - }, createSlots({ - _: 2 - }, [ - _ctx.$slots.prefix ? { - name: "prefix", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "prefix") - ]), - key: "0" - } : void 0, - _ctx.$slots.suffix ? { - name: "suffix", - fn: withCtx(() => [ - renderSlot(_ctx.$slots, "suffix") - ]), - key: "1" - } : void 0 - ]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "inputmode"]) - ], - 34 - ); - }; - } -}); -var InputNumber = _export_sfc(_sfc_main95, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]); - -// node_modules/element-plus/es/components/input-number/index.mjs -var ElInputNumber = withInstall(InputNumber); - -// node_modules/element-plus/es/components/input-tag/src/input-tag.mjs -var inputTagProps = buildProps({ - modelValue: { - type: definePropType(Array) - }, - max: Number, - tagType: { ...tagProps.type, default: "info" }, - tagEffect: tagProps.effect, - trigger: { - type: definePropType(String), - default: EVENT_CODE.enter - }, - draggable: Boolean, - delimiter: { - type: [String, RegExp], - default: "" - }, - size: useSizeProp, - clearable: Boolean, - clearIcon: { - type: iconPropType, - default: circle_close_default - }, - disabled: { - type: Boolean, - default: void 0 - }, - validateEvent: { - type: Boolean, - default: true - }, - readonly: Boolean, - autofocus: Boolean, - id: { - type: String, - default: void 0 - }, - tabindex: { - type: [String, Number], - default: 0 - }, - maxlength: { - type: [String, Number] - }, - minlength: { - type: [String, Number] - }, - placeholder: String, - autocomplete: { - type: definePropType(String), - default: "off" - }, - saveOnBlur: { - type: Boolean, - default: true - }, - collapseTags: Boolean, - collapseTagsTooltip: Boolean, - maxCollapseTags: { - type: Number, - default: 1 - }, - ariaLabel: String -}); -var inputTagEmits = { - [UPDATE_MODEL_EVENT]: (value) => isArray(value) || isUndefined2(value), - [CHANGE_EVENT]: (value) => isArray(value) || isUndefined2(value), - [INPUT_EVENT]: (value) => isString(value), - "add-tag": (value) => isString(value) || isArray(value), - "remove-tag": (value, index) => isString(value) && isNumber2(index), - "drag-tag": (oldIndex, newIndex, value) => isNumber2(oldIndex) && isNumber2(newIndex) && isString(value), - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true -}; - -// node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag.mjs -function useInputTag({ props: props2, emit, formItem }) { - const disabled = useFormDisabled(); - const size3 = useFormSize(); - const inputRef = shallowRef(); - const inputValue = ref(); - const tagTooltipRef = ref(); - const tagSize = computed(() => { - return ["small"].includes(size3.value) ? "small" : "default"; - }); - const placeholder = computed(() => { - var _a; - return ((_a = props2.modelValue) == null ? void 0 : _a.length) ? void 0 : props2.placeholder; - }); - const closable = computed(() => !(props2.readonly || disabled.value)); - const inputLimit = computed(() => { - var _a, _b; - return isUndefined2(props2.max) ? false : ((_b = (_a = props2.modelValue) == null ? void 0 : _a.length) != null ? _b : 0) >= props2.max; - }); - const showTagList = computed(() => { - var _a; - return props2.collapseTags ? (_a = props2.modelValue) == null ? void 0 : _a.slice(0, props2.maxCollapseTags) : props2.modelValue; - }); - const collapseTagList = computed(() => { - var _a; - return props2.collapseTags ? (_a = props2.modelValue) == null ? void 0 : _a.slice(props2.maxCollapseTags) : []; - }); - const addTagsEmit = (value) => { - var _a; - const list = [...(_a = props2.modelValue) != null ? _a : [], ...castArray_default(value)]; - emit(UPDATE_MODEL_EVENT, list); - emit(CHANGE_EVENT, list); - emit("add-tag", value); - inputValue.value = void 0; - }; - const getDelimitedTags = (input) => { - var _a, _b; - const tags = input.split(props2.delimiter).filter((val) => val && val !== input); - if (props2.max) { - const maxInsert = props2.max - ((_b = (_a = props2.modelValue) == null ? void 0 : _a.length) != null ? _b : 0); - tags.splice(maxInsert); - } - return tags.length === 1 ? tags[0] : tags; - }; - const handleInput = (event) => { - if (inputLimit.value) { - inputValue.value = void 0; - return; - } - if (isComposing.value) - return; - if (props2.delimiter && inputValue.value) { - const tags = getDelimitedTags(inputValue.value); - if (tags.length) { - addTagsEmit(tags); - } - } - emit(INPUT_EVENT, event.target.value); - }; - const handleKeydown = (event) => { - var _a; - if (isComposing.value) - return; - const code = getEventCode(event); - switch (code) { - case props2.trigger: - event.preventDefault(); - event.stopPropagation(); - handleAddTag(); - break; - case EVENT_CODE.numpadEnter: - if (props2.trigger === EVENT_CODE.enter) { - event.preventDefault(); - event.stopPropagation(); - handleAddTag(); - } - break; - case EVENT_CODE.backspace: - if (!inputValue.value && ((_a = props2.modelValue) == null ? void 0 : _a.length)) { - event.preventDefault(); - event.stopPropagation(); - handleRemoveTag(props2.modelValue.length - 1); - } - break; - } - }; - const handleKeyup = (event) => { - if (isComposing.value || !isAndroid()) - return; - const code = getEventCode(event); - switch (code) { - case EVENT_CODE.space: - if (props2.trigger === EVENT_CODE.space) { - event.preventDefault(); - event.stopPropagation(); - handleAddTag(); - } - break; - } - }; - const handleAddTag = () => { - var _a; - const value = (_a = inputValue.value) == null ? void 0 : _a.trim(); - if (!value || inputLimit.value) - return; - addTagsEmit(value); - }; - const handleRemoveTag = (index) => { - var _a; - const value = ((_a = props2.modelValue) != null ? _a : []).slice(); - const [item] = value.splice(index, 1); - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value); - emit("remove-tag", item, index); - }; - const handleClear = () => { - inputValue.value = void 0; - emit(UPDATE_MODEL_EVENT, void 0); - emit(CHANGE_EVENT, void 0); - emit("clear"); - }; - const handleDragged = (draggingIndex, dropIndex, type4) => { - var _a; - const value = ((_a = props2.modelValue) != null ? _a : []).slice(); - const [draggedItem] = value.splice(draggingIndex, 1); - const step2 = dropIndex > draggingIndex && type4 === "before" ? -1 : dropIndex < draggingIndex && type4 === "after" ? 1 : 0; - value.splice(dropIndex + step2, 0, draggedItem); - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value); - emit("drag-tag", draggingIndex, dropIndex + step2, draggedItem); - }; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.blur(); - }; - const { wrapperRef, isFocused } = useFocusController(inputRef, { - disabled, - beforeBlur(event) { - var _a; - return (_a = tagTooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event); - }, - afterBlur() { - var _a; - if (props2.saveOnBlur) { - handleAddTag(); - } else { - inputValue.value = void 0; - } - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err)); - } - } - }); - const { - isComposing, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd - } = useComposition({ afterComposition: handleInput }); - watch( - () => props2.modelValue, - () => { - var _a; - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, CHANGE_EVENT).catch((err) => debugWarn(err)); - } - } - ); - return { - inputRef, - wrapperRef, - tagTooltipRef, - isFocused, - isComposing, - inputValue, - size: size3, - tagSize, - placeholder, - closable, - disabled, - inputLimit, - showTagList, - collapseTagList, - handleDragged, - handleInput, - handleKeydown, - handleKeyup, - handleAddTag, - handleRemoveTag, - handleClear, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd, - focus, - blur - }; -} - -// node_modules/element-plus/es/components/input-tag/src/composables/use-hovering.mjs -function useHovering() { - const hovering = ref(false); - const handleMouseEnter = () => { - hovering.value = true; - }; - const handleMouseLeave = () => { - hovering.value = false; - }; - return { - hovering, - handleMouseEnter, - handleMouseLeave - }; -} - -// node_modules/element-plus/es/components/input-tag/src/composables/use-drag-tag.mjs -function useDragTag({ - wrapperRef, - handleDragged, - afterDragged -}) { - const ns = useNamespace("input-tag"); - const dropIndicatorRef = shallowRef(); - const showDropIndicator = ref(false); - let draggingIndex; - let draggingTag; - let dropIndex; - let dropType; - function getTagClassName(index) { - return `.${ns.e("inner")} .${ns.namespace.value}-tag:nth-child(${index + 1})`; - } - function handleDragStart(event, index) { - draggingIndex = index; - draggingTag = wrapperRef.value.querySelector( - getTagClassName(index) - ); - if (draggingTag) { - draggingTag.style.opacity = "0.5"; - } - event.dataTransfer.effectAllowed = "move"; - } - function handleDragOver(event, index) { - dropIndex = index; - event.preventDefault(); - event.dataTransfer.dropEffect = "move"; - if (isUndefined2(draggingIndex) || draggingIndex === index) { - showDropIndicator.value = false; - return; - } - const dropPosition = wrapperRef.value.querySelector(getTagClassName(index)).getBoundingClientRect(); - const dropPrev = !(draggingIndex + 1 === index); - const dropNext = !(draggingIndex - 1 === index); - const distance = event.clientX - dropPosition.left; - const prevPercent = dropPrev ? dropNext ? 0.5 : 1 : -1; - const nextPercent = dropNext ? dropPrev ? 0.5 : 0 : 1; - if (distance <= dropPosition.width * prevPercent) { - dropType = "before"; - } else if (distance > dropPosition.width * nextPercent) { - dropType = "after"; - } else { - dropType = void 0; - } - const innerEl = wrapperRef.value.querySelector( - `.${ns.e("inner")}` - ); - const innerPosition = innerEl.getBoundingClientRect(); - const gap = Number.parseFloat(getStyle(innerEl, "gap")) / 2; - const indicatorTop = dropPosition.top - innerPosition.top; - let indicatorLeft = -9999; - if (dropType === "before") { - indicatorLeft = Math.max( - dropPosition.left - innerPosition.left - gap, - Math.floor(-gap / 2) - ); - } else if (dropType === "after") { - const left = dropPosition.right - innerPosition.left; - indicatorLeft = left + (innerPosition.width === left ? Math.floor(gap / 2) : gap); - } - setStyle(dropIndicatorRef.value, { - top: `${indicatorTop}px`, - left: `${indicatorLeft}px` - }); - showDropIndicator.value = !!dropType; - } - function handleDragEnd(event) { - event.preventDefault(); - if (draggingTag) { - draggingTag.style.opacity = ""; - } - if (dropType && !isUndefined2(draggingIndex) && !isUndefined2(dropIndex) && draggingIndex !== dropIndex) { - handleDragged(draggingIndex, dropIndex, dropType); - } - showDropIndicator.value = false; - draggingIndex = void 0; - draggingTag = null; - dropIndex = void 0; - dropType = void 0; - afterDragged == null ? void 0 : afterDragged(); - } - return { - dropIndicatorRef, - showDropIndicator, - handleDragStart, - handleDragOver, - handleDragEnd - }; -} - -// node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag-dom.mjs -function useInputTagDom({ - props: props2, - isFocused, - hovering, - disabled, - inputValue, - size: size3, - validateState, - validateIcon, - needStatusIcon -}) { - const attrs = useAttrs(); - const slots = useSlots(); - const ns = useNamespace("input-tag"); - const nsInput = useNamespace("input"); - const collapseItemRef = ref(); - const innerRef = ref(); - const containerKls = computed(() => [ - ns.b(), - ns.is("focused", isFocused.value), - ns.is("hovering", hovering.value), - ns.is("disabled", disabled.value), - ns.m(size3.value), - ns.e("wrapper"), - attrs.class - ]); - const containerStyle = computed(() => [attrs.style]); - const innerKls = computed(() => { - var _a, _b; - return [ - ns.e("inner"), - ns.is("draggable", props2.draggable), - ns.is("left-space", !((_a = props2.modelValue) == null ? void 0 : _a.length) && !slots.prefix), - ns.is("right-space", !((_b = props2.modelValue) == null ? void 0 : _b.length) && !showSuffix.value) - ]; - }); - const showClear = computed(() => { - var _a; - return props2.clearable && !disabled.value && !props2.readonly && (((_a = props2.modelValue) == null ? void 0 : _a.length) || inputValue.value) && (isFocused.value || hovering.value); - }); - const showSuffix = computed(() => { - return slots.suffix || showClear.value || validateState.value && validateIcon.value && needStatusIcon.value; - }); - const states = reactive({ - innerWidth: 0, - collapseItemWidth: 0 - }); - const getGapWidth = () => { - if (!innerRef.value) - return 0; - const style = window.getComputedStyle(innerRef.value); - return Number.parseFloat(style.gap || "6px"); - }; - const resetInnerWidth = () => { - states.innerWidth = Number.parseFloat( - window.getComputedStyle(innerRef.value).width - ); - }; - const resetCollapseItemWidth = () => { - states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width; - }; - const tagStyle = computed(() => { - if (!props2.collapseTags) - return {}; - const gapWidth = getGapWidth(); - const inputSlotWidth = gapWidth + MINIMUM_INPUT_WIDTH; - const maxWidth = collapseItemRef.value && props2.maxCollapseTags === 1 ? states.innerWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.innerWidth - inputSlotWidth; - return { maxWidth: `${Math.max(maxWidth, 0)}px` }; - }); - useResizeObserver(innerRef, resetInnerWidth); - useResizeObserver(collapseItemRef, resetCollapseItemWidth); - return { - ns, - nsInput, - containerKls, - containerStyle, - innerKls, - showClear, - showSuffix, - tagStyle, - collapseItemRef, - innerRef - }; -} - -// node_modules/element-plus/es/components/input-tag/src/input-tag2.mjs -var _hoisted_149 = ["id", "minlength", "maxlength", "disabled", "readonly", "autocomplete", "tabindex", "placeholder", "autofocus", "ariaLabel"]; -var _hoisted_226 = ["textContent"]; -var _sfc_main96 = defineComponent({ - ...{ - name: "ElInputTag", - inheritAttrs: false - }, - __name: "input-tag", - props: inputTagProps, - emits: inputTagEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const attrs = useAttrs2(); - const slots = useSlots(); - const { form, formItem } = useFormItem(); - const { inputId } = useFormItemInputId(props2, { formItemContext: formItem }); - const needStatusIcon = computed(() => { - var _a; - return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false; - }); - const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || ""); - const validateIcon = computed(() => { - return validateState.value && ValidateComponentsMap[validateState.value]; - }); - const { - inputRef, - wrapperRef, - tagTooltipRef, - isFocused, - inputValue, - size: size3, - tagSize, - placeholder, - closable, - disabled, - showTagList, - collapseTagList, - handleDragged, - handleInput, - handleKeydown, - handleKeyup, - handleRemoveTag, - handleClear, - handleCompositionStart, - handleCompositionUpdate, - handleCompositionEnd, - focus, - blur - } = useInputTag({ props: props2, emit, formItem }); - const { hovering, handleMouseEnter, handleMouseLeave } = useHovering(); - const { calculatorRef, inputStyle } = useCalcInputWidth(); - const { - dropIndicatorRef, - showDropIndicator, - handleDragStart, - handleDragOver, - handleDragEnd - } = useDragTag({ wrapperRef, handleDragged, afterDragged: focus }); - const { - ns, - nsInput, - containerKls, - containerStyle, - innerKls, - showClear, - showSuffix, - tagStyle, - collapseItemRef, - innerRef - } = useInputTagDom({ - props: props2, - hovering, - isFocused, - inputValue, - disabled, - size: size3, - validateState, - validateIcon, - needStatusIcon - }); - __expose({ - focus, - blur - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "wrapperRef", - ref: wrapperRef, - class: normalizeClass(unref(containerKls)), - style: normalizeStyle(unref(containerStyle)), - onMouseenter: _cache[8] || (_cache[8] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)), - onMouseleave: _cache[9] || (_cache[9] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)) - }, - [ - unref(slots).prefix ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("prefix")) - }, - [ - renderSlot(_ctx.$slots, "prefix") - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - ref_key: "innerRef", - ref: innerRef, - class: normalizeClass(unref(innerKls)) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(showTagList), (item, index) => { - return openBlock(), createBlock(unref(ElTag), { - key: index, - size: unref(tagSize), - closable: unref(closable), - type: _ctx.tagType, - effect: _ctx.tagEffect, - draggable: unref(closable) && _ctx.draggable, - style: normalizeStyle(unref(tagStyle)), - "disable-transitions": "", - onClose: ($event) => unref(handleRemoveTag)(index), - onDragstart: (event) => unref(handleDragStart)(event, index), - onDragover: (event) => unref(handleDragOver)(event, index), - onDragend: unref(handleDragEnd), - onDrop: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "tag", { - value: item, - index - }, () => [ - createTextVNode( - toDisplayString(item), - 1 - ) - ]) - ]), - _: 2 - }, 1032, ["size", "closable", "type", "effect", "draggable", "style", "onClose", "onDragstart", "onDragover", "onDragend"]); - }), - 128 - )), - _ctx.collapseTags && _ctx.modelValue && _ctx.modelValue.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), { - key: 0, - ref_key: "tagTooltipRef", - ref: tagTooltipRef, - disabled: !_ctx.collapseTagsTooltip, - "fallback-placements": ["bottom", "top", "right", "left"], - effect: _ctx.tagEffect, - placement: "bottom" - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - ref_key: "collapseItemRef", - ref: collapseItemRef - }, - [ - createVNode(unref(ElTag), { - closable: false, - size: unref(tagSize), - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "" - }, { - default: withCtx(() => [ - createTextVNode( - " + " + toDisplayString(_ctx.modelValue.length - _ctx.maxCollapseTags), - 1 - ) - ]), - _: 1 - }, 8, ["size", "type", "effect"]) - ], - 512 - ) - ]), - content: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("input-tag-list")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(collapseTagList), (item, index) => { - return openBlock(), createBlock(unref(ElTag), { - key: index, - size: unref(tagSize), - closable: unref(closable), - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "", - onClose: ($event) => unref(handleRemoveTag)(index + _ctx.maxCollapseTags) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "tag", { - value: item, - index: index + _ctx.maxCollapseTags - }, () => [ - createTextVNode( - toDisplayString(item), - 1 - ) - ]) - ]), - _: 2 - }, 1032, ["size", "closable", "type", "effect", "onClose"]); - }), - 128 - )) - ], - 2 - ) - ]), - _: 3 - }, 8, ["disabled", "effect"])) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("input-wrapper")) - }, - [ - withDirectives(createBaseVNode("input", mergeProps({ - id: unref(inputId), - ref_key: "inputRef", - ref: inputRef, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null) - }, unref(attrs), { - type: "text", - minlength: _ctx.minlength, - maxlength: _ctx.maxlength, - disabled: unref(disabled), - readonly: _ctx.readonly, - autocomplete: _ctx.autocomplete, - tabindex: _ctx.tabindex, - placeholder: unref(placeholder), - autofocus: _ctx.autofocus, - ariaLabel: _ctx.ariaLabel, - class: unref(ns).e("input"), - style: unref(inputStyle), - onCompositionstart: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)), - onCompositionupdate: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)), - onCompositionend: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)), - onInput: _cache[5] || (_cache[5] = (...args) => unref(handleInput) && unref(handleInput)(...args)), - onKeydown: _cache[6] || (_cache[6] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)), - onKeyup: _cache[7] || (_cache[7] = (...args) => unref(handleKeyup) && unref(handleKeyup)(...args)) - }), null, 16, _hoisted_149), [ - [vModelText, unref(inputValue)] - ]), - createBaseVNode("span", { - ref_key: "calculatorRef", - ref: calculatorRef, - "aria-hidden": "true", - class: normalizeClass(unref(ns).e("input-calculator")), - textContent: toDisplayString(unref(inputValue)) - }, null, 10, _hoisted_226) - ], - 2 - ), - withDirectives(createBaseVNode( - "div", - { - ref_key: "dropIndicatorRef", - ref: dropIndicatorRef, - class: normalizeClass(unref(ns).e("drop-indicator")) - }, - null, - 2 - ), [ - [vShow, unref(showDropIndicator)] - ]) - ], - 2 - ), - unref(showSuffix) ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("suffix")) - }, - [ - renderSlot(_ctx.$slots, "suffix"), - unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([unref(ns).e("icon"), unref(ns).e("clear")]), - onMousedown: withModifiers(unref(NOOP), ["prevent"]), - onClick: unref(handleClear) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class", "onMousedown", "onClick"])) : createCommentVNode("v-if", true), - validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass([ - unref(nsInput).e("icon"), - unref(nsInput).e("validateIcon"), - unref(nsInput).is("loading", validateState.value === "validating") - ]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(validateIcon.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 38 - ); - }; - } -}); -var InputTag = _export_sfc(_sfc_main96, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-tag/src/input-tag.vue"]]); - -// node_modules/element-plus/es/components/input-tag/index.mjs -var ElInputTag = withInstall(InputTag); - -// node_modules/element-plus/es/components/link/src/link.mjs -var linkProps = buildProps({ - type: { - type: String, - values: ["primary", "success", "warning", "info", "danger", "default"], - default: void 0 - }, - underline: { - type: [Boolean, String], - values: [true, false, "always", "never", "hover"], - default: void 0 - }, - disabled: Boolean, - href: { type: String, default: "" }, - target: { - type: String, - default: "_self" - }, - icon: { - type: iconPropType - } -}); -var linkEmits = { - click: (evt) => evt instanceof MouseEvent -}; - -// node_modules/element-plus/es/components/link/src/link2.mjs -var _hoisted_150 = ["href", "target"]; -var _sfc_main97 = defineComponent({ - ...{ - name: "ElLink" - }, - __name: "link", - props: linkProps, - emits: linkEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const globalConfig2 = useGlobalConfig("link"); - useDeprecated( - { - scope: "el-link", - from: "The underline option (boolean)", - replacement: "'always' | 'hover' | 'never'", - version: "3.0.0", - ref: "https://element-plus.org/en-US/component/link.html#underline" - }, - computed(() => isBoolean2(props2.underline)) - ); - const ns = useNamespace("link"); - const linkKls = computed(() => { - var _a, _b, _c; - return [ - ns.b(), - ns.m((_c = (_b = props2.type) != null ? _b : (_a = globalConfig2.value) == null ? void 0 : _a.type) != null ? _c : "default"), - ns.is("disabled", props2.disabled), - ns.is("underline", underline.value === "always"), - ns.is("hover-underline", underline.value === "hover" && !props2.disabled) - ]; - }); - const underline = computed(() => { - var _a, _b, _c; - if (isBoolean2(props2.underline)) { - return props2.underline ? "hover" : "never"; - } else - return (_c = (_b = props2.underline) != null ? _b : (_a = globalConfig2.value) == null ? void 0 : _a.underline) != null ? _c : "hover"; - }); - function handleClick(event) { - if (!props2.disabled) - emit("click", event); - } - return (_ctx, _cache) => { - return openBlock(), createElementBlock("a", { - class: normalizeClass(linkKls.value), - href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href, - target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target, - onClick: handleClick - }, [ - _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - _ctx.$slots.default ? (openBlock(), createElementBlock( - "span", - { - key: 1, - class: normalizeClass(unref(ns).e("inner")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true) - ], 10, _hoisted_150); - }; - } -}); -var Link = _export_sfc(_sfc_main97, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/link/src/link.vue"]]); - -// node_modules/element-plus/es/components/link/index.mjs -var ElLink = withInstall(Link); - -// node_modules/element-plus/es/components/menu/src/utils/submenu.mjs -var SubMenu = class { - constructor(parent2, domNode) { - this.parent = parent2; - this.domNode = domNode; - this.subIndex = 0; - this.subIndex = 0; - this.init(); - } - init() { - this.subMenuItems = this.domNode.querySelectorAll("li"); - this.addListeners(); - } - gotoSubIndex(idx) { - if (idx === this.subMenuItems.length) { - idx = 0; - } else if (idx < 0) { - idx = this.subMenuItems.length - 1; - } - this.subMenuItems[idx].focus(); - this.subIndex = idx; - } - addListeners() { - const parentNode = this.parent.domNode; - Array.prototype.forEach.call(this.subMenuItems, (el) => { - el.addEventListener("keydown", (event) => { - const code = getEventCode(event); - let prevDef = false; - switch (code) { - case EVENT_CODE.down: { - this.gotoSubIndex(this.subIndex + 1); - prevDef = true; - break; - } - case EVENT_CODE.up: { - this.gotoSubIndex(this.subIndex - 1); - prevDef = true; - break; - } - case EVENT_CODE.tab: { - triggerEvent(parentNode, "mouseleave"); - break; - } - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - case EVENT_CODE.space: { - prevDef = true; - event.currentTarget.click(); - break; - } - } - if (prevDef) { - event.preventDefault(); - event.stopPropagation(); - } - return false; - }); - }); - } -}; - -// node_modules/element-plus/es/components/menu/src/utils/menu-item.mjs -var MenuItem = class { - constructor(domNode, namespace) { - this.domNode = domNode; - this.submenu = null; - this.submenu = null; - this.init(namespace); - } - init(namespace) { - this.domNode.setAttribute("tabindex", "0"); - const menuChild = this.domNode.querySelector(`.${namespace}-menu`); - if (menuChild) { - this.submenu = new SubMenu(this, menuChild); - } - this.addListeners(); - } - addListeners() { - this.domNode.addEventListener("keydown", (event) => { - const code = getEventCode(event); - let prevDef = false; - switch (code) { - case EVENT_CODE.down: { - triggerEvent(event.currentTarget, "mouseenter"); - this.submenu && this.submenu.gotoSubIndex(0); - prevDef = true; - break; - } - case EVENT_CODE.up: { - triggerEvent(event.currentTarget, "mouseenter"); - this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1); - prevDef = true; - break; - } - case EVENT_CODE.tab: { - triggerEvent(event.currentTarget, "mouseleave"); - break; - } - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - case EVENT_CODE.space: { - prevDef = true; - event.currentTarget.click(); - break; - } - } - if (prevDef) { - event.preventDefault(); - } - }); - } -}; - -// node_modules/element-plus/es/components/menu/src/utils/menu-bar.mjs -var Menu = class { - constructor(domNode, namespace) { - this.domNode = domNode; - this.init(namespace); - } - init(namespace) { - const menuChildren = this.domNode.childNodes; - Array.from(menuChildren).forEach((child) => { - if (child.nodeType === 1) { - new MenuItem(child, namespace); - } - }); - } -}; - -// node_modules/element-plus/es/components/menu/src/menu-collapse-transition.mjs -var _sfc_main98 = defineComponent({ - ...{ - name: "ElMenuCollapseTransition" - }, - __name: "menu-collapse-transition", - setup(__props) { - const ns = useNamespace("menu"); - const listeners = { - onBeforeEnter: (el) => el.style.opacity = "0.2", - onEnter(el, done) { - addClass(el, `${ns.namespace.value}-opacity-transition`); - el.style.opacity = "1"; - done(); - }, - onAfterEnter(el) { - removeClass(el, `${ns.namespace.value}-opacity-transition`); - el.style.opacity = ""; - }, - onBeforeLeave(el) { - if (!el.dataset) - el.dataset = {}; - if (hasClass(el, ns.m("collapse"))) { - removeClass(el, ns.m("collapse")); - el.dataset.oldOverflow = el.style.overflow; - el.dataset.scrollWidth = el.clientWidth.toString(); - addClass(el, ns.m("collapse")); - } else { - addClass(el, ns.m("collapse")); - el.dataset.oldOverflow = el.style.overflow; - el.dataset.scrollWidth = el.clientWidth.toString(); - removeClass(el, ns.m("collapse")); - } - el.style.width = `${el.scrollWidth}px`; - el.style.overflow = "hidden"; - }, - onLeave(el) { - addClass(el, "horizontal-collapse-transition"); - el.style.width = `${el.dataset.scrollWidth}px`; - } - }; - return (_ctx, _cache) => { - return openBlock(), createBlock( - Transition, - mergeProps({ mode: "out-in" }, listeners), - { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, - 16 - ); - }; - } -}); -var ElMenuCollapseTransition = _export_sfc(_sfc_main98, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]); - -// node_modules/element-plus/es/components/menu/src/use-menu.mjs -function useMenu(instance, currentIndex) { - const indexPath = computed(() => { - let parent2 = instance.parent; - const path = [currentIndex.value]; - while (parent2.type.name !== "ElMenu") { - if (parent2.props.index) { - path.unshift(parent2.props.index); - } - parent2 = parent2.parent; - } - return path; - }); - const parentMenu = computed(() => { - let parent2 = instance.parent; - while (parent2 && !["ElMenu", "ElSubMenu"].includes(parent2.type.name)) { - parent2 = parent2.parent; - } - return parent2; - }); - return { - parentMenu, - indexPath - }; -} - -// node_modules/element-plus/es/components/menu/src/use-menu-color.mjs -function useMenuColor(props2) { - const menuBarColor = computed(() => { - const color = props2.backgroundColor; - return color ? new TinyColor(color).shade(20).toString() : ""; - }); - return menuBarColor; -} - -// node_modules/element-plus/es/components/menu/src/use-menu-css-var.mjs -var useMenuCssVar = (props2, level) => { - const ns = useNamespace("menu"); - return computed( - () => ns.cssVarBlock({ - "text-color": props2.textColor || "", - "hover-text-color": props2.textColor || "", - "bg-color": props2.backgroundColor || "", - "hover-bg-color": useMenuColor(props2).value || "", - "active-color": props2.activeTextColor || "", - level: `${level}` - }) - ); -}; - -// node_modules/element-plus/es/components/menu/src/tokens.mjs -var MENU_INJECTION_KEY = "rootMenu"; -var SUB_MENU_INJECTION_KEY = "subMenu:"; - -// node_modules/element-plus/es/components/menu/src/sub-menu.mjs -var subMenuProps = buildProps({ - index: { - type: String, - required: true - }, - showTimeout: Number, - hideTimeout: Number, - popperClass: String, - popperStyle: { - type: definePropType([String, Object]) - }, - disabled: Boolean, - teleported: { - type: Boolean, - default: void 0 - }, - popperOffset: Number, - expandCloseIcon: { - type: iconPropType - }, - expandOpenIcon: { - type: iconPropType - }, - collapseCloseIcon: { - type: iconPropType - }, - collapseOpenIcon: { - type: iconPropType - } -}); -var COMPONENT_NAME15 = "ElSubMenu"; -var SubMenu2 = defineComponent({ - name: COMPONENT_NAME15, - props: subMenuProps, - setup(props2, { slots, expose }) { - const instance = getCurrentInstance(); - const { indexPath, parentMenu } = useMenu( - instance, - computed(() => props2.index) - ); - const nsMenu = useNamespace("menu"); - const nsSubMenu = useNamespace("sub-menu"); - const rootMenu = inject(MENU_INJECTION_KEY); - if (!rootMenu) - throwError(COMPONENT_NAME15, "can not inject root menu"); - const subMenu = inject( - `${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}` - ); - if (!subMenu) - throwError(COMPONENT_NAME15, "can not inject sub menu"); - const items = ref({}); - const subMenus = ref({}); - let timeout; - const mouseInChild = ref(false); - const verticalTitleRef = ref(); - const vPopper = ref(); - const isFirstLevel = computed(() => subMenu.level === 0); - const currentPlacement = computed( - () => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start" - ); - const subMenuTitleIcon = computed(() => { - const isExpandedMode = mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse; - if (isExpandedMode) { - if (props2.expandCloseIcon && props2.expandOpenIcon) { - return opened.value ? props2.expandOpenIcon : props2.expandCloseIcon; - } - return arrow_down_default; - } else { - if (props2.collapseCloseIcon && props2.collapseOpenIcon) { - return opened.value ? props2.collapseOpenIcon : props2.collapseCloseIcon; - } - return arrow_right_default; - } - }); - const appendToBody = computed(() => { - const value = props2.teleported; - return isUndefined2(value) ? isFirstLevel.value : value; - }); - const menuTransitionName = computed( - () => rootMenu.props.collapse ? `${nsMenu.namespace.value}-zoom-in-left` : `${nsMenu.namespace.value}-zoom-in-top` - ); - const fallbackPlacements = computed( - () => mode.value === "horizontal" && isFirstLevel.value ? [ - "bottom-start", - "bottom-end", - "top-start", - "top-end", - "right-start", - "left-start" - ] : [ - "right-start", - "right", - "right-end", - "left-start", - "bottom-start", - "bottom-end", - "top-start", - "top-end" - ] - ); - const opened = computed(() => rootMenu.openedMenus.includes(props2.index)); - const active = computed( - () => [...Object.values(items.value), ...Object.values(subMenus.value)].some( - ({ active: active2 }) => active2 - ) - ); - const mode = computed(() => rootMenu.props.mode); - const persistent = computed(() => rootMenu.props.persistent); - const item = reactive({ - index: props2.index, - indexPath, - active - }); - const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1); - const subMenuPopperOffset = computed( - () => { - var _a; - return (_a = props2.popperOffset) != null ? _a : rootMenu.props.popperOffset; - } - ); - const subMenuPopperClass = computed( - () => { - var _a; - return (_a = props2.popperClass) != null ? _a : rootMenu.props.popperClass; - } - ); - const subMenuPopperStyle = computed( - () => { - var _a; - return (_a = props2.popperStyle) != null ? _a : rootMenu.props.popperStyle; - } - ); - const subMenuShowTimeout = computed( - () => { - var _a; - return (_a = props2.showTimeout) != null ? _a : rootMenu.props.showTimeout; - } - ); - const subMenuHideTimeout = computed( - () => { - var _a; - return (_a = props2.hideTimeout) != null ? _a : rootMenu.props.hideTimeout; - } - ); - const doDestroy = () => { - var _a, _b, _c; - return (_c = (_b = (_a = vPopper.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.popperInstanceRef) == null ? void 0 : _c.destroy(); - }; - const handleCollapseToggle = (value) => { - if (!value) { - doDestroy(); - } - }; - const handleClick = () => { - if (rootMenu.props.menuTrigger === "hover" && rootMenu.props.mode === "horizontal" || rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props2.disabled) - return; - rootMenu.handleSubMenuClick({ - index: props2.index, - indexPath: indexPath.value, - active: active.value - }); - }; - const handleMouseenter = (event, showTimeout = subMenuShowTimeout.value) => { - var _a; - if (event.type === "focus") - return; - if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props2.disabled) { - subMenu.mouseInChild.value = true; - return; - } - subMenu.mouseInChild.value = true; - timeout == null ? void 0 : timeout(); - ({ stop: timeout } = useTimeoutFn(() => { - rootMenu.openMenu(props2.index, indexPath.value); - }, showTimeout)); - if (appendToBody.value) { - (_a = parentMenu.value.vnode.el) == null ? void 0 : _a.dispatchEvent(new MouseEvent("mouseenter")); - } - if (event.type === "mouseenter" && event.target) { - nextTick(() => { - focusElement(event.target, { preventScroll: true }); - }); - } - }; - const handleMouseleave = (deepDispatch = false) => { - var _a; - if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical") { - subMenu.mouseInChild.value = false; - return; - } - timeout == null ? void 0 : timeout(); - subMenu.mouseInChild.value = false; - ({ stop: timeout } = useTimeoutFn( - () => !mouseInChild.value && rootMenu.closeMenu(props2.index, indexPath.value), - subMenuHideTimeout.value - )); - if (appendToBody.value && deepDispatch) { - (_a = subMenu.handleMouseleave) == null ? void 0 : _a.call(subMenu, true); - } - }; - watch( - () => rootMenu.props.collapse, - (value) => handleCollapseToggle(Boolean(value)) - ); - { - const addSubMenu = (item2) => { - subMenus.value[item2.index] = item2; - }; - const removeSubMenu = (item2) => { - delete subMenus.value[item2.index]; - }; - provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, { - addSubMenu, - removeSubMenu, - handleMouseleave, - mouseInChild, - level: subMenu.level + 1 - }); - } - expose({ - opened - }); - onMounted(() => { - rootMenu.addSubMenu(item); - subMenu.addSubMenu(item); - }); - onBeforeUnmount(() => { - subMenu.removeSubMenu(item); - rootMenu.removeSubMenu(item); - }); - return () => { - var _a; - const titleTag = [ - (_a = slots.title) == null ? void 0 : _a.call(slots), - h( - ElIcon, - { - class: nsSubMenu.e("icon-arrow"), - style: { - transform: opened.value ? props2.expandCloseIcon && props2.expandOpenIcon || props2.collapseCloseIcon && props2.collapseOpenIcon && rootMenu.props.collapse ? "none" : "rotateZ(180deg)" : "none" - } - }, - { - default: () => isString(subMenuTitleIcon.value) ? h(instance.appContext.components[subMenuTitleIcon.value]) : h(subMenuTitleIcon.value) - } - ) - ]; - const child = rootMenu.isMenuPopup ? h( - ElTooltip, - { - ref: vPopper, - visible: opened.value, - effect: "light", - pure: true, - offset: subMenuPopperOffset.value, - showArrow: false, - persistent: persistent.value, - popperClass: subMenuPopperClass.value, - popperStyle: subMenuPopperStyle.value, - placement: currentPlacement.value, - teleported: appendToBody.value, - fallbackPlacements: fallbackPlacements.value, - transition: menuTransitionName.value, - gpuAcceleration: false - }, - { - content: () => { - var _a2; - return h( - "div", - { - class: [ - nsMenu.m(mode.value), - nsMenu.m("popup-container"), - subMenuPopperClass.value - ], - onMouseenter: (evt) => handleMouseenter(evt, 100), - onMouseleave: () => handleMouseleave(true), - onFocus: (evt) => handleMouseenter(evt, 100) - }, - [ - h( - "ul", - { - class: [ - nsMenu.b(), - nsMenu.m("popup"), - nsMenu.m(`popup-${currentPlacement.value}`) - ], - style: ulStyle.value - }, - [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)] - ) - ] - ); - }, - default: () => h( - "div", - { - class: nsSubMenu.e("title"), - onClick: handleClick - }, - titleTag - ) - } - ) : h(Fragment, {}, [ - h( - "div", - { - class: nsSubMenu.e("title"), - ref: verticalTitleRef, - onClick: handleClick - }, - titleTag - ), - h( - ElCollapseTransition, - {}, - { - default: () => { - var _a2; - return withDirectives( - h( - "ul", - { - role: "menu", - class: [nsMenu.b(), nsMenu.m("inline")], - style: ulStyle.value - }, - [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)] - ), - [[vShow, opened.value]] - ); - } - } - ) - ]); - return h( - "li", - { - class: [ - nsSubMenu.b(), - nsSubMenu.is("active", active.value), - nsSubMenu.is("opened", opened.value), - nsSubMenu.is("disabled", props2.disabled) - ], - role: "menuitem", - ariaHaspopup: true, - ariaExpanded: opened.value, - onMouseenter: handleMouseenter, - onMouseleave: () => handleMouseleave(), - onFocus: handleMouseenter - }, - [child] - ); - }; - } -}); - -// node_modules/element-plus/es/components/menu/src/menu.mjs -var menuProps = buildProps({ - mode: { - type: String, - values: ["horizontal", "vertical"], - default: "vertical" - }, - defaultActive: { - type: String, - default: "" - }, - defaultOpeneds: { - type: definePropType(Array), - default: () => mutable([]) - }, - uniqueOpened: Boolean, - router: Boolean, - menuTrigger: { - type: String, - values: ["hover", "click"], - default: "hover" - }, - collapse: Boolean, - backgroundColor: String, - textColor: String, - activeTextColor: String, - closeOnClickOutside: Boolean, - collapseTransition: { - type: Boolean, - default: true - }, - ellipsis: { - type: Boolean, - default: true - }, - popperOffset: { - type: Number, - default: 6 - }, - ellipsisIcon: { - type: iconPropType, - default: () => more_default - }, - popperEffect: { - type: definePropType(String), - default: "dark" - }, - popperClass: String, - popperStyle: { - type: definePropType([String, Object]) - }, - showTimeout: { - type: Number, - default: 300 - }, - hideTimeout: { - type: Number, - default: 300 - }, - persistent: { - type: Boolean, - default: true - } -}); -var checkIndexPath = (indexPath) => isArray(indexPath) && indexPath.every((path) => isString(path)); -var menuEmits = { - close: (index, indexPath) => isString(index) && checkIndexPath(indexPath), - open: (index, indexPath) => isString(index) && checkIndexPath(indexPath), - select: (index, indexPath, item, routerResult) => isString(index) && checkIndexPath(indexPath) && isObject(item) && (isUndefined2(routerResult) || routerResult instanceof Promise) -}; -var DEFAULT_MORE_ITEM_WIDTH = 64; -var Menu2 = defineComponent({ - name: "ElMenu", - props: menuProps, - emits: menuEmits, - setup(props2, { emit, slots, expose }) { - const instance = getCurrentInstance(); - const router = instance.appContext.config.globalProperties.$router; - const menu = ref(); - const subMenu = ref(); - const nsMenu = useNamespace("menu"); - const nsSubMenu = useNamespace("sub-menu"); - let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH; - const sliceIndex = ref(-1); - const openedMenus = ref( - props2.defaultOpeneds && !props2.collapse ? props2.defaultOpeneds.slice(0) : [] - ); - const activeIndex = ref(props2.defaultActive); - const items = ref({}); - const subMenus = ref({}); - const isMenuPopup = computed( - () => props2.mode === "horizontal" || props2.mode === "vertical" && props2.collapse - ); - const initMenu = () => { - const activeItem = activeIndex.value && items.value[activeIndex.value]; - if (!activeItem || props2.mode === "horizontal" || props2.collapse) - return; - const indexPath = activeItem.indexPath; - indexPath.forEach((index) => { - const subMenu2 = subMenus.value[index]; - subMenu2 && openMenu(index, subMenu2.indexPath); - }); - }; - const openMenu = (index, indexPath) => { - if (openedMenus.value.includes(index)) - return; - if (props2.uniqueOpened) { - openedMenus.value = openedMenus.value.filter( - (index2) => indexPath.includes(index2) - ); - } - openedMenus.value.push(index); - emit("open", index, indexPath); - }; - const close2 = (index) => { - const i = openedMenus.value.indexOf(index); - if (i !== -1) { - openedMenus.value.splice(i, 1); - } - }; - const closeMenu = (index, indexPath) => { - close2(index); - emit("close", index, indexPath); - }; - const handleSubMenuClick = ({ - index, - indexPath - }) => { - const isOpened = openedMenus.value.includes(index); - isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath); - }; - const handleMenuItemClick = (menuItem) => { - if (props2.mode === "horizontal" || props2.collapse) { - openedMenus.value = []; - } - const { index, indexPath } = menuItem; - if (isNil_default(index) || isNil_default(indexPath)) - return; - if (props2.router && router) { - const route = menuItem.route || index; - const routerResult = router.push(route).then((res) => { - if (!res) - activeIndex.value = index; - return res; - }); - emit( - "select", - index, - indexPath, - { index, indexPath, route }, - routerResult - ); - } else { - activeIndex.value = index; - emit("select", index, indexPath, { index, indexPath }); - } - }; - const updateActiveIndex = (val) => { - var _a; - const itemsInData = items.value; - const item = itemsInData[val] || activeIndex.value && itemsInData[activeIndex.value] || itemsInData[props2.defaultActive]; - activeIndex.value = (_a = item == null ? void 0 : item.index) != null ? _a : val; - }; - const calcMenuItemWidth = (menuItem) => { - const computedStyle = getComputedStyle(menuItem); - const marginLeft = Number.parseInt(computedStyle.marginLeft, 10); - const marginRight = Number.parseInt(computedStyle.marginRight, 10); - return menuItem.offsetWidth + marginLeft + marginRight || 0; - }; - const calcSliceIndex = () => { - if (!menu.value) - return -1; - const items2 = Array.from(menu.value.childNodes).filter( - (item) => item.nodeName !== "#comment" && (item.nodeName !== "#text" || item.nodeValue) - ); - const computedMenuStyle = getComputedStyle(menu.value); - const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10); - const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10); - const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight; - let calcWidth = 0; - let sliceIndex2 = 0; - items2.forEach((item, index) => { - calcWidth += calcMenuItemWidth(item); - if (calcWidth <= menuWidth - moreItemWidth) { - sliceIndex2 = index + 1; - } - }); - return sliceIndex2 === items2.length ? -1 : sliceIndex2; - }; - const getIndexPath = (index) => subMenus.value[index].indexPath; - const debounce2 = (fn2, wait = 33.34) => { - let timer; - return () => { - timer && clearTimeout(timer); - timer = setTimeout(() => { - fn2(); - }, wait); - }; - }; - let isFirstTimeRender = true; - const handleResize = () => { - const el = unrefElement(subMenu); - if (el) - moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH; - if (sliceIndex.value === calcSliceIndex()) - return; - const callback = () => { - sliceIndex.value = -1; - nextTick(() => { - sliceIndex.value = calcSliceIndex(); - }); - }; - isFirstTimeRender ? callback() : debounce2(callback)(); - isFirstTimeRender = false; - }; - watch( - () => props2.defaultActive, - (currentActive) => { - if (!items.value[currentActive]) { - activeIndex.value = ""; - } - updateActiveIndex(currentActive); - } - ); - watch( - () => props2.collapse, - (value) => { - if (value) - openedMenus.value = []; - } - ); - watch(items.value, initMenu); - let resizeStopper; - watchEffect(() => { - if (props2.mode === "horizontal" && props2.ellipsis) - resizeStopper = useResizeObserver(menu, handleResize).stop; - else - resizeStopper == null ? void 0 : resizeStopper(); - }); - const mouseInChild = ref(false); - { - const addSubMenu = (item) => { - subMenus.value[item.index] = item; - }; - const removeSubMenu = (item) => { - delete subMenus.value[item.index]; - }; - const addMenuItem = (item) => { - items.value[item.index] = item; - }; - const removeMenuItem = (item) => { - delete items.value[item.index]; - }; - provide( - MENU_INJECTION_KEY, - reactive({ - props: props2, - openedMenus, - items, - subMenus, - activeIndex, - isMenuPopup, - addMenuItem, - removeMenuItem, - addSubMenu, - removeSubMenu, - openMenu, - closeMenu, - handleMenuItemClick, - handleSubMenuClick - }) - ); - provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, { - addSubMenu, - removeSubMenu, - mouseInChild, - level: 0 - }); - } - onMounted(() => { - if (props2.mode === "horizontal") { - new Menu(instance.vnode.el, nsMenu.namespace.value); - } - }); - { - const open = (index) => { - const { indexPath } = subMenus.value[index]; - indexPath.forEach((i) => openMenu(i, indexPath)); - }; - expose({ - open, - close: close2, - updateActiveIndex, - handleResize - }); - } - const ulStyle = useMenuCssVar(props2, 0); - return () => { - var _a, _b; - let slot = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : []; - const vShowMore = []; - if (props2.mode === "horizontal" && menu.value) { - const originalSlot = flattedChildren(slot).filter((vnode) => { - return (vnode == null ? void 0 : vnode.shapeFlag) !== 8; - }); - const slotDefault = sliceIndex.value === -1 ? originalSlot : originalSlot.slice(0, sliceIndex.value); - const slotMore = sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value); - if ((slotMore == null ? void 0 : slotMore.length) && props2.ellipsis) { - slot = slotDefault; - vShowMore.push( - h( - SubMenu2, - { - ref: subMenu, - index: "sub-menu-more", - class: nsSubMenu.e("hide-arrow"), - popperOffset: props2.popperOffset - }, - { - title: () => h( - ElIcon, - { - class: nsSubMenu.e("icon-more") - }, - { - default: () => h(props2.ellipsisIcon) - } - ), - default: () => slotMore - } - ) - ); - } - } - const directives = props2.closeOnClickOutside ? [ - [ - ClickOutside, - () => { - if (!openedMenus.value.length) - return; - if (!mouseInChild.value) { - openedMenus.value.forEach( - (openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)) - ); - openedMenus.value = []; - } - } - ] - ] : []; - const vMenu = withDirectives( - h( - "ul", - { - key: String(props2.collapse), - role: "menubar", - ref: menu, - style: ulStyle.value, - class: { - [nsMenu.b()]: true, - [nsMenu.m(props2.mode)]: true, - [nsMenu.m("collapse")]: props2.collapse - } - }, - [...slot, ...vShowMore] - ), - directives - ); - if (props2.collapseTransition && props2.mode === "vertical") { - return h(ElMenuCollapseTransition, () => vMenu); - } - return vMenu; - }; - } -}); - -// node_modules/element-plus/es/components/menu/src/menu-item.mjs -var menuItemProps = buildProps({ - index: { - type: definePropType([String, null]), - default: null - }, - route: { - type: definePropType([String, Object]) - }, - disabled: Boolean -}); -var menuItemEmits = { - click: (item) => isString(item.index) && isArray(item.indexPath) -}; - -// node_modules/element-plus/es/components/menu/src/menu-item2.mjs -var COMPONENT_NAME16 = "ElMenuItem"; -var _sfc_main99 = defineComponent({ - ...{ - name: COMPONENT_NAME16 - }, - __name: "menu-item", - props: menuItemProps, - emits: menuItemEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - isPropAbsent(props2.index) && debugWarn(COMPONENT_NAME16, 'Missing required prop: "index"'); - const instance = getCurrentInstance(); - const rootMenu = inject(MENU_INJECTION_KEY); - const nsMenu = useNamespace("menu"); - const nsMenuItem = useNamespace("menu-item"); - if (!rootMenu) - throwError(COMPONENT_NAME16, "can not inject root menu"); - const { parentMenu, indexPath } = useMenu(instance, toRef(props2, "index")); - const subMenu = inject( - `${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}` - ); - if (!subMenu) - throwError(COMPONENT_NAME16, "can not inject sub menu"); - const active = computed(() => props2.index === rootMenu.activeIndex); - const item = reactive({ - index: props2.index, - indexPath, - active - }); - const handleClick = () => { - if (!props2.disabled) { - rootMenu.handleMenuItemClick({ - index: props2.index, - indexPath: indexPath.value, - route: props2.route - }); - emit("click", item); - } - }; - onMounted(() => { - subMenu.addSubMenu(item); - rootMenu.addMenuItem(item); - }); - onBeforeUnmount(() => { - subMenu.removeSubMenu(item); - rootMenu.removeMenuItem(item); - }); - __expose({ - parentMenu, - rootMenu, - active, - nsMenu, - nsMenuItem, - handleClick - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "li", - { - class: normalizeClass([ - unref(nsMenuItem).b(), - unref(nsMenuItem).is("active", active.value), - unref(nsMenuItem).is("disabled", _ctx.disabled) - ]), - role: "menuitem", - tabindex: "-1", - onClick: handleClick - }, - [ - unref(parentMenu).type.name === "ElMenu" && unref(rootMenu).props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(unref(ElTooltip), { - key: 0, - effect: unref(rootMenu).props.popperEffect, - placement: "right", - "fallback-placements": ["left"], - "popper-class": unref(rootMenu).props.popperClass, - "popper-style": unref(rootMenu).props.popperStyle, - persistent: unref(rootMenu).props.persistent, - "focus-on-target": "" - }, { - content: withCtx(() => [ - renderSlot(_ctx.$slots, "title") - ]), - default: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(nsMenu).be("tooltip", "trigger")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ) - ]), - _: 3 - }, 8, ["effect", "popper-class", "popper-style", "persistent"])) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - renderSlot(_ctx.$slots, "default"), - renderSlot(_ctx.$slots, "title") - ], - 64 - )) - ], - 2 - ); - }; - } -}); -var MenuItem2 = _export_sfc(_sfc_main99, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]); - -// node_modules/element-plus/es/components/menu/src/menu-item-group.mjs -var menuItemGroupProps = { - title: String -}; - -// node_modules/element-plus/es/components/menu/src/menu-item-group2.mjs -var _sfc_main100 = defineComponent({ - ...{ - name: "ElMenuItemGroup" - }, - __name: "menu-item-group", - props: menuItemGroupProps, - setup(__props) { - const ns = useNamespace("menu-item-group"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "li", - { - class: normalizeClass(unref(ns).b()) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("title")) - }, - [ - !_ctx.$slots.title ? (openBlock(), createElementBlock( - Fragment, - { key: 0 }, - [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ], - 64 - )) : renderSlot(_ctx.$slots, "title", { key: 1 }) - ], - 2 - ), - createBaseVNode("ul", null, [ - renderSlot(_ctx.$slots, "default") - ]) - ], - 2 - ); - }; - } -}); -var MenuItemGroup = _export_sfc(_sfc_main100, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]); - -// node_modules/element-plus/es/components/menu/index.mjs -var ElMenu = withInstall(Menu2, { - MenuItem: MenuItem2, - MenuItemGroup, - SubMenu: SubMenu2 -}); -var ElMenuItem = withNoopInstall(MenuItem2); -var ElMenuItemGroup = withNoopInstall(MenuItemGroup); -var ElSubMenu = withNoopInstall(SubMenu2); - -// node_modules/element-plus/es/components/page-header/src/page-header.mjs -var pageHeaderProps = buildProps({ - icon: { - type: iconPropType, - default: () => back_default - }, - title: String, - content: { - type: String, - default: "" - } -}); -var pageHeaderEmits = { - back: () => true -}; - -// node_modules/element-plus/es/components/page-header/src/page-header2.mjs -var _hoisted_151 = ["aria-label"]; -var _sfc_main101 = defineComponent({ - ...{ - name: "ElPageHeader" - }, - __name: "page-header", - props: pageHeaderProps, - emits: pageHeaderEmits, - setup(__props, { emit: __emit }) { - const emit = __emit; - const { t } = useLocale(); - const ns = useNamespace("page-header"); - function handleClick() { - emit("back"); - } - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([ - unref(ns).b(), - unref(ns).is("contentful", !!_ctx.$slots.default), - { - [unref(ns).m("has-breadcrumb")]: !!_ctx.$slots.breadcrumb, - [unref(ns).m("has-extra")]: !!_ctx.$slots.extra - } - ]) - }, - [ - _ctx.$slots.breadcrumb ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("breadcrumb")) - }, - [ - renderSlot(_ctx.$slots, "breadcrumb") - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("header")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("left")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("back")), - role: "button", - tabindex: "0", - onClick: handleClick - }, - [ - _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", { - key: 0, - "aria-label": _ctx.title || unref(t)("el.pageHeader.title"), - class: normalizeClass(unref(ns).e("icon")) - }, [ - renderSlot(_ctx.$slots, "icon", {}, () => [ - _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true) - ]) - ], 10, _hoisted_151)) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("title")) - }, - [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createTextVNode( - toDisplayString(_ctx.title || unref(t)("el.pageHeader.title")), - 1 - ) - ]) - ], - 2 - ) - ], - 2 - ), - createVNode(unref(ElDivider), { direction: "vertical" }), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("content")) - }, - [ - renderSlot(_ctx.$slots, "content", {}, () => [ - createTextVNode( - toDisplayString(_ctx.content), - 1 - ) - ]) - ], - 2 - ) - ], - 2 - ), - _ctx.$slots.extra ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("extra")) - }, - [ - renderSlot(_ctx.$slots, "extra") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ), - _ctx.$slots.default ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("main")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var PageHeader = _export_sfc(_sfc_main101, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/page-header/src/page-header.vue"]]); - -// node_modules/element-plus/es/components/page-header/index.mjs -var ElPageHeader = withInstall(PageHeader); - -// node_modules/element-plus/es/components/pagination/src/constants.mjs -var elPaginationKey = Symbol("elPaginationKey"); - -// node_modules/element-plus/es/components/pagination/src/components/prev.mjs -var paginationPrevProps = buildProps({ - disabled: Boolean, - currentPage: { - type: Number, - default: 1 - }, - prevText: { - type: String - }, - prevIcon: { - type: iconPropType - } -}); -var paginationPrevEmits = { - click: (evt) => evt instanceof MouseEvent -}; - -// node_modules/element-plus/es/components/pagination/src/components/prev2.mjs -var _hoisted_153 = ["disabled", "aria-label", "aria-disabled"]; -var _hoisted_227 = { key: 0 }; -var _sfc_main102 = defineComponent({ - ...{ - name: "ElPaginationPrev" - }, - __name: "prev", - props: paginationPrevProps, - emits: paginationPrevEmits, - setup(__props) { - const props2 = __props; - const { t } = useLocale(); - const internalDisabled = computed( - () => props2.disabled || props2.currentPage <= 1 - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("button", { - type: "button", - class: "btn-prev", - disabled: internalDisabled.value, - "aria-label": _ctx.prevText || unref(t)("el.pagination.prev"), - "aria-disabled": internalDisabled.value, - onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event)) - }, [ - _ctx.prevText ? (openBlock(), createElementBlock( - "span", - _hoisted_227, - toDisplayString(_ctx.prevText), - 1 - )) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon))) - ]), - _: 1 - })) - ], 8, _hoisted_153); - }; - } -}); -var Prev = _export_sfc(_sfc_main102, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/prev.vue"]]); - -// node_modules/element-plus/es/components/pagination/src/components/next2.mjs -var paginationNextProps = buildProps({ - disabled: Boolean, - currentPage: { - type: Number, - default: 1 - }, - pageCount: { - type: Number, - default: 50 - }, - nextText: { - type: String - }, - nextIcon: { - type: iconPropType - } -}); - -// node_modules/element-plus/es/components/pagination/src/components/next.mjs -var _hoisted_154 = ["disabled", "aria-label", "aria-disabled"]; -var _hoisted_228 = { key: 0 }; -var _sfc_main103 = defineComponent({ - ...{ - name: "ElPaginationNext" - }, - __name: "next", - props: paginationNextProps, - emits: ["click"], - setup(__props) { - const props2 = __props; - const { t } = useLocale(); - const internalDisabled = computed( - () => props2.disabled || props2.currentPage === props2.pageCount || props2.pageCount === 0 - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("button", { - type: "button", - class: "btn-next", - disabled: internalDisabled.value, - "aria-label": _ctx.nextText || unref(t)("el.pagination.next"), - "aria-disabled": internalDisabled.value, - onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event)) - }, [ - _ctx.nextText ? (openBlock(), createElementBlock( - "span", - _hoisted_228, - toDisplayString(_ctx.nextText), - 1 - )) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon))) - ]), - _: 1 - })) - ], 8, _hoisted_154); - }; - } -}); -var Next = _export_sfc(_sfc_main103, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/next.vue"]]); - -// node_modules/element-plus/es/components/pagination/src/usePagination.mjs -var usePagination = () => inject(elPaginationKey, {}); - -// node_modules/element-plus/es/components/pagination/src/components/sizes.mjs -var paginationSizesProps = buildProps({ - pageSize: { - type: Number, - required: true - }, - pageSizes: { - type: definePropType(Array), - default: () => mutable([10, 20, 30, 40, 50, 100]) - }, - popperClass: { - type: String - }, - popperStyle: { - type: definePropType([String, Object]) - }, - disabled: Boolean, - teleported: Boolean, - size: { - type: String, - values: componentSizes - }, - appendSizeTo: String -}); - -// node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs -var _sfc_main104 = defineComponent({ - ...{ - name: "ElPaginationSizes" - }, - __name: "sizes", - props: paginationSizesProps, - emits: ["page-size-change"], - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { t } = useLocale(); - const ns = useNamespace("pagination"); - const pagination = usePagination(); - const innerPageSize = ref(props2.pageSize); - watch( - () => props2.pageSizes, - (newVal, oldVal) => { - if (isEqual_default(newVal, oldVal)) - return; - if (isArray(newVal)) { - const pageSize = newVal.includes(props2.pageSize) ? props2.pageSize : props2.pageSizes[0]; - emit("page-size-change", pageSize); - } - } - ); - watch( - () => props2.pageSize, - (newVal) => { - innerPageSize.value = newVal; - } - ); - const innerPageSizes = computed(() => props2.pageSizes); - function handleChange(val) { - var _a; - if (val !== innerPageSize.value) { - innerPageSize.value = val; - (_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val)); - } - } - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "span", - { - class: normalizeClass(unref(ns).e("sizes")) - }, - [ - createVNode(unref(ElSelect), { - "model-value": innerPageSize.value, - disabled: _ctx.disabled, - "popper-class": _ctx.popperClass, - "popper-style": _ctx.popperStyle, - size: _ctx.size, - teleported: _ctx.teleported, - "validate-event": false, - "append-to": _ctx.appendSizeTo, - onChange: handleChange - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(innerPageSizes.value, (item) => { - return openBlock(), createBlock(unref(ElOption), { - key: item, - value: item, - label: item + unref(t)("el.pagination.pagesize") - }, null, 8, ["value", "label"]); - }), - 128 - )) - ]), - _: 1 - }, 8, ["model-value", "disabled", "popper-class", "popper-style", "size", "teleported", "append-to"]) - ], - 2 - ); - }; - } -}); -var Sizes = _export_sfc(_sfc_main104, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]); - -// node_modules/element-plus/es/components/pagination/src/components/jumper.mjs -var paginationJumperProps = buildProps({ - size: { - type: String, - values: componentSizes - } -}); - -// node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs -var _hoisted_155 = ["disabled"]; -var _sfc_main105 = defineComponent({ - ...{ - name: "ElPaginationJumper" - }, - __name: "jumper", - props: paginationJumperProps, - setup(__props) { - const { t } = useLocale(); - const ns = useNamespace("pagination"); - const { pageCount, disabled, currentPage, changeEvent } = usePagination(); - const userInput = ref(); - const innerValue = computed(() => { - var _a; - return (_a = userInput.value) != null ? _a : currentPage == null ? void 0 : currentPage.value; - }); - function handleInput(val) { - userInput.value = val ? +val : ""; - } - function handleChange(val) { - val = Math.trunc(+val); - changeEvent == null ? void 0 : changeEvent(val); - userInput.value = void 0; - } - return (_ctx, _cache) => { - return openBlock(), createElementBlock("span", { - class: normalizeClass(unref(ns).e("jump")), - disabled: unref(disabled) - }, [ - createBaseVNode( - "span", - { - class: normalizeClass([unref(ns).e("goto")]) - }, - toDisplayString(unref(t)("el.pagination.goto")), - 3 - ), - createVNode(unref(ElInput), { - size: _ctx.size, - class: normalizeClass([unref(ns).e("editor"), unref(ns).is("in-pagination")]), - min: 1, - max: unref(pageCount), - disabled: unref(disabled), - "model-value": innerValue.value, - "validate-event": false, - "aria-label": unref(t)("el.pagination.page"), - type: "number", - "onUpdate:modelValue": handleInput, - onChange: handleChange - }, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]), - createBaseVNode( - "span", - { - class: normalizeClass([unref(ns).e("classifier")]) - }, - toDisplayString(unref(t)("el.pagination.pageClassifier")), - 3 - ) - ], 10, _hoisted_155); - }; - } -}); -var Jumper = _export_sfc(_sfc_main105, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]); - -// node_modules/element-plus/es/components/pagination/src/components/total.mjs -var paginationTotalProps = buildProps({ - total: { - type: Number, - default: 1e3 - } -}); - -// node_modules/element-plus/es/components/pagination/src/components/total2.mjs -var _hoisted_156 = ["disabled"]; -var _sfc_main106 = defineComponent({ - ...{ - name: "ElPaginationTotal" - }, - __name: "total", - props: paginationTotalProps, - setup(__props) { - const { t } = useLocale(); - const ns = useNamespace("pagination"); - const { disabled } = usePagination(); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("span", { - class: normalizeClass(unref(ns).e("total")), - disabled: unref(disabled) - }, toDisplayString(unref(t)("el.pagination.total", { - total: _ctx.total - })), 11, _hoisted_156); - }; - } -}); -var Total = _export_sfc(_sfc_main106, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]); - -// node_modules/element-plus/es/components/pagination/src/components/pager.mjs -var paginationPagerProps = buildProps({ - currentPage: { - type: Number, - default: 1 - }, - pageCount: { - type: Number, - required: true - }, - pagerCount: { - type: Number, - default: 7 - }, - disabled: Boolean -}); - -// node_modules/element-plus/es/components/pagination/src/components/pager2.mjs -var _hoisted_157 = ["aria-current", "aria-label", "tabindex"]; -var _hoisted_229 = ["tabindex", "aria-label"]; -var _hoisted_312 = ["aria-current", "aria-label", "tabindex"]; -var _hoisted_48 = ["tabindex", "aria-label"]; -var _hoisted_57 = ["aria-current", "aria-label", "tabindex"]; -var _sfc_main107 = defineComponent({ - ...{ - name: "ElPaginationPager" - }, - __name: "pager", - props: paginationPagerProps, - emits: [CHANGE_EVENT], - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const nsPager = useNamespace("pager"); - const nsIcon = useNamespace("icon"); - const { t } = useLocale(); - const showPrevMore = ref(false); - const showNextMore = ref(false); - const quickPrevHover = ref(false); - const quickNextHover = ref(false); - const quickPrevFocus = ref(false); - const quickNextFocus = ref(false); - const pagers = computed(() => { - const pagerCount = props2.pagerCount; - const halfPagerCount = (pagerCount - 1) / 2; - const currentPage = Number(props2.currentPage); - const pageCount = Number(props2.pageCount); - let showPrevMore2 = false; - let showNextMore2 = false; - if (pageCount > pagerCount) { - if (currentPage > pagerCount - halfPagerCount) { - showPrevMore2 = true; - } - if (currentPage < pageCount - halfPagerCount) { - showNextMore2 = true; - } - } - const array4 = []; - if (showPrevMore2 && !showNextMore2) { - const startPage = pageCount - (pagerCount - 2); - for (let i = startPage; i < pageCount; i++) { - array4.push(i); - } - } else if (!showPrevMore2 && showNextMore2) { - for (let i = 2; i < pagerCount; i++) { - array4.push(i); - } - } else if (showPrevMore2 && showNextMore2) { - const offset3 = Math.floor(pagerCount / 2) - 1; - for (let i = currentPage - offset3; i <= currentPage + offset3; i++) { - array4.push(i); - } - } else { - for (let i = 2; i < pageCount; i++) { - array4.push(i); - } - } - return array4; - }); - const prevMoreKls = computed(() => [ - "more", - "btn-quickprev", - nsIcon.b(), - nsPager.is("disabled", props2.disabled) - ]); - const nextMoreKls = computed(() => [ - "more", - "btn-quicknext", - nsIcon.b(), - nsPager.is("disabled", props2.disabled) - ]); - const tabindex = computed(() => props2.disabled ? -1 : 0); - watch( - () => [props2.pageCount, props2.pagerCount, props2.currentPage], - ([pageCount, pagerCount, currentPage]) => { - const halfPagerCount = (pagerCount - 1) / 2; - let showPrev = false; - let showNext = false; - if (pageCount > pagerCount) { - showPrev = currentPage > pagerCount - halfPagerCount; - showNext = currentPage < pageCount - halfPagerCount; - } - quickPrevHover.value && (quickPrevHover.value = showPrev); - quickNextHover.value && (quickNextHover.value = showNext); - showPrevMore.value = showPrev; - showNextMore.value = showNext; - }, - { immediate: true } - ); - function onMouseEnter(forward = false) { - if (props2.disabled) - return; - if (forward) { - quickPrevHover.value = true; - } else { - quickNextHover.value = true; - } - } - function onFocus(forward = false) { - if (forward) { - quickPrevFocus.value = true; - } else { - quickNextFocus.value = true; - } - } - function onEnter(e) { - const target2 = e.target; - if (target2.tagName.toLowerCase() === "li" && Array.from(target2.classList).includes("number")) { - const newPage = Number(target2.textContent); - if (newPage !== props2.currentPage) { - emit(CHANGE_EVENT, newPage); - } - } else if (target2.tagName.toLowerCase() === "li" && Array.from(target2.classList).includes("more")) { - onPagerClick(e); - } - } - function onPagerClick(event) { - const target2 = event.target; - if (target2.tagName.toLowerCase() === "ul" || props2.disabled) { - return; - } - let newPage = Number(target2.textContent); - const pageCount = props2.pageCount; - const currentPage = props2.currentPage; - const pagerCountOffset = props2.pagerCount - 2; - if (target2.className.includes("more")) { - if (target2.className.includes("quickprev")) { - newPage = currentPage - pagerCountOffset; - } else if (target2.className.includes("quicknext")) { - newPage = currentPage + pagerCountOffset; - } - } - if (!Number.isNaN(+newPage)) { - if (newPage < 1) { - newPage = 1; - } - if (newPage > pageCount) { - newPage = pageCount; - } - } - if (newPage !== currentPage) { - emit(CHANGE_EVENT, newPage); - } - } - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "ul", - { - class: normalizeClass(unref(nsPager).b()), - onClick: onPagerClick, - onKeyup: withKeys(onEnter, ["enter"]) - }, - [ - _ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", { - key: 0, - class: normalizeClass([[ - unref(nsPager).is("active", _ctx.currentPage === 1), - unref(nsPager).is("disabled", _ctx.disabled) - ], "number"]), - "aria-current": _ctx.currentPage === 1, - "aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }), - tabindex: tabindex.value - }, " 1 ", 10, _hoisted_157)) : createCommentVNode("v-if", true), - showPrevMore.value ? (openBlock(), createElementBlock("li", { - key: 1, - class: normalizeClass(prevMoreKls.value), - tabindex: tabindex.value, - "aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }), - onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)), - onMouseleave: _cache[1] || (_cache[1] = ($event) => quickPrevHover.value = false), - onFocus: _cache[2] || (_cache[2] = ($event) => onFocus(true)), - onBlur: _cache[3] || (_cache[3] = ($event) => quickPrevFocus.value = false) - }, [ - (quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_left_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 })) - ], 42, _hoisted_229)) : createCommentVNode("v-if", true), - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(pagers.value, (pager) => { - return openBlock(), createElementBlock("li", { - key: pager, - class: normalizeClass([[ - unref(nsPager).is("active", _ctx.currentPage === pager), - unref(nsPager).is("disabled", _ctx.disabled) - ], "number"]), - "aria-current": _ctx.currentPage === pager, - "aria-label": unref(t)("el.pagination.currentPage", { pager }), - tabindex: tabindex.value - }, toDisplayString(pager), 11, _hoisted_312); - }), - 128 - )), - showNextMore.value ? (openBlock(), createElementBlock("li", { - key: 2, - class: normalizeClass(nextMoreKls.value), - tabindex: tabindex.value, - "aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }), - onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()), - onMouseleave: _cache[5] || (_cache[5] = ($event) => quickNextHover.value = false), - onFocus: _cache[6] || (_cache[6] = ($event) => onFocus()), - onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false) - }, [ - (quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_right_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 })) - ], 42, _hoisted_48)) : createCommentVNode("v-if", true), - _ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", { - key: 3, - class: normalizeClass([[ - unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount), - unref(nsPager).is("disabled", _ctx.disabled) - ], "number"]), - "aria-current": _ctx.currentPage === _ctx.pageCount, - "aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }), - tabindex: tabindex.value - }, toDisplayString(_ctx.pageCount), 11, _hoisted_57)) : createCommentVNode("v-if", true) - ], - 34 - ); - }; - } -}); -var Pager = _export_sfc(_sfc_main107, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]); - -// node_modules/element-plus/es/components/pagination/src/pagination.mjs -var isAbsent = (v2) => typeof v2 !== "number"; -var paginationProps = buildProps({ - pageSize: Number, - defaultPageSize: Number, - total: Number, - pageCount: Number, - pagerCount: { - type: Number, - validator: (value) => { - return isNumber2(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1; - }, - default: 7 - }, - currentPage: Number, - defaultCurrentPage: Number, - layout: { - type: String, - default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ") - }, - pageSizes: { - type: definePropType(Array), - default: () => mutable([10, 20, 30, 40, 50, 100]) - }, - popperClass: { - type: String, - default: "" - }, - popperStyle: { - type: definePropType([String, Object]) - }, - prevText: { - type: String, - default: "" - }, - prevIcon: { - type: iconPropType, - default: () => arrow_left_default - }, - nextText: { - type: String, - default: "" - }, - nextIcon: { - type: iconPropType, - default: () => arrow_right_default - }, - teleported: { - type: Boolean, - default: true - }, - small: Boolean, - size: useSizeProp, - background: Boolean, - disabled: Boolean, - hideOnSinglePage: Boolean, - appendSizeTo: String -}); -var paginationEmits = { - "update:current-page": (val) => isNumber2(val), - "update:page-size": (val) => isNumber2(val), - "size-change": (val) => isNumber2(val), - change: (currentPage, pageSize) => isNumber2(currentPage) && isNumber2(pageSize), - "current-change": (val) => isNumber2(val), - "prev-click": (val) => isNumber2(val), - "next-click": (val) => isNumber2(val) -}; -var componentName = "ElPagination"; -var Pagination = defineComponent({ - name: componentName, - props: paginationProps, - emits: paginationEmits, - setup(props2, { emit, slots }) { - const { t } = useLocale(); - const ns = useNamespace("pagination"); - const vnodeProps = getCurrentInstance().vnode.props || {}; - const _globalSize = useGlobalSize(); - const _size = computed( - () => { - var _a; - return props2.small ? "small" : (_a = props2.size) != null ? _a : _globalSize.value; - } - ); - useDeprecated( - { - from: "small", - replacement: "size", - version: "3.0.0", - scope: "el-pagination", - ref: "https://element-plus.org/zh-CN/component/pagination.html" - }, - computed(() => !!props2.small) - ); - const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps; - const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps; - const assertValidUsage = computed(() => { - if (isAbsent(props2.total) && isAbsent(props2.pageCount)) - return false; - if (!isAbsent(props2.currentPage) && !hasCurrentPageListener) - return false; - if (props2.layout.includes("sizes")) { - if (!isAbsent(props2.pageCount)) { - if (!hasPageSizeListener) - return false; - } else if (!isAbsent(props2.total)) { - if (!isAbsent(props2.pageSize)) { - if (!hasPageSizeListener) { - return false; - } - } - } - } - return true; - }); - const innerPageSize = ref( - isAbsent(props2.defaultPageSize) ? 10 : props2.defaultPageSize - ); - const innerCurrentPage = ref( - isAbsent(props2.defaultCurrentPage) ? 1 : props2.defaultCurrentPage - ); - const pageSizeBridge = computed({ - get() { - return isAbsent(props2.pageSize) ? innerPageSize.value : props2.pageSize; - }, - set(v2) { - if (isAbsent(props2.pageSize)) { - innerPageSize.value = v2; - } - if (hasPageSizeListener) { - emit("update:page-size", v2); - emit("size-change", v2); - } - } - }); - const pageCountBridge = computed(() => { - let pageCount = 0; - if (!isAbsent(props2.pageCount)) { - pageCount = props2.pageCount; - } else if (!isAbsent(props2.total)) { - pageCount = Math.max(1, Math.ceil(props2.total / pageSizeBridge.value)); - } - return pageCount; - }); - const currentPageBridge = computed({ - get() { - return isAbsent(props2.currentPage) ? innerCurrentPage.value : props2.currentPage; - }, - set(v2) { - let newCurrentPage = v2; - if (v2 < 1) { - newCurrentPage = 1; - } else if (v2 > pageCountBridge.value) { - newCurrentPage = pageCountBridge.value; - } - if (isAbsent(props2.currentPage)) { - innerCurrentPage.value = newCurrentPage; - } - if (hasCurrentPageListener) { - emit("update:current-page", newCurrentPage); - emit("current-change", newCurrentPage); - } - } - }); - watch(pageCountBridge, (val) => { - if (currentPageBridge.value > val) - currentPageBridge.value = val; - }); - watch( - [currentPageBridge, pageSizeBridge], - (value) => { - emit(CHANGE_EVENT, ...value); - }, - { flush: "post" } - ); - function handleCurrentChange2(val) { - currentPageBridge.value = val; - } - function handleSizeChange(val) { - pageSizeBridge.value = val; - const newPageCount = pageCountBridge.value; - if (currentPageBridge.value > newPageCount) { - currentPageBridge.value = newPageCount; - } - } - function prev() { - if (props2.disabled) - return; - currentPageBridge.value -= 1; - emit("prev-click", currentPageBridge.value); - } - function next() { - if (props2.disabled) - return; - currentPageBridge.value += 1; - emit("next-click", currentPageBridge.value); - } - function addClass2(element, cls) { - if (element) { - if (!element.props) { - element.props = {}; - } - element.props.class = [element.props.class, cls].join(" "); - } - } - provide(elPaginationKey, { - pageCount: pageCountBridge, - disabled: computed(() => props2.disabled), - currentPage: currentPageBridge, - changeEvent: handleCurrentChange2, - handleSizeChange - }); - return () => { - var _a, _b; - if (!assertValidUsage.value) { - debugWarn(componentName, t("el.pagination.deprecationWarning")); - return null; - } - if (!props2.layout) - return null; - if (props2.hideOnSinglePage && pageCountBridge.value <= 1) - return null; - const rootChildren = []; - const rightWrapperChildren = []; - const rightWrapperRoot = h( - "div", - { class: ns.e("rightwrapper") }, - rightWrapperChildren - ); - const TEMPLATE_MAP = { - prev: h(Prev, { - disabled: props2.disabled, - currentPage: currentPageBridge.value, - prevText: props2.prevText, - prevIcon: props2.prevIcon, - onClick: prev - }), - jumper: h(Jumper, { - size: _size.value - }), - pager: h(Pager, { - currentPage: currentPageBridge.value, - pageCount: pageCountBridge.value, - pagerCount: props2.pagerCount, - onChange: handleCurrentChange2, - disabled: props2.disabled - }), - next: h(Next, { - disabled: props2.disabled, - currentPage: currentPageBridge.value, - pageCount: pageCountBridge.value, - nextText: props2.nextText, - nextIcon: props2.nextIcon, - onClick: next - }), - sizes: h(Sizes, { - pageSize: pageSizeBridge.value, - pageSizes: props2.pageSizes, - popperClass: props2.popperClass, - popperStyle: props2.popperStyle, - disabled: props2.disabled, - teleported: props2.teleported, - size: _size.value, - appendSizeTo: props2.appendSizeTo - }), - slot: (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : null, - total: h(Total, { total: isAbsent(props2.total) ? 0 : props2.total }) - }; - const components = props2.layout.split(",").map((item) => item.trim()); - let haveRightWrapper = false; - components.forEach((c2) => { - if (c2 === "->") { - haveRightWrapper = true; - return; - } - if (!haveRightWrapper) { - rootChildren.push(TEMPLATE_MAP[c2]); - } else { - rightWrapperChildren.push(TEMPLATE_MAP[c2]); - } - }); - addClass2(rootChildren[0], ns.is("first")); - addClass2(rootChildren[rootChildren.length - 1], ns.is("last")); - if (haveRightWrapper && rightWrapperChildren.length > 0) { - addClass2(rightWrapperChildren[0], ns.is("first")); - addClass2( - rightWrapperChildren[rightWrapperChildren.length - 1], - ns.is("last") - ); - rootChildren.push(rightWrapperRoot); - } - return h( - "div", - { - class: [ - ns.b(), - ns.is("background", props2.background), - ns.m(_size.value) - ] - }, - rootChildren - ); - }; - } -}); - -// node_modules/element-plus/es/components/pagination/index.mjs -var ElPagination = withInstall(Pagination); - -// node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs -var popconfirmProps = buildProps({ - title: String, - confirmButtonText: String, - cancelButtonText: String, - confirmButtonType: { - type: String, - values: buttonTypes, - default: "primary" - }, - cancelButtonType: { - type: String, - values: buttonTypes, - default: "text" - }, - icon: { - type: iconPropType, - default: () => question_filled_default - }, - iconColor: { - type: String, - default: "#f90" - }, - hideIcon: Boolean, - hideAfter: { - type: Number, - default: 200 - }, - effect: { - ...useTooltipContentProps.effect, - default: "light" - }, - teleported: useTooltipContentProps.teleported, - persistent: useTooltipContentProps.persistent, - width: { - type: [String, Number], - default: 150 - }, - virtualTriggering: useTooltipTriggerProps.virtualTriggering, - virtualRef: useTooltipTriggerProps.virtualRef -}); -var popconfirmEmits = { - confirm: (e) => e instanceof MouseEvent, - cancel: (e) => e instanceof MouseEvent -}; - -// node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs -var _sfc_main108 = defineComponent({ - ...{ - name: "ElPopconfirm" - }, - __name: "popconfirm", - props: popconfirmProps, - emits: popconfirmEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { t } = useLocale(); - const ns = useNamespace("popconfirm"); - const tooltipRef = ref(); - const rootRef = ref(); - const popperRef = computed(() => { - var _a; - return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef; - }); - const showPopper = () => { - var _a, _b; - (_b = (_a = rootRef.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a); - }; - const hidePopper = () => { - var _a, _b; - (_b = (_a = tooltipRef.value) == null ? void 0 : _a.onClose) == null ? void 0 : _b.call(_a); - }; - const style = computed(() => { - return { - width: addUnit(props2.width) - }; - }); - const confirm = (e) => { - emit("confirm", e); - hidePopper(); - }; - const cancel = (e) => { - emit("cancel", e); - hidePopper(); - }; - const finalConfirmButtonText = computed( - () => props2.confirmButtonText || t("el.popconfirm.confirmButtonText") - ); - const finalCancelButtonText = computed( - () => props2.cancelButtonText || t("el.popconfirm.cancelButtonText") - ); - __expose({ - popperRef, - hide: hidePopper - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTooltip), mergeProps({ - ref_key: "tooltipRef", - ref: tooltipRef, - trigger: "click", - effect: _ctx.effect - }, _ctx.$attrs, { - "virtual-triggering": _ctx.virtualTriggering, - "virtual-ref": _ctx.virtualRef, - "popper-class": `${unref(ns).namespace.value}-popover`, - "popper-style": style.value, - teleported: _ctx.teleported, - "fallback-placements": ["bottom", "top", "right", "left"], - "hide-after": _ctx.hideAfter, - persistent: _ctx.persistent, - loop: "", - onShow: showPopper - }), { - content: withCtx(() => [ - createBaseVNode( - "div", - { - ref_key: "rootRef", - ref: rootRef, - tabindex: "-1", - class: normalizeClass(unref(ns).b()) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("main")) - }, - [ - !_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(ns).e("icon")), - style: normalizeStyle({ color: _ctx.iconColor }) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - }, 8, ["class", "style"])) : createCommentVNode("v-if", true), - createTextVNode( - " " + toDisplayString(_ctx.title), - 1 - ) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("action")) - }, - [ - renderSlot(_ctx.$slots, "actions", { - confirm, - cancel - }, () => [ - createVNode(unref(ElButton), { - size: "small", - type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType, - text: _ctx.cancelButtonType === "text", - onClick: cancel - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(finalCancelButtonText.value), - 1 - ) - ]), - _: 1 - }, 8, ["type", "text"]), - createVNode(unref(ElButton), { - size: "small", - type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType, - text: _ctx.confirmButtonType === "text", - onClick: confirm - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(finalConfirmButtonText.value), - 1 - ) - ]), - _: 1 - }, 8, ["type", "text"]) - ]) - ], - 2 - ) - ], - 2 - ) - ]), - default: withCtx(() => [ - _ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 16, ["effect", "virtual-triggering", "virtual-ref", "popper-class", "popper-style", "teleported", "hide-after", "persistent"]); - }; - } -}); -var Popconfirm = _export_sfc(_sfc_main108, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popconfirm/src/popconfirm.vue"]]); - -// node_modules/element-plus/es/components/popconfirm/index.mjs -var ElPopconfirm = withInstall(Popconfirm); - -// node_modules/element-plus/es/components/popover/src/popover.mjs -var popoverProps = buildProps({ - trigger: useTooltipTriggerProps.trigger, - triggerKeys: useTooltipTriggerProps.triggerKeys, - placement: dropdownProps.placement, - disabled: useTooltipTriggerProps.disabled, - visible: useTooltipContentProps.visible, - transition: useTooltipContentProps.transition, - popperOptions: dropdownProps.popperOptions, - tabindex: dropdownProps.tabindex, - content: useTooltipContentProps.content, - popperStyle: useTooltipContentProps.popperStyle, - popperClass: useTooltipContentProps.popperClass, - enterable: { - ...useTooltipContentProps.enterable, - default: true - }, - effect: { - ...useTooltipContentProps.effect, - default: "light" - }, - teleported: useTooltipContentProps.teleported, - appendTo: useTooltipContentProps.appendTo, - title: String, - width: { - type: [String, Number], - default: 150 - }, - offset: { - type: Number, - default: void 0 - }, - showAfter: { - type: Number, - default: 0 - }, - hideAfter: { - type: Number, - default: 200 - }, - autoClose: { - type: Number, - default: 0 - }, - showArrow: { - type: Boolean, - default: true - }, - persistent: { - type: Boolean, - default: true - }, - "onUpdate:visible": { - type: Function - } -}); -var popoverEmits = { - "update:visible": (value) => isBoolean2(value), - "before-enter": () => true, - "before-leave": () => true, - "after-enter": () => true, - "after-leave": () => true -}; - -// node_modules/element-plus/es/components/popover/src/popover2.mjs -var updateEventKeyRaw = `onUpdate:visible`; -var _sfc_main109 = defineComponent({ - ...{ - name: "ElPopover" - }, - __name: "popover", - props: popoverProps, - emits: popoverEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const onUpdateVisible = computed(() => { - return props2[updateEventKeyRaw]; - }); - const ns = useNamespace("popover"); - const tooltipRef = ref(); - const popperRef = computed(() => { - var _a; - return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef; - }); - const style = computed(() => { - return [ - { - width: addUnit(props2.width) - }, - props2.popperStyle - ]; - }); - const kls = computed(() => { - return [ns.b(), props2.popperClass, { [ns.m("plain")]: !!props2.content }]; - }); - const gpuAcceleration = computed(() => { - return props2.transition === `${ns.namespace.value}-fade-in-linear`; - }); - const hide2 = () => { - var _a; - (_a = tooltipRef.value) == null ? void 0 : _a.hide(); - }; - const beforeEnter = () => { - emit("before-enter"); - }; - const beforeLeave = () => { - emit("before-leave"); - }; - const afterEnter = () => { - emit("after-enter"); - }; - const afterLeave = () => { - emit("update:visible", false); - emit("after-leave"); - }; - __expose({ - popperRef, - hide: hide2 - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElTooltip), mergeProps({ - ref_key: "tooltipRef", - ref: tooltipRef - }, _ctx.$attrs, { - trigger: _ctx.trigger, - "trigger-keys": _ctx.triggerKeys, - placement: _ctx.placement, - disabled: _ctx.disabled, - visible: _ctx.visible, - transition: _ctx.transition, - "popper-options": _ctx.popperOptions, - tabindex: _ctx.tabindex, - content: _ctx.content, - offset: _ctx.offset, - "show-after": _ctx.showAfter, - "hide-after": _ctx.hideAfter, - "auto-close": _ctx.autoClose, - "show-arrow": _ctx.showArrow, - "aria-label": _ctx.title, - effect: _ctx.effect, - enterable: _ctx.enterable, - "popper-class": kls.value, - "popper-style": style.value, - teleported: _ctx.teleported, - "append-to": _ctx.appendTo, - persistent: _ctx.persistent, - "gpu-acceleration": gpuAcceleration.value, - "onUpdate:visible": onUpdateVisible.value, - onBeforeShow: beforeEnter, - onBeforeHide: beforeLeave, - onShow: afterEnter, - onHide: afterLeave - }), { - content: withCtx(() => [ - _ctx.title ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("title")), - role: "title" - }, - toDisplayString(_ctx.title), - 3 - )) : createCommentVNode("v-if", true), - renderSlot(_ctx.$slots, "default", {}, () => [ - createTextVNode( - toDisplayString(_ctx.content), - 1 - ) - ]) - ]), - default: withCtx(() => [ - _ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 16, ["trigger", "trigger-keys", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "append-to", "persistent", "gpu-acceleration", "onUpdate:visible"]); - }; - } -}); -var Popover = _export_sfc(_sfc_main109, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]); - -// node_modules/element-plus/es/components/popover/src/directive.mjs -var attachEvents = (el, binding) => { - const popperComponent = binding.arg || binding.value; - const popover = popperComponent == null ? void 0 : popperComponent.popperRef; - if (popover) { - popover.triggerRef = el; - } -}; -var PopoverDirective = { - mounted(el, binding) { - attachEvents(el, binding); - }, - updated(el, binding) { - attachEvents(el, binding); - } -}; -var VPopover = "popover"; - -// node_modules/element-plus/es/components/popover/index.mjs -var ElPopoverDirective = withInstallDirective(PopoverDirective, VPopover); -var ElPopover = withInstall(Popover, { - directive: ElPopoverDirective -}); - -// node_modules/element-plus/es/components/progress/src/progress2.mjs -var progressProps = buildProps({ - type: { - type: String, - default: "line", - values: ["line", "circle", "dashboard"] - }, - percentage: { - type: Number, - default: 0, - validator: (val) => val >= 0 && val <= 100 - }, - status: { - type: String, - default: "", - values: ["", "success", "exception", "warning"] - }, - indeterminate: Boolean, - duration: { - type: Number, - default: 3 - }, - strokeWidth: { - type: Number, - default: 6 - }, - strokeLinecap: { - type: definePropType(String), - default: "round" - }, - textInside: Boolean, - width: { - type: Number, - default: 126 - }, - showText: { - type: Boolean, - default: true - }, - color: { - type: definePropType([ - String, - Array, - Function - ]), - default: "" - }, - striped: Boolean, - stripedFlow: Boolean, - format: { - type: definePropType(Function), - default: (percentage) => `${percentage}%` - } -}); - -// node_modules/element-plus/es/components/progress/src/progress.mjs -var _hoisted_158 = ["aria-valuenow"]; -var _hoisted_230 = { viewBox: "0 0 100 100" }; -var _hoisted_313 = ["d", "stroke", "stroke-linecap", "stroke-width"]; -var _hoisted_49 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"]; -var _hoisted_58 = { key: 0 }; -var _sfc_main110 = defineComponent({ - ...{ - name: "ElProgress" - }, - __name: "progress", - props: progressProps, - setup(__props) { - const STATUS_COLOR_MAP = { - success: "#13ce66", - exception: "#ff4949", - warning: "#e6a23c", - default: "#20a0ff" - }; - const props2 = __props; - const ns = useNamespace("progress"); - const barStyle = computed(() => { - const barStyle2 = { - width: `${props2.percentage}%`, - animationDuration: `${props2.duration}s` - }; - const color = getCurrentColor(props2.percentage); - if (color.includes("gradient")) { - barStyle2.background = color; - } else { - barStyle2.backgroundColor = color; - } - return barStyle2; - }); - const relativeStrokeWidth = computed( - () => (props2.strokeWidth / props2.width * 100).toFixed(1) - ); - const radius = computed(() => { - if (["circle", "dashboard"].includes(props2.type)) { - return Number.parseInt( - `${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, - 10 - ); - } - return 0; - }); - const trackPath = computed(() => { - const r = radius.value; - const isDashboard = props2.type === "dashboard"; - return ` - M 50 50 - m 0 ${isDashboard ? "" : "-"}${r} - a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2} - a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2} - `; - }); - const perimeter = computed(() => 2 * Math.PI * radius.value); - const rate = computed(() => props2.type === "dashboard" ? 0.75 : 1); - const strokeDashoffset = computed(() => { - const offset3 = -1 * perimeter.value * (1 - rate.value) / 2; - return `${offset3}px`; - }); - const trailPathStyle = computed(() => ({ - strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`, - strokeDashoffset: strokeDashoffset.value - })); - const circlePathStyle = computed(() => ({ - strokeDasharray: `${perimeter.value * rate.value * (props2.percentage / 100)}px, ${perimeter.value}px`, - strokeDashoffset: strokeDashoffset.value, - transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s" - })); - const stroke = computed(() => { - let ret; - if (props2.color) { - ret = getCurrentColor(props2.percentage); - } else { - ret = STATUS_COLOR_MAP[props2.status] || STATUS_COLOR_MAP.default; - } - return ret; - }); - const statusIcon = computed(() => { - if (props2.status === "warning") { - return warning_filled_default; - } - if (props2.type === "line") { - return props2.status === "success" ? circle_check_default : circle_close_default; - } else { - return props2.status === "success" ? check_default : close_default; - } - }); - const progressTextSize = computed(() => { - return props2.type === "line" ? 12 + props2.strokeWidth * 0.4 : props2.width * 0.111111 + 2; - }); - const content = computed(() => props2.format(props2.percentage)); - function getColors(color) { - const span = 100 / color.length; - const seriesColors = color.map((seriesColor, index) => { - if (isString(seriesColor)) { - return { - color: seriesColor, - percentage: (index + 1) * span - }; - } - return seriesColor; - }); - return seriesColors.sort((a2, b2) => a2.percentage - b2.percentage); - } - const getCurrentColor = (percentage) => { - var _a; - const { color } = props2; - if (isFunction(color)) { - return color(percentage); - } else if (isString(color)) { - return color; - } else { - const colors = getColors(color); - for (const color2 of colors) { - if (color2.percentage > percentage) - return color2.color; - } - return (_a = colors[colors.length - 1]) == null ? void 0 : _a.color; - } - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - class: normalizeClass([ - unref(ns).b(), - unref(ns).m(_ctx.type), - unref(ns).is(_ctx.status), - { - [unref(ns).m("without-text")]: !_ctx.showText, - [unref(ns).m("text-inside")]: _ctx.textInside - } - ]), - role: "progressbar", - "aria-valuenow": _ctx.percentage, - "aria-valuemin": "0", - "aria-valuemax": "100" - }, [ - _ctx.type === "line" ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).b("bar")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).be("bar", "outer")), - style: normalizeStyle({ height: `${_ctx.strokeWidth}px` }) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass([ - unref(ns).be("bar", "inner"), - { [unref(ns).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate }, - { [unref(ns).bem("bar", "inner", "striped")]: _ctx.striped }, - { [unref(ns).bem("bar", "inner", "striped-flow")]: _ctx.stripedFlow } - ]), - style: normalizeStyle(barStyle.value) - }, - [ - (_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).be("bar", "innerText")) - }, - [ - renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [ - createBaseVNode( - "span", - null, - toDisplayString(content.value), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ) - ], - 6 - ) - ], - 2 - )) : (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).b("circle")), - style: normalizeStyle({ height: `${_ctx.width}px`, width: `${_ctx.width}px` }) - }, - [ - (openBlock(), createElementBlock("svg", _hoisted_230, [ - createBaseVNode("path", { - class: normalizeClass(unref(ns).be("circle", "track")), - d: trackPath.value, - stroke: `var(${unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`, - "stroke-linecap": _ctx.strokeLinecap, - "stroke-width": relativeStrokeWidth.value, - fill: "none", - style: normalizeStyle(trailPathStyle.value) - }, null, 14, _hoisted_313), - createBaseVNode("path", { - class: normalizeClass(unref(ns).be("circle", "path")), - d: trackPath.value, - stroke: stroke.value, - fill: "none", - opacity: _ctx.percentage ? 1 : 0, - "stroke-linecap": _ctx.strokeLinecap, - "stroke-width": relativeStrokeWidth.value, - style: normalizeStyle(circlePathStyle.value) - }, null, 14, _hoisted_49) - ])) - ], - 6 - )), - (_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass(unref(ns).e("text")), - style: normalizeStyle({ fontSize: `${progressTextSize.value}px` }) - }, - [ - renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [ - !_ctx.status ? (openBlock(), createElementBlock( - "span", - _hoisted_58, - toDisplayString(content.value), - 1 - )) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(statusIcon.value))) - ]), - _: 1 - })) - ]) - ], - 6 - )) : createCommentVNode("v-if", true) - ], 10, _hoisted_158); - }; - } -}); -var Progress = _export_sfc(_sfc_main110, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]); - -// node_modules/element-plus/es/components/progress/index.mjs -var ElProgress = withInstall(Progress); - -// node_modules/element-plus/es/components/rate/src/rate.mjs -var rateProps = buildProps({ - modelValue: { - type: Number, - default: 0 - }, - id: { - type: String, - default: void 0 - }, - lowThreshold: { - type: Number, - default: 2 - }, - highThreshold: { - type: Number, - default: 4 - }, - max: { - type: Number, - default: 5 - }, - colors: { - type: definePropType([Array, Object]), - default: () => mutable(["", "", ""]) - }, - voidColor: { - type: String, - default: "" - }, - disabledVoidColor: { - type: String, - default: "" - }, - icons: { - type: definePropType([Array, Object]), - default: () => [star_filled_default, star_filled_default, star_filled_default] - }, - voidIcon: { - type: iconPropType, - default: () => star_default - }, - disabledVoidIcon: { - type: iconPropType, - default: () => star_filled_default - }, - disabled: { - type: Boolean, - default: void 0 - }, - allowHalf: Boolean, - showText: Boolean, - showScore: Boolean, - textColor: { - type: String, - default: "" - }, - texts: { - type: definePropType(Array), - default: () => mutable([ - "Extremely bad", - "Disappointed", - "Fair", - "Satisfied", - "Surprise" - ]) - }, - scoreTemplate: { - type: String, - default: "{value}" - }, - size: useSizeProp, - clearable: Boolean, - ...useAriaProps(["ariaLabel"]) -}); -var rateEmits = { - [CHANGE_EVENT]: (value) => isNumber2(value), - [UPDATE_MODEL_EVENT]: (value) => isNumber2(value) -}; - -// node_modules/element-plus/es/components/rate/src/rate2.mjs -var _hoisted_159 = ["id", "aria-label", "aria-labelledby", "aria-valuenow", "aria-valuetext", "aria-valuemax"]; -var _hoisted_231 = ["onMousemove", "onClick"]; -var _sfc_main111 = defineComponent({ - ...{ - name: "ElRate" - }, - __name: "rate", - props: rateProps, - emits: rateEmits, - setup(__props, { expose: __expose, emit: __emit }) { - function getValueFromMap(value, map2) { - const isExcludedObject = (val) => isObject(val); - const matchedKeys = Object.keys(map2).map((key) => +key).filter((key) => { - const val = map2[key]; - const excluded = isExcludedObject(val) ? val.excluded : false; - return excluded ? value < key : value <= key; - }).sort((a2, b2) => a2 - b2); - const matchedValue = map2[matchedKeys[0]]; - return isExcludedObject(matchedValue) && matchedValue.value || matchedValue; - } - const props2 = __props; - const emit = __emit; - const formItemContext = inject(formItemContextKey, void 0); - const rateSize = useFormSize(); - const ns = useNamespace("rate"); - const { inputId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext - }); - const currentValue = ref(props2.modelValue); - const hoverIndex = ref(-1); - const pointerAtLeftHalf = ref(true); - const iconRefs = ref([]); - const iconClientWidths = computed( - () => iconRefs.value.map((icon) => icon.$el.clientWidth) - ); - const rateClasses = computed(() => [ns.b(), ns.m(rateSize.value)]); - const rateDisabled = useFormDisabled(); - const rateStyles = computed(() => { - return ns.cssVarBlock({ - "void-color": props2.voidColor, - "disabled-void-color": props2.disabledVoidColor, - "fill-color": activeColor.value - }); - }); - const text = computed(() => { - let result2 = ""; - if (props2.showScore) { - result2 = props2.scoreTemplate.replace( - /\{\s*value\s*\}/, - rateDisabled.value ? `${props2.modelValue}` : `${currentValue.value}` - ); - } else if (props2.showText) { - result2 = props2.texts[Math.ceil(currentValue.value) - 1]; - } - return result2; - }); - const valueDecimal = computed( - () => props2.modelValue * 100 - Math.floor(props2.modelValue) * 100 - ); - const colorMap = computed( - () => isArray(props2.colors) ? { - [props2.lowThreshold]: props2.colors[0], - [props2.highThreshold]: { value: props2.colors[1], excluded: true }, - [props2.max]: props2.colors[2] - } : props2.colors - ); - const activeColor = computed(() => { - const color = getValueFromMap(currentValue.value, colorMap.value); - return isObject(color) ? "" : color; - }); - const decimalStyle = computed(() => { - let width = ""; - if (rateDisabled.value) { - width = `${valueDecimal.value}%`; - } else if (props2.allowHalf) { - width = "50%"; - } - return { - color: activeColor.value, - width - }; - }); - const componentMap = computed(() => { - let icons = isArray(props2.icons) ? [...props2.icons] : { ...props2.icons }; - icons = markRaw(icons); - return isArray(icons) ? { - [props2.lowThreshold]: icons[0], - [props2.highThreshold]: { - value: icons[1], - excluded: true - }, - [props2.max]: icons[2] - } : icons; - }); - const decimalIconComponent = computed( - () => getValueFromMap(props2.modelValue, componentMap.value) - ); - const voidComponent = computed( - () => rateDisabled.value ? isString(props2.disabledVoidIcon) ? props2.disabledVoidIcon : markRaw(props2.disabledVoidIcon) : isString(props2.voidIcon) ? props2.voidIcon : markRaw(props2.voidIcon) - ); - const activeComponent = computed( - () => getValueFromMap(currentValue.value, componentMap.value) - ); - function showDecimalIcon(item) { - const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props2.modelValue && item > props2.modelValue; - const showWhenAllowHalf = props2.allowHalf && pointerAtLeftHalf.value && item - 0.5 <= currentValue.value && item > currentValue.value; - return showWhenDisabled || showWhenAllowHalf; - } - function emitValue(value) { - if (props2.clearable && value === props2.modelValue) { - value = 0; - } - emit(UPDATE_MODEL_EVENT, value); - if (props2.modelValue !== value) { - emit(CHANGE_EVENT, value); - } - } - function selectValue(value) { - if (rateDisabled.value) { - return; - } - if (props2.allowHalf && pointerAtLeftHalf.value) { - emitValue(currentValue.value); - } else { - emitValue(value); - } - } - function handleKey(e) { - if (rateDisabled.value) { - return; - } - const code = getEventCode(e); - const step2 = props2.allowHalf ? 0.5 : 1; - let _currentValue = currentValue.value; - switch (code) { - case EVENT_CODE.up: - case EVENT_CODE.right: - _currentValue += step2; - break; - case EVENT_CODE.left: - case EVENT_CODE.down: - _currentValue -= step2; - break; - } - _currentValue = clamp_default(_currentValue, 0, props2.max); - if (_currentValue === currentValue.value) { - return; - } - e.stopPropagation(); - e.preventDefault(); - emit(UPDATE_MODEL_EVENT, _currentValue); - emit(CHANGE_EVENT, _currentValue); - return _currentValue; - } - function setCurrentValue(value, event) { - if (rateDisabled.value) { - return; - } - if (props2.allowHalf && event) { - pointerAtLeftHalf.value = event.offsetX * 2 <= iconClientWidths.value[value - 1]; - currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value; - } else { - currentValue.value = value; - } - hoverIndex.value = value; - } - function resetCurrentValue() { - if (rateDisabled.value) { - return; - } - if (props2.allowHalf) { - pointerAtLeftHalf.value = props2.modelValue !== Math.floor(props2.modelValue); - } - currentValue.value = props2.modelValue; - hoverIndex.value = -1; - } - watch( - () => props2.modelValue, - (val) => { - currentValue.value = val; - pointerAtLeftHalf.value = props2.modelValue !== Math.floor(props2.modelValue); - } - ); - if (!props2.modelValue) { - emit(UPDATE_MODEL_EVENT, 0); - } - __expose({ - setCurrentValue, - resetCurrentValue - }); - return (_ctx, _cache) => { - var _a; - return openBlock(), createElementBlock("div", { - id: unref(inputId), - class: normalizeClass([rateClasses.value, unref(ns).is("disabled", unref(rateDisabled))]), - role: "slider", - "aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "rating" : void 0, - "aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItemContext)) == null ? void 0 : _a.labelId : void 0, - "aria-valuenow": currentValue.value, - "aria-valuetext": text.value || void 0, - "aria-valuemin": "0", - "aria-valuemax": _ctx.max, - tabindex: "0", - style: normalizeStyle(rateStyles.value), - onKeydown: handleKey - }, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.max, (item, key) => { - return openBlock(), createElementBlock("span", { - key, - class: normalizeClass(unref(ns).e("item")), - onMousemove: ($event) => setCurrentValue(item, $event), - onMouseleave: resetCurrentValue, - onClick: ($event) => selectValue(item) - }, [ - createVNode(unref(ElIcon), { - ref_for: true, - ref_key: "iconRefs", - ref: iconRefs, - class: normalizeClass([ - unref(ns).e("icon"), - { hover: hoverIndex.value === item }, - unref(ns).is("active", item <= currentValue.value), - unref(ns).is("focus-visible", item === Math.ceil(currentValue.value || 1)) - ]) - }, { - default: withCtx(() => [ - withDirectives((openBlock(), createBlock( - resolveDynamicComponent(activeComponent.value), - null, - null, - 512 - )), [ - [vShow, !showDecimalIcon(item) && item <= currentValue.value] - ]), - withDirectives((openBlock(), createBlock( - resolveDynamicComponent(voidComponent.value), - null, - null, - 512 - )), [ - [vShow, !showDecimalIcon(item) && item > currentValue.value] - ]), - withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), { - class: normalizeClass([unref(ns).em("decimal", "box")]) - }, null, 8, ["class"])), [ - [vShow, showDecimalIcon(item)] - ]), - withDirectives(createVNode(unref(ElIcon), { - style: normalizeStyle(decimalStyle.value), - class: normalizeClass([unref(ns).e("icon"), unref(ns).e("decimal")]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(decimalIconComponent.value))) - ]), - _: 1 - }, 8, ["style", "class"]), [ - [vShow, showDecimalIcon(item)] - ]) - ]), - _: 2 - }, 1032, ["class"]) - ], 42, _hoisted_231); - }), - 128 - )), - _ctx.showText || _ctx.showScore ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass(unref(ns).e("text")), - style: normalizeStyle({ color: _ctx.textColor }) - }, - toDisplayString(text.value), - 7 - )) : createCommentVNode("v-if", true) - ], 46, _hoisted_159); - }; - } -}); -var Rate = _export_sfc(_sfc_main111, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/rate/src/rate.vue"]]); - -// node_modules/element-plus/es/components/rate/index.mjs -var ElRate = withInstall(Rate); - -// node_modules/element-plus/es/components/result/src/result.mjs -var IconMap = { - primary: "icon-primary", - success: "icon-success", - warning: "icon-warning", - error: "icon-error", - info: "icon-info" -}; -var IconComponentMap = { - [IconMap.primary]: info_filled_default, - [IconMap.success]: circle_check_filled_default, - [IconMap.warning]: warning_filled_default, - [IconMap.error]: circle_close_filled_default, - [IconMap.info]: info_filled_default -}; -var resultProps = buildProps({ - title: { - type: String, - default: "" - }, - subTitle: { - type: String, - default: "" - }, - icon: { - type: String, - values: ["primary", "success", "warning", "info", "error"], - default: "info" - } -}); - -// node_modules/element-plus/es/components/result/src/result2.mjs -var _sfc_main112 = defineComponent({ - ...{ - name: "ElResult" - }, - __name: "result", - props: resultProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("result"); - const resultIcon = computed(() => { - const icon = props2.icon; - const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info"; - const iconComponent = IconComponentMap[iconClass] || IconComponentMap["icon-info"]; - return { - class: iconClass, - component: iconComponent - }; - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b()) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("icon")) - }, - [ - renderSlot(_ctx.$slots, "icon", {}, () => [ - resultIcon.value.component ? (openBlock(), createBlock(resolveDynamicComponent(resultIcon.value.component), { - key: 0, - class: normalizeClass(resultIcon.value.class) - }, null, 8, ["class"])) : createCommentVNode("v-if", true) - ]) - ], - 2 - ), - _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("title")) - }, - [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createBaseVNode( - "p", - null, - toDisplayString(_ctx.title), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("subtitle")) - }, - [ - renderSlot(_ctx.$slots, "sub-title", {}, () => [ - createBaseVNode( - "p", - null, - toDisplayString(_ctx.subTitle), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.$slots.extra ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass(unref(ns).e("extra")) - }, - [ - renderSlot(_ctx.$slots, "extra") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var Result = _export_sfc(_sfc_main112, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/result/src/result.vue"]]); - -// node_modules/element-plus/es/components/result/index.mjs -var ElResult = withInstall(Result); - -// node_modules/element-plus/es/components/row/src/row.mjs -var RowJustify = [ - "start", - "center", - "end", - "space-around", - "space-between", - "space-evenly" -]; -var RowAlign = ["top", "middle", "bottom"]; -var rowProps = buildProps({ - tag: { - type: String, - default: "div" - }, - gutter: { - type: Number, - default: 0 - }, - justify: { - type: String, - values: RowJustify, - default: "start" - }, - align: { - type: String, - values: RowAlign - } -}); - -// node_modules/element-plus/es/components/row/src/row2.mjs -var _sfc_main113 = defineComponent({ - ...{ - name: "ElRow" - }, - __name: "row", - props: rowProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("row"); - const gutter = computed(() => props2.gutter); - provide(rowContextKey, { - gutter - }); - const style = computed(() => { - const styles = {}; - if (!props2.gutter) { - return styles; - } - styles.marginRight = styles.marginLeft = `-${props2.gutter / 2}px`; - return styles; - }); - const rowKls = computed(() => [ - ns.b(), - ns.is(`justify-${props2.justify}`, props2.justify !== "start"), - ns.is(`align-${props2.align}`, !!props2.align) - ]); - return (_ctx, _cache) => { - return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { - class: normalizeClass(rowKls.value), - style: normalizeStyle(style.value) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["class", "style"]); - }; - } -}); -var Row = _export_sfc(_sfc_main113, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]); - -// node_modules/element-plus/es/components/row/index.mjs -var ElRow = withInstall(Row); - -// node_modules/element-plus/es/components/select-v2/src/group-item.mjs -var _sfc_main114 = defineComponent({ - props: { - item: { - type: Object, - required: true - }, - style: { - type: Object - }, - height: Number - }, - setup() { - const ns = useNamespace("select"); - return { - ns - }; - } -}); -function _sfc_render15(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(_ctx.ns.be("group", "title")), - style: normalizeStyle({ ..._ctx.style, lineHeight: `${_ctx.height}px` }) - }, - toDisplayString(_ctx.item.label), - 7 - ); -} -var GroupItem = _export_sfc(_sfc_main114, [["render", _sfc_render15], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]); - -// node_modules/element-plus/es/components/select-v2/src/useOption.mjs -function useOption2(props2, { emit }) { - return { - hoverItem: () => { - if (!props2.disabled) { - emit("hover", props2.index); - } - }, - selectOptionClick: () => { - if (!props2.disabled) { - emit("select", props2.item, props2.index); - } - } - }; -} - -// node_modules/element-plus/es/components/select-v2/src/defaults.mjs -var selectV2Props = buildProps({ - allowCreate: Boolean, - autocomplete: { - type: definePropType(String), - default: "none" - }, - automaticDropdown: Boolean, - clearable: Boolean, - clearIcon: { - type: iconPropType, - default: circle_close_default - }, - effect: { - type: definePropType(String), - default: "light" - }, - collapseTags: Boolean, - collapseTagsTooltip: Boolean, - maxCollapseTags: { - type: Number, - default: 1 - }, - defaultFirstOption: Boolean, - disabled: { - type: Boolean, - default: void 0 - }, - estimatedOptionHeight: { - type: Number, - default: void 0 - }, - filterable: Boolean, - filterMethod: { - type: definePropType(Function) - }, - height: { - type: Number, - default: 274 - }, - itemHeight: { - type: Number, - default: 34 - }, - id: String, - loading: Boolean, - loadingText: String, - modelValue: { - type: definePropType([Array, String, Number, Boolean, Object]), - default: void 0 - }, - multiple: Boolean, - multipleLimit: { - type: Number, - default: 0 - }, - name: String, - noDataText: String, - noMatchText: String, - remoteMethod: { - type: definePropType(Function) - }, - reserveKeyword: { - type: Boolean, - default: true - }, - options: { - type: definePropType(Array), - required: true - }, - placeholder: { - type: String - }, - teleported: useTooltipContentProps.teleported, - persistent: { - type: Boolean, - default: true - }, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - popperOptions: { - type: definePropType(Object), - default: () => ({}) - }, - remote: Boolean, - debounce: { - type: Number, - default: 300 - }, - size: useSizeProp, - props: { - type: definePropType(Object), - default: () => defaultProps - }, - valueKey: { - type: String, - default: "value" - }, - scrollbarAlwaysOn: Boolean, - validateEvent: { - type: Boolean, - default: true - }, - offset: { - type: Number, - default: 12 - }, - remoteShowSuffix: Boolean, - showArrow: { - type: Boolean, - default: true - }, - placement: { - type: definePropType(String), - values: Ee, - default: "bottom-start" - }, - fallbackPlacements: { - type: definePropType(Array), - default: ["bottom-start", "top-start", "right", "left"] - }, - tagType: { ...tagProps.type, default: "info" }, - tagEffect: { ...tagProps.effect, default: "light" }, - tabindex: { - type: [String, Number], - default: 0 - }, - appendTo: useTooltipContentProps.appendTo, - fitInputWidth: { - type: [Boolean, Number], - default: true, - validator(val) { - return isBoolean2(val) || isNumber2(val); - } - }, - suffixIcon: { - type: iconPropType, - default: arrow_down_default - }, - ...useEmptyValuesProps, - ...useAriaProps(["ariaLabel"]) -}); -var optionV2Props = buildProps({ - data: Array, - disabled: Boolean, - hovering: Boolean, - item: { - type: definePropType(Object), - required: true - }, - index: Number, - style: Object, - selected: Boolean, - created: Boolean -}); -var selectV2Emits = { - [UPDATE_MODEL_EVENT]: (val) => true, - [CHANGE_EVENT]: (val) => true, - "remove-tag": (val) => true, - "visible-change": (visible) => true, - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent, - clear: () => true -}; -var optionV2Emits = { - hover: (index) => isNumber2(index), - select: (val, index) => true -}; - -// node_modules/element-plus/es/components/select-v2/src/token.mjs -var selectV2InjectionKey = Symbol( - "ElSelectV2Injection" -); - -// node_modules/element-plus/es/components/select-v2/src/option-item.mjs -var _sfc_main115 = defineComponent({ - props: optionV2Props, - emits: optionV2Emits, - setup(props2, { emit }) { - const select = inject(selectV2InjectionKey); - const ns = useNamespace("select"); - const { hoverItem, selectOptionClick } = useOption2(props2, { emit }); - const { getLabel } = useProps(select.props); - const contentId = select.contentId; - return { - ns, - contentId, - hoverItem, - selectOptionClick, - getLabel - }; - } -}); -var _hoisted_160 = ["id", "aria-selected", "aria-disabled"]; -function _sfc_render16(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("li", { - id: `${_ctx.contentId}-${_ctx.index}`, - role: "option", - "aria-selected": _ctx.selected, - "aria-disabled": _ctx.disabled || void 0, - style: normalizeStyle(_ctx.style), - class: normalizeClass([ - _ctx.ns.be("dropdown", "item"), - _ctx.ns.is("selected", _ctx.selected), - _ctx.ns.is("disabled", _ctx.disabled), - _ctx.ns.is("created", _ctx.created), - _ctx.ns.is("hovering", _ctx.hovering) - ]), - onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)), - onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"])) - }, [ - renderSlot(_ctx.$slots, "default", { - item: _ctx.item, - index: _ctx.index, - disabled: _ctx.disabled - }, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.getLabel(_ctx.item)), - 1 - ) - ]) - ], 46, _hoisted_160); -} -var OptionItem = _export_sfc(_sfc_main115, [["render", _sfc_render16], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]); - -// node_modules/memoize-one/dist/memoize-one.esm.js -var safeIsNaN = Number.isNaN || function ponyfill(value) { - return typeof value === "number" && value !== value; -}; -function isEqual2(first, second) { - if (first === second) { - return true; - } - if (safeIsNaN(first) && safeIsNaN(second)) { - return true; - } - return false; -} -function areInputsEqual(newInputs, lastInputs) { - if (newInputs.length !== lastInputs.length) { - return false; - } - for (var i = 0; i < newInputs.length; i++) { - if (!isEqual2(newInputs[i], lastInputs[i])) { - return false; - } - } - return true; -} -function memoizeOne(resultFn, isEqual3) { - if (isEqual3 === void 0) { - isEqual3 = areInputsEqual; - } - var cache2 = null; - function memoized() { - var newArgs = []; - for (var _i = 0; _i < arguments.length; _i++) { - newArgs[_i] = arguments[_i]; - } - if (cache2 && cache2.lastThis === this && isEqual3(newArgs, cache2.lastArgs)) { - return cache2.lastResult; - } - var lastResult = resultFn.apply(this, newArgs); - cache2 = { - lastResult, - lastArgs: newArgs, - lastThis: this - }; - return lastResult; - } - memoized.clear = function clear() { - cache2 = null; - }; - return memoized; -} - -// node_modules/element-plus/es/components/virtual-list/src/hooks/use-cache.mjs -var useCache = () => { - const vm = getCurrentInstance(); - const props2 = vm.proxy.$props; - return computed(() => { - const _getItemStyleCache = (_2, __, ___) => ({}); - return props2.perfMode ? memoize_default(_getItemStyleCache) : memoizeOne(_getItemStyleCache); - }); -}; - -// node_modules/element-plus/es/components/virtual-list/src/defaults.mjs -var DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50; -var ITEM_RENDER_EVT = "itemRendered"; -var SCROLL_EVT = "scroll"; -var FORWARD = "forward"; -var BACKWARD = "backward"; -var AUTO_ALIGNMENT = "auto"; -var SMART_ALIGNMENT = "smart"; -var START_ALIGNMENT = "start"; -var CENTERED_ALIGNMENT = "center"; -var END_ALIGNMENT = "end"; -var HORIZONTAL = "horizontal"; -var VERTICAL = "vertical"; -var LTR = "ltr"; -var RTL = "rtl"; -var RTL_OFFSET_NAG = "negative"; -var RTL_OFFSET_POS_ASC = "positive-ascending"; -var RTL_OFFSET_POS_DESC = "positive-descending"; -var ScrollbarSizeKey = { - [HORIZONTAL]: "height", - [VERTICAL]: "width" -}; -var ScrollbarDirKey = { - [HORIZONTAL]: "left", - [VERTICAL]: "top" -}; -var SCROLLBAR_MIN_SIZE = 20; - -// node_modules/element-plus/es/components/virtual-list/src/hooks/use-wheel.mjs -var useWheel = ({ atEndEdge, atStartEdge, layout: layout2 }, onWheelDelta) => { - let frameHandle; - let offset3 = 0; - const hasReachedEdge = (offset22) => { - const edgeReached = offset22 < 0 && atStartEdge.value || offset22 > 0 && atEndEdge.value; - return edgeReached; - }; - const onWheel = (e) => { - cAF(frameHandle); - let { deltaX, deltaY } = e; - if (e.shiftKey && deltaY !== 0) { - deltaX = deltaY; - deltaY = 0; - } - const newOffset = layout2.value === HORIZONTAL ? deltaX : deltaY; - if (hasReachedEdge(newOffset)) - return; - offset3 += newOffset; - if (!isFirefox() && newOffset !== 0) { - e.preventDefault(); - } - frameHandle = rAF(() => { - onWheelDelta(offset3); - offset3 = 0; - }); - }; - return { - hasReachedEdge, - onWheel - }; -}; - -// node_modules/element-plus/es/components/virtual-list/src/props.mjs -var itemSize = buildProp({ - type: definePropType([Number, Function]), - required: true -}); -var estimatedItemSize = buildProp({ - type: Number -}); -var cache = buildProp({ - type: Number, - default: 2 -}); -var direction = buildProp({ - type: String, - values: ["ltr", "rtl"], - default: "ltr" -}); -var initScrollOffset = buildProp({ - type: Number, - default: 0 -}); -var total = buildProp({ - type: Number, - required: true -}); -var layout = buildProp({ - type: String, - values: ["horizontal", "vertical"], - default: VERTICAL -}); -var virtualizedProps = buildProps({ - className: { - type: String, - default: "" - }, - containerElement: { - type: definePropType([String, Object]), - default: "div" - }, - data: { - type: definePropType(Array), - default: () => mutable([]) - }, - direction, - height: { - type: [String, Number], - required: true - }, - innerElement: { - type: [String, Object], - default: "div" - }, - innerProps: { - type: definePropType(Object), - default: () => ({}) - }, - style: { - type: definePropType([Object, String, Array]) - }, - useIsScrolling: Boolean, - width: { - type: [Number, String], - required: false - }, - perfMode: { - type: Boolean, - default: true - }, - scrollbarAlwaysOn: Boolean -}); -var virtualizedListProps = buildProps({ - cache, - estimatedItemSize, - layout, - initScrollOffset, - total, - itemSize, - ...virtualizedProps -}); -var scrollbarSize = { - type: Number, - default: 6 -}; -var startGap = { type: Number, default: 0 }; -var endGap = { type: Number, default: 2 }; -var virtualizedGridProps = buildProps({ - columnCache: cache, - columnWidth: itemSize, - estimatedColumnWidth: estimatedItemSize, - estimatedRowHeight: estimatedItemSize, - initScrollLeft: initScrollOffset, - initScrollTop: initScrollOffset, - itemKey: { - type: definePropType(Function), - default: ({ - columnIndex, - rowIndex - }) => `${rowIndex}:${columnIndex}` - }, - rowCache: cache, - rowHeight: itemSize, - totalColumn: total, - totalRow: total, - hScrollbarSize: scrollbarSize, - vScrollbarSize: scrollbarSize, - scrollbarStartGap: startGap, - scrollbarEndGap: endGap, - role: String, - ...virtualizedProps -}); -var virtualizedScrollbarProps = buildProps({ - alwaysOn: Boolean, - class: String, - layout, - total, - ratio: { - type: Number, - required: true - }, - clientSize: { - type: Number, - required: true - }, - scrollFrom: { - type: Number, - required: true - }, - scrollbarSize, - startGap, - endGap, - visible: Boolean -}); - -// node_modules/element-plus/es/components/virtual-list/src/utils.mjs -var getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD; -var isHorizontal = (dir) => dir === LTR || dir === RTL || dir === HORIZONTAL; -var isRTL = (dir) => dir === RTL; -var cachedRTLResult = null; -function getRTLOffsetType(recalculate = false) { - if (cachedRTLResult === null || recalculate) { - const outerDiv = document.createElement("div"); - const outerStyle = outerDiv.style; - outerStyle.width = "50px"; - outerStyle.height = "50px"; - outerStyle.overflow = "scroll"; - outerStyle.direction = "rtl"; - const innerDiv = document.createElement("div"); - const innerStyle = innerDiv.style; - innerStyle.width = "100px"; - innerStyle.height = "100px"; - outerDiv.appendChild(innerDiv); - document.body.appendChild(outerDiv); - if (outerDiv.scrollLeft > 0) { - cachedRTLResult = RTL_OFFSET_POS_DESC; - } else { - outerDiv.scrollLeft = 1; - if (outerDiv.scrollLeft === 0) { - cachedRTLResult = RTL_OFFSET_NAG; - } else { - cachedRTLResult = RTL_OFFSET_POS_ASC; - } - } - document.body.removeChild(outerDiv); - return cachedRTLResult; - } - return cachedRTLResult; -} -function renderThumbStyle2({ move, size: size3, bar }, layout2) { - const style = {}; - const translate2 = `translate${bar.axis}(${move}px)`; - style[bar.size] = size3; - style.transform = translate2; - if (layout2 === "horizontal") { - style.height = "100%"; - } else { - style.width = "100%"; - } - return style; -} - -// node_modules/element-plus/es/components/virtual-list/src/components/scrollbar.mjs -var ScrollBar = defineComponent({ - name: "ElVirtualScrollBar", - props: virtualizedScrollbarProps, - emits: ["scroll", "start-move", "stop-move"], - setup(props2, { emit }) { - const GAP2 = computed(() => props2.startGap + props2.endGap); - const nsVirtualScrollbar = useNamespace("virtual-scrollbar"); - const nsScrollbar = useNamespace("scrollbar"); - const trackRef = ref(); - const thumbRef = ref(); - let frameHandle = null; - let onselectstartStore = null; - const state = reactive({ - isDragging: false, - traveled: 0 - }); - const bar = computed(() => BAR_MAP[props2.layout]); - const trackSize = computed(() => props2.clientSize - unref(GAP2)); - const trackStyle = computed(() => ({ - position: "absolute", - width: `${HORIZONTAL === props2.layout ? trackSize.value : props2.scrollbarSize}px`, - height: `${HORIZONTAL === props2.layout ? props2.scrollbarSize : trackSize.value}px`, - [ScrollbarDirKey[props2.layout]]: "2px", - right: "2px", - bottom: "2px", - borderRadius: "4px" - })); - const thumbSize = computed(() => { - const ratio = props2.ratio; - if (ratio >= 100) { - return Number.POSITIVE_INFINITY; - } - if (ratio >= 50) { - return ratio * trackSize.value / 100; - } - const SCROLLBAR_MAX_SIZE = trackSize.value / 3; - return Math.floor( - Math.min( - Math.max(ratio * trackSize.value / 100, SCROLLBAR_MIN_SIZE), - SCROLLBAR_MAX_SIZE - ) - ); - }); - const thumbStyle = computed(() => { - if (!Number.isFinite(thumbSize.value)) { - return { - display: "none" - }; - } - const thumb = `${thumbSize.value}px`; - const style = renderThumbStyle2( - { - bar: bar.value, - size: thumb, - move: state.traveled - }, - props2.layout - ); - return style; - }); - const totalSteps = computed( - () => Math.ceil(props2.clientSize - thumbSize.value - unref(GAP2)) - ); - const attachEvents2 = () => { - window.addEventListener("mousemove", onMouseMove); - window.addEventListener("mouseup", onMouseUp); - const thumbEl = unref(thumbRef); - if (!thumbEl) - return; - onselectstartStore = document.onselectstart; - document.onselectstart = () => false; - thumbEl.addEventListener("touchmove", onMouseMove, { passive: true }); - thumbEl.addEventListener("touchend", onMouseUp); - }; - const detachEvents = () => { - window.removeEventListener("mousemove", onMouseMove); - window.removeEventListener("mouseup", onMouseUp); - document.onselectstart = onselectstartStore; - onselectstartStore = null; - const thumbEl = unref(thumbRef); - if (!thumbEl) - return; - thumbEl.removeEventListener("touchmove", onMouseMove); - thumbEl.removeEventListener("touchend", onMouseUp); - }; - const onThumbMouseDown = (e) => { - e.stopImmediatePropagation(); - if (e.ctrlKey || [1, 2].includes(e.button)) { - return; - } - state.isDragging = true; - state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]); - emit("start-move"); - attachEvents2(); - }; - const onMouseUp = () => { - state.isDragging = false; - state[bar.value.axis] = 0; - emit("stop-move"); - detachEvents(); - }; - const onMouseMove = (e) => { - const { isDragging: isDragging2 } = state; - if (!isDragging2) - return; - if (!thumbRef.value || !trackRef.value) - return; - const prevPage = state[bar.value.axis]; - if (!prevPage) - return; - cAF(frameHandle); - const offset3 = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1; - const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage; - const distance = offset3 - thumbClickPosition; - frameHandle = rAF(() => { - state.traveled = Math.max(0, Math.min(distance, totalSteps.value)); - emit("scroll", distance, totalSteps.value); - }); - }; - const clickTrackHandler = (e) => { - const offset3 = Math.abs( - e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client] - ); - const thumbHalf = thumbRef.value[bar.value.offset] / 2; - const distance = offset3 - thumbHalf; - state.traveled = Math.max(0, Math.min(distance, totalSteps.value)); - emit("scroll", distance, totalSteps.value); - }; - watch( - () => props2.scrollFrom, - (v2) => { - if (state.isDragging) - return; - state.traveled = Math.ceil(v2 * totalSteps.value); - } - ); - onBeforeUnmount(() => { - detachEvents(); - }); - return () => { - return h( - "div", - { - role: "presentation", - ref: trackRef, - class: [ - nsVirtualScrollbar.b(), - props2.class, - (props2.alwaysOn || state.isDragging) && "always-on" - ], - style: trackStyle.value, - onMousedown: withModifiers(clickTrackHandler, [ - "stop", - "prevent" - ]), - onTouchstartPrevent: onThumbMouseDown - }, - h( - "div", - { - ref: thumbRef, - class: nsScrollbar.e("thumb"), - style: thumbStyle.value, - onMousedown: onThumbMouseDown - }, - [] - ) - ); - }; - } -}); - -// node_modules/element-plus/es/components/virtual-list/src/builders/build-list.mjs -var createList = ({ - name, - getOffset: getOffset3, - getItemSize, - getItemOffset, - getEstimatedTotalSize: getEstimatedTotalSize2, - getStartIndexForOffset, - getStopIndexForStartIndex, - initCache, - clearCache, - validateProps -}) => { - return defineComponent({ - name: name != null ? name : "ElVirtualList", - props: virtualizedListProps, - emits: [ITEM_RENDER_EVT, SCROLL_EVT], - setup(props2, { emit, expose }) { - validateProps(props2); - const instance = getCurrentInstance(); - const ns = useNamespace("vl"); - const dynamicSizeCache = ref(initCache(props2, instance)); - const getItemStyleCache = useCache(); - const windowRef = ref(); - const innerRef = ref(); - const scrollbarRef = ref(); - const states = ref({ - isScrolling: false, - scrollDir: "forward", - scrollOffset: isNumber2(props2.initScrollOffset) ? props2.initScrollOffset : 0, - updateRequested: false, - isScrollbarDragging: false, - scrollbarAlwaysOn: props2.scrollbarAlwaysOn - }); - const itemsToRender = computed(() => { - const { total: total2, cache: cache2 } = props2; - const { isScrolling, scrollDir, scrollOffset } = unref(states); - if (total2 === 0) { - return [0, 0, 0, 0]; - } - const startIndex = getStartIndexForOffset( - props2, - scrollOffset, - unref(dynamicSizeCache) - ); - const stopIndex = getStopIndexForStartIndex( - props2, - startIndex, - scrollOffset, - unref(dynamicSizeCache) - ); - const cacheBackward = !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache2) : 1; - const cacheForward = !isScrolling || scrollDir === FORWARD ? Math.max(1, cache2) : 1; - return [ - Math.max(0, startIndex - cacheBackward), - Math.max(0, Math.min(total2 - 1, stopIndex + cacheForward)), - startIndex, - stopIndex - ]; - }); - const estimatedTotalSize = computed( - () => getEstimatedTotalSize2(props2, unref(dynamicSizeCache)) - ); - const _isHorizontal = computed(() => isHorizontal(props2.layout)); - const windowStyle = computed(() => [ - { - position: "relative", - [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll", - WebkitOverflowScrolling: "touch", - willChange: "transform" - }, - { - direction: props2.direction, - height: isNumber2(props2.height) ? `${props2.height}px` : props2.height, - width: isNumber2(props2.width) ? `${props2.width}px` : props2.width - }, - props2.style - ]); - const innerStyle = computed(() => { - const size3 = unref(estimatedTotalSize); - const horizontal = unref(_isHorizontal); - return { - height: horizontal ? "100%" : `${size3}px`, - pointerEvents: unref(states).isScrolling ? "none" : void 0, - width: horizontal ? `${size3}px` : "100%", - margin: 0, - boxSizing: "border-box" - }; - }); - const clientSize = computed( - () => _isHorizontal.value ? props2.width : props2.height - ); - const { onWheel } = useWheel( - { - atStartEdge: computed(() => states.value.scrollOffset <= 0), - atEndEdge: computed( - () => states.value.scrollOffset >= estimatedTotalSize.value - ), - layout: computed(() => props2.layout) - }, - (offset3) => { - var _a, _b; - (_b = (_a = scrollbarRef.value).onMouseUp) == null ? void 0 : _b.call(_a); - scrollTo2( - Math.min( - states.value.scrollOffset + offset3, - estimatedTotalSize.value - clientSize.value - ) - ); - } - ); - useEventListener(windowRef, "wheel", onWheel, { - passive: false - }); - const emitEvents = () => { - const { total: total2 } = props2; - if (total2 > 0) { - const [cacheStart, cacheEnd, visibleStart, visibleEnd] = unref(itemsToRender); - emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd); - } - const { scrollDir, scrollOffset, updateRequested } = unref(states); - emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested); - }; - const scrollVertically = (e) => { - const { clientHeight, scrollHeight, scrollTop } = e.currentTarget; - const _states = unref(states); - if (_states.scrollOffset === scrollTop) { - return; - } - const scrollOffset = Math.max( - 0, - Math.min(scrollTop, scrollHeight - clientHeight) - ); - states.value = { - ..._states, - isScrolling: true, - scrollDir: getScrollDir(_states.scrollOffset, scrollOffset), - scrollOffset, - updateRequested: false - }; - nextTick(resetIsScrolling); - }; - const scrollHorizontally = (e) => { - const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget; - const _states = unref(states); - if (_states.scrollOffset === scrollLeft) { - return; - } - const { direction: direction2 } = props2; - let scrollOffset = scrollLeft; - if (direction2 === RTL) { - switch (getRTLOffsetType()) { - case RTL_OFFSET_NAG: { - scrollOffset = -scrollLeft; - break; - } - case RTL_OFFSET_POS_DESC: { - scrollOffset = scrollWidth - clientWidth - scrollLeft; - break; - } - } - } - scrollOffset = Math.max( - 0, - Math.min(scrollOffset, scrollWidth - clientWidth) - ); - states.value = { - ..._states, - isScrolling: true, - scrollDir: getScrollDir(_states.scrollOffset, scrollOffset), - scrollOffset, - updateRequested: false - }; - nextTick(resetIsScrolling); - }; - const onScroll = (e) => { - unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e); - emitEvents(); - }; - const onScrollbarScroll = (distanceToGo, totalSteps) => { - const offset3 = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo; - scrollTo2( - Math.min( - estimatedTotalSize.value - clientSize.value, - offset3 - ) - ); - }; - const scrollTo2 = (offset3) => { - offset3 = Math.max(offset3, 0); - if (offset3 === unref(states).scrollOffset) { - return; - } - states.value = { - ...unref(states), - scrollOffset: offset3, - scrollDir: getScrollDir(unref(states).scrollOffset, offset3), - updateRequested: true - }; - nextTick(resetIsScrolling); - }; - const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => { - const { scrollOffset } = unref(states); - idx = Math.max(0, Math.min(idx, props2.total - 1)); - scrollTo2( - getOffset3( - props2, - idx, - alignment, - scrollOffset, - unref(dynamicSizeCache) - ) - ); - }; - const getItemStyle = (idx) => { - const { direction: direction2, itemSize: itemSize3, layout: layout2 } = props2; - const itemStyleCache = getItemStyleCache.value( - clearCache && itemSize3, - clearCache && layout2, - clearCache && direction2 - ); - let style; - if (hasOwn(itemStyleCache, String(idx))) { - style = itemStyleCache[idx]; - } else { - const offset3 = getItemOffset(props2, idx, unref(dynamicSizeCache)); - const size3 = getItemSize(props2, idx, unref(dynamicSizeCache)); - const horizontal = unref(_isHorizontal); - const isRtl = direction2 === RTL; - const offsetHorizontal = horizontal ? offset3 : 0; - itemStyleCache[idx] = style = { - position: "absolute", - left: isRtl ? void 0 : `${offsetHorizontal}px`, - right: isRtl ? `${offsetHorizontal}px` : void 0, - top: !horizontal ? `${offset3}px` : 0, - height: !horizontal ? `${size3}px` : "100%", - width: horizontal ? `${size3}px` : "100%" - }; - } - return style; - }; - const resetIsScrolling = () => { - states.value.isScrolling = false; - nextTick(() => { - getItemStyleCache.value(-1, null, null); - }); - }; - const resetScrollTop = () => { - const window2 = windowRef.value; - if (window2) { - window2.scrollTop = 0; - } - }; - onMounted(() => { - if (!isClient) - return; - const { initScrollOffset: initScrollOffset2 } = props2; - const windowElement = unref(windowRef); - if (isNumber2(initScrollOffset2) && windowElement) { - if (unref(_isHorizontal)) { - windowElement.scrollLeft = initScrollOffset2; - } else { - windowElement.scrollTop = initScrollOffset2; - } - } - emitEvents(); - }); - onUpdated(() => { - const { direction: direction2, layout: layout2 } = props2; - const { scrollOffset, updateRequested } = unref(states); - const windowElement = unref(windowRef); - if (updateRequested && windowElement) { - if (layout2 === HORIZONTAL) { - if (direction2 === RTL) { - switch (getRTLOffsetType()) { - case RTL_OFFSET_NAG: { - windowElement.scrollLeft = -scrollOffset; - break; - } - case RTL_OFFSET_POS_ASC: { - windowElement.scrollLeft = scrollOffset; - break; - } - default: { - const { clientWidth, scrollWidth } = windowElement; - windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset; - break; - } - } - } else { - windowElement.scrollLeft = scrollOffset; - } - } else { - windowElement.scrollTop = scrollOffset; - } - } - }); - onActivated(() => { - unref(windowRef).scrollTop = unref(states).scrollOffset; - }); - const api = { - ns, - clientSize, - estimatedTotalSize, - windowStyle, - windowRef, - innerRef, - innerStyle, - itemsToRender, - scrollbarRef, - states, - getItemStyle, - onScroll, - onScrollbarScroll, - onWheel, - scrollTo: scrollTo2, - scrollToItem, - resetScrollTop - }; - expose({ - windowRef, - innerRef, - getItemStyleCache, - scrollTo: scrollTo2, - scrollToItem, - resetScrollTop, - states - }); - return api; - }, - render(ctx) { - var _a; - const { - $slots, - className, - clientSize, - containerElement, - data, - getItemStyle, - innerElement, - itemsToRender, - innerStyle, - layout: layout2, - total: total2, - onScroll, - onScrollbarScroll, - states, - useIsScrolling, - windowStyle, - ns - } = ctx; - const [start, end] = itemsToRender; - const Container2 = resolveDynamicComponent(containerElement); - const Inner = resolveDynamicComponent(innerElement); - const children = []; - if (total2 > 0) { - for (let i = start; i <= end; i++) { - children.push( - h( - Fragment, - { key: i }, - (_a = $slots.default) == null ? void 0 : _a.call($slots, { - data, - index: i, - isScrolling: useIsScrolling ? states.isScrolling : void 0, - style: getItemStyle(i) - }) - ) - ); - } - } - const InnerNode = [ - h( - Inner, - mergeProps(ctx.innerProps, { - style: innerStyle, - ref: "innerRef" - }), - !isString(Inner) ? { - default: () => children - } : children - ) - ]; - const scrollbar = h(ScrollBar, { - ref: "scrollbarRef", - clientSize, - layout: layout2, - onScroll: onScrollbarScroll, - ratio: clientSize * 100 / this.estimatedTotalSize, - scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize), - total: total2, - alwaysOn: states.scrollbarAlwaysOn - }); - const listContainer = h( - Container2, - { - class: [ns.e("window"), className], - style: windowStyle, - onScroll, - ref: "windowRef", - key: 0 - }, - !isString(Container2) ? { default: () => [InnerNode] } : [InnerNode] - ); - return h( - "div", - { - key: 0, - class: [ns.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""] - }, - [listContainer, scrollbar] - ); - } - }); -}; - -// node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-list.mjs -var FixedSizeList = createList({ - name: "ElFixedSizeList", - getItemOffset: ({ itemSize: itemSize3 }, index) => index * itemSize3, - getItemSize: ({ itemSize: itemSize3 }) => itemSize3, - getEstimatedTotalSize: ({ total: total2, itemSize: itemSize3 }) => itemSize3 * total2, - getOffset: ({ height, total: total2, itemSize: itemSize3, layout: layout2, width }, index, alignment, scrollOffset) => { - const size3 = isHorizontal(layout2) ? width : height; - if (isString(size3)) { - throwError( - "[ElVirtualList]", - ` - You should set - width/height - to number when your layout is - horizontal/vertical - ` - ); - } - const lastItemOffset = Math.max(0, total2 * itemSize3 - size3); - const maxOffset = Math.min(lastItemOffset, index * itemSize3); - const minOffset = Math.max(0, (index + 1) * itemSize3 - size3); - if (alignment === SMART_ALIGNMENT) { - if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) { - alignment = AUTO_ALIGNMENT; - } else { - alignment = CENTERED_ALIGNMENT; - } - } - switch (alignment) { - case START_ALIGNMENT: { - return maxOffset; - } - case END_ALIGNMENT: { - return minOffset; - } - case CENTERED_ALIGNMENT: { - const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2); - if (middleOffset < Math.ceil(size3 / 2)) { - return 0; - } else if (middleOffset > lastItemOffset + Math.floor(size3 / 2)) { - return lastItemOffset; - } else { - return middleOffset; - } - } - case AUTO_ALIGNMENT: - default: { - if (scrollOffset >= minOffset && scrollOffset <= maxOffset) { - return scrollOffset; - } else if (scrollOffset < minOffset) { - return minOffset; - } else { - return maxOffset; - } - } - } - }, - getStartIndexForOffset: ({ total: total2, itemSize: itemSize3 }, offset3) => Math.max(0, Math.min(total2 - 1, Math.floor(offset3 / itemSize3))), - getStopIndexForStartIndex: ({ height, total: total2, itemSize: itemSize3, layout: layout2, width }, startIndex, scrollOffset) => { - const offset3 = startIndex * itemSize3; - const size3 = isHorizontal(layout2) ? width : height; - const numVisibleItems = Math.ceil( - (size3 + scrollOffset - offset3) / itemSize3 - ); - return Math.max( - 0, - Math.min( - total2 - 1, - startIndex + numVisibleItems - 1 - ) - ); - }, - initCache() { - return void 0; - }, - clearCache: true, - validateProps() { - } -}); - -// node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-list.mjs -var SCOPE7 = "ElDynamicSizeList"; -var getItemFromCache = (props2, index, listCache) => { - const { itemSize: itemSize3 } = props2; - const { items, lastVisitedIndex } = listCache; - if (index > lastVisitedIndex) { - let offset3 = 0; - if (lastVisitedIndex >= 0) { - const item = items[lastVisitedIndex]; - offset3 = item.offset + item.size; - } - for (let i = lastVisitedIndex + 1; i <= index; i++) { - const size3 = itemSize3(i); - items[i] = { - offset: offset3, - size: size3 - }; - offset3 += size3; - } - listCache.lastVisitedIndex = index; - } - return items[index]; -}; -var findItem = (props2, listCache, offset3) => { - const { items, lastVisitedIndex } = listCache; - const lastVisitedOffset = lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0; - if (lastVisitedOffset >= offset3) { - return bs(props2, listCache, 0, lastVisitedIndex, offset3); - } - return es(props2, listCache, Math.max(0, lastVisitedIndex), offset3); -}; -var bs = (props2, listCache, low, high, offset3) => { - while (low <= high) { - const mid = low + Math.floor((high - low) / 2); - const currentOffset = getItemFromCache(props2, mid, listCache).offset; - if (currentOffset === offset3) { - return mid; - } else if (currentOffset < offset3) { - low = mid + 1; - } else if (currentOffset > offset3) { - high = mid - 1; - } - } - return Math.max(0, low - 1); -}; -var es = (props2, listCache, index, offset3) => { - const { total: total2 } = props2; - let exponent = 1; - while (index < total2 && getItemFromCache(props2, index, listCache).offset < offset3) { - index += exponent; - exponent *= 2; - } - return bs( - props2, - listCache, - Math.floor(index / 2), - Math.min(index, total2 - 1), - offset3 - ); -}; -var getEstimatedTotalSize = ({ total: total2 }, { items, estimatedItemSize: estimatedItemSize2, lastVisitedIndex }) => { - let totalSizeOfMeasuredItems = 0; - if (lastVisitedIndex >= total2) { - lastVisitedIndex = total2 - 1; - } - if (lastVisitedIndex >= 0) { - const item = items[lastVisitedIndex]; - totalSizeOfMeasuredItems = item.offset + item.size; - } - const numUnmeasuredItems = total2 - lastVisitedIndex - 1; - const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize2; - return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems; -}; -var DynamicSizeList = createList({ - name: "ElDynamicSizeList", - getItemOffset: (props2, index, listCache) => getItemFromCache(props2, index, listCache).offset, - getItemSize: (_2, index, { items }) => items[index].size, - getEstimatedTotalSize, - getOffset: (props2, index, alignment, scrollOffset, listCache) => { - const { height, layout: layout2, width } = props2; - const size3 = isHorizontal(layout2) ? width : height; - const item = getItemFromCache(props2, index, listCache); - const estimatedTotalSize = getEstimatedTotalSize(props2, listCache); - const maxOffset = Math.max( - 0, - Math.min(estimatedTotalSize - size3, item.offset) - ); - const minOffset = Math.max(0, item.offset - size3 + item.size); - if (alignment === SMART_ALIGNMENT) { - if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) { - alignment = AUTO_ALIGNMENT; - } else { - alignment = CENTERED_ALIGNMENT; - } - } - switch (alignment) { - case START_ALIGNMENT: { - return maxOffset; - } - case END_ALIGNMENT: { - return minOffset; - } - case CENTERED_ALIGNMENT: { - return Math.round(minOffset + (maxOffset - minOffset) / 2); - } - case AUTO_ALIGNMENT: - default: { - if (scrollOffset >= minOffset && scrollOffset <= maxOffset) { - return scrollOffset; - } else if (scrollOffset < minOffset) { - return minOffset; - } else { - return maxOffset; - } - } - } - }, - getStartIndexForOffset: (props2, offset3, listCache) => findItem(props2, listCache, offset3), - getStopIndexForStartIndex: (props2, startIndex, scrollOffset, listCache) => { - const { height, total: total2, layout: layout2, width } = props2; - const size3 = isHorizontal(layout2) ? width : height; - const item = getItemFromCache(props2, startIndex, listCache); - const maxOffset = scrollOffset + size3; - let offset3 = item.offset + item.size; - let stopIndex = startIndex; - while (stopIndex < total2 - 1 && offset3 < maxOffset) { - stopIndex++; - offset3 += getItemFromCache(props2, stopIndex, listCache).size; - } - return stopIndex; - }, - initCache({ estimatedItemSize: estimatedItemSize2 = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) { - const cache2 = { - items: {}, - estimatedItemSize: estimatedItemSize2, - lastVisitedIndex: -1 - }; - cache2.clearCacheAfterIndex = (index, forceUpdate = true) => { - var _a, _b; - cache2.lastVisitedIndex = Math.min(cache2.lastVisitedIndex, index - 1); - (_a = instance.exposed) == null ? void 0 : _a.getItemStyleCache(-1); - if (forceUpdate) { - (_b = instance.proxy) == null ? void 0 : _b.$forceUpdate(); - } - }; - return cache2; - }, - clearCache: false, - validateProps: ({ itemSize: itemSize3 }) => { - if (true) { - if (typeof itemSize3 !== "function") { - throwError( - SCOPE7, - ` - itemSize is required as function, but the given value was ${typeof itemSize3} - ` - ); - } - } - } -}); - -// node_modules/element-plus/es/components/select-v2/src/select-dropdown.mjs -var props = { - loading: Boolean, - data: { - type: Array, - required: true - }, - hoveringIndex: Number, - width: Number, - id: String, - ariaLabel: String -}; -var ElSelectMenu2 = defineComponent({ - name: "ElSelectDropdown", - props, - setup(props2, { - slots, - expose - }) { - const select = inject(selectV2InjectionKey); - const ns = useNamespace("select"); - const { - getLabel, - getValue: getValue3, - getDisabled - } = useProps(select.props); - const cachedHeights = ref([]); - const listRef = ref(); - const size3 = computed(() => props2.data.length); - watch(() => size3.value, () => { - var _a, _b; - (_b = (_a = select.tooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - }); - const isSized = computed(() => isUndefined2(select.props.estimatedOptionHeight)); - const listProps = computed(() => { - if (isSized.value) { - return { - itemSize: select.props.itemHeight - }; - } - return { - estimatedSize: select.props.estimatedOptionHeight, - itemSize: (idx) => cachedHeights.value[idx] - }; - }); - const contains = (arr = [], target2) => { - const { - props: { - valueKey - } - } = select; - if (!isObject(target2)) { - return arr.includes(target2); - } - return arr && arr.some((item) => { - return toRaw(get_default(item, valueKey)) === get_default(target2, valueKey); - }); - }; - const isEqual3 = (selected, target2) => { - if (!isObject(target2)) { - return selected === target2; - } else { - const { - valueKey - } = select.props; - return get_default(selected, valueKey) === get_default(target2, valueKey); - } - }; - const isItemSelected = (modelValue, target2) => { - if (select.props.multiple) { - return contains(modelValue, getValue3(target2)); - } - return isEqual3(modelValue, getValue3(target2)); - }; - const isItemDisabled = (modelValue, selected) => { - const { - disabled, - multiple, - multipleLimit - } = select.props; - return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false); - }; - const isItemHovering = (target2) => props2.hoveringIndex === target2; - const scrollToItem = (index) => { - const list = listRef.value; - if (list) { - list.scrollToItem(index); - } - }; - const resetScrollTop = () => { - const list = listRef.value; - if (list) { - list.resetScrollTop(); - } - }; - const exposed = { - listRef, - isSized, - isItemDisabled, - isItemHovering, - isItemSelected, - scrollToItem, - resetScrollTop - }; - expose(exposed); - const Item = (itemProps) => { - const { - index, - data, - style - } = itemProps; - const sized = unref(isSized); - const { - itemSize: itemSize3, - estimatedSize - } = unref(listProps); - const { - modelValue - } = select.props; - const { - onSelect, - onHover - } = select; - const item = data[index]; - if (item.type === "Group") { - return createVNode(GroupItem, { - "item": item, - "style": style, - "height": sized ? itemSize3 : estimatedSize - }, null); - } - const isSelected = isItemSelected(modelValue, item); - const isDisabled = isItemDisabled(modelValue, isSelected); - const isHovering = isItemHovering(index); - return createVNode(OptionItem, mergeProps(itemProps, { - "selected": isSelected, - "disabled": getDisabled(item) || isDisabled, - "created": !!item.created, - "hovering": isHovering, - "item": item, - "onSelect": onSelect, - "onHover": onHover - }), { - default: (props3) => { - var _a; - return ((_a = slots.default) == null ? void 0 : _a.call(slots, props3)) || createVNode("span", null, [getLabel(item)]); - } - }); - }; - const { - onKeyboardNavigate, - onKeyboardSelect - } = select; - const onForward = () => { - onKeyboardNavigate("forward"); - }; - const onBackward = () => { - onKeyboardNavigate("backward"); - }; - const onKeydown = (e) => { - const code = getEventCode(e); - const { - tab, - esc, - down, - up, - enter, - numpadEnter - } = EVENT_CODE; - if ([esc, down, up, enter, numpadEnter].includes(code)) { - e.preventDefault(); - e.stopPropagation(); - } - switch (code) { - case tab: - case esc: - break; - case down: - onForward(); - break; - case up: - onBackward(); - break; - case enter: - case numpadEnter: - onKeyboardSelect(); - break; - } - }; - return () => { - var _a, _b, _c, _d; - const { - data, - width - } = props2; - const { - height, - multiple, - scrollbarAlwaysOn - } = select.props; - const isScrollbarAlwaysOn = computed(() => { - return isIOS ? true : scrollbarAlwaysOn; - }); - const List = unref(isSized) ? FixedSizeList : DynamicSizeList; - return createVNode("div", { - "class": [ns.b("dropdown"), ns.is("multiple", multiple)], - "style": { - width: `${width}px` - } - }, [(_a = slots.header) == null ? void 0 : _a.call(slots), ((_b = slots.loading) == null ? void 0 : _b.call(slots)) || ((_c = slots.empty) == null ? void 0 : _c.call(slots)) || createVNode(List, mergeProps({ - "ref": listRef - }, unref(listProps), { - "className": ns.be("dropdown", "list"), - "scrollbarAlwaysOn": isScrollbarAlwaysOn.value, - "data": data, - "height": height, - "width": width, - "total": data.length, - "innerElement": "ul", - "innerProps": { - id: props2.id, - role: "listbox", - "aria-label": props2.ariaLabel, - "aria-orientation": "vertical" - }, - "onKeydown": onKeydown - }), { - default: (props3) => createVNode(Item, props3, null) - }), (_d = slots.footer) == null ? void 0 : _d.call(slots)]); - }; - } -}); - -// node_modules/element-plus/es/components/select-v2/src/useAllowCreate.mjs -function useAllowCreate(props2, states) { - const { aliasProps, getLabel, getValue: getValue3 } = useProps(props2); - const createOptionCount = ref(0); - const cachedSelectedOption = ref(); - const enableAllowCreateMode = computed(() => { - return props2.allowCreate && props2.filterable; - }); - watch( - () => props2.options, - (options) => { - const optionLabelsSet = new Set(options.map((option) => getLabel(option))); - states.createdOptions = states.createdOptions.filter( - (createdOption) => !optionLabelsSet.has(getLabel(createdOption)) - ); - } - ); - function hasExistingOption(query) { - const hasOption = (option) => getLabel(option) === query; - return props2.options && props2.options.some(hasOption) || states.createdOptions.some(hasOption); - } - function selectNewOption(option) { - if (!enableAllowCreateMode.value) { - return; - } - if (props2.multiple && option.created) { - createOptionCount.value++; - } else { - cachedSelectedOption.value = option; - } - } - function createNewOption(query) { - if (enableAllowCreateMode.value) { - if (query && query.length > 0) { - if (hasExistingOption(query)) { - states.createdOptions = states.createdOptions.filter( - (createdOption) => getLabel(createdOption) !== states.previousQuery - ); - return; - } - const newOption = { - [aliasProps.value.value]: query, - [aliasProps.value.label]: query, - created: true, - [aliasProps.value.disabled]: false - }; - if (states.createdOptions.length >= createOptionCount.value) { - states.createdOptions[createOptionCount.value] = newOption; - } else { - states.createdOptions.push(newOption); - } - } else { - if (props2.multiple) { - states.createdOptions.length = createOptionCount.value; - } else { - const selectedOption = cachedSelectedOption.value; - states.createdOptions.length = 0; - if (selectedOption && selectedOption.created) { - states.createdOptions.push(selectedOption); - } - } - } - } - } - function removeNewOption(option) { - if (!enableAllowCreateMode.value || !option || !option.created || option.created && props2.reserveKeyword && states.inputValue === getLabel(option)) { - return; - } - const idx = states.createdOptions.findIndex( - (it2) => getValue3(it2) === getValue3(option) - ); - if (~idx) { - states.createdOptions.splice(idx, 1); - createOptionCount.value--; - } - } - function clearAllNewOption() { - if (enableAllowCreateMode.value) { - states.createdOptions.length = 0; - createOptionCount.value = 0; - } - } - return { - createNewOption, - removeNewOption, - selectNewOption, - clearAllNewOption - }; -} - -// node_modules/element-plus/es/components/select-v2/src/useSelect.mjs -var useSelect2 = (props2, emit) => { - const { t } = useLocale(); - const slots = useSlots(); - const nsSelect = useNamespace("select"); - const nsInput = useNamespace("input"); - const { form: elForm, formItem: elFormItem } = useFormItem(); - const { inputId } = useFormItemInputId(props2, { - formItemContext: elFormItem - }); - const { aliasProps, getLabel, getValue: getValue3, getDisabled, getOptions } = useProps(props2); - const { valueOnClear, isEmptyValue: isEmptyValue2 } = useEmptyValues(props2); - const states = reactive({ - inputValue: "", - cachedOptions: [], - createdOptions: [], - hoveringIndex: -1, - inputHovering: false, - selectionWidth: 0, - collapseItemWidth: 0, - previousQuery: null, - previousValue: void 0, - selectedLabel: "", - menuVisibleOnFocus: false, - isBeforeHide: false - }); - const popperSize = ref(-1); - const debouncing = ref(false); - const selectRef = ref(); - const selectionRef = ref(); - const tooltipRef = ref(); - const tagTooltipRef = ref(); - const inputRef = ref(); - const prefixRef = ref(); - const suffixRef = ref(); - const menuRef = ref(); - const tagMenuRef = ref(); - const collapseItemRef = ref(); - const { - isComposing, - handleCompositionStart, - handleCompositionEnd, - handleCompositionUpdate - } = useComposition({ - afterComposition: (e) => onInput(e) - }); - const selectDisabled = useFormDisabled(); - const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, { - disabled: selectDisabled, - afterFocus() { - if (props2.automaticDropdown && !expanded.value) { - expanded.value = true; - states.menuVisibleOnFocus = true; - } - }, - beforeBlur(event) { - var _a, _b; - return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event)); - }, - afterBlur() { - var _a; - expanded.value = false; - states.menuVisibleOnFocus = false; - if (props2.validateEvent) { - (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "blur").catch((err) => debugWarn(err)); - } - } - }); - const allOptions = computed(() => filterOptions("")); - const hasOptions = computed(() => { - if (props2.loading) - return false; - return props2.options.length > 0 || states.createdOptions.length > 0; - }); - const filteredOptions = ref([]); - const expanded = ref(false); - const needStatusIcon = computed(() => { - var _a; - return (_a = elForm == null ? void 0 : elForm.statusIcon) != null ? _a : false; - }); - const popupHeight = computed(() => { - const totalHeight = filteredOptions.value.length * props2.itemHeight; - return totalHeight > props2.height ? props2.height : totalHeight; - }); - const hasModelValue = computed(() => { - return props2.multiple ? isArray(props2.modelValue) && props2.modelValue.length > 0 : !isEmptyValue2(props2.modelValue); - }); - const showClearBtn = computed(() => { - return props2.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering); - }); - const iconComponent = computed( - () => props2.remote && props2.filterable && !props2.remoteShowSuffix ? "" : props2.suffixIcon - ); - const iconReverse = computed( - () => iconComponent.value && nsSelect.is("reverse", expanded.value) - ); - const validateState = computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || ""); - const validateIcon = computed(() => { - if (!validateState.value) - return; - return ValidateComponentsMap[validateState.value]; - }); - const debounce2 = computed(() => props2.remote ? props2.debounce : 0); - const isRemoteSearchEmpty = computed( - () => props2.remote && !states.inputValue && !hasOptions.value - ); - const emptyText = computed(() => { - if (props2.loading) { - return props2.loadingText || t("el.select.loading"); - } else { - if (props2.filterable && states.inputValue && hasOptions.value && filteredOptions.value.length === 0) { - return props2.noMatchText || t("el.select.noMatch"); - } - if (!hasOptions.value) { - return props2.noDataText || t("el.select.noData"); - } - } - return null; - }); - const isFilterMethodValid = computed( - () => props2.filterable && isFunction(props2.filterMethod) - ); - const isRemoteMethodValid = computed( - () => props2.filterable && props2.remote && isFunction(props2.remoteMethod) - ); - const filterOptions = (query) => { - const regexp4 = new RegExp(escapeStringRegexp(query), "i"); - const isValidOption = (o2) => { - if (isFilterMethodValid.value || isRemoteMethodValid.value) - return true; - return query ? regexp4.test(getLabel(o2) || "") : true; - }; - if (props2.loading) { - return []; - } - return [...states.createdOptions, ...props2.options].reduce((all, item) => { - const options = getOptions(item); - if (isArray(options)) { - const filtered = options.filter(isValidOption); - if (filtered.length > 0) { - all.push( - { - label: getLabel(item), - type: "Group" - }, - ...filtered - ); - } - } else if (props2.remote || isValidOption(item)) { - all.push(item); - } - return all; - }, []); - }; - const updateOptions2 = () => { - filteredOptions.value = filterOptions(states.inputValue); - }; - const allOptionsValueMap = computed(() => { - const valueMap = /* @__PURE__ */ new Map(); - allOptions.value.forEach((option, index) => { - valueMap.set(getValueKey(getValue3(option)), { option, index }); - }); - return valueMap; - }); - const filteredOptionsValueMap = computed(() => { - const valueMap = /* @__PURE__ */ new Map(); - filteredOptions.value.forEach((option, index) => { - valueMap.set(getValueKey(getValue3(option)), { option, index }); - }); - return valueMap; - }); - const optionsAllDisabled = computed( - () => filteredOptions.value.every((option) => getDisabled(option)) - ); - const selectSize = useFormSize(); - const collapseTagSize = computed( - () => "small" === selectSize.value ? "small" : "default" - ); - const calculatePopperSize = () => { - var _a; - if (isNumber2(props2.fitInputWidth)) { - popperSize.value = props2.fitInputWidth; - return; - } - const width = ((_a = selectRef.value) == null ? void 0 : _a.offsetWidth) || 200; - if (!props2.fitInputWidth && hasOptions.value) { - nextTick(() => { - popperSize.value = Math.max(width, calculateLabelMaxWidth()); - }); - } else { - popperSize.value = width; - } - }; - const calculateLabelMaxWidth = () => { - var _a, _b; - const canvas = document.createElement("canvas"); - const ctx = canvas.getContext("2d"); - const selector = nsSelect.be("dropdown", "item"); - const dom = ((_b = (_a = menuRef.value) == null ? void 0 : _a.listRef) == null ? void 0 : _b.innerRef) || document; - const dropdownItemEl = dom.querySelector(`.${selector}`); - if (dropdownItemEl === null || ctx === null) - return 0; - const style = getComputedStyle(dropdownItemEl); - const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight); - ctx.font = `bold ${style.font.replace( - new RegExp(`\\b${style.fontWeight}\\b`), - "" - )}`; - const maxWidth = filteredOptions.value.reduce((max4, option) => { - const metrics = ctx.measureText(getLabel(option)); - return Math.max(metrics.width, max4); - }, 0); - return maxWidth + padding; - }; - const getGapWidth = () => { - if (!selectionRef.value) - return 0; - const style = window.getComputedStyle(selectionRef.value); - return Number.parseFloat(style.gap || "6px"); - }; - const tagStyle = computed(() => { - const gapWidth = getGapWidth(); - const inputSlotWidth = props2.filterable ? gapWidth + MINIMUM_INPUT_WIDTH : 0; - const maxWidth = collapseItemRef.value && props2.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth; - return { maxWidth: `${maxWidth}px` }; - }); - const collapseTagStyle = computed(() => { - return { maxWidth: `${states.selectionWidth}px` }; - }); - const shouldShowPlaceholder = computed(() => { - if (isArray(props2.modelValue)) { - return props2.modelValue.length === 0 && !states.inputValue; - } - return props2.filterable ? !states.inputValue : true; - }); - const currentPlaceholder = computed(() => { - var _a; - const _placeholder = (_a = props2.placeholder) != null ? _a : t("el.select.placeholder"); - return props2.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel; - }); - const popperRef = computed(() => { - var _a, _b; - return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef; - }); - const indexRef = computed(() => { - if (props2.multiple) { - const len = props2.modelValue.length; - if (len > 0 && filteredOptionsValueMap.value.has(props2.modelValue[len - 1])) { - const { index } = filteredOptionsValueMap.value.get( - props2.modelValue[len - 1] - ); - return index; - } - } else { - if (!isEmptyValue2(props2.modelValue) && filteredOptionsValueMap.value.has(props2.modelValue)) { - const { index } = filteredOptionsValueMap.value.get(props2.modelValue); - return index; - } - } - return -1; - }); - const dropdownMenuVisible = computed({ - get() { - return expanded.value && (props2.loading || !isRemoteSearchEmpty.value || props2.remote && !!slots.empty) && (!debouncing.value || !isEmpty2(states.previousQuery)); - }, - set(val) { - expanded.value = val; - } - }); - const showTagList = computed(() => { - if (!props2.multiple) { - return []; - } - return props2.collapseTags ? states.cachedOptions.slice(0, props2.maxCollapseTags) : states.cachedOptions; - }); - const collapseTagList = computed(() => { - if (!props2.multiple) { - return []; - } - return props2.collapseTags ? states.cachedOptions.slice(props2.maxCollapseTags) : []; - }); - const { - createNewOption, - removeNewOption, - selectNewOption, - clearAllNewOption - } = useAllowCreate(props2, states); - const toggleMenu = (event) => { - var _a; - if (selectDisabled.value || props2.filterable && expanded.value && event && !((_a = suffixRef.value) == null ? void 0 : _a.contains(event.target))) - return; - if (states.menuVisibleOnFocus) { - states.menuVisibleOnFocus = false; - } else { - expanded.value = !expanded.value; - } - }; - const onInputChange = () => { - if (states.inputValue.length > 0 && !expanded.value) { - expanded.value = true; - } - createNewOption(states.inputValue); - nextTick(() => { - handleQueryChange(states.inputValue); - }); - }; - const debouncedOnInputChange = useDebounceFn(() => { - onInputChange(); - debouncing.value = false; - }, debounce2); - const handleQueryChange = (val) => { - if (states.previousQuery === val || isComposing.value) { - return; - } - states.previousQuery = val; - if (props2.filterable && isFunction(props2.filterMethod)) { - props2.filterMethod(val); - } else if (props2.filterable && props2.remote && isFunction(props2.remoteMethod)) { - props2.remoteMethod(val); - } - if (props2.defaultFirstOption && (props2.filterable || props2.remote) && filteredOptions.value.length) { - nextTick(checkDefaultFirstOption); - } else { - nextTick(updateHoveringIndex); - } - }; - const checkDefaultFirstOption = () => { - const optionsInDropdown = filteredOptions.value.filter( - (n) => !n.disabled && n.type !== "Group" - ); - const userCreatedOption = optionsInDropdown.find((n) => n.created); - const firstOriginOption = optionsInDropdown[0]; - states.hoveringIndex = getValueIndex( - filteredOptions.value, - userCreatedOption || firstOriginOption - ); - }; - const emitChange = (val) => { - if (!isEqual_default(props2.modelValue, val)) { - emit(CHANGE_EVENT, val); - } - }; - const update2 = (val) => { - emit(UPDATE_MODEL_EVENT, val); - emitChange(val); - states.previousValue = props2.multiple ? String(val) : val; - nextTick(() => { - if (props2.multiple && isArray(props2.modelValue)) { - const cachedOptions = states.cachedOptions.slice(); - const selectedOptions = props2.modelValue.map( - (value) => getOption(value, cachedOptions) - ); - if (!isEqual_default(states.cachedOptions, selectedOptions)) { - states.cachedOptions = selectedOptions; - } - } else { - initStates(true); - } - }); - }; - const getValueIndex = (arr = [], value) => { - if (!isObject(value)) { - return arr.indexOf(value); - } - const valueKey = props2.valueKey; - let index = -1; - arr.some((item, i) => { - if (get_default(item, valueKey) === get_default(value, valueKey)) { - index = i; - return true; - } - return false; - }); - return index; - }; - const getValueKey = (item) => { - return isObject(item) ? get_default(item, props2.valueKey) : item; - }; - const handleResize = () => { - calculatePopperSize(); - }; - const resetSelectionWidth = () => { - states.selectionWidth = Number.parseFloat( - window.getComputedStyle(selectionRef.value).width - ); - }; - const resetCollapseItemWidth = () => { - states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width; - }; - const updateTooltip = () => { - var _a, _b; - (_b = (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - }; - const updateTagTooltip = () => { - var _a, _b; - (_b = (_a = tagTooltipRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a); - }; - const onSelect = (option) => { - const optionValue = getValue3(option); - if (props2.multiple) { - let selectedOptions = props2.modelValue.slice(); - const index = getValueIndex(selectedOptions, optionValue); - if (index > -1) { - selectedOptions = [ - ...selectedOptions.slice(0, index), - ...selectedOptions.slice(index + 1) - ]; - states.cachedOptions.splice(index, 1); - removeNewOption(option); - } else if (props2.multipleLimit <= 0 || selectedOptions.length < props2.multipleLimit) { - selectedOptions = [...selectedOptions, optionValue]; - states.cachedOptions.push(option); - selectNewOption(option); - } - update2(selectedOptions); - if (option.created) { - handleQueryChange(""); - } - if (props2.filterable && !props2.reserveKeyword) { - states.inputValue = ""; - } - } else { - states.selectedLabel = getLabel(option); - !isEqual_default(props2.modelValue, optionValue) && update2(optionValue); - expanded.value = false; - selectNewOption(option); - if (!option.created) { - clearAllNewOption(); - } - } - focus(); - }; - const deleteTag = (event, option) => { - let selectedOptions = props2.modelValue.slice(); - const index = getValueIndex(selectedOptions, getValue3(option)); - if (index > -1 && !selectDisabled.value) { - selectedOptions = [ - ...props2.modelValue.slice(0, index), - ...props2.modelValue.slice(index + 1) - ]; - states.cachedOptions.splice(index, 1); - update2(selectedOptions); - emit("remove-tag", getValue3(option)); - removeNewOption(option); - } - event.stopPropagation(); - focus(); - }; - const focus = () => { - var _a; - (_a = inputRef.value) == null ? void 0 : _a.focus(); - }; - const blur = () => { - var _a; - if (expanded.value) { - expanded.value = false; - nextTick(() => { - var _a2; - return (_a2 = inputRef.value) == null ? void 0 : _a2.blur(); - }); - return; - } - (_a = inputRef.value) == null ? void 0 : _a.blur(); - }; - const handleEsc = () => { - if (states.inputValue.length > 0) { - states.inputValue = ""; - } else { - expanded.value = false; - } - }; - const getLastNotDisabledIndex = (value) => findLastIndex_default( - value, - (it2) => !states.cachedOptions.some( - (option) => getValue3(option) === it2 && getDisabled(option) - ) - ); - const handleDel = (e) => { - const code = getEventCode(e); - if (!props2.multiple) - return; - if (code === EVENT_CODE.delete) - return; - if (states.inputValue.length === 0) { - e.preventDefault(); - const selected = props2.modelValue.slice(); - const lastNotDisabledIndex = getLastNotDisabledIndex(selected); - if (lastNotDisabledIndex < 0) - return; - const removeTagValue = selected[lastNotDisabledIndex]; - selected.splice(lastNotDisabledIndex, 1); - const option = states.cachedOptions[lastNotDisabledIndex]; - states.cachedOptions.splice(lastNotDisabledIndex, 1); - removeNewOption(option); - update2(selected); - emit("remove-tag", removeTagValue); - } - }; - const handleClear = () => { - let emptyValue; - if (isArray(props2.modelValue)) { - emptyValue = []; - } else { - emptyValue = valueOnClear.value; - } - states.selectedLabel = ""; - expanded.value = false; - update2(emptyValue); - emit("clear"); - clearAllNewOption(); - focus(); - }; - const onKeyboardNavigate = (direction2, hoveringIndex = void 0) => { - const options = filteredOptions.value; - if (!["forward", "backward"].includes(direction2) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value || isComposing.value) { - return; - } - if (!expanded.value) { - return toggleMenu(); - } - if (isUndefined2(hoveringIndex)) { - hoveringIndex = states.hoveringIndex; - } - let newIndex = -1; - if (direction2 === "forward") { - newIndex = hoveringIndex + 1; - if (newIndex >= options.length) { - newIndex = 0; - } - } else if (direction2 === "backward") { - newIndex = hoveringIndex - 1; - if (newIndex < 0 || newIndex >= options.length) { - newIndex = options.length - 1; - } - } - const option = options[newIndex]; - if (getDisabled(option) || option.type === "Group") { - return onKeyboardNavigate(direction2, newIndex); - } else { - states.hoveringIndex = newIndex; - scrollToItem(newIndex); - } - }; - const onKeyboardSelect = () => { - if (!expanded.value) { - return toggleMenu(); - } else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) { - onSelect(filteredOptions.value[states.hoveringIndex]); - } - }; - const onHoverOption = (idx) => { - states.hoveringIndex = idx != null ? idx : -1; - }; - const updateHoveringIndex = () => { - if (!props2.multiple) { - states.hoveringIndex = filteredOptions.value.findIndex((item) => { - return getValueKey(getValue3(item)) === getValueKey(props2.modelValue); - }); - } else { - const length = props2.modelValue.length; - if (length > 0) { - const lastValue = props2.modelValue[length - 1]; - states.hoveringIndex = filteredOptions.value.findIndex( - (item) => getValueKey(lastValue) === getValueKey(getValue3(item)) - ); - } else { - states.hoveringIndex = -1; - } - } - }; - const onInput = (event) => { - states.inputValue = event.target.value; - if (props2.remote) { - debouncing.value = true; - debouncedOnInputChange(); - } else { - return onInputChange(); - } - }; - const handleClickOutside = (event) => { - expanded.value = false; - if (isFocused.value) { - const _event2 = new FocusEvent("blur", event); - handleBlur(_event2); - } - }; - const handleMenuEnter = () => { - states.isBeforeHide = false; - return nextTick(() => { - if (~indexRef.value) { - scrollToItem(indexRef.value); - } - }); - }; - const scrollToItem = (index) => { - menuRef.value.scrollToItem(index); - }; - const getOption = (value, cachedOptions) => { - const selectValue = getValueKey(value); - if (allOptionsValueMap.value.has(selectValue)) { - const { option } = allOptionsValueMap.value.get(selectValue); - return option; - } - if (cachedOptions && cachedOptions.length) { - const option = cachedOptions.find( - (option2) => getValueKey(getValue3(option2)) === selectValue - ); - if (option) { - return option; - } - } - return { - [aliasProps.value.value]: value, - [aliasProps.value.label]: value - }; - }; - const getIndex = (option) => { - var _a, _b; - return (_b = (_a = allOptionsValueMap.value.get(getValue3(option))) == null ? void 0 : _a.index) != null ? _b : -1; - }; - const initStates = (needUpdateSelectedLabel = false) => { - if (props2.multiple) { - if (props2.modelValue.length > 0) { - const cachedOptions = states.cachedOptions.slice(); - states.cachedOptions.length = 0; - states.previousValue = props2.modelValue.toString(); - for (const value of props2.modelValue) { - const option = getOption(value, cachedOptions); - states.cachedOptions.push(option); - } - } else { - states.cachedOptions = []; - states.previousValue = void 0; - } - } else { - if (hasModelValue.value) { - states.previousValue = props2.modelValue; - const options = filteredOptions.value; - const selectedItemIndex = options.findIndex( - (option) => getValueKey(getValue3(option)) === getValueKey(props2.modelValue) - ); - if (~selectedItemIndex) { - states.selectedLabel = getLabel(options[selectedItemIndex]); - } else { - if (!states.selectedLabel || needUpdateSelectedLabel) { - states.selectedLabel = getValueKey(props2.modelValue); - } - } - } else { - states.selectedLabel = ""; - states.previousValue = void 0; - } - } - clearAllNewOption(); - calculatePopperSize(); - }; - watch( - () => props2.fitInputWidth, - () => { - calculatePopperSize(); - } - ); - watch(expanded, (val) => { - if (val) { - if (!props2.persistent) { - calculatePopperSize(); - } - handleQueryChange(""); - } else { - states.inputValue = ""; - states.previousQuery = null; - states.isBeforeHide = true; - createNewOption(""); - } - }); - watch( - () => props2.modelValue, - (val, oldVal) => { - var _a; - const isValEmpty = !val || isArray(val) && val.length === 0; - if (isValEmpty || props2.multiple && !isEqual_default(val.toString(), states.previousValue) || !props2.multiple && getValueKey(val) !== getValueKey(states.previousValue)) { - initStates(true); - } - if (!isEqual_default(val, oldVal) && props2.validateEvent) { - (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn(err)); - } - }, - { - deep: true - } - ); - watch( - () => props2.options, - () => { - const input = inputRef.value; - if (!input || input && document.activeElement !== input) { - initStates(); - } - }, - { - deep: true, - flush: "post" - } - ); - watch( - () => filteredOptions.value, - () => { - calculatePopperSize(); - return menuRef.value && nextTick(menuRef.value.resetScrollTop); - } - ); - watchEffect(() => { - if (states.isBeforeHide) - return; - updateOptions2(); - }); - watchEffect(() => { - const { valueKey, options } = props2; - const duplicateValue = /* @__PURE__ */ new Map(); - for (const item of options) { - const optionValue = getValue3(item); - let v2 = optionValue; - if (isObject(v2)) { - v2 = get_default(optionValue, valueKey); - } - if (duplicateValue.get(v2)) { - debugWarn( - "ElSelectV2", - `The option values you provided seem to be duplicated, which may cause some problems, please check.` - ); - break; - } else { - duplicateValue.set(v2, true); - } - } - }); - onMounted(() => { - initStates(); - }); - useResizeObserver(selectRef, handleResize); - useResizeObserver(selectionRef, resetSelectionWidth); - useResizeObserver(wrapperRef, updateTooltip); - useResizeObserver(tagMenuRef, updateTagTooltip); - useResizeObserver(collapseItemRef, resetCollapseItemWidth); - let stop; - watch( - () => dropdownMenuVisible.value, - (newVal) => { - if (newVal) { - stop = useResizeObserver(menuRef, updateTooltip).stop; - } else { - stop == null ? void 0 : stop(); - stop = void 0; - } - emit("visible-change", newVal); - } - ); - return { - inputId, - collapseTagSize, - currentPlaceholder, - expanded, - emptyText, - popupHeight, - debounce: debounce2, - allOptions, - allOptionsValueMap, - filteredOptions, - iconComponent, - iconReverse, - tagStyle, - collapseTagStyle, - popperSize, - dropdownMenuVisible, - hasModelValue, - shouldShowPlaceholder, - selectDisabled, - selectSize, - needStatusIcon, - showClearBtn, - states, - isFocused, - nsSelect, - nsInput, - inputRef, - menuRef, - tagMenuRef, - tooltipRef, - tagTooltipRef, - selectRef, - wrapperRef, - selectionRef, - prefixRef, - suffixRef, - collapseItemRef, - popperRef, - validateState, - validateIcon, - showTagList, - collapseTagList, - debouncedOnInputChange, - deleteTag, - getLabel, - getValue: getValue3, - getDisabled, - getValueKey, - getIndex, - handleClear, - handleClickOutside, - handleDel, - handleEsc, - focus, - blur, - handleMenuEnter, - handleResize, - resetSelectionWidth, - updateTooltip, - updateTagTooltip, - updateOptions: updateOptions2, - toggleMenu, - scrollTo: scrollToItem, - onInput, - onKeyboardNavigate, - onKeyboardSelect, - onSelect, - onHover: onHoverOption, - handleCompositionStart, - handleCompositionEnd, - handleCompositionUpdate - }; -}; - -// node_modules/element-plus/es/components/select-v2/src/select.mjs -var _sfc_main116 = defineComponent({ - name: "ElSelectV2", - components: { - ElSelectMenu: ElSelectMenu2, - ElTag, - ElTooltip, - ElIcon - }, - directives: { ClickOutside }, - props: selectV2Props, - emits: selectV2Emits, - setup(props2, { emit }) { - const modelValue = computed(() => { - const { modelValue: rawModelValue, multiple } = props2; - const fallback = multiple ? [] : void 0; - if (isArray(rawModelValue)) { - return multiple ? rawModelValue : fallback; - } - return multiple ? fallback : rawModelValue; - }); - const API = useSelect2( - reactive({ - ...toRefs(props2), - modelValue - }), - emit - ); - const { calculatorRef, inputStyle } = useCalcInputWidth(); - const contentId = useId(); - provide(selectV2InjectionKey, { - props: reactive({ - ...toRefs(props2), - height: API.popupHeight, - modelValue - }), - expanded: API.expanded, - tooltipRef: API.tooltipRef, - contentId, - onSelect: API.onSelect, - onHover: API.onHover, - onKeyboardNavigate: API.onKeyboardNavigate, - onKeyboardSelect: API.onKeyboardSelect - }); - const selectedLabel = computed(() => { - if (!props2.multiple) { - return API.states.selectedLabel; - } - return API.states.cachedOptions.map((i) => API.getLabel(i)); - }); - return { - ...API, - modelValue, - selectedLabel, - calculatorRef, - inputStyle, - contentId, - BORDER_HORIZONTAL_WIDTH - }; - } -}); -var _hoisted_161 = ["id", "autocomplete", "tabindex", "aria-expanded", "aria-label", "disabled", "aria-controls", "aria-activedescendant", "readonly", "name"]; -var _hoisted_233 = ["textContent"]; -var _hoisted_314 = { key: 1 }; -function _sfc_render17(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_tag = resolveComponent("el-tag"); - const _component_el_tooltip = resolveComponent("el-tooltip"); - const _component_el_icon = resolveComponent("el-icon"); - const _component_el_select_menu = resolveComponent("el-select-menu"); - const _directive_click_outside = resolveDirective("click-outside"); - return withDirectives((openBlock(), createElementBlock( - "div", - { - ref: "selectRef", - class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]), - onMouseenter: _cache[15] || (_cache[15] = ($event) => _ctx.states.inputHovering = true), - onMouseleave: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = false) - }, - [ - createVNode(_component_el_tooltip, { - ref: "tooltipRef", - visible: _ctx.dropdownMenuVisible, - teleported: _ctx.teleported, - "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - "gpu-acceleration": false, - "stop-popper-mouse-event": false, - "popper-options": _ctx.popperOptions, - "fallback-placements": _ctx.fallbackPlacements, - effect: _ctx.effect, - placement: _ctx.placement, - pure: "", - transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`, - trigger: "click", - persistent: _ctx.persistent, - "append-to": _ctx.appendTo, - "show-arrow": _ctx.showArrow, - offset: _ctx.offset, - onBeforeShow: _ctx.handleMenuEnter, - onHide: _cache[14] || (_cache[14] = ($event) => _ctx.states.isBeforeHide = false) - }, { - default: withCtx(() => { - var _a, _b; - return [ - createBaseVNode( - "div", - { - ref: "wrapperRef", - class: normalizeClass([ - _ctx.nsSelect.e("wrapper"), - _ctx.nsSelect.is("focused", _ctx.isFocused), - _ctx.nsSelect.is("hovering", _ctx.states.inputHovering), - _ctx.nsSelect.is("filterable", _ctx.filterable), - _ctx.nsSelect.is("disabled", _ctx.selectDisabled) - ]), - onClick: _cache[11] || (_cache[11] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"])) - }, - [ - _ctx.$slots.prefix ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref: "prefixRef", - class: normalizeClass(_ctx.nsSelect.e("prefix")) - }, - [ - renderSlot(_ctx.$slots, "prefix") - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - ref: "selectionRef", - class: normalizeClass([ - _ctx.nsSelect.e("selection"), - _ctx.nsSelect.is( - "near", - _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length - ) - ]) - }, - [ - _ctx.multiple ? renderSlot(_ctx.$slots, "tag", { - key: 0, - data: _ctx.states.cachedOptions, - deleteTag: _ctx.deleteTag, - selectDisabled: _ctx.selectDisabled - }, () => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.showTagList, (item) => { - return openBlock(), createElementBlock( - "div", - { - key: _ctx.getValueKey(_ctx.getValue(item)), - class: normalizeClass(_ctx.nsSelect.e("selected-item")) - }, - [ - createVNode(_component_el_tag, { - closable: !_ctx.selectDisabled && !_ctx.getDisabled(item), - size: _ctx.collapseTagSize, - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "", - style: normalizeStyle(_ctx.tagStyle), - onClose: ($event) => _ctx.deleteTag($event, item) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.nsSelect.e("tags-text")) - }, - [ - renderSlot(_ctx.$slots, "label", { - index: _ctx.getIndex(item), - label: _ctx.getLabel(item), - value: _ctx.getValue(item) - }, () => [ - createTextVNode( - toDisplayString(_ctx.getLabel(item)), - 1 - ) - ]) - ], - 2 - ) - ]), - _: 2 - }, 1032, ["closable", "size", "type", "effect", "style", "onClose"]) - ], - 2 - ); - }), - 128 - )), - _ctx.collapseTags && _ctx.modelValue.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, { - key: 0, - ref: "tagTooltipRef", - disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip, - "fallback-placements": ["bottom", "top", "right", "left"], - effect: _ctx.effect, - placement: "bottom", - "popper-class": _ctx.popperClass, - "popper-style": _ctx.popperStyle, - teleported: _ctx.teleported, - "popper-options": _ctx.popperOptions - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - ref: "collapseItemRef", - class: normalizeClass(_ctx.nsSelect.e("selected-item")) - }, - [ - createVNode(_component_el_tag, { - closable: false, - size: _ctx.collapseTagSize, - type: _ctx.tagType, - effect: _ctx.tagEffect, - style: normalizeStyle(_ctx.collapseTagStyle), - "disable-transitions": "" - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.nsSelect.e("tags-text")) - }, - " + " + toDisplayString(_ctx.modelValue.length - _ctx.maxCollapseTags), - 3 - ) - ]), - _: 1 - }, 8, ["size", "type", "effect", "style"]) - ], - 2 - ) - ]), - content: withCtx(() => [ - createBaseVNode( - "div", - { - ref: "tagMenuRef", - class: normalizeClass(_ctx.nsSelect.e("selection")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.collapseTagList, (selected) => { - return openBlock(), createElementBlock( - "div", - { - key: _ctx.getValueKey(_ctx.getValue(selected)), - class: normalizeClass(_ctx.nsSelect.e("selected-item")) - }, - [ - createVNode(_component_el_tag, { - class: "in-tooltip", - closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected), - size: _ctx.collapseTagSize, - type: _ctx.tagType, - effect: _ctx.tagEffect, - "disable-transitions": "", - onClose: ($event) => _ctx.deleteTag($event, selected) - }, { - default: withCtx(() => [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.nsSelect.e("tags-text")) - }, - [ - renderSlot(_ctx.$slots, "label", { - index: _ctx.getIndex(selected), - label: _ctx.getLabel(selected), - value: _ctx.getValue(selected) - }, () => [ - createTextVNode( - toDisplayString(_ctx.getLabel(selected)), - 1 - ) - ]) - ], - 2 - ) - ]), - _: 2 - }, 1032, ["closable", "size", "type", "effect", "onClose"]) - ], - 2 - ); - }), - 128 - )) - ], - 2 - ) - ]), - _: 3 - }, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported", "popper-options"])) : createCommentVNode("v-if", true) - ]) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass([ - _ctx.nsSelect.e("selected-item"), - _ctx.nsSelect.e("input-wrapper"), - _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled) - ]) - }, - [ - withDirectives(createBaseVNode("input", { - id: _ctx.inputId, - ref: "inputRef", - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.states.inputValue = $event), - style: normalizeStyle(_ctx.inputStyle), - autocomplete: _ctx.autocomplete, - tabindex: _ctx.tabindex, - "aria-autocomplete": "none", - "aria-haspopup": "listbox", - autocapitalize: "off", - "aria-expanded": _ctx.expanded, - "aria-label": _ctx.ariaLabel, - class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]), - disabled: _ctx.selectDisabled, - role: "combobox", - "aria-controls": _ctx.contentId, - "aria-activedescendant": _ctx.states.hoveringIndex >= 0 ? `${_ctx.contentId}-${_ctx.states.hoveringIndex}` : "", - readonly: !_ctx.filterable, - spellcheck: "false", - type: "text", - name: _ctx.name, - onInput: _cache[1] || (_cache[1] = (...args) => _ctx.onInput && _ctx.onInput(...args)), - onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)), - onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)), - onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)), - onKeydown: [ - _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])), - _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])), - _cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])), - _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])), - _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"])) - ], - onClick: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"])) - }, null, 46, _hoisted_161), [ - [vModelText, _ctx.states.inputValue] - ]), - _ctx.filterable ? (openBlock(), createElementBlock("span", { - key: 0, - ref: "calculatorRef", - "aria-hidden": "true", - class: normalizeClass(_ctx.nsSelect.e("input-calculator")), - textContent: toDisplayString(_ctx.states.inputValue) - }, null, 10, _hoisted_233)) : createCommentVNode("v-if", true) - ], - 2 - ), - _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([ - _ctx.nsSelect.e("selected-item"), - _ctx.nsSelect.e("placeholder"), - _ctx.nsSelect.is( - "transparent", - !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue - ) - ]) - }, - [ - _ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", { - key: 0, - index: (_b = (_a = _ctx.allOptionsValueMap.get(_ctx.modelValue)) == null ? void 0 : _a.index) != null ? _b : -1, - label: _ctx.currentPlaceholder, - value: _ctx.modelValue - }, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.currentPlaceholder), - 1 - ) - ]) : (openBlock(), createElementBlock( - "span", - _hoisted_314, - toDisplayString(_ctx.currentPlaceholder), - 1 - )) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ), - createBaseVNode( - "div", - { - ref: "suffixRef", - class: normalizeClass(_ctx.nsSelect.e("suffix")) - }, - [ - _ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, { - key: 0, - class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsInput.e("icon"), _ctx.iconReverse]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent))) - ]), - _: 1 - }, 8, ["class"])), [ - [vShow, !_ctx.showClearBtn] - ]) : createCommentVNode("v-if", true), - _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, { - key: 1, - class: normalizeClass([ - _ctx.nsSelect.e("caret"), - _ctx.nsInput.e("icon"), - _ctx.nsSelect.e("clear") - ]), - onClick: withModifiers(_ctx.handleClear, ["prevent", "stop"]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) - ]), - _: 1 - }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), - _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, { - key: 2, - class: normalizeClass([ - _ctx.nsInput.e("icon"), - _ctx.nsInput.e("validateIcon"), - _ctx.nsInput.is("loading", _ctx.validateState === "validating") - ]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ) - ]; - }), - content: withCtx(() => [ - createVNode(_component_el_select_menu, { - id: _ctx.contentId, - ref: "menuRef", - data: _ctx.filteredOptions, - width: _ctx.popperSize - _ctx.BORDER_HORIZONTAL_WIDTH, - "hovering-index": _ctx.states.hoveringIndex, - "scrollbar-always-on": _ctx.scrollbarAlwaysOn, - "aria-label": _ctx.ariaLabel - }, createSlots({ - default: withCtx((scope) => [ - renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope))) - ]), - _: 2 - }, [ - _ctx.$slots.header ? { - name: "header", - fn: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")), - onClick: _cache[12] || (_cache[12] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "header") - ], - 2 - ) - ]), - key: "0" - } : void 0, - _ctx.$slots.loading && _ctx.loading ? { - name: "loading", - fn: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading")) - }, - [ - renderSlot(_ctx.$slots, "loading") - ], - 2 - ) - ]), - key: "1" - } : _ctx.loading || _ctx.filteredOptions.length === 0 ? { - name: "empty", - fn: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.emptyText), - 1 - ) - ]) - ], - 2 - ) - ]), - key: "2" - } : void 0, - _ctx.$slots.footer ? { - name: "footer", - fn: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")), - onClick: _cache[13] || (_cache[13] = withModifiers(() => { - }, ["stop"])) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - ) - ]), - key: "3" - } : void 0 - ]), 1032, ["id", "data", "width", "hovering-index", "scrollbar-always-on", "aria-label"]) - ]), - _: 3 - }, 8, ["visible", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "placement", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow"]) - ], - 34 - )), [ - [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef] - ]); -} -var Select2 = _export_sfc(_sfc_main116, [["render", _sfc_render17], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/select.vue"]]); - -// node_modules/element-plus/es/components/select-v2/index.mjs -var ElSelectV2 = withInstall(Select2); - -// node_modules/element-plus/es/components/skeleton/src/skeleton.mjs -var skeletonProps = buildProps({ - animated: Boolean, - count: { - type: Number, - default: 1 - }, - rows: { - type: Number, - default: 3 - }, - loading: { - type: Boolean, - default: true - }, - throttle: { - type: definePropType([Number, Object]) - } -}); - -// node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs -var skeletonItemProps = buildProps({ - variant: { - type: String, - values: [ - "circle", - "rect", - "h1", - "h3", - "text", - "caption", - "p", - "image", - "button" - ], - default: "text" - } -}); - -// node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs -var _sfc_main117 = defineComponent({ - ...{ - name: "ElSkeletonItem" - }, - __name: "skeleton-item", - props: skeletonItemProps, - setup(__props) { - const ns = useNamespace("skeleton"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).e("item"), unref(ns).e(_ctx.variant)]) - }, - [ - _ctx.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var SkeletonItem = _export_sfc(_sfc_main117, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]); - -// node_modules/element-plus/es/hooks/use-throttle-render/index.mjs -var useThrottleRender = (loading, throttle2 = 0) => { - if (throttle2 === 0) - return loading; - const initVal = isObject(throttle2) && Boolean(throttle2.initVal); - const throttled = ref(initVal); - let timeoutHandle = null; - const dispatchThrottling = (timer) => { - if (isUndefined2(timer)) { - throttled.value = loading.value; - return; - } - if (timeoutHandle) { - clearTimeout(timeoutHandle); - } - timeoutHandle = setTimeout(() => { - throttled.value = loading.value; - }, timer); - }; - const dispatcher = (type4) => { - if (type4 === "leading") { - if (isNumber2(throttle2)) { - dispatchThrottling(throttle2); - } else { - dispatchThrottling(throttle2.leading); - } - } else { - if (isObject(throttle2)) { - dispatchThrottling(throttle2.trailing); - } else { - throttled.value = false; - } - } - }; - onMounted(() => dispatcher("leading")); - watch( - () => loading.value, - (val) => { - dispatcher(val ? "leading" : "trailing"); - } - ); - return throttled; -}; - -// node_modules/element-plus/es/components/skeleton/src/skeleton2.mjs -var _sfc_main118 = defineComponent({ - ...{ - name: "ElSkeleton" - }, - __name: "skeleton", - props: skeletonProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const ns = useNamespace("skeleton"); - const uiLoading = useThrottleRender(toRef(props2, "loading"), props2.throttle); - __expose({ - uiLoading - }); - return (_ctx, _cache) => { - return unref(uiLoading) ? (openBlock(), createElementBlock( - "div", - mergeProps({ - key: 0, - class: [unref(ns).b(), unref(ns).is("animated", _ctx.animated)] - }, _ctx.$attrs), - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.count, (i) => { - return openBlock(), createElementBlock( - Fragment, - { key: i }, - [ - unref(uiLoading) ? renderSlot(_ctx.$slots, "template", { key: i }, () => [ - createVNode(SkeletonItem, { - class: normalizeClass(unref(ns).is("first")), - variant: "p" - }, null, 8, ["class"]), - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.rows, (item) => { - return openBlock(), createBlock(SkeletonItem, { - key: item, - class: normalizeClass([ - unref(ns).e("paragraph"), - unref(ns).is("last", item === _ctx.rows && _ctx.rows > 1) - ]), - variant: "p" - }, null, 8, ["class"]); - }), - 128 - )) - ]) : createCommentVNode("v-if", true) - ], - 64 - ); - }), - 128 - )) - ], - 16 - )) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs))); - }; - } -}); -var Skeleton = _export_sfc(_sfc_main118, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]); - -// node_modules/element-plus/es/components/skeleton/index.mjs -var ElSkeleton = withInstall(Skeleton, { - SkeletonItem -}); -var ElSkeletonItem = withNoopInstall(SkeletonItem); - -// node_modules/element-plus/es/components/slider/src/constants.mjs -var sliderContextKey = Symbol("sliderContextKey"); - -// node_modules/element-plus/es/components/slider/src/slider.mjs -var sliderProps = buildProps({ - modelValue: { - type: definePropType([Number, Array]), - default: 0 - }, - id: { - type: String, - default: void 0 - }, - min: { - type: Number, - default: 0 - }, - max: { - type: Number, - default: 100 - }, - step: { - type: Number, - default: 1 - }, - showInput: Boolean, - showInputControls: { - type: Boolean, - default: true - }, - size: useSizeProp, - inputSize: useSizeProp, - showStops: Boolean, - showTooltip: { - type: Boolean, - default: true - }, - formatTooltip: { - type: definePropType(Function), - default: void 0 - }, - disabled: { - type: Boolean, - default: void 0 - }, - range: Boolean, - vertical: Boolean, - height: String, - rangeStartLabel: { - type: String, - default: void 0 - }, - rangeEndLabel: { - type: String, - default: void 0 - }, - formatValueText: { - type: definePropType(Function), - default: void 0 - }, - tooltipClass: { - type: String, - default: void 0 - }, - placement: { - type: String, - values: Ee, - default: "top" - }, - marks: { - type: definePropType(Object) - }, - validateEvent: { - type: Boolean, - default: true - }, - persistent: { - type: Boolean, - default: true - }, - ...useAriaProps(["ariaLabel"]) -}); -var isValidValue = (value) => isNumber2(value) || isArray(value) && value.every(isNumber2); -var sliderEmits = { - [UPDATE_MODEL_EVENT]: isValidValue, - [INPUT_EVENT]: isValidValue, - [CHANGE_EVENT]: isValidValue -}; - -// node_modules/element-plus/es/components/slider/src/button.mjs -var sliderButtonProps = buildProps({ - modelValue: { - type: Number, - default: 0 - }, - vertical: Boolean, - tooltipClass: String, - placement: { - type: String, - values: Ee, - default: "top" - } -}); -var sliderButtonEmits = { - [UPDATE_MODEL_EVENT]: (value) => isNumber2(value) -}; - -// node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs -var useTooltip = (props2, formatTooltip, showTooltip) => { - const tooltip = ref(); - const tooltipVisible = ref(false); - const enableFormat = computed(() => { - return formatTooltip.value instanceof Function; - }); - const formatValue = computed(() => { - return enableFormat.value && formatTooltip.value(props2.modelValue) || props2.modelValue; - }); - const displayTooltip = debounce_default(() => { - showTooltip.value && (tooltipVisible.value = true); - }, 50); - const hideTooltip = debounce_default(() => { - showTooltip.value && (tooltipVisible.value = false); - }, 50); - return { - tooltip, - tooltipVisible, - formatValue, - displayTooltip, - hideTooltip - }; -}; -var useSliderButton = (props2, initData, emit) => { - const { - disabled, - min: min4, - max: max4, - step: step2, - showTooltip, - persistent, - precision, - sliderSize, - formatTooltip, - emitChange, - resetSize, - updateDragging - } = inject(sliderContextKey); - const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props2, formatTooltip, showTooltip); - const button = ref(); - const currentPosition = computed(() => { - return `${(props2.modelValue - min4.value) / (max4.value - min4.value) * 100}%`; - }); - const wrapperStyle = computed(() => { - return props2.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value }; - }); - const handleMouseEnter = () => { - initData.hovering = true; - displayTooltip(); - }; - const handleMouseLeave = () => { - initData.hovering = false; - if (!initData.dragging) { - hideTooltip(); - } - }; - const onButtonDown = (event) => { - if (disabled.value) - return; - event.preventDefault(); - onDragStart(event); - window.addEventListener("mousemove", onDragging); - window.addEventListener("touchmove", onDragging); - window.addEventListener("mouseup", onDragEnd); - window.addEventListener("touchend", onDragEnd); - window.addEventListener("contextmenu", onDragEnd); - button.value.focus(); - }; - const incrementPosition = (amount) => { - if (disabled.value) - return; - initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max4.value - min4.value) * 100; - setPosition(initData.newPosition); - emitChange(); - }; - const onLeftKeyDown = () => { - incrementPosition(-step2.value); - }; - const onRightKeyDown = () => { - incrementPosition(step2.value); - }; - const onPageDownKeyDown = () => { - incrementPosition(-step2.value * 4); - }; - const onPageUpKeyDown = () => { - incrementPosition(step2.value * 4); - }; - const onHomeKeyDown = () => { - if (disabled.value) - return; - setPosition(0); - emitChange(); - }; - const onEndKeyDown = () => { - if (disabled.value) - return; - setPosition(100); - emitChange(); - }; - const onKeyDown = (event) => { - const code = getEventCode(event); - let isPreventDefault = true; - switch (code) { - case EVENT_CODE.left: - case EVENT_CODE.down: - onLeftKeyDown(); - break; - case EVENT_CODE.right: - case EVENT_CODE.up: - onRightKeyDown(); - break; - case EVENT_CODE.home: - onHomeKeyDown(); - break; - case EVENT_CODE.end: - onEndKeyDown(); - break; - case EVENT_CODE.pageDown: - onPageDownKeyDown(); - break; - case EVENT_CODE.pageUp: - onPageUpKeyDown(); - break; - default: - isPreventDefault = false; - break; - } - isPreventDefault && event.preventDefault(); - }; - const getClientXY2 = (event) => { - let clientX; - let clientY; - if (event.type.startsWith("touch")) { - clientY = event.touches[0].clientY; - clientX = event.touches[0].clientX; - } else { - clientY = event.clientY; - clientX = event.clientX; - } - return { - clientX, - clientY - }; - }; - const onDragStart = (event) => { - initData.dragging = true; - initData.isClick = true; - const { clientX, clientY } = getClientXY2(event); - if (props2.vertical) { - initData.startY = clientY; - } else { - initData.startX = clientX; - } - initData.startPosition = Number.parseFloat(currentPosition.value); - initData.newPosition = initData.startPosition; - }; - const onDragging = (event) => { - if (initData.dragging) { - initData.isClick = false; - displayTooltip(); - resetSize(); - let diff; - const { clientX, clientY } = getClientXY2(event); - if (props2.vertical) { - initData.currentY = clientY; - diff = (initData.startY - initData.currentY) / sliderSize.value * 100; - } else { - initData.currentX = clientX; - diff = (initData.currentX - initData.startX) / sliderSize.value * 100; - } - initData.newPosition = initData.startPosition + diff; - setPosition(initData.newPosition); - } - }; - const onDragEnd = () => { - if (initData.dragging) { - setTimeout(() => { - initData.dragging = false; - if (!initData.hovering) { - hideTooltip(); - } - if (!initData.isClick) { - setPosition(initData.newPosition); - } - emitChange(); - }, 0); - window.removeEventListener("mousemove", onDragging); - window.removeEventListener("touchmove", onDragging); - window.removeEventListener("mouseup", onDragEnd); - window.removeEventListener("touchend", onDragEnd); - window.removeEventListener("contextmenu", onDragEnd); - } - }; - const setPosition = async (newPosition) => { - if (newPosition === null || Number.isNaN(+newPosition)) - return; - newPosition = clamp_default(newPosition, 0, 100); - const fullSteps = Math.floor((max4.value - min4.value) / step2.value); - const fullRangePercentage = fullSteps * step2.value / (max4.value - min4.value) * 100; - const threshold = fullRangePercentage + (100 - fullRangePercentage) / 2; - let value; - if (newPosition < fullRangePercentage) { - const valueBetween = fullRangePercentage / fullSteps; - const steps = Math.round(newPosition / valueBetween); - value = min4.value + steps * step2.value; - } else if (newPosition < threshold) { - value = min4.value + fullSteps * step2.value; - } else { - value = max4.value; - } - value = Number.parseFloat(value.toFixed(precision.value)); - if (value !== props2.modelValue) { - emit(UPDATE_MODEL_EVENT, value); - } - if (!initData.dragging && props2.modelValue !== initData.oldValue) { - initData.oldValue = props2.modelValue; - } - await nextTick(); - initData.dragging && displayTooltip(); - tooltip.value.updatePopper(); - }; - watch( - () => initData.dragging, - (val) => { - updateDragging(val); - } - ); - useEventListener(button, "touchstart", onButtonDown, { passive: false }); - return { - disabled, - button, - tooltip, - tooltipVisible, - showTooltip, - persistent, - wrapperStyle, - formatValue, - handleMouseEnter, - handleMouseLeave, - onButtonDown, - onKeyDown, - setPosition - }; -}; - -// node_modules/element-plus/es/components/slider/src/button2.mjs -var _hoisted_163 = ["tabindex"]; -var _sfc_main119 = defineComponent({ - ...{ - name: "ElSliderButton" - }, - __name: "button", - props: sliderButtonProps, - emits: sliderButtonEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("slider"); - const initData = reactive({ - hovering: false, - dragging: false, - isClick: false, - startX: 0, - currentX: 0, - startY: 0, - currentY: 0, - startPosition: 0, - newPosition: 0, - oldValue: props2.modelValue - }); - const tooltipPersistent = computed( - () => !showTooltip.value ? false : persistent.value - ); - const { - disabled, - button, - tooltip, - showTooltip, - persistent, - tooltipVisible, - wrapperStyle, - formatValue, - handleMouseEnter, - handleMouseLeave, - onButtonDown, - onKeyDown, - setPosition - } = useSliderButton(props2, initData, emit); - const { hovering, dragging } = toRefs(initData); - __expose({ - onButtonDown, - onKeyDown, - setPosition, - hovering, - dragging - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - ref_key: "button", - ref: button, - class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]), - style: normalizeStyle(unref(wrapperStyle)), - tabindex: unref(disabled) ? void 0 : 0, - onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)), - onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)), - onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)), - onFocus: _cache[3] || (_cache[3] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)), - onBlur: _cache[4] || (_cache[4] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)), - onKeydown: _cache[5] || (_cache[5] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args)) - }, [ - createVNode(unref(ElTooltip), { - ref_key: "tooltip", - ref: tooltip, - visible: unref(tooltipVisible), - placement: _ctx.placement, - "fallback-placements": ["top", "bottom", "right", "left"], - "stop-popper-mouse-event": false, - "popper-class": _ctx.tooltipClass, - disabled: !unref(showTooltip), - persistent: tooltipPersistent.value - }, { - content: withCtx(() => [ - createBaseVNode( - "span", - null, - toDisplayString(unref(formatValue)), - 1 - ) - ]), - default: withCtx(() => [ - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }]) - }, - null, - 2 - ) - ]), - _: 1 - }, 8, ["visible", "placement", "popper-class", "disabled", "persistent"]) - ], 46, _hoisted_163); - }; - } -}); -var SliderButton = _export_sfc(_sfc_main119, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]); - -// node_modules/element-plus/es/components/slider/src/marker.mjs -var sliderMarkerProps = buildProps({ - mark: { - type: definePropType([String, Object]), - default: void 0 - } -}); -var SliderMarker = defineComponent({ - name: "ElSliderMarker", - props: sliderMarkerProps, - setup(props2) { - const ns = useNamespace("slider"); - const label = computed(() => { - return isString(props2.mark) ? props2.mark : props2.mark.label; - }); - const style = computed( - () => isString(props2.mark) ? void 0 : props2.mark.style - ); - return () => h( - "div", - { - class: ns.e("marks-text"), - style: style.value - }, - label.value - ); - } -}); - -// node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs -var useSlide = (props2, initData, emit) => { - const { formItem: elFormItem } = useFormItem(); - const slider = shallowRef(); - const firstButton = ref(); - const secondButton = ref(); - const buttonRefs = { - firstButton, - secondButton - }; - const sliderDisabled = useFormDisabled(); - const minValue3 = computed(() => { - return Math.min(initData.firstValue, initData.secondValue); - }); - const maxValue3 = computed(() => { - return Math.max(initData.firstValue, initData.secondValue); - }); - const barSize = computed(() => { - return props2.range ? `${100 * (maxValue3.value - minValue3.value) / (props2.max - props2.min)}%` : `${100 * (initData.firstValue - props2.min) / (props2.max - props2.min)}%`; - }); - const barStart = computed(() => { - return props2.range ? `${100 * (minValue3.value - props2.min) / (props2.max - props2.min)}%` : "0%"; - }); - const runwayStyle = computed(() => { - return props2.vertical ? { height: props2.height } : {}; - }); - const barStyle = computed(() => { - return props2.vertical ? { - height: barSize.value, - bottom: barStart.value - } : { - width: barSize.value, - left: barStart.value - }; - }); - const resetSize = () => { - if (slider.value) { - const rect = slider.value.getBoundingClientRect(); - initData.sliderSize = rect[props2.vertical ? "height" : "width"]; - } - }; - const getButtonRefByPercent = (percent) => { - const targetValue = props2.min + percent * (props2.max - props2.min) / 100; - if (!props2.range) { - return firstButton; - } - let buttonRefName; - if (Math.abs(minValue3.value - targetValue) < Math.abs(maxValue3.value - targetValue)) { - buttonRefName = initData.firstValue < initData.secondValue ? "firstButton" : "secondButton"; - } else { - buttonRefName = initData.firstValue > initData.secondValue ? "firstButton" : "secondButton"; - } - return buttonRefs[buttonRefName]; - }; - const setPosition = (percent) => { - const buttonRef = getButtonRefByPercent(percent); - buttonRef.value.setPosition(percent); - return buttonRef; - }; - const setFirstValue = (firstValue) => { - initData.firstValue = firstValue != null ? firstValue : props2.min; - _emit( - props2.range ? [minValue3.value, maxValue3.value] : firstValue != null ? firstValue : props2.min - ); - }; - const setSecondValue = (secondValue) => { - initData.secondValue = secondValue; - if (props2.range) { - _emit([minValue3.value, maxValue3.value]); - } - }; - const _emit = (val) => { - emit(UPDATE_MODEL_EVENT, val); - emit(INPUT_EVENT, val); - }; - const emitChange = async () => { - await nextTick(); - emit( - CHANGE_EVENT, - props2.range ? [minValue3.value, maxValue3.value] : props2.modelValue - ); - }; - const handleSliderPointerEvent = (event) => { - var _a, _b, _c, _d, _e, _f; - if (sliderDisabled.value || initData.dragging) - return; - resetSize(); - let newPercent = 0; - if (props2.vertical) { - const clientY = (_c = (_b = (_a = event.touches) == null ? void 0 : _a.item(0)) == null ? void 0 : _b.clientY) != null ? _c : event.clientY; - const sliderOffsetBottom = slider.value.getBoundingClientRect().bottom; - newPercent = (sliderOffsetBottom - clientY) / initData.sliderSize * 100; - } else { - const clientX = (_f = (_e = (_d = event.touches) == null ? void 0 : _d.item(0)) == null ? void 0 : _e.clientX) != null ? _f : event.clientX; - const sliderOffsetLeft = slider.value.getBoundingClientRect().left; - newPercent = (clientX - sliderOffsetLeft) / initData.sliderSize * 100; - } - if (newPercent < 0 || newPercent > 100) - return; - return setPosition(newPercent); - }; - const onSliderWrapperPrevent = (event) => { - var _a, _b; - if (((_a = buttonRefs["firstButton"].value) == null ? void 0 : _a.dragging) || ((_b = buttonRefs["secondButton"].value) == null ? void 0 : _b.dragging)) { - event.preventDefault(); - } - }; - const onSliderDown = async (event) => { - const buttonRef = handleSliderPointerEvent(event); - if (buttonRef) { - await nextTick(); - buttonRef.value.onButtonDown(event); - } - }; - const onSliderClick = (event) => { - const buttonRef = handleSliderPointerEvent(event); - if (buttonRef) { - emitChange(); - } - }; - const onSliderMarkerDown = (position) => { - if (sliderDisabled.value || initData.dragging) - return; - const buttonRef = setPosition(position); - if (buttonRef) { - emitChange(); - } - }; - return { - elFormItem, - slider, - firstButton, - secondButton, - sliderDisabled, - minValue: minValue3, - maxValue: maxValue3, - runwayStyle, - barStyle, - resetSize, - setPosition, - emitChange, - onSliderWrapperPrevent, - onSliderClick, - onSliderDown, - onSliderMarkerDown, - setFirstValue, - setSecondValue - }; -}; - -// node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs -var useStops = (props2, initData, minValue3, maxValue3) => { - const stops = computed(() => { - if (!props2.showStops || props2.min > props2.max) - return []; - if (props2.step === 0) { - debugWarn("ElSlider", "step should not be 0."); - return []; - } - const stopCount = Math.ceil((props2.max - props2.min) / props2.step); - const stepWidth = 100 * props2.step / (props2.max - props2.min); - const result2 = Array.from({ length: stopCount - 1 }).map( - (_2, index) => (index + 1) * stepWidth - ); - if (props2.range) { - return result2.filter((step2) => { - return step2 < 100 * (minValue3.value - props2.min) / (props2.max - props2.min) || step2 > 100 * (maxValue3.value - props2.min) / (props2.max - props2.min); - }); - } else { - return result2.filter( - (step2) => step2 > 100 * (initData.firstValue - props2.min) / (props2.max - props2.min) - ); - } - }); - const getStopStyle = (position) => { - return props2.vertical ? { bottom: `${position}%` } : { left: `${position}%` }; - }; - return { - stops, - getStopStyle - }; -}; - -// node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs -var useMarks = (props2) => { - return computed(() => { - if (!props2.marks) { - return []; - } - const marksKeys = Object.keys(props2.marks); - return marksKeys.map(Number.parseFloat).sort((a2, b2) => a2 - b2).filter((point) => point <= props2.max && point >= props2.min).map( - (point) => ({ - point, - position: (point - props2.min) * 100 / (props2.max - props2.min), - mark: props2.marks[point] - }) - ); - }); -}; - -// node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs -var useWatch = (props2, initData, minValue3, maxValue3, emit, elFormItem) => { - const _emit = (val) => { - emit(UPDATE_MODEL_EVENT, val); - emit(INPUT_EVENT, val); - }; - const valueChanged = () => { - if (props2.range) { - return ![minValue3.value, maxValue3.value].every( - (item, index) => item === initData.oldValue[index] - ); - } else { - return props2.modelValue !== initData.oldValue; - } - }; - const setValues = () => { - var _a, _b; - if (props2.min > props2.max) { - throwError("Slider", "min should not be greater than max."); - } - const val = props2.modelValue; - if (props2.range && isArray(val)) { - if (val[1] < props2.min) { - _emit([props2.min, props2.min]); - } else if (val[0] > props2.max) { - _emit([props2.max, props2.max]); - } else if (val[0] < props2.min) { - _emit([props2.min, val[1]]); - } else if (val[1] > props2.max) { - _emit([val[0], props2.max]); - } else { - initData.firstValue = val[0]; - initData.secondValue = val[1]; - if (valueChanged()) { - if (props2.validateEvent) { - (_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn(err)); - } - initData.oldValue = val.slice(); - } - } - } else if (!props2.range && isNumber2(val) && !Number.isNaN(val)) { - if (val < props2.min) { - _emit(props2.min); - } else if (val > props2.max) { - _emit(props2.max); - } else { - initData.firstValue = val; - if (valueChanged()) { - if (props2.validateEvent) { - (_b = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _b.call(elFormItem, "change").catch((err) => debugWarn(err)); - } - initData.oldValue = val; - } - } - } - }; - setValues(); - watch( - () => initData.dragging, - (val) => { - if (!val) { - setValues(); - } - } - ); - watch( - () => props2.modelValue, - (val, oldVal) => { - if (initData.dragging || isArray(val) && isArray(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) { - return; - } - setValues(); - }, - { - deep: true - } - ); - watch( - () => [props2.min, props2.max], - () => { - setValues(); - } - ); -}; - -// node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs -var useLifecycle = (props2, initData, resetSize) => { - const sliderWrapper = ref(); - onMounted(async () => { - if (props2.range) { - if (isArray(props2.modelValue)) { - initData.firstValue = Math.max(props2.min, props2.modelValue[0]); - initData.secondValue = Math.min(props2.max, props2.modelValue[1]); - } else { - initData.firstValue = props2.min; - initData.secondValue = props2.max; - } - initData.oldValue = [initData.firstValue, initData.secondValue]; - } else { - if (!isNumber2(props2.modelValue) || Number.isNaN(props2.modelValue)) { - initData.firstValue = props2.min; - } else { - initData.firstValue = Math.min( - props2.max, - Math.max(props2.min, props2.modelValue) - ); - } - initData.oldValue = initData.firstValue; - } - useEventListener(window, "resize", resetSize); - await nextTick(); - resetSize(); - }); - return { - sliderWrapper - }; -}; - -// node_modules/element-plus/es/components/slider/src/slider2.mjs -var _hoisted_164 = ["id", "role", "aria-label", "aria-labelledby"]; -var _hoisted_234 = { key: 1 }; -var _sfc_main120 = defineComponent({ - ...{ - name: "ElSlider" - }, - __name: "slider", - props: sliderProps, - emits: sliderEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("slider"); - const { t } = useLocale(); - const initData = reactive({ - firstValue: 0, - secondValue: 0, - oldValue: 0, - dragging: false, - sliderSize: 1 - }); - const { - elFormItem, - slider, - firstButton, - secondButton, - sliderDisabled, - minValue: minValue3, - maxValue: maxValue3, - runwayStyle, - barStyle, - resetSize, - emitChange, - onSliderWrapperPrevent, - onSliderClick, - onSliderDown, - onSliderMarkerDown, - setFirstValue, - setSecondValue - } = useSlide(props2, initData, emit); - const { stops, getStopStyle } = useStops(props2, initData, minValue3, maxValue3); - const { inputId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext: elFormItem - }); - const sliderWrapperSize = useFormSize(); - const sliderInputSize = computed( - () => props2.inputSize || sliderWrapperSize.value - ); - const groupLabel = computed(() => { - return props2.ariaLabel || t("el.slider.defaultLabel", { - min: props2.min, - max: props2.max - }); - }); - const firstButtonLabel = computed(() => { - if (props2.range) { - return props2.rangeStartLabel || t("el.slider.defaultRangeStartLabel"); - } else { - return groupLabel.value; - } - }); - const firstValueText = computed(() => { - return props2.formatValueText ? props2.formatValueText(firstValue.value) : `${firstValue.value}`; - }); - const secondButtonLabel = computed(() => { - return props2.rangeEndLabel || t("el.slider.defaultRangeEndLabel"); - }); - const secondValueText = computed(() => { - return props2.formatValueText ? props2.formatValueText(secondValue.value) : `${secondValue.value}`; - }); - const sliderKls = computed(() => [ - ns.b(), - ns.m(sliderWrapperSize.value), - ns.is("vertical", props2.vertical), - { [ns.m("with-input")]: props2.showInput } - ]); - const markList = useMarks(props2); - useWatch(props2, initData, minValue3, maxValue3, emit, elFormItem); - const precision = computed(() => { - const precisions = [props2.min, props2.max, props2.step].map((item) => { - const decimal = `${item}`.split(".")[1]; - return decimal ? decimal.length : 0; - }); - return Math.max.apply(null, precisions); - }); - const { sliderWrapper } = useLifecycle(props2, initData, resetSize); - const { firstValue, secondValue, sliderSize } = toRefs(initData); - const updateDragging = (val) => { - initData.dragging = val; - }; - useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, { - passive: false - }); - useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, { - passive: false - }); - provide(sliderContextKey, { - ...toRefs(props2), - sliderSize, - disabled: sliderDisabled, - precision, - emitChange, - resetSize, - updateDragging - }); - __expose({ - onSliderClick - }); - return (_ctx, _cache) => { - var _a, _b; - return openBlock(), createElementBlock("div", { - id: _ctx.range ? unref(inputId) : void 0, - ref_key: "sliderWrapper", - ref: sliderWrapper, - class: normalizeClass(sliderKls.value), - role: _ctx.range ? "group" : void 0, - "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? groupLabel.value : void 0, - "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? (_a = unref(elFormItem)) == null ? void 0 : _a.labelId : void 0 - }, [ - createBaseVNode( - "div", - { - ref_key: "slider", - ref: slider, - class: normalizeClass([ - unref(ns).e("runway"), - { "show-input": _ctx.showInput && !_ctx.range }, - unref(ns).is("disabled", unref(sliderDisabled)) - ]), - style: normalizeStyle(unref(runwayStyle)), - onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)), - onTouchstartPassive: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("bar")), - style: normalizeStyle(unref(barStyle)) - }, - null, - 6 - ), - createVNode(SliderButton, { - id: !_ctx.range ? unref(inputId) : void 0, - ref_key: "firstButton", - ref: firstButton, - "model-value": unref(firstValue), - vertical: _ctx.vertical, - "tooltip-class": _ctx.tooltipClass, - placement: _ctx.placement, - role: "slider", - "aria-label": _ctx.range || !unref(isLabeledByFormItem) ? firstButtonLabel.value : void 0, - "aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? (_b = unref(elFormItem)) == null ? void 0 : _b.labelId : void 0, - "aria-valuemin": _ctx.min, - "aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max, - "aria-valuenow": unref(firstValue), - "aria-valuetext": firstValueText.value, - "aria-orientation": _ctx.vertical ? "vertical" : "horizontal", - "aria-disabled": unref(sliderDisabled), - "onUpdate:modelValue": unref(setFirstValue) - }, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]), - _ctx.range ? (openBlock(), createBlock(SliderButton, { - key: 0, - ref_key: "secondButton", - ref: secondButton, - "model-value": unref(secondValue), - vertical: _ctx.vertical, - "tooltip-class": _ctx.tooltipClass, - placement: _ctx.placement, - role: "slider", - "aria-label": secondButtonLabel.value, - "aria-valuemin": unref(firstValue), - "aria-valuemax": _ctx.max, - "aria-valuenow": unref(secondValue), - "aria-valuetext": secondValueText.value, - "aria-orientation": _ctx.vertical ? "vertical" : "horizontal", - "aria-disabled": unref(sliderDisabled), - "onUpdate:modelValue": unref(setSecondValue) - }, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : createCommentVNode("v-if", true), - _ctx.showStops ? (openBlock(), createElementBlock("div", _hoisted_234, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(stops), (item, key) => { - return openBlock(), createElementBlock( - "div", - { - key, - class: normalizeClass(unref(ns).e("stop")), - style: normalizeStyle(unref(getStopStyle)(item)) - }, - null, - 6 - ); - }), - 128 - )) - ])) : createCommentVNode("v-if", true), - unref(markList).length > 0 ? (openBlock(), createElementBlock( - Fragment, - { key: 2 }, - [ - createBaseVNode("div", null, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(markList), (item, key) => { - return openBlock(), createElementBlock( - "div", - { - key, - style: normalizeStyle(unref(getStopStyle)(item.position)), - class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")]) - }, - null, - 6 - ); - }), - 128 - )) - ]), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("marks")) - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(markList), (item, key) => { - return openBlock(), createBlock(unref(SliderMarker), { - key, - mark: item.mark, - style: normalizeStyle(unref(getStopStyle)(item.position)), - onMousedown: withModifiers(($event) => unref(onSliderMarkerDown)(item.position), ["stop"]) - }, null, 8, ["mark", "style", "onMousedown"]); - }), - 128 - )) - ], - 2 - ) - ], - 64 - )) : createCommentVNode("v-if", true) - ], - 38 - ), - _ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), { - key: 0, - ref: "input", - "model-value": unref(firstValue), - class: normalizeClass(unref(ns).e("input")), - step: _ctx.step, - disabled: unref(sliderDisabled), - controls: _ctx.showInputControls, - min: _ctx.min, - max: _ctx.max, - precision: precision.value, - size: sliderInputSize.value, - "onUpdate:modelValue": unref(setFirstValue), - onChange: unref(emitChange) - }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true) - ], 10, _hoisted_164); - }; - } -}); -var Slider = _export_sfc(_sfc_main120, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]); - -// node_modules/element-plus/es/components/slider/index.mjs -var ElSlider = withInstall(Slider); - -// node_modules/element-plus/es/components/space/src/item.mjs -var spaceItemProps = buildProps({ - prefixCls: { - type: String - } -}); -var SpaceItem = defineComponent({ - name: "ElSpaceItem", - props: spaceItemProps, - setup(props2, { slots }) { - const ns = useNamespace("space"); - const classes = computed(() => `${props2.prefixCls || ns.b()}__item`); - return () => h("div", { class: classes.value }, renderSlot(slots, "default")); - } -}); - -// node_modules/element-plus/es/components/space/src/use-space.mjs -var SIZE_MAP = { - small: 8, - default: 12, - large: 16 -}; -function useSpace(props2) { - const ns = useNamespace("space"); - const classes = computed(() => [ns.b(), ns.m(props2.direction), props2.class]); - const horizontalSize = ref(0); - const verticalSize = ref(0); - const containerStyle = computed(() => { - const wrapKls = props2.wrap || props2.fill ? { flexWrap: "wrap" } : {}; - const alignment = { - alignItems: props2.alignment - }; - const gap = { - rowGap: `${verticalSize.value}px`, - columnGap: `${horizontalSize.value}px` - }; - return [wrapKls, alignment, gap, props2.style]; - }); - const itemStyle = computed(() => { - return props2.fill ? { flexGrow: 1, minWidth: `${props2.fillRatio}%` } : {}; - }); - watchEffect(() => { - const { size: size3 = "small", wrap: wrap2, direction: dir, fill: fill2 } = props2; - if (isArray(size3)) { - const [h3 = 0, v2 = 0] = size3; - horizontalSize.value = h3; - verticalSize.value = v2; - } else { - let val; - if (isNumber2(size3)) { - val = size3; - } else { - val = SIZE_MAP[size3 || "small"] || SIZE_MAP.small; - } - if ((wrap2 || fill2) && dir === "horizontal") { - horizontalSize.value = verticalSize.value = val; - } else { - if (dir === "horizontal") { - horizontalSize.value = val; - verticalSize.value = 0; - } else { - verticalSize.value = val; - horizontalSize.value = 0; - } - } - } - }); - return { - classes, - containerStyle, - itemStyle - }; -} - -// node_modules/element-plus/es/components/space/src/space.mjs -var spaceProps = buildProps({ - direction: { - type: String, - values: ["horizontal", "vertical"], - default: "horizontal" - }, - class: { - type: definePropType([ - String, - Object, - Array - ]), - default: "" - }, - style: { - type: definePropType([String, Array, Object]), - default: "" - }, - alignment: { - type: definePropType(String), - default: "center" - }, - prefixCls: { - type: String - }, - spacer: { - type: definePropType([Object, String, Number, Array]), - default: null, - validator: (val) => isVNode(val) || isNumber2(val) || isString(val) - }, - wrap: Boolean, - fill: Boolean, - fillRatio: { - type: Number, - default: 100 - }, - size: { - type: [String, Array, Number], - values: componentSizes, - validator: (val) => { - return isNumber2(val) || isArray(val) && val.length === 2 && val.every(isNumber2); - } - } -}); -var Space = defineComponent({ - name: "ElSpace", - props: spaceProps, - setup(props2, { slots }) { - const { classes, containerStyle, itemStyle } = useSpace(props2); - function extractChildren(children, parentKey = "", extractedChildren = []) { - const { prefixCls } = props2; - children.forEach((child, loopKey) => { - if (isFragment(child)) { - if (isArray(child.children)) { - child.children.forEach((nested, key) => { - if (isFragment(nested) && isArray(nested.children)) { - extractChildren( - nested.children, - `${parentKey + key}-`, - extractedChildren - ); - } else { - if (isVNode(nested) && (nested == null ? void 0 : nested.type) === Comment) { - extractedChildren.push(nested); - } else { - extractedChildren.push( - createVNode( - SpaceItem, - { - style: itemStyle.value, - prefixCls, - key: `nested-${parentKey + key}` - }, - { - default: () => [nested] - }, - PatchFlags.PROPS | PatchFlags.STYLE, - ["style", "prefixCls"] - ) - ); - } - } - }); - } - } else if (isValidElementNode(child)) { - extractedChildren.push( - createVNode( - SpaceItem, - { - style: itemStyle.value, - prefixCls, - key: `LoopKey${parentKey + loopKey}` - }, - { - default: () => [child] - }, - PatchFlags.PROPS | PatchFlags.STYLE, - ["style", "prefixCls"] - ) - ); - } - }); - return extractedChildren; - } - return () => { - var _a; - const { spacer, direction: direction2 } = props2; - const children = renderSlot(slots, "default", { key: 0 }, () => []); - if (((_a = children.children) != null ? _a : []).length === 0) - return null; - if (isArray(children.children)) { - let extractedChildren = extractChildren(children.children); - if (spacer) { - const len = extractedChildren.length - 1; - extractedChildren = extractedChildren.reduce( - (acc, child, idx) => { - const children2 = [...acc, child]; - if (idx !== len) { - children2.push( - createVNode( - "span", - { - style: [ - itemStyle.value, - direction2 === "vertical" ? "width: 100%" : null - ], - key: idx - }, - [ - isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT) - ], - PatchFlags.STYLE - ) - ); - } - return children2; - }, - [] - ); - } - return createVNode( - "div", - { - class: classes.value, - style: containerStyle.value - }, - extractedChildren, - PatchFlags.STYLE | PatchFlags.CLASS - ); - } - return children.children; - }; - } -}); - -// node_modules/element-plus/es/components/space/index.mjs -var ElSpace = withInstall(Space); - -// node_modules/element-plus/es/components/statistic/src/statistic.mjs -var statisticProps = buildProps({ - decimalSeparator: { - type: String, - default: "." - }, - groupSeparator: { - type: String, - default: "," - }, - precision: { - type: Number, - default: 0 - }, - formatter: Function, - value: { - type: definePropType([Number, Object]), - default: 0 - }, - prefix: String, - suffix: String, - title: String, - valueStyle: { - type: definePropType([String, Object, Array]) - } -}); - -// node_modules/element-plus/es/components/statistic/src/statistic2.mjs -var _sfc_main121 = defineComponent({ - ...{ - name: "ElStatistic" - }, - __name: "statistic", - props: statisticProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const ns = useNamespace("statistic"); - const displayValue = computed(() => { - const { value, formatter: formatter2, precision, decimalSeparator, groupSeparator } = props2; - if (isFunction(formatter2)) - return formatter2(value); - if (!isNumber2(value) || Number.isNaN(value)) - return value; - let [integer4, decimal = ""] = String(value).split("."); - decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0); - integer4 = integer4.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); - return [integer4, decimal].join(decimal ? decimalSeparator : ""); - }); - __expose({ - displayValue - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b()) - }, - [ - _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("head")) - }, - [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("content")) - }, - [ - _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("prefix")) - }, - [ - renderSlot(_ctx.$slots, "prefix", {}, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.prefix), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("number")), - style: normalizeStyle(_ctx.valueStyle) - }, - toDisplayString(displayValue.value), - 7 - ), - _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("suffix")) - }, - [ - renderSlot(_ctx.$slots, "suffix", {}, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.suffix), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var Statistic = _export_sfc(_sfc_main121, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]); - -// node_modules/element-plus/es/components/statistic/index.mjs -var ElStatistic = withInstall(Statistic); - -// node_modules/element-plus/es/components/countdown/src/countdown.mjs -var countdownProps = buildProps({ - format: { - type: String, - default: "HH:mm:ss" - }, - prefix: String, - suffix: String, - title: String, - value: { - type: definePropType([Number, Object]), - default: 0 - }, - valueStyle: { - type: definePropType([String, Object, Array]) - } -}); -var countdownEmits = { - finish: () => true, - [CHANGE_EVENT]: (value) => isNumber2(value) -}; - -// node_modules/element-plus/es/components/countdown/src/utils.mjs -var timeUnits2 = [ - ["Y", 1e3 * 60 * 60 * 24 * 365], - ["M", 1e3 * 60 * 60 * 24 * 30], - ["D", 1e3 * 60 * 60 * 24], - ["H", 1e3 * 60 * 60], - ["m", 1e3 * 60], - ["s", 1e3], - ["S", 1] -]; -var getTime = (value) => { - return isNumber2(value) ? new Date(value).getTime() : value.valueOf(); -}; -var formatTime = (timestamp2, format2) => { - let timeLeft = timestamp2; - const escapeRegex = /\[([^\]]*)]/g; - const replacedText = timeUnits2.reduce((current, [name, unit4]) => { - const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g"); - if (replaceRegex.test(current)) { - const value = Math.floor(timeLeft / unit4); - timeLeft -= value * unit4; - return current.replace( - replaceRegex, - (match) => String(value).padStart(match.length, "0") - ); - } - return current; - }, format2); - return replacedText.replace(escapeRegex, "$1"); -}; - -// node_modules/element-plus/es/components/countdown/src/countdown2.mjs -var _sfc_main122 = defineComponent({ - ...{ - name: "ElCountdown" - }, - __name: "countdown", - props: countdownProps, - emits: countdownEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - let timer; - const rawValue = ref(0); - const displayValue = computed(() => formatTime(rawValue.value, props2.format)); - const formatter2 = (val) => formatTime(val, props2.format); - const stopTimer = () => { - if (timer) { - cAF(timer); - timer = void 0; - } - }; - const startTimer = () => { - const timestamp2 = getTime(props2.value); - const frameFunc = () => { - let diff = timestamp2 - Date.now(); - emit(CHANGE_EVENT, diff); - if (diff <= 0) { - diff = 0; - stopTimer(); - emit("finish"); - } else { - timer = rAF(frameFunc); - } - rawValue.value = diff; - }; - timer = rAF(frameFunc); - }; - onMounted(() => { - rawValue.value = getTime(props2.value) - Date.now(); - watch( - () => [props2.value, props2.format], - () => { - stopTimer(); - startTimer(); - }, - { - immediate: true - } - ); - }); - onBeforeUnmount(() => { - stopTimer(); - }); - __expose({ - displayValue - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElStatistic), { - value: rawValue.value, - title: _ctx.title, - prefix: _ctx.prefix, - suffix: _ctx.suffix, - "value-style": _ctx.valueStyle, - formatter: formatter2 - }, createSlots({ - _: 2 - }, [ - renderList(_ctx.$slots, (_2, name) => { - return { - name, - fn: withCtx(() => [ - renderSlot(_ctx.$slots, name) - ]) - }; - }) - ]), 1032, ["value", "title", "prefix", "suffix", "value-style"]); - }; - } -}); -var Countdown = _export_sfc(_sfc_main122, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]); - -// node_modules/element-plus/es/components/countdown/index.mjs -var ElCountdown = withInstall(Countdown); - -// node_modules/element-plus/es/components/steps/src/steps2.mjs -var stepsProps = buildProps({ - space: { - type: [Number, String], - default: "" - }, - active: { - type: Number, - default: 0 - }, - direction: { - type: String, - default: "horizontal", - values: ["horizontal", "vertical"] - }, - alignCenter: { - type: Boolean - }, - simple: { - type: Boolean - }, - finishStatus: { - type: String, - values: ["wait", "process", "finish", "error", "success"], - default: "finish" - }, - processStatus: { - type: String, - values: ["wait", "process", "finish", "error", "success"], - default: "process" - } -}); -var stepsEmits = { - [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber2) -}; - -// node_modules/element-plus/es/components/steps/src/tokens.mjs -var STEPS_INJECTION_KEY = "ElSteps"; - -// node_modules/element-plus/es/components/steps/src/steps.mjs -var _sfc_main123 = defineComponent({ - ...{ - name: "ElSteps" - }, - __name: "steps", - props: stepsProps, - emits: stepsEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("steps"); - const { - children: steps, - addChild: addStep, - removeChild: removeStep, - ChildrenSorter: StepsSorter - } = useOrderedChildren(getCurrentInstance(), "ElStep"); - watch(steps, () => { - steps.value.forEach((instance, index) => { - instance.setIndex(index); - }); - }); - provide(STEPS_INJECTION_KEY, { props: props2, steps, addStep, removeStep }); - watch( - () => props2.active, - (newVal, oldVal) => { - emit(CHANGE_EVENT, newVal, oldVal); - } - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.simple ? "simple" : _ctx.direction)]) - }, - [ - renderSlot(_ctx.$slots, "default"), - createVNode(unref(StepsSorter)) - ], - 2 - ); - }; - } -}); -var Steps = _export_sfc(_sfc_main123, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]); - -// node_modules/element-plus/es/components/steps/src/item2.mjs -var stepProps = buildProps({ - title: { - type: String, - default: "" - }, - icon: { - type: iconPropType - }, - description: { - type: String, - default: "" - }, - status: { - type: String, - values: ["", "wait", "process", "finish", "error", "success"], - default: "" - } -}); - -// node_modules/element-plus/es/components/steps/src/item.mjs -var _sfc_main124 = defineComponent({ - ...{ - name: "ElStep" - }, - __name: "item", - props: stepProps, - setup(__props) { - const props2 = __props; - const ns = useNamespace("step"); - const index = ref(-1); - const lineStyle = ref({}); - const internalStatus = ref(""); - const parent2 = inject(STEPS_INJECTION_KEY); - const currentInstance = getCurrentInstance(); - let stepDiff = 0; - let beforeActive = 0; - onMounted(() => { - watch( - [ - () => parent2.props.active, - () => parent2.props.processStatus, - () => parent2.props.finishStatus - ], - ([active], [oldActive]) => { - beforeActive = oldActive || 0; - stepDiff = active - beforeActive; - updateStatus(active); - }, - { immediate: true } - ); - }); - const currentStatus = computed(() => { - return props2.status || internalStatus.value; - }); - const prevInternalStatus = computed(() => { - const prevStep = parent2.steps.value[index.value - 1]; - return prevStep ? prevStep.internalStatus.value : "wait"; - }); - const isCenter = computed(() => { - return parent2.props.alignCenter; - }); - const isVertical = computed(() => { - return parent2.props.direction === "vertical"; - }); - const isSimple = computed(() => { - return parent2.props.simple; - }); - const stepsCount = computed(() => { - return parent2.steps.value.length; - }); - const isLast = computed(() => { - var _a; - return ((_a = parent2.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === currentInstance.uid; - }); - const space = computed(() => { - return isSimple.value ? "" : parent2.props.space; - }); - const containerKls = computed(() => { - return [ - ns.b(), - ns.is(isSimple.value ? "simple" : parent2.props.direction), - ns.is("flex", isLast.value && !space.value && !isCenter.value), - ns.is("center", isCenter.value && !isVertical.value && !isSimple.value) - ]; - }); - const style = computed(() => { - const style2 = { - flexBasis: isNumber2(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` - }; - if (isVertical.value) - return style2; - if (isLast.value) { - style2.maxWidth = `${100 / stepsCount.value}%`; - } - return style2; - }); - const setIndex = (val) => { - index.value = val; - }; - const calcProgress = (status) => { - const isWait = status === "wait"; - const delayTimer = Math.abs(stepDiff) === 1 ? 0 : stepDiff > 0 ? (index.value + 1 - beforeActive) * 150 : -(index.value + 1 - parent2.props.active) * 150; - const style2 = { - transitionDelay: `${delayTimer}ms` - }; - const step2 = status === parent2.props.processStatus || isWait ? 0 : 100; - style2.borderWidth = step2 && !isSimple.value ? "1px" : 0; - style2[parent2.props.direction === "vertical" ? "height" : "width"] = `${step2}%`; - lineStyle.value = style2; - }; - const updateStatus = (activeIndex) => { - if (activeIndex > index.value) { - internalStatus.value = parent2.props.finishStatus; - } else if (activeIndex === index.value && prevInternalStatus.value !== "error") { - internalStatus.value = parent2.props.processStatus; - } else { - internalStatus.value = "wait"; - } - const prevChild = parent2.steps.value[index.value - 1]; - if (prevChild) - prevChild.calcProgress(internalStatus.value); - }; - const stepItemState = { - uid: currentInstance.uid, - getVnode: () => currentInstance.vnode, - currentStatus, - internalStatus, - setIndex, - calcProgress - }; - parent2.addStep(stepItemState); - onBeforeUnmount(() => { - parent2.removeStep(stepItemState); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - style: normalizeStyle(style.value), - class: normalizeClass(containerKls.value) - }, - [ - createCommentVNode(" icon & line "), - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("head"), unref(ns).is(currentStatus.value)]) - }, - [ - !isSimple.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("line")) - }, - [ - createBaseVNode( - "i", - { - class: normalizeClass(unref(ns).e("line-inner")), - style: normalizeStyle(lineStyle.value) - }, - null, - 6 - ) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")]) - }, - [ - renderSlot(_ctx.$slots, "icon", {}, () => [ - _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(ns).e("icon-inner")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - }, 8, ["class"])) : currentStatus.value === "success" ? (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")]) - }, { - default: withCtx(() => [ - createVNode(unref(check_default)) - ]), - _: 1 - }, 8, ["class"])) : currentStatus.value === "error" ? (openBlock(), createBlock(unref(ElIcon), { - key: 2, - class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")]) - }, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }, 8, ["class"])) : !isSimple.value ? (openBlock(), createElementBlock( - "div", - { - key: 3, - class: normalizeClass(unref(ns).e("icon-inner")) - }, - toDisplayString(index.value + 1), - 3 - )) : createCommentVNode("v-if", true) - ]) - ], - 2 - ) - ], - 2 - ), - createCommentVNode(" title & description "), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("main")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("title"), unref(ns).is(currentStatus.value)]) - }, - [ - renderSlot(_ctx.$slots, "title", {}, () => [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ]) - ], - 2 - ), - isSimple.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("arrow")) - }, - null, - 2 - )) : (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([unref(ns).e("description"), unref(ns).is(currentStatus.value)]) - }, - [ - renderSlot(_ctx.$slots, "description", {}, () => [ - createTextVNode( - toDisplayString(_ctx.description), - 1 - ) - ]) - ], - 2 - )) - ], - 2 - ) - ], - 6 - ); - }; - } -}); -var Step = _export_sfc(_sfc_main124, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]); - -// node_modules/element-plus/es/components/steps/index.mjs -var ElSteps = withInstall(Steps, { - Step -}); -var ElStep = withNoopInstall(Step); - -// node_modules/element-plus/es/utils/vue/validator.mjs -var isValidComponentSize = (val) => ["", ...componentSizes].includes(val); - -// node_modules/element-plus/es/components/switch/src/switch2.mjs -var switchProps = buildProps({ - modelValue: { - type: [Boolean, String, Number], - default: false - }, - disabled: { - type: Boolean, - default: void 0 - }, - loading: Boolean, - size: { - type: String, - validator: isValidComponentSize - }, - width: { - type: [String, Number], - default: "" - }, - inlinePrompt: Boolean, - inactiveActionIcon: { - type: iconPropType - }, - activeActionIcon: { - type: iconPropType - }, - activeIcon: { - type: iconPropType - }, - inactiveIcon: { - type: iconPropType - }, - activeText: { - type: String, - default: "" - }, - inactiveText: { - type: String, - default: "" - }, - activeValue: { - type: [Boolean, String, Number], - default: true - }, - inactiveValue: { - type: [Boolean, String, Number], - default: false - }, - name: { - type: String, - default: "" - }, - validateEvent: { - type: Boolean, - default: true - }, - beforeChange: { - type: definePropType(Function) - }, - id: String, - tabindex: { - type: [String, Number] - }, - ...useAriaProps(["ariaLabel"]) -}); -var switchEmits = { - [UPDATE_MODEL_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber2(val), - [CHANGE_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber2(val), - [INPUT_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber2(val) -}; - -// node_modules/element-plus/es/components/switch/src/switch.mjs -var _hoisted_165 = ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex"]; -var _hoisted_235 = ["aria-hidden"]; -var _hoisted_315 = { key: 1 }; -var _hoisted_410 = { key: 1 }; -var _hoisted_59 = ["aria-hidden"]; -var COMPONENT_NAME17 = "ElSwitch"; -var _sfc_main125 = defineComponent({ - ...{ - name: COMPONENT_NAME17 - }, - __name: "switch", - props: switchProps, - emits: switchEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { formItem } = useFormItem(); - const switchSize = useFormSize(); - const ns = useNamespace("switch"); - const { inputId } = useFormItemInputId(props2, { - formItemContext: formItem - }); - const switchDisabled = useFormDisabled( - computed(() => { - if (props2.loading) { - return true; - } - return void 0; - }) - ); - const isControlled = ref(props2.modelValue !== false); - const input = shallowRef(); - const switchKls = computed(() => [ - ns.b(), - ns.m(switchSize.value), - ns.is("disabled", switchDisabled.value), - ns.is("checked", checked.value) - ]); - const labelLeftKls = computed(() => [ - ns.e("label"), - ns.em("label", "left"), - ns.is("active", !checked.value) - ]); - const labelRightKls = computed(() => [ - ns.e("label"), - ns.em("label", "right"), - ns.is("active", checked.value) - ]); - const coreStyle = computed(() => ({ - width: addUnit(props2.width) - })); - watch( - () => props2.modelValue, - () => { - isControlled.value = true; - } - ); - const actualValue = computed(() => { - return isControlled.value ? props2.modelValue : false; - }); - const checked = computed(() => actualValue.value === props2.activeValue); - if (![props2.activeValue, props2.inactiveValue].includes(actualValue.value)) { - emit(UPDATE_MODEL_EVENT, props2.inactiveValue); - emit(CHANGE_EVENT, props2.inactiveValue); - emit(INPUT_EVENT, props2.inactiveValue); - } - watch(checked, (val) => { - var _a; - input.value.checked = val; - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err)); - } - }); - const handleChange = () => { - const val = checked.value ? props2.inactiveValue : props2.activeValue; - emit(UPDATE_MODEL_EVENT, val); - emit(CHANGE_EVENT, val); - emit(INPUT_EVENT, val); - nextTick(() => { - input.value.checked = checked.value; - }); - }; - const switchValue = () => { - if (switchDisabled.value) - return; - const { beforeChange } = props2; - if (!beforeChange) { - handleChange(); - return; - } - const shouldChange = beforeChange(); - const isPromiseOrBool = [ - isPromise(shouldChange), - isBoolean2(shouldChange) - ].includes(true); - if (!isPromiseOrBool) { - throwError( - COMPONENT_NAME17, - "beforeChange must return type `Promise` or `boolean`" - ); - } - if (isPromise(shouldChange)) { - shouldChange.then((result2) => { - if (result2) { - handleChange(); - } - }).catch((e) => { - debugWarn(COMPONENT_NAME17, `some error occurred: ${e}`); - }); - } else if (shouldChange) { - handleChange(); - } - }; - const focus = () => { - var _a, _b; - (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a); - }; - onMounted(() => { - input.value.checked = checked.value; - }); - __expose({ - focus, - checked - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(switchKls.value), - onClick: withModifiers(switchValue, ["prevent"]) - }, - [ - createBaseVNode("input", { - id: unref(inputId), - ref_key: "input", - ref: input, - class: normalizeClass(unref(ns).e("input")), - type: "checkbox", - role: "switch", - "aria-checked": checked.value, - "aria-disabled": unref(switchDisabled), - "aria-label": _ctx.ariaLabel, - name: _ctx.name, - "true-value": _ctx.activeValue, - "false-value": _ctx.inactiveValue, - disabled: unref(switchDisabled), - tabindex: _ctx.tabindex, - onChange: handleChange, - onKeydown: withKeys(switchValue, ["enter"]) - }, null, 42, _hoisted_165), - !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText || _ctx.$slots.inactive) ? (openBlock(), createElementBlock( - "span", - { - key: 0, - class: normalizeClass(labelLeftKls.value) - }, - [ - renderSlot(_ctx.$slots, "inactive", {}, () => [ - _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - !_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock("span", { - key: 1, - "aria-hidden": checked.value - }, toDisplayString(_ctx.inactiveText), 9, _hoisted_235)) : createCommentVNode("v-if", true) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("core")), - style: normalizeStyle(coreStyle.value) - }, - [ - _ctx.inlinePrompt ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("inner")) - }, - [ - !checked.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("inner-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "inactive", {}, () => [ - _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - !_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock( - "span", - _hoisted_315, - toDisplayString(_ctx.inactiveText), - 1 - )) : createCommentVNode("v-if", true) - ]) - ], - 2 - )) : (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("inner-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "active", {}, () => [ - _ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - !_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock( - "span", - _hoisted_410, - toDisplayString(_ctx.activeText), - 1 - )) : createCommentVNode("v-if", true) - ]) - ], - 2 - )) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("action")) - }, - [ - _ctx.loading ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(ns).is("loading")) - }, { - default: withCtx(() => [ - createVNode(unref(loading_default)) - ]), - _: 1 - }, 8, ["class"])) : checked.value ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [ - _ctx.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.activeActionIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true) - ]) : !checked.value ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [ - _ctx.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveActionIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true) - ]) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 6 - ), - !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText || _ctx.$slots.active) ? (openBlock(), createElementBlock( - "span", - { - key: 1, - class: normalizeClass(labelRightKls.value) - }, - [ - renderSlot(_ctx.$slots, "active", {}, () => [ - _ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon))) - ]), - _: 1 - })) : createCommentVNode("v-if", true), - !_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock("span", { - key: 1, - "aria-hidden": !checked.value - }, toDisplayString(_ctx.activeText), 9, _hoisted_59)) : createCommentVNode("v-if", true) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var Switch = _export_sfc(_sfc_main125, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]); - -// node_modules/element-plus/es/components/switch/index.mjs -var ElSwitch = withInstall(Switch); - -// node_modules/element-plus/es/components/table/src/util.mjs -var getCell = function(event) { - var _a; - return (_a = event.target) == null ? void 0 : _a.closest("td"); -}; -var orderBy2 = function(array4, sortKey, reverse2, sortMethod, sortBy2) { - if (!sortKey && !sortMethod && (!sortBy2 || isArray(sortBy2) && !sortBy2.length)) { - return array4; - } - if (isString(reverse2)) { - reverse2 = reverse2 === "descending" ? -1 : 1; - } else { - reverse2 = reverse2 && reverse2 < 0 ? -1 : 1; - } - const getKey = sortMethod ? null : function(value, index) { - if (sortBy2) { - return flatMap_default(castArray_default(sortBy2), (by) => { - if (isString(by)) { - return get_default(value, by); - } else { - return by(value, index, array4); - } - }); - } - if (sortKey !== "$key") { - if (isObject(value) && "$value" in value) - value = value.$value; - } - return [ - isObject(value) ? sortKey ? get_default(value, sortKey) : null : value - ]; - }; - const compare = function(a2, b2) { - var _a, _b, _c, _d, _e, _f; - if (sortMethod) { - return sortMethod(a2.value, b2.value); - } - for (let i = 0, len = (_b = (_a = a2.key) == null ? void 0 : _a.length) != null ? _b : 0; i < len; i++) { - if (((_c = a2.key) == null ? void 0 : _c[i]) < ((_d = b2.key) == null ? void 0 : _d[i])) { - return -1; - } - if (((_e = a2.key) == null ? void 0 : _e[i]) > ((_f = b2.key) == null ? void 0 : _f[i])) { - return 1; - } - } - return 0; - }; - return array4.map((value, index) => { - return { - value, - index, - key: getKey ? getKey(value, index) : null - }; - }).sort((a2, b2) => { - let order = compare(a2, b2); - if (!order) { - order = a2.index - b2.index; - } - return order * +reverse2; - }).map((item) => item.value); -}; -var getColumnById = function(table, columnId) { - let column2 = null; - table.columns.forEach((item) => { - if (item.id === columnId) { - column2 = item; - } - }); - return column2; -}; -var getColumnByKey = function(table, columnKey) { - let column2 = null; - for (let i = 0; i < table.columns.length; i++) { - const item = table.columns[i]; - if (item.columnKey === columnKey) { - column2 = item; - break; - } - } - if (!column2) - throwError("ElTable", `No column matching with column-key: ${columnKey}`); - return column2; -}; -var getColumnByCell = function(table, cell, namespace) { - const matches2 = (cell.className || "").match( - new RegExp(`${namespace}-table_[^\\s]+`, "gm") - ); - if (matches2) { - return getColumnById(table, matches2[0]); - } - return null; -}; -var getRowIdentity = (row, rowKey2) => { - if (!row) - throw new Error("Row is required when get row identity"); - if (isString(rowKey2)) { - if (!rowKey2.includes(".")) { - return `${row[rowKey2]}`; - } - const key = rowKey2.split("."); - let current = row; - for (const element of key) { - current = current[element]; - } - return `${current}`; - } else if (isFunction(rowKey2)) { - return rowKey2.call(null, row); - } - return ""; -}; -var getKeysMap = function(array4, rowKey2, flatten2 = false, childrenKey = "children") { - const data = array4 || []; - const arrayMap2 = {}; - data.forEach((row, index) => { - arrayMap2[getRowIdentity(row, rowKey2)] = { row, index }; - if (flatten2) { - const children = row[childrenKey]; - if (isArray(children)) { - Object.assign(arrayMap2, getKeysMap(children, rowKey2, true, childrenKey)); - } - } - }); - return arrayMap2; -}; -function mergeOptions(defaults2, config) { - const options = {}; - let key; - for (key in defaults2) { - options[key] = defaults2[key]; - } - for (key in config) { - if (hasOwn(config, key)) { - const value = config[key]; - if (!isUndefined2(value)) { - options[key] = value; - } - } - } - return options; -} -function parseWidth(width) { - if (width === "") - return width; - if (!isUndefined2(width)) { - width = Number.parseInt(width, 10); - if (Number.isNaN(width)) { - width = ""; - } - } - return width; -} -function parseMinWidth(minWidth) { - if (minWidth === "") - return minWidth; - if (!isUndefined2(minWidth)) { - minWidth = parseWidth(minWidth); - if (Number.isNaN(minWidth)) { - minWidth = 80; - } - } - return minWidth; -} -function parseHeight(height) { - if (isNumber2(height)) { - return height; - } - if (isString(height)) { - if (/^\d+(?:px)?$/.test(height)) { - return Number.parseInt(height, 10); - } else { - return height; - } - } - return null; -} -function compose(...funcs) { - if (funcs.length === 0) { - return (arg) => arg; - } - if (funcs.length === 1) { - return funcs[0]; - } - return funcs.reduce( - (a2, b2) => (...args) => a2(b2(...args)) - ); -} -function toggleRowStatus(statusArr, row, newVal, tableTreeProps, selectable, rowIndex, rowKey2) { - let _rowIndex = rowIndex != null ? rowIndex : 0; - let changed = false; - const getIndex = () => { - if (!rowKey2) { - return statusArr.indexOf(row); - } - const id = getRowIdentity(row, rowKey2); - return statusArr.findIndex((item) => getRowIdentity(item, rowKey2) === id); - }; - const index = getIndex(); - const included = index !== -1; - const isRowSelectable = selectable == null ? void 0 : selectable.call(null, row, _rowIndex); - const toggleStatus = (type4) => { - if (type4 === "add") { - statusArr.push(row); - } else { - statusArr.splice(index, 1); - } - changed = true; - }; - const getChildrenCount = (row2) => { - let count = 0; - const children = (tableTreeProps == null ? void 0 : tableTreeProps.children) && row2[tableTreeProps.children]; - if (children && isArray(children)) { - count += children.length; - children.forEach((item) => { - count += getChildrenCount(item); - }); - } - return count; - }; - if (!selectable || isRowSelectable) { - if (isBoolean2(newVal)) { - if (newVal && !included) { - toggleStatus("add"); - } else if (!newVal && included) { - toggleStatus("remove"); - } - } else { - included ? toggleStatus("remove") : toggleStatus("add"); - } - } - if (!(tableTreeProps == null ? void 0 : tableTreeProps.checkStrictly) && (tableTreeProps == null ? void 0 : tableTreeProps.children) && isArray(row[tableTreeProps.children])) { - row[tableTreeProps.children].forEach((item) => { - const childChanged = toggleRowStatus( - statusArr, - item, - newVal != null ? newVal : !included, - tableTreeProps, - selectable, - _rowIndex + 1, - rowKey2 - ); - _rowIndex += getChildrenCount(item) + 1; - if (childChanged) { - changed = childChanged; - } - }); - } - return changed; -} -function walkTreeNode(root2, cb, childrenKey = "children", lazyKey = "hasChildren", lazy = false) { - const isNil2 = (array4) => !(isArray(array4) && array4.length); - function _walker(parent2, children, level) { - cb(parent2, children, level); - children.forEach((item) => { - if (item[lazyKey] && lazy) { - cb(item, null, level + 1); - return; - } - const children2 = item[childrenKey]; - if (!isNil2(children2)) { - _walker(item, children2, level + 1); - } - }); - } - root2.forEach((item) => { - if (item[lazyKey] && lazy) { - cb(item, null, 0); - return; - } - const children = item[childrenKey]; - if (!isNil2(children)) { - _walker(item, children, 0); - } - }); -} -var getTableOverflowTooltipProps = (props2, innerText, row, column2) => { - const popperOptions = { - strategy: "fixed", - ...props2.popperOptions - }; - const tooltipFormatterContent = isFunction(column2 == null ? void 0 : column2.tooltipFormatter) ? column2.tooltipFormatter({ - row, - column: column2, - cellValue: getProp(row, column2.property).value - }) : void 0; - if (isVNode(tooltipFormatterContent)) { - return { - slotContent: tooltipFormatterContent, - content: null, - ...props2, - popperOptions - }; - } - return { - slotContent: null, - content: tooltipFormatterContent != null ? tooltipFormatterContent : innerText, - ...props2, - popperOptions - }; -}; -var removePopper = null; -function createTablePopper(props2, popperContent, row, column2, trigger, table) { - var _a; - const tableOverflowTooltipProps = getTableOverflowTooltipProps( - props2, - popperContent, - row, - column2 - ); - const mergedProps = { - ...tableOverflowTooltipProps, - slotContent: void 0 - }; - if ((removePopper == null ? void 0 : removePopper.trigger) === trigger) { - const comp = (_a = removePopper.vm) == null ? void 0 : _a.component; - merge_default(comp == null ? void 0 : comp.props, mergedProps); - if (comp && tableOverflowTooltipProps.slotContent) { - comp.slots.content = () => [tableOverflowTooltipProps.slotContent]; - } - return; - } - removePopper == null ? void 0 : removePopper(); - const parentNode = table == null ? void 0 : table.refs.tableWrapper; - const ns = parentNode == null ? void 0 : parentNode.dataset.prefix; - const vm = createVNode( - ElTooltip, - { - virtualTriggering: true, - virtualRef: trigger, - appendTo: parentNode, - placement: "top", - transition: "none", - offset: 0, - hideAfter: 0, - ...mergedProps - }, - tableOverflowTooltipProps.slotContent ? { - content: () => tableOverflowTooltipProps.slotContent - } : void 0 - ); - vm.appContext = { ...table.appContext, ...table }; - const container = document.createElement("div"); - render(vm, container); - vm.component.exposed.onOpen(); - const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns}-scrollbar__wrap`); - removePopper = () => { - var _a2, _b; - if ((_b = (_a2 = vm.component) == null ? void 0 : _a2.exposed) == null ? void 0 : _b.onClose) { - vm.component.exposed.onClose(); - } - render(null, container); - const currentRemovePopper = removePopper; - scrollContainer == null ? void 0 : scrollContainer.removeEventListener("scroll", currentRemovePopper); - currentRemovePopper.trigger = void 0; - currentRemovePopper.vm = void 0; - removePopper = null; - }; - removePopper.trigger = trigger != null ? trigger : void 0; - removePopper.vm = vm; - scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper); -} -function getCurrentColumns(column2) { - if (column2.children) { - return flatMap_default(column2.children, getCurrentColumns); - } else { - return [column2]; - } -} -function getColSpan(colSpan, column2) { - return colSpan + column2.colSpan; -} -var isFixedColumn = (index, fixed, store, realColumns) => { - let start = 0; - let after2 = index; - const columns2 = store.states.columns.value; - if (realColumns) { - const curColumns = getCurrentColumns(realColumns[index]); - const preColumns = columns2.slice(0, columns2.indexOf(curColumns[0])); - start = preColumns.reduce(getColSpan, 0); - after2 = start + curColumns.reduce(getColSpan, 0) - 1; - } else { - start = index; - } - let fixedLayout; - switch (fixed) { - case "left": - if (after2 < store.states.fixedLeafColumnsLength.value) { - fixedLayout = "left"; - } - break; - case "right": - if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) { - fixedLayout = "right"; - } - break; - default: - if (after2 < store.states.fixedLeafColumnsLength.value) { - fixedLayout = "left"; - } else if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) { - fixedLayout = "right"; - } - } - return fixedLayout ? { - direction: fixedLayout, - start, - after: after2 - } : {}; -}; -var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset3 = 0) => { - const classes = []; - const { direction: direction2, start, after: after2 } = isFixedColumn( - index, - fixed, - store, - realColumns - ); - if (direction2) { - const isLeft = direction2 === "left"; - classes.push(`${namespace}-fixed-column--${direction2}`); - if (isLeft && after2 + offset3 === store.states.fixedLeafColumnsLength.value - 1) { - classes.push("is-last-column"); - } else if (!isLeft && start - offset3 === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) { - classes.push("is-first-column"); - } - } - return classes; -}; -function getOffset(offset3, column2) { - return offset3 + (isNull_default(column2.realWidth) || Number.isNaN(column2.realWidth) ? Number(column2.width) : column2.realWidth); -} -var getFixedColumnOffset = (index, fixed, store, realColumns) => { - const { - direction: direction2, - start = 0, - after: after2 = 0 - } = isFixedColumn(index, fixed, store, realColumns); - if (!direction2) { - return; - } - const styles = {}; - const isLeft = direction2 === "left"; - const columns2 = store.states.columns.value; - if (isLeft) { - styles.left = columns2.slice(0, start).reduce(getOffset, 0); - } else { - styles.right = columns2.slice(after2 + 1).reverse().reduce(getOffset, 0); - } - return styles; -}; -var ensurePosition = (style, key) => { - if (!style) - return; - if (!Number.isNaN(style[key])) { - style[key] = `${style[key]}px`; - } -}; -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) { - return false; - } - return true; - }) ? vnodes : null; -} - -// node_modules/element-plus/es/components/table/src/store/expand.mjs -function useExpand(watcherData) { - const instance = getCurrentInstance(); - const defaultExpandAll = ref(false); - const expandRows = ref([]); - const updateExpandRows = () => { - const data = watcherData.data.value || []; - const rowKey2 = watcherData.rowKey.value; - if (defaultExpandAll.value) { - expandRows.value = data.slice(); - } else if (rowKey2) { - const expandRowsMap = getKeysMap(expandRows.value, rowKey2); - expandRows.value = data.reduce((prev, row) => { - const rowId = getRowIdentity(row, rowKey2); - const rowInfo = expandRowsMap[rowId]; - if (rowInfo) { - prev.push(row); - } - return prev; - }, []); - } else { - expandRows.value = []; - } - }; - const toggleRowExpansion = (row, expanded) => { - const changed = toggleRowStatus( - expandRows.value, - row, - expanded, - void 0, - void 0, - void 0, - watcherData.rowKey.value - ); - if (changed) { - instance.emit("expand-change", row, expandRows.value.slice()); - } - }; - const setExpandRowKeys = (rowKeys) => { - instance.store.assertRowKey(); - const data = watcherData.data.value || []; - const rowKey2 = watcherData.rowKey.value; - const keysMap = getKeysMap(data, rowKey2); - expandRows.value = rowKeys.reduce((prev, cur) => { - const info = keysMap[cur]; - if (info) { - prev.push(info.row); - } - return prev; - }, []); - }; - const isRowExpanded = (row) => { - const rowKey2 = watcherData.rowKey.value; - if (rowKey2) { - const expandMap = getKeysMap(expandRows.value, rowKey2); - return !!expandMap[getRowIdentity(row, rowKey2)]; - } - return expandRows.value.includes(row); - }; - return { - updateExpandRows, - toggleRowExpansion, - setExpandRowKeys, - isRowExpanded, - states: { - expandRows, - defaultExpandAll - } - }; -} - -// node_modules/element-plus/es/components/table/src/store/current.mjs -function useCurrent(watcherData) { - const instance = getCurrentInstance(); - const _currentRowKey = ref(null); - const currentRow = ref(null); - const setCurrentRowKey = (key) => { - instance.store.assertRowKey(); - _currentRowKey.value = key; - setCurrentRowByKey(key); - }; - const restoreCurrentRowKey = () => { - _currentRowKey.value = null; - }; - const setCurrentRowByKey = (key) => { - var _a; - const { data, rowKey: rowKey2 } = watcherData; - const oldCurrentRow = currentRow.value; - let _currentRow = null; - if (rowKey2.value) { - _currentRow = (_a = (unref(data) || []).find( - (item) => getRowIdentity(item, rowKey2.value) === key - )) != null ? _a : null; - } - currentRow.value = _currentRow != null ? _currentRow : null; - instance.emit("current-change", currentRow.value, oldCurrentRow); - }; - const updateCurrentRow = (_currentRow) => { - const oldCurrentRow = currentRow.value; - if (_currentRow && _currentRow !== oldCurrentRow) { - currentRow.value = _currentRow; - instance.emit("current-change", currentRow.value, oldCurrentRow); - return; - } - if (!_currentRow && oldCurrentRow) { - currentRow.value = null; - instance.emit("current-change", null, oldCurrentRow); - } - }; - const updateCurrentRowData = () => { - const rowKey2 = watcherData.rowKey.value; - const data = watcherData.data.value || []; - const oldCurrentRow = currentRow.value; - if (oldCurrentRow && !data.includes(oldCurrentRow)) { - if (rowKey2) { - const currentRowKey = getRowIdentity(oldCurrentRow, rowKey2); - setCurrentRowByKey(currentRowKey); - } else { - currentRow.value = null; - instance.emit("current-change", null, oldCurrentRow); - } - } else if (_currentRowKey.value) { - setCurrentRowByKey(_currentRowKey.value); - restoreCurrentRowKey(); - } - }; - return { - setCurrentRowKey, - restoreCurrentRowKey, - setCurrentRowByKey, - updateCurrentRow, - updateCurrentRowData, - states: { - _currentRowKey, - currentRow - } - }; -} - -// node_modules/element-plus/es/components/table/src/store/tree.mjs -function useTree(watcherData) { - const expandRowKeys = ref([]); - const treeData = ref({}); - const indent = ref(16); - const lazy = ref(false); - const lazyTreeNodeMap = ref({}); - const lazyColumnIdentifier = ref("hasChildren"); - const childrenColumnName = ref("children"); - const checkStrictly = ref(false); - const instance = getCurrentInstance(); - const normalizedData = computed(() => { - if (!watcherData.rowKey.value) - return {}; - const data = watcherData.data.value || []; - return normalize(data); - }); - const normalizedLazyNode = computed(() => { - const rowKey2 = watcherData.rowKey.value; - const keys3 = Object.keys(lazyTreeNodeMap.value); - const res = {}; - if (!keys3.length) - return res; - keys3.forEach((key) => { - if (lazyTreeNodeMap.value[key].length) { - const item = { children: [] }; - lazyTreeNodeMap.value[key].forEach((row) => { - const currentRowKey = getRowIdentity(row, rowKey2); - item.children.push(currentRowKey); - if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) { - res[currentRowKey] = { children: [] }; - } - }); - res[key] = item; - } - }); - return res; - }); - const normalize = (data) => { - const rowKey2 = watcherData.rowKey.value; - const res = {}; - walkTreeNode( - data, - (parent2, children, level) => { - const parentId = getRowIdentity(parent2, rowKey2); - if (isArray(children)) { - res[parentId] = { - children: children.map((row) => getRowIdentity(row, rowKey2)), - level - }; - } else if (lazy.value) { - res[parentId] = { - children: [], - lazy: true, - level - }; - } - }, - childrenColumnName.value, - lazyColumnIdentifier.value, - lazy.value - ); - return res; - }; - const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll) => { - var _a, _b; - ifExpandAll || (ifExpandAll = (_a = instance.store) == null ? void 0 : _a.states.defaultExpandAll.value); - const nested = normalizedData.value; - const normalizedLazyNode_ = normalizedLazyNode.value; - const keys3 = Object.keys(nested); - const newTreeData = {}; - if (keys3.length) { - const oldTreeData = unref(treeData); - const rootLazyRowKeys = []; - const getExpanded = (oldValue, key) => { - if (ifChangeExpandRowKeys) { - if (expandRowKeys.value) { - return ifExpandAll || expandRowKeys.value.includes(key); - } else { - return !!(ifExpandAll || (oldValue == null ? void 0 : oldValue.expanded)); - } - } else { - const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key); - return !!((oldValue == null ? void 0 : oldValue.expanded) || included); - } - }; - keys3.forEach((key) => { - const oldValue = oldTreeData[key]; - const newValue = { ...nested[key] }; - newValue.expanded = getExpanded(oldValue, key); - if (newValue.lazy) { - const { loaded = false, loading = false } = oldValue || {}; - newValue.loaded = !!loaded; - newValue.loading = !!loading; - rootLazyRowKeys.push(key); - } - newTreeData[key] = newValue; - }); - const lazyKeys = Object.keys(normalizedLazyNode_); - if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) { - lazyKeys.forEach((key) => { - var _a2; - const oldValue = oldTreeData[key]; - const lazyNodeChildren = normalizedLazyNode_[key].children; - if (rootLazyRowKeys.includes(key)) { - if (((_a2 = newTreeData[key].children) == null ? void 0 : _a2.length) !== 0) { - throw new Error("[ElTable]children must be an empty array."); - } - newTreeData[key].children = lazyNodeChildren; - } else { - const { loaded = false, loading = false } = oldValue || {}; - newTreeData[key] = { - lazy: true, - loaded: !!loaded, - loading: !!loading, - expanded: getExpanded(oldValue, key), - children: lazyNodeChildren, - level: void 0 - }; - } - }); - } - } - treeData.value = newTreeData; - (_b = instance.store) == null ? void 0 : _b.updateTableScrollY(); - }; - watch( - () => expandRowKeys.value, - () => { - updateTreeData(true); - } - ); - watch( - () => normalizedData.value, - () => { - updateTreeData(); - } - ); - watch( - () => normalizedLazyNode.value, - () => { - updateTreeData(); - } - ); - const updateTreeExpandKeys = (value) => { - expandRowKeys.value = value; - updateTreeData(); - }; - const isUseLazy = (data) => { - return lazy.value && data && "loaded" in data && !data.loaded; - }; - const toggleTreeExpansion = (row, expanded) => { - instance.store.assertRowKey(); - const rowKey2 = watcherData.rowKey.value; - const id = getRowIdentity(row, rowKey2); - const data = id && treeData.value[id]; - if (id && data && "expanded" in data) { - const oldExpanded = data.expanded; - expanded = isUndefined2(expanded) ? !data.expanded : expanded; - treeData.value[id].expanded = expanded; - if (oldExpanded !== expanded) { - instance.emit("expand-change", row, expanded); - } - expanded && isUseLazy(data) && loadData(row, id, data); - instance.store.updateTableScrollY(); - } - }; - const loadOrToggle = (row) => { - instance.store.assertRowKey(); - const rowKey2 = watcherData.rowKey.value; - const id = getRowIdentity(row, rowKey2); - const data = treeData.value[id]; - if (isUseLazy(data)) { - loadData(row, id, data); - } else { - toggleTreeExpansion(row, void 0); - } - }; - const loadData = (row, key, treeNode) => { - const { load } = instance.props; - if (load && !treeData.value[key].loaded) { - treeData.value[key].loading = true; - load(row, treeNode, (data) => { - if (!isArray(data)) { - throw new TypeError("[ElTable] data must be an array"); - } - treeData.value[key].loading = false; - treeData.value[key].loaded = true; - treeData.value[key].expanded = true; - if (data.length) { - lazyTreeNodeMap.value[key] = data; - } - instance.emit("expand-change", row, true); - }); - } - }; - const updateKeyChildren = (key, data) => { - const { lazy: lazy2, rowKey: rowKey2 } = instance.props; - if (!lazy2) - return; - if (!rowKey2) - throw new Error("[Table] rowKey is required in updateKeyChild"); - if (lazyTreeNodeMap.value[key]) { - lazyTreeNodeMap.value[key] = data; - } - }; - return { - loadData, - loadOrToggle, - toggleTreeExpansion, - updateTreeExpandKeys, - updateTreeData, - updateKeyChildren, - normalize, - states: { - expandRowKeys, - treeData, - indent, - lazy, - lazyTreeNodeMap, - lazyColumnIdentifier, - childrenColumnName, - checkStrictly - } - }; -} - -// node_modules/element-plus/es/components/table/src/store/watcher.mjs -var sortData = (data, states) => { - const sortingColumn = states.sortingColumn; - if (!sortingColumn || isString(sortingColumn.sortable)) { - return data; - } - return orderBy2( - data, - states.sortProp, - states.sortOrder, - sortingColumn.sortMethod, - sortingColumn.sortBy - ); -}; -var doFlattenColumns = (columns2) => { - const result2 = []; - columns2.forEach((column2) => { - if (column2.children && column2.children.length > 0) { - result2.push.apply(result2, doFlattenColumns(column2.children)); - } else { - result2.push(column2); - } - }); - return result2; -}; -function useWatcher() { - var _a; - const instance = getCurrentInstance(); - const { size: tableSize } = toRefs((_a = instance.proxy) == null ? void 0 : _a.$props); - const rowKey2 = ref(null); - const data = ref([]); - const _data = ref([]); - const isComplex = ref(false); - const _columns = ref([]); - const originColumns = ref([]); - const columns2 = ref([]); - const fixedColumns = ref([]); - const rightFixedColumns = ref([]); - const leafColumns = ref([]); - const fixedLeafColumns = ref([]); - const rightFixedLeafColumns = ref([]); - const updateOrderFns = []; - const leafColumnsLength = ref(0); - const fixedLeafColumnsLength = ref(0); - const rightFixedLeafColumnsLength = ref(0); - const isAllSelected = ref(false); - const selection = ref([]); - const reserveSelection = ref(false); - const selectOnIndeterminate = ref(false); - const selectable = ref(null); - const filters = ref({}); - const filteredData = ref(null); - const sortingColumn = ref(null); - const sortProp = ref(null); - const sortOrder = ref(null); - const hoverRow = ref(null); - const selectedMap = computed(() => { - return rowKey2.value ? getKeysMap(selection.value, rowKey2.value) : void 0; - }); - watch( - data, - () => { - var _a2; - if (instance.state) { - scheduleLayout(false); - const needUpdateFixed = instance.props.tableLayout === "auto"; - if (needUpdateFixed) { - (_a2 = instance.refs.tableHeaderRef) == null ? void 0 : _a2.updateFixedColumnStyle(); - } - } - }, - { - deep: true - } - ); - const assertRowKey = () => { - if (!rowKey2.value) - throw new Error("[ElTable] prop row-key is required"); - }; - const updateChildFixed = (column2) => { - var _a2; - (_a2 = column2.children) == null ? void 0 : _a2.forEach((childColumn) => { - childColumn.fixed = column2.fixed; - updateChildFixed(childColumn); - }); - }; - const updateColumns = () => { - _columns.value.forEach((column2) => { - updateChildFixed(column2); - }); - fixedColumns.value = _columns.value.filter( - (column2) => [true, "left"].includes(column2.fixed) - ); - const selectColumn = _columns.value.find( - (column2) => column2.type === "selection" - ); - let selectColFixLeft; - if (selectColumn && selectColumn.fixed !== "right" && !fixedColumns.value.includes(selectColumn)) { - const selectColumnIndex = _columns.value.indexOf(selectColumn); - if (selectColumnIndex === 0 && fixedColumns.value.length) { - fixedColumns.value.unshift(selectColumn); - selectColFixLeft = true; - } - } - rightFixedColumns.value = _columns.value.filter( - (column2) => column2.fixed === "right" - ); - const notFixedColumns = _columns.value.filter( - (column2) => (selectColFixLeft ? column2.type !== "selection" : true) && !column2.fixed - ); - originColumns.value = Array.from(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value); - const leafColumns2 = doFlattenColumns(notFixedColumns); - const fixedLeafColumns2 = doFlattenColumns(fixedColumns.value); - const rightFixedLeafColumns2 = doFlattenColumns(rightFixedColumns.value); - leafColumnsLength.value = leafColumns2.length; - fixedLeafColumnsLength.value = fixedLeafColumns2.length; - rightFixedLeafColumnsLength.value = rightFixedLeafColumns2.length; - columns2.value = Array.from(fixedLeafColumns2).concat(leafColumns2).concat(rightFixedLeafColumns2); - isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0; - }; - const scheduleLayout = (needUpdateColumns, immediate = false) => { - if (needUpdateColumns) { - updateColumns(); - } - if (immediate) { - instance.state.doLayout(); - } else { - instance.state.debouncedUpdateLayout(); - } - }; - const isSelected = (row) => { - if (selectedMap.value) { - return !!selectedMap.value[getRowIdentity(row, rowKey2.value)]; - } else { - return selection.value.includes(row); - } - }; - const clearSelection = () => { - isAllSelected.value = false; - const oldSelection = selection.value; - selection.value = []; - if (oldSelection.length) { - instance.emit("selection-change", []); - } - }; - const cleanSelection = () => { - var _a2, _b; - let deleted; - if (rowKey2.value) { - deleted = []; - const childrenKey = (_b = (_a2 = instance == null ? void 0 : instance.store) == null ? void 0 : _a2.states) == null ? void 0 : _b.childrenColumnName.value; - const dataMap = getKeysMap(data.value, rowKey2.value, true, childrenKey); - for (const key in selectedMap.value) { - if (hasOwn(selectedMap.value, key) && !dataMap[key]) { - deleted.push(selectedMap.value[key].row); - } - } - } else { - deleted = selection.value.filter((item) => !data.value.includes(item)); - } - if (deleted.length) { - const newSelection = selection.value.filter( - (item) => !deleted.includes(item) - ); - selection.value = newSelection; - instance.emit("selection-change", newSelection.slice()); - } - }; - const getSelectionRows = () => { - return (selection.value || []).slice(); - }; - const toggleRowSelection = (row, selected, emitChange = true, ignoreSelectable = false) => { - var _a2, _b, _c, _d; - const treeProps3 = { - children: (_b = (_a2 = instance == null ? void 0 : instance.store) == null ? void 0 : _a2.states) == null ? void 0 : _b.childrenColumnName.value, - checkStrictly: (_d = (_c = instance == null ? void 0 : instance.store) == null ? void 0 : _c.states) == null ? void 0 : _d.checkStrictly.value - }; - const changed = toggleRowStatus( - selection.value, - row, - selected, - treeProps3, - ignoreSelectable ? void 0 : selectable.value, - data.value.indexOf(row), - rowKey2.value - ); - if (changed) { - const newSelection = (selection.value || []).slice(); - if (emitChange) { - instance.emit("select", newSelection, row); - } - instance.emit("selection-change", newSelection); - } - }; - const _toggleAllSelection = () => { - var _a2, _b; - const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length); - isAllSelected.value = value; - let selectionChanged = false; - let childrenCount = 0; - const rowKey22 = (_b = (_a2 = instance == null ? void 0 : instance.store) == null ? void 0 : _a2.states) == null ? void 0 : _b.rowKey.value; - const { childrenColumnName } = instance.store.states; - const treeProps3 = { - children: childrenColumnName.value, - checkStrictly: false - }; - data.value.forEach((row, index) => { - const rowIndex = index + childrenCount; - if (toggleRowStatus( - selection.value, - row, - value, - treeProps3, - selectable.value, - rowIndex, - rowKey22 - )) { - selectionChanged = true; - } - childrenCount += getChildrenCount(getRowIdentity(row, rowKey22)); - }); - if (selectionChanged) { - instance.emit( - "selection-change", - selection.value ? selection.value.slice() : [] - ); - } - instance.emit("select-all", (selection.value || []).slice()); - }; - const updateAllSelected = () => { - var _a2; - if (((_a2 = data.value) == null ? void 0 : _a2.length) === 0) { - isAllSelected.value = false; - return; - } - const { childrenColumnName } = instance.store.states; - let rowIndex = 0; - let selectedCount = 0; - const checkSelectedStatus = (data2) => { - var _a3; - for (const row of data2) { - const isRowSelectable = selectable.value && selectable.value.call(null, row, rowIndex); - if (!isSelected(row)) { - if (!selectable.value || isRowSelectable) { - return false; - } - } else { - selectedCount++; - } - rowIndex++; - if (((_a3 = row[childrenColumnName.value]) == null ? void 0 : _a3.length) && !checkSelectedStatus(row[childrenColumnName.value])) { - return false; - } - } - return true; - }; - const isAllSelected_ = checkSelectedStatus(data.value || []); - isAllSelected.value = selectedCount === 0 ? false : isAllSelected_; - }; - const getChildrenCount = (rowKey22) => { - var _a2; - if (!instance || !instance.store) - return 0; - const { treeData } = instance.store.states; - let count = 0; - const children = (_a2 = treeData.value[rowKey22]) == null ? void 0 : _a2.children; - if (children) { - count += children.length; - children.forEach((childKey) => { - count += getChildrenCount(childKey); - }); - } - return count; - }; - const updateFilters = (column2, values2) => { - const filters_ = {}; - castArray_default(column2).forEach((col) => { - filters.value[col.id] = values2; - filters_[col.columnKey || col.id] = values2; - }); - return filters_; - }; - const updateSort = (column2, prop, order) => { - if (sortingColumn.value && sortingColumn.value !== column2) { - sortingColumn.value.order = null; - } - sortingColumn.value = column2; - sortProp.value = prop; - sortOrder.value = order; - }; - const execFilter = () => { - let sourceData = unref(_data); - Object.keys(filters.value).forEach((columnId) => { - const values2 = filters.value[columnId]; - if (!values2 || values2.length === 0) - return; - const column2 = getColumnById( - { - columns: columns2.value - }, - columnId - ); - if (column2 && column2.filterMethod) { - sourceData = sourceData.filter((row) => { - return values2.some( - (value) => column2.filterMethod.call(null, value, row, column2) - ); - }); - } - }); - filteredData.value = sourceData; - }; - const execSort = () => { - var _a2; - data.value = sortData((_a2 = filteredData.value) != null ? _a2 : [], { - sortingColumn: sortingColumn.value, - sortProp: sortProp.value, - sortOrder: sortOrder.value - }); - }; - const execQuery = (ignore = void 0) => { - if (!(ignore == null ? void 0 : ignore.filter)) { - execFilter(); - } - execSort(); - }; - const clearFilter = (columnKeys) => { - const { tableHeaderRef } = instance.refs; - if (!tableHeaderRef) - return; - const panels = Object.assign({}, tableHeaderRef.filterPanels); - const keys3 = Object.keys(panels); - if (!keys3.length) - return; - if (isString(columnKeys)) { - columnKeys = [columnKeys]; - } - if (isArray(columnKeys)) { - const columns_ = columnKeys.map( - (key) => getColumnByKey( - { - columns: columns2.value - }, - key - ) - ); - keys3.forEach((key) => { - const column2 = columns_.find((col) => col.id === key); - if (column2) { - column2.filteredValue = []; - } - }); - instance.store.commit("filterChange", { - column: columns_, - values: [], - silent: true, - multi: true - }); - } else { - keys3.forEach((key) => { - const column2 = columns2.value.find((col) => col.id === key); - if (column2) { - column2.filteredValue = []; - } - }); - filters.value = {}; - instance.store.commit("filterChange", { - column: {}, - values: [], - silent: true - }); - } - }; - const clearSort = () => { - if (!sortingColumn.value) - return; - updateSort(null, null, null); - instance.store.commit("changeSortCondition", { - silent: true - }); - }; - const { - setExpandRowKeys, - toggleRowExpansion, - updateExpandRows, - states: expandStates, - isRowExpanded - } = useExpand({ - data, - rowKey: rowKey2 - }); - const { - updateTreeExpandKeys, - toggleTreeExpansion, - updateTreeData, - updateKeyChildren, - loadOrToggle, - states: treeStates - } = useTree({ - data, - rowKey: rowKey2 - }); - const { - updateCurrentRowData, - updateCurrentRow, - setCurrentRowKey, - states: currentData - } = useCurrent({ - data, - rowKey: rowKey2 - }); - const setExpandRowKeysAdapter = (val) => { - setExpandRowKeys(val); - updateTreeExpandKeys(val); - }; - const toggleRowExpansionAdapter = (row, expanded) => { - const hasExpandColumn = columns2.value.some(({ type: type4 }) => type4 === "expand"); - if (hasExpandColumn) { - toggleRowExpansion(row, expanded); - } else { - toggleTreeExpansion(row, expanded); - } - }; - return { - assertRowKey, - updateColumns, - scheduleLayout, - isSelected, - clearSelection, - cleanSelection, - getSelectionRows, - toggleRowSelection, - _toggleAllSelection, - toggleAllSelection: null, - updateAllSelected, - updateFilters, - updateCurrentRow, - updateSort, - execFilter, - execSort, - execQuery, - clearFilter, - clearSort, - toggleRowExpansion, - setExpandRowKeysAdapter, - setCurrentRowKey, - toggleRowExpansionAdapter, - isRowExpanded, - updateExpandRows, - updateCurrentRowData, - loadOrToggle, - updateTreeData, - updateKeyChildren, - states: { - tableSize, - rowKey: rowKey2, - data, - _data, - isComplex, - _columns, - originColumns, - columns: columns2, - fixedColumns, - rightFixedColumns, - leafColumns, - fixedLeafColumns, - rightFixedLeafColumns, - updateOrderFns, - leafColumnsLength, - fixedLeafColumnsLength, - rightFixedLeafColumnsLength, - isAllSelected, - selection, - reserveSelection, - selectOnIndeterminate, - selectable, - filters, - filteredData, - sortingColumn, - sortProp, - sortOrder, - hoverRow, - ...expandStates, - ...treeStates, - ...currentData - } - }; -} - -// node_modules/element-plus/es/components/table/src/store/index.mjs -function replaceColumn(array4, column2) { - return array4.map((item) => { - var _a; - if (item.id === column2.id) { - return column2; - } else if ((_a = item.children) == null ? void 0 : _a.length) { - item.children = replaceColumn(item.children, column2); - } - return item; - }); -} -function sortColumn(array4) { - array4.forEach((item) => { - var _a, _b; - item.no = (_a = item.getColumnIndex) == null ? void 0 : _a.call(item); - if ((_b = item.children) == null ? void 0 : _b.length) { - sortColumn(item.children); - } - }); - array4.sort((cur, pre) => cur.no - pre.no); -} -function useStore() { - const instance = getCurrentInstance(); - const watcher = useWatcher(); - const ns = useNamespace("table"); - const { t } = useLocale(); - const mutations = { - setData(states, data) { - const dataInstanceChanged = unref(states._data) !== data; - states.data.value = data; - states._data.value = data; - instance.store.execQuery(); - instance.store.updateCurrentRowData(); - instance.store.updateExpandRows(); - instance.store.updateTreeData( - instance.store.states.defaultExpandAll.value - ); - if (unref(states.reserveSelection)) { - instance.store.assertRowKey(); - } else { - if (dataInstanceChanged) { - instance.store.clearSelection(); - } else { - instance.store.cleanSelection(); - } - } - instance.store.updateAllSelected(); - if (instance.$ready) { - instance.store.scheduleLayout(); - } - }, - insertColumn(states, column2, parent2, updateColumnOrder) { - var _a; - const array4 = unref(states._columns); - let newColumns = []; - if (!parent2) { - array4.push(column2); - newColumns = array4; - } else { - if (parent2 && !parent2.children) { - parent2.children = []; - } - (_a = parent2.children) == null ? void 0 : _a.push(column2); - newColumns = replaceColumn(array4, parent2); - } - sortColumn(newColumns); - states._columns.value = newColumns; - states.updateOrderFns.push(updateColumnOrder); - if (column2.type === "selection") { - states.selectable.value = column2.selectable; - states.reserveSelection.value = column2.reserveSelection; - } - if (instance.$ready) { - instance.store.updateColumns(); - instance.store.scheduleLayout(); - } - }, - updateColumnOrder(states, column2) { - var _a; - const newColumnIndex = (_a = column2.getColumnIndex) == null ? void 0 : _a.call(column2); - if (newColumnIndex === column2.no) - return; - sortColumn(states._columns.value); - if (instance.$ready) { - instance.store.updateColumns(); - } - }, - removeColumn(states, column2, parent2, updateColumnOrder) { - var _a; - const array4 = unref(states._columns) || []; - if (parent2) { - (_a = parent2.children) == null ? void 0 : _a.splice( - parent2.children.findIndex((item) => item.id === column2.id), - 1 - ); - nextTick(() => { - var _a2; - if (((_a2 = parent2.children) == null ? void 0 : _a2.length) === 0) { - delete parent2.children; - } - }); - states._columns.value = replaceColumn(array4, parent2); - } else { - const index = array4.indexOf(column2); - if (index > -1) { - array4.splice(index, 1); - states._columns.value = array4; - } - } - const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder); - updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1); - if (instance.$ready) { - instance.store.updateColumns(); - instance.store.scheduleLayout(); - } - }, - sort(states, options) { - const { prop, order, init } = options; - if (prop) { - const column2 = unref(states.columns).find( - (column22) => column22.property === prop - ); - if (column2) { - column2.order = order; - instance.store.updateSort(column2, prop, order); - instance.store.commit("changeSortCondition", { init }); - } - } - }, - changeSortCondition(states, options) { - const { sortingColumn, sortProp, sortOrder } = states; - const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder); - if (isNull_default(orderValue)) { - states.sortingColumn.value = null; - states.sortProp.value = null; - } - const ignore = { filter: true }; - instance.store.execQuery(ignore); - if (!options || !(options.silent || options.init)) { - instance.emit("sort-change", { - column: columnValue, - prop: propValue, - order: orderValue - }); - } - instance.store.updateTableScrollY(); - }, - filterChange(_states, options) { - const { column: column2, values: values2, silent } = options; - const newFilters = instance.store.updateFilters(column2, values2); - instance.store.execQuery(); - if (!silent) { - instance.emit("filter-change", newFilters); - } - instance.store.updateTableScrollY(); - }, - toggleAllSelection() { - var _a, _b; - (_b = (_a = instance.store).toggleAllSelection) == null ? void 0 : _b.call(_a); - }, - rowSelectedChanged(_states, row) { - instance.store.toggleRowSelection(row); - instance.store.updateAllSelected(); - }, - setHoverRow(states, row) { - states.hoverRow.value = row; - }, - setCurrentRow(_states, row) { - instance.store.updateCurrentRow(row); - } - }; - const commit = function(name, ...args) { - const mutations2 = instance.store.mutations; - if (mutations2[name]) { - mutations2[name].apply(instance, [ - instance.store.states, - ...args - ]); - } else { - throw new Error(`Action not found: ${name}`); - } - }; - const updateTableScrollY = function() { - nextTick(() => instance.layout.updateScrollY.apply(instance.layout)); - }; - return { - ns, - t, - ...watcher, - mutations, - commit, - updateTableScrollY - }; -} - -// node_modules/element-plus/es/components/table/src/store/helper.mjs -var InitialStateMap = { - rowKey: "rowKey", - defaultExpandAll: "defaultExpandAll", - selectOnIndeterminate: "selectOnIndeterminate", - indent: "indent", - lazy: "lazy", - ["treeProps.hasChildren"]: { - key: "lazyColumnIdentifier", - default: "hasChildren" - }, - ["treeProps.children"]: { - key: "childrenColumnName", - default: "children" - }, - ["treeProps.checkStrictly"]: { - key: "checkStrictly", - default: false - } -}; -function createStore(table, props2) { - if (!table) { - throw new Error("Table is required."); - } - const store = useStore(); - store.toggleAllSelection = debounce_default(store._toggleAllSelection, 10); - Object.keys(InitialStateMap).forEach((key) => { - handleValue(getArrKeysValue(props2, key), key, store); - }); - proxyTableProps(store, props2); - return store; -} -function proxyTableProps(store, props2) { - Object.keys(InitialStateMap).forEach((key) => { - watch( - () => getArrKeysValue(props2, key), - (value) => { - handleValue(value, key, store); - } - ); - }); -} -function handleValue(value, propsKey, store) { - let newVal = value; - let storeKey = InitialStateMap[propsKey]; - if (isObject(storeKey)) { - newVal = newVal || storeKey.default; - storeKey = storeKey.key; - } - store.states[storeKey].value = newVal; -} -function getArrKeysValue(props2, key) { - if (key.includes(".")) { - const keyList = key.split("."); - let value = props2; - keyList.forEach((k) => { - value = value[k]; - }); - return value; - } else { - return props2[key]; - } -} - -// node_modules/element-plus/es/components/table/src/table-layout.mjs -var TableLayout = class { - constructor(options) { - this.observers = []; - this.table = null; - this.store = null; - this.columns = []; - this.fit = true; - this.showHeader = true; - this.height = ref(null); - this.scrollX = ref(false); - this.scrollY = ref(false); - this.bodyWidth = ref(null); - this.fixedWidth = ref(null); - this.rightFixedWidth = ref(null); - this.gutterWidth = 0; - for (const name in options) { - if (hasOwn(options, name)) { - if (isRef(this[name])) { - this[name].value = options[name]; - } else { - this[name] = options[name]; - } - } - } - if (!this.table) { - throw new Error("Table is required for Table Layout"); - } - if (!this.store) { - throw new Error("Store is required for Table Layout"); - } - } - updateScrollY() { - const height = this.height.value; - if (isNull_default(height)) - return false; - const scrollBarRef = this.table.refs.scrollBarRef; - if (this.table.vnode.el && (scrollBarRef == null ? void 0 : scrollBarRef.wrapRef)) { - let scrollY = true; - const prevScrollY = this.scrollY.value; - scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight; - this.scrollY.value = scrollY; - return prevScrollY !== scrollY; - } - return false; - } - setHeight(value, prop = "height") { - if (!isClient) - return; - const el = this.table.vnode.el; - value = parseHeight(value); - this.height.value = Number(value); - if (!el && (value || value === 0)) { - nextTick(() => this.setHeight(value, prop)); - return; - } - if (el && isNumber2(value)) { - el.style[prop] = `${value}px`; - this.updateElsHeight(); - } else if (el && isString(value)) { - el.style[prop] = value; - this.updateElsHeight(); - } - } - setMaxHeight(value) { - this.setHeight(value, "max-height"); - } - getFlattenColumns() { - const flattenColumns = []; - const columns2 = this.table.store.states.columns.value; - columns2.forEach((column2) => { - if (column2.isColumnGroup) { - flattenColumns.push.apply(flattenColumns, column2.columns); - } else { - flattenColumns.push(column2); - } - }); - return flattenColumns; - } - updateElsHeight() { - this.updateScrollY(); - this.notifyObservers("scrollable"); - } - headerDisplayNone(elm) { - if (!elm) - return true; - let headerChild = elm; - while (headerChild.tagName !== "DIV") { - if (getComputedStyle(headerChild).display === "none") { - return true; - } - headerChild = headerChild.parentElement; - } - return false; - } - updateColumnsWidth() { - var _a; - if (!isClient) - return; - const fit = this.fit; - const bodyWidth = (_a = this.table.vnode.el) == null ? void 0 : _a.clientWidth; - let bodyMinWidth = 0; - const flattenColumns = this.getFlattenColumns(); - const flexColumns = flattenColumns.filter( - (column2) => !isNumber2(column2.width) - ); - flattenColumns.forEach((column2) => { - if (isNumber2(column2.width) && column2.realWidth) - column2.realWidth = null; - }); - if (flexColumns.length > 0 && fit) { - flattenColumns.forEach((column2) => { - bodyMinWidth += Number(column2.width || column2.minWidth || 80); - }); - if (bodyMinWidth <= bodyWidth) { - this.scrollX.value = false; - const totalFlexWidth = bodyWidth - bodyMinWidth; - if (flexColumns.length === 1) { - flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth; - } else { - const allColumnsWidth = flexColumns.reduce( - (prev, column2) => prev + Number(column2.minWidth || 80), - 0 - ); - const flexWidthPerPixel = totalFlexWidth / allColumnsWidth; - let noneFirstWidth = 0; - flexColumns.forEach((column2, index) => { - if (index === 0) - return; - const flexWidth = Math.floor( - Number(column2.minWidth || 80) * flexWidthPerPixel - ); - noneFirstWidth += flexWidth; - column2.realWidth = Number(column2.minWidth || 80) + flexWidth; - }); - flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth; - } - } else { - this.scrollX.value = true; - flexColumns.forEach((column2) => { - column2.realWidth = Number(column2.minWidth); - }); - } - this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth); - this.table.state.resizeState.value.width = this.bodyWidth.value; - } else { - flattenColumns.forEach((column2) => { - if (!column2.width && !column2.minWidth) { - column2.realWidth = 80; - } else { - column2.realWidth = Number(column2.width || column2.minWidth); - } - bodyMinWidth += column2.realWidth; - }); - this.scrollX.value = bodyMinWidth > bodyWidth; - this.bodyWidth.value = bodyMinWidth; - } - const fixedColumns = this.store.states.fixedColumns.value; - if (fixedColumns.length > 0) { - let fixedWidth = 0; - fixedColumns.forEach((column2) => { - fixedWidth += Number(column2.realWidth || column2.width); - }); - this.fixedWidth.value = fixedWidth; - } - const rightFixedColumns = this.store.states.rightFixedColumns.value; - if (rightFixedColumns.length > 0) { - let rightFixedWidth = 0; - rightFixedColumns.forEach((column2) => { - rightFixedWidth += Number(column2.realWidth || column2.width); - }); - this.rightFixedWidth.value = rightFixedWidth; - } - this.notifyObservers("columns"); - } - addObserver(observer) { - this.observers.push(observer); - } - removeObserver(observer) { - const index = this.observers.indexOf(observer); - if (index !== -1) { - this.observers.splice(index, 1); - } - } - notifyObservers(event) { - const observers = this.observers; - observers.forEach((observer) => { - var _a, _b; - switch (event) { - case "columns": - (_a = observer.state) == null ? void 0 : _a.onColumnsChange(this); - break; - case "scrollable": - (_b = observer.state) == null ? void 0 : _b.onScrollableChange(this); - break; - default: - throw new Error(`Table Layout don't have event ${event}.`); - } - }); - } -}; - -// node_modules/element-plus/es/components/table/src/filter-panel.mjs -var _sfc_main126 = defineComponent({ - name: "ElTableFilterPanel", - components: { - ElCheckbox, - ElCheckboxGroup, - ElScrollbar, - ElTooltip, - ElIcon, - ArrowDown: arrow_down_default, - ArrowUp: arrow_up_default - }, - props: { - placement: { - type: String, - default: "bottom-start" - }, - store: { - type: Object - }, - column: { - type: Object - }, - upDataColumn: { - type: Function - }, - appendTo: useTooltipContentProps.appendTo - }, - setup(props2) { - const instance = getCurrentInstance(); - const { t } = useLocale(); - const ns = useNamespace("table-filter"); - const parent2 = instance == null ? void 0 : instance.parent; - if (props2.column && !parent2.filterPanels.value[props2.column.id]) { - parent2.filterPanels.value[props2.column.id] = instance; - } - const tooltipRef = ref(null); - const rootRef = ref(null); - const checkedIndex = ref(0); - const filters = computed(() => { - return props2.column && props2.column.filters; - }); - const filterClassName = computed(() => { - if (props2.column && props2.column.filterClassName) { - return `${ns.b()} ${props2.column.filterClassName}`; - } - return ns.b(); - }); - const filterValue = computed({ - get: () => { - var _a; - return (((_a = props2.column) == null ? void 0 : _a.filteredValue) || [])[0]; - }, - set: (value) => { - if (filteredValue.value) { - if (!isPropAbsent(value)) { - filteredValue.value.splice(0, 1, value); - } else { - filteredValue.value.splice(0, 1); - } - } - } - }); - const filteredValue = computed({ - get() { - if (props2.column) { - return props2.column.filteredValue || []; - } - return []; - }, - set(value) { - var _a; - if (props2.column) { - (_a = props2.upDataColumn) == null ? void 0 : _a.call(props2, "filteredValue", value); - } - } - }); - const multiple = computed(() => { - if (props2.column) { - return props2.column.filterMultiple; - } - return true; - }); - const isActive = (filter2) => { - return filter2.value === filterValue.value; - }; - const hidden = () => { - var _a; - (_a = tooltipRef.value) == null ? void 0 : _a.onClose(); - }; - const handleConfirm = () => { - confirmFilter(filteredValue.value); - hidden(); - }; - const handleReset = () => { - filteredValue.value = []; - confirmFilter(filteredValue.value); - hidden(); - }; - const handleSelect = (_filterValue, index) => { - filterValue.value = _filterValue; - checkedIndex.value = index; - if (!isPropAbsent(_filterValue)) { - confirmFilter(filteredValue.value); - } else { - confirmFilter([]); - } - hidden(); - }; - const confirmFilter = (filteredValue2) => { - var _a, _b; - (_a = props2.store) == null ? void 0 : _a.commit("filterChange", { - column: props2.column, - values: filteredValue2 - }); - (_b = props2.store) == null ? void 0 : _b.updateAllSelected(); - }; - const handleShowTooltip = () => { - var _a, _b; - (_a = rootRef.value) == null ? void 0 : _a.focus(); - !multiple.value && initCheckedIndex(); - if (props2.column) { - (_b = props2.upDataColumn) == null ? void 0 : _b.call(props2, "filterOpened", true); - } - }; - const handleHideTooltip = () => { - var _a; - if (props2.column) { - (_a = props2.upDataColumn) == null ? void 0 : _a.call(props2, "filterOpened", false); - } - }; - const initCheckedIndex = () => { - if (isPropAbsent(filterValue)) { - checkedIndex.value = 0; - return; - } - const idx = (filters.value || []).findIndex((item) => { - return item.value === filterValue.value; - }); - checkedIndex.value = idx >= 0 ? idx + 1 : 0; - }; - const handleKeydown = (event) => { - var _a, _b; - const code = getEventCode(event); - const len = (filters.value ? filters.value.length : 0) + 1; - let index = checkedIndex.value; - let isPreventDefault = true; - switch (code) { - case EVENT_CODE.down: - case EVENT_CODE.right: - index = (index + 1) % len; - break; - case EVENT_CODE.up: - case EVENT_CODE.left: - index = (index - 1 + len) % len; - break; - case EVENT_CODE.tab: - hidden(); - isPreventDefault = false; - break; - case EVENT_CODE.enter: - case EVENT_CODE.space: - if (index === 0) { - handleSelect(null, 0); - } else { - const item = (filters.value || [])[index - 1]; - item.value && handleSelect(item.value, index); - } - break; - default: - isPreventDefault = false; - break; - } - isPreventDefault && event.preventDefault(); - checkedIndex.value = index; - (_b = (_a = rootRef.value) == null ? void 0 : _a.querySelector( - `.${ns.e("list-item")}:nth-child(${index + 1})` - )) == null ? void 0 : _b.focus(); - }; - return { - multiple, - filterClassName, - filteredValue, - filterValue, - filters, - handleConfirm, - handleReset, - handleSelect, - isPropAbsent, - isActive, - t, - ns, - tooltipRef, - rootRef, - checkedIndex, - handleShowTooltip, - handleHideTooltip, - handleKeydown - }; - } -}); -var _hoisted_166 = ["disabled"]; -var _hoisted_236 = ["tabindex", "aria-checked"]; -var _hoisted_316 = ["tabindex", "aria-checked", "onClick"]; -var _hoisted_411 = ["aria-label"]; -function _sfc_render18(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_checkbox = resolveComponent("el-checkbox"); - const _component_el_checkbox_group = resolveComponent("el-checkbox-group"); - const _component_el_scrollbar = resolveComponent("el-scrollbar"); - const _component_arrow_up = resolveComponent("arrow-up"); - const _component_arrow_down = resolveComponent("arrow-down"); - const _component_el_icon = resolveComponent("el-icon"); - const _component_el_tooltip = resolveComponent("el-tooltip"); - return openBlock(), createBlock(_component_el_tooltip, { - ref: "tooltipRef", - offset: 0, - placement: _ctx.placement, - "show-arrow": false, - trigger: "click", - role: "dialog", - teleported: "", - effect: "light", - pure: "", - loop: "", - "popper-class": _ctx.filterClassName, - persistent: "", - "append-to": _ctx.appendTo, - onShow: _ctx.handleShowTooltip, - onHide: _ctx.handleHideTooltip - }, { - content: withCtx(() => [ - _ctx.multiple ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref: "rootRef", - tabindex: "-1", - class: normalizeClass(_ctx.ns.e("multiple")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("content")) - }, - [ - createVNode(_component_el_scrollbar, { - "wrap-class": _ctx.ns.e("wrap") - }, { - default: withCtx(() => [ - createVNode(_component_el_checkbox_group, { - modelValue: _ctx.filteredValue, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.filteredValue = $event), - class: normalizeClass(_ctx.ns.e("checkbox-group")) - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.filters, (filter2) => { - return openBlock(), createBlock(_component_el_checkbox, { - key: filter2.value, - value: filter2.value - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(filter2.text), - 1 - ) - ]), - _: 2 - }, 1032, ["value"]); - }), - 128 - )) - ]), - _: 1 - }, 8, ["modelValue", "class"]) - ]), - _: 1 - }, 8, ["wrap-class"]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("bottom")) - }, - [ - createBaseVNode("button", { - class: normalizeClass(_ctx.ns.is("disabled", _ctx.filteredValue.length === 0)), - disabled: _ctx.filteredValue.length === 0, - type: "button", - onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args)) - }, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, _hoisted_166), - createBaseVNode( - "button", - { - type: "button", - onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args)) - }, - toDisplayString(_ctx.t("el.table.resetFilter")), - 1 - ) - ], - 2 - ) - ], - 2 - )) : (openBlock(), createElementBlock( - "ul", - { - key: 1, - ref: "rootRef", - tabindex: "-1", - role: "radiogroup", - class: normalizeClass(_ctx.ns.e("list")), - onKeydown: _cache[4] || (_cache[4] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)) - }, - [ - createBaseVNode("li", { - role: "radio", - class: normalizeClass([ - _ctx.ns.e("list-item"), - _ctx.ns.is("active", _ctx.isPropAbsent(_ctx.filterValue)) - ]), - tabindex: _ctx.checkedIndex === 0 ? 0 : -1, - "aria-checked": _ctx.isPropAbsent(_ctx.filterValue), - onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null, 0)) - }, toDisplayString(_ctx.t("el.table.clearFilter")), 11, _hoisted_236), - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.filters, (filter2, idx) => { - return openBlock(), createElementBlock("li", { - key: filter2.value, - role: "radio", - class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter2))]), - tabindex: _ctx.checkedIndex === idx + 1 ? 0 : -1, - "aria-checked": _ctx.isActive(filter2), - onClick: ($event) => _ctx.handleSelect(filter2.value, idx + 1) - }, toDisplayString(filter2.text), 11, _hoisted_316); - }), - 128 - )) - ], - 34 - )) - ]), - default: withCtx(() => { - var _a; - return [ - createBaseVNode("button", { - type: "button", - class: normalizeClass(`${_ctx.ns.namespace.value}-table__column-filter-trigger`), - "aria-label": _ctx.t("el.table.filterLabel", { column: ((_a = _ctx.column) == null ? void 0 : _a.label) || "" }) - }, [ - createVNode(_component_el_icon, null, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "filter-icon", {}, () => { - var _a2; - return [ - ((_a2 = _ctx.column) == null ? void 0 : _a2.filterOpened) ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 })) - ]; - }) - ]), - _: 3 - }) - ], 10, _hoisted_411) - ]; - }), - _: 3 - }, 8, ["placement", "popper-class", "append-to", "onShow", "onHide"]); -} -var FilterPanel = _export_sfc(_sfc_main126, [["render", _sfc_render18], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]); - -// node_modules/element-plus/es/components/table/src/layout-observer.mjs -function useLayoutObserver(root2) { - const instance = getCurrentInstance(); - onBeforeMount(() => { - tableLayout.value.addObserver(instance); - }); - onMounted(() => { - onColumnsChange(tableLayout.value); - onScrollableChange(tableLayout.value); - }); - onUpdated(() => { - onColumnsChange(tableLayout.value); - onScrollableChange(tableLayout.value); - }); - onUnmounted(() => { - tableLayout.value.removeObserver(instance); - }); - const tableLayout = computed(() => { - const layout2 = root2.layout; - if (!layout2) { - throw new Error("Can not find table layout."); - } - return layout2; - }); - const onColumnsChange = (layout2) => { - var _a; - const cols = ((_a = root2.vnode.el) == null ? void 0 : _a.querySelectorAll("colgroup > col")) || []; - if (!cols.length) - return; - const flattenColumns = layout2.getFlattenColumns(); - const columnsMap = {}; - flattenColumns.forEach((column2) => { - columnsMap[column2.id] = column2; - }); - for (let i = 0, j = cols.length; i < j; i++) { - const col = cols[i]; - const name = col.getAttribute("name"); - const column2 = columnsMap[name]; - if (column2) { - col.setAttribute("width", column2.realWidth || column2.width); - } - } - }; - const onScrollableChange = (layout2) => { - var _a, _b; - const cols = ((_a = root2.vnode.el) == null ? void 0 : _a.querySelectorAll("colgroup > col[name=gutter]")) || []; - for (let i = 0, j = cols.length; i < j; i++) { - const col = cols[i]; - col.setAttribute("width", layout2.scrollY.value ? layout2.gutterWidth : "0"); - } - const ths = ((_b = root2.vnode.el) == null ? void 0 : _b.querySelectorAll("th.gutter")) || []; - for (let i = 0, j = ths.length; i < j; i++) { - const th = ths[i]; - th.style.width = layout2.scrollY.value ? `${layout2.gutterWidth}px` : "0"; - th.style.display = layout2.scrollY.value ? "" : "none"; - } - }; - return { - tableLayout: tableLayout.value, - onColumnsChange, - onScrollableChange - }; -} - -// node_modules/element-plus/es/components/table/src/tokens.mjs -var TABLE_INJECTION_KEY = Symbol("ElTable"); - -// node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs -function useEvent(props2, emit) { - const instance = getCurrentInstance(); - const parent2 = inject(TABLE_INJECTION_KEY); - const handleFilterClick = (event) => { - event.stopPropagation(); - return; - }; - const handleHeaderClick = (event, column2) => { - if (!column2.filters && column2.sortable) { - handleSortClick(event, column2, false); - } else if (column2.filterable && !column2.sortable) { - handleFilterClick(event); - } - parent2 == null ? void 0 : parent2.emit("header-click", column2, event); - }; - const handleHeaderContextMenu = (event, column2) => { - parent2 == null ? void 0 : parent2.emit("header-contextmenu", column2, event); - }; - const draggingColumn = ref(null); - const dragging = ref(false); - const dragState = ref(); - const handleMouseDown = (event, column2) => { - var _a, _b; - if (!isClient) - return; - if (column2.children && column2.children.length > 0) - return; - if (draggingColumn.value && props2.border && draggingColumn.value.id === column2.id) { - dragging.value = true; - const table = parent2; - emit("set-drag-visible", true); - const tableEl = table == null ? void 0 : table.vnode.el; - const tableLeft = tableEl == null ? void 0 : tableEl.getBoundingClientRect().left; - const columnEl = (_b = (_a = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a.el) == null ? void 0 : _b.querySelector(`th.${column2.id}`); - const columnRect = columnEl.getBoundingClientRect(); - const minLeft = columnRect.left - tableLeft + 30; - addClass(columnEl, "noclick"); - dragState.value = { - startMouseLeft: event.clientX, - startLeft: columnRect.right - tableLeft, - startColumnLeft: columnRect.left - tableLeft, - tableLeft - }; - const resizeProxy = table == null ? void 0 : table.refs.resizeProxy; - resizeProxy.style.left = `${dragState.value.startLeft}px`; - document.onselectstart = function() { - return false; - }; - document.ondragstart = function() { - return false; - }; - const handleMouseMove2 = (event2) => { - const deltaLeft = event2.clientX - dragState.value.startMouseLeft; - const proxyLeft = dragState.value.startLeft + deltaLeft; - resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`; - }; - const handleMouseUp = () => { - if (dragging.value) { - const { startColumnLeft, startLeft } = dragState.value; - const finalLeft = Number.parseInt(resizeProxy.style.left, 10); - const columnWidth = finalLeft - startColumnLeft; - column2.width = column2.realWidth = columnWidth; - table == null ? void 0 : table.emit( - "header-dragend", - column2.width, - startLeft - startColumnLeft, - column2, - event - ); - requestAnimationFrame(() => { - props2.store.scheduleLayout(false, true); - }); - document.body.style.cursor = ""; - dragging.value = false; - draggingColumn.value = null; - dragState.value = void 0; - emit("set-drag-visible", false); - } - document.removeEventListener("mousemove", handleMouseMove2); - document.removeEventListener("mouseup", handleMouseUp); - document.onselectstart = null; - document.ondragstart = null; - setTimeout(() => { - removeClass(columnEl, "noclick"); - }, 0); - }; - document.addEventListener("mousemove", handleMouseMove2); - document.addEventListener("mouseup", handleMouseUp); - } - }; - const handleMouseMove = (event, column2) => { - var _a; - if (!props2.border || column2.children && column2.children.length > 0) - return; - const el = event.target; - const target2 = isElement2(el) ? el.closest("th") : null; - if (!target2) { - return; - } - const isSortable = hasClass(target2, "is-sortable"); - if (isSortable) { - const cursor2 = dragging.value ? "col-resize" : ""; - target2.style.cursor = cursor2; - const caret = target2.querySelector(".caret-wrapper"); - if (caret) { - caret.style.cursor = cursor2; - } - } - if (!column2.resizable || dragging.value) { - draggingColumn.value = null; - return; - } - const rect = target2.getBoundingClientRect(); - const isLastTh = ((_a = target2.parentNode) == null ? void 0 : _a.lastElementChild) === target2; - const allowDrag = props2.allowDragLastColumn || !isLastTh; - const isResizeHandleActive = rect.width > 12 && rect.right - event.clientX < 8 && allowDrag; - const cursor = isResizeHandleActive ? "col-resize" : ""; - document.body.style.cursor = cursor; - draggingColumn.value = isResizeHandleActive ? column2 : null; - if (isSortable) { - target2.style.cursor = cursor; - } - }; - const handleMouseOut = () => { - if (!isClient || dragging.value) - return; - document.body.style.cursor = ""; - }; - const toggleOrder = ({ order, sortOrders }) => { - if (order === "") - return sortOrders[0]; - const index = sortOrders.indexOf(order || null); - return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1]; - }; - const handleSortClick = (event, column2, givenOrder) => { - var _a; - event.stopPropagation(); - const order = column2.order === givenOrder ? null : givenOrder || toggleOrder(column2); - const target2 = (_a = event.target) == null ? void 0 : _a.closest("th"); - if (target2) { - if (hasClass(target2, "noclick")) { - removeClass(target2, "noclick"); - return; - } - } - if (!column2.sortable) - return; - const clickTarget = event.currentTarget; - if (["ascending", "descending"].some( - (str) => hasClass(clickTarget, str) && !column2.sortOrders.includes(str) - )) { - return; - } - const states = props2.store.states; - let sortProp = states.sortProp.value; - let sortOrder; - const sortingColumn = states.sortingColumn.value; - if (sortingColumn !== column2 || sortingColumn === column2 && isNull_default(sortingColumn.order)) { - if (sortingColumn) { - sortingColumn.order = null; - } - states.sortingColumn.value = column2; - sortProp = column2.property; - } - if (!order) { - sortOrder = column2.order = null; - } else { - sortOrder = column2.order = order; - } - states.sortProp.value = sortProp; - states.sortOrder.value = sortOrder; - parent2 == null ? void 0 : parent2.store.commit("changeSortCondition"); - }; - return { - handleHeaderClick, - handleHeaderContextMenu, - handleMouseDown, - handleMouseMove, - handleMouseOut, - handleSortClick, - handleFilterClick - }; -} - -// node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs -function useStyle(props2) { - const parent2 = inject(TABLE_INJECTION_KEY); - const ns = useNamespace("table"); - const getHeaderRowStyle = (rowIndex) => { - const headerRowStyle = parent2 == null ? void 0 : parent2.props.headerRowStyle; - if (isFunction(headerRowStyle)) { - return headerRowStyle.call(null, { rowIndex }); - } - return headerRowStyle; - }; - const getHeaderRowClass = (rowIndex) => { - const classes = []; - const headerRowClassName = parent2 == null ? void 0 : parent2.props.headerRowClassName; - if (isString(headerRowClassName)) { - classes.push(headerRowClassName); - } else if (isFunction(headerRowClassName)) { - classes.push(headerRowClassName.call(null, { rowIndex })); - } - return classes.join(" "); - }; - const getHeaderCellStyle = (rowIndex, columnIndex, row, column2) => { - var _a; - let headerCellStyles = (_a = parent2 == null ? void 0 : parent2.props.headerCellStyle) != null ? _a : {}; - if (isFunction(headerCellStyles)) { - headerCellStyles = headerCellStyles.call(null, { - rowIndex, - columnIndex, - row, - column: column2 - }); - } - const fixedStyle = getFixedColumnOffset( - columnIndex, - column2.fixed, - props2.store, - row - ); - ensurePosition(fixedStyle, "left"); - ensurePosition(fixedStyle, "right"); - return Object.assign({}, headerCellStyles, fixedStyle); - }; - const getHeaderCellClass = (rowIndex, columnIndex, row, column2) => { - const fixedClasses = getFixedColumnsClass( - ns.b(), - columnIndex, - column2.fixed, - props2.store, - row - ); - const classes = [ - column2.id, - column2.order, - column2.headerAlign, - column2.className, - column2.labelClassName, - ...fixedClasses - ]; - if (!column2.children) { - classes.push("is-leaf"); - } - if (column2.sortable) { - classes.push("is-sortable"); - } - const headerCellClassName = parent2 == null ? void 0 : parent2.props.headerCellClassName; - if (isString(headerCellClassName)) { - classes.push(headerCellClassName); - } else if (isFunction(headerCellClassName)) { - classes.push( - headerCellClassName.call(null, { - rowIndex, - columnIndex, - row, - column: column2 - }) - ); - } - classes.push(ns.e("cell")); - return classes.filter((className) => Boolean(className)).join(" "); - }; - return { - getHeaderRowStyle, - getHeaderRowClass, - getHeaderCellStyle, - getHeaderCellClass - }; -} - -// node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs -var getAllColumns = (columns2) => { - const result2 = []; - columns2.forEach((column2) => { - if (column2.children) { - result2.push(column2); - result2.push.apply(result2, getAllColumns(column2.children)); - } else { - result2.push(column2); - } - }); - return result2; -}; -var convertToRows = (originColumns) => { - let maxLevel = 1; - const traverse = (column2, parent2) => { - if (parent2) { - column2.level = parent2.level + 1; - if (maxLevel < column2.level) { - maxLevel = column2.level; - } - } - if (column2.children) { - let colSpan = 0; - column2.children.forEach((subColumn) => { - traverse(subColumn, column2); - colSpan += subColumn.colSpan; - }); - column2.colSpan = colSpan; - } else { - column2.colSpan = 1; - } - }; - originColumns.forEach((column2) => { - column2.level = 1; - traverse(column2, void 0); - }); - const rows = []; - for (let i = 0; i < maxLevel; i++) { - rows.push([]); - } - const allColumns = getAllColumns(originColumns); - allColumns.forEach((column2) => { - if (!column2.children) { - column2.rowSpan = maxLevel - column2.level + 1; - } else { - column2.rowSpan = 1; - column2.children.forEach((col) => col.isSubColumn = true); - } - rows[column2.level - 1].push(column2); - }); - return rows; -}; -function useUtils(props2) { - const parent2 = inject(TABLE_INJECTION_KEY); - const columnRows = computed(() => { - return convertToRows(props2.store.states.originColumns.value); - }); - const isGroup = computed(() => { - const result2 = columnRows.value.length > 1; - if (result2 && parent2) { - parent2.state.isGroup.value = true; - } - return result2; - }); - const toggleAllSelection = (event) => { - event.stopPropagation(); - parent2 == null ? void 0 : parent2.store.commit("toggleAllSelection"); - }; - return { - isGroup, - toggleAllSelection, - columnRows - }; -} - -// node_modules/element-plus/es/components/table/src/table-header/index.mjs -var TableHeader = defineComponent({ - name: "ElTableHeader", - components: { - ElCheckbox - }, - props: { - fixed: { - type: String, - default: "" - }, - store: { - required: true, - type: Object - }, - border: Boolean, - defaultSort: { - type: Object, - default: () => { - return { - prop: "", - order: "" - }; - } - }, - appendFilterPanelTo: { - type: String - }, - allowDragLastColumn: { - type: Boolean - } - }, - setup(props2, { emit }) { - const instance = getCurrentInstance(); - const parent2 = inject(TABLE_INJECTION_KEY); - const ns = useNamespace("table"); - const filterPanels = ref({}); - const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2); - const isTableLayoutAuto = (parent2 == null ? void 0 : parent2.props.tableLayout) === "auto"; - const saveIndexSelection = reactive(/* @__PURE__ */ new Map()); - const theadRef = ref(); - let delayId; - const updateFixedColumnStyle = () => { - delayId = setTimeout(() => { - if (saveIndexSelection.size > 0) { - saveIndexSelection.forEach((column2, key) => { - const el = theadRef.value.querySelector( - `.${key.replace(/\s/g, ".")}` - ); - if (el) { - const width = el.getBoundingClientRect().width; - column2.width = width || column2.width; - } - }); - saveIndexSelection.clear(); - } - }); - }; - watch(saveIndexSelection, updateFixedColumnStyle); - onBeforeUnmount(() => { - if (delayId) { - clearTimeout(delayId); - delayId = void 0; - } - }); - onMounted(async () => { - await nextTick(); - await nextTick(); - const { prop, order } = props2.defaultSort; - parent2 == null ? void 0 : parent2.store.commit("sort", { prop, order, init: true }); - updateFixedColumnStyle(); - }); - const { - handleHeaderClick, - handleHeaderContextMenu, - handleMouseDown, - handleMouseMove, - handleMouseOut, - handleSortClick, - handleFilterClick - } = useEvent(props2, emit); - const { - getHeaderRowStyle, - getHeaderRowClass, - getHeaderCellStyle, - getHeaderCellClass - } = useStyle(props2); - const { isGroup, toggleAllSelection, columnRows } = useUtils( - props2 - ); - const { t } = useLocale(); - instance.state = { - onColumnsChange, - onScrollableChange - }; - instance.filterPanels = filterPanels; - return { - ns, - t, - filterPanels, - onColumnsChange, - onScrollableChange, - columnRows, - getHeaderRowClass, - getHeaderRowStyle, - getHeaderCellClass, - getHeaderCellStyle, - handleHeaderClick, - handleHeaderContextMenu, - handleMouseDown, - handleMouseMove, - handleMouseOut, - handleSortClick, - handleFilterClick, - isGroup, - toggleAllSelection, - saveIndexSelection, - isTableLayoutAuto, - theadRef, - updateFixedColumnStyle - }; - }, - render() { - const { - ns, - t, - isGroup, - columnRows, - getHeaderCellStyle, - getHeaderCellClass, - getHeaderRowClass, - getHeaderRowStyle, - handleHeaderClick, - handleHeaderContextMenu, - handleMouseDown, - handleMouseMove, - handleSortClick, - handleMouseOut, - store, - $parent, - saveIndexSelection, - isTableLayoutAuto - } = this; - let rowSpan = 1; - return h( - "thead", - { - ref: "theadRef", - class: ns.is("group", isGroup) - }, - columnRows.map( - (subColumns, rowIndex) => h( - "tr", - { - class: getHeaderRowClass(rowIndex), - key: rowIndex, - style: getHeaderRowStyle(rowIndex) - }, - subColumns.map((column2, cellIndex) => { - if (column2.rowSpan > rowSpan) { - rowSpan = column2.rowSpan; - } - const _class = getHeaderCellClass( - rowIndex, - cellIndex, - subColumns, - column2 - ); - if (isTableLayoutAuto && column2.fixed) { - saveIndexSelection.set(_class, column2); - } - return h( - "th", - { - class: _class, - colspan: column2.colSpan, - key: `${column2.id}-thead`, - rowspan: column2.rowSpan, - scope: column2.colSpan > 1 ? "colgroup" : "col", - ariaSort: column2.sortable ? column2.order : void 0, - style: getHeaderCellStyle( - rowIndex, - cellIndex, - subColumns, - column2 - ), - onClick: ($event) => { - var _a; - if ((_a = $event.currentTarget) == null ? void 0 : _a.classList.contains( - "noclick" - )) { - return; - } - handleHeaderClick($event, column2); - }, - onContextmenu: ($event) => handleHeaderContextMenu($event, column2), - onMousedown: ($event) => handleMouseDown($event, column2), - onMousemove: ($event) => handleMouseMove($event, column2), - onMouseout: handleMouseOut - }, - [ - h( - "div", - { - class: [ - "cell", - column2.filteredValue && column2.filteredValue.length > 0 ? "highlight" : "" - ] - }, - [ - column2.renderHeader ? column2.renderHeader({ - column: column2, - $index: cellIndex, - store, - _self: $parent - }) : column2.label, - column2.sortable && h( - "button", - { - type: "button", - class: "caret-wrapper", - "aria-label": t("el.table.sortLabel", { - column: column2.label || "" - }), - onClick: ($event) => handleSortClick($event, column2) - }, - [ - h("i", { - onClick: ($event) => handleSortClick($event, column2, "ascending"), - class: "sort-caret ascending" - }), - h("i", { - onClick: ($event) => handleSortClick($event, column2, "descending"), - class: "sort-caret descending" - }) - ] - ), - column2.filterable && h( - FilterPanel, - { - store, - placement: column2.filterPlacement || "bottom-start", - appendTo: $parent == null ? void 0 : $parent.appendFilterPanelTo, - column: column2, - upDataColumn: (key, value) => { - column2[key] = value; - } - }, - { - "filter-icon": () => column2.renderFilterIcon ? column2.renderFilterIcon({ - filterOpened: column2.filterOpened - }) : null - } - ) - ] - ) - ] - ); - }) - ) - ) - ); - } -}); - -// node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs -function isGreaterThan(a2, b2, epsilon = 0.03) { - return a2 - b2 > epsilon; -} -function useEvents(props2) { - const parent2 = inject(TABLE_INJECTION_KEY); - const tooltipContent = ref(""); - const tooltipTrigger = ref(h("div")); - const handleEvent = (event, row, name) => { - var _a, _b, _c; - const table = parent2; - const cell = getCell(event); - let column2 = null; - const namespace = (_a = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a.dataset.prefix; - if (cell) { - column2 = getColumnByCell( - { - columns: (_c = (_b = props2.store) == null ? void 0 : _b.states.columns.value) != null ? _c : [] - }, - cell, - namespace - ); - if (column2) { - table == null ? void 0 : table.emit(`cell-${name}`, row, column2, cell, event); - } - } - table == null ? void 0 : table.emit(`row-${name}`, row, column2, event); - }; - const handleDoubleClick = (event, row) => { - handleEvent(event, row, "dblclick"); - }; - const handleClick = (event, row) => { - var _a; - (_a = props2.store) == null ? void 0 : _a.commit("setCurrentRow", row); - handleEvent(event, row, "click"); - }; - const handleContextMenu = (event, row) => { - handleEvent(event, row, "contextmenu"); - }; - const handleMouseEnter = debounce_default((index) => { - var _a; - (_a = props2.store) == null ? void 0 : _a.commit("setHoverRow", index); - }, 30); - const handleMouseLeave = debounce_default(() => { - var _a; - (_a = props2.store) == null ? void 0 : _a.commit("setHoverRow", null); - }, 30); - const getPadding = (el) => { - const style = window.getComputedStyle(el, null); - const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0; - const paddingRight = Number.parseInt(style.paddingRight, 10) || 0; - const paddingTop = Number.parseInt(style.paddingTop, 10) || 0; - const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0; - return { - left: paddingLeft, - right: paddingRight, - top: paddingTop, - bottom: paddingBottom - }; - }; - const toggleRowClassByCell = (rowSpan, event, toggle) => { - var _a; - let node = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.parentNode; - while (rowSpan > 1) { - node = node == null ? void 0 : node.nextSibling; - if (!node || node.nodeName !== "TR") - break; - toggle(node, "hover-row hover-fixed-row"); - rowSpan--; - } - }; - const handleCellMouseEnter = (event, row, tooltipOptions) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i; - if (!parent2) - return; - const table = parent2; - const cell = getCell(event); - const namespace = (_a = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a.dataset.prefix; - let column2 = null; - if (cell) { - column2 = getColumnByCell( - { - columns: (_c = (_b = props2.store) == null ? void 0 : _b.states.columns.value) != null ? _c : [] - }, - cell, - namespace - ); - if (!column2) { - return; - } - if (cell.rowSpan > 1) { - toggleRowClassByCell(cell.rowSpan, event, addClass); - } - const hoverState = table.hoverState = { - cell, - column: column2, - row - }; - table == null ? void 0 : table.emit( - "cell-mouse-enter", - hoverState.row, - hoverState.column, - hoverState.cell, - event - ); - } - if (!tooltipOptions) { - if (((_d = removePopper) == null ? void 0 : _d.trigger) === cell) { - (_e = removePopper) == null ? void 0 : _e(); - } - return; - } - const cellChild = event.target.querySelector( - ".cell" - ); - if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length && ((_f = cellChild.textContent) == null ? void 0 : _f.trim()))) { - return; - } - const range4 = document.createRange(); - range4.setStart(cellChild, 0); - range4.setEnd(cellChild, cellChild.childNodes.length); - const { width: rangeWidth, height: rangeHeight } = range4.getBoundingClientRect(); - const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect(); - const { top, left, right, bottom } = getPadding(cellChild); - const horizontalPadding = left + right; - const verticalPadding = top + bottom; - if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) { - createTablePopper( - tooltipOptions, - (_g = (cell == null ? void 0 : cell.innerText) || (cell == null ? void 0 : cell.textContent)) != null ? _g : "", - row, - column2, - cell, - table - ); - } else if (((_h = removePopper) == null ? void 0 : _h.trigger) === cell) { - (_i = removePopper) == null ? void 0 : _i(); - } - }; - const handleCellMouseLeave = (event) => { - const cell = getCell(event); - if (!cell) - return; - if (cell.rowSpan > 1) { - toggleRowClassByCell(cell.rowSpan, event, removeClass); - } - const oldHoverState = parent2 == null ? void 0 : parent2.hoverState; - parent2 == null ? void 0 : parent2.emit( - "cell-mouse-leave", - oldHoverState == null ? void 0 : oldHoverState.row, - oldHoverState == null ? void 0 : oldHoverState.column, - oldHoverState == null ? void 0 : oldHoverState.cell, - event - ); - }; - return { - handleDoubleClick, - handleClick, - handleContextMenu, - handleMouseEnter, - handleMouseLeave, - handleCellMouseEnter, - handleCellMouseLeave, - tooltipContent, - tooltipTrigger - }; -} - -// node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs -function useStyles(props2) { - const parent2 = inject(TABLE_INJECTION_KEY); - const ns = useNamespace("table"); - const getRowStyle = (row, rowIndex) => { - const rowStyle = parent2 == null ? void 0 : parent2.props.rowStyle; - if (isFunction(rowStyle)) { - return rowStyle.call(null, { - row, - rowIndex - }); - } - return rowStyle || null; - }; - const getRowClass = (row, rowIndex, displayIndex) => { - var _a; - const classes = [ns.e("row")]; - if ((parent2 == null ? void 0 : parent2.props.highlightCurrentRow) && row === ((_a = props2.store) == null ? void 0 : _a.states.currentRow.value)) { - classes.push("current-row"); - } - if (props2.stripe && displayIndex % 2 === 1) { - classes.push(ns.em("row", "striped")); - } - const rowClassName = parent2 == null ? void 0 : parent2.props.rowClassName; - if (isString(rowClassName)) { - classes.push(rowClassName); - } else if (isFunction(rowClassName)) { - classes.push( - rowClassName.call(null, { - row, - rowIndex - }) - ); - } - return classes; - }; - const getCellStyle = (rowIndex, columnIndex, row, column2) => { - const cellStyle = parent2 == null ? void 0 : parent2.props.cellStyle; - let cellStyles = cellStyle != null ? cellStyle : {}; - if (isFunction(cellStyle)) { - cellStyles = cellStyle.call(null, { - rowIndex, - columnIndex, - row, - column: column2 - }); - } - const fixedStyle = getFixedColumnOffset( - columnIndex, - props2 == null ? void 0 : props2.fixed, - props2.store - ); - ensurePosition(fixedStyle, "left"); - ensurePosition(fixedStyle, "right"); - return Object.assign({}, cellStyles, fixedStyle); - }; - const getCellClass = (rowIndex, columnIndex, row, column2, offset3) => { - const fixedClasses = getFixedColumnsClass( - ns.b(), - columnIndex, - props2 == null ? void 0 : props2.fixed, - props2.store, - void 0, - offset3 - ); - const classes = [column2.id, column2.align, column2.className, ...fixedClasses]; - const cellClassName = parent2 == null ? void 0 : parent2.props.cellClassName; - if (isString(cellClassName)) { - classes.push(cellClassName); - } else if (isFunction(cellClassName)) { - classes.push( - cellClassName.call(null, { - rowIndex, - columnIndex, - row, - column: column2 - }) - ); - } - classes.push(ns.e("cell")); - return classes.filter((className) => Boolean(className)).join(" "); - }; - const getSpan = (row, column2, rowIndex, columnIndex) => { - let rowspan = 1; - let colspan = 1; - const fn2 = parent2 == null ? void 0 : parent2.props.spanMethod; - if (isFunction(fn2)) { - const result2 = fn2({ - row, - column: column2, - rowIndex, - columnIndex - }); - if (isArray(result2)) { - rowspan = result2[0]; - colspan = result2[1]; - } else if (isObject(result2)) { - rowspan = result2.rowspan; - colspan = result2.colspan; - } - } - return { rowspan, colspan }; - }; - const getColspanRealWidth = (columns2, colspan, index) => { - if (colspan < 1) { - return columns2[index].realWidth; - } - const widthArr = columns2.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan); - return Number( - widthArr.reduce((acc, width) => Number(acc) + Number(width), -1) - ); - }; - return { - getRowStyle, - getRowClass, - getCellStyle, - getCellClass, - getSpan, - getColspanRealWidth - }; -} - -// node_modules/element-plus/es/components/table/src/table-body/td-wrapper.mjs -var _hoisted_167 = ["colspan", "rowspan"]; -var _sfc_main127 = defineComponent({ - ...{ - name: "TableTdWrapper" - }, - __name: "td-wrapper", - props: { - colspan: { - type: Number, - default: 1 - }, - rowspan: { - type: Number, - default: 1 - } - }, - setup(__props) { - return (_ctx, _cache) => { - return openBlock(), createElementBlock("td", { - colspan: __props.colspan, - rowspan: __props.rowspan - }, [ - renderSlot(_ctx.$slots, "default") - ], 8, _hoisted_167); - }; - } -}); -var TdWrapper = _export_sfc(_sfc_main127, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table-body/td-wrapper.vue"]]); - -// node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs -function useRender(props2) { - const parent2 = inject(TABLE_INJECTION_KEY); - const ns = useNamespace("table"); - const { - handleDoubleClick, - handleClick, - handleContextMenu, - handleMouseEnter, - handleMouseLeave, - handleCellMouseEnter, - handleCellMouseLeave, - tooltipContent, - tooltipTrigger - } = useEvents(props2); - const { - getRowStyle, - getRowClass, - getCellStyle, - getCellClass, - getSpan, - getColspanRealWidth - } = useStyles(props2); - let displayIndex = -1; - const firstDefaultColumnIndex = computed(() => { - var _a; - return (_a = props2.store) == null ? void 0 : _a.states.columns.value.findIndex( - ({ type: type4 }) => type4 === "default" - ); - }); - const getKeyOfRow = (row, index) => { - var _a; - const rowKey2 = (_a = parent2 == null ? void 0 : parent2.props) == null ? void 0 : _a.rowKey; - if (rowKey2) { - return getRowIdentity(row, rowKey2); - } - return index; - }; - const rowRender = (row, $index, treeRowData, expanded = false) => { - const { tooltipEffect, tooltipOptions, store } = props2; - const { indent, columns: columns2 } = store.states; - const rowClasses = []; - let display = true; - if (treeRowData) { - rowClasses.push(ns.em("row", `level-${treeRowData.level}`)); - display = !!treeRowData.display; - } - if ($index === 0) { - displayIndex = -1; - } - if (props2.stripe && display) { - displayIndex++; - } - rowClasses.push(...getRowClass(row, $index, displayIndex)); - const displayStyle = display ? null : { display: "none" }; - return h( - "tr", - { - style: [displayStyle, getRowStyle(row, $index)], - class: rowClasses, - key: getKeyOfRow(row, $index), - onDblclick: ($event) => handleDoubleClick($event, row), - onClick: ($event) => handleClick($event, row), - onContextmenu: ($event) => handleContextMenu($event, row), - onMouseenter: () => handleMouseEnter($index), - onMouseleave: handleMouseLeave - }, - columns2.value.map((column2, cellIndex) => { - const { rowspan, colspan } = getSpan(row, column2, $index, cellIndex); - if (!rowspan || !colspan) { - return null; - } - const columnData = Object.assign({}, column2); - columnData.realWidth = getColspanRealWidth( - columns2.value, - colspan, - cellIndex - ); - const data = { - store, - _self: props2.context || parent2, - column: columnData, - row, - $index, - cellIndex, - expanded - }; - if (cellIndex === firstDefaultColumnIndex.value && treeRowData) { - data.treeNode = { - indent: treeRowData.level && treeRowData.level * indent.value, - level: treeRowData.level - }; - if (isBoolean2(treeRowData.expanded)) { - data.treeNode.expanded = treeRowData.expanded; - if ("loading" in treeRowData) { - data.treeNode.loading = treeRowData.loading; - } - if ("noLazyChildren" in treeRowData) { - data.treeNode.noLazyChildren = treeRowData.noLazyChildren; - } - } - } - const baseKey = `${getKeyOfRow(row, $index)},${cellIndex}`; - const patchKey = columnData.columnKey || columnData.rawColumnKey || ""; - const mergedTooltipOptions = column2.showOverflowTooltip && merge_default( - { - effect: tooltipEffect - }, - tooltipOptions, - column2.showOverflowTooltip - ); - return h( - TdWrapper, - { - style: getCellStyle($index, cellIndex, row, column2), - class: getCellClass($index, cellIndex, row, column2, colspan - 1), - key: `${patchKey}${baseKey}`, - rowspan, - colspan, - onMouseenter: ($event) => handleCellMouseEnter( - $event, - row, - mergedTooltipOptions - ), - onMouseleave: handleCellMouseLeave - }, - { - default: () => cellChildren(cellIndex, column2, data) - } - ); - }) - ); - }; - const cellChildren = (_cellIndex, column2, data) => { - return column2.renderCell(data); - }; - const wrappedRowRender = (row, $index) => { - const store = props2.store; - const { isRowExpanded, assertRowKey } = store; - const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey: rowKey2 } = store.states; - const columns2 = store.states.columns.value; - const hasExpandColumn = columns2.some(({ type: type4 }) => type4 === "expand"); - if (hasExpandColumn) { - const expanded = isRowExpanded(row); - const tr = rowRender(row, $index, void 0, expanded); - const renderExpanded = parent2 == null ? void 0 : parent2.renderExpanded; - if (!renderExpanded) { - console.error("[Element Error]renderExpanded is required."); - return tr; - } - const rows = [[tr]]; - if (parent2.props.preserveExpandedContent || expanded) { - rows[0].push( - h( - "tr", - { - key: `expanded-row__${tr.key}`, - style: { display: expanded ? "" : "none" } - }, - [ - h( - "td", - { - colspan: columns2.length, - class: `${ns.e("cell")} ${ns.e("expanded-cell")}` - }, - [renderExpanded({ row, $index, store, expanded })] - ) - ] - ) - ); - } - return rows; - } else if (Object.keys(treeData.value).length) { - assertRowKey(); - const key = getRowIdentity(row, rowKey2.value); - let cur = treeData.value[key]; - let treeRowData = null; - if (cur) { - treeRowData = { - expanded: cur.expanded, - level: cur.level, - display: true, - noLazyChildren: void 0, - loading: void 0 - }; - if (isBoolean2(cur.lazy)) { - if (treeRowData && isBoolean2(cur.loaded) && cur.loaded) { - treeRowData.noLazyChildren = !(cur.children && cur.children.length); - } - treeRowData.loading = cur.loading; - } - } - const tmp = [rowRender(row, $index, treeRowData != null ? treeRowData : void 0)]; - if (cur) { - let i = 0; - const traverse = (children, parent22) => { - if (!(children && children.length && parent22)) - return; - children.forEach((node) => { - const innerTreeRowData = { - display: parent22.display && parent22.expanded, - level: parent22.level + 1, - expanded: false, - noLazyChildren: false, - loading: false - }; - const childKey = getRowIdentity(node, rowKey2.value); - if (isPropAbsent(childKey)) { - throw new Error("For nested data item, row-key is required."); - } - cur = { ...treeData.value[childKey] }; - if (cur) { - innerTreeRowData.expanded = cur.expanded; - cur.level = cur.level || innerTreeRowData.level; - cur.display = !!(cur.expanded && innerTreeRowData.display); - if (isBoolean2(cur.lazy)) { - if (isBoolean2(cur.loaded) && cur.loaded) { - innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length); - } - innerTreeRowData.loading = cur.loading; - } - } - i++; - tmp.push(rowRender(node, $index + i, innerTreeRowData)); - if (cur) { - const nodes2 = lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value]; - traverse(nodes2, cur); - } - }); - }; - cur.display = true; - const nodes = lazyTreeNodeMap.value[key] || row[childrenColumnName.value]; - traverse(nodes, cur); - } - return tmp; - } else { - return rowRender(row, $index, void 0); - } - }; - return { - wrappedRowRender, - tooltipContent, - tooltipTrigger - }; -} - -// node_modules/element-plus/es/components/table/src/table-body/defaults.mjs -var defaultProps2 = { - store: { - required: true, - type: Object - }, - stripe: Boolean, - tooltipEffect: String, - tooltipOptions: { - type: Object - }, - context: { - default: () => ({}), - type: Object - }, - rowClassName: [String, Function], - rowStyle: [Object, Function], - fixed: { - type: String, - default: "" - }, - highlight: Boolean -}; - -// node_modules/element-plus/es/components/table/src/table-body/index.mjs -var TableBody = defineComponent({ - name: "ElTableBody", - props: defaultProps2, - setup(props2) { - var _a; - const instance = getCurrentInstance(); - const parent2 = inject(TABLE_INJECTION_KEY); - const ns = useNamespace("table"); - const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender(props2); - const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2); - const hoveredCellList = []; - watch((_a = props2.store) == null ? void 0 : _a.states.hoverRow, (newVal, oldVal) => { - var _a2, _b; - const el = instance == null ? void 0 : instance.vnode.el; - const rows = Array.from((el == null ? void 0 : el.children) || []).filter( - (e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`) - ); - let rowNum = newVal; - const childNodes = (_a2 = rows[rowNum]) == null ? void 0 : _a2.childNodes; - if (childNodes == null ? void 0 : childNodes.length) { - let control = 0; - const indexes = Array.from(childNodes).reduce((acc, item, index) => { - var _a3, _b2; - if (((_a3 = childNodes[index]) == null ? void 0 : _a3.colSpan) > 1) { - control = (_b2 = childNodes[index]) == null ? void 0 : _b2.colSpan; - } - if (item.nodeName !== "TD" && control === 0) { - acc.push(index); - } - control > 0 && control--; - return acc; - }, []); - indexes.forEach((rowIndex) => { - var _a3; - rowNum = newVal; - while (rowNum > 0) { - const preChildNodes = (_a3 = rows[rowNum - 1]) == null ? void 0 : _a3.childNodes; - if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) { - addClass(preChildNodes[rowIndex], "hover-cell"); - hoveredCellList.push(preChildNodes[rowIndex]); - break; - } - rowNum--; - } - }); - } else { - hoveredCellList.forEach((item) => removeClass(item, "hover-cell")); - hoveredCellList.length = 0; - } - if (!((_b = props2.store) == null ? void 0 : _b.states.isComplex.value) || !isClient) - return; - rAF(() => { - const oldRow = rows[oldVal]; - const newRow = rows[newVal]; - if (oldRow && !oldRow.classList.contains("hover-fixed-row")) { - removeClass(oldRow, "hover-row"); - } - if (newRow) { - addClass(newRow, "hover-row"); - } - }); - }); - onUnmounted(() => { - var _a2; - (_a2 = removePopper) == null ? void 0 : _a2(); - }); - return { - ns, - onColumnsChange, - onScrollableChange, - wrappedRowRender, - tooltipContent, - tooltipTrigger - }; - }, - render() { - const { wrappedRowRender, store } = this; - const data = (store == null ? void 0 : store.states.data.value) || []; - return h("tbody", { tabIndex: -1 }, [ - data.reduce((acc, row) => { - return acc.concat(wrappedRowRender(row, acc.length)); - }, []) - ]); - } -}); - -// node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs -function useMapState() { - const table = inject(TABLE_INJECTION_KEY); - const store = table == null ? void 0 : table.store; - const leftFixedLeafCount = computed(() => { - var _a; - return (_a = store == null ? void 0 : store.states.fixedLeafColumnsLength.value) != null ? _a : 0; - }); - const rightFixedLeafCount = computed(() => { - var _a; - return (_a = store == null ? void 0 : store.states.rightFixedColumns.value.length) != null ? _a : 0; - }); - const columnsCount = computed(() => { - var _a; - return (_a = store == null ? void 0 : store.states.columns.value.length) != null ? _a : 0; - }); - const leftFixedCount = computed(() => { - var _a; - return (_a = store == null ? void 0 : store.states.fixedColumns.value.length) != null ? _a : 0; - }); - const rightFixedCount = computed(() => { - var _a; - return (_a = store == null ? void 0 : store.states.rightFixedColumns.value.length) != null ? _a : 0; - }); - return { - leftFixedLeafCount, - rightFixedLeafCount, - columnsCount, - leftFixedCount, - rightFixedCount, - columns: computed(() => { - var _a; - return (_a = store == null ? void 0 : store.states.columns.value) != null ? _a : []; - }) - }; -} - -// node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs -function useStyle2(props2) { - const { columns: columns2 } = useMapState(); - const ns = useNamespace("table"); - const getCellClasses = (columns22, cellIndex) => { - const column2 = columns22[cellIndex]; - const classes = [ - ns.e("cell"), - column2.id, - column2.align, - column2.labelClassName, - ...getFixedColumnsClass(ns.b(), cellIndex, column2.fixed, props2.store) - ]; - if (column2.className) { - classes.push(column2.className); - } - if (!column2.children) { - classes.push(ns.is("leaf")); - } - return classes; - }; - const getCellStyles = (column2, cellIndex) => { - const fixedStyle = getFixedColumnOffset( - cellIndex, - column2.fixed, - props2.store - ); - ensurePosition(fixedStyle, "left"); - ensurePosition(fixedStyle, "right"); - return fixedStyle; - }; - return { - getCellClasses, - getCellStyles, - columns: columns2 - }; -} - -// node_modules/element-plus/es/components/table/src/table-footer/index.mjs -var TableFooter = defineComponent({ - name: "ElTableFooter", - props: { - fixed: { - type: String, - default: "" - }, - store: { - required: true, - type: Object - }, - summaryMethod: Function, - sumText: String, - border: Boolean, - defaultSort: { - type: Object, - default: () => { - return { - prop: "", - order: "" - }; - } - } - }, - setup(props2) { - const parent2 = inject(TABLE_INJECTION_KEY); - const ns = useNamespace("table"); - const { getCellClasses, getCellStyles, columns: columns2 } = useStyle2( - props2 - ); - const { onScrollableChange, onColumnsChange } = useLayoutObserver(parent2); - return { - ns, - onScrollableChange, - onColumnsChange, - getCellClasses, - getCellStyles, - columns: columns2 - }; - }, - render() { - const { columns: columns2, getCellStyles, getCellClasses, summaryMethod, sumText } = this; - const data = this.store.states.data.value; - let sums = []; - if (summaryMethod) { - sums = summaryMethod({ - columns: columns2, - data - }); - } else { - columns2.forEach((column2, index) => { - if (index === 0) { - sums[index] = sumText; - return; - } - const values2 = data.map((item) => Number(item[column2.property])); - const precisions = []; - let notNumber = true; - values2.forEach((value) => { - if (!Number.isNaN(+value)) { - notNumber = false; - const decimal = `${value}`.split(".")[1]; - precisions.push(decimal ? decimal.length : 0); - } - }); - const precision = Math.max.apply(null, precisions); - if (!notNumber) { - sums[index] = values2.reduce((prev, curr) => { - const value = Number(curr); - if (!Number.isNaN(+value)) { - return Number.parseFloat( - (prev + curr).toFixed(Math.min(precision, 20)) - ); - } else { - return prev; - } - }, 0); - } else { - sums[index] = ""; - } - }); - } - return h( - h("tfoot", [ - h("tr", {}, [ - ...columns2.map( - (column2, cellIndex) => h( - "td", - { - key: cellIndex, - colspan: column2.colSpan, - rowspan: column2.rowSpan, - class: getCellClasses(columns2, cellIndex), - style: getCellStyles(column2, cellIndex) - }, - [ - h( - "div", - { - class: ["cell", column2.labelClassName] - }, - [sums[cellIndex]] - ) - ] - ) - ) - ]) - ]) - ); - } -}); - -// node_modules/element-plus/es/components/table/src/table/utils-helper.mjs -function useUtils2(store) { - const setCurrentRow = (row) => { - store.commit("setCurrentRow", row); - }; - const getSelectionRows = () => { - return store.getSelectionRows(); - }; - const toggleRowSelection = (row, selected, ignoreSelectable = true) => { - store.toggleRowSelection(row, selected, false, ignoreSelectable); - store.updateAllSelected(); - }; - const clearSelection = () => { - store.clearSelection(); - }; - const clearFilter = (columnKeys) => { - store.clearFilter(columnKeys); - }; - const toggleAllSelection = () => { - store.commit("toggleAllSelection"); - }; - const toggleRowExpansion = (row, expanded) => { - store.toggleRowExpansionAdapter(row, expanded); - }; - const clearSort = () => { - store.clearSort(); - }; - const sort = (prop, order) => { - store.commit("sort", { prop, order }); - }; - const updateKeyChildren = (key, data) => { - store.updateKeyChildren(key, data); - }; - return { - setCurrentRow, - getSelectionRows, - toggleRowSelection, - clearSelection, - clearFilter, - toggleAllSelection, - toggleRowExpansion, - clearSort, - sort, - updateKeyChildren - }; -} - -// node_modules/element-plus/es/components/table/src/table/style-helper.mjs -function useStyle3(props2, layout2, store, table) { - const isHidden2 = ref(false); - const renderExpanded = ref(null); - const resizeProxyVisible = ref(false); - const setDragVisible = (visible) => { - resizeProxyVisible.value = visible; - }; - const resizeState = ref({ - width: null, - height: null, - headerHeight: null - }); - const isGroup = ref(false); - const scrollbarViewStyle = { - display: "inline-block", - verticalAlign: "middle" - }; - const tableWidth = ref(); - const tableScrollHeight = ref(0); - const bodyScrollHeight = ref(0); - const headerScrollHeight = ref(0); - const footerScrollHeight = ref(0); - const appendScrollHeight = ref(0); - watch( - () => props2.height, - (value) => { - layout2.setHeight(value != null ? value : null); - }, - { immediate: true } - ); - watch( - () => props2.maxHeight, - (value) => { - layout2.setMaxHeight(value != null ? value : null); - }, - { immediate: true } - ); - watch( - () => [props2.currentRowKey, store.states.rowKey], - ([currentRowKey, rowKey2]) => { - if (!unref(rowKey2) || !unref(currentRowKey)) - return; - store.setCurrentRowKey(`${currentRowKey}`); - }, - { - immediate: true - } - ); - watch( - () => props2.data, - (data) => { - table.store.commit("setData", data); - }, - { - immediate: true, - deep: true - } - ); - watchEffect(() => { - if (props2.expandRowKeys) { - store.setExpandRowKeysAdapter(props2.expandRowKeys); - } - }); - const handleMouseLeave = () => { - table.store.commit("setHoverRow", null); - if (table.hoverState) - table.hoverState = null; - }; - const handleHeaderFooterMousewheel = (_event2, data) => { - const { pixelX, pixelY } = data; - if (Math.abs(pixelX) >= Math.abs(pixelY)) { - table.refs.bodyWrapper.scrollLeft += data.pixelX / 5; - } - }; - const shouldUpdateHeight = computed(() => { - return props2.height || props2.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0; - }); - const tableBodyStyles = computed(() => { - return { - width: layout2.bodyWidth.value ? `${layout2.bodyWidth.value}px` : "" - }; - }); - const doLayout = () => { - if (shouldUpdateHeight.value) { - layout2.updateElsHeight(); - } - layout2.updateColumnsWidth(); - if (typeof window === "undefined") - return; - requestAnimationFrame(syncPosition); - }; - onMounted(async () => { - await nextTick(); - store.updateColumns(); - bindEvents(); - requestAnimationFrame(doLayout); - const el = table.vnode.el; - const tableHeader = table.refs.headerWrapper; - if (props2.flexible && el && el.parentElement) { - el.parentElement.style.minWidth = "0"; - } - resizeState.value = { - width: tableWidth.value = el.offsetWidth, - height: el.offsetHeight, - headerHeight: props2.showHeader && tableHeader ? tableHeader.offsetHeight : null - }; - store.states.columns.value.forEach((column2) => { - if (column2.filteredValue && column2.filteredValue.length) { - table.store.commit("filterChange", { - column: column2, - values: column2.filteredValue, - silent: true - }); - } - }); - table.$ready = true; - }); - const setScrollClassByEl = (el, className) => { - if (!el) - return; - const classList = Array.from(el.classList).filter( - (item) => !item.startsWith("is-scrolling-") - ); - classList.push(layout2.scrollX.value ? className : "is-scrolling-none"); - el.className = classList.join(" "); - }; - const setScrollClass = (className) => { - const { tableWrapper } = table.refs; - setScrollClassByEl(tableWrapper, className); - }; - const hasScrollClass = (className) => { - const { tableWrapper } = table.refs; - return !!(tableWrapper && tableWrapper.classList.contains(className)); - }; - const syncPosition = function() { - if (!table.refs.scrollBarRef) - return; - if (!layout2.scrollX.value) { - const scrollingNoneClass = "is-scrolling-none"; - if (!hasScrollClass(scrollingNoneClass)) { - setScrollClass(scrollingNoneClass); - } - return; - } - const scrollContainer = table.refs.scrollBarRef.wrapRef; - if (!scrollContainer) - return; - const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer; - const { headerWrapper, footerWrapper } = table.refs; - if (headerWrapper) - headerWrapper.scrollLeft = scrollLeft; - if (footerWrapper) - footerWrapper.scrollLeft = scrollLeft; - const maxScrollLeftPosition = scrollWidth - offsetWidth - 1; - if (scrollLeft >= maxScrollLeftPosition) { - setScrollClass("is-scrolling-right"); - } else if (scrollLeft === 0) { - setScrollClass("is-scrolling-left"); - } else { - setScrollClass("is-scrolling-middle"); - } - }; - const bindEvents = () => { - if (!table.refs.scrollBarRef) - return; - if (table.refs.scrollBarRef.wrapRef) { - useEventListener( - table.refs.scrollBarRef.wrapRef, - "scroll", - syncPosition, - { - passive: true - } - ); - } - if (props2.fit) { - useResizeObserver(table.vnode.el, resizeListener); - } else { - useEventListener(window, "resize", resizeListener); - } - useResizeObserver(table.refs.tableInnerWrapper, () => { - var _a, _b; - resizeListener(); - (_b = (_a = table.refs) == null ? void 0 : _a.scrollBarRef) == null ? void 0 : _b.update(); - }); - }; - const resizeListener = () => { - var _a, _b, _c, _d; - const el = table.vnode.el; - if (!table.$ready || !el) - return; - let shouldUpdateLayout = false; - const { - width: oldWidth, - height: oldHeight, - headerHeight: oldHeaderHeight - } = resizeState.value; - const width = tableWidth.value = el.offsetWidth; - if (oldWidth !== width) { - shouldUpdateLayout = true; - } - const height = el.offsetHeight; - if ((props2.height || shouldUpdateHeight.value) && oldHeight !== height) { - shouldUpdateLayout = true; - } - const tableHeader = props2.tableLayout === "fixed" ? table.refs.headerWrapper : (_a = table.refs.tableHeaderRef) == null ? void 0 : _a.$el; - if (props2.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) !== oldHeaderHeight) { - shouldUpdateLayout = true; - } - tableScrollHeight.value = ((_b = table.refs.tableWrapper) == null ? void 0 : _b.scrollHeight) || 0; - headerScrollHeight.value = (tableHeader == null ? void 0 : tableHeader.scrollHeight) || 0; - footerScrollHeight.value = ((_c = table.refs.footerWrapper) == null ? void 0 : _c.offsetHeight) || 0; - appendScrollHeight.value = ((_d = table.refs.appendWrapper) == null ? void 0 : _d.offsetHeight) || 0; - bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value; - if (shouldUpdateLayout) { - resizeState.value = { - width, - height, - headerHeight: props2.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) || 0 - }; - doLayout(); - } - }; - const tableSize = useFormSize(); - const bodyWidth = computed(() => { - const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout2; - return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : ""; - }); - const tableLayout = computed(() => { - if (props2.maxHeight) - return "fixed"; - return props2.tableLayout; - }); - const emptyBlockStyle = computed(() => { - if (props2.data && props2.data.length) - return; - let height = "100%"; - if (props2.height && bodyScrollHeight.value) { - height = `${bodyScrollHeight.value}px`; - } - const width = tableWidth.value; - return { - width: width ? `${width}px` : "", - height - }; - }); - const scrollbarStyle = computed(() => { - if (props2.height) { - return { - height: "100%" - }; - } - if (props2.maxHeight) { - if (!Number.isNaN(Number(props2.maxHeight))) { - return { - maxHeight: `${+props2.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px` - }; - } else { - return { - maxHeight: `calc(${props2.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` - }; - } - } - return {}; - }); - return { - isHidden: isHidden2, - renderExpanded, - setDragVisible, - isGroup, - handleMouseLeave, - handleHeaderFooterMousewheel, - tableSize, - emptyBlockStyle, - resizeProxyVisible, - bodyWidth, - resizeState, - doLayout, - tableBodyStyles, - tableLayout, - scrollbarViewStyle, - scrollbarStyle - }; -} - -// node_modules/element-plus/es/components/table/src/table/key-render-helper.mjs -function useKeyRender(table) { - let observer; - const initWatchDom = () => { - const el = table.vnode.el; - const columnsWrapper = el.querySelector(".hidden-columns"); - const config = { childList: true, subtree: true }; - const updateOrderFns = table.store.states.updateOrderFns; - observer = new MutationObserver(() => { - updateOrderFns.forEach((fn2) => fn2()); - }); - observer.observe(columnsWrapper, config); - }; - onMounted(() => { - initWatchDom(); - }); - onUnmounted(() => { - observer == null ? void 0 : observer.disconnect(); - }); -} - -// node_modules/element-plus/es/components/table/src/table/defaults.mjs -var defaultProps3 = { - data: { - type: Array, - default: () => [] - }, - size: useSizeProp, - width: [String, Number], - height: [String, Number], - maxHeight: [String, Number], - fit: { - type: Boolean, - default: true - }, - stripe: Boolean, - border: Boolean, - rowKey: [String, Function], - showHeader: { - type: Boolean, - default: true - }, - showSummary: Boolean, - sumText: String, - summaryMethod: Function, - rowClassName: [String, Function], - rowStyle: [Object, Function], - cellClassName: [String, Function], - cellStyle: [Object, Function], - headerRowClassName: [String, Function], - headerRowStyle: [Object, Function], - headerCellClassName: [String, Function], - headerCellStyle: [Object, Function], - highlightCurrentRow: Boolean, - currentRowKey: [String, Number], - emptyText: String, - expandRowKeys: Array, - defaultExpandAll: Boolean, - defaultSort: Object, - tooltipEffect: String, - tooltipOptions: Object, - spanMethod: Function, - selectOnIndeterminate: { - type: Boolean, - default: true - }, - indent: { - type: Number, - default: 16 - }, - treeProps: { - type: Object, - default: () => { - return { - hasChildren: "hasChildren", - children: "children", - checkStrictly: false - }; - } - }, - lazy: Boolean, - load: Function, - style: { - type: [String, Object, Array], - default: () => ({}) - }, - className: { - type: String, - default: "" - }, - tableLayout: { - type: String, - default: "fixed" - }, - scrollbarAlwaysOn: Boolean, - flexible: Boolean, - showOverflowTooltip: [Boolean, Object], - tooltipFormatter: Function, - appendFilterPanelTo: String, - scrollbarTabindex: { - type: [Number, String], - default: void 0 - }, - allowDragLastColumn: { - type: Boolean, - default: true - }, - preserveExpandedContent: Boolean, - nativeScrollbar: Boolean -}; - -// node_modules/element-plus/es/components/table/src/h-helper.mjs -function hColgroup(props2) { - const isAuto = props2.tableLayout === "auto"; - let columns2 = props2.columns || []; - if (isAuto) { - if (columns2.every(({ width }) => isUndefined2(width))) { - columns2 = []; - } - } - const getPropsData = (column2) => { - const propsData = { - key: `${props2.tableLayout}_${column2.id}`, - style: {}, - name: void 0 - }; - if (isAuto) { - propsData.style = { - width: `${column2.width}px` - }; - } else { - propsData.name = column2.id; - } - return propsData; - }; - return h( - "colgroup", - {}, - columns2.map((column2) => h("col", getPropsData(column2))) - ); -} -hColgroup.props = ["columns", "tableLayout"]; - -// node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs -var useScrollbar = () => { - const scrollBarRef = ref(); - const scrollTo2 = (options, yCoord) => { - const scrollbar = scrollBarRef.value; - if (scrollbar) { - scrollbar.scrollTo(options, yCoord); - } - }; - const setScrollPosition = (position, offset3) => { - const scrollbar = scrollBarRef.value; - if (scrollbar && isNumber2(offset3) && ["Top", "Left"].includes(position)) { - scrollbar[`setScroll${position}`](offset3); - } - }; - const setScrollTop = (top) => setScrollPosition("Top", top); - const setScrollLeft = (left) => setScrollPosition("Left", left); - return { - scrollBarRef, - scrollTo: scrollTo2, - setScrollTop, - setScrollLeft - }; -}; - -// node_modules/normalize-wheel-es/dist/index.mjs -var v = false; -var o; -var f; -var s; -var u; -var d; -var N2; -var l; -var p; -var m; -var w; -var D; -var x; -var E2; -var M; -var F; -function a() { - if (!v) { - v = true; - var e = navigator.userAgent, n = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), i = /(Mac OS X)|(Windows)|(Linux)/.exec(e); - if (x = /\b(iPhone|iP[ao]d)/.exec(e), E2 = /\b(iP[ao]d)/.exec(e), w = /Android/i.exec(e), M = /FBAN\/\w+;/i.exec(e), F = /Mobile/i.exec(e), D = !!/Win64/.exec(e), n) { - o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode); - var r = /(?:Trident\/(\d+.\d+))/.exec(e); - N2 = r ? parseFloat(r[1]) + 4 : o, f = n[2] ? parseFloat(n[2]) : NaN, s = n[3] ? parseFloat(n[3]) : NaN, u = n[4] ? parseFloat(n[4]) : NaN, u ? (n = /(?:Chrome\/(\d+\.\d+))/.exec(e), d = n && n[1] ? parseFloat(n[1]) : NaN) : d = NaN; - } else o = f = s = d = u = NaN; - if (i) { - if (i[1]) { - var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e); - l = t ? parseFloat(t[1].replace("_", ".")) : true; - } else l = false; - p = !!i[2], m = !!i[3]; - } else l = p = m = false; - } -} -var _ = { ie: function() { - return a() || o; -}, ieCompatibilityMode: function() { - return a() || N2 > o; -}, ie64: function() { - return _.ie() && D; -}, firefox: function() { - return a() || f; -}, opera: function() { - return a() || s; -}, webkit: function() { - return a() || u; -}, safari: function() { - return _.webkit(); -}, chrome: function() { - return a() || d; -}, windows: function() { - return a() || p; -}, osx: function() { - return a() || l; -}, linux: function() { - return a() || m; -}, iphone: function() { - return a() || x; -}, mobile: function() { - return a() || x || E2 || w || F; -}, nativeApp: function() { - return a() || M; -}, android: function() { - return a() || w; -}, ipad: function() { - return a() || E2; -} }; -var A = _; -var c = !!(typeof window < "u" && window.document && window.document.createElement); -var U2 = { canUseDOM: c, canUseWorkers: typeof Worker < "u", canUseEventListeners: c && !!(window.addEventListener || window.attachEvent), canUseViewport: c && !!window.screen, isInWorker: !c }; -var h2 = U2; -var X2; -h2.canUseDOM && (X2 = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== true); -function S(e, n) { - if (!h2.canUseDOM || n && !("addEventListener" in document)) return false; - var i = "on" + e, r = i in document; - if (!r) { - var t = document.createElement("div"); - t.setAttribute(i, "return;"), r = typeof t[i] == "function"; - } - return !r && X2 && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r; -} -var b = S; -var O = 10; -var I2 = 40; -var P2 = 800; -function T(e) { - var n = 0, i = 0, r = 0, t = 0; - return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (n = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (n = i, i = 0), r = n * O, t = i * O, "deltaY" in e && (t = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || t) && e.deltaMode && (e.deltaMode == 1 ? (r *= I2, t *= I2) : (r *= P2, t *= P2)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), { spinX: n, spinY: i, pixelX: r, pixelY: t }; -} -T.getEventType = function() { - return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel"; -}; -var Y = T; - -// node_modules/element-plus/es/directives/mousewheel/index.mjs -var SCOPE8 = "_Mousewheel"; -var mousewheel = function(element, callback) { - if (element && element.addEventListener) { - removeWheelHandler(element); - const fn2 = function(event) { - const normalized = Y(event); - callback && Reflect.apply(callback, this, [event, normalized]); - }; - element[SCOPE8] = { wheelHandler: fn2 }; - element.addEventListener("wheel", fn2, { passive: true }); - } -}; -var removeWheelHandler = (element) => { - var _a; - if ((_a = element[SCOPE8]) == null ? void 0 : _a.wheelHandler) { - element.removeEventListener("wheel", element[SCOPE8].wheelHandler); - element[SCOPE8] = null; - } -}; -var Mousewheel = { - beforeMount(el, binding) { - mousewheel(el, binding.value); - }, - unmounted(el) { - removeWheelHandler(el); - }, - updated(el, binding) { - if (binding.value !== binding.oldValue) { - mousewheel(el, binding.value); - } - } -}; - -// node_modules/element-plus/es/components/table/src/table.mjs -var tableIdSeed = 1; -var _sfc_main128 = defineComponent({ - name: "ElTable", - directives: { - Mousewheel - }, - components: { - TableHeader, - TableBody, - TableFooter, - ElScrollbar, - hColgroup - }, - props: defaultProps3, - emits: [ - "select", - "select-all", - "selection-change", - "cell-mouse-enter", - "cell-mouse-leave", - "cell-contextmenu", - "cell-click", - "cell-dblclick", - "row-click", - "row-contextmenu", - "row-dblclick", - "header-click", - "header-contextmenu", - "sort-change", - "filter-change", - "current-change", - "header-dragend", - "expand-change", - "scroll" - ], - setup(props2) { - const { t } = useLocale(); - const ns = useNamespace("table"); - const table = getCurrentInstance(); - provide(TABLE_INJECTION_KEY, table); - const store = createStore(table, props2); - table.store = store; - const layout2 = new TableLayout({ - store: table.store, - table, - fit: props2.fit, - showHeader: props2.showHeader - }); - table.layout = layout2; - const isEmpty3 = computed(() => (store.states.data.value || []).length === 0); - const { - setCurrentRow, - getSelectionRows, - toggleRowSelection, - clearSelection, - clearFilter, - toggleAllSelection, - toggleRowExpansion, - clearSort, - sort, - updateKeyChildren - } = useUtils2(store); - const { - isHidden: isHidden2, - renderExpanded, - setDragVisible, - isGroup, - handleMouseLeave, - handleHeaderFooterMousewheel, - tableSize, - emptyBlockStyle, - resizeProxyVisible, - bodyWidth, - resizeState, - doLayout, - tableBodyStyles, - tableLayout, - scrollbarViewStyle, - scrollbarStyle - } = useStyle3(props2, layout2, store, table); - const { scrollBarRef, scrollTo: scrollTo2, setScrollLeft, setScrollTop } = useScrollbar(); - const debouncedUpdateLayout = debounce_default(doLayout, 50); - const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`; - table.tableId = tableId; - table.state = { - isGroup, - resizeState, - doLayout, - debouncedUpdateLayout - }; - const computedSumText = computed( - () => { - var _a; - return (_a = props2.sumText) != null ? _a : t("el.table.sumText"); - } - ); - const computedEmptyText = computed(() => { - var _a; - return (_a = props2.emptyText) != null ? _a : t("el.table.emptyText"); - }); - const columns2 = computed(() => { - return convertToRows(store.states.originColumns.value)[0]; - }); - useKeyRender(table); - onBeforeUnmount(() => { - debouncedUpdateLayout.cancel(); - }); - return { - ns, - layout: layout2, - store, - columns: columns2, - handleHeaderFooterMousewheel, - handleMouseLeave, - tableId, - tableSize, - isHidden: isHidden2, - isEmpty: isEmpty3, - renderExpanded, - resizeProxyVisible, - resizeState, - isGroup, - bodyWidth, - tableBodyStyles, - emptyBlockStyle, - debouncedUpdateLayout, - setCurrentRow, - getSelectionRows, - toggleRowSelection, - clearSelection, - clearFilter, - toggleAllSelection, - toggleRowExpansion, - clearSort, - doLayout, - sort, - updateKeyChildren, - t, - setDragVisible, - context: table, - computedSumText, - computedEmptyText, - tableLayout, - scrollbarViewStyle, - scrollbarStyle, - scrollBarRef, - scrollTo: scrollTo2, - setScrollLeft, - setScrollTop, - allowDragLastColumn: props2.allowDragLastColumn - }; - } -}); -var _hoisted_168 = ["data-prefix"]; -var _hoisted_237 = { - ref: "hiddenColumns", - class: "hidden-columns" -}; -function _sfc_render19(_ctx, _cache, $props, $setup, $data, $options) { - const _component_hColgroup = resolveComponent("hColgroup"); - const _component_table_header = resolveComponent("table-header"); - const _component_table_body = resolveComponent("table-body"); - const _component_table_footer = resolveComponent("table-footer"); - const _component_el_scrollbar = resolveComponent("el-scrollbar"); - const _directive_mousewheel = resolveDirective("mousewheel"); - return openBlock(), createElementBlock("div", { - ref: "tableWrapper", - class: normalizeClass([ - { - [_ctx.ns.m("fit")]: _ctx.fit, - [_ctx.ns.m("striped")]: _ctx.stripe, - [_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup, - [_ctx.ns.m("hidden")]: _ctx.isHidden, - [_ctx.ns.m("group")]: _ctx.isGroup, - [_ctx.ns.m("fluid-height")]: _ctx.maxHeight, - [_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value, - [_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value, - [_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value, - [_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100, - "has-footer": _ctx.showSummary - }, - _ctx.ns.m(_ctx.tableSize), - _ctx.className, - _ctx.ns.b(), - _ctx.ns.m(`layout-${_ctx.tableLayout}`) - ]), - style: normalizeStyle(_ctx.style), - "data-prefix": _ctx.ns.namespace.value, - onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args)) - }, [ - createBaseVNode( - "div", - { - ref: "tableInnerWrapper", - class: normalizeClass(_ctx.ns.e("inner-wrapper")) - }, - [ - createBaseVNode( - "div", - _hoisted_237, - [ - renderSlot(_ctx.$slots, "default") - ], - 512 - ), - _ctx.showHeader && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock( - "div", - { - key: 0, - ref: "headerWrapper", - class: normalizeClass(_ctx.ns.e("header-wrapper")) - }, - [ - createBaseVNode( - "table", - { - ref: "tableHeader", - class: normalizeClass(_ctx.ns.e("header")), - style: normalizeStyle(_ctx.tableBodyStyles), - border: "0", - cellpadding: "0", - cellspacing: "0" - }, - [ - createVNode(_component_hColgroup, { - columns: _ctx.store.states.columns.value, - "table-layout": _ctx.tableLayout - }, null, 8, ["columns", "table-layout"]), - createVNode(_component_table_header, { - ref: "tableHeaderRef", - border: _ctx.border, - "default-sort": _ctx.defaultSort, - store: _ctx.store, - "append-filter-panel-to": _ctx.appendFilterPanelTo, - "allow-drag-last-column": _ctx.allowDragLastColumn, - onSetDragVisible: _ctx.setDragVisible - }, null, 8, ["border", "default-sort", "store", "append-filter-panel-to", "allow-drag-last-column", "onSetDragVisible"]) - ], - 6 - ) - ], - 2 - )), [ - [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel] - ]) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - ref: "bodyWrapper", - class: normalizeClass(_ctx.ns.e("body-wrapper")) - }, - [ - createVNode(_component_el_scrollbar, { - ref: "scrollBarRef", - "view-style": _ctx.scrollbarViewStyle, - "wrap-style": _ctx.scrollbarStyle, - always: _ctx.scrollbarAlwaysOn, - tabindex: _ctx.scrollbarTabindex, - native: _ctx.nativeScrollbar, - onScroll: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("scroll", $event)) - }, { - default: withCtx(() => [ - createBaseVNode( - "table", - { - ref: "tableBody", - class: normalizeClass(_ctx.ns.e("body")), - cellspacing: "0", - cellpadding: "0", - border: "0", - style: normalizeStyle({ - width: _ctx.bodyWidth, - tableLayout: _ctx.tableLayout - }) - }, - [ - createVNode(_component_hColgroup, { - columns: _ctx.store.states.columns.value, - "table-layout": _ctx.tableLayout - }, null, 8, ["columns", "table-layout"]), - _ctx.showHeader && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_header, { - key: 0, - ref: "tableHeaderRef", - class: normalizeClass(_ctx.ns.e("body-header")), - border: _ctx.border, - "default-sort": _ctx.defaultSort, - store: _ctx.store, - "append-filter-panel-to": _ctx.appendFilterPanelTo, - onSetDragVisible: _ctx.setDragVisible - }, null, 8, ["class", "border", "default-sort", "store", "append-filter-panel-to", "onSetDragVisible"])) : createCommentVNode("v-if", true), - createVNode(_component_table_body, { - context: _ctx.context, - highlight: _ctx.highlightCurrentRow, - "row-class-name": _ctx.rowClassName, - "tooltip-effect": _ctx.tooltipEffect, - "tooltip-options": _ctx.tooltipOptions, - "row-style": _ctx.rowStyle, - store: _ctx.store, - stripe: _ctx.stripe - }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"]), - _ctx.showSummary && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_footer, { - key: 1, - class: normalizeClass(_ctx.ns.e("body-footer")), - border: _ctx.border, - "default-sort": _ctx.defaultSort, - store: _ctx.store, - "sum-text": _ctx.computedSumText, - "summary-method": _ctx.summaryMethod - }, null, 8, ["class", "border", "default-sort", "store", "sum-text", "summary-method"])) : createCommentVNode("v-if", true) - ], - 6 - ), - _ctx.isEmpty ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref: "emptyBlock", - style: normalizeStyle(_ctx.emptyBlockStyle), - class: normalizeClass(_ctx.ns.e("empty-block")) - }, - [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.ns.e("empty-text")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => [ - createTextVNode( - toDisplayString(_ctx.computedEmptyText), - 1 - ) - ]) - ], - 2 - ) - ], - 6 - )) : createCommentVNode("v-if", true), - _ctx.$slots.append ? (openBlock(), createElementBlock( - "div", - { - key: 1, - ref: "appendWrapper", - class: normalizeClass(_ctx.ns.e("append-wrapper")) - }, - [ - renderSlot(_ctx.$slots, "append") - ], - 2 - )) : createCommentVNode("v-if", true) - ]), - _: 3 - }, 8, ["view-style", "wrap-style", "always", "tabindex", "native"]) - ], - 2 - ), - _ctx.showSummary && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock( - "div", - { - key: 1, - ref: "footerWrapper", - class: normalizeClass(_ctx.ns.e("footer-wrapper")) - }, - [ - createBaseVNode( - "table", - { - class: normalizeClass(_ctx.ns.e("footer")), - cellspacing: "0", - cellpadding: "0", - border: "0", - style: normalizeStyle(_ctx.tableBodyStyles) - }, - [ - createVNode(_component_hColgroup, { - columns: _ctx.store.states.columns.value, - "table-layout": _ctx.tableLayout - }, null, 8, ["columns", "table-layout"]), - createVNode(_component_table_footer, { - border: _ctx.border, - "default-sort": _ctx.defaultSort, - store: _ctx.store, - "sum-text": _ctx.computedSumText, - "summary-method": _ctx.summaryMethod - }, null, 8, ["border", "default-sort", "store", "sum-text", "summary-method"]) - ], - 6 - ) - ], - 2 - )), [ - [vShow, !_ctx.isEmpty], - [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel] - ]) : createCommentVNode("v-if", true), - _ctx.border || _ctx.isGroup ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass(_ctx.ns.e("border-left-patch")) - }, - null, - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ), - withDirectives(createBaseVNode( - "div", - { - ref: "resizeProxy", - class: normalizeClass(_ctx.ns.e("column-resize-proxy")) - }, - null, - 2 - ), [ - [vShow, _ctx.resizeProxyVisible] - ]) - ], 46, _hoisted_168); -} -var Table = _export_sfc(_sfc_main128, [["render", _sfc_render19], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]); - -// node_modules/element-plus/es/components/table/src/config.mjs -var defaultClassNames = { - selection: "table-column--selection", - expand: "table__expand-column" -}; -var cellStarts = { - default: { - order: "" - }, - selection: { - width: 48, - minWidth: 48, - realWidth: 48, - order: "" - }, - expand: { - width: 48, - minWidth: 48, - realWidth: 48, - order: "" - }, - index: { - width: 48, - minWidth: 48, - realWidth: 48, - order: "" - } -}; -var getDefaultClassName = (type4) => { - return defaultClassNames[type4] || ""; -}; -var cellForced = { - selection: { - renderHeader({ store }) { - var _a; - function isDisabled() { - return store.states.data.value && store.states.data.value.length === 0; - } - return h(ElCheckbox, { - disabled: isDisabled(), - size: store.states.tableSize.value, - indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value, - "onUpdate:modelValue": (_a = store.toggleAllSelection) != null ? _a : void 0, - modelValue: store.states.isAllSelected.value, - ariaLabel: store.t("el.table.selectAllLabel") - }); - }, - renderCell({ - row, - column: column2, - store, - $index - }) { - return h(ElCheckbox, { - disabled: column2.selectable ? !column2.selectable.call(null, row, $index) : false, - size: store.states.tableSize.value, - onChange: () => { - store.commit("rowSelectedChanged", row); - }, - onClick: (event) => event.stopPropagation(), - modelValue: store.isSelected(row), - ariaLabel: store.t("el.table.selectRowLabel") - }); - }, - sortable: false, - resizable: false - }, - index: { - renderHeader({ - column: column2 - }) { - return column2.label || "#"; - }, - renderCell({ - column: column2, - $index - }) { - let i = $index + 1; - const index = column2.index; - if (isNumber2(index)) { - i = $index + index; - } else if (isFunction(index)) { - i = index($index); - } - return h("div", {}, [i]); - }, - sortable: false - }, - expand: { - renderHeader({ - column: column2 - }) { - return column2.label || ""; - }, - renderCell({ - column: column2, - row, - store, - expanded - }) { - const { ns } = store; - const classes = [ns.e("expand-icon")]; - if (!column2.renderExpand && expanded) { - classes.push(ns.em("expand-icon", "expanded")); - } - const callback = function(e) { - e.stopPropagation(); - store.toggleRowExpansion(row); - }; - return h( - "button", - { - type: "button", - "aria-label": store.t( - expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel" - ), - "aria-expanded": expanded, - class: classes, - onClick: callback - }, - { - default: () => { - if (column2.renderExpand) { - return [ - column2.renderExpand({ - expanded - }) - ]; - } - return [ - h(ElIcon, null, { - default: () => { - return [h(arrow_right_default)]; - } - }) - ]; - } - } - ); - }, - sortable: false, - resizable: false - } -}; -function defaultRenderCell({ - row, - column: column2, - $index -}) { - var _a; - const property2 = column2.property; - const value = property2 && getProp(row, property2).value; - if (column2 && column2.formatter) { - return column2.formatter(row, column2, value, $index); - } - return ((_a = value == null ? void 0 : value.toString) == null ? void 0 : _a.call(value)) || ""; -} -function treeCellPrefix({ - row, - treeNode, - store -}, createPlaceholder = false) { - const { ns } = store; - if (!treeNode) { - if (createPlaceholder) { - return [ - h("span", { - class: ns.e("placeholder") - }) - ]; - } - return null; - } - const ele = []; - const callback = function(e) { - e.stopPropagation(); - if (treeNode.loading) { - return; - } - store.loadOrToggle(row); - }; - if (treeNode.indent) { - ele.push( - h("span", { - class: ns.e("indent"), - style: { "padding-left": `${treeNode.indent}px` } - }) - ); - } - if (isBoolean2(treeNode.expanded) && !treeNode.noLazyChildren) { - const expandClasses = [ - ns.e("expand-icon"), - treeNode.expanded ? ns.em("expand-icon", "expanded") : "" - ]; - let icon = arrow_right_default; - if (treeNode.loading) { - icon = loading_default; - } - ele.push( - h( - "button", - { - type: "button", - "aria-label": store.t( - treeNode.expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel" - ), - "aria-expanded": treeNode.expanded, - class: expandClasses, - onClick: callback - }, - { - default: () => { - return [ - h( - ElIcon, - { class: ns.is("loading", treeNode.loading) }, - { - default: () => [h(icon)] - } - ) - ]; - } - } - ) - ); - } else { - ele.push( - h("span", { - class: ns.e("placeholder") - }) - ); - } - return ele; -} - -// node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs -function getAllAliases(props2, aliases) { - return props2.reduce((prev, cur) => { - prev[cur] = cur; - return prev; - }, aliases); -} -function useWatcher2(owner, props_) { - const instance = getCurrentInstance(); - const registerComplexWatchers = () => { - const props2 = ["fixed"]; - const aliases = { - realWidth: "width", - realMinWidth: "minWidth" - }; - const allAliases = getAllAliases(props2, aliases); - Object.keys(allAliases).forEach((key) => { - const columnKey = aliases[key]; - if (hasOwn(props_, columnKey)) { - watch( - () => props_[columnKey], - (newVal) => { - let value = newVal; - if (columnKey === "width" && key === "realWidth") { - value = parseWidth(newVal); - } - if (columnKey === "minWidth" && key === "realMinWidth") { - value = parseMinWidth(newVal); - } - instance.columnConfig.value[columnKey] = value; - instance.columnConfig.value[key] = value; - const updateColumns = columnKey === "fixed"; - owner.value.store.scheduleLayout(updateColumns); - } - ); - } - }); - }; - const registerNormalWatchers = () => { - const props2 = [ - "label", - "filters", - "filterMultiple", - "filteredValue", - "sortable", - "index", - "formatter", - "className", - "labelClassName", - "filterClassName", - "showOverflowTooltip", - "tooltipFormatter", - "resizable" - ]; - const parentProps = ["showOverflowTooltip"]; - const aliases = { - property: "prop", - align: "realAlign", - headerAlign: "realHeaderAlign" - }; - const allAliases = getAllAliases(props2, aliases); - Object.keys(allAliases).forEach((key) => { - const columnKey = aliases[key]; - if (hasOwn(props_, columnKey)) { - watch( - () => props_[columnKey], - (newVal) => { - instance.columnConfig.value[key] = newVal; - if (key === "filters" || key === "filterMethod") { - instance.columnConfig.value["filterable"] = !!(instance.columnConfig.value["filters"] || instance.columnConfig.value["filterMethod"]); - } - } - ); - } - }); - parentProps.forEach((key) => { - if (hasOwn(owner.value.props, key)) { - watch( - () => owner.value.props[key], - (newVal) => { - if (instance.columnConfig.value.type === "selection") - return; - if (!isUndefined2(props_[key])) - return; - instance.columnConfig.value[key] = newVal; - } - ); - } - }); - }; - return { - registerComplexWatchers, - registerNormalWatchers - }; -} - -// node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs -function useRender2(props2, slots, owner) { - const instance = getCurrentInstance(); - const columnId = ref(""); - const isSubColumn = ref(false); - const realAlign = ref(); - const realHeaderAlign = ref(); - const ns = useNamespace("table"); - watchEffect(() => { - realAlign.value = props2.align ? `is-${props2.align}` : null; - realAlign.value; - }); - watchEffect(() => { - realHeaderAlign.value = props2.headerAlign ? `is-${props2.headerAlign}` : realAlign.value; - realHeaderAlign.value; - }); - const columnOrTableParent = computed(() => { - let parent2 = instance.vnode.vParent || instance.parent; - while (parent2 && !parent2.tableId && !parent2.columnId) { - parent2 = parent2.vnode.vParent || parent2.parent; - } - return parent2; - }); - const hasTreeColumn = computed(() => { - const { store } = instance.parent; - if (!store) - return false; - const { treeData } = store.states; - const treeDataValue = treeData.value; - return treeDataValue && Object.keys(treeDataValue).length > 0; - }); - const realWidth = ref(parseWidth(props2.width)); - const realMinWidth = ref(parseMinWidth(props2.minWidth)); - const setColumnWidth = (column2) => { - if (realWidth.value) - column2.width = realWidth.value; - if (realMinWidth.value) { - column2.minWidth = realMinWidth.value; - } - if (!realWidth.value && realMinWidth.value) { - column2.width = void 0; - } - if (!column2.minWidth) { - column2.minWidth = 80; - } - column2.realWidth = Number( - isUndefined2(column2.width) ? column2.minWidth : column2.width - ); - return column2; - }; - const setColumnForcedProps = (column2) => { - const type4 = column2.type; - const source = cellForced[type4] || {}; - Object.keys(source).forEach((prop) => { - const value = source[prop]; - if (prop !== "className" && !isUndefined2(value)) { - column2[prop] = value; - } - }); - const className = getDefaultClassName(type4); - if (className) { - const forceClass = `${unref(ns.namespace)}-${className}`; - column2.className = column2.className ? `${column2.className} ${forceClass}` : forceClass; - } - return column2; - }; - const checkSubColumn = (children) => { - if (isArray(children)) { - children.forEach((child) => check(child)); - } else { - check(children); - } - function check(item) { - var _a; - if (((_a = item == null ? void 0 : item.type) == null ? void 0 : _a.name) === "ElTableColumn") { - item.vParent = instance; - } - } - }; - const setColumnRenders = (column2) => { - if (props2.renderHeader) { - debugWarn( - "TableColumn", - "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header." - ); - } else if (column2.type !== "selection") { - column2.renderHeader = (scope) => { - instance.columnConfig.value["label"]; - if (slots.header) { - const slotResult = slots.header(scope); - if (ensureValidVNode(slotResult)) { - return h(Fragment, slotResult); - } - } - return createTextVNode(column2.label); - }; - } - if (slots["filter-icon"]) { - column2.renderFilterIcon = (scope) => { - return renderSlot(slots, "filter-icon", scope); - }; - } - if (slots.expand) { - column2.renderExpand = (scope) => { - return renderSlot(slots, "expand", scope); - }; - } - let originRenderCell = column2.renderCell; - if (column2.type === "expand") { - column2.renderCell = (data) => h( - "div", - { - class: "cell" - }, - [originRenderCell(data)] - ); - owner.value.renderExpanded = (row) => { - return slots.default ? slots.default(row) : slots.default; - }; - } else { - originRenderCell = originRenderCell || defaultRenderCell; - column2.renderCell = (data) => { - let children = null; - if (slots.default) { - const vnodes = slots.default(data); - children = vnodes.some((v2) => v2.type !== Comment) ? vnodes : originRenderCell(data); - } else { - children = originRenderCell(data); - } - const { columns: columns2 } = owner.value.store.states; - const firstUserColumnIndex = columns2.value.findIndex( - (item) => item.type === "default" - ); - const shouldCreatePlaceholder = hasTreeColumn.value && data.cellIndex === firstUserColumnIndex; - const prefix = treeCellPrefix(data, shouldCreatePlaceholder); - const props22 = { - class: "cell", - style: {} - }; - if (column2.showOverflowTooltip) { - props22.class = `${props22.class} ${unref(ns.namespace)}-tooltip`; - props22.style = { - width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` - }; - } - checkSubColumn(children); - return h("div", props22, [prefix, children]); - }; - } - return column2; - }; - const getPropsData = (...propsKey) => { - return propsKey.reduce( - (prev, cur) => { - if (isArray(cur)) { - cur.forEach((key) => { - prev[key] = props2[key]; - }); - } - return prev; - }, - {} - ); - }; - const getColumnElIndex = (children, child) => { - return Array.prototype.indexOf.call(children, child); - }; - const updateColumnOrder = () => { - owner.value.store.commit("updateColumnOrder", instance.columnConfig.value); - }; - return { - columnId, - realAlign, - isSubColumn, - realHeaderAlign, - columnOrTableParent, - setColumnWidth, - setColumnForcedProps, - setColumnRenders, - getPropsData, - getColumnElIndex, - updateColumnOrder - }; -} - -// node_modules/element-plus/es/components/table/src/table-column/defaults.mjs -var defaultProps4 = { - type: { - type: String, - default: "default" - }, - label: String, - className: String, - labelClassName: String, - property: String, - prop: String, - width: { - type: [String, Number], - default: "" - }, - minWidth: { - type: [String, Number], - default: "" - }, - renderHeader: Function, - sortable: { - type: [Boolean, String], - default: false - }, - sortMethod: Function, - sortBy: [String, Function, Array], - resizable: { - type: Boolean, - default: true - }, - columnKey: String, - align: String, - headerAlign: String, - showOverflowTooltip: { - type: [Boolean, Object], - default: void 0 - }, - tooltipFormatter: Function, - fixed: [Boolean, String], - formatter: Function, - selectable: Function, - reserveSelection: Boolean, - filterMethod: Function, - filteredValue: Array, - filters: Array, - filterPlacement: String, - filterMultiple: { - type: Boolean, - default: true - }, - filterClassName: String, - index: [Number, Function], - sortOrders: { - type: Array, - default: () => { - return ["ascending", "descending", null]; - }, - validator: (val) => { - return val.every( - (order) => ["ascending", "descending", null].includes(order) - ); - } - } -}; - -// node_modules/element-plus/es/components/table/src/table-column/index.mjs -var columnIdSeed = 1; -var ElTableColumn = defineComponent({ - name: "ElTableColumn", - components: { - ElCheckbox - }, - props: defaultProps4, - setup(props2, { slots }) { - const instance = getCurrentInstance(); - const columnConfig = ref({}); - const owner = computed(() => { - let parent22 = instance.parent; - while (parent22 && !parent22.tableId) { - parent22 = parent22.parent; - } - return parent22; - }); - const { registerNormalWatchers, registerComplexWatchers } = useWatcher2( - owner, - props2 - ); - const { - columnId, - isSubColumn, - realHeaderAlign, - columnOrTableParent, - setColumnWidth, - setColumnForcedProps, - setColumnRenders, - getPropsData, - getColumnElIndex, - realAlign, - updateColumnOrder - } = useRender2(props2, slots, owner); - const parent2 = columnOrTableParent.value; - columnId.value = `${"tableId" in parent2 && parent2.tableId || "columnId" in parent2 && parent2.columnId}_column_${columnIdSeed++}`; - onBeforeMount(() => { - isSubColumn.value = owner.value !== parent2; - const type4 = props2.type || "default"; - const sortable = props2.sortable === "" ? true : props2.sortable; - const showOverflowTooltip = type4 === "selection" ? false : isUndefined2(props2.showOverflowTooltip) ? parent2.props.showOverflowTooltip : props2.showOverflowTooltip; - const tooltipFormatter = isUndefined2(props2.tooltipFormatter) ? parent2.props.tooltipFormatter : props2.tooltipFormatter; - const defaults2 = { - ...cellStarts[type4], - id: columnId.value, - type: type4, - property: props2.prop || props2.property, - align: realAlign, - headerAlign: realHeaderAlign, - showOverflowTooltip, - tooltipFormatter, - filterable: props2.filters || props2.filterMethod, - filteredValue: [], - filterPlacement: "", - filterClassName: "", - isColumnGroup: false, - isSubColumn: false, - filterOpened: false, - sortable, - index: props2.index, - rawColumnKey: instance.vnode.key - }; - const basicProps = [ - "columnKey", - "label", - "className", - "labelClassName", - "type", - "renderHeader", - "formatter", - "fixed", - "resizable" - ]; - const sortProps = ["sortMethod", "sortBy", "sortOrders"]; - const selectProps2 = ["selectable", "reserveSelection"]; - const filterProps = [ - "filterMethod", - "filters", - "filterMultiple", - "filterOpened", - "filteredValue", - "filterPlacement", - "filterClassName" - ]; - let column2 = getPropsData(basicProps, sortProps, selectProps2, filterProps); - column2 = mergeOptions(defaults2, column2); - const chains = compose( - setColumnRenders, - setColumnWidth, - setColumnForcedProps - ); - column2 = chains(column2); - columnConfig.value = column2; - registerNormalWatchers(); - registerComplexWatchers(); - }); - onMounted(() => { - var _a, _b; - const parent22 = columnOrTableParent.value; - const children = isSubColumn.value ? (_a = parent22.vnode.el) == null ? void 0 : _a.children : (_b = parent22.refs.hiddenColumns) == null ? void 0 : _b.children; - const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el); - columnConfig.value.getColumnIndex = getColumnIndex; - const columnIndex = getColumnIndex(); - columnIndex > -1 && owner.value.store.commit( - "insertColumn", - columnConfig.value, - isSubColumn.value ? "columnConfig" in parent22 && parent22.columnConfig.value : null, - updateColumnOrder - ); - }); - onBeforeUnmount(() => { - const getColumnIndex = columnConfig.value.getColumnIndex; - const columnIndex = getColumnIndex ? getColumnIndex() : -1; - columnIndex > -1 && owner.value.store.commit( - "removeColumn", - columnConfig.value, - isSubColumn.value ? "columnConfig" in parent2 && parent2.columnConfig.value : null, - updateColumnOrder - ); - }); - instance.columnId = columnId.value; - instance.columnConfig = columnConfig; - return; - }, - render() { - var _a, _b, _c; - try { - const renderDefault = (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a, { - row: {}, - column: {}, - $index: -1 - }); - const children = []; - if (isArray(renderDefault)) { - for (const childNode of renderDefault) { - if (((_c = childNode.type) == null ? void 0 : _c.name) === "ElTableColumn" || childNode.shapeFlag & 2) { - children.push(childNode); - } else if (childNode.type === Fragment && isArray(childNode.children)) { - childNode.children.forEach((vnode2) => { - if ((vnode2 == null ? void 0 : vnode2.patchFlag) !== 1024 && !isString(vnode2 == null ? void 0 : vnode2.children)) { - children.push(vnode2); - } - }); - } - } - } - const vnode = h("div", children); - return vnode; - } catch (e) { - return h("div", []); - } - } -}); - -// node_modules/element-plus/es/components/table/index.mjs -var ElTable = withInstall(Table, { - TableColumn: ElTableColumn -}); -var ElTableColumn2 = withNoopInstall(ElTableColumn); - -// node_modules/element-plus/es/components/table-v2/src/constants.mjs -var SortOrder = ((SortOrder2) => { - SortOrder2["ASC"] = "asc"; - SortOrder2["DESC"] = "desc"; - return SortOrder2; -})(SortOrder || {}); -var Alignment = ((Alignment2) => { - Alignment2["LEFT"] = "left"; - Alignment2["CENTER"] = "center"; - Alignment2["RIGHT"] = "right"; - return Alignment2; -})(Alignment || {}); -var FixedDir = ((FixedDir2) => { - FixedDir2["LEFT"] = "left"; - FixedDir2["RIGHT"] = "right"; - return FixedDir2; -})(FixedDir || {}); -var oppositeOrderMap = { - [ - "asc" - /* ASC */ - ]: "desc", - [ - "desc" - /* DESC */ - ]: "asc" - /* ASC */ -}; - -// node_modules/element-plus/es/components/table-v2/src/private.mjs -var placeholderSign = Symbol("placeholder"); - -// node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs -var calcColumnStyle = (column2, fixedColumn, fixed) => { - var _a, _b, _c; - const flex = { - flexGrow: 0, - flexShrink: 0, - ...fixed ? {} : { - flexGrow: (_a = column2.flexGrow) != null ? _a : 0, - flexShrink: (_b = column2.flexShrink) != null ? _b : 1 - } - }; - const style = { - ...(_c = column2.style) != null ? _c : {}, - ...flex, - flexBasis: "auto", - width: column2.width - }; - if (!fixedColumn) { - if (column2.maxWidth) - style.maxWidth = column2.maxWidth; - if (column2.minWidth) - style.minWidth = column2.minWidth; - } - return style; -}; - -// node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs -function useColumns(props2, columns2, fixed) { - const _columns = computed( - () => unref(columns2).map((column2, index) => { - var _a, _b; - return { - ...column2, - key: (_b = (_a = column2.key) != null ? _a : column2.dataKey) != null ? _b : index - }; - }) - ); - const visibleColumns = computed(() => { - return unref(_columns).filter((column2) => !column2.hidden); - }); - const fixedColumnsOnLeft = computed( - () => unref(visibleColumns).filter( - (column2) => column2.fixed === "left" || column2.fixed === true - ) - ); - const fixedColumnsOnRight = computed( - () => unref(visibleColumns).filter((column2) => column2.fixed === "right") - ); - const normalColumns = computed( - () => unref(visibleColumns).filter((column2) => !column2.fixed) - ); - const mainColumns = computed(() => { - const ret = []; - unref(fixedColumnsOnLeft).forEach((column2) => { - ret.push({ - ...column2, - placeholderSign - }); - }); - unref(normalColumns).forEach((column2) => { - ret.push(column2); - }); - unref(fixedColumnsOnRight).forEach((column2) => { - ret.push({ - ...column2, - placeholderSign - }); - }); - return ret; - }); - const hasFixedColumns = computed(() => { - return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length; - }); - const columnsStyles = computed(() => { - return unref(_columns).reduce( - (style, column2) => { - style[column2.key] = calcColumnStyle(column2, unref(fixed), props2.fixed); - return style; - }, - {} - ); - }); - const columnsTotalWidth = computed(() => { - return unref(visibleColumns).reduce( - (width, column2) => width + column2.width, - 0 - ); - }); - const getColumn = (key) => { - return unref(_columns).find((column2) => column2.key === key); - }; - const getColumnStyle = (key) => { - return unref(columnsStyles)[key]; - }; - const updateColumnWidth = (column2, width) => { - column2.width = width; - }; - function onColumnSorted(e) { - var _a; - const { key } = e.currentTarget.dataset; - if (!key) - return; - const { sortState, sortBy: sortBy2 } = props2; - let order = SortOrder.ASC; - if (isObject(sortState)) { - order = oppositeOrderMap[sortState[key]]; - } else { - order = oppositeOrderMap[sortBy2.order]; - } - (_a = props2.onColumnSort) == null ? void 0 : _a.call(props2, { column: getColumn(key), key, order }); - } - return { - columns: _columns, - columnsStyles, - columnsTotalWidth, - fixedColumnsOnLeft, - fixedColumnsOnRight, - hasFixedColumns, - mainColumns, - normalColumns, - visibleColumns, - getColumn, - getColumnStyle, - updateColumnWidth, - onColumnSorted - }; -} - -// node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs -var useScrollbar2 = (props2, { - mainTableRef, - leftTableRef, - rightTableRef, - onMaybeEndReached -}) => { - const scrollPos = ref({ scrollLeft: 0, scrollTop: 0 }); - function doScroll(params) { - var _a, _b, _c; - const { scrollTop } = params; - (_a = mainTableRef.value) == null ? void 0 : _a.scrollTo(params); - (_b = leftTableRef.value) == null ? void 0 : _b.scrollToTop(scrollTop); - (_c = rightTableRef.value) == null ? void 0 : _c.scrollToTop(scrollTop); - } - function scrollTo2(params) { - scrollPos.value = params; - doScroll(params); - } - function scrollToTop(scrollTop) { - scrollPos.value.scrollTop = scrollTop; - doScroll(unref(scrollPos)); - } - function scrollToLeft(scrollLeft) { - var _a, _b; - scrollPos.value.scrollLeft = scrollLeft; - (_b = (_a = mainTableRef.value) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, unref(scrollPos)); - } - function onScroll(params) { - var _a; - scrollTo2(params); - (_a = props2.onScroll) == null ? void 0 : _a.call(props2, params); - } - function onVerticalScroll({ scrollTop }) { - const { scrollTop: currentScrollTop } = unref(scrollPos); - if (scrollTop !== currentScrollTop) - scrollToTop(scrollTop); - } - function scrollToRow(row, strategy = "auto") { - var _a; - (_a = mainTableRef.value) == null ? void 0 : _a.scrollToRow(row, strategy); - } - watch( - () => unref(scrollPos).scrollTop, - (cur, prev) => { - if (cur > prev) - onMaybeEndReached(); - } - ); - return { - scrollPos, - scrollTo: scrollTo2, - scrollToLeft, - scrollToTop, - scrollToRow, - onScroll, - onVerticalScroll - }; -}; - -// node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs -var useRow = (props2, { - mainTableRef, - leftTableRef, - rightTableRef, - tableInstance, - ns, - isScrolling -}) => { - const vm = getCurrentInstance(); - const { emit } = vm; - const isResetting = shallowRef(false); - const expandedRowKeys = ref(props2.defaultExpandedRowKeys || []); - const lastRenderedRowIndex = ref(-1); - const resetIndex = shallowRef(null); - const rowHeights = ref({}); - const pendingRowHeights = ref({}); - const leftTableHeights = shallowRef({}); - const mainTableHeights = shallowRef({}); - const rightTableHeights = shallowRef({}); - const isDynamic = computed(() => isNumber2(props2.estimatedRowHeight)); - function onRowsRendered(params) { - var _a; - (_a = props2.onRowsRendered) == null ? void 0 : _a.call(props2, params); - if (params.rowCacheEnd > unref(lastRenderedRowIndex)) { - lastRenderedRowIndex.value = params.rowCacheEnd; - } - } - function onRowHovered({ hovered, rowKey: rowKey2 }) { - if (isScrolling.value) { - return; - } - const tableRoot = tableInstance.vnode.el; - const rows = tableRoot.querySelectorAll(`[rowkey="${String(rowKey2)}"]`); - rows.forEach((row) => { - if (hovered) { - row.classList.add(ns.is("hovered")); - } else { - row.classList.remove(ns.is("hovered")); - } - }); - } - function onRowExpanded({ - expanded, - rowData, - rowIndex, - rowKey: rowKey2 - }) { - var _a, _b; - const _expandedRowKeys = [...unref(expandedRowKeys)]; - const currentKeyIndex = _expandedRowKeys.indexOf(rowKey2); - if (expanded) { - if (currentKeyIndex === -1) - _expandedRowKeys.push(rowKey2); - } else { - if (currentKeyIndex > -1) - _expandedRowKeys.splice(currentKeyIndex, 1); - } - expandedRowKeys.value = _expandedRowKeys; - emit("update:expandedRowKeys", _expandedRowKeys); - (_a = props2.onRowExpand) == null ? void 0 : _a.call(props2, { - expanded, - rowData, - rowIndex, - rowKey: rowKey2 - }); - (_b = props2.onExpandedRowsChange) == null ? void 0 : _b.call(props2, _expandedRowKeys); - const tableRoot = tableInstance.vnode.el; - const hoverRow = tableRoot.querySelector( - `.${ns.is("hovered")}[rowkey="${String(rowKey2)}"]` - ); - if (hoverRow) { - nextTick(() => onRowHovered({ hovered: true, rowKey: rowKey2 })); - } - } - const flushingRowHeights = debounce_default(() => { - var _a, _b, _c, _d; - isResetting.value = true; - rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) }; - resetAfterIndex(unref(resetIndex), false); - pendingRowHeights.value = {}; - resetIndex.value = null; - (_a = mainTableRef.value) == null ? void 0 : _a.forceUpdate(); - (_b = leftTableRef.value) == null ? void 0 : _b.forceUpdate(); - (_c = rightTableRef.value) == null ? void 0 : _c.forceUpdate(); - (_d = vm.proxy) == null ? void 0 : _d.$forceUpdate(); - isResetting.value = false; - }, 0); - function resetAfterIndex(index, forceUpdate = false) { - if (!unref(isDynamic)) - return; - [mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => { - const table = unref(tableRef); - if (table) - table.resetAfterRowIndex(index, forceUpdate); - }); - } - function resetHeights(rowKey2, height, rowIdx) { - const resetIdx = unref(resetIndex); - if (resetIdx === null) { - resetIndex.value = rowIdx; - } else { - if (resetIdx > rowIdx) { - resetIndex.value = rowIdx; - } - } - pendingRowHeights.value[rowKey2] = height; - } - function onRowHeightChange({ rowKey: rowKey2, height, rowIndex }, fixedDir) { - if (!fixedDir) { - mainTableHeights.value[rowKey2] = height; - } else { - if (fixedDir === FixedDir.RIGHT) { - rightTableHeights.value[rowKey2] = height; - } else { - leftTableHeights.value[rowKey2] = height; - } - } - const maximumHeight = Math.max( - ...[leftTableHeights, rightTableHeights, mainTableHeights].map( - (records) => records.value[rowKey2] || 0 - ) - ); - if (unref(rowHeights)[rowKey2] !== maximumHeight) { - resetHeights(rowKey2, maximumHeight, rowIndex); - flushingRowHeights(); - } - } - return { - expandedRowKeys, - lastRenderedRowIndex, - isDynamic, - isResetting, - rowHeights, - resetAfterIndex, - onRowExpanded, - onRowHovered, - onRowsRendered, - onRowHeightChange - }; -}; - -// node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs -var useData = (props2, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => { - const depthMap = ref({}); - const flattenedData = computed(() => { - const depths = {}; - const { data: data2, rowKey: rowKey2 } = props2; - const _expandedRowKeys = unref(expandedRowKeys); - if (!_expandedRowKeys || !_expandedRowKeys.length) - return data2; - const array4 = []; - const keysSet = /* @__PURE__ */ new Set(); - _expandedRowKeys.forEach((x2) => keysSet.add(x2)); - let copy = data2.slice(); - copy.forEach((x2) => depths[x2[rowKey2]] = 0); - while (copy.length > 0) { - const item = copy.shift(); - array4.push(item); - if (keysSet.has(item[rowKey2]) && isArray(item.children) && item.children.length > 0) { - copy = [...item.children, ...copy]; - item.children.forEach( - (child) => depths[child[rowKey2]] = depths[item[rowKey2]] + 1 - ); - } - } - depthMap.value = depths; - return array4; - }); - const data = computed(() => { - const { data: data2, expandColumnKey: expandColumnKey2 } = props2; - return expandColumnKey2 ? unref(flattenedData) : data2; - }); - watch(data, (val, prev) => { - if (val !== prev) { - lastRenderedRowIndex.value = -1; - resetAfterIndex(0, true); - } - }); - return { - data, - depthMap - }; -}; - -// node_modules/element-plus/es/components/table-v2/src/utils.mjs -var sumReducer = (sum22, num) => sum22 + num; -var sum2 = (listLike) => { - return isArray(listLike) ? listLike.reduce(sumReducer, 0) : listLike; -}; -var tryCall = (fLike, params, defaultRet = {}) => { - return isFunction(fLike) ? fLike(params) : fLike != null ? fLike : defaultRet; -}; -var enforceUnit = (style) => { - ["width", "maxWidth", "minWidth", "height"].forEach((key) => { - style[key] = addUnit(style[key]); - }); - return style; -}; -var componentToSlot = (ComponentLike) => isVNode(ComponentLike) ? (props2) => h(ComponentLike, props2) : ComponentLike; - -// node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs -var useStyles2 = (props2, { - columnsTotalWidth, - rowsHeight, - fixedColumnsOnLeft, - fixedColumnsOnRight -}) => { - const bodyWidth = computed(() => { - const { fixed, width, vScrollbarSize } = props2; - const ret = width - vScrollbarSize; - return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret; - }); - const mainTableHeight = computed(() => { - const { height = 0, maxHeight = 0, footerHeight: footerHeight2, hScrollbarSize } = props2; - if (maxHeight > 0) { - const _fixedRowsHeight = unref(fixedRowsHeight); - const _rowsHeight = unref(rowsHeight); - const _headerHeight = unref(headerHeight); - const total2 = _headerHeight + _fixedRowsHeight + _rowsHeight + hScrollbarSize; - return Math.min(total2, maxHeight - footerHeight2); - } - return height - footerHeight2; - }); - const fixedTableHeight = computed(() => { - const { maxHeight } = props2; - const tableHeight = unref(mainTableHeight); - if (isNumber2(maxHeight) && maxHeight > 0) - return tableHeight; - const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight); - return Math.min(tableHeight, totalHeight); - }); - const mapColumn = (column2) => column2.width; - const leftTableWidth = computed( - () => sum2(unref(fixedColumnsOnLeft).map(mapColumn)) - ); - const rightTableWidth = computed( - () => sum2(unref(fixedColumnsOnRight).map(mapColumn)) - ); - const headerHeight = computed(() => sum2(props2.headerHeight)); - const fixedRowsHeight = computed(() => { - var _a; - return (((_a = props2.fixedData) == null ? void 0 : _a.length) || 0) * props2.rowHeight; - }); - const windowHeight = computed(() => { - return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight); - }); - const rootStyle = computed(() => { - const { style = {}, height, width } = props2; - return enforceUnit({ - ...style, - height, - width - }); - }); - const footerHeight = computed( - () => enforceUnit({ height: props2.footerHeight }) - ); - const emptyStyle = computed(() => ({ - top: addUnit(unref(headerHeight)), - bottom: addUnit(props2.footerHeight), - width: addUnit(props2.width) - })); - return { - bodyWidth, - fixedTableHeight, - mainTableHeight, - leftTableWidth, - rightTableWidth, - windowHeight, - footerHeight, - emptyStyle, - rootStyle, - headerHeight - }; -}; - -// node_modules/element-plus/es/components/table-v2/src/use-table.mjs -function useTable(props2) { - const mainTableRef = ref(); - const leftTableRef = ref(); - const rightTableRef = ref(); - const { - columns: columns2, - columnsStyles, - columnsTotalWidth, - fixedColumnsOnLeft, - fixedColumnsOnRight, - hasFixedColumns, - mainColumns, - onColumnSorted - } = useColumns(props2, toRef(props2, "columns"), toRef(props2, "fixed")); - const { - scrollTo: scrollTo2, - scrollToLeft, - scrollToTop, - scrollToRow, - onScroll, - onVerticalScroll, - scrollPos - } = useScrollbar2(props2, { - mainTableRef, - leftTableRef, - rightTableRef, - onMaybeEndReached - }); - const ns = useNamespace("table-v2"); - const instance = getCurrentInstance(); - const isScrolling = shallowRef(false); - const { - expandedRowKeys, - lastRenderedRowIndex, - isDynamic, - isResetting, - rowHeights, - resetAfterIndex, - onRowExpanded, - onRowHeightChange, - onRowHovered, - onRowsRendered - } = useRow(props2, { - mainTableRef, - leftTableRef, - rightTableRef, - tableInstance: instance, - ns, - isScrolling - }); - const { data, depthMap } = useData(props2, { - expandedRowKeys, - lastRenderedRowIndex, - resetAfterIndex - }); - const rowsHeight = computed(() => { - const { estimatedRowHeight, rowHeight } = props2; - const _data = unref(data); - if (isNumber2(estimatedRowHeight)) { - return Object.values(unref(rowHeights)).reduce( - (acc, curr) => acc + curr, - 0 - ); - } - return _data.length * rowHeight; - }); - const { - bodyWidth, - fixedTableHeight, - mainTableHeight, - leftTableWidth, - rightTableWidth, - windowHeight, - footerHeight, - emptyStyle, - rootStyle, - headerHeight - } = useStyles2(props2, { - columnsTotalWidth, - fixedColumnsOnLeft, - fixedColumnsOnRight, - rowsHeight - }); - const containerRef = ref(); - const showEmpty = computed(() => { - const noData = unref(data).length === 0; - return isArray(props2.fixedData) ? props2.fixedData.length === 0 && noData : noData; - }); - function getRowHeight(rowIndex) { - const { estimatedRowHeight, rowHeight, rowKey: rowKey2 } = props2; - if (!estimatedRowHeight) - return rowHeight; - return unref(rowHeights)[unref(data)[rowIndex][rowKey2]] || estimatedRowHeight; - } - const isEndReached = ref(false); - function onMaybeEndReached() { - const { onEndReached } = props2; - if (!onEndReached) - return; - const { scrollTop } = unref(scrollPos); - const _totalHeight = unref(rowsHeight); - const clientHeight = unref(windowHeight); - const remainDistance = _totalHeight - (scrollTop + clientHeight) + props2.hScrollbarSize; - if (!isEndReached.value && unref(lastRenderedRowIndex) >= 0 && _totalHeight <= scrollTop + unref(mainTableHeight) - unref(headerHeight)) { - isEndReached.value = true; - onEndReached(remainDistance); - } else { - isEndReached.value = false; - } - } - watch( - () => unref(rowsHeight), - () => isEndReached.value = false - ); - watch( - () => props2.expandedRowKeys, - (val) => expandedRowKeys.value = val, - { - deep: true - } - ); - return { - columns: columns2, - containerRef, - mainTableRef, - leftTableRef, - rightTableRef, - isDynamic, - isResetting, - isScrolling, - hasFixedColumns, - columnsStyles, - columnsTotalWidth, - data, - expandedRowKeys, - depthMap, - fixedColumnsOnLeft, - fixedColumnsOnRight, - mainColumns, - bodyWidth, - emptyStyle, - rootStyle, - footerHeight, - mainTableHeight, - fixedTableHeight, - leftTableWidth, - rightTableWidth, - showEmpty, - getRowHeight, - onColumnSorted, - onRowHovered, - onRowExpanded, - onRowsRendered, - onRowHeightChange, - scrollTo: scrollTo2, - scrollToLeft, - scrollToTop, - scrollToRow, - onScroll, - onVerticalScroll - }; -} - -// node_modules/element-plus/es/components/table-v2/src/tokens.mjs -var TableV2InjectionKey = Symbol("tableV2"); -var TABLE_V2_GRID_INJECTION_KEY = "tableV2GridScrollLeft"; - -// node_modules/element-plus/es/components/table-v2/src/common.mjs -var classType = String; -var columns = { - type: definePropType(Array), - required: true -}; -var column = { - type: definePropType(Object) -}; -var fixedDataType = { - type: definePropType(Array) -}; -var dataType = { - ...fixedDataType, - required: true -}; -var expandColumnKey = String; -var expandKeys = { - type: definePropType(Array), - default: () => mutable([]) -}; -var requiredNumber = { - type: Number, - required: true -}; -var rowKey = { - type: definePropType([String, Number, Symbol]), - default: "id" -}; -var styleType = { - type: definePropType(Object) -}; - -// node_modules/element-plus/es/components/table-v2/src/row.mjs -var tableV2RowProps = buildProps({ - class: String, - columns, - columnsStyles: { - type: definePropType(Object), - required: true - }, - depth: Number, - expandColumnKey, - estimatedRowHeight: { - ...virtualizedGridProps.estimatedRowHeight, - default: void 0 - }, - isScrolling: Boolean, - onRowExpand: { - type: definePropType(Function) - }, - onRowHover: { - type: definePropType(Function) - }, - onRowHeightChange: { - type: definePropType(Function) - }, - rowData: { - type: definePropType(Object), - required: true - }, - rowEventHandlers: { - type: definePropType(Object) - }, - rowIndex: { - type: Number, - required: true - }, - rowKey, - style: { - type: definePropType(Object) - } -}); - -// node_modules/element-plus/es/components/table-v2/src/header.mjs -var requiredNumberType = { - type: Number, - required: true -}; -var tableV2HeaderProps = buildProps({ - class: String, - columns, - fixedHeaderData: { - type: definePropType(Array) - }, - headerData: { - type: definePropType(Array), - required: true - }, - headerHeight: { - type: definePropType([Number, Array]), - default: 50 - }, - rowWidth: requiredNumberType, - rowHeight: { - type: Number, - default: 50 - }, - height: requiredNumberType, - width: requiredNumberType -}); - -// node_modules/element-plus/es/components/table-v2/src/grid.mjs -var tableV2GridProps = buildProps({ - columns, - data: dataType, - fixedData: fixedDataType, - estimatedRowHeight: tableV2RowProps.estimatedRowHeight, - width: requiredNumber, - height: requiredNumber, - headerWidth: requiredNumber, - headerHeight: tableV2HeaderProps.headerHeight, - bodyWidth: requiredNumber, - rowHeight: requiredNumber, - cache: virtualizedListProps.cache, - useIsScrolling: Boolean, - scrollbarAlwaysOn: virtualizedGridProps.scrollbarAlwaysOn, - scrollbarStartGap: virtualizedGridProps.scrollbarStartGap, - scrollbarEndGap: virtualizedGridProps.scrollbarEndGap, - class: classType, - style: styleType, - containerStyle: styleType, - getRowHeight: { - type: definePropType(Function), - required: true - }, - rowKey: tableV2RowProps.rowKey, - onRowsRendered: { - type: definePropType(Function) - }, - onScroll: { - type: definePropType(Function) - } -}); - -// node_modules/element-plus/es/components/table-v2/src/table.mjs -var tableV2Props = buildProps({ - cache: tableV2GridProps.cache, - estimatedRowHeight: tableV2RowProps.estimatedRowHeight, - rowKey, - headerClass: { - type: definePropType([ - String, - Function - ]) - }, - headerProps: { - type: definePropType([ - Object, - Function - ]) - }, - headerCellProps: { - type: definePropType([ - Object, - Function - ]) - }, - headerHeight: tableV2HeaderProps.headerHeight, - footerHeight: { - type: Number, - default: 0 - }, - rowClass: { - type: definePropType([String, Function]) - }, - rowProps: { - type: definePropType([Object, Function]) - }, - rowHeight: { - type: Number, - default: 50 - }, - cellProps: { - type: definePropType([ - Object, - Function - ]) - }, - columns, - data: dataType, - dataGetter: { - type: definePropType(Function) - }, - fixedData: fixedDataType, - expandColumnKey: tableV2RowProps.expandColumnKey, - expandedRowKeys: expandKeys, - defaultExpandedRowKeys: expandKeys, - class: classType, - fixed: Boolean, - style: { - type: definePropType(Object) - }, - width: requiredNumber, - height: requiredNumber, - maxHeight: Number, - useIsScrolling: Boolean, - indentSize: { - type: Number, - default: 12 - }, - iconSize: { - type: Number, - default: 12 - }, - hScrollbarSize: virtualizedGridProps.hScrollbarSize, - vScrollbarSize: virtualizedGridProps.vScrollbarSize, - scrollbarAlwaysOn: virtualizedScrollbarProps.alwaysOn, - sortBy: { - type: definePropType(Object), - default: () => ({}) - }, - sortState: { - type: definePropType(Object), - default: void 0 - }, - onColumnSort: { - type: definePropType(Function) - }, - onExpandedRowsChange: { - type: definePropType(Function) - }, - onEndReached: { - type: definePropType(Function) - }, - onRowExpand: tableV2RowProps.onRowExpand, - onScroll: tableV2GridProps.onScroll, - onRowsRendered: tableV2GridProps.onRowsRendered, - rowEventHandlers: tableV2RowProps.rowEventHandlers -}); - -// node_modules/element-plus/es/components/table-v2/src/components/header.mjs -var COMPONENT_NAME18 = "ElTableV2Header"; -var TableV2Header = defineComponent({ - name: COMPONENT_NAME18, - props: tableV2HeaderProps, - setup(props2, { - slots, - expose - }) { - const ns = useNamespace("table-v2"); - const scrollLeftInfo = inject(TABLE_V2_GRID_INJECTION_KEY); - const headerRef = ref(); - const headerStyle = computed(() => enforceUnit({ - width: props2.width, - height: props2.height - })); - const rowStyle = computed(() => enforceUnit({ - width: props2.rowWidth, - height: props2.height - })); - const headerHeights = computed(() => castArray_default(unref(props2.headerHeight))); - const scrollToLeft = (left) => { - const headerEl = unref(headerRef); - nextTick(() => { - (headerEl == null ? void 0 : headerEl.scroll) && headerEl.scroll({ - left - }); - }); - }; - const renderFixedRows = () => { - const fixedRowClassName = ns.e("fixed-header-row"); - const { - columns: columns2, - fixedHeaderData, - rowHeight - } = props2; - return fixedHeaderData == null ? void 0 : fixedHeaderData.map((fixedRowData, fixedRowIndex) => { - var _a; - const style = enforceUnit({ - height: rowHeight, - width: "100%" - }); - return (_a = slots.fixed) == null ? void 0 : _a.call(slots, { - class: fixedRowClassName, - columns: columns2, - rowData: fixedRowData, - rowIndex: -(fixedRowIndex + 1), - style - }); - }); - }; - const renderDynamicRows = () => { - const dynamicRowClassName = ns.e("dynamic-header-row"); - const { - columns: columns2 - } = props2; - return unref(headerHeights).map((rowHeight, rowIndex) => { - var _a; - const style = enforceUnit({ - width: "100%", - height: rowHeight - }); - return (_a = slots.dynamic) == null ? void 0 : _a.call(slots, { - class: dynamicRowClassName, - columns: columns2, - headerIndex: rowIndex, - style - }); - }); - }; - onUpdated(() => { - if (scrollLeftInfo == null ? void 0 : scrollLeftInfo.value) { - scrollToLeft(scrollLeftInfo.value); - } - }); - expose({ - scrollToLeft - }); - return () => { - if (props2.height <= 0) - return; - return createVNode("div", { - "ref": headerRef, - "class": props2.class, - "style": unref(headerStyle), - "role": "rowgroup" - }, [createVNode("div", { - "style": unref(rowStyle), - "class": ns.e("header") - }, [renderDynamicRows(), renderFixedRows()])]); - }; - } -}); -var Header2 = TableV2Header; - -// node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-wheel.mjs -var useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, onWheelDelta) => { - let frameHandle = null; - let xOffset = 0; - let yOffset = 0; - const hasReachedEdge = (x2, y) => { - const xEdgeReached = x2 < 0 && atXStartEdge.value || x2 > 0 && atXEndEdge.value; - const yEdgeReached = y < 0 && atYStartEdge.value || y > 0 && atYEndEdge.value; - return xEdgeReached || yEdgeReached; - }; - const onWheel = (e) => { - cAF(frameHandle); - let x2 = e.deltaX; - let y = e.deltaY; - if (Math.abs(x2) > Math.abs(y)) { - y = 0; - } else { - x2 = 0; - } - if (e.shiftKey && y !== 0) { - x2 = y; - y = 0; - } - if (hasReachedEdge(x2, y)) - return; - xOffset += x2; - yOffset += y; - e.preventDefault(); - frameHandle = rAF(() => { - onWheelDelta(xOffset, yOffset); - xOffset = 0; - yOffset = 0; - }); - }; - return { - hasReachedEdge, - onWheel - }; -}; - -// node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-touch.mjs -var useGridTouch = (windowRef, states, scrollTo2, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight) => { - const touchStartX = ref(0); - const touchStartY = ref(0); - let frameHandle; - let deltaX = 0; - let deltaY = 0; - const handleTouchStart = (event) => { - cAF(frameHandle); - touchStartX.value = event.touches[0].clientX; - touchStartY.value = event.touches[0].clientY; - deltaX = 0; - deltaY = 0; - }; - const handleTouchMove = (event) => { - event.preventDefault(); - cAF(frameHandle); - deltaX += touchStartX.value - event.touches[0].clientX; - deltaY += touchStartY.value - event.touches[0].clientY; - touchStartX.value = event.touches[0].clientX; - touchStartY.value = event.touches[0].clientY; - frameHandle = rAF(() => { - const maxScrollLeft = estimatedTotalWidth.value - unref(parsedWidth); - const maxScrollTop = estimatedTotalHeight.value - unref(parsedHeight); - const safeScrollLeft = Math.min( - states.value.scrollLeft + deltaX, - maxScrollLeft - ); - const safeScrollTop = Math.min( - states.value.scrollTop + deltaY, - maxScrollTop - ); - scrollTo2({ - scrollLeft: safeScrollLeft, - scrollTop: safeScrollTop - }); - deltaX = 0; - deltaY = 0; - }); - }; - useEventListener(windowRef, "touchstart", handleTouchStart, { - passive: true - }); - useEventListener(windowRef, "touchmove", handleTouchMove, { - passive: false - }); - return { - touchStartX, - touchStartY, - handleTouchStart, - handleTouchMove - }; -}; - -// node_modules/element-plus/es/components/virtual-list/src/builders/build-grid.mjs -var createGrid = ({ - name, - clearCache, - getColumnPosition, - getColumnStartIndexForOffset, - getColumnStopIndexForStartIndex, - getEstimatedTotalHeight: getEstimatedTotalHeight2, - getEstimatedTotalWidth: getEstimatedTotalWidth2, - getColumnOffset, - getRowOffset, - getRowPosition, - getRowStartIndexForOffset, - getRowStopIndexForStartIndex, - initCache, - injectToInstance, - validateProps -}) => { - return defineComponent({ - name: name != null ? name : "ElVirtualList", - props: virtualizedGridProps, - emits: [ITEM_RENDER_EVT, SCROLL_EVT], - setup(props2, { emit, expose, slots }) { - const ns = useNamespace("vl"); - validateProps(props2); - const instance = getCurrentInstance(); - const cache2 = ref(initCache(props2, instance)); - injectToInstance == null ? void 0 : injectToInstance(instance, cache2); - const windowRef = ref(); - const hScrollbar = ref(); - const vScrollbar = ref(); - const innerRef = ref(); - const states = ref({ - isScrolling: false, - scrollLeft: isNumber2(props2.initScrollLeft) ? props2.initScrollLeft : 0, - scrollTop: isNumber2(props2.initScrollTop) ? props2.initScrollTop : 0, - updateRequested: false, - xAxisScrollDir: FORWARD, - yAxisScrollDir: FORWARD - }); - const getItemStyleCache = useCache(); - const parsedHeight = computed( - () => Number.parseInt(`${props2.height}`, 10) - ); - const parsedWidth = computed(() => Number.parseInt(`${props2.width}`, 10)); - const columnsToRender = computed(() => { - const { totalColumn, totalRow, columnCache } = props2; - const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states); - if (totalColumn === 0 || totalRow === 0) { - return [0, 0, 0, 0]; - } - const startIndex = getColumnStartIndexForOffset( - props2, - scrollLeft, - unref(cache2) - ); - const stopIndex = getColumnStopIndexForStartIndex( - props2, - startIndex, - scrollLeft, - unref(cache2) - ); - const cacheBackward = !isScrolling || xAxisScrollDir === BACKWARD ? Math.max(1, columnCache) : 1; - const cacheForward = !isScrolling || xAxisScrollDir === FORWARD ? Math.max(1, columnCache) : 1; - return [ - Math.max(0, startIndex - cacheBackward), - Math.max(0, Math.min(totalColumn - 1, stopIndex + cacheForward)), - startIndex, - stopIndex - ]; - }); - const rowsToRender = computed(() => { - const { totalColumn, totalRow, rowCache } = props2; - const { isScrolling, yAxisScrollDir, scrollTop } = unref(states); - if (totalColumn === 0 || totalRow === 0) { - return [0, 0, 0, 0]; - } - const startIndex = getRowStartIndexForOffset( - props2, - scrollTop, - unref(cache2) - ); - const stopIndex = getRowStopIndexForStartIndex( - props2, - startIndex, - scrollTop, - unref(cache2) - ); - const cacheBackward = !isScrolling || yAxisScrollDir === BACKWARD ? Math.max(1, rowCache) : 1; - const cacheForward = !isScrolling || yAxisScrollDir === FORWARD ? Math.max(1, rowCache) : 1; - return [ - Math.max(0, startIndex - cacheBackward), - Math.max(0, Math.min(totalRow - 1, stopIndex + cacheForward)), - startIndex, - stopIndex - ]; - }); - const estimatedTotalHeight = computed( - () => getEstimatedTotalHeight2(props2, unref(cache2)) - ); - const estimatedTotalWidth = computed( - () => getEstimatedTotalWidth2(props2, unref(cache2)) - ); - const windowStyle = computed(() => { - var _a; - return [ - { - position: "relative", - overflow: "hidden", - WebkitOverflowScrolling: "touch", - willChange: "transform" - }, - { - direction: props2.direction, - height: isNumber2(props2.height) ? `${props2.height}px` : props2.height, - width: isNumber2(props2.width) ? `${props2.width}px` : props2.width - }, - (_a = props2.style) != null ? _a : {} - ]; - }); - const innerStyle = computed(() => { - const width = `${unref(estimatedTotalWidth)}px`; - const height = `${unref(estimatedTotalHeight)}px`; - return { - height, - pointerEvents: unref(states).isScrolling ? "none" : void 0, - width, - margin: 0, - boxSizing: "border-box" - }; - }); - const emitEvents = () => { - const { totalColumn, totalRow } = props2; - if (totalColumn > 0 && totalRow > 0) { - const [ - columnCacheStart, - columnCacheEnd, - columnVisibleStart, - columnVisibleEnd - ] = unref(columnsToRender); - const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] = unref(rowsToRender); - emit(ITEM_RENDER_EVT, { - columnCacheStart, - columnCacheEnd, - rowCacheStart, - rowCacheEnd, - columnVisibleStart, - columnVisibleEnd, - rowVisibleStart, - rowVisibleEnd - }); - } - const { - scrollLeft, - scrollTop, - updateRequested, - xAxisScrollDir, - yAxisScrollDir - } = unref(states); - emit(SCROLL_EVT, { - xAxisScrollDir, - scrollLeft, - yAxisScrollDir, - scrollTop, - updateRequested - }); - }; - const onScroll = (e) => { - const { - clientHeight, - clientWidth, - scrollHeight, - scrollLeft, - scrollTop, - scrollWidth - } = e.currentTarget; - const _states = unref(states); - if (_states.scrollTop === scrollTop && _states.scrollLeft === scrollLeft) { - return; - } - let _scrollLeft = scrollLeft; - if (isRTL(props2.direction)) { - switch (getRTLOffsetType()) { - case RTL_OFFSET_NAG: - _scrollLeft = -scrollLeft; - break; - case RTL_OFFSET_POS_DESC: - _scrollLeft = scrollWidth - clientWidth - scrollLeft; - break; - } - } - states.value = { - ..._states, - isScrolling: true, - scrollLeft: _scrollLeft, - scrollTop: Math.max( - 0, - Math.min(scrollTop, scrollHeight - clientHeight) - ), - updateRequested: true, - xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft), - yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop) - }; - nextTick(() => resetIsScrolling()); - onUpdated2(); - emitEvents(); - }; - const onVerticalScroll = (distance, totalSteps) => { - const height = unref(parsedHeight); - const offset3 = (estimatedTotalHeight.value - height) / totalSteps * distance; - scrollTo2({ - scrollTop: Math.min(estimatedTotalHeight.value - height, offset3) - }); - }; - const onHorizontalScroll = (distance, totalSteps) => { - const width = unref(parsedWidth); - const offset3 = (estimatedTotalWidth.value - width) / totalSteps * distance; - scrollTo2({ - scrollLeft: Math.min(estimatedTotalWidth.value - width, offset3) - }); - }; - const { onWheel } = useGridWheel( - { - atXStartEdge: computed(() => states.value.scrollLeft <= 0), - atXEndEdge: computed( - () => states.value.scrollLeft >= estimatedTotalWidth.value - unref(parsedWidth) - ), - atYStartEdge: computed(() => states.value.scrollTop <= 0), - atYEndEdge: computed( - () => states.value.scrollTop >= estimatedTotalHeight.value - unref(parsedHeight) - ) - }, - (x2, y) => { - var _a, _b, _c, _d; - (_b = (_a = hScrollbar.value) == null ? void 0 : _a.onMouseUp) == null ? void 0 : _b.call(_a); - (_d = (_c = vScrollbar.value) == null ? void 0 : _c.onMouseUp) == null ? void 0 : _d.call(_c); - const width = unref(parsedWidth); - const height = unref(parsedHeight); - scrollTo2({ - scrollLeft: Math.min( - states.value.scrollLeft + x2, - estimatedTotalWidth.value - width - ), - scrollTop: Math.min( - states.value.scrollTop + y, - estimatedTotalHeight.value - height - ) - }); - } - ); - useEventListener(windowRef, "wheel", onWheel, { - passive: false - }); - const scrollTo2 = ({ - scrollLeft = states.value.scrollLeft, - scrollTop = states.value.scrollTop - }) => { - scrollLeft = Math.max(scrollLeft, 0); - scrollTop = Math.max(scrollTop, 0); - const _states = unref(states); - if (scrollTop === _states.scrollTop && scrollLeft === _states.scrollLeft) { - return; - } - states.value = { - ..._states, - xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft), - yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop), - scrollLeft, - scrollTop, - updateRequested: true - }; - nextTick(() => resetIsScrolling()); - onUpdated2(); - emitEvents(); - }; - const { touchStartX, touchStartY, handleTouchStart, handleTouchMove } = useGridTouch( - windowRef, - states, - scrollTo2, - estimatedTotalWidth, - estimatedTotalHeight, - parsedWidth, - parsedHeight - ); - const scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => { - const _states = unref(states); - columnIdx = Math.max(0, Math.min(columnIdx, props2.totalColumn - 1)); - rowIndex = Math.max(0, Math.min(rowIndex, props2.totalRow - 1)); - const scrollBarWidth2 = getScrollBarWidth(ns.namespace.value); - const _cache = unref(cache2); - const estimatedHeight = getEstimatedTotalHeight2(props2, _cache); - const estimatedWidth = getEstimatedTotalWidth2(props2, _cache); - scrollTo2({ - scrollLeft: getColumnOffset( - props2, - columnIdx, - alignment, - _states.scrollLeft, - _cache, - estimatedWidth > props2.width ? scrollBarWidth2 : 0 - ), - scrollTop: getRowOffset( - props2, - rowIndex, - alignment, - _states.scrollTop, - _cache, - estimatedHeight > props2.height ? scrollBarWidth2 : 0 - ) - }); - }; - const getItemStyle = (rowIndex, columnIndex) => { - const { columnWidth, direction: direction2, rowHeight } = props2; - const itemStyleCache = getItemStyleCache.value( - clearCache && columnWidth, - clearCache && rowHeight, - clearCache && direction2 - ); - const key = `${rowIndex},${columnIndex}`; - if (hasOwn(itemStyleCache, key)) { - return itemStyleCache[key]; - } else { - const [, left] = getColumnPosition(props2, columnIndex, unref(cache2)); - const _cache = unref(cache2); - const rtl = isRTL(direction2); - const [height, top] = getRowPosition(props2, rowIndex, _cache); - const [width] = getColumnPosition(props2, columnIndex, _cache); - itemStyleCache[key] = { - position: "absolute", - left: rtl ? void 0 : `${left}px`, - right: rtl ? `${left}px` : void 0, - top: `${top}px`, - height: `${height}px`, - width: `${width}px` - }; - return itemStyleCache[key]; - } - }; - const resetIsScrolling = () => { - states.value.isScrolling = false; - nextTick(() => { - getItemStyleCache.value(-1, null, null); - }); - }; - onMounted(() => { - if (!isClient) - return; - const { initScrollLeft, initScrollTop } = props2; - const windowElement = unref(windowRef); - if (windowElement) { - if (isNumber2(initScrollLeft)) { - windowElement.scrollLeft = initScrollLeft; - } - if (isNumber2(initScrollTop)) { - windowElement.scrollTop = initScrollTop; - } - } - emitEvents(); - }); - const onUpdated2 = () => { - const { direction: direction2 } = props2; - const { scrollLeft, scrollTop, updateRequested } = unref(states); - const windowElement = unref(windowRef); - if (updateRequested && windowElement) { - if (direction2 === RTL) { - switch (getRTLOffsetType()) { - case RTL_OFFSET_NAG: { - windowElement.scrollLeft = -scrollLeft; - break; - } - case RTL_OFFSET_POS_ASC: { - windowElement.scrollLeft = scrollLeft; - break; - } - default: { - const { clientWidth, scrollWidth } = windowElement; - windowElement.scrollLeft = scrollWidth - clientWidth - scrollLeft; - break; - } - } - } else { - windowElement.scrollLeft = Math.max(0, scrollLeft); - } - windowElement.scrollTop = Math.max(0, scrollTop); - } - }; - const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } = instance.proxy; - expose({ - windowRef, - innerRef, - getItemStyleCache, - touchStartX, - touchStartY, - handleTouchStart, - handleTouchMove, - scrollTo: scrollTo2, - scrollToItem, - states, - resetAfterColumnIndex, - resetAfterRowIndex, - resetAfter - }); - const renderScrollbars = () => { - const { - scrollbarAlwaysOn, - scrollbarStartGap, - scrollbarEndGap, - totalColumn, - totalRow - } = props2; - const width = unref(parsedWidth); - const height = unref(parsedHeight); - const estimatedWidth = unref(estimatedTotalWidth); - const estimatedHeight = unref(estimatedTotalHeight); - const { scrollLeft, scrollTop } = unref(states); - const horizontalScrollbar = h(ScrollBar, { - ref: hScrollbar, - alwaysOn: scrollbarAlwaysOn, - startGap: scrollbarStartGap, - endGap: scrollbarEndGap, - class: ns.e("horizontal"), - clientSize: width, - layout: "horizontal", - onScroll: onHorizontalScroll, - ratio: width * 100 / estimatedWidth, - scrollFrom: scrollLeft / (estimatedWidth - width), - total: totalRow, - visible: true - }); - const verticalScrollbar = h(ScrollBar, { - ref: vScrollbar, - alwaysOn: scrollbarAlwaysOn, - startGap: scrollbarStartGap, - endGap: scrollbarEndGap, - class: ns.e("vertical"), - clientSize: height, - layout: "vertical", - onScroll: onVerticalScroll, - ratio: height * 100 / estimatedHeight, - scrollFrom: scrollTop / (estimatedHeight - height), - total: totalColumn, - visible: true - }); - return { - horizontalScrollbar, - verticalScrollbar - }; - }; - const renderItems = () => { - var _a; - const [columnStart, columnEnd] = unref(columnsToRender); - const [rowStart, rowEnd] = unref(rowsToRender); - const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props2; - const children = []; - if (totalRow > 0 && totalColumn > 0) { - for (let row = rowStart; row <= rowEnd; row++) { - for (let column2 = columnStart; column2 <= columnEnd; column2++) { - const key = itemKey({ columnIndex: column2, data, rowIndex: row }); - children.push( - h( - Fragment, - { key }, - (_a = slots.default) == null ? void 0 : _a.call(slots, { - columnIndex: column2, - data, - isScrolling: useIsScrolling ? unref(states).isScrolling : void 0, - style: getItemStyle(row, column2), - rowIndex: row - }) - ) - ); - } - } - } - return children; - }; - const renderInner = () => { - const Inner = resolveDynamicComponent(props2.innerElement); - const children = renderItems(); - return [ - h( - Inner, - mergeProps(props2.innerProps, { - style: unref(innerStyle), - ref: innerRef - }), - !isString(Inner) ? { - default: () => children - } : children - ) - ]; - }; - const renderWindow = () => { - const Container2 = resolveDynamicComponent( - props2.containerElement - ); - const { horizontalScrollbar, verticalScrollbar } = renderScrollbars(); - const Inner = renderInner(); - return h( - "div", - { - key: 0, - class: ns.e("wrapper"), - role: props2.role - }, - [ - h( - Container2, - { - class: props2.className, - style: unref(windowStyle), - onScroll, - ref: windowRef - }, - !isString(Container2) ? { default: () => Inner } : Inner - ), - horizontalScrollbar, - verticalScrollbar - ] - ); - }; - return renderWindow; - } - }); -}; - -// node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs -var { max: max2, min: min2, floor: floor2 } = Math; -var SCOPE9 = "ElDynamicSizeGrid"; -var ACCESS_SIZER_KEY_MAP = { - column: "columnWidth", - row: "rowHeight" -}; -var ACCESS_LAST_VISITED_KEY_MAP = { - column: "lastVisitedColumnIndex", - row: "lastVisitedRowIndex" -}; -var getItemFromCache2 = (props2, index, gridCache, type4) => { - const [cachedItems, sizer, lastVisited] = [ - gridCache[type4], - props2[ACCESS_SIZER_KEY_MAP[type4]], - gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] - ]; - if (index > lastVisited) { - let offset3 = 0; - if (lastVisited >= 0) { - const item = cachedItems[lastVisited]; - offset3 = item.offset + item.size; - } - for (let i = lastVisited + 1; i <= index; i++) { - const size3 = sizer(i); - cachedItems[i] = { - offset: offset3, - size: size3 - }; - offset3 += size3; - } - gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] = index; - } - return cachedItems[index]; -}; -var bs2 = (props2, gridCache, low, high, offset3, type4) => { - while (low <= high) { - const mid = low + floor2((high - low) / 2); - const currentOffset = getItemFromCache2(props2, mid, gridCache, type4).offset; - if (currentOffset === offset3) { - return mid; - } else if (currentOffset < offset3) { - low = mid + 1; - } else { - high = mid - 1; - } - } - return max2(0, low - 1); -}; -var es2 = (props2, gridCache, idx, offset3, type4) => { - const total2 = type4 === "column" ? props2.totalColumn : props2.totalRow; - let exponent = 1; - while (idx < total2 && getItemFromCache2(props2, idx, gridCache, type4).offset < offset3) { - idx += exponent; - exponent *= 2; - } - return bs2(props2, gridCache, floor2(idx / 2), min2(idx, total2 - 1), offset3, type4); -}; -var findItem2 = (props2, gridCache, offset3, type4) => { - const [cache2, lastVisitedIndex] = [ - gridCache[type4], - gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] - ]; - const lastVisitedItemOffset = lastVisitedIndex > 0 ? cache2[lastVisitedIndex].offset : 0; - if (lastVisitedItemOffset >= offset3) { - return bs2(props2, gridCache, 0, lastVisitedIndex, offset3, type4); - } - return es2(props2, gridCache, max2(0, lastVisitedIndex), offset3, type4); -}; -var getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => { - let sizeOfVisitedRows = 0; - if (lastVisitedRowIndex >= totalRow) { - lastVisitedRowIndex = totalRow - 1; - } - if (lastVisitedRowIndex >= 0) { - const item = row[lastVisitedRowIndex]; - sizeOfVisitedRows = item.offset + item.size; - } - const unvisitedItems = totalRow - lastVisitedRowIndex - 1; - const sizeOfUnvisitedItems = unvisitedItems * estimatedRowHeight; - return sizeOfVisitedRows + sizeOfUnvisitedItems; -}; -var getEstimatedTotalWidth = ({ totalColumn }, { column: column2, estimatedColumnWidth, lastVisitedColumnIndex }) => { - let sizeOfVisitedColumns = 0; - if (lastVisitedColumnIndex > totalColumn) { - lastVisitedColumnIndex = totalColumn - 1; - } - if (lastVisitedColumnIndex >= 0) { - const item = column2[lastVisitedColumnIndex]; - sizeOfVisitedColumns = item.offset + item.size; - } - const unvisitedItems = totalColumn - lastVisitedColumnIndex - 1; - const sizeOfUnvisitedItems = unvisitedItems * estimatedColumnWidth; - return sizeOfVisitedColumns + sizeOfUnvisitedItems; -}; -var ACCESS_ESTIMATED_SIZE_KEY_MAP = { - column: getEstimatedTotalWidth, - row: getEstimatedTotalHeight -}; -var getOffset2 = (props2, index, alignment, scrollOffset, cache2, type4, scrollBarWidth2) => { - const [size3, estimatedSizeAssociates] = [ - type4 === "row" ? props2.height : props2.width, - ACCESS_ESTIMATED_SIZE_KEY_MAP[type4] - ]; - const item = getItemFromCache2(props2, index, cache2, type4); - const estimatedSize = estimatedSizeAssociates(props2, cache2); - const maxOffset = max2(0, min2(estimatedSize - size3, item.offset)); - const minOffset = max2(0, item.offset - size3 + scrollBarWidth2 + item.size); - if (alignment === SMART_ALIGNMENT) { - if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) { - alignment = AUTO_ALIGNMENT; - } else { - alignment = CENTERED_ALIGNMENT; - } - } - switch (alignment) { - case START_ALIGNMENT: { - return maxOffset; - } - case END_ALIGNMENT: { - return minOffset; - } - case CENTERED_ALIGNMENT: { - return Math.round(minOffset + (maxOffset - minOffset) / 2); - } - case AUTO_ALIGNMENT: - default: { - if (scrollOffset >= minOffset && scrollOffset <= maxOffset) { - return scrollOffset; - } else if (minOffset > maxOffset) { - return minOffset; - } else if (scrollOffset < minOffset) { - return minOffset; - } else { - return maxOffset; - } - } - } -}; -var DynamicSizeGrid = createGrid({ - name: "ElDynamicSizeGrid", - getColumnPosition: (props2, idx, cache2) => { - const item = getItemFromCache2(props2, idx, cache2, "column"); - return [item.size, item.offset]; - }, - getRowPosition: (props2, idx, cache2) => { - const item = getItemFromCache2(props2, idx, cache2, "row"); - return [item.size, item.offset]; - }, - getColumnOffset: (props2, columnIndex, alignment, scrollLeft, cache2, scrollBarWidth2) => getOffset2( - props2, - columnIndex, - alignment, - scrollLeft, - cache2, - "column", - scrollBarWidth2 - ), - getRowOffset: (props2, rowIndex, alignment, scrollTop, cache2, scrollBarWidth2) => getOffset2( - props2, - rowIndex, - alignment, - scrollTop, - cache2, - "row", - scrollBarWidth2 - ), - getColumnStartIndexForOffset: (props2, scrollLeft, cache2) => findItem2(props2, cache2, scrollLeft, "column"), - getColumnStopIndexForStartIndex: (props2, startIndex, scrollLeft, cache2) => { - const item = getItemFromCache2(props2, startIndex, cache2, "column"); - const maxOffset = scrollLeft + props2.width; - let offset3 = item.offset + item.size; - let stopIndex = startIndex; - while (stopIndex < props2.totalColumn - 1 && offset3 < maxOffset) { - stopIndex++; - offset3 += getItemFromCache2(props2, startIndex, cache2, "column").size; - } - return stopIndex; - }, - getEstimatedTotalHeight, - getEstimatedTotalWidth, - getRowStartIndexForOffset: (props2, scrollTop, cache2) => findItem2(props2, cache2, scrollTop, "row"), - getRowStopIndexForStartIndex: (props2, startIndex, scrollTop, cache2) => { - const { totalRow, height } = props2; - const item = getItemFromCache2(props2, startIndex, cache2, "row"); - const maxOffset = scrollTop + height; - let offset3 = item.size + item.offset; - let stopIndex = startIndex; - while (stopIndex < totalRow - 1 && offset3 < maxOffset) { - stopIndex++; - offset3 += getItemFromCache2(props2, stopIndex, cache2, "row").size; - } - return stopIndex; - }, - injectToInstance: (instance, cache2) => { - const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => { - var _a, _b; - forceUpdate = isUndefined2(forceUpdate) ? true : forceUpdate; - if (isNumber2(columnIndex)) { - cache2.value.lastVisitedColumnIndex = Math.min( - cache2.value.lastVisitedColumnIndex, - columnIndex - 1 - ); - } - if (isNumber2(rowIndex)) { - cache2.value.lastVisitedRowIndex = Math.min( - cache2.value.lastVisitedRowIndex, - rowIndex - 1 - ); - } - (_a = instance.exposed) == null ? void 0 : _a.getItemStyleCache.value(-1, null, null); - if (forceUpdate) - (_b = instance.proxy) == null ? void 0 : _b.$forceUpdate(); - }; - const resetAfterColumnIndex = (columnIndex, forceUpdate) => { - resetAfter( - { - columnIndex - }, - forceUpdate - ); - }; - const resetAfterRowIndex = (rowIndex, forceUpdate) => { - resetAfter( - { - rowIndex - }, - forceUpdate - ); - }; - Object.assign(instance.proxy, { - resetAfterColumnIndex, - resetAfterRowIndex, - resetAfter - }); - }, - initCache: ({ - estimatedColumnWidth = DEFAULT_DYNAMIC_LIST_ITEM_SIZE, - estimatedRowHeight = DEFAULT_DYNAMIC_LIST_ITEM_SIZE - }) => { - const cache2 = { - column: {}, - estimatedColumnWidth, - estimatedRowHeight, - lastVisitedColumnIndex: -1, - lastVisitedRowIndex: -1, - row: {} - }; - return cache2; - }, - clearCache: false, - validateProps: ({ columnWidth, rowHeight }) => { - if (true) { - if (!isFunction(columnWidth)) { - throwError( - SCOPE9, - ` - "columnWidth" must be passed as function, - instead ${typeof columnWidth} was given. - ` - ); - } - if (!isFunction(rowHeight)) { - throwError( - SCOPE9, - ` - "rowHeight" must be passed as function, - instead ${typeof rowHeight} was given. - ` - ); - } - } - } -}); - -// node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs -var SCOPE10 = "ElFixedSizeGrid"; -var FixedSizeGrid = createGrid({ - name: "ElFixedSizeGrid", - getColumnPosition: ({ columnWidth }, index) => [ - columnWidth, - index * columnWidth - ], - getRowPosition: ({ rowHeight }, index) => [ - rowHeight, - index * rowHeight - ], - getEstimatedTotalHeight: ({ totalRow, rowHeight }) => rowHeight * totalRow, - getEstimatedTotalWidth: ({ totalColumn, columnWidth }) => columnWidth * totalColumn, - getColumnOffset: ({ totalColumn, columnWidth, width }, columnIndex, alignment, scrollLeft, _2, scrollBarWidth2) => { - width = Number(width); - const lastColumnOffset = Math.max( - 0, - totalColumn * columnWidth - width - ); - const maxOffset = Math.min( - lastColumnOffset, - columnIndex * columnWidth - ); - const minOffset = Math.max( - 0, - columnIndex * columnWidth - width + scrollBarWidth2 + columnWidth - ); - if (alignment === "smart") { - if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) { - alignment = AUTO_ALIGNMENT; - } else { - alignment = CENTERED_ALIGNMENT; - } - } - switch (alignment) { - case START_ALIGNMENT: - return maxOffset; - case END_ALIGNMENT: - return minOffset; - case CENTERED_ALIGNMENT: { - const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2); - if (middleOffset < Math.ceil(width / 2)) { - return 0; - } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) { - return lastColumnOffset; - } else { - return middleOffset; - } - } - case AUTO_ALIGNMENT: - default: - if (scrollLeft >= minOffset && scrollLeft <= maxOffset) { - return scrollLeft; - } else if (minOffset > maxOffset) { - return minOffset; - } else if (scrollLeft < minOffset) { - return minOffset; - } else { - return maxOffset; - } - } - }, - getRowOffset: ({ rowHeight, height, totalRow }, rowIndex, align, scrollTop, _2, scrollBarWidth2) => { - height = Number(height); - const lastRowOffset = Math.max(0, totalRow * rowHeight - height); - const maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight); - const minOffset = Math.max( - 0, - rowIndex * rowHeight - height + scrollBarWidth2 + rowHeight - ); - if (align === SMART_ALIGNMENT) { - if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) { - align = AUTO_ALIGNMENT; - } else { - align = CENTERED_ALIGNMENT; - } - } - switch (align) { - case START_ALIGNMENT: - return maxOffset; - case END_ALIGNMENT: - return minOffset; - case CENTERED_ALIGNMENT: { - const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2); - if (middleOffset < Math.ceil(height / 2)) { - return 0; - } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) { - return lastRowOffset; - } else { - return middleOffset; - } - } - case AUTO_ALIGNMENT: - default: - if (scrollTop >= minOffset && scrollTop <= maxOffset) { - return scrollTop; - } else if (minOffset > maxOffset) { - return minOffset; - } else if (scrollTop < minOffset) { - return minOffset; - } else { - return maxOffset; - } - } - }, - getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max( - 0, - Math.min( - totalColumn - 1, - Math.floor(scrollLeft / columnWidth) - ) - ), - getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => { - const left = startIndex * columnWidth; - const visibleColumnsCount = Math.ceil( - (width + scrollLeft - left) / columnWidth - ); - return Math.max( - 0, - Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1) - ); - }, - getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max( - 0, - Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight)) - ), - getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => { - const top = startIndex * rowHeight; - const numVisibleRows = Math.ceil( - (height + scrollTop - top) / rowHeight - ); - return Math.max( - 0, - Math.min( - totalRow - 1, - startIndex + numVisibleRows - 1 - ) - ); - }, - initCache: () => void 0, - clearCache: true, - validateProps: ({ columnWidth, rowHeight }) => { - if (true) { - if (!isNumber2(columnWidth)) { - throwError( - SCOPE10, - ` - "columnWidth" must be passed as number, - instead ${typeof columnWidth} was given. - ` - ); - } - if (!isNumber2(rowHeight)) { - throwError( - SCOPE10, - ` - "columnWidth" must be passed as number, - instead ${typeof rowHeight} was given. - ` - ); - } - } - } -}); - -// node_modules/element-plus/es/components/table-v2/src/table-grid.mjs -var COMPONENT_NAME19 = "ElTableV2Grid"; -var useTableGrid = (props2) => { - const headerRef = ref(); - const bodyRef = ref(); - const scrollLeft = ref(0); - const totalHeight = computed(() => { - const { - data, - rowHeight, - estimatedRowHeight - } = props2; - if (estimatedRowHeight) { - return; - } - return data.length * rowHeight; - }); - const fixedRowHeight = computed(() => { - const { - fixedData, - rowHeight - } = props2; - return ((fixedData == null ? void 0 : fixedData.length) || 0) * rowHeight; - }); - const headerHeight = computed(() => sum2(props2.headerHeight)); - const gridHeight = computed(() => { - const { - height - } = props2; - return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight)); - }); - const hasHeader = computed(() => { - return unref(headerHeight) + unref(fixedRowHeight) > 0; - }); - const itemKey = ({ - data, - rowIndex - }) => data[rowIndex][props2.rowKey]; - function onItemRendered({ - rowCacheStart, - rowCacheEnd, - rowVisibleStart, - rowVisibleEnd - }) { - var _a; - (_a = props2.onRowsRendered) == null ? void 0 : _a.call(props2, { - rowCacheStart, - rowCacheEnd, - rowVisibleStart, - rowVisibleEnd - }); - } - function resetAfterRowIndex(index, forceUpdate2) { - var _a; - (_a = bodyRef.value) == null ? void 0 : _a.resetAfterRowIndex(index, forceUpdate2); - } - function scrollTo2(leftOrOptions, top) { - const header$ = unref(headerRef); - const body$ = unref(bodyRef); - if (isObject(leftOrOptions)) { - header$ == null ? void 0 : header$.scrollToLeft(leftOrOptions.scrollLeft); - scrollLeft.value = leftOrOptions.scrollLeft; - body$ == null ? void 0 : body$.scrollTo(leftOrOptions); - } else { - header$ == null ? void 0 : header$.scrollToLeft(leftOrOptions); - scrollLeft.value = leftOrOptions; - body$ == null ? void 0 : body$.scrollTo({ - scrollLeft: leftOrOptions, - scrollTop: top - }); - } - } - function scrollToTop(scrollTop) { - var _a; - (_a = unref(bodyRef)) == null ? void 0 : _a.scrollTo({ - scrollTop - }); - } - function scrollToRow(row, strategy) { - const body = unref(bodyRef); - if (!body) - return; - const prevScrollLeft = scrollLeft.value; - body.scrollToItem(row, 0, strategy); - if (prevScrollLeft) { - scrollTo2({ - scrollLeft: prevScrollLeft - }); - } - } - function forceUpdate() { - var _a, _b; - (_a = unref(bodyRef)) == null ? void 0 : _a.$forceUpdate(); - (_b = unref(headerRef)) == null ? void 0 : _b.$forceUpdate(); - } - watch(() => props2.bodyWidth, () => { - var _a; - if (isNumber2(props2.estimatedRowHeight)) - (_a = bodyRef.value) == null ? void 0 : _a.resetAfter({ - columnIndex: 0 - }, false); - }); - return { - bodyRef, - forceUpdate, - fixedRowHeight, - gridHeight, - hasHeader, - headerHeight, - headerRef, - totalHeight, - itemKey, - onItemRendered, - resetAfterRowIndex, - scrollTo: scrollTo2, - scrollToTop, - scrollToRow, - scrollLeft - }; -}; -var TableGrid = defineComponent({ - name: COMPONENT_NAME19, - props: tableV2GridProps, - setup(props2, { - slots, - expose - }) { - const { - ns - } = inject(TableV2InjectionKey); - const { - bodyRef, - fixedRowHeight, - gridHeight, - hasHeader, - headerRef, - headerHeight, - totalHeight, - forceUpdate, - itemKey, - onItemRendered, - resetAfterRowIndex, - scrollTo: scrollTo2, - scrollToTop, - scrollToRow, - scrollLeft - } = useTableGrid(props2); - provide(TABLE_V2_GRID_INJECTION_KEY, scrollLeft); - onActivated(async () => { - var _a; - await nextTick(); - const scrollTop = (_a = bodyRef.value) == null ? void 0 : _a.states.scrollTop; - scrollTop && scrollToTop(Math.round(scrollTop) + 1); - }); - expose({ - forceUpdate, - totalHeight, - scrollTo: scrollTo2, - scrollToTop, - scrollToRow, - resetAfterRowIndex - }); - const getColumnWidth = () => props2.bodyWidth; - return () => { - const { - cache: cache2, - columns: columns2, - data, - fixedData, - useIsScrolling, - scrollbarAlwaysOn, - scrollbarEndGap, - scrollbarStartGap, - style, - rowHeight, - bodyWidth, - estimatedRowHeight, - headerWidth, - height, - width, - getRowHeight, - onScroll - } = props2; - const isDynamicRowEnabled = isNumber2(estimatedRowHeight); - const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid; - const _headerHeight = unref(headerHeight); - return createVNode("div", { - "role": "table", - "class": [ns.e("table"), props2.class], - "style": style - }, [createVNode(Grid, { - "ref": bodyRef, - "data": data, - "useIsScrolling": useIsScrolling, - "itemKey": itemKey, - "columnCache": 0, - "columnWidth": isDynamicRowEnabled ? getColumnWidth : bodyWidth, - "totalColumn": 1, - "totalRow": data.length, - "rowCache": cache2, - "rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight, - "width": width, - "height": unref(gridHeight), - "class": ns.e("body"), - "role": "rowgroup", - "scrollbarStartGap": scrollbarStartGap, - "scrollbarEndGap": scrollbarEndGap, - "scrollbarAlwaysOn": scrollbarAlwaysOn, - "onScroll": onScroll, - "onItemRendered": onItemRendered, - "perfMode": false - }, { - default: (params) => { - var _a; - const rowData = data[params.rowIndex]; - return (_a = slots.row) == null ? void 0 : _a.call(slots, { - ...params, - columns: columns2, - rowData - }); - } - }), unref(hasHeader) && createVNode(Header2, { - "ref": headerRef, - "class": ns.e("header-wrapper"), - "columns": columns2, - "headerData": data, - "headerHeight": props2.headerHeight, - "fixedHeaderData": fixedData, - "rowWidth": headerWidth, - "rowHeight": rowHeight, - "width": width, - "height": Math.min(_headerHeight + unref(fixedRowHeight), height) - }, { - dynamic: slots.header, - fixed: slots.row - })]); - }; - } -}); -var Table2 = TableGrid; - -// node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs -function _isSlot3(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var MainTable = (props2, { - slots -}) => { - const { - mainTableRef, - ...rest2 - } = props2; - return createVNode(Table2, mergeProps({ - "ref": mainTableRef - }, rest2), _isSlot3(slots) ? slots : { - default: () => [slots] - }); -}; -var MainTable$1 = MainTable; - -// node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs -function _isSlot4(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var LeftTable = (props2, { - slots -}) => { - if (!props2.columns.length) - return; - const { - leftTableRef, - ...rest2 - } = props2; - return createVNode(Table2, mergeProps({ - "ref": leftTableRef - }, rest2), _isSlot4(slots) ? slots : { - default: () => [slots] - }); -}; -var LeftTable$1 = LeftTable; - -// node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs -function _isSlot5(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var RightTable = (props2, { - slots -}) => { - if (!props2.columns.length) - return; - const { - rightTableRef, - ...rest2 - } = props2; - return createVNode(Table2, mergeProps({ - "ref": rightTableRef - }, rest2), _isSlot5(slots) ? slots : { - default: () => [slots] - }); -}; -var RightTable$1 = RightTable; - -// node_modules/element-plus/es/components/table-v2/src/components/row.mjs -var useTableRow = (props2) => { - const { - isScrolling - } = inject(TableV2InjectionKey); - const measured = ref(false); - const rowRef = ref(); - const measurable = computed(() => { - return isNumber2(props2.estimatedRowHeight) && props2.rowIndex >= 0; - }); - const doMeasure = (isInit = false) => { - const $rowRef = unref(rowRef); - if (!$rowRef) - return; - const { - columns: columns2, - onRowHeightChange, - rowKey: rowKey2, - rowIndex, - style - } = props2; - const { - height - } = $rowRef.getBoundingClientRect(); - measured.value = true; - nextTick(() => { - if (isInit || height !== Number.parseInt(style.height)) { - const firstColumn = columns2[0]; - const isPlaceholder = (firstColumn == null ? void 0 : firstColumn.placeholderSign) === placeholderSign; - onRowHeightChange == null ? void 0 : onRowHeightChange({ - rowKey: rowKey2, - height, - rowIndex - }, firstColumn && !isPlaceholder && firstColumn.fixed); - } - }); - }; - const eventHandlers = computed(() => { - const { - rowData, - rowIndex, - rowKey: rowKey2, - onRowHover - } = props2; - const handlers2 = props2.rowEventHandlers || {}; - const eventHandlers2 = {}; - Object.entries(handlers2).forEach(([eventName, handler]) => { - if (isFunction(handler)) { - eventHandlers2[eventName] = (event) => { - handler({ - event, - rowData, - rowIndex, - rowKey: rowKey2 - }); - }; - } - }); - if (onRowHover) { - [{ - name: "onMouseleave", - hovered: false - }, { - name: "onMouseenter", - hovered: true - }].forEach(({ - name, - hovered - }) => { - const existedHandler = eventHandlers2[name]; - eventHandlers2[name] = (event) => { - onRowHover({ - event, - hovered, - rowData, - rowIndex, - rowKey: rowKey2 - }); - existedHandler == null ? void 0 : existedHandler(event); - }; - }); - } - return eventHandlers2; - }); - const onExpand = (expanded) => { - const { - onRowExpand, - rowData, - rowIndex, - rowKey: rowKey2 - } = props2; - onRowExpand == null ? void 0 : onRowExpand({ - expanded, - rowData, - rowIndex, - rowKey: rowKey2 - }); - }; - onMounted(() => { - if (unref(measurable)) { - doMeasure(true); - } - }); - return { - isScrolling, - measurable, - measured, - rowRef, - eventHandlers, - onExpand - }; -}; -var COMPONENT_NAME20 = "ElTableV2TableRow"; -var TableV2Row = defineComponent({ - name: COMPONENT_NAME20, - props: tableV2RowProps, - setup(props2, { - expose, - slots, - attrs - }) { - const { - eventHandlers, - isScrolling, - measurable, - measured, - rowRef, - onExpand - } = useTableRow(props2); - expose({ - onExpand - }); - return () => { - const { - columns: columns2, - columnsStyles, - expandColumnKey: expandColumnKey2, - depth, - rowData, - rowIndex, - style - } = props2; - let ColumnCells = columns2.map((column2, columnIndex) => { - const expandable = isArray(rowData.children) && rowData.children.length > 0 && column2.key === expandColumnKey2; - return slots.cell({ - column: column2, - columns: columns2, - columnIndex, - depth, - style: columnsStyles[column2.key], - rowData, - rowIndex, - isScrolling: unref(isScrolling), - expandIconProps: expandable ? { - rowData, - rowIndex, - onExpand - } : void 0 - }); - }); - if (slots.row) { - ColumnCells = slots.row({ - cells: ColumnCells.map((node) => { - if (isArray(node) && node.length === 1) { - return node[0]; - } - return node; - }), - style, - columns: columns2, - depth, - rowData, - rowIndex, - isScrolling: unref(isScrolling) - }); - } - if (unref(measurable)) { - const { - height, - ...exceptHeightStyle - } = style || {}; - const _measured = unref(measured); - return createVNode("div", mergeProps({ - "ref": rowRef, - "class": props2.class, - "style": _measured ? style : exceptHeightStyle, - "role": "row" - }, attrs, unref(eventHandlers)), [ColumnCells]); - } - return createVNode("div", mergeProps(attrs, { - "ref": rowRef, - "class": props2.class, - "style": style, - "role": "row" - }, unref(eventHandlers)), [ColumnCells]); - }; - } -}); -var Row2 = TableV2Row; - -// node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs -function _isSlot6(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var RowRenderer = (props2, { - slots -}) => { - const { - columns: columns2, - columnsStyles, - depthMap, - expandColumnKey: expandColumnKey2, - expandedRowKeys, - estimatedRowHeight, - hasFixedColumns, - rowData, - rowIndex, - style, - isScrolling, - rowProps: rowProps2, - rowClass, - rowKey: rowKey2, - rowEventHandlers, - ns, - onRowHovered, - onRowExpanded - } = props2; - const rowKls = tryCall(rowClass, { - columns: columns2, - rowData, - rowIndex - }, ""); - const additionalProps = tryCall(rowProps2, { - columns: columns2, - rowData, - rowIndex - }); - const _rowKey = rowData[rowKey2]; - const depth = depthMap[_rowKey] || 0; - const canExpand = Boolean(expandColumnKey2); - const isFixedRow = rowIndex < 0; - const kls = [ns.e("row"), rowKls, ns.is("expanded", canExpand && expandedRowKeys.includes(_rowKey)), ns.is("fixed", !depth && isFixedRow), ns.is("customized", Boolean(slots.row)), { - [ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0 - }]; - const onRowHover = hasFixedColumns ? onRowHovered : void 0; - const _rowProps = { - ...additionalProps, - columns: columns2, - columnsStyles, - class: kls, - depth, - expandColumnKey: expandColumnKey2, - estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight, - isScrolling, - rowIndex, - rowData, - rowKey: _rowKey, - rowEventHandlers, - style - }; - const handlerMouseEnter = (e) => { - onRowHover == null ? void 0 : onRowHover({ - hovered: true, - rowKey: _rowKey, - event: e, - rowData, - rowIndex - }); - }; - const handlerMouseLeave = (e) => { - onRowHover == null ? void 0 : onRowHover({ - hovered: false, - rowKey: _rowKey, - event: e, - rowData, - rowIndex - }); - }; - return createVNode(Row2, mergeProps(_rowProps, { - "onRowExpand": onRowExpanded, - "onMouseenter": handlerMouseEnter, - "onMouseleave": handlerMouseLeave, - "rowkey": _rowKey - }), _isSlot6(slots) ? slots : { - default: () => [slots] - }); -}; -var Row3 = RowRenderer; - -// node_modules/element-plus/es/components/table-v2/src/components/cell.mjs -var TableV2Cell = (props2, { - slots -}) => { - var _a; - const { - cellData, - style - } = props2; - const displayText = ((_a = cellData == null ? void 0 : cellData.toString) == null ? void 0 : _a.call(cellData)) || ""; - const defaultSlot = renderSlot(slots, "default", props2, () => [displayText]); - return createVNode("div", { - "class": props2.class, - "title": displayText, - "style": style - }, [defaultSlot]); -}; -TableV2Cell.displayName = "ElTableV2Cell"; -TableV2Cell.inheritAttrs = false; -var TableCell = TableV2Cell; - -// node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs -var ExpandIcon = (props2) => { - const { - expanded, - expandable, - onExpand, - style, - size: size3, - ariaLabel - } = props2; - const expandIconProps = { - onClick: expandable ? () => onExpand(!expanded) : void 0, - ariaLabel, - ariaExpanded: expanded, - class: props2.class - }; - return createVNode("button", mergeProps(expandIconProps, { - "type": "button" - }), [createVNode(ElIcon, { - "size": size3, - "style": style - }, { - default: () => [createVNode(arrow_right_default, null, null)] - })]); -}; -ExpandIcon.inheritAttrs = false; -var ExpandIcon$1 = ExpandIcon; - -// node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs -var CellRenderer = ({ - columns: columns2, - column: column2, - columnIndex, - depth, - expandIconProps, - isScrolling, - rowData, - rowIndex, - style, - expandedRowKeys, - ns, - t, - cellProps: _cellProps, - expandColumnKey: expandColumnKey2, - indentSize, - iconSize, - rowKey: rowKey2 -}, { - slots -}) => { - const cellStyle = enforceUnit(style); - if (column2.placeholderSign === placeholderSign) { - return createVNode("div", { - "class": ns.em("row-cell", "placeholder"), - "style": cellStyle - }, null); - } - const { - cellRenderer, - dataKey, - dataGetter - } = column2; - const cellData = isFunction(dataGetter) ? dataGetter({ - columns: columns2, - column: column2, - columnIndex, - rowData, - rowIndex - }) : get_default(rowData, dataKey != null ? dataKey : ""); - const extraCellProps = tryCall(_cellProps, { - cellData, - columns: columns2, - column: column2, - columnIndex, - rowIndex, - rowData - }); - const cellProps = { - class: ns.e("cell-text"), - columns: columns2, - column: column2, - columnIndex, - cellData, - isScrolling, - rowData, - rowIndex - }; - const columnCellRenderer = componentToSlot(cellRenderer); - const Cell2 = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(TableCell, cellProps, null)]); - const kls = [ns.e("row-cell"), column2.class, column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right")]; - const expandable = rowIndex >= 0 && expandColumnKey2 && column2.key === expandColumnKey2; - const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey2]); - let IconOrPlaceholder; - const iconStyle = `margin-inline-start: ${depth * indentSize}px;`; - if (expandable) { - if (isObject(expandIconProps)) { - IconOrPlaceholder = createVNode(ExpandIcon$1, mergeProps(expandIconProps, { - "class": [ns.e("expand-icon"), ns.is("expanded", expanded)], - "size": iconSize, - "expanded": expanded, - "ariaLabel": t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"), - "style": iconStyle, - "expandable": true - }), null); - } else { - IconOrPlaceholder = createVNode("div", { - "style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ") - }, null); - } - } - return createVNode("div", mergeProps({ - "class": kls, - "style": cellStyle - }, extraCellProps, { - "role": "cell" - }), [IconOrPlaceholder, Cell2]); -}; -CellRenderer.inheritAttrs = false; -var Cell = CellRenderer; - -// node_modules/element-plus/es/components/table-v2/src/header-row.mjs -var tableV2HeaderRowProps = buildProps({ - class: String, - columns, - columnsStyles: { - type: definePropType(Object), - required: true - }, - headerIndex: Number, - style: { type: definePropType(Object) } -}); - -// node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs -var TableV2HeaderRow = defineComponent({ - name: "ElTableV2HeaderRow", - props: tableV2HeaderRowProps, - setup(props2, { - slots - }) { - return () => { - const { - columns: columns2, - columnsStyles, - headerIndex, - style - } = props2; - let Cells = columns2.map((column2, columnIndex) => { - return slots.cell({ - columns: columns2, - column: column2, - columnIndex, - headerIndex, - style: columnsStyles[column2.key] - }); - }); - if (slots.header) { - Cells = slots.header({ - cells: Cells.map((node) => { - if (isArray(node) && node.length === 1) { - return node[0]; - } - return node; - }), - columns: columns2, - headerIndex - }); - } - return createVNode("div", { - "class": props2.class, - "style": style, - "role": "row" - }, [Cells]); - }; - } -}); -var HeaderRow = TableV2HeaderRow; - -// node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs -function _isSlot7(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var HeaderRenderer = ({ - columns: columns2, - columnsStyles, - headerIndex, - style, - headerClass, - headerProps, - ns -}, { - slots -}) => { - const param = { - columns: columns2, - headerIndex - }; - const kls = [ns.e("header-row"), tryCall(headerClass, param, ""), ns.is("customized", Boolean(slots.header))]; - const extraProps = { - ...tryCall(headerProps, param), - columnsStyles, - class: kls, - columns: columns2, - headerIndex, - style - }; - return createVNode(HeaderRow, extraProps, _isSlot7(slots) ? slots : { - default: () => [slots] - }); -}; -var Header3 = HeaderRenderer; - -// node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs -var HeaderCell = (props2, { - slots -}) => renderSlot(slots, "default", props2, () => { - var _a, _b; - return [createVNode("div", { - "class": props2.class, - "title": (_a = props2.column) == null ? void 0 : _a.title - }, [(_b = props2.column) == null ? void 0 : _b.title])]; -}); -HeaderCell.displayName = "ElTableV2HeaderCell"; -HeaderCell.inheritAttrs = false; -var HeaderCell$1 = HeaderCell; - -// node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs -var SortIcon = (props2) => { - const { - sortOrder - } = props2; - return createVNode("button", { - "type": "button", - "aria-label": props2.ariaLabel, - "class": props2.class - }, [createVNode(ElIcon, { - "size": 14 - }, { - default: () => [sortOrder === SortOrder.ASC ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)] - })]); -}; -var SortIcon$1 = SortIcon; - -// node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs -var HeaderCellRenderer = (props2, { - slots -}) => { - const { - column: column2, - ns, - t, - style, - onColumnSorted - } = props2; - const cellStyle = enforceUnit(style); - if (column2.placeholderSign === placeholderSign) { - return createVNode("div", { - "class": ns.em("header-row-cell", "placeholder"), - "style": cellStyle - }, null); - } - const { - headerCellRenderer, - headerClass, - sortable - } = column2; - const cellProps = { - ...props2, - class: ns.e("header-cell-text") - }; - const columnCellRenderer = componentToSlot(headerCellRenderer); - const Cell2 = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(HeaderCell$1, cellProps, null)]); - const { - sortBy: sortBy2, - sortState, - headerCellProps - } = props2; - let sorting, sortOrder, ariaSort; - if (sortState) { - const order = sortState[column2.key]; - sorting = Boolean(oppositeOrderMap[order]); - sortOrder = sorting ? order : SortOrder.ASC; - } else { - sorting = column2.key === sortBy2.key; - sortOrder = sorting ? sortBy2.order : SortOrder.ASC; - } - if (sortOrder === SortOrder.ASC) { - ariaSort = "ascending"; - } else if (sortOrder === SortOrder.DESC) { - ariaSort = "descending"; - } else { - ariaSort = void 0; - } - const cellKls = [ns.e("header-cell"), tryCall(headerClass, props2, ""), column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right"), sortable && ns.is("sortable")]; - const cellWrapperProps = { - ...tryCall(headerCellProps, props2), - onClick: column2.sortable ? onColumnSorted : void 0, - ariaSort: sortable ? ariaSort : void 0, - class: cellKls, - style: cellStyle, - ["data-key"]: column2.key - }; - return createVNode("div", mergeProps(cellWrapperProps, { - "role": "columnheader" - }), [Cell2, sortable && createVNode(SortIcon$1, { - "class": [ns.e("sort-icon"), sorting && ns.is("sorting")], - "sortOrder": sortOrder, - "ariaLabel": t("el.table.sortLabel", { - column: column2.title || "" - }) - }, null)]); -}; -var HeaderCell2 = HeaderCellRenderer; - -// node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs -var Footer2 = (props2, { - slots -}) => { - var _a; - return createVNode("div", { - "class": props2.class, - "style": props2.style - }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]); -}; -Footer2.displayName = "ElTableV2Footer"; -var Footer$1 = Footer2; - -// node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs -var Footer3 = (props2, { - slots -}) => { - const defaultSlot = renderSlot(slots, "default", {}, () => [createVNode(ElEmpty, null, null)]); - return createVNode("div", { - "class": props2.class, - "style": props2.style - }, [defaultSlot]); -}; -Footer3.displayName = "ElTableV2Empty"; -var Empty2 = Footer3; - -// node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs -var Overlay2 = (props2, { - slots -}) => { - var _a; - return createVNode("div", { - "class": props2.class, - "style": props2.style - }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]); -}; -Overlay2.displayName = "ElTableV2Overlay"; -var Overlay$1 = Overlay2; - -// node_modules/element-plus/es/components/table-v2/src/table-v2.mjs -function _isSlot8(s2) { - return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); -} -var COMPONENT_NAME21 = "ElTableV2"; -var TableV2 = defineComponent({ - name: COMPONENT_NAME21, - props: tableV2Props, - setup(props2, { - slots, - expose - }) { - const ns = useNamespace("table-v2"); - const { - t - } = useLocale(); - const { - columnsStyles, - fixedColumnsOnLeft, - fixedColumnsOnRight, - mainColumns, - mainTableHeight, - fixedTableHeight, - leftTableWidth, - rightTableWidth, - data, - depthMap, - expandedRowKeys, - hasFixedColumns, - mainTableRef, - leftTableRef, - rightTableRef, - isDynamic, - isResetting, - isScrolling, - bodyWidth, - emptyStyle, - rootStyle, - footerHeight, - showEmpty, - scrollTo: scrollTo2, - scrollToLeft, - scrollToTop, - scrollToRow, - getRowHeight, - onColumnSorted, - onRowHeightChange, - onRowHovered, - onRowExpanded, - onRowsRendered, - onScroll, - onVerticalScroll - } = useTable(props2); - expose({ - scrollTo: scrollTo2, - scrollToLeft, - scrollToTop, - scrollToRow - }); - provide(TableV2InjectionKey, { - ns, - isResetting, - isScrolling - }); - return () => { - const { - cache: cache2, - cellProps, - estimatedRowHeight, - expandColumnKey: expandColumnKey2, - fixedData, - headerHeight, - headerClass, - headerProps, - headerCellProps, - sortBy: sortBy2, - sortState, - rowHeight, - rowClass, - rowEventHandlers, - rowKey: rowKey2, - rowProps: rowProps2, - scrollbarAlwaysOn, - indentSize, - iconSize, - useIsScrolling, - vScrollbarSize, - width - } = props2; - const _data = unref(data); - const mainTableProps = { - cache: cache2, - class: ns.e("main"), - columns: unref(mainColumns), - data: _data, - fixedData, - estimatedRowHeight, - bodyWidth: unref(bodyWidth), - headerHeight, - headerWidth: unref(bodyWidth), - height: unref(mainTableHeight), - mainTableRef, - rowKey: rowKey2, - rowHeight, - scrollbarAlwaysOn, - scrollbarStartGap: 2, - scrollbarEndGap: vScrollbarSize, - useIsScrolling, - width, - getRowHeight, - onRowsRendered, - onScroll - }; - const leftColumnsWidth = unref(leftTableWidth); - const _fixedTableHeight = unref(fixedTableHeight); - const leftTableProps = { - cache: cache2, - class: ns.e("left"), - columns: unref(fixedColumnsOnLeft), - data: _data, - fixedData, - estimatedRowHeight, - leftTableRef, - rowHeight, - bodyWidth: leftColumnsWidth, - headerWidth: leftColumnsWidth, - headerHeight, - height: _fixedTableHeight, - rowKey: rowKey2, - scrollbarAlwaysOn, - scrollbarStartGap: 2, - scrollbarEndGap: vScrollbarSize, - useIsScrolling, - width: leftColumnsWidth, - getRowHeight, - onScroll: onVerticalScroll - }; - const rightColumnsWidth = unref(rightTableWidth); - const rightTableProps = { - cache: cache2, - class: ns.e("right"), - columns: unref(fixedColumnsOnRight), - data: _data, - fixedData, - estimatedRowHeight, - rightTableRef, - rowHeight, - bodyWidth: rightColumnsWidth, - headerWidth: rightColumnsWidth, - headerHeight, - height: _fixedTableHeight, - rowKey: rowKey2, - scrollbarAlwaysOn, - scrollbarStartGap: 2, - scrollbarEndGap: vScrollbarSize, - width: rightColumnsWidth, - style: `${ns.cssVarName("table-scrollbar-size")}: ${vScrollbarSize}px`, - useIsScrolling, - getRowHeight, - onScroll: onVerticalScroll - }; - const _columnsStyles = unref(columnsStyles); - const tableRowProps = { - ns, - depthMap: unref(depthMap), - columnsStyles: _columnsStyles, - expandColumnKey: expandColumnKey2, - expandedRowKeys: unref(expandedRowKeys), - estimatedRowHeight, - hasFixedColumns: unref(hasFixedColumns), - rowProps: rowProps2, - rowClass, - rowKey: rowKey2, - rowEventHandlers, - onRowHovered, - onRowExpanded, - onRowHeightChange - }; - const tableCellProps = { - cellProps, - expandColumnKey: expandColumnKey2, - indentSize, - iconSize, - rowKey: rowKey2, - expandedRowKeys: unref(expandedRowKeys), - ns, - t - }; - const tableHeaderProps = { - ns, - headerClass, - headerProps, - columnsStyles: _columnsStyles - }; - const tableHeaderCellProps = { - ns, - t, - sortBy: sortBy2, - sortState, - headerCellProps, - onColumnSorted - }; - const tableSlots = { - row: (props22) => createVNode(Row3, mergeProps(props22, tableRowProps), { - row: slots.row, - cell: (props3) => { - let _slot; - return slots.cell ? createVNode(Cell, mergeProps(props3, tableCellProps, { - "style": _columnsStyles[props3.column.key] - }), _isSlot8(_slot = slots.cell(props3)) ? _slot : { - default: () => [_slot] - }) : createVNode(Cell, mergeProps(props3, tableCellProps, { - "style": _columnsStyles[props3.column.key] - }), null); - } - }), - header: (props22) => createVNode(Header3, mergeProps(props22, tableHeaderProps), { - header: slots.header, - cell: (props3) => { - let _slot2; - return slots["header-cell"] ? createVNode(HeaderCell2, mergeProps(props3, tableHeaderCellProps, { - "style": _columnsStyles[props3.column.key] - }), _isSlot8(_slot2 = slots["header-cell"](props3)) ? _slot2 : { - default: () => [_slot2] - }) : createVNode(HeaderCell2, mergeProps(props3, tableHeaderCellProps, { - "style": _columnsStyles[props3.column.key] - }), null); - } - }) - }; - const rootKls = [props2.class, ns.b(), ns.e("root"), ns.is("dynamic", unref(isDynamic))]; - const footerProps = { - class: ns.e("footer"), - style: unref(footerHeight) - }; - return createVNode("div", { - "class": rootKls, - "style": unref(rootStyle) - }, [createVNode(MainTable$1, mainTableProps, _isSlot8(tableSlots) ? tableSlots : { - default: () => [tableSlots] - }), createVNode(LeftTable$1, leftTableProps, _isSlot8(tableSlots) ? tableSlots : { - default: () => [tableSlots] - }), createVNode(RightTable$1, rightTableProps, _isSlot8(tableSlots) ? tableSlots : { - default: () => [tableSlots] - }), slots.footer && createVNode(Footer$1, footerProps, { - default: slots.footer - }), unref(showEmpty) && createVNode(Empty2, { - "class": ns.e("empty"), - "style": unref(emptyStyle) - }, { - default: slots.empty - }), slots.overlay && createVNode(Overlay$1, { - "class": ns.e("overlay") - }, { - default: slots.overlay - })]); - }; - } -}); -var TableV2$1 = TableV2; - -// node_modules/element-plus/es/components/table-v2/src/auto-resizer.mjs -var autoResizerProps = buildProps({ - disableWidth: Boolean, - disableHeight: Boolean, - onResize: { - type: definePropType(Function) - } -}); - -// node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs -var useAutoResize = (props2) => { - const sizer = ref(); - const width$ = ref(0); - const height$ = ref(0); - let resizerStopper; - onMounted(() => { - resizerStopper = useResizeObserver(sizer, ([entry]) => { - const { width, height } = entry.contentRect; - const { paddingLeft, paddingRight, paddingTop, paddingBottom } = getComputedStyle(entry.target); - const left = Number.parseInt(paddingLeft) || 0; - const right = Number.parseInt(paddingRight) || 0; - const top = Number.parseInt(paddingTop) || 0; - const bottom = Number.parseInt(paddingBottom) || 0; - width$.value = width - left - right; - height$.value = height - top - bottom; - }).stop; - }); - onBeforeUnmount(() => { - resizerStopper == null ? void 0 : resizerStopper(); - }); - watch([width$, height$], ([width, height]) => { - var _a; - (_a = props2.onResize) == null ? void 0 : _a.call(props2, { - width, - height - }); - }); - return { - sizer, - width: width$, - height: height$ - }; -}; - -// node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs -var AutoResizer = defineComponent({ - name: "ElAutoResizer", - props: autoResizerProps, - setup(props2, { - slots - }) { - const ns = useNamespace("auto-resizer"); - const { - height, - width, - sizer - } = useAutoResize(props2); - const style = { - width: "100%", - height: "100%" - }; - return () => { - var _a; - return createVNode("div", { - "ref": sizer, - "class": ns.b(), - "style": style - }, [(_a = slots.default) == null ? void 0 : _a.call(slots, { - height: height.value, - width: width.value - })]); - }; - } -}); -var AutoResizer$1 = AutoResizer; - -// node_modules/element-plus/es/components/table-v2/index.mjs -var ElTableV2 = withInstall(TableV2$1); -var ElAutoResizer = withInstall(AutoResizer$1); - -// node_modules/element-plus/es/components/tabs/src/constants.mjs -var tabsRootContextKey = Symbol("tabsRootContextKey"); - -// node_modules/element-plus/es/components/tabs/src/tab-bar.mjs -var tabBarProps = buildProps({ - tabs: { - type: definePropType(Array), - default: () => mutable([]) - }, - tabRefs: { - type: definePropType(Object), - default: () => mutable({}) - } -}); - -// node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs -var COMPONENT_NAME22 = "ElTabBar"; -var _sfc_main129 = defineComponent({ - ...{ - name: COMPONENT_NAME22 - }, - __name: "tab-bar", - props: tabBarProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const rootTabs = inject(tabsRootContextKey); - if (!rootTabs) - throwError(COMPONENT_NAME22, ""); - const ns = useNamespace("tabs"); - const barRef = ref(); - const barStyle = ref(); - const renderActiveBar = computed( - () => { - var _a; - return isUndefined2(rootTabs.props.defaultValue) || Boolean((_a = barStyle.value) == null ? void 0 : _a.transform); - } - ); - const getBarStyle = () => { - let offset3 = 0; - let tabSize = 0; - const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height"; - const sizeDir = sizeName === "width" ? "x" : "y"; - const position = sizeDir === "x" ? "left" : "top"; - props2.tabs.every((tab) => { - if (isUndefined2(tab.paneName)) - return false; - const $el = props2.tabRefs[tab.paneName]; - if (!$el) - return false; - if (!tab.active) { - return true; - } - offset3 = $el[`offset${capitalize3(position)}`]; - tabSize = $el[`client${capitalize3(sizeName)}`]; - const tabStyles = window.getComputedStyle($el); - if (sizeName === "width") { - tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight); - offset3 += Number.parseFloat(tabStyles.paddingLeft); - } - return false; - }); - return { - [sizeName]: `${tabSize}px`, - transform: `translate${capitalize3(sizeDir)}(${offset3}px)` - }; - }; - const update2 = () => barStyle.value = getBarStyle(); - const tabObservers = []; - const observerTabs = () => { - tabObservers.forEach((observer) => observer.stop()); - tabObservers.length = 0; - Object.values(props2.tabRefs).forEach((tab) => { - tabObservers.push(useResizeObserver(tab, update2)); - }); - }; - watch( - () => props2.tabs, - async () => { - await nextTick(); - update2(); - observerTabs(); - }, - { immediate: true } - ); - const barObserver = useResizeObserver(barRef, () => update2()); - onBeforeUnmount(() => { - tabObservers.forEach((observer) => observer.stop()); - tabObservers.length = 0; - barObserver.stop(); - }); - __expose({ - ref: barRef, - update: update2 - }); - return (_ctx, _cache) => { - return renderActiveBar.value ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref_key: "barRef", - ref: barRef, - class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]), - style: normalizeStyle(barStyle.value) - }, - null, - 6 - )) : createCommentVNode("v-if", true); - }; - } -}); -var TabBar = _export_sfc(_sfc_main129, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]); - -// node_modules/element-plus/es/components/tabs/src/tab-nav.mjs -var tabNavProps = buildProps({ - panes: { - type: definePropType(Array), - default: () => mutable([]) - }, - currentName: { - type: [String, Number], - default: "" - }, - editable: Boolean, - type: { - type: String, - values: ["card", "border-card", ""], - default: "" - }, - stretch: Boolean, - tabindex: { - type: [String, Number], - default: void 0 - } -}); -var tabNavEmits = { - tabClick: (tab, tabName, ev) => ev instanceof Event, - tabRemove: (tab, ev) => ev instanceof Event -}; -var COMPONENT_NAME23 = "ElTabNav"; -var TabNav = defineComponent({ - name: COMPONENT_NAME23, - props: tabNavProps, - emits: tabNavEmits, - setup(props2, { - expose, - emit - }) { - const rootTabs = inject(tabsRootContextKey); - if (!rootTabs) - throwError(COMPONENT_NAME23, ``); - const ns = useNamespace("tabs"); - const visibility = useDocumentVisibility(); - const focused = useWindowFocus(); - const navScroll$ = ref(); - const nav$ = ref(); - const el$ = ref(); - const tabRefsMap = ref({}); - const tabBarRef = ref(); - const scrollable = ref(false); - const navOffset = ref(0); - const isFocus = ref(false); - const focusable = ref(true); - const tracker = shallowRef(); - const isHorizontal2 = computed(() => ["top", "bottom"].includes(rootTabs.props.tabPosition)); - const sizeName = computed(() => isHorizontal2.value ? "width" : "height"); - const navStyle = computed(() => { - const dir = sizeName.value === "width" ? "X" : "Y"; - return { - transform: `translate${dir}(-${navOffset.value}px)` - }; - }); - const { - width: navContainerWidth, - height: navContainerHeight - } = useElementSize(navScroll$); - const { - width: navWidth, - height: navHeight - } = useElementSize(nav$, { - width: 0, - height: 0 - }, { - box: "border-box" - }); - const navContainerSize = computed(() => isHorizontal2.value ? navContainerWidth.value : navContainerHeight.value); - const navSize = computed(() => isHorizontal2.value ? navWidth.value : navHeight.value); - const { - onWheel - } = useWheel({ - atStartEdge: computed(() => navOffset.value <= 0), - atEndEdge: computed(() => navSize.value - navOffset.value <= navContainerSize.value), - layout: computed(() => isHorizontal2.value ? "horizontal" : "vertical") - }, (offset3) => { - navOffset.value = clamp_default(navOffset.value + offset3, 0, navSize.value - navContainerSize.value); - }); - const scrollPrev = () => { - if (!navScroll$.value) - return; - const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; - const currentOffset = navOffset.value; - if (!currentOffset) - return; - const newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0; - navOffset.value = newOffset; - }; - const scrollNext = () => { - if (!navScroll$.value || !nav$.value) - return; - const navSize2 = nav$.value[`offset${capitalize3(sizeName.value)}`]; - const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; - const currentOffset = navOffset.value; - if (navSize2 - currentOffset <= containerSize) - return; - const newOffset = navSize2 - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize2 - containerSize; - navOffset.value = newOffset; - }; - const scrollToActiveTab = async () => { - const nav = nav$.value; - if (!scrollable.value || !el$.value || !navScroll$.value || !nav) - return; - await nextTick(); - const activeTab = tabRefsMap.value[props2.currentName]; - if (!activeTab) - return; - const navScroll = navScroll$.value; - const activeTabBounding = activeTab.getBoundingClientRect(); - const navScrollBounding = navScroll.getBoundingClientRect(); - const maxOffset = isHorizontal2.value ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height; - const currentOffset = navOffset.value; - let newOffset = currentOffset; - if (isHorizontal2.value) { - if (activeTabBounding.left < navScrollBounding.left) { - newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left); - } - if (activeTabBounding.right > navScrollBounding.right) { - newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right; - } - } else { - if (activeTabBounding.top < navScrollBounding.top) { - newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top); - } - if (activeTabBounding.bottom > navScrollBounding.bottom) { - newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom); - } - } - newOffset = Math.max(newOffset, 0); - navOffset.value = Math.min(newOffset, maxOffset); - }; - const update2 = () => { - var _a; - if (!nav$.value || !navScroll$.value) - return; - props2.stretch && ((_a = tabBarRef.value) == null ? void 0 : _a.update()); - const navSize2 = nav$.value[`offset${capitalize3(sizeName.value)}`]; - const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; - const currentOffset = navOffset.value; - if (containerSize < navSize2) { - scrollable.value = scrollable.value || {}; - scrollable.value.prev = currentOffset; - scrollable.value.next = currentOffset + containerSize < navSize2; - if (navSize2 - currentOffset < containerSize) { - navOffset.value = navSize2 - containerSize; - } - } else { - scrollable.value = false; - if (currentOffset > 0) { - navOffset.value = 0; - } - } - }; - const changeTab = (event) => { - const code = getEventCode(event); - let step2 = 0; - switch (code) { - case EVENT_CODE.left: - case EVENT_CODE.up: - step2 = -1; - break; - case EVENT_CODE.right: - case EVENT_CODE.down: - step2 = 1; - break; - default: - return; - } - const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")); - const currentIndex = tabList.indexOf(event.target); - let nextIndex = currentIndex + step2; - if (nextIndex < 0) { - nextIndex = tabList.length - 1; - } else if (nextIndex >= tabList.length) { - nextIndex = 0; - } - tabList[nextIndex].focus({ - preventScroll: true - }); - tabList[nextIndex].click(); - setFocus(); - }; - const setFocus = () => { - if (focusable.value) - isFocus.value = true; - }; - const removeFocus = () => isFocus.value = false; - const setRefs = (el, key) => { - tabRefsMap.value[key] = el; - }; - const focusActiveTab = async () => { - await nextTick(); - const activeTab = tabRefsMap.value[props2.currentName]; - activeTab == null ? void 0 : activeTab.focus({ - preventScroll: true - }); - }; - watch(visibility, (visibility2) => { - if (visibility2 === "hidden") { - focusable.value = false; - } else if (visibility2 === "visible") { - setTimeout(() => focusable.value = true, 50); - } - }); - watch(focused, (focused2) => { - if (focused2) { - setTimeout(() => focusable.value = true, 50); - } else { - focusable.value = false; - } - }); - useResizeObserver(el$, () => { - rAF(update2); - }); - onMounted(() => setTimeout(() => scrollToActiveTab(), 0)); - onUpdated(() => update2()); - expose({ - scrollToActiveTab, - removeFocus, - focusActiveTab, - tabListRef: nav$, - tabBarRef, - scheduleRender: () => triggerRef(tracker) - }); - return () => { - const scrollBtn = scrollable.value ? [createVNode("span", { - "class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)], - "onClick": scrollPrev - }, [createVNode(ElIcon, null, { - default: () => [createVNode(arrow_left_default, null, null)] - })]), createVNode("span", { - "class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)], - "onClick": scrollNext - }, [createVNode(ElIcon, null, { - default: () => [createVNode(arrow_right_default, null, null)] - })])] : null; - const tabs = props2.panes.map((pane, index) => { - var _a, _b, _c, _d, _e; - const uid2 = pane.uid; - const disabled = pane.props.disabled; - const tabName = (_b = (_a = pane.props.name) != null ? _a : pane.index) != null ? _b : `${index}`; - const closable = !disabled && (pane.isClosable || pane.props.closable !== false && props2.editable); - pane.index = `${index}`; - const btnClose = closable ? createVNode(ElIcon, { - "class": "is-icon-close", - "onClick": (ev) => emit("tabRemove", pane, ev) - }, { - default: () => [createVNode(close_default, null, null)] - }) : null; - const tabLabelContent = ((_d = (_c = pane.slots).label) == null ? void 0 : _d.call(_c)) || pane.props.label; - const tabindex = !disabled && pane.active ? (_e = props2.tabindex) != null ? _e : rootTabs.props.tabindex : -1; - return createVNode("div", { - "ref": (el) => setRefs(el, tabName), - "class": [ns.e("item"), ns.is(rootTabs.props.tabPosition), ns.is("active", pane.active), ns.is("disabled", disabled), ns.is("closable", closable), ns.is("focus", isFocus.value)], - "id": `tab-${tabName}`, - "key": `tab-${uid2}`, - "aria-controls": `pane-${tabName}`, - "role": "tab", - "aria-selected": pane.active, - "tabindex": tabindex, - "onFocus": () => setFocus(), - "onBlur": () => removeFocus(), - "onClick": (ev) => { - removeFocus(); - emit("tabClick", pane, tabName, ev); - }, - "onKeydown": (ev) => { - const code = getEventCode(ev); - if (closable && (code === EVENT_CODE.delete || code === EVENT_CODE.backspace)) { - emit("tabRemove", pane, ev); - } - } - }, [...[tabLabelContent, btnClose]]); - }); - tracker.value; - return createVNode("div", { - "ref": el$, - "class": [ns.e("nav-wrap"), ns.is("scrollable", !!scrollable.value), ns.is(rootTabs.props.tabPosition)] - }, [scrollBtn, createVNode("div", { - "class": ns.e("nav-scroll"), - "ref": navScroll$ - }, [props2.panes.length > 0 ? createVNode("div", { - "class": [ns.e("nav"), ns.is(rootTabs.props.tabPosition), ns.is("stretch", props2.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))], - "ref": nav$, - "style": navStyle.value, - "role": "tablist", - "onKeydown": changeTab, - "onWheel": onWheel - }, [...[!props2.type ? createVNode(TabBar, { - "ref": tabBarRef, - "tabs": [...props2.panes], - "tabRefs": tabRefsMap.value - }, null) : null, tabs]]) : null])]); - }; - } -}); - -// node_modules/element-plus/es/components/tabs/src/tabs.mjs -var tabsProps = buildProps({ - type: { - type: String, - values: ["card", "border-card", ""], - default: "" - }, - closable: Boolean, - addable: Boolean, - modelValue: { - type: [String, Number] - }, - defaultValue: { - type: [String, Number] - }, - editable: Boolean, - tabPosition: { - type: String, - values: ["top", "right", "bottom", "left"], - default: "top" - }, - beforeLeave: { - type: definePropType(Function), - default: () => true - }, - stretch: Boolean, - tabindex: { - type: [String, Number], - default: 0 - } -}); -var isPaneName = (value) => isString(value) || isNumber2(value); -var tabsEmits = { - [UPDATE_MODEL_EVENT]: (name) => isPaneName(name), - tabClick: (pane, ev) => ev instanceof Event, - tabChange: (name) => isPaneName(name), - edit: (paneName, action) => ["remove", "add"].includes(action), - tabRemove: (name) => isPaneName(name), - tabAdd: () => true -}; -var Tabs = defineComponent({ - name: "ElTabs", - props: tabsProps, - emits: tabsEmits, - setup(props2, { - emit, - slots, - expose - }) { - var _a; - const ns = useNamespace("tabs"); - const isVertical = computed(() => ["left", "right"].includes(props2.tabPosition)); - const { - children: panes, - addChild: registerPane, - removeChild: unregisterPane, - ChildrenSorter: PanesSorter - } = useOrderedChildren(getCurrentInstance(), "ElTabPane"); - const nav$ = ref(); - const currentName = ref((_a = isUndefined2(props2.modelValue) ? props2.defaultValue : props2.modelValue) != null ? _a : "0"); - const setCurrentName = async (value, trigger = false) => { - var _a2, _b, _c, _d; - if (currentName.value === value || isUndefined2(value)) - return; - try { - let canLeave; - if (props2.beforeLeave) { - const result2 = props2.beforeLeave(value, currentName.value); - canLeave = result2 instanceof Promise ? await result2 : result2; - } else { - canLeave = true; - } - if (canLeave !== false) { - const isFocusInsidePane = (_a2 = panes.value.find((item) => item.paneName === currentName.value)) == null ? void 0 : _a2.isFocusInsidePane(); - currentName.value = value; - if (trigger) { - emit(UPDATE_MODEL_EVENT, value); - emit("tabChange", value); - } - (_c = (_b = nav$.value) == null ? void 0 : _b.removeFocus) == null ? void 0 : _c.call(_b); - if (isFocusInsidePane) { - (_d = nav$.value) == null ? void 0 : _d.focusActiveTab(); - } - } - } catch (e) { - } - }; - const handleTabClick = (tab, tabName, event) => { - if (tab.props.disabled) - return; - emit("tabClick", tab, event); - setCurrentName(tabName, true); - }; - const handleTabRemove = (pane, ev) => { - if (pane.props.disabled || isUndefined2(pane.props.name)) - return; - ev.stopPropagation(); - emit("edit", pane.props.name, "remove"); - emit("tabRemove", pane.props.name); - }; - const handleTabAdd = () => { - emit("edit", void 0, "add"); - emit("tabAdd"); - }; - const handleKeydown = (event) => { - const code = getEventCode(event); - if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter].includes(code)) - handleTabAdd(); - }; - const swapChildren = (vnode) => { - const actualFirstChild = vnode.el.firstChild; - const firstChild = ["bottom", "right"].includes(props2.tabPosition) ? vnode.children[0].el : vnode.children[1].el; - if (actualFirstChild !== firstChild) { - actualFirstChild.before(firstChild); - } - }; - watch(() => props2.modelValue, (modelValue) => setCurrentName(modelValue)); - watch(currentName, async () => { - var _a2; - await nextTick(); - (_a2 = nav$.value) == null ? void 0 : _a2.scrollToActiveTab(); - }); - provide(tabsRootContextKey, { - props: props2, - currentName, - registerPane, - unregisterPane, - nav$ - }); - expose({ - currentName, - get tabNavRef() { - return omit_default(nav$.value, ["scheduleRender"]); - } - }); - return () => { - const addSlot = slots["add-icon"]; - const newButton = props2.editable || props2.addable ? createVNode("div", { - "class": [ns.e("new-tab"), isVertical.value && ns.e("new-tab-vertical")], - "tabindex": props2.tabindex, - "onClick": handleTabAdd, - "onKeydown": handleKeydown - }, [addSlot ? renderSlot(slots, "add-icon") : createVNode(ElIcon, { - "class": ns.is("icon-plus") - }, { - default: () => [createVNode(plus_default, null, null)] - })]) : null; - const tabNav = () => createVNode(TabNav, { - "ref": nav$, - "currentName": currentName.value, - "editable": props2.editable, - "type": props2.type, - "panes": panes.value, - "stretch": props2.stretch, - "onTabClick": handleTabClick, - "onTabRemove": handleTabRemove - }, null); - const header = createVNode("div", { - "class": [ns.e("header"), isVertical.value && ns.e("header-vertical"), ns.is(props2.tabPosition)] - }, [createVNode(PanesSorter, null, { - default: tabNav, - $stable: true - }), newButton]); - const panels = createVNode("div", { - "class": ns.e("content") - }, [renderSlot(slots, "default")]); - return createVNode("div", { - "class": [ns.b(), ns.m(props2.tabPosition), { - [ns.m("card")]: props2.type === "card", - [ns.m("border-card")]: props2.type === "border-card" - }], - "onVnodeMounted": swapChildren, - "onVnodeUpdated": swapChildren - }, [panels, header]); - }; - } -}); - -// node_modules/element-plus/es/components/tabs/src/tab-pane.mjs -var tabPaneProps = buildProps({ - label: { - type: String, - default: "" - }, - name: { - type: [String, Number] - }, - closable: { - type: Boolean, - default: void 0 - }, - disabled: Boolean, - lazy: Boolean -}); - -// node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs -var _hoisted_169 = ["id", "aria-hidden", "aria-labelledby"]; -var COMPONENT_NAME24 = "ElTabPane"; -var _sfc_main130 = defineComponent({ - ...{ - name: COMPONENT_NAME24 - }, - __name: "tab-pane", - props: tabPaneProps, - setup(__props) { - const props2 = __props; - const instance = getCurrentInstance(); - const slots = useSlots(); - const tabsRoot = inject(tabsRootContextKey); - if (!tabsRoot) - throwError(COMPONENT_NAME24, "usage: "); - const ns = useNamespace("tab-pane"); - const paneRef = ref(); - const index = ref(); - const isClosable = computed(() => { - var _a; - return (_a = props2.closable) != null ? _a : tabsRoot.props.closable; - }); - const active = computed( - () => { - var _a; - return tabsRoot.currentName.value === ((_a = props2.name) != null ? _a : index.value); - } - ); - const loaded = ref(active.value); - const paneName = computed(() => { - var _a; - return (_a = props2.name) != null ? _a : index.value; - }); - const shouldBeRender = computed( - () => !props2.lazy || loaded.value || active.value - ); - const isFocusInsidePane = () => { - var _a; - return (_a = paneRef.value) == null ? void 0 : _a.contains(document.activeElement); - }; - watch(active, (val) => { - if (val) - loaded.value = true; - }); - const pane = reactive({ - uid: instance.uid, - getVnode: () => instance.vnode, - slots, - props: props2, - paneName, - active, - index, - isClosable, - isFocusInsidePane - }); - tabsRoot.registerPane(pane); - onBeforeUnmount(() => { - tabsRoot.unregisterPane(pane); - }); - onBeforeUpdate(() => { - var _a; - if (slots.label) - (_a = tabsRoot.nav$.value) == null ? void 0 : _a.scheduleRender(); - }); - return (_ctx, _cache) => { - return shouldBeRender.value ? withDirectives((openBlock(), createElementBlock("div", { - key: 0, - id: `pane-${paneName.value}`, - ref_key: "paneRef", - ref: paneRef, - class: normalizeClass(unref(ns).b()), - role: "tabpanel", - "aria-hidden": !active.value, - "aria-labelledby": `tab-${paneName.value}` - }, [ - renderSlot(_ctx.$slots, "default") - ], 10, _hoisted_169)), [ - [vShow, active.value] - ]) : createCommentVNode("v-if", true); - }; - } -}); -var TabPane = _export_sfc(_sfc_main130, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]); - -// node_modules/element-plus/es/components/tabs/index.mjs -var ElTabs = withInstall(Tabs, { - TabPane -}); -var ElTabPane = withNoopInstall(TabPane); - -// node_modules/element-plus/es/components/text/src/text.mjs -var textProps = buildProps({ - type: { - type: String, - values: ["primary", "success", "info", "warning", "danger", ""], - default: "" - }, - size: { - type: String, - values: componentSizes, - default: "" - }, - truncated: Boolean, - lineClamp: { - type: [String, Number] - }, - tag: { - type: String, - default: "span" - } -}); - -// node_modules/element-plus/es/components/text/src/text2.mjs -var _sfc_main131 = defineComponent({ - ...{ - name: "ElText" - }, - __name: "text", - props: textProps, - setup(__props) { - const props2 = __props; - const textRef = ref(); - const textSize = useFormSize(); - const ns = useNamespace("text"); - const textKls = computed(() => [ - ns.b(), - ns.m(props2.type), - ns.m(textSize.value), - ns.is("truncated", props2.truncated), - ns.is("line-clamp", !isUndefined2(props2.lineClamp)) - ]); - const bindTitle = () => { - var _a, _b, _c, _d, _e, _f, _g; - const inheritTitle = useAttrs().title; - if (inheritTitle) - return; - let shouldAddTitle = false; - const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || ""; - if (props2.truncated) { - const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth; - const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth; - if (width && scrollWidth && scrollWidth > width) { - shouldAddTitle = true; - } - } else if (!isUndefined2(props2.lineClamp)) { - const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight; - const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight; - if (height && scrollHeight && scrollHeight > height) { - shouldAddTitle = true; - } - } - if (shouldAddTitle) { - (_f = textRef.value) == null ? void 0 : _f.setAttribute("title", text); - } else { - (_g = textRef.value) == null ? void 0 : _g.removeAttribute("title"); - } - }; - onMounted(bindTitle); - onUpdated(bindTitle); - return (_ctx, _cache) => { - return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { - ref_key: "textRef", - ref: textRef, - class: normalizeClass(textKls.value), - style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp }) - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["class", "style"]); - }; - } -}); -var Text2 = _export_sfc(_sfc_main131, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]); - -// node_modules/element-plus/es/components/text/index.mjs -var ElText = withInstall(Text2); - -// node_modules/element-plus/es/components/time-select/src/time-select2.mjs -var import_dayjs19 = __toESM(require_dayjs_min(), 1); -var import_customParseFormat3 = __toESM(require_customParseFormat(), 1); - -// node_modules/element-plus/es/components/time-select/src/time-select.mjs -var timeSelectProps = buildProps({ - format: { - type: String, - default: "HH:mm" - }, - modelValue: { - type: definePropType(String) - }, - disabled: { - type: Boolean, - default: void 0 - }, - editable: { - type: Boolean, - default: true - }, - effect: { - type: definePropType(String), - default: "light" - }, - clearable: { - type: Boolean, - default: true - }, - size: useSizeProp, - placeholder: String, - start: { - type: String, - default: "09:00" - }, - end: { - type: String, - default: "18:00" - }, - step: { - type: String, - default: "00:30" - }, - minTime: { - type: definePropType(String) - }, - maxTime: { - type: definePropType(String) - }, - includeEndTime: Boolean, - name: String, - prefixIcon: { - type: definePropType([String, Object]), - default: () => clock_default - }, - clearIcon: { - type: definePropType([String, Object]), - default: () => circle_close_default - }, - popperClass: { - type: String, - default: "" - }, - popperStyle: { - type: definePropType([String, Object]) - }, - ...useEmptyValuesProps -}); - -// node_modules/element-plus/es/components/time-select/src/utils.mjs -var parseTime = (time) => { - const values2 = (time || "").split(":"); - if (values2.length >= 2) { - let hours = Number.parseInt(values2[0], 10); - const minutes = Number.parseInt(values2[1], 10); - const timeUpper = time.toUpperCase(); - if (timeUpper.includes("AM") && hours === 12) { - hours = 0; - } else if (timeUpper.includes("PM") && hours !== 12) { - hours += 12; - } - return { - hours, - minutes - }; - } - return null; -}; -var compareTime = (time1, time2) => { - const value1 = parseTime(time1); - if (!value1) - return -1; - const value2 = parseTime(time2); - if (!value2) - return -1; - const minutes1 = value1.minutes + value1.hours * 60; - const minutes2 = value2.minutes + value2.hours * 60; - if (minutes1 === minutes2) { - return 0; - } - return minutes1 > minutes2 ? 1 : -1; -}; -var padTime = (time) => { - return `${time}`.padStart(2, "0"); -}; -var formatTime2 = (time) => { - return `${padTime(time.hours)}:${padTime(time.minutes)}`; -}; -var nextTime = (time, step2) => { - const timeValue = parseTime(time); - if (!timeValue) - return ""; - const stepValue = parseTime(step2); - if (!stepValue) - return ""; - const next = { - hours: timeValue.hours, - minutes: timeValue.minutes - }; - next.minutes += stepValue.minutes; - next.hours += stepValue.hours; - next.hours += Math.floor(next.minutes / 60); - next.minutes = next.minutes % 60; - return formatTime2(next); -}; - -// node_modules/element-plus/es/components/time-select/src/time-select2.mjs -var _sfc_main132 = defineComponent({ - ...{ - name: "ElTimeSelect" - }, - __name: "time-select", - props: timeSelectProps, - emits: [CHANGE_EVENT, "blur", "focus", "clear", UPDATE_MODEL_EVENT], - setup(__props, { expose: __expose }) { - import_dayjs19.default.extend(import_customParseFormat3.default); - const { Option: ElOption2 } = ElSelect; - const props2 = __props; - const nsInput = useNamespace("input"); - const select = ref(); - const _disabled = useFormDisabled(); - const { lang } = useLocale(); - const value = computed(() => props2.modelValue); - const start = computed(() => { - const time = parseTime(props2.start); - return time ? formatTime2(time) : null; - }); - const end = computed(() => { - const time = parseTime(props2.end); - return time ? formatTime2(time) : null; - }); - const step2 = computed(() => { - const time = parseTime(props2.step); - return time ? formatTime2(time) : null; - }); - const minTime = computed(() => { - const time = parseTime(props2.minTime || ""); - return time ? formatTime2(time) : null; - }); - const maxTime = computed(() => { - const time = parseTime(props2.maxTime || ""); - return time ? formatTime2(time) : null; - }); - const items = computed(() => { - var _a; - const result2 = []; - const push = (formattedValue, rawValue) => { - result2.push({ - value: formattedValue, - disabled: compareTime(rawValue, minTime.value || "-1:-1") <= 0 || compareTime(rawValue, maxTime.value || "100:100") >= 0 - }); - }; - if (props2.start && props2.end && props2.step) { - let current = start.value; - let currentTime; - while (current && end.value && compareTime(current, end.value) <= 0) { - currentTime = (0, import_dayjs19.default)(current, "HH:mm").locale(lang.value).format(props2.format); - push(currentTime, current); - current = nextTime(current, step2.value); - } - if (props2.includeEndTime && end.value && ((_a = result2[result2.length - 1]) == null ? void 0 : _a.value) !== end.value) { - const formattedValue = (0, import_dayjs19.default)(end.value, "HH:mm").locale(lang.value).format(props2.format); - push(formattedValue, end.value); - } - } - return result2; - }); - const blur = () => { - var _a, _b; - (_b = (_a = select.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a); - }; - const focus = () => { - var _a, _b; - (_b = (_a = select.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a); - }; - __expose({ - blur, - focus - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(ElSelect), { - ref_key: "select", - ref: select, - "model-value": value.value, - disabled: unref(_disabled), - clearable: _ctx.clearable, - "clear-icon": _ctx.clearIcon, - size: _ctx.size, - effect: _ctx.effect, - placeholder: _ctx.placeholder, - "default-first-option": "", - filterable: _ctx.editable, - "empty-values": _ctx.emptyValues, - "value-on-clear": _ctx.valueOnClear, - "popper-class": _ctx.popperClass, - "popper-style": _ctx.popperStyle, - "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit(unref(UPDATE_MODEL_EVENT), event)), - onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit(unref(CHANGE_EVENT), event)), - onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)), - onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event)), - onClear: _cache[4] || (_cache[4] = () => _ctx.$emit("clear")) - }, { - prefix: withCtx(() => [ - _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(nsInput).e("prefix-icon")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ]), - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(items.value, (item) => { - return openBlock(), createBlock(unref(ElOption2), { - key: item.value, - label: item.value, - value: item.value, - disabled: item.disabled - }, null, 8, ["label", "value", "disabled"]); - }), - 128 - )) - ]), - _: 1 - }, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable", "empty-values", "value-on-clear", "popper-class", "popper-style"]); - }; - } -}); -var TimeSelect = _export_sfc(_sfc_main132, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]); - -// node_modules/element-plus/es/components/time-select/index.mjs -var ElTimeSelect = withInstall(TimeSelect); - -// node_modules/element-plus/es/components/timeline/src/tokens.mjs -var TIMELINE_INJECTION_KEY = "timeline"; - -// node_modules/element-plus/es/components/timeline/src/timeline.mjs -var timelineProps = buildProps({ - mode: { - type: String, - values: ["start", "alternate", "alternate-reverse", "end"], - default: "start" - }, - reverse: Boolean -}); -var Timeline = defineComponent({ - name: "ElTimeline", - props: timelineProps, - setup(props2, { slots }) { - const ns = useNamespace("timeline"); - provide(TIMELINE_INJECTION_KEY, { props: props2, slots }); - const timelineKls = computed(() => [ns.b(), ns.is(props2.mode)]); - return () => { - var _a, _b; - const children = flattedChildren( - (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : [] - ); - return h( - "ul", - { class: timelineKls.value }, - props2.reverse ? children.reverse() : children - ); - }; - } -}); - -// node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs -var timelineItemProps = buildProps({ - timestamp: { - type: String, - default: "" - }, - hideTimestamp: Boolean, - center: Boolean, - placement: { - type: String, - values: ["top", "bottom"], - default: "bottom" - }, - type: { - type: String, - values: ["primary", "success", "warning", "danger", "info"], - default: "" - }, - color: { - type: String, - default: "" - }, - size: { - type: String, - values: ["normal", "large"], - default: "normal" - }, - icon: { - type: iconPropType - }, - hollow: Boolean -}); - -// node_modules/element-plus/es/components/timeline/src/timeline-item.mjs -var _sfc_main133 = defineComponent({ - ...{ - name: "ElTimelineItem" - }, - __name: "timeline-item", - props: timelineItemProps, - setup(__props) { - const props2 = __props; - const { props: timelineProps2 } = inject( - TIMELINE_INJECTION_KEY - ); - const ns = useNamespace("timeline-item"); - const defaultNodeKls = computed(() => [ - ns.e("node"), - ns.em("node", props2.size || ""), - ns.em("node", props2.type || ""), - ns.is("hollow", props2.hollow) - ]); - const timelineItemKls = computed(() => [ - ns.b(), - { [ns.e("center")]: props2.center }, - ns.is(timelineProps2.mode) - ]); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "li", - { - class: normalizeClass(timelineItemKls.value) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("tail")) - }, - null, - 2 - ), - !_ctx.$slots.dot ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(defaultNodeKls.value), - style: normalizeStyle({ - backgroundColor: _ctx.color - }) - }, - [ - _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(ns).e("icon")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 6 - )) : createCommentVNode("v-if", true), - _ctx.$slots.dot ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("dot")) - }, - [ - renderSlot(_ctx.$slots, "dot") - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("wrapper")) - }, - [ - !_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")]) - }, - toDisplayString(_ctx.timestamp), - 3 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("content")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ), - !_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")]) - }, - toDisplayString(_ctx.timestamp), - 3 - )) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var TimelineItem = _export_sfc(_sfc_main133, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]); - -// node_modules/element-plus/es/components/timeline/index.mjs -var ElTimeline = withInstall(Timeline, { - TimelineItem -}); -var ElTimelineItem = withNoopInstall(TimelineItem); - -// node_modules/element-plus/es/components/transfer/src/transfer.mjs -var LEFT_CHECK_CHANGE_EVENT = "left-check-change"; -var RIGHT_CHECK_CHANGE_EVENT = "right-check-change"; -var transferProps = buildProps({ - data: { - type: definePropType(Array), - default: () => [] - }, - titles: { - type: definePropType(Array), - default: () => [] - }, - buttonTexts: { - type: definePropType(Array), - default: () => [] - }, - filterPlaceholder: String, - filterMethod: { - type: definePropType( - Function - ) - }, - leftDefaultChecked: { - type: definePropType(Array), - default: () => [] - }, - rightDefaultChecked: { - type: definePropType(Array), - default: () => [] - }, - renderContent: { - type: definePropType(Function) - }, - modelValue: { - type: definePropType(Array), - default: () => [] - }, - format: { - type: definePropType(Object), - default: () => ({}) - }, - filterable: Boolean, - props: { - type: definePropType(Object), - default: () => mutable({ - label: "label", - key: "key", - disabled: "disabled" - }) - }, - targetOrder: { - type: String, - values: ["original", "push", "unshift"], - default: "original" - }, - validateEvent: { - type: Boolean, - default: true - } -}); -var transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray) || isArray(value) && isNil_default(movedKeys); -var transferEmits = { - [CHANGE_EVENT]: (value, direction2, movedKeys) => [value, movedKeys].every(isArray) && ["left", "right"].includes(direction2), - [UPDATE_MODEL_EVENT]: (value) => isArray(value), - [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn, - [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn -}; - -// node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs -var CHECKED_CHANGE_EVENT = "checked-change"; -var transferPanelProps = buildProps({ - data: transferProps.data, - optionRender: { - type: definePropType( - Function - ) - }, - placeholder: String, - title: String, - filterable: Boolean, - format: transferProps.format, - filterMethod: transferProps.filterMethod, - defaultChecked: transferProps.leftDefaultChecked, - props: transferProps.props -}); -var transferPanelEmits = { - [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn -}; - -// node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs -var usePropsAlias = (props2) => { - const initProps = { - label: "label", - key: "key", - disabled: "disabled" - }; - return computed(() => ({ - ...initProps, - ...props2.props - })); -}; - -// node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs -var useCheck = (props2, panelState, emit) => { - const propsAlias = usePropsAlias(props2); - const filteredData = computed(() => { - return props2.data.filter((item) => { - if (isFunction(props2.filterMethod)) { - return props2.filterMethod(panelState.query, item); - } else { - const label = String( - item[propsAlias.value.label] || item[propsAlias.value.key] - ); - return label.toLowerCase().includes(panelState.query.toLowerCase()); - } - }); - }); - const checkableData = computed( - () => filteredData.value.filter((item) => !item[propsAlias.value.disabled]) - ); - const checkedSummary = computed(() => { - const checkedLength = panelState.checked.length; - const dataLength = props2.data.length; - const { noChecked, hasChecked } = props2.format; - if (noChecked && hasChecked) { - return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString()); - } else { - return `${checkedLength}/${dataLength}`; - } - }); - const isIndeterminate = computed(() => { - const checkedLength = panelState.checked.length; - return checkedLength > 0 && checkedLength < checkableData.value.length; - }); - const updateAllChecked = () => { - const checkableDataKeys = checkableData.value.map( - (item) => item[propsAlias.value.key] - ); - panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item)); - }; - const handleAllCheckedChange = (value) => { - panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : []; - }; - watch( - () => panelState.checked, - (val, oldVal) => { - updateAllChecked(); - if (panelState.checkChangeByUser) { - const movedKeys = val.concat(oldVal).filter((v2) => !val.includes(v2) || !oldVal.includes(v2)); - emit(CHECKED_CHANGE_EVENT, val, movedKeys); - } else { - emit(CHECKED_CHANGE_EVENT, val); - panelState.checkChangeByUser = true; - } - } - ); - watch(checkableData, () => { - updateAllChecked(); - }); - watch( - () => props2.data, - () => { - const checked = []; - const filteredDataKeys = filteredData.value.map( - (item) => item[propsAlias.value.key] - ); - panelState.checked.forEach((item) => { - if (filteredDataKeys.includes(item)) { - checked.push(item); - } - }); - panelState.checkChangeByUser = false; - panelState.checked = checked; - } - ); - watch( - () => props2.defaultChecked, - (val, oldVal) => { - if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item))) - return; - const checked = []; - const checkableDataKeys = checkableData.value.map( - (item) => item[propsAlias.value.key] - ); - val.forEach((item) => { - if (checkableDataKeys.includes(item)) { - checked.push(item); - } - }); - panelState.checkChangeByUser = false; - panelState.checked = checked; - }, - { - immediate: true - } - ); - return { - filteredData, - checkableData, - checkedSummary, - isIndeterminate, - updateAllChecked, - handleAllCheckedChange - }; -}; - -// node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs -var _sfc_main134 = defineComponent({ - ...{ - name: "ElTransferPanel" - }, - __name: "transfer-panel", - props: transferPanelProps, - emits: transferPanelEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const slots = useSlots(); - const OptionContent = ({ option }) => option; - const { t } = useLocale(); - const ns = useNamespace("transfer"); - const panelState = reactive({ - checked: [], - allChecked: false, - query: "", - checkChangeByUser: true - }); - const propsAlias = usePropsAlias(props2); - const { - filteredData, - checkedSummary, - isIndeterminate, - handleAllCheckedChange - } = useCheck(props2, panelState, emit); - const hasNoMatch = computed( - () => !isEmpty2(panelState.query) && isEmpty2(filteredData.value) - ); - const hasFooter = computed(() => !isEmpty2(slots.default()[0].children)); - const { checked, allChecked, query } = toRefs(panelState); - __expose({ - query - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b("panel")) - }, - [ - createBaseVNode( - "p", - { - class: normalizeClass(unref(ns).be("panel", "header")) - }, - [ - createVNode(unref(ElCheckbox), { - modelValue: unref(allChecked), - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null), - indeterminate: unref(isIndeterminate), - "validate-event": false, - onChange: unref(handleAllCheckedChange) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(_ctx.title) + " ", - 1 - ), - createBaseVNode( - "span", - null, - toDisplayString(unref(checkedSummary)), - 1 - ) - ]), - _: 1 - }, 8, ["modelValue", "indeterminate", "onChange"]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", hasFooter.value)]) - }, - [ - _ctx.filterable ? (openBlock(), createBlock(unref(ElInput), { - key: 0, - modelValue: unref(query), - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null), - class: normalizeClass(unref(ns).be("panel", "filter")), - size: "default", - placeholder: _ctx.placeholder, - "prefix-icon": unref(search_default), - clearable: "", - "validate-event": false - }, null, 8, ["modelValue", "class", "placeholder", "prefix-icon"])) : createCommentVNode("v-if", true), - withDirectives(createVNode(unref(ElCheckboxGroup), { - modelValue: unref(checked), - "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(checked) ? checked.value = $event : null), - "validate-event": false, - class: normalizeClass([unref(ns).is("filterable", _ctx.filterable), unref(ns).be("panel", "list")]) - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(unref(filteredData), (item) => { - return openBlock(), createBlock(unref(ElCheckbox), { - key: item[unref(propsAlias).key], - class: normalizeClass(unref(ns).be("panel", "item")), - value: item[unref(propsAlias).key], - disabled: item[unref(propsAlias).disabled], - "validate-event": false - }, { - default: withCtx(() => { - var _a; - return [ - createVNode(OptionContent, { - option: (_a = _ctx.optionRender) == null ? void 0 : _a.call(_ctx, item) - }, null, 8, ["option"]) - ]; - }), - _: 2 - }, 1032, ["class", "value", "disabled"]); - }), - 128 - )) - ]), - _: 1 - }, 8, ["modelValue", "class"]), [ - [vShow, !hasNoMatch.value && !unref(isEmpty2)(_ctx.data)] - ]), - withDirectives(createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).be("panel", "empty")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => [ - createTextVNode( - toDisplayString(hasNoMatch.value ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), - 1 - ) - ]) - ], - 2 - ), [ - [vShow, hasNoMatch.value || unref(isEmpty2)(_ctx.data)] - ]) - ], - 2 - ), - hasFooter.value ? (openBlock(), createElementBlock( - "p", - { - key: 0, - class: normalizeClass(unref(ns).be("panel", "footer")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var TransferPanel = _export_sfc(_sfc_main134, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]); - -// node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs -var useComputedData = (props2) => { - const propsAlias = usePropsAlias(props2); - const dataObj = computed( - () => props2.data.reduce((o2, cur) => (o2[cur[propsAlias.value.key]] = cur) && o2, {}) - ); - const sourceData = computed( - () => props2.data.filter( - (item) => !props2.modelValue.includes(item[propsAlias.value.key]) - ) - ); - const targetData = computed(() => { - if (props2.targetOrder === "original") { - return props2.data.filter( - (item) => props2.modelValue.includes(item[propsAlias.value.key]) - ); - } else { - return props2.modelValue.reduce( - (arr, cur) => { - const val = dataObj.value[cur]; - if (val) { - arr.push(val); - } - return arr; - }, - [] - ); - } - }); - return { - sourceData, - targetData - }; -}; - -// node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs -var useMove = (props2, checkedState, emit) => { - const propsAlias = usePropsAlias(props2); - const _emit = (value, direction2, movedKeys) => { - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value, direction2, movedKeys); - }; - const addToLeft = () => { - const currentValue = props2.modelValue.slice(); - checkedState.rightChecked.forEach((item) => { - const index = currentValue.indexOf(item); - if (index > -1) { - currentValue.splice(index, 1); - } - }); - _emit(currentValue, "left", checkedState.rightChecked); - }; - const addToRight = () => { - let currentValue = props2.modelValue.slice(); - const itemsToBeMoved = props2.data.filter((item) => { - const itemKey = item[propsAlias.value.key]; - return checkedState.leftChecked.includes(itemKey) && !props2.modelValue.includes(itemKey); - }).map((item) => item[propsAlias.value.key]); - currentValue = props2.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved); - if (props2.targetOrder === "original") { - currentValue = props2.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]); - } - _emit(currentValue, "right", checkedState.leftChecked); - }; - return { - addToLeft, - addToRight - }; -}; - -// node_modules/element-plus/es/components/transfer/src/composables/use-checked-change.mjs -var useCheckedChange = (checkedState, emit) => { - const onSourceCheckedChange = (val, movedKeys) => { - checkedState.leftChecked = val; - if (!movedKeys) - return; - emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys); - }; - const onTargetCheckedChange = (val, movedKeys) => { - checkedState.rightChecked = val; - if (!movedKeys) - return; - emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys); - }; - return { - onSourceCheckedChange, - onTargetCheckedChange - }; -}; - -// node_modules/element-plus/es/components/transfer/src/transfer2.mjs -var _hoisted_170 = { key: 0 }; -var _hoisted_238 = { key: 0 }; -var _sfc_main135 = defineComponent({ - ...{ - name: "ElTransfer" - }, - __name: "transfer", - props: transferProps, - emits: transferEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const slots = useSlots(); - const { t } = useLocale(); - const ns = useNamespace("transfer"); - const { formItem } = useFormItem(); - const checkedState = reactive({ - leftChecked: [], - rightChecked: [] - }); - const propsAlias = usePropsAlias(props2); - const { sourceData, targetData } = useComputedData(props2); - const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange( - checkedState, - emit - ); - const { addToLeft, addToRight } = useMove(props2, checkedState, emit); - const leftPanel = ref(); - const rightPanel = ref(); - const clearQuery = (which) => { - switch (which) { - case "left": - leftPanel.value.query = ""; - break; - case "right": - rightPanel.value.query = ""; - break; - } - }; - const hasButtonTexts = computed(() => props2.buttonTexts.length === 2); - const leftPanelTitle = computed( - () => props2.titles[0] || t("el.transfer.titles.0") - ); - const rightPanelTitle = computed( - () => props2.titles[1] || t("el.transfer.titles.1") - ); - const panelFilterPlaceholder = computed( - () => props2.filterPlaceholder || t("el.transfer.filterPlaceholder") - ); - watch( - () => props2.modelValue, - () => { - var _a; - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err)); - } - } - ); - const optionRender = computed(() => (option) => { - var _a; - if (props2.renderContent) - return props2.renderContent(h, option); - const defaultSlotVNodes = (((_a = slots.default) == null ? void 0 : _a.call(slots, { option })) || []).filter( - (node) => node.type !== Comment - ); - if (defaultSlotVNodes.length) { - return defaultSlotVNodes; - } - return h( - "span", - option[propsAlias.value.label] || option[propsAlias.value.key] - ); - }); - __expose({ - clearQuery, - leftPanel, - rightPanel - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).b()) - }, - [ - createVNode(TransferPanel, { - ref_key: "leftPanel", - ref: leftPanel, - data: unref(sourceData), - "option-render": optionRender.value, - placeholder: panelFilterPlaceholder.value, - title: leftPanelTitle.value, - filterable: _ctx.filterable, - format: _ctx.format, - "filter-method": _ctx.filterMethod, - "default-checked": _ctx.leftDefaultChecked, - props: props2.props, - onCheckedChange: unref(onSourceCheckedChange) - }, { - empty: withCtx(() => [ - renderSlot(_ctx.$slots, "left-empty") - ]), - default: withCtx(() => [ - renderSlot(_ctx.$slots, "left-footer") - ]), - _: 3 - }, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "onCheckedChange"]), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("buttons")) - }, - [ - createVNode(unref(ElButton), { - type: "primary", - class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]), - disabled: unref(isEmpty2)(checkedState.rightChecked), - onClick: unref(addToLeft) - }, { - default: withCtx(() => [ - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_left_default)) - ]), - _: 1 - }), - !unref(isUndefined2)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock( - "span", - _hoisted_170, - toDisplayString(_ctx.buttonTexts[0]), - 1 - )) : createCommentVNode("v-if", true) - ]), - _: 1 - }, 8, ["class", "disabled", "onClick"]), - createVNode(unref(ElButton), { - type: "primary", - class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]), - disabled: unref(isEmpty2)(checkedState.leftChecked), - onClick: unref(addToRight) - }, { - default: withCtx(() => [ - !unref(isUndefined2)(_ctx.buttonTexts[1]) ? (openBlock(), createElementBlock( - "span", - _hoisted_238, - toDisplayString(_ctx.buttonTexts[1]), - 1 - )) : createCommentVNode("v-if", true), - createVNode(unref(ElIcon), null, { - default: withCtx(() => [ - createVNode(unref(arrow_right_default)) - ]), - _: 1 - }) - ]), - _: 1 - }, 8, ["class", "disabled", "onClick"]) - ], - 2 - ), - createVNode(TransferPanel, { - ref_key: "rightPanel", - ref: rightPanel, - data: unref(targetData), - "option-render": optionRender.value, - placeholder: panelFilterPlaceholder.value, - filterable: _ctx.filterable, - format: _ctx.format, - "filter-method": _ctx.filterMethod, - title: rightPanelTitle.value, - "default-checked": _ctx.rightDefaultChecked, - props: props2.props, - onCheckedChange: unref(onTargetCheckedChange) - }, { - empty: withCtx(() => [ - renderSlot(_ctx.$slots, "right-empty") - ]), - default: withCtx(() => [ - renderSlot(_ctx.$slots, "right-footer") - ]), - _: 3 - }, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "onCheckedChange"]) - ], - 2 - ); - }; - } -}); -var Transfer = _export_sfc(_sfc_main135, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]); - -// node_modules/element-plus/es/components/transfer/index.mjs -var ElTransfer = withInstall(Transfer); - -// node_modules/element-plus/es/components/tree/src/model/util.mjs -var NODE_KEY = "$treeNodeId"; -var markNodeData = function(node, data) { - if (!data || data[NODE_KEY]) - return; - Object.defineProperty(data, NODE_KEY, { - value: node.id, - enumerable: false, - configurable: false, - writable: false - }); -}; -var getNodeKey = (key, data) => data == null ? void 0 : data[key || NODE_KEY]; -var handleCurrentChange = (store, emit, setCurrent) => { - const preCurrentNode = store.value.currentNode; - setCurrent(); - const currentNode = store.value.currentNode; - if (preCurrentNode === currentNode) - return; - emit("current-change", currentNode ? currentNode.data : null, currentNode); -}; - -// node_modules/element-plus/es/components/tree/src/model/node.mjs -var getChildState = (node) => { - let all = true; - let none = true; - let allWithoutDisable = true; - let isEffectivelyChecked = true; - for (let i = 0, j = node.length; i < j; i++) { - const n = node[i]; - if (n.checked !== true || n.indeterminate) { - all = false; - if (!n.disabled) { - allWithoutDisable = false; - } - } - if (n.checked !== false || n.indeterminate) { - none = false; - } - if (!n.isEffectivelyChecked) { - isEffectivelyChecked = false; - } - } - return { - all, - none, - allWithoutDisable, - half: !all && !none, - isEffectivelyChecked - }; -}; -var reInitChecked = function(node) { - if (node.childNodes.length === 0 || node.loading) { - node.isEffectivelyChecked = node.disabled || node.checked; - return; - } - const { all, none, half, isEffectivelyChecked } = getChildState( - node.childNodes - ); - node.isEffectivelyChecked = isEffectivelyChecked; - if (all) { - node.checked = true; - node.indeterminate = false; - } else if (half) { - node.checked = false; - node.indeterminate = true; - } else if (none) { - node.checked = false; - node.indeterminate = false; - } - const parent2 = node.parent; - if (!parent2 || parent2.level === 0) - return; - if (!node.store.checkStrictly) { - reInitChecked(parent2); - } -}; -var getPropertyFromData = function(node, prop) { - const props2 = node.store.props; - const data = node.data || {}; - const config = props2[prop]; - if (isFunction(config)) { - return config(data, node); - } else if (isString(config)) { - return data[config]; - } else if (isUndefined2(config)) { - const dataProp = data[prop]; - return isUndefined2(dataProp) ? "" : dataProp; - } -}; -var setCanFocus = function(childNodes, focus) { - childNodes.forEach((item) => { - item.canFocus = focus; - setCanFocus(item.childNodes, focus); - }); -}; -var nodeIdSeed = 0; -var Node3 = class _Node { - constructor(options) { - this.isLeafByUser = void 0; - this.isLeaf = void 0; - this.isEffectivelyChecked = false; - this.id = nodeIdSeed++; - this.text = null; - this.checked = false; - this.indeterminate = false; - this.data = null; - this.expanded = false; - this.parent = null; - this.visible = true; - this.isCurrent = false; - this.canFocus = false; - for (const name in options) { - if (hasOwn(options, name)) { - this[name] = options[name]; - } - } - this.level = 0; - this.loaded = false; - this.childNodes = []; - this.loading = false; - if (this.parent) { - this.level = this.parent.level + 1; - } - } - initialize() { - var _a; - const store = this.store; - if (!store) { - throw new Error("[Node]store is required!"); - } - store.registerNode(this); - const props2 = store.props; - if (props2 && typeof props2.isLeaf !== "undefined") { - const isLeaf2 = getPropertyFromData(this, "isLeaf"); - if (isBoolean2(isLeaf2)) { - this.isLeafByUser = isLeaf2; - } - } - if (store.lazy !== true && this.data) { - this.setData(this.data); - if (store.defaultExpandAll) { - this.expanded = true; - this.canFocus = true; - } - } else if (this.level > 0 && store.lazy && store.defaultExpandAll && !this.isLeafByUser) { - this.expand(); - } - if (!isArray(this.data)) { - markNodeData(this, this.data); - } - if (!this.data) - return; - const defaultExpandedKeys = store.defaultExpandedKeys; - const key = store.key; - if (key && !isNil_default(this.key) && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) { - this.expand(null, store.autoExpandParent); - } - if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) { - store.currentNode && (store.currentNode.isCurrent = false); - store.currentNode = this; - store.currentNode.isCurrent = true; - } - if (store.lazy) { - store._initDefaultCheckedNode(this); - } - this.updateLeafState(); - if (this.level === 1 || ((_a = this.parent) == null ? void 0 : _a.expanded) === true) - this.canFocus = true; - } - setData(data) { - if (!isArray(data)) { - markNodeData(this, data); - } - this.data = data; - this.childNodes = []; - let children; - if (this.level === 0 && isArray(this.data)) { - children = this.data; - } else { - children = getPropertyFromData(this, "children") || []; - } - for (let i = 0, j = children.length; i < j; i++) { - this.insertChild({ data: children[i] }); - } - } - get label() { - return getPropertyFromData(this, "label"); - } - get key() { - const nodeKey = this.store.key; - if (this.data) - return this.data[nodeKey]; - return null; - } - get disabled() { - return getPropertyFromData(this, "disabled"); - } - get nextSibling() { - const parent2 = this.parent; - if (parent2) { - const index = parent2.childNodes.indexOf(this); - if (index > -1) { - return parent2.childNodes[index + 1]; - } - } - return null; - } - get previousSibling() { - const parent2 = this.parent; - if (parent2) { - const index = parent2.childNodes.indexOf(this); - if (index > -1) { - return index > 0 ? parent2.childNodes[index - 1] : null; - } - } - return null; - } - contains(target2, deep = true) { - return (this.childNodes || []).some( - (child) => child === target2 || deep && child.contains(target2) - ); - } - remove() { - const parent2 = this.parent; - if (parent2) { - parent2.removeChild(this); - } - } - insertChild(child, index, batch) { - if (!child) - throw new Error("InsertChild error: child is required."); - if (!(child instanceof _Node)) { - if (!batch) { - const children = this.getChildren(true); - if (!(children == null ? void 0 : children.includes(child.data))) { - if (isUndefined2(index) || index < 0) { - children == null ? void 0 : children.push(child.data); - } else { - children == null ? void 0 : children.splice(index, 0, child.data); - } - } - } - Object.assign(child, { - parent: this, - store: this.store - }); - child = reactive(new _Node(child)); - if (child instanceof _Node) { - child.initialize(); - } - } - child.level = this.level + 1; - if (isUndefined2(index) || index < 0) { - this.childNodes.push(child); - } else { - this.childNodes.splice(index, 0, child); - } - this.updateLeafState(); - } - insertBefore(child, ref2) { - let index; - if (ref2) { - index = this.childNodes.indexOf(ref2); - } - this.insertChild(child, index); - } - insertAfter(child, ref2) { - let index; - if (ref2) { - index = this.childNodes.indexOf(ref2); - if (index !== -1) - index += 1; - } - this.insertChild(child, index); - } - removeChild(child) { - const children = this.getChildren() || []; - const dataIndex = children.indexOf(child.data); - if (dataIndex > -1) { - children.splice(dataIndex, 1); - } - const index = this.childNodes.indexOf(child); - if (index > -1) { - this.store && this.store.deregisterNode(child); - child.parent = null; - this.childNodes.splice(index, 1); - } - this.updateLeafState(); - } - removeChildByData(data) { - const targetNode = this.childNodes.find((child) => child.data === data); - if (targetNode) { - this.removeChild(targetNode); - } - } - expand(callback, expandParent) { - const done = () => { - if (expandParent) { - let parent2 = this.parent; - while (parent2 && parent2.level > 0) { - parent2.expanded = true; - parent2 = parent2.parent; - } - } - this.expanded = true; - if (callback) - callback(); - setCanFocus(this.childNodes, true); - }; - if (this.shouldLoadData()) { - this.loadData((data) => { - if (isArray(data)) { - if (this.checked) { - this.setChecked(true, true); - } else if (!this.store.checkStrictly) { - reInitChecked(this); - } - done(); - } - }); - } else { - done(); - } - } - doCreateChildren(array4, defaultProps6 = {}) { - array4.forEach((item) => { - this.insertChild( - Object.assign({ data: item }, defaultProps6), - void 0, - true - ); - }); - } - collapse() { - this.expanded = false; - setCanFocus(this.childNodes, false); - } - shouldLoadData() { - return Boolean(this.store.lazy === true && this.store.load && !this.loaded); - } - updateLeafState() { - if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") { - this.isLeaf = this.isLeafByUser; - this.isEffectivelyChecked = this.isLeaf && this.disabled; - return; - } - const childNodes = this.childNodes; - if (!this.store.lazy || this.store.lazy === true && this.loaded === true) { - this.isLeaf = !childNodes || childNodes.length === 0; - this.isEffectivelyChecked = this.isLeaf && this.disabled; - return; - } - this.isLeaf = false; - } - setChecked(value, deep, recursion, passValue) { - this.indeterminate = value === "half"; - this.checked = value === true; - this.isEffectivelyChecked = !this.childNodes.length && (this.disabled || this.checked); - if (this.store.checkStrictly) - return; - if (!(this.shouldLoadData() && !this.store.checkDescendants)) { - const handleDescendants = () => { - if (deep) { - const childNodes = this.childNodes; - for (let i = 0, j = childNodes.length; i < j; i++) { - const child = childNodes[i]; - passValue = passValue || value !== false; - const isCheck = child.disabled && child.isLeaf ? child.checked : passValue; - child.setChecked(isCheck, deep, true, passValue); - } - const { half, all, isEffectivelyChecked } = getChildState(childNodes); - if (!all) { - this.checked = all; - this.indeterminate = half; - } - this.isEffectivelyChecked = !this.childNodes.length ? this.disabled || this.checked : isEffectivelyChecked; - } - }; - if (this.shouldLoadData()) { - this.loadData( - () => { - handleDescendants(); - reInitChecked(this); - }, - { - checked: value !== false - } - ); - return; - } else { - handleDescendants(); - } - } - const parent2 = this.parent; - if (!parent2 || parent2.level === 0) - return; - if (!recursion) { - reInitChecked(parent2); - } - } - getChildren(forceInit = false) { - if (this.level === 0) - return this.data; - const data = this.data; - if (!data) - return null; - const props2 = this.store.props; - let children = "children"; - if (props2) { - children = props2.children || "children"; - } - if (isUndefined2(data[children])) { - data[children] = null; - } - if (forceInit && !data[children]) { - data[children] = []; - } - return data[children]; - } - updateChildren() { - const newData = this.getChildren() || []; - const oldData = this.childNodes.map((node) => node.data); - const newDataMap = {}; - const newNodes = []; - newData.forEach((item, index) => { - const key = item[NODE_KEY]; - const isNodeExists = !!key && oldData.some((data) => (data == null ? void 0 : data[NODE_KEY]) === key); - if (isNodeExists) { - newDataMap[key] = { index, data: item }; - } else { - newNodes.push({ index, data: item }); - } - }); - if (!this.store.lazy) { - oldData.forEach((item) => { - if (!newDataMap[item == null ? void 0 : item[NODE_KEY]]) - this.removeChildByData(item); - }); - } - newNodes.forEach(({ index, data }) => { - this.insertChild({ data }, index); - }); - this.updateLeafState(); - } - loadData(callback, defaultProps6 = {}) { - if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps6).length)) { - this.loading = true; - const resolve = (children) => { - this.childNodes = []; - this.doCreateChildren(children, defaultProps6); - this.loaded = true; - this.loading = false; - this.updateLeafState(); - if (callback) { - callback.call(this, children); - } - }; - const reject2 = () => { - this.loading = false; - }; - this.store.load(this, resolve, reject2); - } else { - if (callback) { - callback.call(this); - } - } - } - eachNode(callback) { - const arr = [this]; - while (arr.length) { - const node = arr.shift(); - arr.unshift(...node.childNodes); - callback(node); - } - } - reInitChecked() { - if (this.store.checkStrictly) - return; - reInitChecked(this); - } -}; - -// node_modules/element-plus/es/components/tree/src/model/tree-store.mjs -var TreeStore = class { - constructor(options) { - this.lazy = false; - this.checkStrictly = false; - this.autoExpandParent = false; - this.defaultExpandAll = false; - this.checkDescendants = false; - this.currentNode = null; - this.currentNodeKey = null; - for (const option in options) { - if (hasOwn(options, option)) { - this[option] = options[option]; - } - } - this.nodesMap = {}; - } - initialize() { - this.root = new Node3({ - data: this.data, - store: this - }); - this.root.initialize(); - if (this.lazy && this.load) { - const loadFn = this.load; - loadFn( - this.root, - (data) => { - this.root.doCreateChildren(data); - this._initDefaultCheckedNodes(); - }, - NOOP - ); - } else { - this._initDefaultCheckedNodes(); - } - } - filter(value) { - const filterNodeMethod = this.filterNodeMethod; - const lazy = this.lazy; - const traverse = async function(node) { - const childNodes = node.root ? node.root.childNodes : node.childNodes; - for (const [index, child] of childNodes.entries()) { - child.visible = !!(filterNodeMethod == null ? void 0 : filterNodeMethod.call( - child, - value, - child.data, - child - )); - if (index % 80 === 0 && index > 0) { - await nextTick(); - } - await traverse(child); - } - if (!node.visible && childNodes.length) { - let allHidden = true; - allHidden = !childNodes.some((child) => child.visible); - if (node.root) { - node.root.visible = allHidden === false; - } else { - node.visible = allHidden === false; - } - } - if (!value) - return; - if (node.visible && !node.isLeaf) { - if (!lazy || node.loaded) { - node.expand(); - } - } - }; - traverse(this); - } - setData(newVal) { - const instanceChanged = newVal !== this.root.data; - if (instanceChanged) { - this.nodesMap = {}; - this.root.setData(newVal); - this._initDefaultCheckedNodes(); - this.setCurrentNodeKey(this.currentNodeKey); - } else { - this.root.updateChildren(); - } - } - getNode(data) { - if (data instanceof Node3) - return data; - const key = isObject(data) ? getNodeKey(this.key, data) : data; - return this.nodesMap[key] || null; - } - insertBefore(data, refData) { - var _a; - const refNode = this.getNode(refData); - (_a = refNode.parent) == null ? void 0 : _a.insertBefore({ data }, refNode); - } - insertAfter(data, refData) { - var _a; - const refNode = this.getNode(refData); - (_a = refNode.parent) == null ? void 0 : _a.insertAfter({ data }, refNode); - } - remove(data) { - const node = this.getNode(data); - if (node && node.parent) { - if (node === this.currentNode) { - this.currentNode = null; - } - node.parent.removeChild(node); - } - } - append(data, parentData) { - const parentNode = !isPropAbsent(parentData) ? this.getNode(parentData) : this.root; - if (parentNode) { - parentNode.insertChild({ data }); - } - } - _initDefaultCheckedNodes() { - const defaultCheckedKeys = this.defaultCheckedKeys || []; - const nodesMap = this.nodesMap; - defaultCheckedKeys.forEach((checkedKey) => { - const node = nodesMap[checkedKey]; - if (node) { - node.setChecked(true, !this.checkStrictly); - } - }); - } - _initDefaultCheckedNode(node) { - const defaultCheckedKeys = this.defaultCheckedKeys || []; - if (!isNil_default(node.key) && defaultCheckedKeys.includes(node.key)) { - node.setChecked(true, !this.checkStrictly); - } - } - setDefaultCheckedKey(newVal) { - if (newVal !== this.defaultCheckedKeys) { - this.defaultCheckedKeys = newVal; - this._initDefaultCheckedNodes(); - } - } - registerNode(node) { - const key = this.key; - if (!node || !node.data) - return; - if (!key) { - this.nodesMap[node.id] = node; - } else { - const nodeKey = node.key; - if (!isNil_default(nodeKey)) - this.nodesMap[nodeKey] = node; - } - } - deregisterNode(node) { - const key = this.key; - if (!key || !node || !node.data) - return; - node.childNodes.forEach((child) => { - this.deregisterNode(child); - }); - delete this.nodesMap[node.key]; - } - getCheckedNodes(leafOnly = false, includeHalfChecked = false) { - const checkedNodes = []; - const traverse = function(node) { - const childNodes = node.root ? node.root.childNodes : node.childNodes; - childNodes.forEach((child) => { - if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) { - checkedNodes.push(child.data); - } - traverse(child); - }); - }; - traverse(this); - return checkedNodes; - } - getCheckedKeys(leafOnly = false) { - return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]); - } - getHalfCheckedNodes() { - const nodes = []; - const traverse = function(node) { - const childNodes = node.root ? node.root.childNodes : node.childNodes; - childNodes.forEach((child) => { - if (child.indeterminate) { - nodes.push(child.data); - } - traverse(child); - }); - }; - traverse(this); - return nodes; - } - getHalfCheckedKeys() { - return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]); - } - _getAllNodes() { - const allNodes = []; - const nodesMap = this.nodesMap; - for (const nodeKey in nodesMap) { - if (hasOwn(nodesMap, nodeKey)) { - allNodes.push(nodesMap[nodeKey]); - } - } - return allNodes; - } - updateChildren(key, data) { - const node = this.nodesMap[key]; - if (!node) - return; - const childNodes = node.childNodes; - for (let i = childNodes.length - 1; i >= 0; i--) { - const child = childNodes[i]; - this.remove(child.data); - } - for (let i = 0, j = data.length; i < j; i++) { - const child = data[i]; - this.append(child, node.data); - } - } - _setCheckedKeys(key, leafOnly = false, checkedKeys) { - const allNodes = this._getAllNodes().sort((a2, b2) => a2.level - b2.level); - const cache2 = /* @__PURE__ */ Object.create(null); - const keys3 = Object.keys(checkedKeys); - allNodes.forEach((node) => node.setChecked(false, false)); - const cacheCheckedChild = (node) => { - node.childNodes.forEach((child) => { - var _a; - cache2[child.data[key]] = true; - if ((_a = child.childNodes) == null ? void 0 : _a.length) { - cacheCheckedChild(child); - } - }); - }; - for (let i = 0, j = allNodes.length; i < j; i++) { - const node = allNodes[i]; - const nodeKey = node.data[key].toString(); - const checked = keys3.includes(nodeKey); - if (!checked) { - if (node.checked && !cache2[nodeKey]) { - node.setChecked(false, false); - } - continue; - } - if (node.childNodes.length) { - cacheCheckedChild(node); - } - if (node.isLeaf || this.checkStrictly) { - node.setChecked(true, false); - continue; - } - node.setChecked(true, true); - if (leafOnly) { - node.setChecked(false, false); - const traverse = function(node2) { - const childNodes = node2.childNodes; - childNodes.forEach((child) => { - if (!child.isLeaf) { - child.setChecked(false, false); - } - traverse(child); - }); - }; - traverse(node); - } - } - } - setCheckedNodes(array4, leafOnly = false) { - const key = this.key; - const checkedKeys = {}; - array4.forEach((item) => { - checkedKeys[(item || {})[key]] = true; - }); - this._setCheckedKeys(key, leafOnly, checkedKeys); - } - setCheckedKeys(keys3, leafOnly = false) { - this.defaultCheckedKeys = keys3; - const key = this.key; - const checkedKeys = {}; - keys3.forEach((key2) => { - checkedKeys[key2] = true; - }); - this._setCheckedKeys(key, leafOnly, checkedKeys); - } - setDefaultExpandedKeys(keys3) { - keys3 = keys3 || []; - this.defaultExpandedKeys = keys3; - keys3.forEach((key) => { - const node = this.getNode(key); - if (node) - node.expand(null, this.autoExpandParent); - }); - } - setChecked(data, checked, deep) { - const node = this.getNode(data); - if (node) { - node.setChecked(!!checked, deep); - } - } - getCurrentNode() { - return this.currentNode; - } - setCurrentNode(currentNode) { - const prevCurrentNode = this.currentNode; - if (prevCurrentNode) { - prevCurrentNode.isCurrent = false; - } - this.currentNode = currentNode; - this.currentNode.isCurrent = true; - } - setUserCurrentNode(node, shouldAutoExpandParent = true) { - var _a; - const key = node[this.key]; - const currNode = this.nodesMap[key]; - this.setCurrentNode(currNode); - if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) { - (_a = this.currentNode.parent) == null ? void 0 : _a.expand(null, true); - } - } - setCurrentNodeKey(key, shouldAutoExpandParent = true) { - var _a; - this.currentNodeKey = key; - if (isPropAbsent(key)) { - this.currentNode && (this.currentNode.isCurrent = false); - this.currentNode = null; - return; - } - const node = this.getNode(key); - if (node) { - this.setCurrentNode(node); - if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) { - (_a = this.currentNode.parent) == null ? void 0 : _a.expand(null, true); - } - } - } -}; - -// node_modules/element-plus/es/components/tree/src/tokens.mjs -var ROOT_TREE_INJECTION_KEY = "RootTree"; -var NODE_INSTANCE_INJECTION_KEY = "NodeInstance"; -var TREE_NODE_MAP_INJECTION_KEY = "TreeNodeMap"; - -// node_modules/element-plus/es/components/tree/src/tree-node-content.mjs -var _sfc_main136 = defineComponent({ - name: "ElTreeNodeContent", - props: { - node: { - type: Object, - required: true - }, - renderContent: Function - }, - setup(props2) { - const ns = useNamespace("tree"); - const nodeInstance = inject( - NODE_INSTANCE_INJECTION_KEY - ); - const tree = inject(ROOT_TREE_INJECTION_KEY); - return () => { - const node = props2.node; - const { data, store } = node; - return props2.renderContent ? props2.renderContent(h, { _self: nodeInstance, node, data, store }) : renderSlot(tree.ctx.slots, "default", { node, data }, () => [ - h( - ElText, - { tag: "span", truncated: true, class: ns.be("node", "label") }, - () => [node.label] - ) - ]); - }; - } -}); -var NodeContent2 = _export_sfc(_sfc_main136, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]); - -// node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs -function useNodeExpandEventBroadcast(props2) { - const parentNodeMap = inject( - TREE_NODE_MAP_INJECTION_KEY, - null - ); - let currentNodeMap = { - treeNodeExpand: (node) => { - var _a; - if (props2.node !== node) { - (_a = props2.node) == null ? void 0 : _a.collapse(); - } - }, - children: /* @__PURE__ */ new Set() - }; - if (parentNodeMap) { - parentNodeMap.children.add(currentNodeMap); - } - onBeforeUnmount(() => { - if (parentNodeMap) { - parentNodeMap.children.delete(currentNodeMap); - } - currentNodeMap = null; - }); - provide(TREE_NODE_MAP_INJECTION_KEY, currentNodeMap); - return { - broadcastExpanded: (node) => { - if (!props2.accordion) - return; - for (const childNode of currentNodeMap.children) { - childNode.treeNodeExpand(node); - } - } - }; -} - -// node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs -var dragEventsKey = Symbol("dragEvents"); -function useDragNodeHandler({ - props: props2, - ctx, - el$, - dropIndicator$, - store -}) { - const ns = useNamespace("tree"); - const dragState = ref({ - showDropIndicator: false, - draggingNode: null, - dropNode: null, - allowDrop: true, - dropType: null - }); - const treeNodeDragStart = ({ event, treeNode }) => { - if (!event.dataTransfer) - return; - if (isFunction(props2.allowDrag) && !props2.allowDrag(treeNode.node)) { - event.preventDefault(); - return false; - } - event.dataTransfer.effectAllowed = "move"; - try { - event.dataTransfer.setData("text/plain", ""); - } catch (e) { - } - dragState.value.draggingNode = treeNode; - ctx.emit("node-drag-start", treeNode.node, event); - }; - const treeNodeDragOver = ({ event, treeNode }) => { - if (!event.dataTransfer) - return; - const dropNode = treeNode; - const oldDropNode = dragState.value.dropNode; - if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) { - removeClass(oldDropNode.$el, ns.is("drop-inner")); - } - const draggingNode = dragState.value.draggingNode; - if (!draggingNode || !dropNode) - return; - let dropPrev = true; - let dropInner = true; - let dropNext = true; - let userAllowDropInner = true; - if (isFunction(props2.allowDrop)) { - dropPrev = props2.allowDrop(draggingNode.node, dropNode.node, "prev"); - userAllowDropInner = dropInner = props2.allowDrop( - draggingNode.node, - dropNode.node, - "inner" - ); - dropNext = props2.allowDrop(draggingNode.node, dropNode.node, "next"); - } - event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none"; - if ((dropPrev || dropInner || dropNext) && (oldDropNode == null ? void 0 : oldDropNode.node.id) !== dropNode.node.id) { - if (oldDropNode) { - ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event); - } - ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event); - } - if (dropPrev || dropInner || dropNext) { - dragState.value.dropNode = dropNode; - } else { - dragState.value.dropNode = null; - } - if (dropNode.node.nextSibling === draggingNode.node) { - dropNext = false; - } - if (dropNode.node.previousSibling === draggingNode.node) { - dropPrev = false; - } - if (dropNode.node.contains(draggingNode.node, false)) { - dropInner = false; - } - if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) { - dropPrev = false; - dropInner = false; - dropNext = false; - } - const dropEl = dropNode.$el; - const targetPosition = dropEl.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect(); - const treePosition = el$.value.getBoundingClientRect(); - const treeScrollTop = el$.value.scrollTop; - let dropType; - const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : Number.NEGATIVE_INFINITY; - const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : Number.POSITIVE_INFINITY; - let indicatorTop = -9999; - const distance = event.clientY - targetPosition.top; - if (distance < targetPosition.height * prevPercent) { - dropType = "before"; - } else if (distance > targetPosition.height * nextPercent) { - dropType = "after"; - } else if (dropInner) { - dropType = "inner"; - } else { - dropType = "none"; - } - const iconPosition = dropEl.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect(); - const dropIndicator = dropIndicator$.value; - if (dropType === "before") { - indicatorTop = iconPosition.top - treePosition.top + treeScrollTop; - } else if (dropType === "after") { - indicatorTop = iconPosition.bottom - treePosition.top + treeScrollTop; - } - dropIndicator.style.top = `${indicatorTop}px`; - dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`; - if (dropType === "inner") { - addClass(dropEl, ns.is("drop-inner")); - } else { - removeClass(dropEl, ns.is("drop-inner")); - } - dragState.value.showDropIndicator = dropType === "before" || dropType === "after"; - dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner; - dragState.value.dropType = dropType; - ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event); - }; - const treeNodeDragEnd = (event) => { - var _a, _b; - const { draggingNode, dropType, dropNode } = dragState.value; - event.preventDefault(); - if (event.dataTransfer) { - event.dataTransfer.dropEffect = "move"; - } - if ((draggingNode == null ? void 0 : draggingNode.node.data) && dropNode) { - const draggingNodeCopy = { data: draggingNode.node.data }; - if (dropType !== "none") { - draggingNode.node.remove(); - } - if (dropType === "before") { - (_a = dropNode.node.parent) == null ? void 0 : _a.insertBefore(draggingNodeCopy, dropNode.node); - } else if (dropType === "after") { - (_b = dropNode.node.parent) == null ? void 0 : _b.insertAfter(draggingNodeCopy, dropNode.node); - } else if (dropType === "inner") { - dropNode.node.insertChild(draggingNodeCopy); - } - if (dropType !== "none") { - store.value.registerNode(draggingNodeCopy); - if (store.value.key) { - draggingNode.node.eachNode((node) => { - var _a2; - (_a2 = store.value.nodesMap[node.data[store.value.key]]) == null ? void 0 : _a2.setChecked( - node.checked, - !store.value.checkStrictly - ); - }); - } - } - removeClass(dropNode.$el, ns.is("drop-inner")); - ctx.emit( - "node-drag-end", - draggingNode.node, - dropNode.node, - dropType, - event - ); - if (dropType !== "none") { - ctx.emit( - "node-drop", - draggingNode.node, - dropNode.node, - dropType, - event - ); - } - } - if (draggingNode && !dropNode) { - ctx.emit("node-drag-end", draggingNode.node, null, dropType, event); - } - dragState.value.showDropIndicator = false; - dragState.value.draggingNode = null; - dragState.value.dropNode = null; - dragState.value.allowDrop = true; - }; - provide(dragEventsKey, { - treeNodeDragStart, - treeNodeDragOver, - treeNodeDragEnd - }); - return { - dragState - }; -} - -// node_modules/element-plus/es/components/tree/src/tree-node.mjs -var _sfc_main137 = defineComponent({ - name: "ElTreeNode", - components: { - ElCollapseTransition, - ElCheckbox, - NodeContent: NodeContent2, - ElIcon, - Loading: loading_default - }, - props: { - node: { - type: Node3, - default: () => ({}) - }, - props: { - type: Object, - default: () => ({}) - }, - accordion: Boolean, - renderContent: Function, - renderAfterExpand: Boolean, - showCheckbox: Boolean - }, - emits: ["node-expand"], - setup(props2, ctx) { - const ns = useNamespace("tree"); - const { broadcastExpanded } = useNodeExpandEventBroadcast(props2); - const tree = inject(ROOT_TREE_INJECTION_KEY); - const expanded = ref(false); - const childNodeRendered = ref(false); - const oldChecked = ref(); - const oldIndeterminate = ref(); - const node$ = ref(); - const dragEvents = inject(dragEventsKey); - const instance = getCurrentInstance(); - provide(NODE_INSTANCE_INJECTION_KEY, instance); - if (!tree) { - debugWarn("Tree", "Can not find node's tree."); - } - if (props2.node.expanded) { - expanded.value = true; - childNodeRendered.value = true; - } - const childrenKey = tree.props.props["children"] || "children"; - watch( - () => { - var _a; - const children = (_a = props2.node.data) == null ? void 0 : _a[childrenKey]; - return children && [...children]; - }, - () => { - props2.node.updateChildren(); - } - ); - watch( - () => props2.node.indeterminate, - (val) => { - handleSelectChange(props2.node.checked, val); - } - ); - watch( - () => props2.node.checked, - (val) => { - handleSelectChange(val, props2.node.indeterminate); - } - ); - watch( - () => props2.node.childNodes.length, - () => props2.node.reInitChecked() - ); - watch( - () => props2.node.expanded, - (val) => { - nextTick(() => expanded.value = val); - if (val) { - childNodeRendered.value = true; - } - } - ); - const getNodeKey$1 = (node) => { - return getNodeKey(tree.props.nodeKey, node.data); - }; - const getNodeClass = (node) => { - const nodeClassFunc = props2.props.class; - if (!nodeClassFunc) { - return {}; - } - let className; - if (isFunction(nodeClassFunc)) { - const { data } = node; - className = nodeClassFunc(data, node); - } else { - className = nodeClassFunc; - } - if (isString(className)) { - return { [className]: true }; - } else { - return className; - } - }; - const handleSelectChange = (checked, indeterminate) => { - if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) { - tree.ctx.emit("check-change", props2.node.data, checked, indeterminate); - } - oldChecked.value = checked; - oldIndeterminate.value = indeterminate; - }; - const handleClick = (e) => { - handleCurrentChange(tree.store, tree.ctx.emit, () => { - var _a; - const nodeKeyProp = (_a = tree == null ? void 0 : tree.props) == null ? void 0 : _a.nodeKey; - if (nodeKeyProp) { - const curNodeKey = getNodeKey$1(props2.node); - tree.store.value.setCurrentNodeKey(curNodeKey); - } else { - tree.store.value.setCurrentNode(props2.node); - } - }); - tree.currentNode.value = props2.node; - if (tree.props.expandOnClickNode) { - handleExpandIconClick(); - } - if ((tree.props.checkOnClickNode || props2.node.isLeaf && tree.props.checkOnClickLeaf && props2.showCheckbox) && !props2.node.disabled) { - handleCheckChange(!props2.node.checked); - } - tree.ctx.emit("node-click", props2.node.data, props2.node, instance, e); - }; - const handleContextMenu = (event) => { - var _a; - if ((_a = tree.instance.vnode.props) == null ? void 0 : _a["onNodeContextmenu"]) { - event.stopPropagation(); - event.preventDefault(); - } - tree.ctx.emit( - "node-contextmenu", - event, - props2.node.data, - props2.node, - instance - ); - }; - const handleExpandIconClick = () => { - if (props2.node.isLeaf) - return; - if (expanded.value) { - tree.ctx.emit("node-collapse", props2.node.data, props2.node, instance); - props2.node.collapse(); - } else { - props2.node.expand(() => { - ctx.emit("node-expand", props2.node.data, props2.node, instance); - }); - } - }; - const handleCheckChange = (value) => { - const checkStrictly = tree == null ? void 0 : tree.props.checkStrictly; - const childNodes = props2.node.childNodes; - if (!checkStrictly && childNodes.length) { - value = childNodes.some((node) => !node.isEffectivelyChecked); - } - props2.node.setChecked(value, !checkStrictly); - nextTick(() => { - const store = tree.store.value; - tree.ctx.emit("check", props2.node.data, { - checkedNodes: store.getCheckedNodes(), - checkedKeys: store.getCheckedKeys(), - halfCheckedNodes: store.getHalfCheckedNodes(), - halfCheckedKeys: store.getHalfCheckedKeys() - }); - }); - }; - const handleChildNodeExpand = (nodeData, node, instance2) => { - broadcastExpanded(node); - tree.ctx.emit("node-expand", nodeData, node, instance2); - }; - const handleDragStart = (event) => { - if (!tree.props.draggable) - return; - dragEvents.treeNodeDragStart({ event, treeNode: props2 }); - }; - const handleDragOver = (event) => { - event.preventDefault(); - if (!tree.props.draggable) - return; - dragEvents.treeNodeDragOver({ - event, - treeNode: { $el: node$.value, node: props2.node } - }); - }; - const handleDrop = (event) => { - event.preventDefault(); - }; - const handleDragEnd = (event) => { - if (!tree.props.draggable) - return; - dragEvents.treeNodeDragEnd(event); - }; - return { - ns, - node$, - tree, - expanded, - childNodeRendered, - oldChecked, - oldIndeterminate, - getNodeKey: getNodeKey$1, - getNodeClass, - handleSelectChange, - handleClick, - handleContextMenu, - handleExpandIconClick, - handleCheckChange, - handleChildNodeExpand, - handleDragStart, - handleDragOver, - handleDrop, - handleDragEnd, - CaretRight: caret_right_default - }; - } -}); -var _hoisted_171 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"]; -var _hoisted_239 = ["aria-expanded"]; -function _sfc_render20(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_icon = resolveComponent("el-icon"); - const _component_el_checkbox = resolveComponent("el-checkbox"); - const _component_loading = resolveComponent("loading"); - const _component_node_content = resolveComponent("node-content"); - const _component_el_tree_node = resolveComponent("el-tree-node"); - const _component_el_collapse_transition = resolveComponent("el-collapse-transition"); - return withDirectives((openBlock(), createElementBlock("div", { - ref: "node$", - class: normalizeClass([ - _ctx.ns.b("node"), - _ctx.ns.is("expanded", _ctx.expanded), - _ctx.ns.is("current", _ctx.node.isCurrent), - _ctx.ns.is("hidden", !_ctx.node.visible), - _ctx.ns.is("focusable", !_ctx.node.disabled), - _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked), - _ctx.getNodeClass(_ctx.node) - ]), - role: "treeitem", - tabindex: "-1", - "aria-expanded": _ctx.expanded, - "aria-disabled": _ctx.node.disabled, - "aria-checked": _ctx.node.checked, - draggable: _ctx.tree.props.draggable, - "data-key": _ctx.getNodeKey(_ctx.node), - onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])), - onContextmenu: _cache[3] || (_cache[3] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)), - onDragstart: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])), - onDragover: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])), - onDragend: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])), - onDrop: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"])) - }, [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.be("node", "content")), - style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" }) - }, - [ - _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, { - key: 0, - class: normalizeClass([ - _ctx.ns.be("node", "expand-icon"), - _ctx.ns.is("leaf", _ctx.node.isLeaf), - { - expanded: !_ctx.node.isLeaf && _ctx.expanded - } - ]), - onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight))) - ]), - _: 1 - }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), - _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, { - key: 1, - "model-value": _ctx.node.checked, - indeterminate: _ctx.node.indeterminate, - disabled: !!_ctx.node.disabled, - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])), - onChange: _ctx.handleCheckChange - }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : createCommentVNode("v-if", true), - _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, { - key: 2, - class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")]) - }, { - default: withCtx(() => [ - createVNode(_component_loading) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - createVNode(_component_node_content, { - node: _ctx.node, - "render-content": _ctx.renderContent - }, null, 8, ["node", "render-content"]) - ], - 6 - ), - createVNode(_component_el_collapse_transition, null, { - default: withCtx(() => [ - !_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", { - key: 0, - class: normalizeClass(_ctx.ns.be("node", "children")), - role: "group", - "aria-expanded": _ctx.expanded, - onClick: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["stop"])) - }, [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.node.childNodes, (child) => { - return openBlock(), createBlock(_component_el_tree_node, { - key: _ctx.getNodeKey(child), - "render-content": _ctx.renderContent, - "render-after-expand": _ctx.renderAfterExpand, - "show-checkbox": _ctx.showCheckbox, - node: child, - accordion: _ctx.accordion, - props: _ctx.props, - onNodeExpand: _ctx.handleChildNodeExpand - }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]); - }), - 128 - )) - ], 10, _hoisted_239)), [ - [vShow, _ctx.expanded] - ]) : createCommentVNode("v-if", true) - ]), - _: 1 - }) - ], 42, _hoisted_171)), [ - [vShow, _ctx.node.visible] - ]); -} -var ElTreeNode = _export_sfc(_sfc_main137, [["render", _sfc_render20], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]); - -// node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs -function useKeydown({ el$ }, store) { - const ns = useNamespace("tree"); - onMounted(() => { - initTabIndex(); - }); - onUpdated(() => { - var _a; - (_a = el$.value) == null ? void 0 : _a.querySelectorAll("input[type=checkbox]").forEach((checkbox) => { - checkbox.setAttribute("tabindex", "-1"); - }); - }); - function canNodeFocus(treeItems, nextIndex) { - var _a, _b; - const currentNode = store.value.getNode(treeItems[nextIndex].dataset.key); - return currentNode.canFocus && currentNode.visible && (((_a = currentNode.parent) == null ? void 0 : _a.expanded) || ((_b = currentNode.parent) == null ? void 0 : _b.level) === 0); - } - const handleKeydown = (ev) => { - const currentItem = ev.target; - if (!currentItem.className.includes(ns.b("node"))) - return; - const code = getEventCode(ev); - const treeItems = Array.from( - el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`) - ); - const currentIndex = treeItems.indexOf(currentItem); - let nextIndex; - if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) { - ev.preventDefault(); - if (code === EVENT_CODE.up) { - nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.length - 1; - const startIndex = nextIndex; - while (true) { - if (canNodeFocus(treeItems, nextIndex)) { - break; - } - nextIndex--; - if (nextIndex === startIndex) { - nextIndex = -1; - break; - } - if (nextIndex < 0) { - nextIndex = treeItems.length - 1; - } - } - } else { - nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.length - 1 ? currentIndex + 1 : 0; - const startIndex = nextIndex; - while (true) { - if (canNodeFocus(treeItems, nextIndex)) { - break; - } - nextIndex++; - if (nextIndex === startIndex) { - nextIndex = -1; - break; - } - if (nextIndex >= treeItems.length) { - nextIndex = 0; - } - } - } - nextIndex !== -1 && treeItems[nextIndex].focus(); - } - if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) { - ev.preventDefault(); - currentItem.click(); - } - const hasInput = currentItem.querySelector( - '[type="checkbox"]' - ); - if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space].includes( - code - ) && hasInput) { - ev.preventDefault(); - hasInput.click(); - } - }; - useEventListener(el$, "keydown", handleKeydown); - const initTabIndex = () => { - var _a; - if (!el$.value) - return; - const treeItems = Array.from( - el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`) - ); - const checkboxItems = Array.from( - el$.value.querySelectorAll("input[type=checkbox]") - ); - checkboxItems.forEach((checkbox) => { - checkbox.setAttribute("tabindex", "-1"); - }); - const checkedItem = el$.value.querySelectorAll( - `.${ns.is("checked")}[role=treeitem]` - ); - if (checkedItem.length) { - checkedItem[0].setAttribute("tabindex", "0"); - return; - } - (_a = treeItems[0]) == null ? void 0 : _a.setAttribute("tabindex", "0"); - }; -} - -// node_modules/element-plus/es/components/tree/src/tree.mjs -var treeProps = buildProps({ - data: { - type: definePropType(Array), - default: () => [] - }, - emptyText: { - type: String - }, - renderAfterExpand: { - type: Boolean, - default: true - }, - nodeKey: String, - checkStrictly: Boolean, - defaultExpandAll: Boolean, - expandOnClickNode: { - type: Boolean, - default: true - }, - checkOnClickNode: Boolean, - checkOnClickLeaf: { - type: Boolean, - default: true - }, - checkDescendants: Boolean, - autoExpandParent: { - type: Boolean, - default: true - }, - defaultCheckedKeys: { - type: Array - }, - defaultExpandedKeys: { - type: Array - }, - currentNodeKey: { - type: [String, Number] - }, - renderContent: { - type: definePropType(Function) - }, - showCheckbox: Boolean, - draggable: Boolean, - allowDrag: { - type: definePropType(Function) - }, - allowDrop: { - type: definePropType(Function) - }, - props: { - type: Object, - default: () => ({ - children: "children", - label: "label", - disabled: "disabled" - }) - }, - lazy: Boolean, - highlightCurrent: Boolean, - load: { - type: Function - }, - filterNodeMethod: { - type: Function - }, - accordion: Boolean, - indent: { - type: Number, - default: 18 - }, - icon: { - type: iconPropType - } -}); -var treeEmits = { - "check-change": (data, checked, indeterminate) => data && isBoolean2(checked) && isBoolean2(indeterminate), - "current-change": (data, node) => true, - "node-click": (data, node, nodeInstance, evt) => data && node && evt instanceof Event, - "node-contextmenu": (evt, data, node, nodeInstance) => evt instanceof Event && data && node, - "node-collapse": (data, node, nodeInstance) => data && node, - "node-expand": (data, node, nodeInstance) => data && node, - check: (data, checkedInfo) => data && checkedInfo, - "node-drag-start": (node, evt) => node && evt, - "node-drag-end": (draggingNode, dropNode, dropType, evt) => draggingNode && evt, - "node-drop": (draggingNode, dropNode, dropType, evt) => draggingNode && dropNode && evt, - "node-drag-leave": (draggingNode, oldDropNode, evt) => draggingNode && oldDropNode && evt, - "node-drag-enter": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt, - "node-drag-over": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt -}; - -// node_modules/element-plus/es/components/tree/src/tree2.mjs -var _sfc_main138 = defineComponent({ - name: "ElTree", - components: { ElTreeNode }, - props: treeProps, - emits: treeEmits, - setup(props2, ctx) { - const { t } = useLocale(); - const ns = useNamespace("tree"); - const store = ref( - new TreeStore({ - key: props2.nodeKey, - data: props2.data, - lazy: props2.lazy, - props: props2.props, - load: props2.load, - currentNodeKey: props2.currentNodeKey, - checkStrictly: props2.checkStrictly, - checkDescendants: props2.checkDescendants, - defaultCheckedKeys: props2.defaultCheckedKeys, - defaultExpandedKeys: props2.defaultExpandedKeys, - autoExpandParent: props2.autoExpandParent, - defaultExpandAll: props2.defaultExpandAll, - filterNodeMethod: props2.filterNodeMethod - }) - ); - store.value.initialize(); - const root2 = ref(store.value.root); - const currentNode = ref(null); - const el$ = ref(null); - const dropIndicator$ = ref(null); - const { broadcastExpanded } = useNodeExpandEventBroadcast(props2); - const { dragState } = useDragNodeHandler({ - props: props2, - ctx, - el$, - dropIndicator$, - store - }); - useKeydown({ el$ }, store); - const instance = getCurrentInstance(); - const isSelectTree = computed(() => { - let parent2 = instance == null ? void 0 : instance.parent; - while (parent2) { - if (parent2.type.name === "ElTreeSelect") { - return true; - } - parent2 = parent2.parent; - } - return false; - }); - const isEmpty3 = computed(() => { - const { childNodes } = root2.value; - return (!childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible)) && !isSelectTree.value; - }); - watch( - () => props2.currentNodeKey, - (newVal) => { - store.value.setCurrentNodeKey(newVal != null ? newVal : null); - } - ); - watch( - () => props2.defaultCheckedKeys, - (newVal, oldVal) => { - if (isEqual_default(newVal, oldVal)) - return; - store.value.setDefaultCheckedKey(newVal != null ? newVal : []); - } - ); - watch( - () => props2.defaultExpandedKeys, - (newVal) => { - store.value.setDefaultExpandedKeys(newVal != null ? newVal : []); - } - ); - watch( - () => props2.data, - (newVal) => { - store.value.setData(newVal); - }, - { deep: true } - ); - watch( - () => props2.checkStrictly, - (newVal) => { - store.value.checkStrictly = newVal; - } - ); - const filter2 = (value) => { - if (!props2.filterNodeMethod) - throw new Error("[Tree] filterNodeMethod is required when filter"); - store.value.filter(value); - }; - const getNodeKey$1 = (node) => { - return getNodeKey(props2.nodeKey, node.data); - }; - const requireNodeKey = (methodName) => { - if (!props2.nodeKey) { - throw new Error(`[Tree] nodeKey is required in ${methodName}`); - } - }; - const getNodePath = (data) => { - requireNodeKey("getNodePath"); - const node = store.value.getNode(data); - if (!node) - return []; - const path = [node.data]; - let parent2 = node.parent; - while (parent2 && parent2 !== root2.value) { - path.push(parent2.data); - parent2 = parent2.parent; - } - return path.reverse(); - }; - const getCheckedNodes = (leafOnly, includeHalfChecked) => { - return store.value.getCheckedNodes(leafOnly, includeHalfChecked); - }; - const getCheckedKeys = (leafOnly) => { - return store.value.getCheckedKeys(leafOnly); - }; - const getCurrentNode = () => { - const currentNode2 = store.value.getCurrentNode(); - return currentNode2 ? currentNode2.data : null; - }; - const getCurrentKey = () => { - requireNodeKey("getCurrentKey"); - const currentNode2 = getCurrentNode(); - return currentNode2 ? currentNode2[props2.nodeKey] : null; - }; - const setCheckedNodes = (nodes, leafOnly) => { - requireNodeKey("setCheckedNodes"); - store.value.setCheckedNodes(nodes, leafOnly); - }; - const setCheckedKeys = (keys3, leafOnly) => { - requireNodeKey("setCheckedKeys"); - store.value.setCheckedKeys(keys3, leafOnly); - }; - const setChecked = (data, checked, deep) => { - store.value.setChecked(data, checked, deep); - }; - const getHalfCheckedNodes = () => { - return store.value.getHalfCheckedNodes(); - }; - const getHalfCheckedKeys = () => { - return store.value.getHalfCheckedKeys(); - }; - const setCurrentNode = (node, shouldAutoExpandParent = true) => { - requireNodeKey("setCurrentNode"); - handleCurrentChange(store, ctx.emit, () => { - broadcastExpanded(node); - store.value.setUserCurrentNode(node, shouldAutoExpandParent); - }); - }; - const setCurrentKey = (key = null, shouldAutoExpandParent = true) => { - requireNodeKey("setCurrentKey"); - handleCurrentChange(store, ctx.emit, () => { - broadcastExpanded(); - store.value.setCurrentNodeKey(key, shouldAutoExpandParent); - }); - }; - const getNode = (data) => { - return store.value.getNode(data); - }; - const remove2 = (data) => { - store.value.remove(data); - }; - const append = (data, parentNode) => { - store.value.append(data, parentNode); - }; - const insertBefore = (data, refNode) => { - store.value.insertBefore(data, refNode); - }; - const insertAfter = (data, refNode) => { - store.value.insertAfter(data, refNode); - }; - const handleNodeExpand = (nodeData, node, instance2) => { - broadcastExpanded(node); - ctx.emit("node-expand", nodeData, node, instance2); - }; - const updateKeyChildren = (key, data) => { - requireNodeKey("updateKeyChild"); - store.value.updateChildren(key, data); - }; - provide(ROOT_TREE_INJECTION_KEY, { - ctx, - props: props2, - store, - root: root2, - currentNode, - instance - }); - provide(formItemContextKey, void 0); - return { - ns, - store, - root: root2, - currentNode, - dragState, - el$, - dropIndicator$, - isEmpty: isEmpty3, - filter: filter2, - getNodeKey: getNodeKey$1, - getNodePath, - getCheckedNodes, - getCheckedKeys, - getCurrentNode, - getCurrentKey, - setCheckedNodes, - setCheckedKeys, - setChecked, - getHalfCheckedNodes, - getHalfCheckedKeys, - setCurrentNode, - setCurrentKey, - t, - getNode, - remove: remove2, - append, - insertBefore, - insertAfter, - handleNodeExpand, - updateKeyChildren - }; - } -}); -function _sfc_render21(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_tree_node = resolveComponent("el-tree-node"); - return openBlock(), createElementBlock( - "div", - { - ref: "el$", - class: normalizeClass([ - _ctx.ns.b(), - _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode), - _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop), - _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"), - { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent } - ]), - role: "tree" - }, - [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.root.childNodes, (child) => { - return openBlock(), createBlock(_component_el_tree_node, { - key: _ctx.getNodeKey(child), - node: child, - props: _ctx.props, - accordion: _ctx.accordion, - "render-after-expand": _ctx.renderAfterExpand, - "show-checkbox": _ctx.showCheckbox, - "render-content": _ctx.renderContent, - onNodeExpand: _ctx.handleNodeExpand - }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]); - }), - 128 - )), - _ctx.isEmpty ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(_ctx.ns.e("empty-block")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => { - var _a; - return [ - createBaseVNode( - "span", - { - class: normalizeClass(_ctx.ns.e("empty-text")) - }, - toDisplayString((_a = _ctx.emptyText) != null ? _a : _ctx.t("el.tree.emptyText")), - 3 - ) - ]; - }) - ], - 2 - )) : createCommentVNode("v-if", true), - withDirectives(createBaseVNode( - "div", - { - ref: "dropIndicator$", - class: normalizeClass(_ctx.ns.e("drop-indicator")) - }, - null, - 2 - ), [ - [vShow, _ctx.dragState.showDropIndicator] - ]) - ], - 2 - ); -} -var Tree = _export_sfc(_sfc_main138, [["render", _sfc_render21], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]); - -// node_modules/element-plus/es/components/tree/index.mjs -var ElTree = withInstall(Tree); - -// node_modules/element-plus/es/components/tree-select/src/select.mjs -var useSelect3 = (props2, { attrs, emit }, { - select, - tree, - key -}) => { - const ns = useNamespace("tree-select"); - watch( - () => props2.data, - () => { - if (props2.filterable) { - nextTick(() => { - var _a, _b; - (_b = tree.value) == null ? void 0 : _b.filter((_a = select.value) == null ? void 0 : _a.states.inputValue); - }); - } - }, - { flush: "post" } - ); - const focusLastNode = (listNode) => { - var _a; - const lastNode = listNode.at(-1); - if (lastNode.expanded && lastNode.childNodes.at(-1)) { - focusLastNode([lastNode.childNodes.at(-1)]); - } else { - const el = (_a = tree.value.el$) == null ? void 0 : _a.querySelector( - `[data-key="${listNode.at(-1).key}"]` - ); - el == null ? void 0 : el.focus({ preventScroll: true }); - return; - } - }; - onMounted(() => { - useEventListener( - () => { - var _a; - return (_a = select.value) == null ? void 0 : _a.$el; - }, - "keydown", - async (evt) => { - const code = getEventCode(evt); - const { dropdownMenuVisible } = select.value; - if ([EVENT_CODE.down, EVENT_CODE.up].includes(code) && dropdownMenuVisible) { - await nextTick(); - setTimeout(() => { - var _a, _b, _c; - if (EVENT_CODE.up === code) { - const listNode = tree.value.store.root.childNodes; - focusLastNode(listNode); - return; - } - (_c = (_b = (_a = select.value.optionsArray[select.value.states.hoveringIndex].$el) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.parentNode) == null ? void 0 : _c.focus({ preventScroll: true }); - }); - } - }, - { - capture: true - } - ); - }); - const result2 = { - ...pick_default(toRefs(props2), Object.keys(ElSelect.props)), - ...attrs, - class: computed(() => attrs.class), - style: computed(() => attrs.style), - "onUpdate:modelValue": (value) => emit(UPDATE_MODEL_EVENT, value), - valueKey: key, - popperClass: computed(() => { - const classes = [ns.e("popper")]; - if (props2.popperClass) - classes.push(props2.popperClass); - return classes.join(" "); - }), - filterMethod: (keyword = "") => { - var _a; - if (props2.filterMethod) { - props2.filterMethod(keyword); - } else if (props2.remoteMethod) { - props2.remoteMethod(keyword); - } else { - (_a = tree.value) == null ? void 0 : _a.filter(keyword); - } - } - }; - return result2; -}; - -// node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs -var component = defineComponent({ - extends: ElOption, - setup(props2, ctx) { - const result2 = ElOption.setup(props2, ctx); - delete result2.selectOptionClick; - const vm = getCurrentInstance().proxy; - nextTick(() => { - if (!result2.select.states.cachedOptions.get(vm.value)) { - result2.select.onOptionCreate(vm); - } - }); - watch( - () => ctx.attrs.visible, - (val) => { - nextTick(() => { - result2.states.visible = val; - }); - }, - { - immediate: true - } - ); - return result2; - }, - methods: { - selectOptionClick() { - this.$el.parentElement.click(); - } - } -}); - -// node_modules/element-plus/es/components/tree-select/src/utils.mjs -function isValidValue2(val) { - return val || val === 0; -} -function isValidArray(val) { - return isArray(val) && val.length; -} -function toValidArray(val) { - return isArray(val) ? val : isValidValue2(val) ? [val] : []; -} -function treeFind(treeData, findCallback, getChildren, resultCallback, parent2) { - for (let i = 0; i < treeData.length; i++) { - const data = treeData[i]; - if (findCallback(data, i, treeData, parent2)) { - return resultCallback ? resultCallback(data, i, treeData, parent2) : data; - } else { - const children = getChildren(data); - if (isValidArray(children)) { - const find2 = treeFind( - children, - findCallback, - getChildren, - resultCallback, - data - ); - if (find2) - return find2; - } - } - } -} -function treeEach(treeData, callback, getChildren, parent2) { - for (let i = 0; i < treeData.length; i++) { - const data = treeData[i]; - callback(data, i, treeData, parent2); - const children = getChildren(data); - if (isValidArray(children)) { - treeEach(children, callback, getChildren, data); - } - } -} - -// node_modules/element-plus/es/components/tree-select/src/tree.mjs -var useTree2 = (props2, { attrs, slots, emit }, { - select, - tree, - key -}) => { - watch( - [() => props2.modelValue, tree], - () => { - if (props2.showCheckbox) { - nextTick(() => { - const treeInstance = tree.value; - if (treeInstance && !isEqual_default( - treeInstance.getCheckedKeys(), - toValidArray(props2.modelValue) - )) { - treeInstance.setCheckedKeys(toValidArray(props2.modelValue)); - } - }); - } - }, - { - immediate: true, - deep: true - } - ); - const propsMap = computed(() => ({ - value: key.value, - label: "label", - children: "children", - disabled: "disabled", - isLeaf: "isLeaf", - ...props2.props - })); - const getNodeValByProp = (prop, data) => { - var _a; - const propVal = propsMap.value[prop]; - if (isFunction(propVal)) { - return propVal( - data, - (_a = tree.value) == null ? void 0 : _a.getNode(getNodeValByProp("value", data)) - ); - } else { - return data[propVal]; - } - }; - const defaultExpandedParentKeys = toValidArray(props2.modelValue).map((value) => { - return treeFind( - props2.data || [], - (data) => getNodeValByProp("value", data) === value, - (data) => getNodeValByProp("children", data), - (data, index, array4, parent2) => parent2 && getNodeValByProp("value", parent2) - ); - }).filter((item) => isValidValue2(item)); - const cacheOptions = computed(() => { - if (!props2.renderAfterExpand && !props2.lazy) - return []; - const options = []; - treeEach( - props2.data.concat(props2.cacheData), - (node) => { - const value = getNodeValByProp("value", node); - options.push({ - value, - currentLabel: getNodeValByProp("label", node), - isDisabled: getNodeValByProp("disabled", node) - }); - }, - (data) => getNodeValByProp("children", data) - ); - return options; - }); - const getChildCheckedKeys = () => { - var _a; - return (_a = tree.value) == null ? void 0 : _a.getCheckedKeys().filter((checkedKey) => { - var _a2; - const node = (_a2 = tree.value) == null ? void 0 : _a2.getNode(checkedKey); - return !isNil_default(node) && isEmpty2(node.childNodes); - }); - }; - return { - ...pick_default(toRefs(props2), Object.keys(ElTree.props)), - ...attrs, - nodeKey: key, - expandOnClickNode: computed(() => { - return !props2.checkStrictly && props2.expandOnClickNode; - }), - defaultExpandedKeys: computed(() => { - return props2.defaultExpandedKeys ? props2.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys; - }), - renderContent: (h3, { node, data, store }) => { - return h3( - component, - { - value: getNodeValByProp("value", data), - label: getNodeValByProp("label", data), - disabled: getNodeValByProp("disabled", data), - visible: node.visible - }, - props2.renderContent ? () => props2.renderContent(h3, { node, data, store }) : slots.default ? () => slots.default({ node, data, store }) : void 0 - ); - }, - filterNodeMethod: (value, data, node) => { - if (props2.filterNodeMethod) - return props2.filterNodeMethod(value, data, node); - if (!value) - return true; - const regexp4 = new RegExp(escapeStringRegexp(value), "i"); - return regexp4.test(getNodeValByProp("label", data) || ""); - }, - onNodeClick: (data, node, e) => { - var _a, _b, _c; - (_a = attrs.onNodeClick) == null ? void 0 : _a.call(attrs, data, node, e); - if (props2.showCheckbox && props2.checkOnClickNode) - return; - if (!props2.showCheckbox && (props2.checkStrictly || node.isLeaf)) { - if (!getNodeValByProp("disabled", data)) { - const option = (_b = select.value) == null ? void 0 : _b.states.options.get( - getNodeValByProp("value", data) - ); - (_c = select.value) == null ? void 0 : _c.handleOptionSelect(option); - } - } else if (props2.expandOnClickNode) { - e.proxy.handleExpandIconClick(); - } - }, - onCheck: (data, params) => { - var _a; - if (!props2.showCheckbox) - return; - const dataValue = getNodeValByProp("value", data); - const dataMap = {}; - treeEach( - [tree.value.store.root], - (node) => dataMap[node.key] = node, - (node) => node.childNodes - ); - const uncachedCheckedKeys = params.checkedKeys; - const cachedKeys = props2.multiple ? toValidArray(props2.modelValue).filter( - (item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item) - ) : []; - const checkedKeys = cachedKeys.concat(uncachedCheckedKeys); - if (props2.checkStrictly) { - emit( - UPDATE_MODEL_EVENT, - props2.multiple ? checkedKeys : checkedKeys.includes(dataValue) ? dataValue : void 0 - ); - } else { - if (props2.multiple) { - const childKeys = getChildCheckedKeys(); - emit(UPDATE_MODEL_EVENT, cachedKeys.concat(childKeys)); - } else { - const firstLeaf = treeFind( - [data], - (data2) => !isValidArray(getNodeValByProp("children", data2)) && !getNodeValByProp("disabled", data2), - (data2) => getNodeValByProp("children", data2) - ); - const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0; - const hasCheckedChild = isValidValue2(props2.modelValue) && !!treeFind( - [data], - (data2) => getNodeValByProp("value", data2) === props2.modelValue, - (data2) => getNodeValByProp("children", data2) - ); - emit( - UPDATE_MODEL_EVENT, - firstLeafKey === props2.modelValue || hasCheckedChild ? void 0 : firstLeafKey - ); - } - } - nextTick(() => { - var _a2; - const checkedKeys2 = toValidArray(props2.modelValue); - tree.value.setCheckedKeys(checkedKeys2); - (_a2 = attrs.onCheck) == null ? void 0 : _a2.call(attrs, data, { - checkedKeys: tree.value.getCheckedKeys(), - checkedNodes: tree.value.getCheckedNodes(), - halfCheckedKeys: tree.value.getHalfCheckedKeys(), - halfCheckedNodes: tree.value.getHalfCheckedNodes() - }); - }); - (_a = select.value) == null ? void 0 : _a.focus(); - }, - onNodeExpand: (data, node, e) => { - var _a; - (_a = attrs.onNodeExpand) == null ? void 0 : _a.call(attrs, data, node, e); - nextTick(() => { - if (!props2.checkStrictly && props2.lazy && props2.multiple && node.checked) { - const dataMap = {}; - const uncachedCheckedKeys = tree.value.getCheckedKeys(); - treeEach( - [tree.value.store.root], - (node2) => dataMap[node2.key] = node2, - (node2) => node2.childNodes - ); - const cachedKeys = toValidArray(props2.modelValue).filter( - (item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item) - ); - const childKeys = getChildCheckedKeys(); - emit(UPDATE_MODEL_EVENT, cachedKeys.concat(childKeys)); - } - }); - }, - cacheOptions - }; -}; - -// node_modules/element-plus/es/components/tree-select/src/cache-options.mjs -var CacheOptions = defineComponent({ - props: { - data: { - type: Array, - default: () => [] - } - }, - setup(props2) { - const select = inject(selectKey); - watch( - () => props2.data, - () => { - var _a; - props2.data.forEach((item) => { - if (!select.states.cachedOptions.has(item.value)) { - select.states.cachedOptions.set(item.value, item); - } - }); - const inputs = ((_a = select.selectRef) == null ? void 0 : _a.querySelectorAll("input")) || []; - if (isClient && !Array.from(inputs).includes( - document.activeElement - )) { - select.setSelected(); - } - }, - { flush: "post", immediate: true } - ); - return () => void 0; - } -}); - -// node_modules/element-plus/es/components/tree-select/src/tree-select.mjs -var _sfc_main139 = defineComponent({ - name: "ElTreeSelect", - inheritAttrs: false, - props: { - ...selectProps, - ...treeProps, - cacheData: { - type: Array, - default: () => [] - } - }, - setup(props2, context) { - const { slots, expose } = context; - const select = ref(); - const tree = ref(); - const key = computed(() => props2.nodeKey || props2.valueKey || "value"); - const selectProps2 = useSelect3(props2, context, { select, tree, key }); - const { cacheOptions, ...treeProps22 } = useTree2(props2, context, { - select, - tree, - key - }); - const methods = reactive({}); - expose(methods); - onMounted(() => { - Object.assign(methods, { - ...pick_default(tree.value, [ - "filter", - "updateKeyChildren", - "getCheckedNodes", - "setCheckedNodes", - "getCheckedKeys", - "setCheckedKeys", - "setChecked", - "getHalfCheckedNodes", - "getHalfCheckedKeys", - "getCurrentKey", - "getCurrentNode", - "setCurrentKey", - "setCurrentNode", - "getNode", - "remove", - "append", - "insertBefore", - "insertAfter" - ]), - ...pick_default(select.value, ["focus", "blur", "selectedLabel"]), - treeRef: tree.value, - selectRef: select.value - }); - }); - return () => h( - ElSelect, - reactive({ - ...selectProps2, - ref: (ref2) => select.value = ref2 - }), - { - ...slots, - default: () => [ - h(CacheOptions, { data: cacheOptions.value }), - h( - ElTree, - reactive({ - ...treeProps22, - ref: (ref2) => tree.value = ref2 - }) - ) - ] - } - ); - } -}); -var TreeSelect = _export_sfc(_sfc_main139, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]); - -// node_modules/element-plus/es/components/tree-select/index.mjs -var ElTreeSelect = withInstall(TreeSelect); - -// node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs -var ROOT_TREE_INJECTION_KEY2 = Symbol(); -var EMPTY_NODE = { - key: -1, - level: -1, - data: {} -}; -var TreeOptionsEnum = ((TreeOptionsEnum2) => { - TreeOptionsEnum2["KEY"] = "id"; - TreeOptionsEnum2["LABEL"] = "label"; - TreeOptionsEnum2["CHILDREN"] = "children"; - TreeOptionsEnum2["DISABLED"] = "disabled"; - TreeOptionsEnum2["CLASS"] = ""; - return TreeOptionsEnum2; -})(TreeOptionsEnum || {}); -var SetOperationEnum = ((SetOperationEnum2) => { - SetOperationEnum2["ADD"] = "add"; - SetOperationEnum2["DELETE"] = "delete"; - return SetOperationEnum2; -})(SetOperationEnum || {}); -var itemSize2 = { - type: Number, - default: 26 -}; -var treeProps2 = buildProps({ - data: { - type: definePropType(Array), - default: () => mutable([]) - }, - emptyText: { - type: String - }, - height: { - type: Number, - default: 200 - }, - props: { - type: definePropType(Object), - default: () => mutable({ - children: "children", - label: "label", - disabled: "disabled", - value: "id", - class: "" - /* CLASS */ - }) - }, - highlightCurrent: Boolean, - showCheckbox: Boolean, - defaultCheckedKeys: { - type: definePropType(Array), - default: () => mutable([]) - }, - checkStrictly: Boolean, - defaultExpandedKeys: { - type: definePropType(Array), - default: () => mutable([]) - }, - indent: { - type: Number, - default: 16 - }, - itemSize: itemSize2, - icon: { - type: iconPropType - }, - expandOnClickNode: { - type: Boolean, - default: true - }, - checkOnClickNode: Boolean, - checkOnClickLeaf: { - type: Boolean, - default: true - }, - currentNodeKey: { - type: definePropType([String, Number]) - }, - accordion: Boolean, - filterMethod: { - type: definePropType(Function) - }, - perfMode: { - type: Boolean, - default: true - }, - scrollbarAlwaysOn: Boolean -}); -var treeNodeProps = buildProps({ - node: { - type: definePropType(Object), - default: () => mutable(EMPTY_NODE) - }, - expanded: Boolean, - checked: Boolean, - indeterminate: Boolean, - showCheckbox: Boolean, - disabled: Boolean, - current: Boolean, - hiddenExpandIcon: Boolean, - itemSize: itemSize2 -}); -var treeNodeContentProps = buildProps({ - node: { - type: definePropType(Object), - required: true - } -}); -var NODE_CLICK = "node-click"; -var NODE_DROP = "node-drop"; -var NODE_EXPAND = "node-expand"; -var NODE_COLLAPSE = "node-collapse"; -var CURRENT_CHANGE = "current-change"; -var NODE_CHECK = "check"; -var NODE_CHECK_CHANGE = "check-change"; -var NODE_CONTEXTMENU = "node-contextmenu"; -var treeEmits2 = { - [NODE_CLICK]: (data, node, e) => data && node && e, - [NODE_DROP]: (data, node, e) => data && node && e, - [NODE_EXPAND]: (data, node) => data && node, - [NODE_COLLAPSE]: (data, node) => data && node, - [CURRENT_CHANGE]: (data, node) => data && node, - [NODE_CHECK]: (data, checkedInfo) => data && checkedInfo, - [NODE_CHECK_CHANGE]: (data, checked) => data && isBoolean2(checked), - [NODE_CONTEXTMENU]: (evt, data, node) => evt && data && node -}; -var treeNodeEmits = { - click: (node, e) => !!(node && e), - drop: (node, e) => !!(node && e), - toggle: (node) => !!node, - check: (node, checked) => node && isBoolean2(checked) -}; - -// node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs -function useCheck2(props2, tree) { - const checkedKeys = ref(/* @__PURE__ */ new Set()); - const indeterminateKeys = ref(/* @__PURE__ */ new Set()); - const { emit } = getCurrentInstance(); - watch( - [() => tree.value, () => props2.defaultCheckedKeys], - () => { - return nextTick(() => { - _setCheckedKeys(props2.defaultCheckedKeys); - }); - }, - { - immediate: true - } - ); - const updateCheckedKeys = () => { - if (!tree.value || !props2.showCheckbox || props2.checkStrictly) { - return; - } - const { levelTreeNodeMap, maxLevel } = tree.value; - const checkedKeySet = checkedKeys.value; - const indeterminateKeySet = /* @__PURE__ */ new Set(); - for (let level = maxLevel; level >= 1; --level) { - const nodes = levelTreeNodeMap.get(level); - if (!nodes) - continue; - nodes.forEach((node) => { - const children = node.children; - let isEffectivelyChecked = !node.isLeaf || node.disabled || checkedKeySet.has(node.key); - if (children) { - let allChecked = true; - let hasChecked = false; - for (const childNode of children) { - const key = childNode.key; - if (!childNode.isEffectivelyChecked) { - isEffectivelyChecked = false; - } - if (checkedKeySet.has(key)) { - hasChecked = true; - } else if (indeterminateKeySet.has(key)) { - allChecked = false; - hasChecked = true; - break; - } else { - allChecked = false; - } - } - if (allChecked) { - checkedKeySet.add(node.key); - } else if (hasChecked) { - indeterminateKeySet.add(node.key); - checkedKeySet.delete(node.key); - } else { - checkedKeySet.delete(node.key); - indeterminateKeySet.delete(node.key); - } - } - node.isEffectivelyChecked = isEffectivelyChecked; - }); - } - indeterminateKeys.value = indeterminateKeySet; - }; - const isChecked = (node) => checkedKeys.value.has(node.key); - const isIndeterminate = (node) => indeterminateKeys.value.has(node.key); - const toggleCheckbox = (node, isChecked2, nodeClick = true, immediateUpdate = true) => { - const checkedKeySet = checkedKeys.value; - const children = node.children; - if (!props2.checkStrictly && nodeClick && (children == null ? void 0 : children.length)) { - isChecked2 = children.some((node2) => !node2.isEffectivelyChecked); - } - const toggle = (node2, checked) => { - checkedKeySet[checked ? SetOperationEnum.ADD : SetOperationEnum.DELETE]( - node2.key - ); - const children2 = node2.children; - if (!props2.checkStrictly && children2) { - children2.forEach((childNode) => { - if (!childNode.disabled || childNode.children) { - toggle(childNode, checked); - } - }); - } - }; - toggle(node, isChecked2); - if (immediateUpdate) { - updateCheckedKeys(); - } - if (nodeClick) { - afterNodeCheck(node, isChecked2); - } - }; - const afterNodeCheck = (node, checked) => { - const { checkedNodes, checkedKeys: checkedKeys2 } = getChecked(); - const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked(); - emit(NODE_CHECK, node.data, { - checkedKeys: checkedKeys2, - checkedNodes, - halfCheckedKeys, - halfCheckedNodes - }); - emit(NODE_CHECK_CHANGE, node.data, checked); - }; - function getCheckedKeys(leafOnly = false) { - return getChecked(leafOnly).checkedKeys; - } - function getCheckedNodes(leafOnly = false) { - return getChecked(leafOnly).checkedNodes; - } - function getHalfCheckedKeys() { - return getHalfChecked().halfCheckedKeys; - } - function getHalfCheckedNodes() { - return getHalfChecked().halfCheckedNodes; - } - function getChecked(leafOnly = false) { - const checkedNodes = []; - const keys3 = []; - if ((tree == null ? void 0 : tree.value) && props2.showCheckbox) { - const { treeNodeMap } = tree.value; - checkedKeys.value.forEach((key) => { - const node = treeNodeMap.get(key); - if (node && (!leafOnly || leafOnly && node.isLeaf)) { - keys3.push(key); - checkedNodes.push(node.data); - } - }); - } - return { - checkedKeys: keys3, - checkedNodes - }; - } - function getHalfChecked() { - const halfCheckedNodes = []; - const halfCheckedKeys = []; - if ((tree == null ? void 0 : tree.value) && props2.showCheckbox) { - const { treeNodeMap } = tree.value; - indeterminateKeys.value.forEach((key) => { - const node = treeNodeMap.get(key); - if (node) { - halfCheckedKeys.push(key); - halfCheckedNodes.push(node.data); - } - }); - } - return { - halfCheckedNodes, - halfCheckedKeys - }; - } - function setCheckedKeys(keys3) { - checkedKeys.value.clear(); - indeterminateKeys.value.clear(); - nextTick(() => { - _setCheckedKeys(keys3); - }); - } - function setChecked(key, isChecked2) { - if ((tree == null ? void 0 : tree.value) && props2.showCheckbox) { - const node = tree.value.treeNodeMap.get(key); - if (node) { - toggleCheckbox(node, isChecked2, false); - } - } - } - function _setCheckedKeys(keys3) { - if (tree == null ? void 0 : tree.value) { - const { treeNodeMap } = tree.value; - if (props2.showCheckbox && treeNodeMap && (keys3 == null ? void 0 : keys3.length) > 0) { - for (const key of keys3) { - const node = treeNodeMap.get(key); - if (node && !isChecked(node)) { - toggleCheckbox(node, true, false, false); - } - } - updateCheckedKeys(); - } - } - } - return { - updateCheckedKeys, - toggleCheckbox, - isChecked, - isIndeterminate, - getCheckedKeys, - getCheckedNodes, - getHalfCheckedKeys, - getHalfCheckedNodes, - setChecked, - setCheckedKeys - }; -} - -// node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs -function useFilter(props2, tree) { - const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([])); - const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([])); - const filterable = computed(() => { - return isFunction(props2.filterMethod); - }); - function doFilter(query) { - var _a; - if (!filterable.value) { - return; - } - const expandKeySet = /* @__PURE__ */ new Set(); - const hiddenExpandIconKeys = hiddenExpandIconKeySet.value; - const hiddenKeys = hiddenNodeKeySet.value; - const family = []; - const nodes = ((_a = tree.value) == null ? void 0 : _a.treeNodes) || []; - const filter2 = props2.filterMethod; - hiddenKeys.clear(); - function traverse(nodes2) { - nodes2.forEach((node) => { - family.push(node); - if (filter2 == null ? void 0 : filter2(query, node.data, node)) { - family.forEach((member) => { - expandKeySet.add(member.key); - member.expanded = true; - }); - } else { - node.expanded = false; - if (node.isLeaf) { - hiddenKeys.add(node.key); - } - } - const children = node.children; - if (children) { - traverse(children); - } - if (!node.isLeaf) { - if (!expandKeySet.has(node.key)) { - hiddenKeys.add(node.key); - } else if (children) { - let allHidden = true; - for (const childNode of children) { - if (!hiddenKeys.has(childNode.key)) { - allHidden = false; - break; - } - } - if (allHidden) { - hiddenExpandIconKeys.add(node.key); - } else { - hiddenExpandIconKeys.delete(node.key); - } - } - } - family.pop(); - }); - } - traverse(nodes); - return expandKeySet; - } - function isForceHiddenExpandIcon(node) { - return hiddenExpandIconKeySet.value.has(node.key); - } - return { - hiddenExpandIconKeySet, - hiddenNodeKeySet, - doFilter, - isForceHiddenExpandIcon - }; -} - -// node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs -function useTree3(props2, emit) { - const expandedKeySet = ref(/* @__PURE__ */ new Set()); - const currentKey = ref(); - const tree = shallowRef(); - const listRef = ref(); - const { - isIndeterminate, - isChecked, - toggleCheckbox, - getCheckedKeys, - getCheckedNodes, - getHalfCheckedKeys, - getHalfCheckedNodes, - setChecked, - setCheckedKeys - } = useCheck2(props2, tree); - const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter( - props2, - tree - ); - const valueKey = computed(() => { - var _a; - return ((_a = props2.props) == null ? void 0 : _a.value) || TreeOptionsEnum.KEY; - }); - const childrenKey = computed(() => { - var _a; - return ((_a = props2.props) == null ? void 0 : _a.children) || TreeOptionsEnum.CHILDREN; - }); - const disabledKey = computed(() => { - var _a; - return ((_a = props2.props) == null ? void 0 : _a.disabled) || TreeOptionsEnum.DISABLED; - }); - const labelKey = computed(() => { - var _a; - return ((_a = props2.props) == null ? void 0 : _a.label) || TreeOptionsEnum.LABEL; - }); - const flattenTree = computed(() => { - var _a; - const expandedKeys = expandedKeySet.value; - const hiddenKeys = hiddenNodeKeySet.value; - const flattenNodes = []; - const nodes = ((_a = tree.value) == null ? void 0 : _a.treeNodes) || []; - const stack = []; - for (let i = nodes.length - 1; i >= 0; --i) { - stack.push(nodes[i]); - } - while (stack.length) { - const node = stack.pop(); - if (hiddenKeys.has(node.key)) - continue; - flattenNodes.push(node); - if (node.children && expandedKeys.has(node.key)) { - for (let i = node.children.length - 1; i >= 0; --i) { - stack.push(node.children[i]); - } - } - } - return flattenNodes; - }); - const isNotEmpty = computed(() => { - return flattenTree.value.length > 0; - }); - function createTree(data) { - const treeNodeMap = /* @__PURE__ */ new Map(); - const levelTreeNodeMap = /* @__PURE__ */ new Map(); - let maxLevel = 1; - function traverse(nodes, level = 1, parent2 = void 0) { - var _a; - const siblings = []; - for (const rawNode of nodes) { - const value = getKey(rawNode); - const node = { - level, - key: value, - data: rawNode - }; - node.label = getLabel(rawNode); - node.parent = parent2; - const children = getChildren(rawNode); - node.disabled = getDisabled(rawNode); - node.isLeaf = !children || children.length === 0; - node.expanded = expandedKeySet.value.has(value); - if (children && children.length) { - node.children = traverse(children, level + 1, node); - } - siblings.push(node); - treeNodeMap.set(value, node); - if (!levelTreeNodeMap.has(level)) { - levelTreeNodeMap.set(level, []); - } - (_a = levelTreeNodeMap.get(level)) == null ? void 0 : _a.push(node); - } - if (level > maxLevel) { - maxLevel = level; - } - return siblings; - } - const treeNodes = traverse(data); - return { - treeNodeMap, - levelTreeNodeMap, - maxLevel, - treeNodes - }; - } - function filter2(query) { - const keys3 = doFilter(query); - if (keys3) { - expandedKeySet.value = keys3; - } - } - function getChildren(node) { - return node[childrenKey.value]; - } - function getKey(node) { - if (!node) { - return ""; - } - return node[valueKey.value]; - } - function getDisabled(node) { - return node[disabledKey.value]; - } - function getLabel(node) { - return node[labelKey.value]; - } - function toggleExpand(node) { - const expandedKeys = expandedKeySet.value; - if (expandedKeys.has(node.key)) { - collapseNode(node); - } else { - expandNode(node); - } - } - function setExpandedKeys(keys3) { - const expandedKeys = /* @__PURE__ */ new Set(); - const nodeMap = tree.value.treeNodeMap; - expandedKeySet.value.forEach((key) => { - const node = nodeMap.get(key); - expandedKeySet.value.delete(node.key); - node.expanded = false; - }); - keys3.forEach((k) => { - let node = nodeMap.get(k); - while (node && !expandedKeys.has(node.key)) { - expandedKeys.add(node.key); - node.expanded = true; - node = node.parent; - } - }); - expandedKeySet.value = expandedKeys; - } - function handleNodeClick(node, e) { - emit(NODE_CLICK, node.data, node, e); - handleCurrentChange2(node); - if (props2.expandOnClickNode) { - toggleExpand(node); - } - if (props2.showCheckbox && (props2.checkOnClickNode || node.isLeaf && props2.checkOnClickLeaf) && !node.disabled) { - toggleCheckbox(node, !isChecked(node), true); - } - } - function handleNodeDrop(node, e) { - emit(NODE_DROP, node.data, node, e); - } - function handleCurrentChange2(node) { - if (!isCurrent(node)) { - currentKey.value = node.key; - emit(CURRENT_CHANGE, node.data, node); - } - } - function handleNodeCheck(node, checked) { - toggleCheckbox(node, checked); - } - function expandNode(node) { - const keySet = expandedKeySet.value; - if (tree.value && props2.accordion) { - const { treeNodeMap } = tree.value; - keySet.forEach((key) => { - const treeNode = treeNodeMap.get(key); - if (node && node.level === (treeNode == null ? void 0 : treeNode.level)) { - keySet.delete(key); - treeNode.expanded = false; - } - }); - } - keySet.add(node.key); - const _node = getNode(node.key); - if (_node) { - _node.expanded = true; - emit(NODE_EXPAND, _node.data, _node); - } - } - function collapseNode(node) { - expandedKeySet.value.delete(node.key); - const _node = getNode(node.key); - if (_node) { - _node.expanded = false; - emit(NODE_COLLAPSE, _node.data, _node); - } - } - function isDisabled(node) { - return !!node.disabled; - } - function isCurrent(node) { - const current = currentKey.value; - return current !== void 0 && current === node.key; - } - function getCurrentNode() { - var _a, _b; - if (!currentKey.value) - return void 0; - return (_b = (_a = tree.value) == null ? void 0 : _a.treeNodeMap.get(currentKey.value)) == null ? void 0 : _b.data; - } - function getCurrentKey() { - return currentKey.value; - } - function setCurrentKey(key) { - currentKey.value = key; - } - function setData2(data) { - tree.value = createTree(data); - } - function getNode(data) { - var _a; - const key = isObject(data) ? getKey(data) : data; - return (_a = tree.value) == null ? void 0 : _a.treeNodeMap.get(key); - } - function scrollToNode(key, strategy = "auto") { - const node = getNode(key); - if (node && listRef.value) { - listRef.value.scrollToItem(flattenTree.value.indexOf(node), strategy); - } - } - function scrollTo2(offset3) { - var _a; - (_a = listRef.value) == null ? void 0 : _a.scrollTo(offset3); - } - watch( - () => props2.currentNodeKey, - (key) => { - currentKey.value = key; - }, - { - immediate: true - } - ); - watch( - () => props2.defaultExpandedKeys, - (key) => { - expandedKeySet.value = new Set(key); - }, - { - immediate: true - } - ); - watch( - () => props2.data, - (data) => { - setData2(data); - }, - { - immediate: true - } - ); - return { - tree, - flattenTree, - isNotEmpty, - listRef, - getKey, - getChildren, - toggleExpand, - toggleCheckbox, - isChecked, - isIndeterminate, - isDisabled, - isCurrent, - isForceHiddenExpandIcon, - handleNodeClick, - handleNodeDrop, - handleNodeCheck, - getCurrentNode, - getCurrentKey, - setCurrentKey, - getCheckedKeys, - getCheckedNodes, - getHalfCheckedKeys, - getHalfCheckedNodes, - setChecked, - setCheckedKeys, - filter: filter2, - setData: setData2, - getNode, - expandNode, - collapseNode, - setExpandedKeys, - scrollToNode, - scrollTo: scrollTo2 - }; -} - -// node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs -var ElNodeContent = defineComponent({ - name: "ElTreeNodeContent", - props: treeNodeContentProps, - setup(props2) { - const tree = inject(ROOT_TREE_INJECTION_KEY2); - const ns = useNamespace("tree"); - return () => { - const node = props2.node; - const { data } = node; - return (tree == null ? void 0 : tree.ctx.slots.default) ? tree.ctx.slots.default({ node, data }) : h( - ElText, - { tag: "span", truncated: true, class: ns.be("node", "label") }, - () => [node == null ? void 0 : node.label] - ); - }; - } -}); - -// node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs -var _hoisted_173 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key"]; -var _sfc_main140 = defineComponent({ - ...{ - name: "ElTreeNode" - }, - __name: "tree-node", - props: treeNodeProps, - emits: treeNodeEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const tree = inject(ROOT_TREE_INJECTION_KEY2); - const ns = useNamespace("tree"); - const indent = computed(() => { - var _a; - return (_a = tree == null ? void 0 : tree.props.indent) != null ? _a : 16; - }); - const icon = computed(() => { - var _a; - return (_a = tree == null ? void 0 : tree.props.icon) != null ? _a : caret_right_default; - }); - const getNodeClass = (node) => { - const nodeClassFunc = tree == null ? void 0 : tree.props.props.class; - if (!nodeClassFunc) - return {}; - let className; - if (isFunction(nodeClassFunc)) { - const { data } = node; - className = nodeClassFunc(data, node); - } else { - className = nodeClassFunc; - } - return isString(className) ? { [className]: true } : className; - }; - const handleClick = (e) => { - emit("click", props2.node, e); - }; - const handleDrop = (e) => { - emit("drop", props2.node, e); - }; - const handleExpandIconClick = () => { - emit("toggle", props2.node); - }; - const handleCheckChange = (value) => { - emit("check", props2.node, value); - }; - const handleContextMenu = (event) => { - var _a, _b, _c, _d; - if ((_c = (_b = (_a = tree == null ? void 0 : tree.instance) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props) == null ? void 0 : _c["onNodeContextmenu"]) { - event.stopPropagation(); - event.preventDefault(); - } - tree == null ? void 0 : tree.ctx.emit(NODE_CONTEXTMENU, event, (_d = props2.node) == null ? void 0 : _d.data, props2.node); - }; - return (_ctx, _cache) => { - var _a, _b, _c; - return openBlock(), createElementBlock("div", { - ref: "node$", - class: normalizeClass([ - unref(ns).b("node"), - unref(ns).is("expanded", _ctx.expanded), - unref(ns).is("current", _ctx.current), - unref(ns).is("focusable", !_ctx.disabled), - unref(ns).is("checked", !_ctx.disabled && _ctx.checked), - getNodeClass(_ctx.node) - ]), - role: "treeitem", - tabindex: "-1", - "aria-expanded": _ctx.expanded, - "aria-disabled": _ctx.disabled, - "aria-checked": _ctx.checked, - "data-key": (_a = _ctx.node) == null ? void 0 : _a.key, - onClick: withModifiers(handleClick, ["stop"]), - onContextmenu: handleContextMenu, - onDragover: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["prevent"])), - onDragenter: _cache[2] || (_cache[2] = withModifiers(() => { - }, ["prevent"])), - onDrop: withModifiers(handleDrop, ["stop"]) - }, [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).be("node", "content")), - style: normalizeStyle({ - paddingLeft: `${(_ctx.node.level - 1) * indent.value}px`, - height: _ctx.itemSize + "px" - }) - }, - [ - icon.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([ - unref(ns).is("leaf", !!((_b = _ctx.node) == null ? void 0 : _b.isLeaf)), - unref(ns).is("hidden", _ctx.hiddenExpandIcon), - { - expanded: !((_c = _ctx.node) == null ? void 0 : _c.isLeaf) && _ctx.expanded - }, - unref(ns).be("node", "expand-icon") - ]), - onClick: withModifiers(handleExpandIconClick, ["stop"]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(icon.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - _ctx.showCheckbox ? (openBlock(), createBlock(unref(ElCheckbox), { - key: 1, - "model-value": _ctx.checked, - indeterminate: _ctx.indeterminate, - disabled: _ctx.disabled, - onChange: handleCheckChange, - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])) - }, null, 8, ["model-value", "indeterminate", "disabled"])) : createCommentVNode("v-if", true), - createVNode(unref(ElNodeContent), { - node: { ..._ctx.node, expanded: _ctx.expanded } - }, null, 8, ["node"]) - ], - 6 - ) - ], 42, _hoisted_173); - }; - } -}); -var ElTreeNode2 = _export_sfc(_sfc_main140, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]); - -// node_modules/element-plus/es/components/tree-v2/src/tree.mjs -var _sfc_main141 = defineComponent({ - ...{ - name: "ElTreeV2" - }, - __name: "tree", - props: treeProps2, - emits: treeEmits2, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const slots = useSlots(); - const treeNodeSize = computed(() => props2.itemSize); - provide(ROOT_TREE_INJECTION_KEY2, { - ctx: { - emit, - slots - }, - props: props2, - instance: getCurrentInstance() - }); - provide(formItemContextKey, void 0); - const { t } = useLocale(); - const ns = useNamespace("tree"); - const { - flattenTree, - isNotEmpty, - listRef, - toggleExpand, - isIndeterminate, - isChecked, - isDisabled, - isCurrent, - isForceHiddenExpandIcon, - handleNodeClick, - handleNodeDrop, - handleNodeCheck, - toggleCheckbox, - getCurrentNode, - getCurrentKey, - setCurrentKey, - getCheckedKeys, - getCheckedNodes, - getHalfCheckedKeys, - getHalfCheckedNodes, - setChecked, - setCheckedKeys, - filter: filter2, - setData: setData2, - getNode, - expandNode, - collapseNode, - setExpandedKeys, - scrollToNode, - scrollTo: scrollTo2 - } = useTree3(props2, emit); - __expose({ - toggleCheckbox, - getCurrentNode, - getCurrentKey, - setCurrentKey, - getCheckedKeys, - getCheckedNodes, - getHalfCheckedKeys, - getHalfCheckedNodes, - setChecked, - setCheckedKeys, - filter: filter2, - setData: setData2, - getNode, - expandNode, - collapseNode, - setExpandedKeys, - scrollToNode, - scrollTo: scrollTo2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: _ctx.highlightCurrent }]), - role: "tree" - }, - [ - unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), { - key: 0, - ref_key: "listRef", - ref: listRef, - "class-name": unref(ns).b("virtual-list"), - data: unref(flattenTree), - total: unref(flattenTree).length, - height: _ctx.height, - "item-size": treeNodeSize.value, - "perf-mode": _ctx.perfMode, - "scrollbar-always-on": _ctx.scrollbarAlwaysOn - }, { - default: withCtx(({ data, index, style }) => [ - (openBlock(), createBlock(ElTreeNode2, { - key: data[index].key, - style: normalizeStyle(style), - node: data[index], - expanded: data[index].expanded, - "show-checkbox": _ctx.showCheckbox, - checked: unref(isChecked)(data[index]), - indeterminate: unref(isIndeterminate)(data[index]), - "item-size": treeNodeSize.value, - disabled: unref(isDisabled)(data[index]), - current: unref(isCurrent)(data[index]), - "hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]), - onClick: unref(handleNodeClick), - onToggle: unref(toggleExpand), - onCheck: unref(handleNodeCheck), - onDrop: unref(handleNodeDrop) - }, null, 8, ["style", "node", "expanded", "show-checkbox", "checked", "indeterminate", "item-size", "disabled", "current", "hidden-expand-icon", "onClick", "onToggle", "onCheck", "onDrop"])) - ]), - _: 1 - }, 8, ["class-name", "data", "total", "height", "item-size", "perf-mode", "scrollbar-always-on"])) : (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).e("empty-block")) - }, - [ - renderSlot(_ctx.$slots, "empty", {}, () => { - var _a; - return [ - createBaseVNode( - "span", - { - class: normalizeClass(unref(ns).e("empty-text")) - }, - toDisplayString((_a = _ctx.emptyText) != null ? _a : unref(t)("el.tree.emptyText")), - 3 - ) - ]; - }) - ], - 2 - )) - ], - 2 - ); - }; - } -}); -var TreeV2 = _export_sfc(_sfc_main141, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]); - -// node_modules/element-plus/es/components/tree-v2/index.mjs -var ElTreeV2 = withInstall(TreeV2); - -// node_modules/element-plus/es/components/upload/src/constants.mjs -var uploadContextKey = Symbol("uploadContextKey"); - -// node_modules/element-plus/es/components/upload/src/ajax.mjs -var SCOPE11 = "ElUpload"; -var UploadAjaxError = class extends Error { - constructor(message2, status, method5, url2) { - super(message2); - this.name = "UploadAjaxError"; - this.status = status; - this.method = method5; - this.url = url2; - } -}; -function getError(action, option, xhr) { - let msg; - if (xhr.response) { - msg = `${xhr.response.error || xhr.response}`; - } else if (xhr.responseText) { - msg = `${xhr.responseText}`; - } else { - msg = `fail to ${option.method} ${action} ${xhr.status}`; - } - return new UploadAjaxError(msg, xhr.status, option.method, action); -} -function getBody(xhr) { - const text = xhr.responseText || xhr.response; - if (!text) { - return text; - } - try { - return JSON.parse(text); - } catch (e) { - return text; - } -} -var ajaxUpload = (option) => { - if (typeof XMLHttpRequest === "undefined") - throwError(SCOPE11, "XMLHttpRequest is undefined"); - const xhr = new XMLHttpRequest(); - const action = option.action; - if (xhr.upload) { - xhr.upload.addEventListener("progress", (evt) => { - const progressEvt = evt; - progressEvt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0; - option.onProgress(progressEvt); - }); - } - const formData = new FormData(); - if (option.data) { - for (const [key, value] of Object.entries(option.data)) { - if (isArray(value) && value.length) - formData.append(key, ...value); - else - formData.append(key, value); - } - } - formData.append(option.filename, option.file, option.file.name); - xhr.addEventListener("error", () => { - option.onError(getError(action, option, xhr)); - }); - xhr.addEventListener("load", () => { - if (xhr.status < 200 || xhr.status >= 300) { - return option.onError(getError(action, option, xhr)); - } - option.onSuccess(getBody(xhr)); - }); - xhr.open(option.method, action, true); - if (option.withCredentials && "withCredentials" in xhr) { - xhr.withCredentials = true; - } - const headers = option.headers || {}; - if (headers instanceof Headers) { - headers.forEach((value, key) => xhr.setRequestHeader(key, value)); - } else { - for (const [key, value] of Object.entries(headers)) { - if (isNil_default(value)) - continue; - xhr.setRequestHeader(key, String(value)); - } - } - xhr.send(formData); - return xhr; -}; - -// node_modules/element-plus/es/components/upload/src/upload.mjs -var uploadListTypes = ["text", "picture", "picture-card"]; -var fileId = 1; -var genFileId = () => Date.now() + fileId++; -var uploadBaseProps = buildProps({ - action: { - type: String, - default: "#" - }, - headers: { - type: definePropType(Object) - }, - method: { - type: String, - default: "post" - }, - data: { - type: definePropType([Object, Function, Promise]), - default: () => mutable({}) - }, - multiple: Boolean, - name: { - type: String, - default: "file" - }, - drag: Boolean, - withCredentials: Boolean, - showFileList: { - type: Boolean, - default: true - }, - accept: { - type: String, - default: "" - }, - fileList: { - type: definePropType(Array), - default: () => mutable([]) - }, - autoUpload: { - type: Boolean, - default: true - }, - listType: { - type: String, - values: uploadListTypes, - default: "text" - }, - httpRequest: { - type: definePropType(Function), - default: ajaxUpload - }, - disabled: { - type: Boolean, - default: void 0 - }, - limit: Number, - directory: Boolean -}); -var uploadProps = buildProps({ - ...uploadBaseProps, - beforeUpload: { - type: definePropType(Function), - default: NOOP - }, - beforeRemove: { - type: definePropType(Function) - }, - onRemove: { - type: definePropType(Function), - default: NOOP - }, - onChange: { - type: definePropType(Function), - default: NOOP - }, - onPreview: { - type: definePropType(Function), - default: NOOP - }, - onSuccess: { - type: definePropType(Function), - default: NOOP - }, - onProgress: { - type: definePropType(Function), - default: NOOP - }, - onError: { - type: definePropType(Function), - default: NOOP - }, - onExceed: { - type: definePropType(Function), - default: NOOP - }, - crossorigin: { - type: definePropType(String) - } -}); - -// node_modules/element-plus/es/components/upload/src/upload-list.mjs -var uploadListProps = buildProps({ - files: { - type: definePropType(Array), - default: () => mutable([]) - }, - disabled: { - type: Boolean, - default: void 0 - }, - handlePreview: { - type: definePropType(Function), - default: NOOP - }, - listType: { - type: String, - values: uploadListTypes, - default: "text" - }, - crossorigin: { - type: definePropType(String) - } -}); -var uploadListEmits = { - remove: (file) => !!file -}; - -// node_modules/element-plus/es/components/upload/src/upload-list2.mjs -var _hoisted_174 = ["tabindex", "aria-disabled", "onKeydown"]; -var _hoisted_240 = ["src", "crossorigin"]; -var _hoisted_317 = ["onClick"]; -var _hoisted_412 = ["title"]; -var _hoisted_510 = ["onClick"]; -var _hoisted_65 = ["onClick"]; -var _sfc_main142 = defineComponent({ - ...{ - name: "ElUploadList" - }, - __name: "upload-list", - props: uploadListProps, - emits: uploadListEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { t } = useLocale(); - const nsUpload = useNamespace("upload"); - const nsIcon = useNamespace("icon"); - const nsList = useNamespace("list"); - const disabled = useFormDisabled(); - const focusing = ref(false); - const containerKls = computed(() => [ - nsUpload.b("list"), - nsUpload.bm("list", props2.listType), - nsUpload.is("disabled", disabled.value) - ]); - const handleRemove = (file) => { - emit("remove", file); - }; - return (_ctx, _cache) => { - return openBlock(), createBlock(TransitionGroup, { - tag: "ul", - class: normalizeClass(containerKls.value), - name: unref(nsList).b() - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.files, (file, index) => { - return openBlock(), createElementBlock("li", { - key: file.uid || file.name, - class: normalizeClass([ - unref(nsUpload).be("list", "item"), - unref(nsUpload).is(file.status), - { focusing: focusing.value } - ]), - tabindex: unref(disabled) ? void 0 : 0, - "aria-disabled": unref(disabled), - role: "button", - onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]), - onFocus: _cache[0] || (_cache[0] = ($event) => focusing.value = true), - onBlur: _cache[1] || (_cache[1] = ($event) => focusing.value = false), - onClick: _cache[2] || (_cache[2] = ($event) => focusing.value = false) - }, [ - renderSlot(_ctx.$slots, "default", { - file, - index - }, () => [ - _ctx.listType === "picture" || file.status !== "uploading" && _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("img", { - key: 0, - class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")), - src: file.url, - crossorigin: _ctx.crossorigin, - alt: "" - }, null, 10, _hoisted_240)) : createCommentVNode("v-if", true), - file.status === "uploading" || _ctx.listType !== "picture-card" ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(nsUpload).be("list", "item-info")) - }, - [ - createBaseVNode("a", { - class: normalizeClass(unref(nsUpload).be("list", "item-name")), - onClick: withModifiers(($event) => _ctx.handlePreview(file), ["prevent"]) - }, [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(nsIcon).m("document")) - }, { - default: withCtx(() => [ - createVNode(unref(document_default)) - ]), - _: 1 - }, 8, ["class"]), - createBaseVNode("span", { - class: normalizeClass(unref(nsUpload).be("list", "item-file-name")), - title: file.name - }, toDisplayString(file.name), 11, _hoisted_412) - ], 10, _hoisted_317), - file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), { - key: 0, - type: _ctx.listType === "picture-card" ? "circle" : "line", - "stroke-width": _ctx.listType === "picture-card" ? 6 : 2, - percentage: Number(file.percentage), - style: normalizeStyle(_ctx.listType === "picture-card" ? "" : "margin-top: 0.5rem") - }, null, 8, ["type", "stroke-width", "percentage", "style"])) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "label", - { - class: normalizeClass(unref(nsUpload).be("list", "item-status-label")) - }, - [ - _ctx.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")]) - }, { - default: withCtx(() => [ - createVNode(unref(circle_check_default)) - ]), - _: 1 - }, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")]) - }, { - default: withCtx(() => [ - createVNode(unref(check_default)) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - ), - !unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), { - key: 2, - class: normalizeClass(unref(nsIcon).m("close")), - onClick: ($event) => handleRemove(file) - }, { - default: withCtx(() => [ - createVNode(unref(close_default)) - ]), - _: 1 - }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true), - createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"), - createCommentVNode(" This is a bug which needs to be fixed "), - createCommentVNode(" TODO: Fix the incorrect navigation interaction "), - !unref(disabled) ? (openBlock(), createElementBlock( - "i", - { - key: 3, - class: normalizeClass(unref(nsIcon).m("close-tip")) - }, - toDisplayString(unref(t)("el.upload.deleteTip")), - 3 - )) : createCommentVNode("v-if", true), - _ctx.listType === "picture-card" ? (openBlock(), createElementBlock( - "span", - { - key: 4, - class: normalizeClass(unref(nsUpload).be("list", "item-actions")) - }, - [ - createBaseVNode("span", { - class: normalizeClass(unref(nsUpload).be("list", "item-preview")), - onClick: ($event) => _ctx.handlePreview(file) - }, [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(nsIcon).m("zoom-in")) - }, { - default: withCtx(() => [ - createVNode(unref(zoom_in_default)) - ]), - _: 1 - }, 8, ["class"]) - ], 10, _hoisted_510), - !unref(disabled) ? (openBlock(), createElementBlock("span", { - key: 0, - class: normalizeClass(unref(nsUpload).be("list", "item-delete")), - onClick: ($event) => handleRemove(file) - }, [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(nsIcon).m("delete")) - }, { - default: withCtx(() => [ - createVNode(unref(delete_default)) - ]), - _: 1 - }, 8, ["class"]) - ], 10, _hoisted_65)) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true) - ]) - ], 42, _hoisted_174); - }), - 128 - )), - renderSlot(_ctx.$slots, "append") - ]), - _: 3 - }, 8, ["class", "name"]); - }; - } -}); -var UploadList = _export_sfc(_sfc_main142, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]); - -// node_modules/element-plus/es/components/upload/src/upload-dragger.mjs -var uploadDraggerProps = buildProps({ - disabled: { - type: Boolean, - default: void 0 - }, - directory: Boolean -}); -var uploadDraggerEmits = { - file: (file) => isArray(file) -}; - -// node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs -var COMPONENT_NAME25 = "ElUploadDrag"; -var _sfc_main143 = defineComponent({ - ...{ - name: COMPONENT_NAME25 - }, - __name: "upload-dragger", - props: uploadDraggerProps, - emits: uploadDraggerEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const uploaderContext = inject(uploadContextKey); - if (!uploaderContext) { - throwError( - COMPONENT_NAME25, - "usage: " - ); - } - const ns = useNamespace("upload"); - const dragover = ref(false); - const disabled = useFormDisabled(); - const getFile = (entry) => { - return new Promise((resolve, reject2) => entry.file(resolve, reject2)); - }; - const getAllFiles = async (entry) => { - try { - if (entry.isFile) { - const file = await getFile( - entry - ); - file.isDirectory = false; - return [file]; - } - if (entry.isDirectory) { - const dirReader = entry.createReader(); - const getEntries = () => { - return new Promise( - (resolve, reject2) => dirReader.readEntries(resolve, reject2) - ); - }; - const entries = []; - let readEntries = await getEntries(); - while (readEntries.length > 0) { - entries.push(...readEntries); - readEntries = await getEntries(); - } - const filePromises = entries.map( - (entry2) => getAllFiles(entry2).catch(() => []) - ); - const files = await Promise.all(filePromises); - return flatten_default(files); - } - } catch (e) { - return []; - } - return []; - }; - const onDrop = async (e) => { - if (disabled.value) - return; - dragover.value = false; - e.stopPropagation(); - const files = Array.from(e.dataTransfer.files); - const items = e.dataTransfer.items || []; - if (props2.directory) { - const entries = Array.from(items).map((item) => { - var _a; - return (_a = item == null ? void 0 : item.webkitGetAsEntry) == null ? void 0 : _a.call(item); - }).filter((entry) => entry); - const allFiles = await Promise.all(entries.map(getAllFiles)); - emit("file", flatten_default(allFiles)); - return; - } - files.forEach((file, index) => { - var _a; - const item = items[index]; - const entry = (_a = item == null ? void 0 : item.webkitGetAsEntry) == null ? void 0 : _a.call(item); - if (entry) { - file.isDirectory = entry.isDirectory; - } - }); - emit("file", files); - }; - const onDragover = () => { - if (!disabled.value) - dragover.value = true; - }; - const onDragleave = (e) => { - if (!e.currentTarget.contains(e.relatedTarget)) - dragover.value = false; - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b("dragger"), unref(ns).is("dragover", dragover.value)]), - onDrop: withModifiers(onDrop, ["prevent"]), - onDragover: withModifiers(onDragover, ["prevent"]), - onDragleave: withModifiers(onDragleave, ["prevent"]) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 34 - ); - }; - } -}); -var UploadDragger = _export_sfc(_sfc_main143, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]); - -// node_modules/element-plus/es/components/upload/src/upload-content.mjs -var uploadContentProps = buildProps({ - ...uploadBaseProps, - beforeUpload: { - type: definePropType(Function), - default: NOOP - }, - onRemove: { - type: definePropType(Function), - default: NOOP - }, - onStart: { - type: definePropType(Function), - default: NOOP - }, - onSuccess: { - type: definePropType( - Function - ), - default: NOOP - }, - onProgress: { - type: definePropType(Function), - default: NOOP - }, - onError: { - type: definePropType(Function), - default: NOOP - }, - onExceed: { - type: definePropType(Function), - default: NOOP - } -}); - -// node_modules/element-plus/es/components/upload/src/upload-content2.mjs -var _hoisted_175 = ["tabindex", "aria-disabled", "onKeydown"]; -var _hoisted_241 = ["name", "disabled", "multiple", "accept", "webkitdirectory"]; -var _sfc_main144 = defineComponent({ - ...{ - name: "ElUploadContent", - inheritAttrs: false - }, - __name: "upload-content", - props: uploadContentProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const ns = useNamespace("upload"); - const disabled = useFormDisabled(); - const requests = shallowRef( - {} - ); - const inputRef = shallowRef(); - const uploadFiles = (files) => { - if (files.length === 0) - return; - const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props2; - if (limit && fileList.length + files.length > limit) { - onExceed(files, fileList); - return; - } - if (!multiple) { - files = files.slice(0, 1); - } - for (const file of files) { - const rawFile = file; - rawFile.uid = genFileId(); - onStart(rawFile); - if (autoUpload) - upload(rawFile); - } - }; - const upload = async (rawFile) => { - inputRef.value.value = ""; - if (!props2.beforeUpload) { - return doUpload(rawFile); - } - let hookResult; - let beforeData = {}; - try { - const originData = props2.data; - const beforeUploadPromise = props2.beforeUpload(rawFile); - beforeData = isPlainObject(props2.data) ? cloneDeep_default(props2.data) : props2.data; - hookResult = await beforeUploadPromise; - if (isPlainObject(props2.data) && isEqual_default(originData, beforeData)) { - beforeData = cloneDeep_default(props2.data); - } - } catch (e) { - hookResult = false; - } - if (hookResult === false) { - props2.onRemove(rawFile); - return; - } - let file = rawFile; - if (hookResult instanceof Blob) { - if (hookResult instanceof File) { - file = hookResult; - } else { - file = new File([hookResult], rawFile.name, { - type: rawFile.type - }); - } - } - doUpload( - Object.assign(file, { - uid: rawFile.uid - }), - beforeData - ); - }; - const resolveData = async (data, rawFile) => { - if (isFunction(data)) { - return data(rawFile); - } - return data; - }; - const doUpload = async (rawFile, beforeData) => { - const { - headers, - data, - method: method5, - withCredentials, - name: filename, - action, - onProgress, - onSuccess, - onError, - httpRequest - } = props2; - try { - beforeData = await resolveData(beforeData != null ? beforeData : data, rawFile); - } catch (e) { - props2.onRemove(rawFile); - return; - } - const { uid: uid2 } = rawFile; - const options = { - headers: headers || {}, - withCredentials, - file: rawFile, - data: beforeData, - method: method5, - filename, - action, - onProgress: (evt) => { - onProgress(evt, rawFile); - }, - onSuccess: (res) => { - onSuccess(res, rawFile); - delete requests.value[uid2]; - }, - onError: (err) => { - onError(err, rawFile); - delete requests.value[uid2]; - } - }; - const request = httpRequest(options); - requests.value[uid2] = request; - if (request instanceof Promise) { - request.then(options.onSuccess, options.onError); - } - }; - const handleChange = (e) => { - const files = e.target.files; - if (!files) - return; - uploadFiles(Array.from(files)); - }; - const handleClick = () => { - if (!disabled.value) { - inputRef.value.value = ""; - inputRef.value.click(); - } - }; - const handleKeydown = () => { - handleClick(); - }; - const abort = (file) => { - const _reqs = entriesOf(requests.value).filter( - file ? ([uid2]) => String(file.uid) === uid2 : () => true - ); - _reqs.forEach(([uid2, req]) => { - if (req instanceof XMLHttpRequest) - req.abort(); - delete requests.value[uid2]; - }); - }; - __expose({ - abort, - upload - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - class: normalizeClass([ - unref(ns).b(), - unref(ns).m(_ctx.listType), - unref(ns).is("drag", _ctx.drag), - unref(ns).is("disabled", unref(disabled)) - ]), - tabindex: unref(disabled) ? void 0 : 0, - "aria-disabled": unref(disabled), - role: "button", - onClick: handleClick, - onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"]) - }, [ - _ctx.drag ? (openBlock(), createBlock(UploadDragger, { - key: 0, - disabled: unref(disabled), - directory: _ctx.directory, - onFile: uploadFiles - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["disabled", "directory"])) : renderSlot(_ctx.$slots, "default", { key: 1 }), - createBaseVNode("input", { - ref_key: "inputRef", - ref: inputRef, - class: normalizeClass(unref(ns).e("input")), - name: _ctx.name, - disabled: unref(disabled), - multiple: _ctx.multiple, - accept: _ctx.accept, - webkitdirectory: _ctx.directory, - type: "file", - onChange: handleChange, - onClick: _cache[0] || (_cache[0] = withModifiers(() => { - }, ["stop"])) - }, null, 42, _hoisted_241) - ], 42, _hoisted_175); - }; - } -}); -var UploadContent = _export_sfc(_sfc_main144, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]); - -// node_modules/element-plus/es/components/upload/src/use-handlers.mjs -var SCOPE12 = "ElUpload"; -var revokeFileObjectURL = (file) => { - var _a; - if ((_a = file.url) == null ? void 0 : _a.startsWith("blob:")) { - URL.revokeObjectURL(file.url); - } -}; -var useHandlers = (props2, uploadRef) => { - const uploadFiles = useVModel( - props2, - "fileList", - void 0, - { passive: true } - ); - const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid); - function abort(file) { - var _a; - (_a = uploadRef.value) == null ? void 0 : _a.abort(file); - } - function clearFiles(states = ["ready", "uploading", "success", "fail"]) { - uploadFiles.value = uploadFiles.value.filter( - (row) => !states.includes(row.status) - ); - } - function removeFile(file) { - uploadFiles.value = uploadFiles.value.filter( - (uploadFile) => uploadFile.uid !== file.uid - ); - } - const emitChange = (file) => { - nextTick(() => props2.onChange(file, uploadFiles.value)); - }; - const handleError = (err, rawFile) => { - const file = getFile(rawFile); - if (!file) - return; - console.error(err); - file.status = "fail"; - removeFile(file); - props2.onError(err, file, uploadFiles.value); - emitChange(file); - }; - const handleProgress = (evt, rawFile) => { - const file = getFile(rawFile); - if (!file) - return; - props2.onProgress(evt, file, uploadFiles.value); - file.status = "uploading"; - file.percentage = Math.round(evt.percent); - }; - const handleSuccess = (response, rawFile) => { - const file = getFile(rawFile); - if (!file) - return; - file.status = "success"; - file.response = response; - props2.onSuccess(response, file, uploadFiles.value); - emitChange(file); - }; - const handleStart = (file) => { - if (isNil_default(file.uid)) - file.uid = genFileId(); - const uploadFile = { - name: file.name, - percentage: 0, - status: "ready", - size: file.size, - raw: file, - uid: file.uid - }; - if (props2.listType === "picture-card" || props2.listType === "picture") { - try { - uploadFile.url = URL.createObjectURL(file); - } catch (err) { - debugWarn(SCOPE12, err.message); - props2.onError(err, uploadFile, uploadFiles.value); - } - } - uploadFiles.value = [...uploadFiles.value, uploadFile]; - emitChange(uploadFile); - }; - const handleRemove = async (file) => { - const uploadFile = file instanceof File ? getFile(file) : file; - if (!uploadFile) - throwError(SCOPE12, "file to be removed not found"); - const doRemove = (file2) => { - abort(file2); - removeFile(file2); - props2.onRemove(file2, uploadFiles.value); - revokeFileObjectURL(file2); - }; - if (props2.beforeRemove) { - const before2 = await props2.beforeRemove(uploadFile, uploadFiles.value); - if (before2 !== false) - doRemove(uploadFile); - } else { - doRemove(uploadFile); - } - }; - function submit() { - uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => { - var _a; - return raw && ((_a = uploadRef.value) == null ? void 0 : _a.upload(raw)); - }); - } - watch( - () => props2.listType, - (val) => { - if (val !== "picture-card" && val !== "picture") { - return; - } - uploadFiles.value = uploadFiles.value.map((file) => { - const { raw, url: url2 } = file; - if (!url2 && raw) { - try { - file.url = URL.createObjectURL(raw); - } catch (err) { - props2.onError(err, file, uploadFiles.value); - } - } - return file; - }); - } - ); - watch( - uploadFiles, - (files) => { - for (const file of files) { - file.uid || (file.uid = genFileId()); - file.status || (file.status = "success"); - } - }, - { immediate: true, deep: true } - ); - return { - uploadFiles, - abort, - clearFiles, - handleError, - handleProgress, - handleStart, - handleSuccess, - handleRemove, - submit, - revokeFileObjectURL - }; -}; - -// node_modules/element-plus/es/components/upload/src/upload2.mjs -var _sfc_main145 = defineComponent({ - ...{ - name: "ElUpload" - }, - __name: "upload", - props: uploadProps, - setup(__props, { expose: __expose }) { - const props2 = __props; - const disabled = useFormDisabled(); - const uploadRef = shallowRef(); - const { - abort, - submit, - clearFiles, - uploadFiles, - handleStart, - handleError, - handleRemove, - handleSuccess, - handleProgress, - revokeFileObjectURL: revokeFileObjectURL2 - } = useHandlers(props2, uploadRef); - const isPictureCard = computed(() => props2.listType === "picture-card"); - const uploadContentProps2 = computed(() => ({ - ...props2, - fileList: uploadFiles.value, - onStart: handleStart, - onProgress: handleProgress, - onSuccess: handleSuccess, - onError: handleError, - onRemove: handleRemove - })); - onBeforeUnmount(() => { - uploadFiles.value.forEach(revokeFileObjectURL2); - }); - provide(uploadContextKey, { - accept: toRef(props2, "accept") - }); - __expose({ - abort, - submit, - clearFiles, - handleStart, - handleRemove - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", null, [ - isPictureCard.value && _ctx.showFileList ? (openBlock(), createBlock(UploadList, { - key: 0, - disabled: unref(disabled), - "list-type": _ctx.listType, - files: unref(uploadFiles), - crossorigin: _ctx.crossorigin, - "handle-preview": _ctx.onPreview, - onRemove: unref(handleRemove) - }, createSlots({ - append: withCtx(() => [ - createVNode( - UploadContent, - mergeProps({ - ref_key: "uploadRef", - ref: uploadRef - }, uploadContentProps2.value), - { - default: withCtx(() => [ - _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), - !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) - ]), - _: 3 - }, - 16 - ) - ]), - _: 2 - }, [ - _ctx.$slots.file ? { - name: "default", - fn: withCtx(({ file, index }) => [ - renderSlot(_ctx.$slots, "file", { - file, - index - }) - ]), - key: "0" - } : void 0 - ]), 1032, ["disabled", "list-type", "files", "crossorigin", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true), - !isPictureCard.value || isPictureCard.value && !_ctx.showFileList ? (openBlock(), createBlock( - UploadContent, - mergeProps({ - key: 1, - ref_key: "uploadRef", - ref: uploadRef - }, uploadContentProps2.value), - { - default: withCtx(() => [ - _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), - !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) - ]), - _: 3 - }, - 16 - )) : createCommentVNode("v-if", true), - _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true), - renderSlot(_ctx.$slots, "tip"), - !isPictureCard.value && _ctx.showFileList ? (openBlock(), createBlock(UploadList, { - key: 3, - disabled: unref(disabled), - "list-type": _ctx.listType, - files: unref(uploadFiles), - crossorigin: _ctx.crossorigin, - "handle-preview": _ctx.onPreview, - onRemove: unref(handleRemove) - }, createSlots({ - _: 2 - }, [ - _ctx.$slots.file ? { - name: "default", - fn: withCtx(({ file, index }) => [ - renderSlot(_ctx.$slots, "file", { - file, - index - }) - ]), - key: "0" - } : void 0 - ]), 1032, ["disabled", "list-type", "files", "crossorigin", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true) - ]); - }; - } -}); -var Upload = _export_sfc(_sfc_main145, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]); - -// node_modules/element-plus/es/components/upload/index.mjs -var ElUpload = withInstall(Upload); - -// node_modules/element-plus/es/components/watermark/src/watermark.mjs -var watermarkProps = buildProps({ - zIndex: { - type: Number, - default: 9 - }, - rotate: { - type: Number, - default: -22 - }, - width: Number, - height: Number, - image: String, - content: { - type: definePropType([String, Array]), - default: "Element Plus" - }, - font: { - type: definePropType(Object) - }, - gap: { - type: definePropType(Array), - default: () => [100, 100] - }, - offset: { - type: definePropType(Array) - } -}); - -// node_modules/element-plus/es/components/watermark/src/utils.mjs -function toLowercaseSeparator(key) { - return key.replace(/([A-Z])/g, "-$1").toLowerCase(); -} -function getStyleStr(style) { - return Object.keys(style).map( - (key) => `${toLowercaseSeparator(key)}: ${style[key]};` - ).join(" "); -} -function getPixelRatio() { - return window.devicePixelRatio || 1; -} -var reRendering = (mutation, watermarkElement) => { - let flag = false; - if (mutation.removedNodes.length && watermarkElement) { - flag = Array.from(mutation.removedNodes).includes(watermarkElement); - } - if (mutation.type === "attributes" && mutation.target === watermarkElement) { - flag = true; - } - return flag; -}; - -// node_modules/element-plus/es/components/watermark/src/useClips.mjs -var TEXT_ALIGN_RATIO_MAP = { - left: [0, 0.5], - start: [0, 0.5], - center: [0.5, 0], - right: [1, -0.5], - end: [1, -0.5] -}; -function prepareCanvas(width, height, ratio = 1) { - const canvas = document.createElement("canvas"); - const ctx = canvas.getContext("2d"); - const realWidth = width * ratio; - const realHeight = height * ratio; - canvas.setAttribute("width", `${realWidth}px`); - canvas.setAttribute("height", `${realHeight}px`); - ctx.save(); - return [ctx, canvas, realWidth, realHeight]; -} -function useClips() { - function getClips(content, rotate, ratio, width, height, font, gapX, gapY, space) { - const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas( - width, - height, - ratio - ); - let baselineOffset = 0; - if (content instanceof HTMLImageElement) { - ctx.drawImage(content, 0, 0, contentWidth, contentHeight); - } else { - const { - color, - fontSize, - fontStyle, - fontWeight, - fontFamily, - textAlign, - textBaseline - } = font; - const mergedFontSize = Number(fontSize) * ratio; - ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`; - ctx.fillStyle = color; - ctx.textAlign = textAlign; - ctx.textBaseline = textBaseline; - const contents = isArray(content) ? content : [content]; - if (textBaseline !== "top" && contents[0]) { - const argumentMetrics = ctx.measureText(contents[0]); - ctx.textBaseline = "top"; - const topMetrics = ctx.measureText(contents[0]); - baselineOffset = argumentMetrics.actualBoundingBoxAscent - topMetrics.actualBoundingBoxAscent; - } - contents == null ? void 0 : contents.forEach((item, index) => { - const [alignRatio, spaceRatio] = TEXT_ALIGN_RATIO_MAP[textAlign]; - ctx.fillText( - item != null ? item : "", - contentWidth * alignRatio + space * spaceRatio, - index * (mergedFontSize + font.fontGap * ratio) - ); - }); - } - const angle = Math.PI / 180 * Number(rotate); - const maxSize = Math.max(width, height); - const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio); - rCtx.translate(realMaxSize / 2, realMaxSize / 2); - rCtx.rotate(angle); - if (contentWidth > 0 && contentHeight > 0) { - rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2); - } - function getRotatePos(x2, y) { - const targetX = x2 * Math.cos(angle) - y * Math.sin(angle); - const targetY = x2 * Math.sin(angle) + y * Math.cos(angle); - return [targetX, targetY]; - } - let left = 0; - let right = 0; - let top = 0; - let bottom = 0; - const halfWidth = contentWidth / 2; - const halfHeight = contentHeight / 2; - const points = [ - [0 - halfWidth, 0 - halfHeight], - [0 + halfWidth, 0 - halfHeight], - [0 + halfWidth, 0 + halfHeight], - [0 - halfWidth, 0 + halfHeight] - ]; - points.forEach(([x2, y]) => { - const [targetX, targetY] = getRotatePos(x2, y); - left = Math.min(left, targetX); - right = Math.max(right, targetX); - top = Math.min(top, targetY); - bottom = Math.max(bottom, targetY); - }); - const cutLeft = left + realMaxSize / 2; - const cutTop = top + realMaxSize / 2; - const cutWidth = right - left; - const cutHeight = bottom - top; - const realGapX = gapX * ratio; - const realGapY = gapY * ratio; - const filledWidth = (cutWidth + realGapX) * 2; - const filledHeight = cutHeight + realGapY; - const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight); - function drawImg(targetX = 0, targetY = 0) { - fCtx.drawImage( - rCanvas, - cutLeft, - cutTop, - cutWidth, - cutHeight, - targetX, - targetY + baselineOffset, - cutWidth, - cutHeight - ); - } - drawImg(); - drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2); - drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2); - return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio]; - } - return getClips; -} - -// node_modules/element-plus/es/components/watermark/src/watermark2.mjs -var _sfc_main146 = defineComponent({ - ...{ - name: "ElWatermark" - }, - __name: "watermark", - props: watermarkProps, - setup(__props) { - const style = { - position: "relative" - }; - const props2 = __props; - const fontGap = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.fontGap) != null ? _b : 3; - }); - const color = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.color) != null ? _b : "rgba(0,0,0,.15)"; - }); - const fontSize = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.fontSize) != null ? _b : 16; - }); - const fontWeight = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.fontWeight) != null ? _b : "normal"; - }); - const fontStyle = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal"; - }); - const fontFamily = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif"; - }); - const textAlign = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.textAlign) != null ? _b : "center"; - }); - const textBaseline = computed(() => { - var _a, _b; - return (_b = (_a = props2.font) == null ? void 0 : _a.textBaseline) != null ? _b : "hanging"; - }); - const gapX = computed(() => props2.gap[0]); - const gapY = computed(() => props2.gap[1]); - const gapXCenter = computed(() => gapX.value / 2); - const gapYCenter = computed(() => gapY.value / 2); - const offsetLeft = computed(() => { - var _a, _b; - return (_b = (_a = props2.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value; - }); - const offsetTop = computed(() => { - var _a, _b; - return (_b = (_a = props2.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value; - }); - const getMarkStyle = () => { - const markStyle = { - zIndex: props2.zIndex, - position: "absolute", - left: 0, - top: 0, - width: "100%", - height: "100%", - pointerEvents: "none", - backgroundRepeat: "repeat" - }; - let positionLeft = offsetLeft.value - gapXCenter.value; - let positionTop = offsetTop.value - gapYCenter.value; - if (positionLeft > 0) { - markStyle.left = `${positionLeft}px`; - markStyle.width = `calc(100% - ${positionLeft}px)`; - positionLeft = 0; - } - if (positionTop > 0) { - markStyle.top = `${positionTop}px`; - markStyle.height = `calc(100% - ${positionTop}px)`; - positionTop = 0; - } - markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`; - return markStyle; - }; - const containerRef = shallowRef(null); - const watermarkRef = shallowRef(); - const stopObservation = ref(false); - const destroyWatermark = () => { - if (watermarkRef.value) { - watermarkRef.value.remove(); - watermarkRef.value = void 0; - } - }; - const appendWatermark = (base64Url, markWidth) => { - var _a; - if (containerRef.value && watermarkRef.value) { - stopObservation.value = true; - watermarkRef.value.setAttribute( - "style", - getStyleStr({ - ...getMarkStyle(), - backgroundImage: `url('${base64Url}')`, - backgroundSize: `${Math.floor(markWidth)}px` - }) - ); - (_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value); - setTimeout(() => { - stopObservation.value = false; - }); - } - }; - const getMarkSize = (ctx) => { - let defaultWidth = 120; - let defaultHeight = 64; - let space = 0; - const { image, content, width, height, rotate } = props2; - if (!image && ctx.measureText) { - ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`; - const contents = isArray(content) ? content : [content]; - let maxWidth = 0; - let maxHeight = 0; - contents.forEach((item) => { - const { - width: width2, - fontBoundingBoxAscent, - fontBoundingBoxDescent, - actualBoundingBoxAscent, - actualBoundingBoxDescent - } = ctx.measureText(item); - const height2 = isUndefined2(fontBoundingBoxAscent) ? actualBoundingBoxAscent + actualBoundingBoxDescent : fontBoundingBoxAscent + fontBoundingBoxDescent; - if (width2 > maxWidth) - maxWidth = Math.ceil(width2); - if (height2 > maxHeight) - maxHeight = Math.ceil(height2); - }); - defaultWidth = maxWidth; - defaultHeight = maxHeight * contents.length + (contents.length - 1) * fontGap.value; - const angle = Math.PI / 180 * Number(rotate); - space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2); - defaultWidth += space; - } - return [width != null ? width : defaultWidth, height != null ? height : defaultHeight, space]; - }; - const getClips = useClips(); - const renderWatermark = () => { - const canvas = document.createElement("canvas"); - const ctx = canvas.getContext("2d"); - const image = props2.image; - const content = props2.content; - const rotate = props2.rotate; - if (ctx) { - if (!watermarkRef.value) { - watermarkRef.value = document.createElement("div"); - } - const ratio = getPixelRatio(); - const [markWidth, markHeight, space] = getMarkSize(ctx); - const drawCanvas = (drawContent) => { - const [textClips, clipWidth] = getClips( - drawContent || "", - rotate, - ratio, - markWidth, - markHeight, - { - color: color.value, - fontSize: fontSize.value, - fontStyle: fontStyle.value, - fontWeight: fontWeight.value, - fontFamily: fontFamily.value, - fontGap: fontGap.value, - textAlign: textAlign.value, - textBaseline: textBaseline.value - }, - gapX.value, - gapY.value, - space - ); - appendWatermark(textClips, clipWidth); - }; - if (image) { - const img = new Image(); - img.onload = () => { - drawCanvas(img); - }; - img.onerror = () => { - drawCanvas(content); - }; - img.crossOrigin = "anonymous"; - img.referrerPolicy = "no-referrer"; - img.src = image; - } else { - drawCanvas(content); - } - } - }; - onMounted(() => { - renderWatermark(); - }); - watch( - () => props2, - () => { - renderWatermark(); - }, - { - deep: true, - flush: "post" - } - ); - onBeforeUnmount(() => { - destroyWatermark(); - }); - const onMutate = (mutations) => { - if (stopObservation.value) { - return; - } - mutations.forEach((mutation) => { - if (reRendering(mutation, watermarkRef.value)) { - destroyWatermark(); - renderWatermark(); - } - }); - }; - useMutationObserver(containerRef, onMutate, { - attributes: true, - subtree: true, - childList: true - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "containerRef", - ref: containerRef, - style: normalizeStyle([style]) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 4 - ); - }; - } -}); -var Watermark = _export_sfc(_sfc_main146, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/watermark/src/watermark.vue"]]); - -// node_modules/element-plus/es/components/watermark/index.mjs -var ElWatermark = withInstall(Watermark); - -// node_modules/element-plus/es/components/tour/src/mask.mjs -var maskProps = buildProps({ - zIndex: { - type: Number, - default: 1001 - }, - visible: Boolean, - fill: { - type: String, - default: "rgba(0,0,0,0.5)" - }, - pos: { - type: definePropType(Object) - }, - targetAreaClickable: { - type: Boolean, - default: true - } -}); - -// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs -var sides = ["top", "right", "bottom", "left"]; -var alignments = ["start", "end"]; -var placements = sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []); -var min3 = Math.min; -var max3 = Math.max; -var round2 = Math.round; -var floor3 = Math.floor; -var createCoords = (v2) => ({ - x: v2, - y: v2 -}); -var oppositeSideMap = { - left: "right", - right: "left", - bottom: "top", - top: "bottom" -}; -var oppositeAlignmentMap = { - start: "end", - end: "start" -}; -function clamp3(start, value, end) { - return max3(start, min3(value, end)); -} -function evaluate(value, param) { - return typeof value === "function" ? value(param) : value; -} -function getSide(placement) { - return placement.split("-")[0]; -} -function getAlignment(placement) { - return placement.split("-")[1]; -} -function getOppositeAxis(axis) { - return axis === "x" ? "y" : "x"; -} -function getAxisLength(axis) { - return axis === "y" ? "height" : "width"; -} -var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]); -function getSideAxis(placement) { - return yAxisSides.has(getSide(placement)) ? "y" : "x"; -} -function getAlignmentAxis(placement) { - return getOppositeAxis(getSideAxis(placement)); -} -function getAlignmentSides(placement, rects, rtl) { - if (rtl === void 0) { - rtl = false; - } - const alignment = getAlignment(placement); - const alignmentAxis = getAlignmentAxis(placement); - const length = getAxisLength(alignmentAxis); - let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; - if (rects.reference[length] > rects.floating[length]) { - mainAlignmentSide = getOppositePlacement(mainAlignmentSide); - } - return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; -} -function getExpandedPlacements(placement) { - const oppositePlacement = getOppositePlacement(placement); - return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; -} -function getOppositeAlignmentPlacement(placement) { - return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]); -} -var lrPlacement = ["left", "right"]; -var rlPlacement = ["right", "left"]; -var tbPlacement = ["top", "bottom"]; -var btPlacement = ["bottom", "top"]; -function getSideList(side, isStart, rtl) { - switch (side) { - case "top": - case "bottom": - if (rtl) return isStart ? rlPlacement : lrPlacement; - return isStart ? lrPlacement : rlPlacement; - case "left": - case "right": - return isStart ? tbPlacement : btPlacement; - default: - return []; - } -} -function getOppositeAxisPlacements(placement, flipAlignment, direction2, rtl) { - const alignment = getAlignment(placement); - let list = getSideList(getSide(placement), direction2 === "start", rtl); - if (alignment) { - list = list.map((side) => side + "-" + alignment); - if (flipAlignment) { - list = list.concat(list.map(getOppositeAlignmentPlacement)); - } - } - return list; -} -function getOppositePlacement(placement) { - return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]); -} -function expandPaddingObject(padding) { - return { - top: 0, - right: 0, - bottom: 0, - left: 0, - ...padding - }; -} -function getPaddingObject(padding) { - return typeof padding !== "number" ? expandPaddingObject(padding) : { - top: padding, - right: padding, - bottom: padding, - left: padding - }; -} -function rectToClientRect(rect) { - const { - x: x2, - y, - width, - height - } = rect; - return { - width, - height, - top: y, - left: x2, - right: x2 + width, - bottom: y + height, - x: x2, - y - }; -} - -// node_modules/@floating-ui/core/dist/floating-ui.core.mjs -function computeCoordsFromPlacement(_ref, placement, rtl) { - let { - reference, - floating - } = _ref; - const sideAxis = getSideAxis(placement); - const alignmentAxis = getAlignmentAxis(placement); - const alignLength = getAxisLength(alignmentAxis); - const side = getSide(placement); - const isVertical = sideAxis === "y"; - const commonX = reference.x + reference.width / 2 - floating.width / 2; - const commonY = reference.y + reference.height / 2 - floating.height / 2; - const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; - let coords; - switch (side) { - case "top": - coords = { - x: commonX, - y: reference.y - floating.height - }; - break; - case "bottom": - coords = { - x: commonX, - y: reference.y + reference.height - }; - break; - case "right": - coords = { - x: reference.x + reference.width, - y: commonY - }; - break; - case "left": - coords = { - x: reference.x - floating.width, - y: commonY - }; - break; - default: - coords = { - x: reference.x, - y: reference.y - }; - } - switch (getAlignment(placement)) { - case "start": - coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); - break; - case "end": - coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); - break; - } - return coords; -} -var computePosition = async (reference, floating, config) => { - const { - placement = "bottom", - strategy = "absolute", - middleware = [], - platform: platform2 - } = config; - const validMiddleware = middleware.filter(Boolean); - const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating)); - let rects = await platform2.getElementRects({ - reference, - floating, - strategy - }); - let { - x: x2, - y - } = computeCoordsFromPlacement(rects, placement, rtl); - let statefulPlacement = placement; - let middlewareData = {}; - let resetCount = 0; - for (let i = 0; i < validMiddleware.length; i++) { - const { - name, - fn: fn2 - } = validMiddleware[i]; - const { - x: nextX, - y: nextY, - data, - reset - } = await fn2({ - x: x2, - y, - initialPlacement: placement, - placement: statefulPlacement, - strategy, - middlewareData, - rects, - platform: platform2, - elements: { - reference, - floating - } - }); - x2 = nextX != null ? nextX : x2; - y = nextY != null ? nextY : y; - middlewareData = { - ...middlewareData, - [name]: { - ...middlewareData[name], - ...data - } - }; - if (reset && resetCount <= 50) { - resetCount++; - if (typeof reset === "object") { - if (reset.placement) { - statefulPlacement = reset.placement; - } - if (reset.rects) { - rects = reset.rects === true ? await platform2.getElementRects({ - reference, - floating, - strategy - }) : reset.rects; - } - ({ - x: x2, - y - } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); - } - i = -1; - } - } - return { - x: x2, - y, - placement: statefulPlacement, - strategy, - middlewareData - }; -}; -async function detectOverflow(state, options) { - var _await$platform$isEle; - if (options === void 0) { - options = {}; - } - const { - x: x2, - y, - platform: platform2, - rects, - elements, - strategy - } = state; - const { - boundary = "clippingAncestors", - rootBoundary = "viewport", - elementContext = "floating", - altBoundary = false, - padding = 0 - } = evaluate(options, state); - const paddingObject = getPaddingObject(padding); - const altContext = elementContext === "floating" ? "reference" : "floating"; - const element = elements[altBoundary ? altContext : elementContext]; - const clippingClientRect = rectToClientRect(await platform2.getClippingRect({ - element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)), - boundary, - rootBoundary, - strategy - })); - const rect = elementContext === "floating" ? { - x: x2, - y, - width: rects.floating.width, - height: rects.floating.height - } : rects.reference; - const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)); - const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || { - x: 1, - y: 1 - } : { - x: 1, - y: 1 - }; - const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({ - elements, - rect, - offsetParent, - strategy - }) : rect); - return { - top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, - bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, - left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, - right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x - }; -} -var arrow = (options) => ({ - name: "arrow", - options, - async fn(state) { - const { - x: x2, - y, - placement, - rects, - platform: platform2, - elements, - middlewareData - } = state; - const { - element, - padding = 0 - } = evaluate(options, state) || {}; - if (element == null) { - return {}; - } - const paddingObject = getPaddingObject(padding); - const coords = { - x: x2, - y - }; - const axis = getAlignmentAxis(placement); - const length = getAxisLength(axis); - const arrowDimensions = await platform2.getDimensions(element); - const isYAxis = axis === "y"; - const minProp = isYAxis ? "top" : "left"; - const maxProp = isYAxis ? "bottom" : "right"; - const clientProp = isYAxis ? "clientHeight" : "clientWidth"; - const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; - const startDiff = coords[axis] - rects.reference[axis]; - const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element)); - let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; - if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) { - clientSize = elements.floating[clientProp] || rects.floating[length]; - } - const centerToReference = endDiff / 2 - startDiff / 2; - const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; - const minPadding = min3(paddingObject[minProp], largestPossiblePadding); - const maxPadding = min3(paddingObject[maxProp], largestPossiblePadding); - const min$1 = minPadding; - const max4 = clientSize - arrowDimensions[length] - maxPadding; - const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; - const offset3 = clamp3(min$1, center, max4); - const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset3 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; - const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max4 : 0; - return { - [axis]: coords[axis] + alignmentOffset, - data: { - [axis]: offset3, - centerOffset: center - offset3 - alignmentOffset, - ...shouldAddOffset && { - alignmentOffset - } - }, - reset: shouldAddOffset - }; - } -}); -var flip2 = function(options) { - if (options === void 0) { - options = {}; - } - return { - name: "flip", - options, - async fn(state) { - var _middlewareData$arrow, _middlewareData$flip; - const { - placement, - middlewareData, - rects, - initialPlacement, - platform: platform2, - elements - } = state; - const { - mainAxis: checkMainAxis = true, - crossAxis: checkCrossAxis = true, - fallbackPlacements: specifiedFallbackPlacements, - fallbackStrategy = "bestFit", - fallbackAxisSideDirection = "none", - flipAlignment = true, - ...detectOverflowOptions - } = evaluate(options, state); - if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { - return {}; - } - const side = getSide(placement); - const initialSideAxis = getSideAxis(initialPlacement); - const isBasePlacement = getSide(initialPlacement) === initialPlacement; - const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); - const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); - const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none"; - if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { - fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); - } - const placements2 = [initialPlacement, ...fallbackPlacements]; - const overflow = await detectOverflow(state, detectOverflowOptions); - const overflows = []; - let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; - if (checkMainAxis) { - overflows.push(overflow[side]); - } - if (checkCrossAxis) { - const sides2 = getAlignmentSides(placement, rects, rtl); - overflows.push(overflow[sides2[0]], overflow[sides2[1]]); - } - overflowsData = [...overflowsData, { - placement, - overflows - }]; - if (!overflows.every((side2) => side2 <= 0)) { - var _middlewareData$flip2, _overflowsData$filter; - const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; - const nextPlacement = placements2[nextIndex]; - if (nextPlacement) { - const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false; - if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis - // overflows the main axis. - overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : true)) { - return { - data: { - index: nextIndex, - overflows: overflowsData - }, - reset: { - placement: nextPlacement - } - }; - } - } - let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; - if (!resetPlacement) { - switch (fallbackStrategy) { - case "bestFit": { - var _overflowsData$filter2; - const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => { - if (hasFallbackAxisSideDirection) { - const currentSideAxis = getSideAxis(d2.placement); - return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal - // reading directions favoring greater width. - currentSideAxis === "y"; - } - return true; - }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; - if (placement2) { - resetPlacement = placement2; - } - break; - } - case "initialPlacement": - resetPlacement = initialPlacement; - break; - } - } - if (placement !== resetPlacement) { - return { - reset: { - placement: resetPlacement - } - }; - } - } - return {}; - } - }; -}; -var originSides = /* @__PURE__ */ new Set(["left", "top"]); -async function convertValueToCoords(state, options) { - const { - placement, - platform: platform2, - elements - } = state; - const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); - const side = getSide(placement); - const alignment = getAlignment(placement); - const isVertical = getSideAxis(placement) === "y"; - const mainAxisMulti = originSides.has(side) ? -1 : 1; - const crossAxisMulti = rtl && isVertical ? -1 : 1; - const rawValue = evaluate(options, state); - let { - mainAxis, - crossAxis, - alignmentAxis - } = typeof rawValue === "number" ? { - mainAxis: rawValue, - crossAxis: 0, - alignmentAxis: null - } : { - mainAxis: rawValue.mainAxis || 0, - crossAxis: rawValue.crossAxis || 0, - alignmentAxis: rawValue.alignmentAxis - }; - if (alignment && typeof alignmentAxis === "number") { - crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; - } - return isVertical ? { - x: crossAxis * crossAxisMulti, - y: mainAxis * mainAxisMulti - } : { - x: mainAxis * mainAxisMulti, - y: crossAxis * crossAxisMulti - }; -} -var offset = function(options) { - if (options === void 0) { - options = 0; - } - return { - name: "offset", - options, - async fn(state) { - var _middlewareData$offse, _middlewareData$arrow; - const { - x: x2, - y, - placement, - middlewareData - } = state; - const diffCoords = await convertValueToCoords(state, options); - if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { - return {}; - } - return { - x: x2 + diffCoords.x, - y: y + diffCoords.y, - data: { - ...diffCoords, - placement - } - }; - } - }; -}; -var shift = function(options) { - if (options === void 0) { - options = {}; - } - return { - name: "shift", - options, - async fn(state) { - const { - x: x2, - y, - placement - } = state; - const { - mainAxis: checkMainAxis = true, - crossAxis: checkCrossAxis = false, - limiter = { - fn: (_ref) => { - let { - x: x3, - y: y2 - } = _ref; - return { - x: x3, - y: y2 - }; - } - }, - ...detectOverflowOptions - } = evaluate(options, state); - const coords = { - x: x2, - y - }; - const overflow = await detectOverflow(state, detectOverflowOptions); - const crossAxis = getSideAxis(getSide(placement)); - const mainAxis = getOppositeAxis(crossAxis); - let mainAxisCoord = coords[mainAxis]; - let crossAxisCoord = coords[crossAxis]; - if (checkMainAxis) { - const minSide = mainAxis === "y" ? "top" : "left"; - const maxSide = mainAxis === "y" ? "bottom" : "right"; - const min4 = mainAxisCoord + overflow[minSide]; - const max4 = mainAxisCoord - overflow[maxSide]; - mainAxisCoord = clamp3(min4, mainAxisCoord, max4); - } - if (checkCrossAxis) { - const minSide = crossAxis === "y" ? "top" : "left"; - const maxSide = crossAxis === "y" ? "bottom" : "right"; - const min4 = crossAxisCoord + overflow[minSide]; - const max4 = crossAxisCoord - overflow[maxSide]; - crossAxisCoord = clamp3(min4, crossAxisCoord, max4); - } - const limitedCoords = limiter.fn({ - ...state, - [mainAxis]: mainAxisCoord, - [crossAxis]: crossAxisCoord - }); - return { - ...limitedCoords, - data: { - x: limitedCoords.x - x2, - y: limitedCoords.y - y, - enabled: { - [mainAxis]: checkMainAxis, - [crossAxis]: checkCrossAxis - } - } - }; - } - }; -}; - -// node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs -function hasWindow() { - return typeof window !== "undefined"; -} -function getNodeName(node) { - if (isNode(node)) { - return (node.nodeName || "").toLowerCase(); - } - return "#document"; -} -function getWindow(node) { - var _node$ownerDocument; - return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; -} -function getDocumentElement(node) { - var _ref; - return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; -} -function isNode(value) { - if (!hasWindow()) { - return false; - } - return value instanceof Node || value instanceof getWindow(value).Node; -} -function isElement3(value) { - if (!hasWindow()) { - return false; - } - return value instanceof Element || value instanceof getWindow(value).Element; -} -function isHTMLElement2(value) { - if (!hasWindow()) { - return false; - } - return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; -} -function isShadowRoot(value) { - if (!hasWindow() || typeof ShadowRoot === "undefined") { - return false; - } - return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; -} -var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]); -function isOverflowElement(element) { - const { - overflow, - overflowX, - overflowY, - display - } = getComputedStyle2(element); - return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display); -} -var tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]); -function isTableElement(element) { - return tableElements.has(getNodeName(element)); -} -var topLayerSelectors = [":popover-open", ":modal"]; -function isTopLayer(element) { - return topLayerSelectors.some((selector) => { - try { - return element.matches(selector); - } catch (_e) { - return false; - } - }); -} -var transformProperties = ["transform", "translate", "scale", "rotate", "perspective"]; -var willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"]; -var containValues = ["paint", "layout", "strict", "content"]; -function isContainingBlock(elementOrCss) { - const webkit = isWebKit(); - const css = isElement3(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss; - return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value)); -} -function getContainingBlock(element) { - let currentNode = getParentNode(element); - while (isHTMLElement2(currentNode) && !isLastTraversableNode(currentNode)) { - if (isContainingBlock(currentNode)) { - return currentNode; - } else if (isTopLayer(currentNode)) { - return null; - } - currentNode = getParentNode(currentNode); - } - return null; -} -function isWebKit() { - if (typeof CSS === "undefined" || !CSS.supports) return false; - return CSS.supports("-webkit-backdrop-filter", "none"); -} -var lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]); -function isLastTraversableNode(node) { - return lastTraversableNodeNames.has(getNodeName(node)); -} -function getComputedStyle2(element) { - return getWindow(element).getComputedStyle(element); -} -function getNodeScroll(element) { - if (isElement3(element)) { - return { - scrollLeft: element.scrollLeft, - scrollTop: element.scrollTop - }; - } - return { - scrollLeft: element.scrollX, - scrollTop: element.scrollY - }; -} -function getParentNode(node) { - if (getNodeName(node) === "html") { - return node; - } - const result2 = ( - // Step into the shadow DOM of the parent of a slotted node. - node.assignedSlot || // DOM Element detected. - node.parentNode || // ShadowRoot detected. - isShadowRoot(node) && node.host || // Fallback. - getDocumentElement(node) - ); - return isShadowRoot(result2) ? result2.host : result2; -} -function getNearestOverflowAncestor(node) { - const parentNode = getParentNode(node); - if (isLastTraversableNode(parentNode)) { - return node.ownerDocument ? node.ownerDocument.body : node.body; - } - if (isHTMLElement2(parentNode) && isOverflowElement(parentNode)) { - return parentNode; - } - return getNearestOverflowAncestor(parentNode); -} -function getOverflowAncestors(node, list, traverseIframes) { - var _node$ownerDocument2; - if (list === void 0) { - list = []; - } - if (traverseIframes === void 0) { - traverseIframes = true; - } - const scrollableAncestor = getNearestOverflowAncestor(node); - const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); - const win = getWindow(scrollableAncestor); - if (isBody) { - const frameElement = getFrameElement(win); - return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); - } - return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); -} -function getFrameElement(win) { - return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; -} - -// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs -function getCssDimensions(element) { - const css = getComputedStyle2(element); - let width = parseFloat(css.width) || 0; - let height = parseFloat(css.height) || 0; - const hasOffset = isHTMLElement2(element); - const offsetWidth = hasOffset ? element.offsetWidth : width; - const offsetHeight = hasOffset ? element.offsetHeight : height; - const shouldFallback = round2(width) !== offsetWidth || round2(height) !== offsetHeight; - if (shouldFallback) { - width = offsetWidth; - height = offsetHeight; - } - return { - width, - height, - $: shouldFallback - }; -} -function unwrapElement(element) { - return !isElement3(element) ? element.contextElement : element; -} -function getScale(element) { - const domElement = unwrapElement(element); - if (!isHTMLElement2(domElement)) { - return createCoords(1); - } - const rect = domElement.getBoundingClientRect(); - const { - width, - height, - $ - } = getCssDimensions(domElement); - let x2 = ($ ? round2(rect.width) : rect.width) / width; - let y = ($ ? round2(rect.height) : rect.height) / height; - if (!x2 || !Number.isFinite(x2)) { - x2 = 1; - } - if (!y || !Number.isFinite(y)) { - y = 1; - } - return { - x: x2, - y - }; -} -var noOffsets = createCoords(0); -function getVisualOffsets(element) { - const win = getWindow(element); - if (!isWebKit() || !win.visualViewport) { - return noOffsets; - } - return { - x: win.visualViewport.offsetLeft, - y: win.visualViewport.offsetTop - }; -} -function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { - if (isFixed === void 0) { - isFixed = false; - } - if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) { - return false; - } - return isFixed; -} -function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { - if (includeScale === void 0) { - includeScale = false; - } - if (isFixedStrategy === void 0) { - isFixedStrategy = false; - } - const clientRect = element.getBoundingClientRect(); - const domElement = unwrapElement(element); - let scale = createCoords(1); - if (includeScale) { - if (offsetParent) { - if (isElement3(offsetParent)) { - scale = getScale(offsetParent); - } - } else { - scale = getScale(element); - } - } - const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); - let x2 = (clientRect.left + visualOffsets.x) / scale.x; - let y = (clientRect.top + visualOffsets.y) / scale.y; - let width = clientRect.width / scale.x; - let height = clientRect.height / scale.y; - if (domElement) { - const win = getWindow(domElement); - const offsetWin = offsetParent && isElement3(offsetParent) ? getWindow(offsetParent) : offsetParent; - let currentWin = win; - let currentIFrame = getFrameElement(currentWin); - while (currentIFrame && offsetParent && offsetWin !== currentWin) { - const iframeScale = getScale(currentIFrame); - const iframeRect = currentIFrame.getBoundingClientRect(); - const css = getComputedStyle2(currentIFrame); - const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; - const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; - x2 *= iframeScale.x; - y *= iframeScale.y; - width *= iframeScale.x; - height *= iframeScale.y; - x2 += left; - y += top; - currentWin = getWindow(currentIFrame); - currentIFrame = getFrameElement(currentWin); - } - } - return rectToClientRect({ - width, - height, - x: x2, - y - }); -} -function getWindowScrollBarX(element, rect) { - const leftScroll = getNodeScroll(element).scrollLeft; - if (!rect) { - return getBoundingClientRect(getDocumentElement(element)).left + leftScroll; - } - return rect.left + leftScroll; -} -function getHTMLOffset(documentElement, scroll) { - const htmlRect = documentElement.getBoundingClientRect(); - const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect); - const y = htmlRect.top + scroll.scrollTop; - return { - x: x2, - y - }; -} -function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { - let { - elements, - rect, - offsetParent, - strategy - } = _ref; - const isFixed = strategy === "fixed"; - const documentElement = getDocumentElement(offsetParent); - const topLayer = elements ? isTopLayer(elements.floating) : false; - if (offsetParent === documentElement || topLayer && isFixed) { - return rect; - } - let scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - let scale = createCoords(1); - const offsets = createCoords(0); - const isOffsetParentAnElement = isHTMLElement2(offsetParent); - if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { - if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isHTMLElement2(offsetParent)) { - const offsetRect = getBoundingClientRect(offsetParent); - scale = getScale(offsetParent); - offsets.x = offsetRect.x + offsetParent.clientLeft; - offsets.y = offsetRect.y + offsetParent.clientTop; - } - } - const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); - return { - width: rect.width * scale.x, - height: rect.height * scale.y, - x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, - y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y - }; -} -function getClientRects(element) { - return Array.from(element.getClientRects()); -} -function getDocumentRect(element) { - const html = getDocumentElement(element); - const scroll = getNodeScroll(element); - const body = element.ownerDocument.body; - const width = max3(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); - const height = max3(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); - let x2 = -scroll.scrollLeft + getWindowScrollBarX(element); - const y = -scroll.scrollTop; - if (getComputedStyle2(body).direction === "rtl") { - x2 += max3(html.clientWidth, body.clientWidth) - width; - } - return { - width, - height, - x: x2, - y - }; -} -var SCROLLBAR_MAX = 25; -function getViewportRect(element, strategy) { - const win = getWindow(element); - const html = getDocumentElement(element); - const visualViewport = win.visualViewport; - let width = html.clientWidth; - let height = html.clientHeight; - let x2 = 0; - let y = 0; - if (visualViewport) { - width = visualViewport.width; - height = visualViewport.height; - const visualViewportBased = isWebKit(); - if (!visualViewportBased || visualViewportBased && strategy === "fixed") { - x2 = visualViewport.offsetLeft; - y = visualViewport.offsetTop; - } - } - const windowScrollbarX = getWindowScrollBarX(html); - if (windowScrollbarX <= 0) { - const doc = html.ownerDocument; - const body = doc.body; - const bodyStyles = getComputedStyle(body); - const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0; - const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline); - if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) { - width -= clippingStableScrollbarWidth; - } - } else if (windowScrollbarX <= SCROLLBAR_MAX) { - width += windowScrollbarX; - } - return { - width, - height, - x: x2, - y - }; -} -var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]); -function getInnerBoundingClientRect(element, strategy) { - const clientRect = getBoundingClientRect(element, true, strategy === "fixed"); - const top = clientRect.top + element.clientTop; - const left = clientRect.left + element.clientLeft; - const scale = isHTMLElement2(element) ? getScale(element) : createCoords(1); - const width = element.clientWidth * scale.x; - const height = element.clientHeight * scale.y; - const x2 = left * scale.x; - const y = top * scale.y; - return { - width, - height, - x: x2, - y - }; -} -function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { - let rect; - if (clippingAncestor === "viewport") { - rect = getViewportRect(element, strategy); - } else if (clippingAncestor === "document") { - rect = getDocumentRect(getDocumentElement(element)); - } else if (isElement3(clippingAncestor)) { - rect = getInnerBoundingClientRect(clippingAncestor, strategy); - } else { - const visualOffsets = getVisualOffsets(element); - rect = { - x: clippingAncestor.x - visualOffsets.x, - y: clippingAncestor.y - visualOffsets.y, - width: clippingAncestor.width, - height: clippingAncestor.height - }; - } - return rectToClientRect(rect); -} -function hasFixedPositionAncestor(element, stopNode) { - const parentNode = getParentNode(element); - if (parentNode === stopNode || !isElement3(parentNode) || isLastTraversableNode(parentNode)) { - return false; - } - return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode); -} -function getClippingElementAncestors(element, cache2) { - const cachedResult = cache2.get(element); - if (cachedResult) { - return cachedResult; - } - let result2 = getOverflowAncestors(element, [], false).filter((el) => isElement3(el) && getNodeName(el) !== "body"); - let currentContainingBlockComputedStyle = null; - const elementIsFixed = getComputedStyle2(element).position === "fixed"; - let currentNode = elementIsFixed ? getParentNode(element) : element; - while (isElement3(currentNode) && !isLastTraversableNode(currentNode)) { - const computedStyle = getComputedStyle2(currentNode); - const currentNodeIsContaining = isContainingBlock(currentNode); - if (!currentNodeIsContaining && computedStyle.position === "fixed") { - currentContainingBlockComputedStyle = null; - } - const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); - if (shouldDropCurrentNode) { - result2 = result2.filter((ancestor) => ancestor !== currentNode); - } else { - currentContainingBlockComputedStyle = computedStyle; - } - currentNode = getParentNode(currentNode); - } - cache2.set(element, result2); - return result2; -} -function getClippingRect(_ref) { - let { - element, - boundary, - rootBoundary, - strategy - } = _ref; - const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); - const clippingAncestors = [...elementClippingAncestors, rootBoundary]; - const firstClippingAncestor = clippingAncestors[0]; - const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { - const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); - accRect.top = max3(rect.top, accRect.top); - accRect.right = min3(rect.right, accRect.right); - accRect.bottom = min3(rect.bottom, accRect.bottom); - accRect.left = max3(rect.left, accRect.left); - return accRect; - }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); - return { - width: clippingRect.right - clippingRect.left, - height: clippingRect.bottom - clippingRect.top, - x: clippingRect.left, - y: clippingRect.top - }; -} -function getDimensions(element) { - const { - width, - height - } = getCssDimensions(element); - return { - width, - height - }; -} -function getRectRelativeToOffsetParent(element, offsetParent, strategy) { - const isOffsetParentAnElement = isHTMLElement2(offsetParent); - const documentElement = getDocumentElement(offsetParent); - const isFixed = strategy === "fixed"; - const rect = getBoundingClientRect(element, true, isFixed, offsetParent); - let scroll = { - scrollLeft: 0, - scrollTop: 0 - }; - const offsets = createCoords(0); - function setLeftRTLScrollbarOffset() { - offsets.x = getWindowScrollBarX(documentElement); - } - if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { - if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { - scroll = getNodeScroll(offsetParent); - } - if (isOffsetParentAnElement) { - const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); - offsets.x = offsetRect.x + offsetParent.clientLeft; - offsets.y = offsetRect.y + offsetParent.clientTop; - } else if (documentElement) { - setLeftRTLScrollbarOffset(); - } - } - if (isFixed && !isOffsetParentAnElement && documentElement) { - setLeftRTLScrollbarOffset(); - } - const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); - const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; - const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; - return { - x: x2, - y, - width: rect.width, - height: rect.height - }; -} -function isStaticPositioned(element) { - return getComputedStyle2(element).position === "static"; -} -function getTrueOffsetParent(element, polyfill) { - if (!isHTMLElement2(element) || getComputedStyle2(element).position === "fixed") { - return null; - } - if (polyfill) { - return polyfill(element); - } - let rawOffsetParent = element.offsetParent; - if (getDocumentElement(element) === rawOffsetParent) { - rawOffsetParent = rawOffsetParent.ownerDocument.body; - } - return rawOffsetParent; -} -function getOffsetParent(element, polyfill) { - const win = getWindow(element); - if (isTopLayer(element)) { - return win; - } - if (!isHTMLElement2(element)) { - let svgOffsetParent = getParentNode(element); - while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) { - if (isElement3(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { - return svgOffsetParent; - } - svgOffsetParent = getParentNode(svgOffsetParent); - } - return win; - } - let offsetParent = getTrueOffsetParent(element, polyfill); - while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) { - offsetParent = getTrueOffsetParent(offsetParent, polyfill); - } - if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) { - return win; - } - return offsetParent || getContainingBlock(element) || win; -} -var getElementRects = async function(data) { - const getOffsetParentFn = this.getOffsetParent || getOffsetParent; - const getDimensionsFn = this.getDimensions; - const floatingDimensions = await getDimensionsFn(data.floating); - return { - reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), - floating: { - x: 0, - y: 0, - width: floatingDimensions.width, - height: floatingDimensions.height - } - }; -}; -function isRTL2(element) { - return getComputedStyle2(element).direction === "rtl"; -} -var platform = { - convertOffsetParentRelativeRectToViewportRelativeRect, - getDocumentElement, - getClippingRect, - getOffsetParent, - getElementRects, - getClientRects, - getDimensions, - getScale, - isElement: isElement3, - isRTL: isRTL2 -}; -function rectsAreEqual(a2, b2) { - return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height; -} -function observeMove(element, onMove) { - let io = null; - let timeoutId; - const root2 = getDocumentElement(element); - function cleanup() { - var _io; - clearTimeout(timeoutId); - (_io = io) == null || _io.disconnect(); - io = null; - } - function refresh(skip, threshold) { - if (skip === void 0) { - skip = false; - } - if (threshold === void 0) { - threshold = 1; - } - cleanup(); - const elementRectForRootMargin = element.getBoundingClientRect(); - const { - left, - top, - width, - height - } = elementRectForRootMargin; - if (!skip) { - onMove(); - } - if (!width || !height) { - return; - } - const insetTop = floor3(top); - const insetRight = floor3(root2.clientWidth - (left + width)); - const insetBottom = floor3(root2.clientHeight - (top + height)); - const insetLeft = floor3(left); - const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; - const options = { - rootMargin, - threshold: max3(0, min3(1, threshold)) || 1 - }; - let isFirstUpdate = true; - function handleObserve(entries) { - const ratio = entries[0].intersectionRatio; - if (ratio !== threshold) { - if (!isFirstUpdate) { - return refresh(); - } - if (!ratio) { - timeoutId = setTimeout(() => { - refresh(false, 1e-7); - }, 1e3); - } else { - refresh(false, ratio); - } - } - if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) { - refresh(); - } - isFirstUpdate = false; - } - try { - io = new IntersectionObserver(handleObserve, { - ...options, - // Handle s - root: root2.ownerDocument - }); - } catch (_e) { - io = new IntersectionObserver(handleObserve, options); - } - io.observe(element); - } - refresh(true); - return cleanup; -} -function autoUpdate(reference, floating, update2, options) { - if (options === void 0) { - options = {}; - } - const { - ancestorScroll = true, - ancestorResize = true, - elementResize = typeof ResizeObserver === "function", - layoutShift = typeof IntersectionObserver === "function", - animationFrame = false - } = options; - const referenceEl = unwrapElement(reference); - const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : []; - ancestors.forEach((ancestor) => { - ancestorScroll && ancestor.addEventListener("scroll", update2, { - passive: true - }); - ancestorResize && ancestor.addEventListener("resize", update2); - }); - const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2) : null; - let reobserveFrame = -1; - let resizeObserver = null; - if (elementResize) { - resizeObserver = new ResizeObserver((_ref) => { - let [firstEntry] = _ref; - if (firstEntry && firstEntry.target === referenceEl && resizeObserver) { - resizeObserver.unobserve(floating); - cancelAnimationFrame(reobserveFrame); - reobserveFrame = requestAnimationFrame(() => { - var _resizeObserver; - (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating); - }); - } - update2(); - }); - if (referenceEl && !animationFrame) { - resizeObserver.observe(referenceEl); - } - resizeObserver.observe(floating); - } - let frameId; - let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; - if (animationFrame) { - frameLoop(); - } - function frameLoop() { - const nextRefRect = getBoundingClientRect(reference); - if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) { - update2(); - } - prevRefRect = nextRefRect; - frameId = requestAnimationFrame(frameLoop); - } - update2(); - return () => { - var _resizeObserver2; - ancestors.forEach((ancestor) => { - ancestorScroll && ancestor.removeEventListener("scroll", update2); - ancestorResize && ancestor.removeEventListener("resize", update2); - }); - cleanupIo == null || cleanupIo(); - (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(); - resizeObserver = null; - if (animationFrame) { - cancelAnimationFrame(frameId); - } - }; -} -var detectOverflow2 = detectOverflow; -var offset2 = offset; -var shift2 = shift; -var flip3 = flip2; -var arrow2 = arrow; -var computePosition2 = (reference, floating, options) => { - const cache2 = /* @__PURE__ */ new Map(); - const mergedOptions = { - platform, - ...options - }; - const platformWithCache = { - ...mergedOptions.platform, - _c: cache2 - }; - return computePosition(reference, floating, { - ...mergedOptions, - platform: platformWithCache - }); -}; - -// node_modules/element-plus/es/components/tour/src/helper.mjs -var useTarget = (target2, open, gap, mergedMask, scrollIntoViewOptions) => { - const posInfo = ref(null); - const getTargetEl = () => { - let targetEl; - if (isString(target2.value)) { - targetEl = document.querySelector(target2.value); - } else if (isFunction(target2.value)) { - targetEl = target2.value(); - } else { - targetEl = target2.value; - } - return targetEl; - }; - const updatePosInfo = () => { - const targetEl = getTargetEl(); - if (!targetEl || !open.value) { - posInfo.value = null; - return; - } - if (!isInViewPort(targetEl)) { - targetEl.scrollIntoView(scrollIntoViewOptions.value); - } - const { left, top, width, height } = targetEl.getBoundingClientRect(); - posInfo.value = { - left, - top, - width, - height, - radius: 0 - }; - }; - onMounted(() => { - watch( - [open, target2], - () => { - updatePosInfo(); - }, - { - immediate: true - } - ); - window.addEventListener("resize", updatePosInfo); - }); - onBeforeUnmount(() => { - window.removeEventListener("resize", updatePosInfo); - }); - const getGapOffset = (index) => { - var _a; - return (_a = isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) != null ? _a : 6; - }; - const mergedPosInfo = computed(() => { - var _a; - if (!posInfo.value) - return posInfo.value; - const gapOffsetX = getGapOffset(0); - const gapOffsetY = getGapOffset(1); - const gapRadius = ((_a = gap.value) == null ? void 0 : _a.radius) || 2; - return { - left: posInfo.value.left - gapOffsetX, - top: posInfo.value.top - gapOffsetY, - width: posInfo.value.width + gapOffsetX * 2, - height: posInfo.value.height + gapOffsetY * 2, - radius: gapRadius - }; - }); - const triggerTarget = computed(() => { - const targetEl = getTargetEl(); - if (!mergedMask.value || !targetEl || !window.DOMRect) { - return targetEl || void 0; - } - return { - getBoundingClientRect() { - var _a, _b, _c, _d; - return window.DOMRect.fromRect({ - width: ((_a = mergedPosInfo.value) == null ? void 0 : _a.width) || 0, - height: ((_b = mergedPosInfo.value) == null ? void 0 : _b.height) || 0, - x: ((_c = mergedPosInfo.value) == null ? void 0 : _c.left) || 0, - y: ((_d = mergedPosInfo.value) == null ? void 0 : _d.top) || 0 - }); - } - }; - }); - return { - mergedPosInfo, - triggerTarget - }; -}; -var tourKey = Symbol("ElTour"); -function isInViewPort(element) { - const viewWidth = window.innerWidth || document.documentElement.clientWidth; - const viewHeight = window.innerHeight || document.documentElement.clientHeight; - const { top, right, bottom, left } = element.getBoundingClientRect(); - return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight; -} -var useFloating = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex2, showArrow) => { - const x2 = ref(); - const y = ref(); - const middlewareData = ref({}); - const states = { - x: x2, - y, - placement, - strategy, - middlewareData - }; - const middleware = computed(() => { - const _middleware = [ - offset2(unref(offset$1)), - flip3(), - shift2(), - overflowMiddleware() - ]; - if (unref(showArrow) && unref(arrowRef)) { - _middleware.push( - arrow2({ - element: unref(arrowRef) - }) - ); - } - return _middleware; - }); - const update2 = async () => { - if (!isClient) - return; - const referenceEl = unref(referenceRef); - const contentEl = unref(contentRef); - if (!referenceEl || !contentEl) - return; - const data = await computePosition2(referenceEl, contentEl, { - placement: unref(placement), - strategy: unref(strategy), - middleware: unref(middleware) - }); - keysOf(states).forEach((key) => { - states[key].value = data[key]; - }); - }; - const contentStyle = computed(() => { - if (!unref(referenceRef)) { - return { - position: "fixed", - top: "50%", - left: "50%", - transform: "translate3d(-50%, -50%, 0)", - maxWidth: "100vw", - zIndex: unref(zIndex2) - }; - } - const { overflow } = unref(middlewareData); - return { - position: unref(strategy), - zIndex: unref(zIndex2), - top: unref(y) != null ? `${unref(y)}px` : "", - left: unref(x2) != null ? `${unref(x2)}px` : "", - maxWidth: (overflow == null ? void 0 : overflow.maxWidth) ? `${overflow == null ? void 0 : overflow.maxWidth}px` : "" - }; - }); - const arrowStyle = computed(() => { - if (!unref(showArrow)) - return {}; - const { arrow: arrow22 } = unref(middlewareData); - return { - left: (arrow22 == null ? void 0 : arrow22.x) != null ? `${arrow22 == null ? void 0 : arrow22.x}px` : "", - top: (arrow22 == null ? void 0 : arrow22.y) != null ? `${arrow22 == null ? void 0 : arrow22.y}px` : "" - }; - }); - let cleanup; - onMounted(() => { - const referenceEl = unref(referenceRef); - const contentEl = unref(contentRef); - if (referenceEl && contentEl) { - cleanup = autoUpdate(referenceEl, contentEl, update2); - } - watchEffect(() => { - update2(); - }); - }); - onBeforeUnmount(() => { - cleanup && cleanup(); - }); - return { - update: update2, - contentStyle, - arrowStyle - }; -}; -var overflowMiddleware = () => { - return { - name: "overflow", - async fn(state) { - const overflow = await detectOverflow2(state); - let overWidth = 0; - if (overflow.left > 0) - overWidth = overflow.left; - if (overflow.right > 0) - overWidth = overflow.right; - const floatingWidth = state.rects.floating.width; - return { - data: { - maxWidth: floatingWidth - overWidth - } - }; - } - }; -}; - -// node_modules/element-plus/es/components/tour/src/mask2.mjs -var _hoisted_176 = { style: { - width: "100%", - height: "100%" -} }; -var _hoisted_242 = ["d"]; -var _sfc_main147 = defineComponent({ - ...{ - name: "ElTourMask", - inheritAttrs: false - }, - __name: "mask", - props: maskProps, - setup(__props) { - const props2 = __props; - const { ns } = inject(tourKey); - const radius = computed(() => { - var _a, _b; - return (_b = (_a = props2.pos) == null ? void 0 : _a.radius) != null ? _b : 2; - }); - const roundInfo = computed(() => { - const v2 = radius.value; - const baseInfo = `a${v2},${v2} 0 0 1`; - return { - topRight: `${baseInfo} ${v2},${v2}`, - bottomRight: `${baseInfo} ${-v2},${v2}`, - bottomLeft: `${baseInfo} ${-v2},${-v2}`, - topLeft: `${baseInfo} ${v2},${-v2}` - }; - }); - const { width: windowWidth, height: windowHeight } = useWindowSize(); - const path = computed(() => { - const width = windowWidth.value; - const height = windowHeight.value; - const info = roundInfo.value; - const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`; - const _radius = radius.value; - return props2.pos ? `${_path} M${props2.pos.left + _radius},${props2.pos.top} h${props2.pos.width - _radius * 2} ${info.topRight} v${props2.pos.height - _radius * 2} ${info.bottomRight} h${-props2.pos.width + _radius * 2} ${info.bottomLeft} v${-props2.pos.height + _radius * 2} ${info.topLeft} z` : _path; - }); - const maskStyle = computed(() => ({ - position: "fixed", - left: 0, - right: 0, - top: 0, - bottom: 0, - zIndex: props2.zIndex, - pointerEvents: props2.pos && props2.targetAreaClickable ? "none" : "auto" - })); - const pathStyle = computed(() => ({ - fill: props2.fill, - pointerEvents: "auto", - cursor: "auto" - })); - useLockscreen(toRef(props2, "visible"), { - ns - }); - return (_ctx, _cache) => { - return _ctx.visible ? (openBlock(), createElementBlock( - "div", - mergeProps({ - key: 0, - class: unref(ns).e("mask"), - style: maskStyle.value - }, _ctx.$attrs), - [ - (openBlock(), createElementBlock("svg", _hoisted_176, [ - createBaseVNode("path", { - class: normalizeClass(unref(ns).e("hollow")), - style: normalizeStyle(pathStyle.value), - d: path.value - }, null, 14, _hoisted_242) - ])) - ], - 16 - )) : createCommentVNode("v-if", true); - }; - } -}); -var ElTourMask = _export_sfc(_sfc_main147, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tour/src/mask.vue"]]); - -// node_modules/element-plus/es/components/tour/src/content.mjs -var tourStrategies = ["absolute", "fixed"]; -var tourPlacements = [ - "top-start", - "top-end", - "top", - "bottom-start", - "bottom-end", - "bottom", - "left-start", - "left-end", - "left", - "right-start", - "right-end", - "right" -]; -var tourContentProps = buildProps({ - placement: { - type: definePropType(String), - values: tourPlacements, - default: "bottom" - }, - reference: { - type: definePropType(Object), - default: null - }, - strategy: { - type: definePropType(String), - values: tourStrategies, - default: "absolute" - }, - offset: { - type: Number, - default: 10 - }, - showArrow: Boolean, - zIndex: { - type: Number, - default: 2001 - } -}); -var tourContentEmits = { - close: () => true -}; - -// node_modules/element-plus/es/components/tour/src/content2.mjs -var _hoisted_177 = ["data-side"]; -var _sfc_main148 = defineComponent({ - ...{ - name: "ElTourContent" - }, - __name: "content", - props: tourContentProps, - emits: tourContentEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const placement = ref(props2.placement); - const strategy = ref(props2.strategy); - const contentRef = ref(null); - const arrowRef = ref(null); - watch( - () => props2.placement, - () => { - placement.value = props2.placement; - } - ); - const { contentStyle, arrowStyle } = useFloating( - toRef(props2, "reference"), - contentRef, - arrowRef, - placement, - strategy, - toRef(props2, "offset"), - toRef(props2, "zIndex"), - toRef(props2, "showArrow") - ); - const side = computed(() => { - return placement.value.split("-")[0]; - }); - const { ns } = inject(tourKey); - const onCloseRequested = () => { - emit("close"); - }; - const onFocusoutPrevented = (event) => { - if (event.detail.focusReason === "pointer") { - event.preventDefault(); - } - }; - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - ref_key: "contentRef", - ref: contentRef, - style: normalizeStyle(unref(contentStyle)), - class: normalizeClass(unref(ns).e("content")), - "data-side": side.value, - tabindex: "-1" - }, [ - createVNode(unref(ElFocusTrap), { - loop: "", - trapped: "", - "focus-start-el": "container", - "focus-trap-el": contentRef.value || void 0, - onReleaseRequested: onCloseRequested, - onFocusoutPrevented - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["focus-trap-el"]), - _ctx.showArrow ? (openBlock(), createElementBlock( - "span", - { - key: 0, - ref_key: "arrowRef", - ref: arrowRef, - style: normalizeStyle(unref(arrowStyle)), - class: normalizeClass(unref(ns).e("arrow")) - }, - null, - 6 - )) : createCommentVNode("v-if", true) - ], 14, _hoisted_177); - }; - } -}); -var ElTourContent = _export_sfc(_sfc_main148, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tour/src/content.vue"]]); - -// node_modules/element-plus/es/components/tour/src/steps.mjs -var ElTourSteps = defineComponent({ - name: "ElTourSteps", - props: { - current: { - type: Number, - default: 0 - } - }, - emits: ["update-total"], - setup(props2, { slots, emit }) { - let cacheTotal = 0; - return () => { - var _a, _b; - const children = (_a = slots.default) == null ? void 0 : _a.call(slots); - const result2 = []; - let total2 = 0; - function filterSteps(children2) { - if (!isArray(children2)) - return; - children2.forEach((item) => { - var _a2; - const name = (_a2 = (item == null ? void 0 : item.type) || {}) == null ? void 0 : _a2.name; - if (name === "ElTourStep") { - result2.push(item); - total2 += 1; - } - }); - } - if (children.length) { - filterSteps(flattedChildren((_b = children[0]) == null ? void 0 : _b.children)); - } - if (cacheTotal !== total2) { - cacheTotal = total2; - emit("update-total", total2); - } - if (result2.length) { - return result2[props2.current]; - } - return null; - }; - } -}); - -// node_modules/element-plus/es/components/tour/src/tour.mjs -var tourProps = buildProps({ - modelValue: Boolean, - current: { - type: Number, - default: 0 - }, - showArrow: { - type: Boolean, - default: true - }, - showClose: { - type: Boolean, - default: true - }, - closeIcon: { - type: iconPropType - }, - placement: tourContentProps.placement, - contentStyle: { - type: definePropType([Object]) - }, - mask: { - type: definePropType([Boolean, Object]), - default: true - }, - gap: { - type: definePropType(Object), - default: () => ({ - offset: 6, - radius: 2 - }) - }, - zIndex: { - type: Number - }, - scrollIntoViewOptions: { - type: definePropType([Boolean, Object]), - default: () => ({ - block: "center" - }) - }, - type: { - type: definePropType(String) - }, - appendTo: { - type: teleportProps.to.type, - default: "body" - }, - closeOnPressEscape: { - type: Boolean, - default: true - }, - targetAreaClickable: { - type: Boolean, - default: true - } -}); -var tourEmits = { - [UPDATE_MODEL_EVENT]: (value) => isBoolean2(value), - ["update:current"]: (current) => isNumber2(current), - close: (current) => isNumber2(current), - finish: () => true, - change: (current) => isNumber2(current) -}; - -// node_modules/element-plus/es/components/tour/src/tour2.mjs -var _sfc_main149 = defineComponent({ - ...{ - name: "ElTour", - inheritAttrs: false - }, - __name: "tour", - props: tourProps, - emits: tourEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("tour"); - const total2 = ref(0); - const currentStep = ref(); - const current = useVModel(props2, "current", emit, { - passive: true - }); - const currentTarget = computed(() => { - var _a; - return (_a = currentStep.value) == null ? void 0 : _a.target; - }); - const kls = computed(() => [ - ns.b(), - mergedType.value === "primary" ? ns.m("primary") : "" - ]); - const mergedPlacement = computed( - () => { - var _a; - return ((_a = currentStep.value) == null ? void 0 : _a.placement) || props2.placement; - } - ); - const mergedContentStyle = computed( - () => { - var _a, _b; - return (_b = (_a = currentStep.value) == null ? void 0 : _a.contentStyle) != null ? _b : props2.contentStyle; - } - ); - const mergedMask = computed(() => { - var _a, _b; - return (_b = (_a = currentStep.value) == null ? void 0 : _a.mask) != null ? _b : props2.mask; - }); - const mergedShowMask = computed(() => !!mergedMask.value && props2.modelValue); - const mergedMaskStyle = computed( - () => isBoolean2(mergedMask.value) ? void 0 : mergedMask.value - ); - const mergedShowArrow = computed( - () => { - var _a, _b; - return !!currentTarget.value && ((_b = (_a = currentStep.value) == null ? void 0 : _a.showArrow) != null ? _b : props2.showArrow); - } - ); - const mergedScrollIntoViewOptions = computed( - () => { - var _a, _b; - return (_b = (_a = currentStep.value) == null ? void 0 : _a.scrollIntoViewOptions) != null ? _b : props2.scrollIntoViewOptions; - } - ); - const mergedType = computed(() => { - var _a, _b; - return (_b = (_a = currentStep.value) == null ? void 0 : _a.type) != null ? _b : props2.type; - }); - const { nextZIndex } = useZIndex(); - const nowZIndex = nextZIndex(); - const mergedZIndex = computed(() => { - var _a; - return (_a = props2.zIndex) != null ? _a : nowZIndex; - }); - const { mergedPosInfo: pos, triggerTarget } = useTarget( - currentTarget, - toRef(props2, "modelValue"), - toRef(props2, "gap"), - mergedMask, - mergedScrollIntoViewOptions - ); - watch( - () => props2.modelValue, - (val) => { - if (!val) { - current.value = 0; - } - } - ); - const onEscClose = () => { - if (props2.closeOnPressEscape) { - emit(UPDATE_MODEL_EVENT, false); - emit("close", current.value); - } - }; - const onUpdateTotal = (val) => { - total2.value = val; - }; - const slots = useSlots(); - provide(tourKey, { - currentStep, - current, - total: total2, - showClose: toRef(props2, "showClose"), - closeIcon: toRef(props2, "closeIcon"), - mergedType, - ns, - slots, - updateModelValue(modelValue) { - emit(UPDATE_MODEL_EVENT, modelValue); - }, - onClose() { - emit("close", current.value); - }, - onFinish() { - emit("finish"); - }, - onChange() { - emit(CHANGE_EVENT, current.value); - } - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - Fragment, - null, - [ - createVNode(unref(ElTeleport), { to: _ctx.appendTo }, { - default: withCtx(() => { - var _a, _b; - return [ - createBaseVNode( - "div", - mergeProps({ class: kls.value }, _ctx.$attrs), - [ - createVNode(ElTourMask, { - visible: mergedShowMask.value, - fill: (_a = mergedMaskStyle.value) == null ? void 0 : _a.color, - style: normalizeStyle((_b = mergedMaskStyle.value) == null ? void 0 : _b.style), - pos: unref(pos), - "z-index": mergedZIndex.value, - "target-area-clickable": _ctx.targetAreaClickable - }, null, 8, ["visible", "fill", "style", "pos", "z-index", "target-area-clickable"]), - _ctx.modelValue ? (openBlock(), createBlock(ElTourContent, { - key: unref(current), - reference: unref(triggerTarget), - placement: mergedPlacement.value, - "show-arrow": mergedShowArrow.value, - "z-index": mergedZIndex.value, - style: normalizeStyle(mergedContentStyle.value), - onClose: onEscClose - }, { - default: withCtx(() => [ - createVNode(unref(ElTourSteps), { - current: unref(current), - onUpdateTotal - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "default") - ]), - _: 3 - }, 8, ["current"]) - ]), - _: 3 - }, 8, ["reference", "placement", "show-arrow", "z-index", "style"])) : createCommentVNode("v-if", true) - ], - 16 - ) - ]; - }), - _: 3 - }, 8, ["to"]), - createCommentVNode(" just for IDE "), - createCommentVNode("v-if", true) - ], - 64 - ); - }; - } -}); -var Tour = _export_sfc(_sfc_main149, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tour/src/tour.vue"]]); - -// node_modules/element-plus/es/components/tour/src/step.mjs -var tourStepProps = buildProps({ - target: { - type: definePropType([String, Object, Function]) - }, - title: String, - description: String, - showClose: { - type: Boolean, - default: void 0 - }, - closeIcon: { - type: iconPropType - }, - showArrow: { - type: Boolean, - default: void 0 - }, - placement: tourContentProps.placement, - mask: { - type: definePropType([Boolean, Object]), - default: void 0 - }, - contentStyle: { - type: definePropType([Object]) - }, - prevButtonProps: { - type: definePropType(Object) - }, - nextButtonProps: { - type: definePropType(Object) - }, - scrollIntoViewOptions: { - type: definePropType([Boolean, Object]), - default: void 0 - }, - type: { - type: definePropType(String) - } -}); -var tourStepEmits = { - close: () => true -}; - -// node_modules/element-plus/es/components/tour/src/step2.mjs -var _hoisted_178 = ["aria-label"]; -var _sfc_main150 = defineComponent({ - ...{ - name: "ElTourStep" - }, - __name: "step", - props: tourStepProps, - emits: tourStepEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const { Close } = CloseComponents; - const { t } = useLocale(); - const { - currentStep, - current, - total: total2, - showClose, - closeIcon, - mergedType, - ns, - slots: tourSlots, - updateModelValue, - onClose: tourOnClose, - onFinish: tourOnFinish, - onChange - } = inject(tourKey); - watch( - props2, - (val) => { - currentStep.value = val; - }, - { - immediate: true - } - ); - const mergedShowClose = computed(() => { - var _a; - return (_a = props2.showClose) != null ? _a : showClose.value; - }); - const mergedCloseIcon = computed( - () => { - var _a, _b; - return (_b = (_a = props2.closeIcon) != null ? _a : closeIcon.value) != null ? _b : Close; - } - ); - const filterButtonProps = (btnProps) => { - if (!btnProps) - return; - return omit_default(btnProps, ["children", "onClick"]); - }; - const onPrev = () => { - var _a, _b; - current.value -= 1; - if ((_a = props2.prevButtonProps) == null ? void 0 : _a.onClick) { - (_b = props2.prevButtonProps) == null ? void 0 : _b.onClick(); - } - onChange(); - }; - const onNext = () => { - var _a; - if (current.value >= total2.value - 1) { - onFinish(); - } else { - current.value += 1; - } - if ((_a = props2.nextButtonProps) == null ? void 0 : _a.onClick) { - props2.nextButtonProps.onClick(); - } - onChange(); - }; - const onFinish = () => { - onClose(); - tourOnFinish(); - }; - const onClose = () => { - updateModelValue(false); - tourOnClose(); - emit("close"); - }; - const handleKeydown = (e) => { - const target2 = e.target; - if (target2 == null ? void 0 : target2.isContentEditable) - return; - const code = getEventCode(e); - switch (code) { - case EVENT_CODE.left: - e.preventDefault(); - current.value > 0 && onPrev(); - break; - case EVENT_CODE.right: - e.preventDefault(); - onNext(); - break; - } - }; - onMounted(() => { - window.addEventListener("keydown", handleKeydown); - }); - onBeforeUnmount(() => { - window.removeEventListener("keydown", handleKeydown); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - Fragment, - null, - [ - mergedShowClose.value ? (openBlock(), createElementBlock("button", { - key: 0, - "aria-label": unref(t)("el.tour.close"), - class: normalizeClass(unref(ns).e("closebtn")), - type: "button", - onClick: onClose - }, [ - createVNode(unref(ElIcon), { - class: normalizeClass(unref(ns).e("close")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(mergedCloseIcon.value))) - ]), - _: 1 - }, 8, ["class"]) - ], 10, _hoisted_178)) : createCommentVNode("v-if", true), - createBaseVNode( - "header", - { - class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }]) - }, - [ - renderSlot(_ctx.$slots, "header", {}, () => [ - createBaseVNode( - "span", - { - role: "heading", - class: normalizeClass(unref(ns).e("title")) - }, - toDisplayString(_ctx.title), - 3 - ) - ]) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("body")) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createBaseVNode( - "span", - null, - toDisplayString(_ctx.description), - 1 - ) - ]) - ], - 2 - ), - createBaseVNode( - "footer", - { - class: normalizeClass(unref(ns).e("footer")) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).b("indicators")) - }, - [ - unref(tourSlots).indicators ? (openBlock(), createBlock(resolveDynamicComponent(unref(tourSlots).indicators), { - key: 0, - current: unref(current), - total: unref(total2) - }, null, 8, ["current", "total"])) : (openBlock(true), createElementBlock( - Fragment, - { key: 1 }, - renderList(unref(total2), (item, index) => { - return openBlock(), createElementBlock( - "span", - { - key: item, - class: normalizeClass([unref(ns).b("indicator"), unref(ns).is("active", index === unref(current))]) - }, - null, - 2 - ); - }), - 128 - )) - ], - 2 - ), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).b("buttons")) - }, - [ - unref(current) > 0 ? (openBlock(), createBlock(unref(ElButton), mergeProps({ - key: 0, - size: "small", - type: unref(mergedType) - }, filterButtonProps(_ctx.prevButtonProps), { onClick: onPrev }), { - default: withCtx(() => { - var _a, _b; - return [ - createTextVNode( - toDisplayString((_b = (_a = _ctx.prevButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(t)("el.tour.previous")), - 1 - ) - ]; - }), - _: 1 - }, 16, ["type"])) : createCommentVNode("v-if", true), - unref(current) <= unref(total2) - 1 ? (openBlock(), createBlock(unref(ElButton), mergeProps({ - key: 1, - size: "small", - type: unref(mergedType) === "primary" ? "default" : "primary" - }, filterButtonProps(_ctx.nextButtonProps), { onClick: onNext }), { - default: withCtx(() => { - var _a, _b; - return [ - createTextVNode( - toDisplayString((_b = (_a = _ctx.nextButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(current) === unref(total2) - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next")), - 1 - ) - ]; - }), - _: 1 - }, 16, ["type"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], - 2 - ) - ], - 64 - ); - }; - } -}); -var TourStep = _export_sfc(_sfc_main150, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tour/src/step.vue"]]); - -// node_modules/element-plus/es/components/tour/index.mjs -var ElTour = withInstall(Tour, { - TourStep -}); -var ElTourStep = withNoopInstall(TourStep); - -// node_modules/element-plus/es/components/anchor/src/anchor.mjs -var anchorProps = buildProps({ - container: { - type: definePropType([ - String, - Object - ]) - }, - offset: { - type: Number, - default: 0 - }, - bound: { - type: Number, - default: 15 - }, - duration: { - type: Number, - default: 300 - }, - marker: { - type: Boolean, - default: true - }, - type: { - type: definePropType(String), - default: "default" - }, - direction: { - type: definePropType(String), - default: "vertical" - }, - selectScrollTop: Boolean -}); -var anchorEmits = { - change: (href) => isString(href), - click: (e, href) => e instanceof MouseEvent && (isString(href) || isUndefined2(href)) -}; - -// node_modules/element-plus/es/components/anchor/src/constants.mjs -var anchorKey = Symbol("anchor"); - -// node_modules/element-plus/es/utils/dom/element.mjs -var getElement = (target2) => { - if (!isClient || target2 === "") - return null; - if (isString(target2)) { - try { - return document.querySelector(target2); - } catch (e) { - return null; - } - } - return target2; -}; - -// node_modules/element-plus/es/utils/throttleByRaf.mjs -function throttleByRaf(cb) { - let timer = 0; - const throttle2 = (...args) => { - if (timer) { - cAF(timer); - } - timer = rAF(() => { - cb(...args); - timer = 0; - }); - }; - throttle2.cancel = () => { - cAF(timer); - timer = 0; - }; - return throttle2; -} - -// node_modules/element-plus/es/components/anchor/src/anchor2.mjs -var _sfc_main151 = defineComponent({ - ...{ - name: "ElAnchor" - }, - __name: "anchor", - props: anchorProps, - emits: anchorEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const slots = useSlots(); - const currentAnchor = ref(""); - const markerStyle = ref({}); - const anchorRef = ref(null); - const markerRef = ref(null); - const containerEl = ref(); - const links = {}; - let isScrolling = false; - let currentScrollTop = 0; - const ns = useNamespace("anchor"); - const cls = computed(() => [ - ns.b(), - props2.type === "underline" ? ns.m("underline") : "", - ns.m(props2.direction) - ]); - const addLink = (state) => { - links[state.href] = state.el; - }; - const removeLink = (href) => { - delete links[href]; - }; - const setCurrentAnchor = (href) => { - const activeHref = currentAnchor.value; - if (activeHref !== href) { - currentAnchor.value = href; - emit(CHANGE_EVENT, href); - } - }; - let clearAnimate = null; - let currentTargetHref = ""; - const scrollToAnchor = (href) => { - if (!containerEl.value) - return; - const target2 = getElement(href); - if (!target2) - return; - if (clearAnimate) { - if (currentTargetHref === href) - return; - clearAnimate(); - } - currentTargetHref = href; - isScrolling = true; - const scrollEle = getScrollElement(target2, containerEl.value); - const distance = getOffsetTopDistance(target2, scrollEle); - const max4 = scrollEle.scrollHeight - scrollEle.clientHeight; - const to = Math.min(distance - props2.offset, max4); - clearAnimate = animateScrollTo( - containerEl.value, - currentScrollTop, - to, - props2.duration, - () => { - setTimeout(() => { - isScrolling = false; - currentTargetHref = ""; - }, 20); - } - ); - }; - const scrollTo2 = (href) => { - if (href) { - setCurrentAnchor(href); - scrollToAnchor(href); - } - }; - const handleClick = (e, href) => { - emit("click", e, href); - scrollTo2(href); - }; - const handleScroll2 = throttleByRaf(() => { - if (containerEl.value) { - currentScrollTop = getScrollTop(containerEl.value); - } - const currentHref = getCurrentHref(); - if (isScrolling || isUndefined2(currentHref)) - return; - setCurrentAnchor(currentHref); - }); - const getCurrentHref = () => { - if (!containerEl.value) - return; - const scrollTop = getScrollTop(containerEl.value); - const anchorTopList = []; - for (const href of Object.keys(links)) { - const target2 = getElement(href); - if (!target2) - continue; - const scrollEle = getScrollElement(target2, containerEl.value); - const distance = getOffsetTopDistance(target2, scrollEle); - anchorTopList.push({ - top: distance - props2.offset - props2.bound, - href - }); - } - anchorTopList.sort((prev, next) => prev.top - next.top); - for (let i = 0; i < anchorTopList.length; i++) { - const item = anchorTopList[i]; - const next = anchorTopList[i + 1]; - if (i === 0 && scrollTop === 0) { - return props2.selectScrollTop ? item.href : ""; - } - if (item.top <= scrollTop && (!next || next.top > scrollTop)) { - return item.href; - } - } - }; - const getContainer = () => { - const el = getElement(props2.container); - if (!el || isWindow(el)) { - containerEl.value = window; - } else { - containerEl.value = el; - } - }; - useEventListener(containerEl, "scroll", handleScroll2); - const updateMarkerStyle = () => { - nextTick(() => { - if (!anchorRef.value || !markerRef.value || !currentAnchor.value) { - markerStyle.value = {}; - return; - } - const currentLinkEl = links[currentAnchor.value]; - if (!currentLinkEl) { - markerStyle.value = {}; - return; - } - const anchorRect = anchorRef.value.getBoundingClientRect(); - const markerRect = markerRef.value.getBoundingClientRect(); - const linkRect = currentLinkEl.getBoundingClientRect(); - if (props2.direction === "horizontal") { - const left = linkRect.left - anchorRect.left; - markerStyle.value = { - left: `${left}px`, - width: `${linkRect.width}px`, - opacity: 1 - }; - } else { - const top = linkRect.top - anchorRect.top + (linkRect.height - markerRect.height) / 2; - markerStyle.value = { - top: `${top}px`, - opacity: 1 - }; - } - }); - }; - watch(currentAnchor, updateMarkerStyle); - watch(() => { - var _a; - return (_a = slots.default) == null ? void 0 : _a.call(slots); - }, updateMarkerStyle); - onMounted(() => { - getContainer(); - const hash = decodeURIComponent(window.location.hash); - const target2 = getElement(hash); - if (target2) { - scrollTo2(hash); - } else { - handleScroll2(); - } - }); - watch( - () => props2.container, - () => { - getContainer(); - } - ); - provide(anchorKey, { - ns, - direction: props2.direction, - currentAnchor, - addLink, - removeLink, - handleClick - }); - __expose({ - scrollTo: scrollTo2 - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "anchorRef", - ref: anchorRef, - class: normalizeClass(cls.value) - }, - [ - _ctx.marker ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref_key: "markerRef", - ref: markerRef, - class: normalizeClass(unref(ns).e("marker")), - style: normalizeStyle(markerStyle.value) - }, - null, - 6 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("list")) - }, - [ - renderSlot(_ctx.$slots, "default") - ], - 2 - ) - ], - 2 - ); - }; - } -}); -var Anchor = _export_sfc(_sfc_main151, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/anchor/src/anchor.vue"]]); - -// node_modules/element-plus/es/components/anchor/src/anchor-link.mjs -var anchorLinkProps = buildProps({ - title: String, - href: String -}); - -// node_modules/element-plus/es/components/anchor/src/anchor-link2.mjs -var _hoisted_179 = ["href"]; -var _sfc_main152 = defineComponent({ - ...{ - name: "ElAnchorLink" - }, - __name: "anchor-link", - props: anchorLinkProps, - setup(__props) { - const props2 = __props; - const linkRef = ref(null); - const { - ns, - direction: direction2, - currentAnchor, - addLink, - removeLink, - handleClick: contextHandleClick - } = inject(anchorKey); - const cls = computed(() => [ - ns.e("link"), - ns.is("active", currentAnchor.value === props2.href) - ]); - const handleClick = (e) => { - contextHandleClick(e, props2.href); - }; - watch( - () => props2.href, - (val, oldVal) => { - nextTick(() => { - if (oldVal) - removeLink(oldVal); - if (val) { - addLink({ - href: val, - el: linkRef.value - }); - } - }); - } - ); - onMounted(() => { - const { href } = props2; - if (href) { - addLink({ - href, - el: linkRef.value - }); - } - }); - onBeforeUnmount(() => { - const { href } = props2; - if (href) { - removeLink(href); - } - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass(unref(ns).e("item")) - }, - [ - createBaseVNode("a", { - ref_key: "linkRef", - ref: linkRef, - class: normalizeClass(cls.value), - href: _ctx.href, - onClick: handleClick - }, [ - renderSlot(_ctx.$slots, "default", {}, () => [ - createTextVNode( - toDisplayString(_ctx.title), - 1 - ) - ]) - ], 10, _hoisted_179), - _ctx.$slots["sub-link"] && unref(direction2) === "vertical" ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).e("list")) - }, - [ - renderSlot(_ctx.$slots, "sub-link") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var AnchorLink = _export_sfc(_sfc_main152, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/anchor/src/anchor-link.vue"]]); - -// node_modules/element-plus/es/components/anchor/index.mjs -var ElAnchor = withInstall(Anchor, { - AnchorLink -}); -var ElAnchorLink = withNoopInstall(AnchorLink); - -// node_modules/element-plus/es/components/segmented/src/segmented.mjs -var defaultProps5 = { - label: "label", - value: "value", - disabled: "disabled" -}; -var segmentedProps = buildProps({ - direction: { - type: definePropType(String), - default: "horizontal" - }, - options: { - type: definePropType(Array), - default: () => [] - }, - modelValue: { - type: [String, Number, Boolean], - default: void 0 - }, - props: { - type: definePropType(Object), - default: () => defaultProps5 - }, - block: Boolean, - size: useSizeProp, - disabled: { - type: Boolean, - default: void 0 - }, - validateEvent: { - type: Boolean, - default: true - }, - id: String, - name: String, - ...useAriaProps(["ariaLabel"]) -}); -var segmentedEmits = { - [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val), - [CHANGE_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val) -}; - -// node_modules/element-plus/es/components/segmented/src/segmented2.mjs -var _hoisted_180 = ["id", "aria-label", "aria-labelledby"]; -var _hoisted_243 = ["name", "disabled", "checked", "onChange"]; -var _sfc_main153 = defineComponent({ - ...{ - name: "ElSegmented" - }, - __name: "segmented", - props: segmentedProps, - emits: segmentedEmits, - setup(__props, { emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("segmented"); - const segmentedId = useId(); - const segmentedSize = useFormSize(); - const _disabled = useFormDisabled(); - const { formItem } = useFormItem(); - const { inputId, isLabeledByFormItem } = useFormItemInputId(props2, { - formItemContext: formItem - }); - const segmentedRef = ref(null); - const activeElement = useActiveElement(); - const state = reactive({ - isInit: false, - width: 0, - height: 0, - translateX: 0, - translateY: 0, - focusVisible: false - }); - const handleChange = (evt, item) => { - const value = getValue3(item); - emit(UPDATE_MODEL_EVENT, value); - emit(CHANGE_EVENT, value); - evt.target.checked = value === props2.modelValue; - }; - const aliasProps = computed(() => ({ ...defaultProps5, ...props2.props })); - const intoAny = (item) => item; - const getValue3 = (item) => { - return isObject(item) ? item[aliasProps.value.value] : item; - }; - const getLabel = (item) => { - return isObject(item) ? item[aliasProps.value.label] : item; - }; - const getDisabled = (item) => { - return !!(_disabled.value || (isObject(item) ? item[aliasProps.value.disabled] : false)); - }; - const getSelected = (item) => { - return props2.modelValue === getValue3(item); - }; - const getOption = (value) => { - return props2.options.find((item) => getValue3(item) === value); - }; - const getItemCls = (item) => { - return [ - ns.e("item"), - ns.is("selected", getSelected(item)), - ns.is("disabled", getDisabled(item)) - ]; - }; - const updateSelect = () => { - if (!segmentedRef.value) - return; - const selectedItem = segmentedRef.value.querySelector( - ".is-selected" - ); - const selectedItemInput = segmentedRef.value.querySelector( - ".is-selected input" - ); - if (!selectedItem || !selectedItemInput) { - state.width = 0; - state.height = 0; - state.translateX = 0; - state.translateY = 0; - state.focusVisible = false; - return; - } - state.isInit = true; - if (props2.direction === "vertical") { - state.height = selectedItem.offsetHeight; - state.translateY = selectedItem.offsetTop; - } else { - state.width = selectedItem.offsetWidth; - state.translateX = selectedItem.offsetLeft; - } - try { - state.focusVisible = selectedItemInput.matches(":focus-visible"); - } catch (e) { - } - }; - const segmentedCls = computed(() => [ - ns.b(), - ns.m(segmentedSize.value), - ns.is("block", props2.block) - ]); - const selectedStyle = computed(() => ({ - width: props2.direction === "vertical" ? "100%" : `${state.width}px`, - height: props2.direction === "vertical" ? `${state.height}px` : "100%", - transform: props2.direction === "vertical" ? `translateY(${state.translateY}px)` : `translateX(${state.translateX}px)`, - display: state.isInit ? "block" : "none" - })); - const selectedCls = computed(() => [ - ns.e("item-selected"), - ns.is("disabled", getDisabled(getOption(props2.modelValue))), - ns.is("focus-visible", state.focusVisible) - ]); - const name = computed(() => { - return props2.name || segmentedId.value; - }); - useResizeObserver(segmentedRef, updateSelect); - watch(activeElement, updateSelect); - watch( - () => props2.modelValue, - () => { - var _a; - updateSelect(); - if (props2.validateEvent) { - (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err)); - } - }, - { - flush: "post" - } - ); - return (_ctx, _cache) => { - return _ctx.options.length ? (openBlock(), createElementBlock("div", { - key: 0, - id: unref(inputId), - ref_key: "segmentedRef", - ref: segmentedRef, - class: normalizeClass(segmentedCls.value), - role: "radiogroup", - "aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "segmented" : void 0, - "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0 - }, [ - createBaseVNode( - "div", - { - class: normalizeClass([unref(ns).e("group"), unref(ns).m(_ctx.direction)]) - }, - [ - createBaseVNode( - "div", - { - style: normalizeStyle(selectedStyle.value), - class: normalizeClass(selectedCls.value) - }, - null, - 6 - ), - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.options, (item, index) => { - return openBlock(), createElementBlock( - "label", - { - key: index, - class: normalizeClass(getItemCls(item)) - }, - [ - createBaseVNode("input", { - class: normalizeClass(unref(ns).e("item-input")), - type: "radio", - name: name.value, - disabled: getDisabled(item), - checked: getSelected(item), - onChange: ($event) => handleChange($event, item) - }, null, 42, _hoisted_243), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("item-label")) - }, - [ - renderSlot(_ctx.$slots, "default", { - item: intoAny(item) - }, () => [ - createTextVNode( - toDisplayString(getLabel(item)), - 1 - ) - ]) - ], - 2 - ) - ], - 2 - ); - }), - 128 - )) - ], - 2 - ) - ], 10, _hoisted_180)) : createCommentVNode("v-if", true); - }; - } -}); -var Segmented = _export_sfc(_sfc_main153, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/segmented/src/segmented.vue"]]); - -// node_modules/element-plus/es/components/segmented/index.mjs -var ElSegmented = withInstall(Segmented); - -// node_modules/element-plus/es/components/mention/src/helper.mjs -var filterOption = (pattern4, option) => { - const lowerCase2 = pattern4.toLowerCase(); - const label = option.label || option.value || ""; - return label.toLowerCase().includes(lowerCase2); -}; -var getMentionCtx = (inputEl, prefix, split2) => { - const { selectionEnd } = inputEl; - if (selectionEnd === null) - return; - const inputValue = inputEl.value; - const prefixArray = castArray_default(prefix); - let splitIndex = -1; - let mentionCtx; - for (let i = selectionEnd - 1; i >= 0; --i) { - const char = inputValue[i]; - if (char === split2 || char === "\n" || char === "\r") { - splitIndex = i; - continue; - } - if (prefixArray.includes(char)) { - const end = splitIndex === -1 ? selectionEnd : splitIndex; - const pattern4 = inputValue.slice(i + 1, end); - mentionCtx = { - pattern: pattern4, - start: i + 1, - end, - prefix: char, - prefixIndex: i, - splitIndex, - selectionEnd - }; - break; - } - } - return mentionCtx; -}; -var getCursorPosition = (element, options = { - debug: false, - useSelectionEnd: false -}) => { - const selectionStart = element.selectionStart !== null ? element.selectionStart : 0; - const selectionEnd = element.selectionEnd !== null ? element.selectionEnd : 0; - const position = options.useSelectionEnd ? selectionEnd : selectionStart; - const properties = [ - "direction", - "boxSizing", - "width", - "height", - "overflowX", - "overflowY", - "borderTopWidth", - "borderRightWidth", - "borderBottomWidth", - "borderLeftWidth", - "borderStyle", - "paddingTop", - "paddingRight", - "paddingBottom", - "paddingLeft", - "fontStyle", - "fontVariant", - "fontWeight", - "fontStretch", - "fontSize", - "fontSizeAdjust", - "lineHeight", - "fontFamily", - "textAlign", - "textTransform", - "textIndent", - "textDecoration", - "letterSpacing", - "wordSpacing", - "tabSize", - "MozTabSize" - ]; - if (options.debug) { - const el = document.querySelector( - "#input-textarea-caret-position-mirror-div" - ); - if (el == null ? void 0 : el.parentNode) - el.parentNode.removeChild(el); - } - const div = document.createElement("div"); - div.id = "input-textarea-caret-position-mirror-div"; - document.body.appendChild(div); - const style = div.style; - const computed2 = window.getComputedStyle(element); - const isInput = element.nodeName === "INPUT"; - style.whiteSpace = isInput ? "nowrap" : "pre-wrap"; - if (!isInput) - style.wordWrap = "break-word"; - style.position = "absolute"; - if (!options.debug) - style.visibility = "hidden"; - properties.forEach((prop) => { - if (isInput && prop === "lineHeight") { - if (computed2.boxSizing === "border-box") { - const height = Number.parseInt(computed2.height); - const outerHeight = Number.parseInt(computed2.paddingTop) + Number.parseInt(computed2.paddingBottom) + Number.parseInt(computed2.borderTopWidth) + Number.parseInt(computed2.borderBottomWidth); - const targetHeight = outerHeight + Number.parseInt(computed2.lineHeight); - if (height > targetHeight) { - style.lineHeight = `${height - outerHeight}px`; - } else if (height === targetHeight) { - style.lineHeight = computed2.lineHeight; - } else { - style.lineHeight = "0"; - } - } else { - style.lineHeight = computed2.height; - } - } else { - style[prop] = computed2[prop]; - } - }); - if (isFirefox()) { - if (element.scrollHeight > Number.parseInt(computed2.height)) { - style.overflowY = "scroll"; - } - } else { - style.overflow = "hidden"; - } - div.textContent = element.value.slice(0, Math.max(0, position)); - if (isInput && div.textContent) { - div.textContent = div.textContent.replace(/\s/g, " "); - } - const span = document.createElement("span"); - span.textContent = element.value.slice(Math.max(0, position)) || "."; - span.style.position = "relative"; - span.style.left = `${-element.scrollLeft}px`; - span.style.top = `${-element.scrollTop}px`; - div.appendChild(span); - const relativePosition = { - top: span.offsetTop + Number.parseInt(computed2.borderTopWidth), - left: span.offsetLeft + Number.parseInt(computed2.borderLeftWidth), - height: Number.parseInt(computed2.fontSize) * 1.5 - }; - if (options.debug) { - span.style.backgroundColor = "#aaa"; - } else { - document.body.removeChild(div); - } - if (relativePosition.left >= element.clientWidth) { - relativePosition.left = element.clientWidth; - } - return relativePosition; -}; - -// node_modules/element-plus/es/components/mention/src/mention.mjs -var mentionProps = buildProps({ - ...inputProps, - options: { - type: definePropType(Array), - default: () => [] - }, - prefix: { - type: definePropType([String, Array]), - default: "@", - validator: (val) => { - if (isString(val)) - return val.length === 1; - return val.every((v2) => isString(v2) && v2.length === 1); - } - }, - split: { - type: String, - default: " ", - validator: (val) => val.length === 1 - }, - filterOption: { - type: definePropType([Boolean, Function]), - default: () => filterOption, - validator: (val) => { - if (val === false) - return true; - return isFunction(val); - } - }, - placement: { - type: definePropType(String), - default: "bottom" - }, - showArrow: Boolean, - offset: { - type: Number, - default: 0 - }, - whole: Boolean, - checkIsWhole: { - type: definePropType( - Function - ) - }, - modelValue: String, - loading: Boolean, - popperClass: useTooltipContentProps.popperClass, - popperStyle: useTooltipContentProps.popperStyle, - popperOptions: { - type: definePropType(Object), - default: () => ({}) - }, - props: { - type: definePropType(Object), - default: () => mentionDefaultProps - } -}); -var mentionEmits = { - [UPDATE_MODEL_EVENT]: (value) => isString(value), - "whole-remove": (pattern4, prefix) => isString(pattern4) && isString(prefix), - input: (value) => isString(value), - search: (pattern4, prefix) => isString(pattern4) && isString(prefix), - select: (option, prefix) => isObject(option) && isString(prefix), - focus: (evt) => evt instanceof FocusEvent, - blur: (evt) => evt instanceof FocusEvent -}; -var mentionDefaultProps = { - value: "value", - label: "label", - disabled: "disabled" -}; - -// node_modules/element-plus/es/components/mention/src/mention-dropdown2.mjs -var mentionDropdownProps = buildProps({ - options: { - type: definePropType(Array), - default: () => [] - }, - loading: Boolean, - disabled: Boolean, - contentId: String, - ariaLabel: String -}); -var mentionDropdownEmits = { - select: (option) => isString(option.value) -}; - -// node_modules/element-plus/es/components/mention/src/mention-dropdown.mjs -var _hoisted_181 = ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"]; -var _sfc_main154 = defineComponent({ - ...{ - name: "ElMentionDropdown" - }, - __name: "mention-dropdown", - props: mentionDropdownProps, - emits: mentionDropdownEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const ns = useNamespace("mention"); - const { t } = useLocale(); - const hoveringIndex = ref(-1); - const scrollbarRef = ref(); - const optionRefs = ref(); - const dropdownRef = ref(); - const optionkls = (item, index) => [ - ns.be("dropdown", "item"), - ns.is("hovering", hoveringIndex.value === index), - ns.is("disabled", item.disabled || props2.disabled) - ]; - const handleSelect = (item) => { - if (item.disabled || props2.disabled) - return; - emit("select", item); - }; - const handleMouseEnter = (index) => { - hoveringIndex.value = index; - }; - const filteredAllDisabled = computed( - () => props2.disabled || props2.options.every((item) => item.disabled) - ); - const hoverOption = computed(() => props2.options[hoveringIndex.value]); - const selectHoverOption = () => { - if (!hoverOption.value) - return; - emit("select", hoverOption.value); - }; - const navigateOptions = (direction2) => { - const { options } = props2; - if (options.length === 0 || filteredAllDisabled.value) - return; - if (direction2 === "next") { - hoveringIndex.value++; - if (hoveringIndex.value === options.length) { - hoveringIndex.value = 0; - } - } else if (direction2 === "prev") { - hoveringIndex.value--; - if (hoveringIndex.value < 0) { - hoveringIndex.value = options.length - 1; - } - } - const option = options[hoveringIndex.value]; - if (option.disabled) { - navigateOptions(direction2); - return; - } - nextTick(() => scrollToOption(option)); - }; - const scrollToOption = (option) => { - var _a, _b, _c, _d; - const { options } = props2; - const index = options.findIndex((item) => item.value === option.value); - const target2 = (_a = optionRefs.value) == null ? void 0 : _a[index]; - if (target2) { - const menu = (_c = (_b = dropdownRef.value) == null ? void 0 : _b.querySelector) == null ? void 0 : _c.call( - _b, - `.${ns.be("dropdown", "wrap")}` - ); - if (menu) { - scrollIntoView(menu, target2); - } - } - (_d = scrollbarRef.value) == null ? void 0 : _d.handleScroll(); - }; - const resetHoveringIndex = () => { - if (filteredAllDisabled.value || props2.options.length === 0) { - hoveringIndex.value = -1; - } else { - hoveringIndex.value = 0; - } - }; - watch(() => props2.options, resetHoveringIndex, { - immediate: true - }); - __expose({ - hoveringIndex, - navigateOptions, - selectHoverOption, - hoverOption - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "dropdownRef", - ref: dropdownRef, - class: normalizeClass(unref(ns).b("dropdown")) - }, - [ - _ctx.$slots.header ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass(unref(ns).be("dropdown", "header")) - }, - [ - renderSlot(_ctx.$slots, "header") - ], - 2 - )) : createCommentVNode("v-if", true), - withDirectives(createVNode(unref(ElScrollbar), { - id: _ctx.contentId, - ref_key: "scrollbarRef", - ref: scrollbarRef, - tag: "ul", - "wrap-class": unref(ns).be("dropdown", "wrap"), - "view-class": unref(ns).be("dropdown", "list"), - role: "listbox", - "aria-label": _ctx.ariaLabel, - "aria-orientation": "vertical" - }, { - default: withCtx(() => [ - (openBlock(true), createElementBlock( - Fragment, - null, - renderList(_ctx.options, (item, index) => { - return openBlock(), createElementBlock("li", { - id: `${_ctx.contentId}-${index}`, - ref_for: true, - ref_key: "optionRefs", - ref: optionRefs, - key: index, - class: normalizeClass(optionkls(item, index)), - role: "option", - "aria-disabled": item.disabled || _ctx.disabled || void 0, - "aria-selected": hoveringIndex.value === index, - onMousemove: ($event) => handleMouseEnter(index), - onClick: withModifiers(($event) => handleSelect(item), ["stop"]) - }, [ - renderSlot(_ctx.$slots, "label", { - item, - index - }, () => { - var _a; - return [ - createBaseVNode( - "span", - null, - toDisplayString((_a = item.label) != null ? _a : item.value), - 1 - ) - ]; - }) - ], 42, _hoisted_181); - }), - 128 - )) - ]), - _: 3 - }, 8, ["id", "wrap-class", "view-class", "aria-label"]), [ - [vShow, _ctx.options.length > 0 && !_ctx.loading] - ]), - _ctx.loading ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(unref(ns).be("dropdown", "loading")) - }, - [ - renderSlot(_ctx.$slots, "loading", {}, () => [ - createTextVNode( - toDisplayString(unref(t)("el.mention.loading")), - 1 - ) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - _ctx.$slots.footer ? (openBlock(), createElementBlock( - "div", - { - key: 2, - class: normalizeClass(unref(ns).be("dropdown", "footer")) - }, - [ - renderSlot(_ctx.$slots, "footer") - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ); - }; - } -}); -var ElMentionDropdown = _export_sfc(_sfc_main154, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/mention/src/mention-dropdown.vue"]]); - -// node_modules/element-plus/es/components/mention/src/mention2.mjs -var _sfc_main155 = defineComponent({ - ...{ - name: "ElMention", - inheritAttrs: false - }, - __name: "mention", - props: mentionProps, - emits: mentionEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const props2 = __props; - const emit = __emit; - const passInputProps = computed(() => pick_default(props2, Object.keys(inputProps))); - const ns = useNamespace("mention"); - const disabled = useFormDisabled(); - const contentId = useId(); - const elInputRef = ref(); - const tooltipRef = ref(); - const dropdownRef = ref(); - const visible = ref(false); - const cursorStyle = ref(); - const mentionCtx = ref(); - const computedPlacement = computed( - () => props2.showArrow ? props2.placement : `${props2.placement}-start` - ); - const computedFallbackPlacements = computed( - () => props2.showArrow ? ["bottom", "top"] : ["bottom-start", "top-start"] - ); - const aliasProps = computed(() => ({ - ...mentionDefaultProps, - ...props2.props - })); - const mapOption = (option) => { - const base = { - label: option[aliasProps.value.label], - value: option[aliasProps.value.value], - disabled: option[aliasProps.value.disabled] - }; - return { ...option, ...base }; - }; - const options = computed(() => props2.options.map(mapOption)); - const filteredOptions = computed(() => { - const { filterOption: filterOption2 } = props2; - if (!mentionCtx.value || !filterOption2) - return options.value; - return options.value.filter( - (option) => filterOption2(mentionCtx.value.pattern, option) - ); - }); - const dropdownVisible = computed(() => { - return visible.value && (!!filteredOptions.value.length || props2.loading); - }); - const hoveringId = computed(() => { - var _a; - return `${contentId.value}-${(_a = dropdownRef.value) == null ? void 0 : _a.hoveringIndex}`; - }); - const handleInputChange = (value) => { - emit(UPDATE_MODEL_EVENT, value); - emit(INPUT_EVENT, value); - syncAfterCursorMove(); - }; - const handleInputKeyDown = (event) => { - var _a, _b, _c, _d; - if ((_a = elInputRef.value) == null ? void 0 : _a.isComposing) - return; - const code = getEventCode(event); - switch (code) { - case EVENT_CODE.left: - case EVENT_CODE.right: - syncAfterCursorMove(); - break; - case EVENT_CODE.up: - case EVENT_CODE.down: - if (!visible.value) - return; - event.preventDefault(); - (_b = dropdownRef.value) == null ? void 0 : _b.navigateOptions( - code === EVENT_CODE.up ? "prev" : "next" - ); - break; - case EVENT_CODE.enter: - case EVENT_CODE.numpadEnter: - if (!visible.value) { - props2.type !== "textarea" && syncAfterCursorMove(); - return; - } - event.preventDefault(); - if ((_c = dropdownRef.value) == null ? void 0 : _c.hoverOption) { - (_d = dropdownRef.value) == null ? void 0 : _d.selectHoverOption(); - } else { - visible.value = false; - } - break; - case EVENT_CODE.esc: - if (!visible.value) - return; - event.preventDefault(); - visible.value = false; - break; - case EVENT_CODE.backspace: - if (props2.whole && mentionCtx.value) { - const { splitIndex, selectionEnd, pattern: pattern4, prefixIndex, prefix } = mentionCtx.value; - const inputEl = getInputEl(); - if (!inputEl) - return; - const inputValue = inputEl.value; - const matchOption = options.value.find((item) => item.value === pattern4); - const isWhole = isFunction(props2.checkIsWhole) ? props2.checkIsWhole(pattern4, prefix) : matchOption; - if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) { - event.preventDefault(); - const newValue = inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1); - emit(UPDATE_MODEL_EVENT, newValue); - emit(INPUT_EVENT, newValue); - emit("whole-remove", pattern4, prefix); - const newSelectionEnd = prefixIndex; - nextTick(() => { - inputEl.selectionStart = newSelectionEnd; - inputEl.selectionEnd = newSelectionEnd; - syncDropdownVisible(); - }); - } - } - } - }; - const { wrapperRef } = useFocusController(elInputRef, { - disabled, - afterFocus() { - syncAfterCursorMove(); - }, - beforeBlur(event) { - var _a; - return (_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event); - }, - afterBlur() { - visible.value = false; - } - }); - const handleInputMouseDown = () => { - syncAfterCursorMove(); - }; - const getOriginalOption = (mentionOption) => { - return props2.options.find((option) => { - return mentionOption.value === option[aliasProps.value.value]; - }); - }; - const handleSelect = (item) => { - if (!mentionCtx.value) - return; - const inputEl = getInputEl(); - if (!inputEl) - return; - const inputValue = inputEl.value; - const { split: split2 } = props2; - const newEndPart = inputValue.slice(mentionCtx.value.end); - const alreadySeparated = newEndPart.startsWith(split2); - const newMiddlePart = `${item.value}${alreadySeparated ? "" : split2}`; - const newValue = inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart; - emit(UPDATE_MODEL_EVENT, newValue); - emit(INPUT_EVENT, newValue); - emit("select", getOriginalOption(item), mentionCtx.value.prefix); - const newSelectionEnd = mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0); - nextTick(() => { - inputEl.selectionStart = newSelectionEnd; - inputEl.selectionEnd = newSelectionEnd; - inputEl.focus(); - syncDropdownVisible(); - }); - }; - const getInputEl = () => { - var _a, _b; - return props2.type === "textarea" ? (_a = elInputRef.value) == null ? void 0 : _a.textarea : (_b = elInputRef.value) == null ? void 0 : _b.input; - }; - const syncAfterCursorMove = () => { - setTimeout(() => { - syncCursor(); - syncDropdownVisible(); - nextTick(() => { - var _a; - return (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper(); - }); - }, 0); - }; - const syncCursor = () => { - const inputEl = getInputEl(); - if (!inputEl) - return; - const caretPosition = getCursorPosition(inputEl); - const inputRect = inputEl.getBoundingClientRect(); - const wrapperRect = wrapperRef.value.getBoundingClientRect(); - cursorStyle.value = { - position: "absolute", - width: 0, - height: `${caretPosition.height}px`, - left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`, - top: `${caretPosition.top + inputRect.top - wrapperRect.top}px` - }; - }; - const syncDropdownVisible = () => { - const inputEl = getInputEl(); - if (document.activeElement !== inputEl) { - visible.value = false; - return; - } - const { prefix, split: split2 } = props2; - mentionCtx.value = getMentionCtx(inputEl, prefix, split2); - if (mentionCtx.value && mentionCtx.value.splitIndex === -1) { - visible.value = true; - emit("search", mentionCtx.value.pattern, mentionCtx.value.prefix); - return; - } - visible.value = false; - }; - __expose({ - input: elInputRef, - tooltip: tooltipRef, - dropdownVisible - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "wrapperRef", - ref: wrapperRef, - class: normalizeClass(unref(ns).b()) - }, - [ - createVNode(unref(ElInput), mergeProps(mergeProps(passInputProps.value, _ctx.$attrs), { - ref_key: "elInputRef", - ref: elInputRef, - "model-value": _ctx.modelValue, - disabled: unref(disabled), - role: dropdownVisible.value ? "combobox" : void 0, - "aria-activedescendant": dropdownVisible.value ? hoveringId.value || "" : void 0, - "aria-controls": dropdownVisible.value ? unref(contentId) : void 0, - "aria-expanded": dropdownVisible.value || void 0, - "aria-label": _ctx.ariaLabel, - "aria-autocomplete": dropdownVisible.value ? "none" : void 0, - "aria-haspopup": dropdownVisible.value ? "listbox" : void 0, - onInput: handleInputChange, - onKeydown: handleInputKeyDown, - onMousedown: handleInputMouseDown - }), createSlots({ - _: 2 - }, [ - renderList(_ctx.$slots, (_2, name) => { - return { - name, - fn: withCtx((slotProps) => [ - renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps))) - ]) - }; - }) - ]), 1040, ["model-value", "disabled", "role", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "aria-autocomplete", "aria-haspopup"]), - createVNode(unref(ElTooltip), { - ref_key: "tooltipRef", - ref: tooltipRef, - visible: dropdownVisible.value, - "popper-class": [unref(ns).e("popper"), _ctx.popperClass], - "popper-style": _ctx.popperStyle, - "popper-options": _ctx.popperOptions, - placement: computedPlacement.value, - "fallback-placements": computedFallbackPlacements.value, - effect: "light", - pure: "", - offset: _ctx.offset, - "show-arrow": _ctx.showArrow - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - style: normalizeStyle(cursorStyle.value) - }, - null, - 4 - ) - ]), - content: withCtx(() => [ - createVNode(ElMentionDropdown, { - ref_key: "dropdownRef", - ref: dropdownRef, - options: filteredOptions.value, - disabled: unref(disabled), - loading: _ctx.loading, - "content-id": unref(contentId), - "aria-label": _ctx.ariaLabel, - onSelect: handleSelect, - onClick: _cache[0] || (_cache[0] = withModifiers(($event) => { - var _a; - return (_a = elInputRef.value) == null ? void 0 : _a.focus(); - }, ["stop"])) - }, createSlots({ - _: 2 - }, [ - renderList(_ctx.$slots, (_2, name) => { - return { - name, - fn: withCtx((slotProps) => [ - renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps))) - ]) - }; - }) - ]), 1032, ["options", "disabled", "loading", "content-id", "aria-label"]) - ]), - _: 3 - }, 8, ["visible", "popper-class", "popper-style", "popper-options", "placement", "fallback-placements", "offset", "show-arrow"]) - ], - 2 - ); - }; - } -}); -var Mention = _export_sfc(_sfc_main155, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/mention/src/mention.vue"]]); - -// node_modules/element-plus/es/components/mention/index.mjs -var ElMention = withInstall(Mention); - -// node_modules/element-plus/es/components/splitter/src/splitter.mjs -var splitterProps = buildProps({ - layout: { - type: String, - default: "horizontal", - values: ["horizontal", "vertical"] - }, - lazy: Boolean -}); -var splitterEmits = { - resizeStart: (index, sizes) => true, - resize: (index, sizes) => true, - resizeEnd: (index, sizes) => true, - collapse: (index, type4, sizes) => true -}; - -// node_modules/element-plus/es/components/splitter/src/type.mjs -var splitterRootContextKey = Symbol( - "splitterRootContextKey" -); - -// node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs -function useContainer(layout2) { - const containerEl = ref(); - const { width, height } = useElementSize(containerEl); - const containerSize = computed(() => { - return layout2.value === "horizontal" ? width.value : height.value; - }); - return { containerEl, containerSize }; -} - -// node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs -function getPct(str) { - return Number(str.slice(0, -1)) / 100; -} -function getPx(str) { - return Number(str.slice(0, -2)); -} -function isPct(itemSize3) { - return isString(itemSize3) && itemSize3.endsWith("%"); -} -function isPx(itemSize3) { - return isString(itemSize3) && itemSize3.endsWith("px"); -} -function useSize2(panels, containerSize) { - const propSizes = computed(() => panels.value.map((i) => i.size)); - const panelCounts = computed(() => panels.value.length); - const percentSizes = ref([]); - watch([propSizes, panelCounts, containerSize], () => { - var _a; - let ptgList = []; - let emptyCount = 0; - for (let i = 0; i < panelCounts.value; i += 1) { - const itemSize3 = (_a = panels.value[i]) == null ? void 0 : _a.size; - if (isPct(itemSize3)) { - ptgList[i] = getPct(itemSize3); - } else if (isPx(itemSize3)) { - ptgList[i] = getPx(itemSize3) / containerSize.value; - } else if (itemSize3 || itemSize3 === 0) { - const num = Number(itemSize3); - if (!Number.isNaN(num)) { - ptgList[i] = num / containerSize.value; - } - } else { - emptyCount += 1; - ptgList[i] = void 0; - } - } - const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0); - if (totalPtg > 1 || !emptyCount) { - const scale = 1 / totalPtg; - ptgList = ptgList.map((ptg) => ptg === void 0 ? 0 : ptg * scale); - } else { - const avgRest = (1 - totalPtg) / emptyCount; - ptgList = ptgList.map((ptg) => ptg === void 0 ? avgRest : ptg); - } - percentSizes.value = ptgList; - }); - const ptg2px = (ptg) => ptg * containerSize.value; - const pxSizes = computed(() => percentSizes.value.map(ptg2px)); - return { percentSizes, pxSizes }; -} - -// node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs -function useResize(panels, containerSize, pxSizes, lazy) { - const ptg2px = (ptg) => ptg * containerSize.value || 0; - function getLimitSize(str, defaultLimit) { - if (isPct(str)) { - return ptg2px(getPct(str)); - } else if (isPx(str)) { - return getPx(str); - } - return str != null ? str : defaultLimit; - } - const lazyOffset = ref(0); - const movingIndex = ref(null); - let cachePxSizes = []; - let updatePanelSizes = NOOP; - const limitSizes = computed( - () => panels.value.map((item) => [item.min, item.max]) - ); - watch(lazy, () => { - if (lazyOffset.value) { - const mouseup = new MouseEvent("mouseup", { bubbles: true }); - window.dispatchEvent(mouseup); - } - }); - const onMoveStart = (index) => { - lazyOffset.value = 0; - movingIndex.value = { index, confirmed: false }; - cachePxSizes = pxSizes.value; - }; - const onMoving = (index, offset3) => { - var _a, _b; - let confirmedIndex = null; - if ((!movingIndex.value || !movingIndex.value.confirmed) && offset3 !== 0) { - if (offset3 > 0) { - confirmedIndex = index; - movingIndex.value = { index, confirmed: true }; - } else { - for (let i = index; i >= 0; i -= 1) { - if (cachePxSizes[i] > 0) { - confirmedIndex = i; - movingIndex.value = { index: i, confirmed: true }; - break; - } - } - } - } - const mergedIndex = (_b = confirmedIndex != null ? confirmedIndex : (_a = movingIndex.value) == null ? void 0 : _a.index) != null ? _b : index; - const numSizes = [...cachePxSizes]; - const nextIndex = mergedIndex + 1; - const startMinSize = getLimitSize(limitSizes.value[mergedIndex][0], 0); - const endMinSize = getLimitSize(limitSizes.value[nextIndex][0], 0); - const startMaxSize = getLimitSize( - limitSizes.value[mergedIndex][1], - containerSize.value || 0 - ); - const endMaxSize = getLimitSize( - limitSizes.value[nextIndex][1], - containerSize.value || 0 - ); - let mergedOffset = offset3; - if (numSizes[mergedIndex] + mergedOffset < startMinSize) { - mergedOffset = startMinSize - numSizes[mergedIndex]; - } - if (numSizes[nextIndex] - mergedOffset < endMinSize) { - mergedOffset = numSizes[nextIndex] - endMinSize; - } - if (numSizes[mergedIndex] + mergedOffset > startMaxSize) { - mergedOffset = startMaxSize - numSizes[mergedIndex]; - } - if (numSizes[nextIndex] - mergedOffset > endMaxSize) { - mergedOffset = numSizes[nextIndex] - endMaxSize; - } - numSizes[mergedIndex] += mergedOffset; - numSizes[nextIndex] -= mergedOffset; - lazyOffset.value = mergedOffset; - updatePanelSizes = () => { - panels.value.forEach((panel, index2) => { - panel.size = numSizes[index2]; - }); - updatePanelSizes = NOOP; - }; - if (!lazy.value) { - updatePanelSizes(); - } - }; - const onMoveEnd = () => { - if (lazy.value) { - updatePanelSizes(); - } - lazyOffset.value = 0; - movingIndex.value = null; - cachePxSizes = []; - }; - const cacheCollapsedSize = []; - const onCollapse = (index, type4) => { - if (!cacheCollapsedSize.length) { - cacheCollapsedSize.push(...pxSizes.value); - } - const currentSizes = pxSizes.value; - const currentIndex = type4 === "start" ? index : index + 1; - const targetIndex = type4 === "start" ? index + 1 : index; - const currentSize = currentSizes[currentIndex]; - const targetSize = currentSizes[targetIndex]; - if (currentSize !== 0 && targetSize !== 0) { - currentSizes[currentIndex] = 0; - currentSizes[targetIndex] += currentSize; - cacheCollapsedSize[index] = currentSize; - } else { - const totalSize = currentSize + targetSize; - const targetCacheCollapsedSize = cacheCollapsedSize[index]; - const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize; - currentSizes[targetIndex] = targetCacheCollapsedSize; - currentSizes[currentIndex] = currentCacheCollapsedSize; - } - panels.value.forEach((panel, index2) => { - panel.size = currentSizes[index2]; - }); - }; - return { - lazyOffset, - onMoveStart, - onMoving, - onMoveEnd, - movingIndex, - onCollapse - }; -} - -// node_modules/element-plus/es/components/splitter/src/splitter2.mjs -var _sfc_main156 = defineComponent({ - ...{ - name: "ElSplitter" - }, - __name: "splitter", - props: splitterProps, - emits: splitterEmits, - setup(__props, { emit: __emit }) { - const ns = useNamespace("splitter"); - const emits = __emit; - const props2 = __props; - const layout2 = toRef(props2, "layout"); - const lazy = toRef(props2, "lazy"); - const { containerEl, containerSize } = useContainer(layout2); - const { - removeChild: unregisterPanel, - children: panels, - addChild: registerPanel, - ChildrenSorter: PanelsSorter - } = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel"); - watch(panels, () => { - movingIndex.value = null; - panels.value.forEach((instance, index) => { - instance.setIndex(index); - }); - }); - const { percentSizes, pxSizes } = useSize2(panels, containerSize); - const { - lazyOffset, - movingIndex, - onMoveStart, - onMoving, - onMoveEnd, - onCollapse - } = useResize(panels, containerSize, pxSizes, lazy); - const splitterStyles = computed(() => { - return { - [ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0 - }; - }); - const onResizeStart = (index) => { - onMoveStart(index); - emits("resizeStart", index, pxSizes.value); - }; - const onResize = (index, offset3) => { - onMoving(index, offset3); - if (!lazy.value) { - emits("resize", index, pxSizes.value); - } - }; - const onResizeEnd = async (index) => { - onMoveEnd(); - await nextTick(); - emits("resizeEnd", index, pxSizes.value); - }; - const onCollapsible = (index, type4) => { - onCollapse(index, type4); - emits("collapse", index, type4, pxSizes.value); - }; - provide( - splitterRootContextKey, - reactive({ - panels, - percentSizes, - pxSizes, - layout: layout2, - lazy, - movingIndex, - containerSize, - onMoveStart: onResizeStart, - onMoving: onResize, - onMoveEnd: onResizeEnd, - onCollapse: onCollapsible, - registerPanel, - unregisterPanel - }) - ); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - ref_key: "containerEl", - ref: containerEl, - class: normalizeClass([unref(ns).b(), unref(ns).e(layout2.value)]), - style: normalizeStyle(splitterStyles.value) - }, - [ - renderSlot(_ctx.$slots, "default"), - createVNode(unref(PanelsSorter)), - createCommentVNode(" Prevent iframe touch events from breaking "), - unref(movingIndex) ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${layout2.value}`)]) - }, - null, - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ); - }; - } -}); -var Splitter = _export_sfc(_sfc_main156, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/splitter/src/splitter.vue"]]); - -// node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs -function getCollapsible(collapsible) { - if (collapsible && isObject(collapsible)) { - return collapsible; - } - return { - start: !!collapsible, - end: !!collapsible - }; -} -function isCollapsible(panel, size3, nextPanel, nextSize) { - if ((panel == null ? void 0 : panel.collapsible.end) && size3 > 0) { - return true; - } - if ((nextPanel == null ? void 0 : nextPanel.collapsible.start) && nextSize === 0 && size3 > 0) { - return true; - } - return false; -} - -// node_modules/element-plus/es/components/splitter/src/split-bar.mjs -var _sfc_main157 = defineComponent({ - ...{ - name: "ElSplitterBar" - }, - __name: "split-bar", - props: { - index: { - type: Number, - required: true - }, - layout: { - type: String, - values: ["horizontal", "vertical"], - default: "horizontal" - }, - resizable: { - type: Boolean, - default: true - }, - lazy: Boolean, - startCollapsible: Boolean, - endCollapsible: Boolean - }, - emits: ["moveStart", "moving", "moveEnd", "collapse"], - setup(__props, { emit: __emit }) { - const ns = useNamespace("splitter-bar"); - const props2 = __props; - const emit = __emit; - const isHorizontal2 = computed(() => props2.layout === "horizontal"); - const barWrapStyles = computed(() => { - if (isHorizontal2.value) { - return { width: 0 }; - } - return { height: 0 }; - }); - const draggerStyles = computed(() => { - return { - width: isHorizontal2.value ? "16px" : "100%", - height: isHorizontal2.value ? "100%" : "16px", - cursor: !props2.resizable ? "auto" : isHorizontal2.value ? "ew-resize" : "ns-resize", - touchAction: "none" - }; - }); - const draggerPseudoClass = computed(() => { - const prefix = ns.e("dragger"); - return { - [`${prefix}-horizontal`]: isHorizontal2.value, - [`${prefix}-vertical`]: !isHorizontal2.value, - [`${prefix}-active`]: !!startPos.value - }; - }); - const startPos = ref(null); - const onMousedown = (e) => { - if (!props2.resizable) - return; - startPos.value = [e.pageX, e.pageY]; - emit("moveStart", props2.index); - window.addEventListener("mouseup", onMouseUp); - window.addEventListener("mousemove", onMouseMove); - }; - const onTouchStart = (e) => { - if (props2.resizable && e.touches.length === 1) { - e.preventDefault(); - const touch = e.touches[0]; - startPos.value = [touch.pageX, touch.pageY]; - emit("moveStart", props2.index); - window.addEventListener("touchend", onTouchEnd); - window.addEventListener("touchmove", onTouchMove); - } - }; - const onMouseMove = (e) => { - const { pageX, pageY } = e; - const offsetX = pageX - startPos.value[0]; - const offsetY = pageY - startPos.value[1]; - const offset3 = isHorizontal2.value ? offsetX : offsetY; - emit("moving", props2.index, offset3); - }; - const onTouchMove = (e) => { - if (e.touches.length === 1) { - e.preventDefault(); - const touch = e.touches[0]; - const offsetX = touch.pageX - startPos.value[0]; - const offsetY = touch.pageY - startPos.value[1]; - const offset3 = isHorizontal2.value ? offsetX : offsetY; - emit("moving", props2.index, offset3); - } - }; - const onMouseUp = () => { - startPos.value = null; - window.removeEventListener("mouseup", onMouseUp); - window.removeEventListener("mousemove", onMouseMove); - emit("moveEnd", props2.index); - }; - const onTouchEnd = () => { - startPos.value = null; - window.removeEventListener("touchend", onTouchEnd); - window.removeEventListener("touchmove", onTouchMove); - emit("moveEnd", props2.index); - }; - const StartIcon = computed(() => isHorizontal2.value ? arrow_left_default : arrow_up_default); - const EndIcon = computed(() => isHorizontal2.value ? arrow_right_default : arrow_down_default); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - "div", - { - class: normalizeClass([unref(ns).b()]), - style: normalizeStyle(barWrapStyles.value) - }, - [ - __props.startCollapsible ? (openBlock(), createElementBlock( - "div", - { - key: 0, - class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-start`)]), - onClick: _cache[0] || (_cache[0] = ($event) => emit("collapse", __props.index, "start")) - }, - [ - renderSlot(_ctx.$slots, "start-collapsible", {}, () => [ - (openBlock(), createBlock(resolveDynamicComponent(StartIcon.value), { style: { "width": "12px", "height": "12px" } })) - ]) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass([ - unref(ns).e("dragger"), - draggerPseudoClass.value, - unref(ns).is("disabled", !__props.resizable), - unref(ns).is("lazy", __props.resizable && __props.lazy) - ]), - style: normalizeStyle(draggerStyles.value), - onMousedown, - onTouchstart: onTouchStart - }, - null, - 38 - ), - __props.endCollapsible ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-end`)]), - onClick: _cache[1] || (_cache[1] = ($event) => emit("collapse", __props.index, "end")) - }, - [ - renderSlot(_ctx.$slots, "end-collapsible", {}, () => [ - (openBlock(), createBlock(resolveDynamicComponent(EndIcon.value), { style: { "width": "12px", "height": "12px" } })) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 6 - ); - }; - } -}); -var SplitBar = _export_sfc(_sfc_main157, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/splitter/src/split-bar.vue"]]); - -// node_modules/element-plus/es/components/splitter/src/split-panel.mjs -var splitterPanelProps = buildProps({ - min: { - type: [String, Number] - }, - max: { - type: [String, Number] - }, - size: { - type: [String, Number] - }, - resizable: { - type: Boolean, - default: true - }, - collapsible: Boolean -}); -var splitterPanelEmits = { - "update:size": (value) => typeof value === "number" || typeof value === "string" -}; - -// node_modules/element-plus/es/components/splitter/src/split-panel2.mjs -var COMPONENT_NAME26 = "ElSplitterPanel"; -var _sfc_main158 = defineComponent({ - ...{ - name: COMPONENT_NAME26 - }, - __name: "split-panel", - props: splitterPanelProps, - emits: splitterPanelEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const ns = useNamespace("splitter-panel"); - const props2 = __props; - const emits = __emit; - const splitterContext = inject(splitterRootContextKey); - if (!splitterContext) - throwError( - COMPONENT_NAME26, - "usage: " - ); - const { panels, layout: layout2, lazy, containerSize, pxSizes } = toRefs(splitterContext); - const { - registerPanel, - unregisterPanel, - onCollapse, - onMoveEnd, - onMoveStart, - onMoving - } = splitterContext; - const panelEl = ref(); - const instance = getCurrentInstance(); - const uid2 = instance.uid; - const index = ref(0); - const panel = computed(() => panels.value[index.value]); - const setIndex = (val) => { - index.value = val; - }; - const panelSize = computed(() => { - var _a; - if (!panel.value) - return 0; - return (_a = pxSizes.value[index.value]) != null ? _a : 0; - }); - const nextSize = computed(() => { - var _a; - if (!panel.value) - return 0; - return (_a = pxSizes.value[index.value + 1]) != null ? _a : 0; - }); - const nextPanel = computed(() => { - if (panel.value) { - return panels.value[index.value + 1]; - } - return null; - }); - const isResizable = computed(() => { - var _a; - if (!nextPanel.value) - return false; - return props2.resizable && ((_a = nextPanel.value) == null ? void 0 : _a.resizable) && (panelSize.value !== 0 || !props2.min) && (nextSize.value !== 0 || !nextPanel.value.min); - }); - const isShowBar = computed(() => { - if (!panel.value) - return false; - return index.value !== panels.value.length - 1; - }); - const startCollapsible = computed( - () => isCollapsible(panel.value, panelSize.value, nextPanel.value, nextSize.value) - ); - const endCollapsible = computed( - () => isCollapsible(nextPanel.value, nextSize.value, panel.value, panelSize.value) - ); - function sizeToPx(str) { - if (isPct(str)) { - return getPct(str) * containerSize.value || 0; - } else if (isPx(str)) { - return getPx(str); - } - return str != null ? str : 0; - } - let isSizeUpdating = false; - watch( - () => props2.size, - () => { - if (!isSizeUpdating && panel.value) { - if (!containerSize.value) { - panel.value.size = props2.size; - return; - } - const size3 = sizeToPx(props2.size); - const maxSize = sizeToPx(props2.max); - const minSize = sizeToPx(props2.min); - const finalSize = Math.min(Math.max(size3, minSize || 0), maxSize || size3); - if (finalSize !== size3) { - emits("update:size", finalSize); - } - panel.value.size = finalSize; - } - } - ); - watch( - () => { - var _a; - return (_a = panel.value) == null ? void 0 : _a.size; - }, - (val) => { - if (val !== props2.size) { - isSizeUpdating = true; - emits("update:size", val); - nextTick(() => isSizeUpdating = false); - } - } - ); - watch( - () => props2.resizable, - (val) => { - if (panel.value) { - panel.value.resizable = val; - } - } - ); - const _panel = reactive({ - el: panelEl.value, - uid: uid2, - getVnode: () => instance.vnode, - setIndex, - ...props2, - collapsible: computed(() => getCollapsible(props2.collapsible)) - }); - registerPanel(_panel); - onBeforeUnmount(() => unregisterPanel(_panel)); - __expose({ - splitterPanelRef: panelEl - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock( - Fragment, - null, - [ - createBaseVNode( - "div", - mergeProps({ - ref_key: "panelEl", - ref: panelEl, - class: [unref(ns).b()], - style: { flexBasis: `${panelSize.value}px` } - }, _ctx.$attrs), - [ - renderSlot(_ctx.$slots, "default") - ], - 16 - ), - isShowBar.value ? (openBlock(), createBlock(SplitBar, { - key: 0, - index: index.value, - layout: unref(layout2), - lazy: unref(lazy), - resizable: isResizable.value, - "start-collapsible": startCollapsible.value, - "end-collapsible": endCollapsible.value, - onMoveStart: unref(onMoveStart), - onMoving: unref(onMoving), - onMoveEnd: unref(onMoveEnd), - onCollapse: unref(onCollapse) - }, { - "start-collapsible": withCtx(() => [ - renderSlot(_ctx.$slots, "start-collapsible") - ]), - "end-collapsible": withCtx(() => [ - renderSlot(_ctx.$slots, "end-collapsible") - ]), - _: 3 - }, 8, ["index", "layout", "lazy", "resizable", "start-collapsible", "end-collapsible", "onMoveStart", "onMoving", "onMoveEnd", "onCollapse"])) : createCommentVNode("v-if", true) - ], - 64 - ); - }; - } -}); -var SplitPanel = _export_sfc(_sfc_main158, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/splitter/src/split-panel.vue"]]); - -// node_modules/element-plus/es/components/splitter/index.mjs -var ElSplitter = withInstall(Splitter, { - SplitPanel -}); -var ElSplitterPanel = withNoopInstall(SplitPanel); - -// node_modules/element-plus/es/component.mjs -var Components = [ - ElAffix, - ElAlert, - ElAutocomplete, - ElAutoResizer, - ElAvatar, - ElAvatarGroup, - ElBacktop, - ElBadge, - ElBreadcrumb, - ElBreadcrumbItem, - ElButton, - ElButtonGroup, - ElCalendar, - ElCard, - ElCarousel, - ElCarouselItem, - ElCascader, - ElCascaderPanel, - ElCheckTag, - ElCheckbox, - ElCheckboxButton, - ElCheckboxGroup, - ElCol, - ElCollapse, - ElCollapseItem, - ElCollapseTransition, - ElColorPickerPanel, - ElColorPicker, - ElConfigProvider, - ElContainer, - ElAside, - ElFooter, - ElHeader, - ElMain, - ElDatePicker, - ElDatePickerPanel, - ElDescriptions, - ElDescriptionsItem, - ElDialog, - ElDivider, - ElDrawer, - ElDropdown, - ElDropdownItem, - ElDropdownMenu, - ElEmpty, - ElForm, - ElFormItem, - ElIcon, - ElImage, - ElImageViewer, - ElInput, - ElInputNumber, - ElInputTag, - ElLink, - ElMenu, - ElMenuItem, - ElMenuItemGroup, - ElSubMenu, - ElPageHeader, - ElPagination, - ElPopconfirm, - ElPopover, - ElPopper, - ElProgress, - ElRadio, - ElRadioButton, - ElRadioGroup, - ElRate, - ElResult, - ElRow, - ElScrollbar, - ElSelect, - ElOption, - ElOptionGroup, - ElSelectV2, - ElSkeleton, - ElSkeletonItem, - ElSlider, - ElSpace, - ElStatistic, - ElCountdown, - ElSteps, - ElStep, - ElSwitch, - ElTable, - ElTableColumn2, - ElTableV2, - ElTabs, - ElTabPane, - ElTag, - ElText, - ElTimePicker, - ElTimeSelect, - ElTimeline, - ElTimelineItem, - ElTooltip, - ElTransfer, - ElTree, - ElTreeSelect, - ElTreeV2, - ElUpload, - ElWatermark, - ElTour, - ElTourStep, - ElAnchor, - ElAnchorLink, - ElSegmented, - ElMention, - ElSplitter, - ElSplitterPanel -]; - -// node_modules/element-plus/es/components/infinite-scroll/src/index.mjs -var SCOPE13 = "ElInfiniteScroll"; -var CHECK_INTERVAL = 50; -var DEFAULT_DELAY = 200; -var DEFAULT_DISTANCE = 0; -var attributes = { - delay: { - type: Number, - default: DEFAULT_DELAY - }, - distance: { - type: Number, - default: DEFAULT_DISTANCE - }, - disabled: { - type: Boolean, - default: false - }, - immediate: { - type: Boolean, - default: true - } -}; -var getScrollOptions = (el, instance) => { - return Object.entries(attributes).reduce((acm, [name, option]) => { - var _a, _b; - const { type: type4, default: defaultValue } = option; - const attrVal = el.getAttribute(`infinite-scroll-${name}`); - let value = (_b = (_a = instance[attrVal]) != null ? _a : attrVal) != null ? _b : defaultValue; - value = value === "false" ? false : value; - value = type4(value); - acm[name] = Number.isNaN(value) ? defaultValue : value; - return acm; - }, {}); -}; -var destroyObserver = (el) => { - const { observer } = el[SCOPE13]; - if (observer) { - observer.disconnect(); - delete el[SCOPE13].observer; - } -}; -var handleScroll = (el, cb) => { - const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE13]; - const { disabled, distance } = getScrollOptions(el, instance); - const { clientHeight, scrollHeight, scrollTop } = containerEl; - const delta = scrollTop - lastScrollTop; - el[SCOPE13].lastScrollTop = scrollTop; - if (observer || disabled || delta < 0) - return; - let shouldTrigger = false; - if (container === el) { - shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance; - } else { - const { clientTop, scrollHeight: height } = el; - const offsetTop = getOffsetTopDistance(el, containerEl); - shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance; - } - if (shouldTrigger) { - cb.call(instance); - } -}; -function checkFull(el, cb) { - const { containerEl, instance } = el[SCOPE13]; - const { disabled } = getScrollOptions(el, instance); - if (disabled || containerEl.clientHeight === 0) - return; - if (containerEl.scrollHeight <= containerEl.clientHeight) { - cb.call(instance); - } else { - destroyObserver(el); - } -} -var InfiniteScroll = { - async mounted(el, binding) { - const { instance, value: cb } = binding; - useDeprecated( - { - scope: SCOPE13, - from: "the directive v-infinite-scroll", - replacement: "the el-scrollbar infinite scroll", - version: "3.0.0", - ref: "https://element-plus.org/en-US/component/scrollbar#infinite-scroll" - }, - true - ); - if (!isFunction(cb)) { - throwError(SCOPE13, "'v-infinite-scroll' binding value must be a function"); - } - await nextTick(); - const { delay: delay2, immediate } = getScrollOptions(el, instance); - const container = getScrollContainer(el, true); - const containerEl = container === window ? document.documentElement : container; - const onScroll = throttle_default(handleScroll.bind(null, el, cb), delay2); - if (!container) - return; - el[SCOPE13] = { - instance, - container, - containerEl, - delay: delay2, - cb, - onScroll, - lastScrollTop: containerEl.scrollTop - }; - if (immediate) { - const observer = new MutationObserver( - throttle_default(checkFull.bind(null, el, cb), CHECK_INTERVAL) - ); - el[SCOPE13].observer = observer; - observer.observe(el, { childList: true, subtree: true }); - checkFull(el, cb); - } - container.addEventListener("scroll", onScroll); - }, - unmounted(el) { - if (!el[SCOPE13]) - return; - const { container, onScroll } = el[SCOPE13]; - container == null ? void 0 : container.removeEventListener("scroll", onScroll); - destroyObserver(el); - }, - async updated(el) { - if (!el[SCOPE13]) { - await nextTick(); - } else { - const { containerEl, cb, observer } = el[SCOPE13]; - if (containerEl.clientHeight && observer) { - checkFull(el, cb); - } - } - } -}; - -// node_modules/element-plus/es/components/infinite-scroll/index.mjs -var _InfiniteScroll = InfiniteScroll; -_InfiniteScroll.install = (app) => { - app.directive("InfiniteScroll", _InfiniteScroll); -}; -var ElInfiniteScroll = _InfiniteScroll; - -// node_modules/element-plus/es/components/loading/src/loading.mjs -function createLoadingComponent(options, appContext) { - let afterLeaveTimer; - const afterLeaveFlag = ref(false); - const data = reactive({ - ...options, - originalPosition: "", - originalOverflow: "", - visible: false - }); - function setText(text) { - data.text = text; - } - function destroySelf() { - const target2 = data.parent; - const ns = vm.ns; - if (!target2.vLoadingAddClassList) { - let loadingNumber = target2.getAttribute("loading-number"); - loadingNumber = Number.parseInt(loadingNumber) - 1; - if (!loadingNumber) { - removeClass(target2, ns.bm("parent", "relative")); - target2.removeAttribute("loading-number"); - } else { - target2.setAttribute("loading-number", loadingNumber.toString()); - } - removeClass(target2, ns.bm("parent", "hidden")); - } - removeElLoadingChild(); - loadingInstance.unmount(); - } - function removeElLoadingChild() { - var _a, _b; - (_b = (_a = vm.$el) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.removeChild(vm.$el); - } - function close2() { - var _a; - if (options.beforeClose && !options.beforeClose()) - return; - afterLeaveFlag.value = true; - clearTimeout(afterLeaveTimer); - afterLeaveTimer = setTimeout(handleAfterLeave, 400); - data.visible = false; - (_a = options.closed) == null ? void 0 : _a.call(options); - } - function handleAfterLeave() { - if (!afterLeaveFlag.value) - return; - const target2 = data.parent; - afterLeaveFlag.value = false; - target2.vLoadingAddClassList = void 0; - destroySelf(); - } - const elLoadingComponent = defineComponent({ - name: "ElLoading", - setup(_2, { expose }) { - const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("loading"); - expose({ - ns, - zIndex: zIndex2 - }); - return () => { - const svg = data.spinner || data.svg; - const spinner = h( - "svg", - { - class: "circular", - viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50", - ...svg ? { innerHTML: svg } : {} - }, - [ - h("circle", { - class: "path", - cx: "25", - cy: "25", - r: "20", - fill: "none" - }) - ] - ); - const spinnerText = data.text ? h("p", { class: ns.b("text") }, [data.text]) : void 0; - return h( - Transition, - { - name: ns.b("fade"), - onAfterLeave: handleAfterLeave - }, - { - default: withCtx(() => [ - withDirectives( - createVNode( - "div", - { - style: { - backgroundColor: data.background || "" - }, - class: [ - ns.b("mask"), - data.customClass, - ns.is("fullscreen", data.fullscreen) - ] - }, - [ - h( - "div", - { - class: ns.b("spinner") - }, - [spinner, spinnerText] - ) - ] - ), - [[vShow, data.visible]] - ) - ]) - } - ); - }; - } - }); - const loadingInstance = createApp(elLoadingComponent); - Object.assign(loadingInstance._context, appContext != null ? appContext : {}); - const vm = loadingInstance.mount(document.createElement("div")); - return { - ...toRefs(data), - setText, - removeElLoadingChild, - close: close2, - handleAfterLeave, - vm, - get $el() { - return vm.$el; - } - }; -} - -// node_modules/element-plus/es/components/loading/src/service.mjs -var fullscreenInstance = void 0; -var Loading = function(options = {}, context) { - if (!isClient) - return void 0; - const resolved = resolveOptions(options); - if (resolved.fullscreen && fullscreenInstance) { - return fullscreenInstance; - } - const instance = createLoadingComponent( - { - ...resolved, - closed: () => { - var _a; - (_a = resolved.closed) == null ? void 0 : _a.call(resolved); - if (resolved.fullscreen) - fullscreenInstance = void 0; - } - }, - context != null ? context : Loading._context - ); - addStyle(resolved, resolved.parent, instance); - addClassList(resolved, resolved.parent, instance); - resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance); - let loadingNumber = resolved.parent.getAttribute("loading-number"); - if (!loadingNumber) { - loadingNumber = "1"; - } else { - loadingNumber = `${Number.parseInt(loadingNumber) + 1}`; - } - resolved.parent.setAttribute("loading-number", loadingNumber); - resolved.parent.appendChild(instance.$el); - nextTick(() => instance.visible.value = resolved.visible); - if (resolved.fullscreen) { - fullscreenInstance = instance; - } - return instance; -}; -var resolveOptions = (options) => { - var _a, _b, _c, _d; - let target2; - if (isString(options.target)) { - target2 = (_a = document.querySelector(options.target)) != null ? _a : document.body; - } else { - target2 = options.target || document.body; - } - return { - parent: target2 === document.body || options.body ? document.body : target2, - background: options.background || "", - svg: options.svg || "", - svgViewBox: options.svgViewBox || "", - spinner: options.spinner || false, - text: options.text || "", - fullscreen: target2 === document.body && ((_b = options.fullscreen) != null ? _b : true), - lock: (_c = options.lock) != null ? _c : false, - customClass: options.customClass || "", - visible: (_d = options.visible) != null ? _d : true, - beforeClose: options.beforeClose, - closed: options.closed, - target: target2 - }; -}; -var addStyle = async (options, parent2, instance) => { - const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex; - const maskStyle = {}; - if (options.fullscreen) { - instance.originalPosition.value = getStyle(document.body, "position"); - instance.originalOverflow.value = getStyle(document.body, "overflow"); - maskStyle.zIndex = nextZIndex(); - } else if (options.parent === document.body) { - instance.originalPosition.value = getStyle(document.body, "position"); - await nextTick(); - for (const property2 of ["top", "left"]) { - const scroll = property2 === "top" ? "scrollTop" : "scrollLeft"; - maskStyle[property2] = `${options.target.getBoundingClientRect()[property2] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property2}`), 10)}px`; - } - for (const property2 of ["height", "width"]) { - maskStyle[property2] = `${options.target.getBoundingClientRect()[property2]}px`; - } - } else { - instance.originalPosition.value = getStyle(parent2, "position"); - } - for (const [key, value] of Object.entries(maskStyle)) { - instance.$el.style[key] = value; - } -}; -var addClassList = (options, parent2, instance) => { - const ns = instance.vm.ns || instance.vm._.exposed.ns; - if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) { - addClass(parent2, ns.bm("parent", "relative")); - } else { - removeClass(parent2, ns.bm("parent", "relative")); - } - if (options.fullscreen && options.lock) { - addClass(parent2, ns.bm("parent", "hidden")); - } else { - removeClass(parent2, ns.bm("parent", "hidden")); - } -}; -Loading._context = null; - -// node_modules/element-plus/es/components/loading/src/directive.mjs -var INSTANCE_KEY = Symbol("ElLoading"); -var getAttributeName = (name) => { - return `element-loading-${hyphenate(name)}`; -}; -var createInstance = (el, binding) => { - var _a, _b, _c, _d; - const vm = binding.instance; - const getBindingProp = (key) => isObject(binding.value) ? binding.value[key] : void 0; - const resolveExpression = (key) => { - const data = isString(key) && (vm == null ? void 0 : vm[key]) || key; - return ref(data); - }; - const getProp2 = (name) => resolveExpression( - getBindingProp(name) || el.getAttribute(getAttributeName(name)) - ); - const fullscreen = (_a = getBindingProp("fullscreen")) != null ? _a : binding.modifiers.fullscreen; - const options = { - text: getProp2("text"), - svg: getProp2("svg"), - svgViewBox: getProp2("svgViewBox"), - spinner: getProp2("spinner"), - background: getProp2("background"), - customClass: getProp2("customClass"), - fullscreen, - target: (_b = getBindingProp("target")) != null ? _b : fullscreen ? void 0 : el, - body: (_c = getBindingProp("body")) != null ? _c : binding.modifiers.body, - lock: (_d = getBindingProp("lock")) != null ? _d : binding.modifiers.lock - }; - const instance = Loading(options); - instance._context = vLoading._context; - el[INSTANCE_KEY] = { - options, - instance - }; -}; -var updateOptions = (originalOptions, newOptions) => { - for (const key of Object.keys(originalOptions)) { - if (isRef(originalOptions[key])) - originalOptions[key].value = newOptions[key]; - } -}; -var vLoading = { - mounted(el, binding) { - if (binding.value) { - createInstance(el, binding); - } - }, - updated(el, binding) { - const instance = el[INSTANCE_KEY]; - if (!binding.value) { - instance == null ? void 0 : instance.instance.close(); - el[INSTANCE_KEY] = null; - return; - } - if (!instance) - createInstance(el, binding); - else { - updateOptions( - instance.options, - isObject(binding.value) ? binding.value : { - text: el.getAttribute(getAttributeName("text")), - svg: el.getAttribute(getAttributeName("svg")), - svgViewBox: el.getAttribute(getAttributeName("svgViewBox")), - spinner: el.getAttribute(getAttributeName("spinner")), - background: el.getAttribute(getAttributeName("background")), - customClass: el.getAttribute(getAttributeName("customClass")) - } - ); - } - }, - unmounted(el) { - var _a; - (_a = el[INSTANCE_KEY]) == null ? void 0 : _a.instance.close(); - el[INSTANCE_KEY] = null; - } -}; -vLoading._context = null; - -// node_modules/element-plus/es/components/loading/index.mjs -var ElLoading = { - install(app) { - Loading._context = app._context; - vLoading._context = app._context; - app.directive("loading", vLoading); - app.config.globalProperties.$loading = Loading; - }, - directive: vLoading, - service: Loading -}; - -// node_modules/element-plus/es/components/message/src/message.mjs -var messageTypes = [ - "primary", - "success", - "info", - "warning", - "error" -]; -var messagePlacement = [ - "top", - "top-left", - "top-right", - "bottom", - "bottom-left", - "bottom-right" -]; -var MESSAGE_DEFAULT_PLACEMENT = "top"; -var messageDefaults = mutable({ - customClass: "", - dangerouslyUseHTMLString: false, - duration: 3e3, - icon: void 0, - id: "", - message: "", - onClose: void 0, - showClose: false, - type: "info", - plain: false, - offset: 16, - placement: void 0, - zIndex: 0, - grouping: false, - repeatNum: 1, - appendTo: isClient ? document.body : void 0 -}); -var messageProps = buildProps({ - customClass: { - type: String, - default: messageDefaults.customClass - }, - dangerouslyUseHTMLString: { - type: Boolean, - default: messageDefaults.dangerouslyUseHTMLString - }, - duration: { - type: Number, - default: messageDefaults.duration - }, - icon: { - type: iconPropType, - default: messageDefaults.icon - }, - id: { - type: String, - default: messageDefaults.id - }, - message: { - type: definePropType([ - String, - Object, - Function - ]), - default: messageDefaults.message - }, - onClose: { - type: definePropType(Function), - default: messageDefaults.onClose - }, - showClose: { - type: Boolean, - default: messageDefaults.showClose - }, - type: { - type: String, - values: messageTypes, - default: messageDefaults.type - }, - plain: { - type: Boolean, - default: messageDefaults.plain - }, - offset: { - type: Number, - default: messageDefaults.offset - }, - placement: { - type: String, - values: messagePlacement, - default: messageDefaults.placement - }, - zIndex: { - type: Number, - default: messageDefaults.zIndex - }, - grouping: { - type: Boolean, - default: messageDefaults.grouping - }, - repeatNum: { - type: Number, - default: messageDefaults.repeatNum - } -}); -var messageEmits = { - destroy: () => true -}; - -// node_modules/element-plus/es/components/message/src/instance.mjs -var placementInstances = shallowReactive( - {} -); -var getOrCreatePlacementInstances = (placement) => { - if (!placementInstances[placement]) { - placementInstances[placement] = shallowReactive([]); - } - return placementInstances[placement]; -}; -var getInstance = (id, placement) => { - const instances = placementInstances[placement] || []; - const idx = instances.findIndex((instance) => instance.id === id); - const current = instances[idx]; - let prev; - if (idx > 0) { - prev = instances[idx - 1]; - } - return { current, prev }; -}; -var getLastOffset = (id, placement) => { - const { prev } = getInstance(id, placement); - if (!prev) - return 0; - return prev.vm.exposed.bottom.value; -}; -var getOffsetOrSpace = (id, offset3, placement) => { - const instances = placementInstances[placement] || []; - const idx = instances.findIndex((instance) => instance.id === id); - return idx > 0 ? 16 : offset3; -}; - -// node_modules/element-plus/es/components/message/src/message2.mjs -var _hoisted_183 = ["id"]; -var _hoisted_244 = ["innerHTML"]; -var _sfc_main159 = defineComponent({ - ...{ - name: "ElMessage" - }, - __name: "message", - props: messageProps, - emits: messageEmits, - setup(__props, { expose: __expose, emit: __emit }) { - const { Close } = TypeComponents; - const props2 = __props; - const emit = __emit; - const isStartTransition = ref(false); - const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("message"); - const { currentZIndex, nextZIndex } = zIndex2; - const messageRef = ref(); - const visible = ref(false); - const height = ref(0); - let stopTimer = void 0; - const badgeType = computed( - () => props2.type ? props2.type === "error" ? "danger" : props2.type : "info" - ); - const typeClass = computed(() => { - const type4 = props2.type; - return { [ns.bm("icon", type4)]: type4 && TypeComponentsMap[type4] }; - }); - const iconComponent = computed( - () => props2.icon || TypeComponentsMap[props2.type] || "" - ); - const placement = computed(() => props2.placement || MESSAGE_DEFAULT_PLACEMENT); - const lastOffset = computed(() => getLastOffset(props2.id, placement.value)); - const offset3 = computed(() => { - return getOffsetOrSpace(props2.id, props2.offset, placement.value) + lastOffset.value; - }); - const bottom = computed(() => height.value + offset3.value); - const horizontalClass = computed(() => { - if (placement.value.includes("left")) - return ns.is("left"); - if (placement.value.includes("right")) - return ns.is("right"); - return ns.is("center"); - }); - const verticalProperty = computed( - () => placement.value.startsWith("top") ? "top" : "bottom" - ); - const customStyle = computed(() => ({ - [verticalProperty.value]: `${offset3.value}px`, - zIndex: currentZIndex.value - })); - function startTimer() { - if (props2.duration === 0) - return; - ({ stop: stopTimer } = useTimeoutFn(() => { - close2(); - }, props2.duration)); - } - function clearTimer() { - stopTimer == null ? void 0 : stopTimer(); - } - function close2() { - visible.value = false; - nextTick(() => { - var _a; - if (!isStartTransition.value) { - (_a = props2.onClose) == null ? void 0 : _a.call(props2); - emit("destroy"); - } - }); - } - function keydown(event) { - const code = getEventCode(event); - if (code === EVENT_CODE.esc) { - close2(); - } - } - onMounted(() => { - startTimer(); - nextZIndex(); - visible.value = true; - }); - watch( - () => props2.repeatNum, - () => { - clearTimer(); - startTimer(); - } - ); - useEventListener(document, "keydown", keydown); - useResizeObserver(messageRef, () => { - height.value = messageRef.value.getBoundingClientRect().height; - }); - __expose({ - visible, - bottom, - close: close2 - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, { - name: unref(ns).b("fade"), - onBeforeEnter: _cache[0] || (_cache[0] = ($event) => isStartTransition.value = true), - onBeforeLeave: _ctx.onClose, - onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")), - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode("div", { - id: _ctx.id, - ref_key: "messageRef", - ref: messageRef, - class: normalizeClass([ - unref(ns).b(), - { [unref(ns).m(_ctx.type)]: _ctx.type }, - unref(ns).is("closable", _ctx.showClose), - unref(ns).is("plain", _ctx.plain), - unref(ns).is("bottom", verticalProperty.value === "bottom"), - horizontalClass.value, - _ctx.customClass - ]), - style: normalizeStyle(customStyle.value), - role: "alert", - onMouseenter: clearTimer, - onMouseleave: startTimer - }, [ - _ctx.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), { - key: 0, - value: _ctx.repeatNum, - type: badgeType.value, - class: normalizeClass(unref(ns).e("badge")) - }, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true), - iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 1, - class: normalizeClass([unref(ns).e("icon"), typeClass.value]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - renderSlot(_ctx.$slots, "default", {}, () => [ - !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock( - "p", - { - key: 0, - class: normalizeClass(unref(ns).e("content")) - }, - toDisplayString(_ctx.message), - 3 - )) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), - createBaseVNode("p", { - class: normalizeClass(unref(ns).e("content")), - innerHTML: _ctx.message - }, null, 10, _hoisted_244) - ], - 2112 - )) - ]), - _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), { - key: 2, - class: normalizeClass(unref(ns).e("closeBtn")), - onClick: withModifiers(close2, ["stop"]) - }, { - default: withCtx(() => [ - createVNode(unref(Close)) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], 46, _hoisted_183), [ - [vShow, visible.value] - ]) - ]), - _: 3 - }, 8, ["name", "onBeforeLeave"]); - }; - } -}); -var MessageConstructor = _export_sfc(_sfc_main159, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]); - -// node_modules/element-plus/es/components/message/src/method.mjs -var seed = 1; -var normalizeAppendTo = (normalized) => { - const appendTo = normalized.appendTo; - if (!appendTo) { - normalized.appendTo = document.body; - } else if (isString(normalized.appendTo)) { - let appendTo2 = document.querySelector(normalized.appendTo); - if (!isElement2(appendTo2)) { - debugWarn( - "ElMessage", - "the appendTo option is not an HTMLElement. Falling back to document.body." - ); - appendTo2 = document.body; - } - normalized.appendTo = appendTo2; - } -}; -var normalizePlacement = (normalized) => { - if (!normalized.placement && isString(messageConfig.placement) && messageConfig.placement) { - normalized.placement = messageConfig.placement; - } - if (!normalized.placement) { - normalized.placement = MESSAGE_DEFAULT_PLACEMENT; - } - if (!messagePlacement.includes(normalized.placement)) { - debugWarn( - "ElMessage", - `Invalid placement: ${normalized.placement}. Falling back to '${MESSAGE_DEFAULT_PLACEMENT}'.` - ); - normalized.placement = MESSAGE_DEFAULT_PLACEMENT; - } -}; -var normalizeOptions = (params) => { - const options = !params || isString(params) || isVNode(params) || isFunction(params) ? { message: params } : params; - const normalized = { - ...messageDefaults, - ...options - }; - normalizeAppendTo(normalized); - normalizePlacement(normalized); - if (isBoolean2(messageConfig.grouping) && !normalized.grouping) { - normalized.grouping = messageConfig.grouping; - } - if (isNumber2(messageConfig.duration) && normalized.duration === 3e3) { - normalized.duration = messageConfig.duration; - } - if (isNumber2(messageConfig.offset) && normalized.offset === 16) { - normalized.offset = messageConfig.offset; - } - if (isBoolean2(messageConfig.showClose) && !normalized.showClose) { - normalized.showClose = messageConfig.showClose; - } - if (isBoolean2(messageConfig.plain) && !normalized.plain) { - normalized.plain = messageConfig.plain; - } - return normalized; -}; -var closeMessage = (instance) => { - const placement = instance.props.placement || MESSAGE_DEFAULT_PLACEMENT; - const instances = placementInstances[placement]; - const idx = instances.indexOf(instance); - if (idx === -1) - return; - instances.splice(idx, 1); - const { handler } = instance; - handler.close(); -}; -var createMessage = ({ appendTo, ...options }, context) => { - const id = `message_${seed++}`; - const userOnClose = options.onClose; - const container = document.createElement("div"); - const props2 = { - ...options, - id, - onClose: () => { - userOnClose == null ? void 0 : userOnClose(); - closeMessage(instance); - }, - onDestroy: () => { - render(null, container); - } - }; - const vnode = createVNode( - MessageConstructor, - props2, - isFunction(props2.message) || isVNode(props2.message) ? { - default: isFunction(props2.message) ? props2.message : () => props2.message - } : null - ); - vnode.appContext = context || message._context; - render(vnode, container); - appendTo.appendChild(container.firstElementChild); - const vm = vnode.component; - const handler = { - close: () => { - vm.exposed.close(); - } - }; - const instance = { - id, - vnode, - vm, - handler, - props: vnode.component.props - }; - return instance; -}; -var message = (options = {}, context) => { - if (!isClient) - return { close: () => void 0 }; - const normalized = normalizeOptions(options); - const instances = getOrCreatePlacementInstances( - normalized.placement || MESSAGE_DEFAULT_PLACEMENT - ); - if (normalized.grouping && instances.length) { - const instance2 = instances.find( - ({ vnode: vm }) => { - var _a; - return ((_a = vm.props) == null ? void 0 : _a.message) === normalized.message; - } - ); - if (instance2) { - instance2.props.repeatNum += 1; - instance2.props.type = normalized.type; - return instance2.handler; - } - } - if (isNumber2(messageConfig.max) && instances.length >= messageConfig.max) { - return { close: () => void 0 }; - } - const instance = createMessage(normalized, context); - instances.push(instance); - return instance.handler; -}; -messageTypes.forEach((type4) => { - message[type4] = (options = {}, appContext) => { - const normalized = normalizeOptions(options); - return message({ ...normalized, type: type4 }, appContext); - }; -}); -function closeAll(type4) { - for (const placement in placementInstances) { - if (hasOwn(placementInstances, placement)) { - const instances = [...placementInstances[placement]]; - for (const instance of instances) { - if (!type4 || type4 === instance.props.type) { - instance.handler.close(); - } - } - } - } -} -function closeAllByPlacement(placement) { - if (!placementInstances[placement]) - return; - const instances = [...placementInstances[placement]]; - instances.forEach((instance) => instance.handler.close()); -} -message.closeAll = closeAll; -message.closeAllByPlacement = closeAllByPlacement; -message._context = null; - -// node_modules/element-plus/es/components/message/index.mjs -var ElMessage = withInstallFunction(message, "$message"); - -// node_modules/element-plus/es/directives/trap-focus/index.mjs -var FOCUSABLE_CHILDREN = "_trap-focus-children"; -var FOCUS_STACK = []; -var FOCUS_HANDLER = (e) => { - var _a; - if (FOCUS_STACK.length === 0) - return; - const code = getEventCode(e); - const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN]; - if (focusableElement.length > 0 && code === EVENT_CODE.tab) { - if (focusableElement.length === 1) { - e.preventDefault(); - if (document.activeElement !== focusableElement[0]) { - focusableElement[0].focus(); - } - return; - } - const goingBackward = e.shiftKey; - const isFirst = e.target === focusableElement[0]; - const isLast = e.target === focusableElement[focusableElement.length - 1]; - if (isFirst && goingBackward) { - e.preventDefault(); - focusableElement[focusableElement.length - 1].focus(); - } - if (isLast && !goingBackward) { - e.preventDefault(); - focusableElement[0].focus(); - } - if (false) { - const index = focusableElement.indexOf(e.target); - if (index !== -1) { - (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus(); - } - } - } -}; -var TrapFocus = { - beforeMount(el) { - el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el); - FOCUS_STACK.push(el); - if (FOCUS_STACK.length <= 1) { - document.addEventListener("keydown", FOCUS_HANDLER); - } - }, - updated(el) { - nextTick(() => { - el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el); - }); - }, - unmounted() { - FOCUS_STACK.shift(); - if (FOCUS_STACK.length === 0) { - document.removeEventListener("keydown", FOCUS_HANDLER); - } - } -}; - -// node_modules/element-plus/es/components/message-box/src/index.mjs -var _sfc_main160 = defineComponent({ - name: "ElMessageBox", - directives: { - TrapFocus - }, - components: { - ElButton, - ElFocusTrap, - ElInput, - ElOverlay, - ElIcon, - ...TypeComponents - }, - inheritAttrs: false, - props: { - buttonSize: { - type: String, - validator: isValidComponentSize - }, - modal: { - type: Boolean, - default: true - }, - lockScroll: { - type: Boolean, - default: true - }, - showClose: { - type: Boolean, - default: true - }, - closeOnClickModal: { - type: Boolean, - default: true - }, - closeOnPressEscape: { - type: Boolean, - default: true - }, - closeOnHashChange: { - type: Boolean, - default: true - }, - center: Boolean, - draggable: Boolean, - overflow: Boolean, - roundButton: Boolean, - container: { - type: String, - default: "body" - }, - boxType: { - type: String, - default: "" - } - }, - emits: ["vanish", "action"], - setup(props2, { emit }) { - const { - locale, - zIndex: zIndex2, - ns, - size: btnSize - } = useGlobalComponentSettings( - "message-box", - computed(() => props2.buttonSize) - ); - const { t } = locale; - const { nextZIndex } = zIndex2; - const visible = ref(false); - const state = reactive({ - autofocus: true, - beforeClose: null, - callback: null, - cancelButtonText: "", - cancelButtonClass: "", - confirmButtonText: "", - confirmButtonClass: "", - cancelButtonType: "", - confirmButtonType: "primary", - customClass: "", - customStyle: {}, - dangerouslyUseHTMLString: false, - distinguishCancelAndClose: false, - icon: "", - closeIcon: "", - inputPattern: null, - inputPlaceholder: "", - inputType: "text", - inputValue: "", - inputValidator: void 0, - inputErrorMessage: "", - message: "", - modalFade: true, - modalClass: "", - showCancelButton: false, - showConfirmButton: true, - type: "", - title: void 0, - showInput: false, - action: "", - confirmButtonLoading: false, - cancelButtonLoading: false, - confirmButtonLoadingIcon: markRaw(loading_default), - cancelButtonLoadingIcon: markRaw(loading_default), - confirmButtonDisabled: false, - editorErrorMessage: "", - validateError: false, - zIndex: nextZIndex() - }); - const typeClass = computed(() => { - const type4 = state.type; - return { [ns.bm("icon", type4)]: type4 && TypeComponentsMap[type4] }; - }); - const contentId = useId(); - const inputId = useId(); - const iconComponent = computed(() => { - const type4 = state.type; - return state.icon || type4 && TypeComponentsMap[type4] || ""; - }); - const hasMessage = computed(() => !!state.message); - const rootRef = ref(); - const headerRef = ref(); - const focusStartRef = ref(); - const inputRef = ref(); - const confirmRef = ref(); - const confirmButtonClasses = computed(() => state.confirmButtonClass); - watch( - () => state.inputValue, - async (val) => { - await nextTick(); - if (props2.boxType === "prompt" && val) { - validate(); - } - }, - { immediate: true } - ); - watch( - () => visible.value, - (val) => { - var _a, _b; - if (val) { - if (props2.boxType !== "prompt") { - if (state.autofocus) { - focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value; - } else { - focusStartRef.value = rootRef.value; - } - } - state.zIndex = nextZIndex(); - } - if (props2.boxType !== "prompt") - return; - if (val) { - nextTick().then(() => { - var _a2; - if (inputRef.value && inputRef.value.$el) { - if (state.autofocus) { - focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value; - } else { - focusStartRef.value = rootRef.value; - } - } - }); - } else { - state.editorErrorMessage = ""; - state.validateError = false; - } - } - ); - const draggable2 = computed(() => props2.draggable); - const overflow = computed(() => props2.overflow); - const { isDragging: isDragging2 } = useDraggable(rootRef, headerRef, draggable2, overflow); - onMounted(async () => { - await nextTick(); - if (props2.closeOnHashChange) { - window.addEventListener("hashchange", doClose); - } - }); - onBeforeUnmount(() => { - if (props2.closeOnHashChange) { - window.removeEventListener("hashchange", doClose); - } - }); - function doClose() { - if (!visible.value) - return; - visible.value = false; - nextTick(() => { - if (state.action) - emit("action", state.action); - }); - } - const handleWrapperClick = () => { - if (props2.closeOnClickModal) { - handleAction(state.distinguishCancelAndClose ? "close" : "cancel"); - } - }; - const overlayEvent = useSameTarget(handleWrapperClick); - const handleInputEnter = (e) => { - if (state.inputType !== "textarea") { - e.preventDefault(); - return handleAction("confirm"); - } - }; - const handleAction = (action) => { - var _a; - if (props2.boxType === "prompt" && action === "confirm" && !validate()) { - return; - } - state.action = action; - if (state.beforeClose) { - (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose); - } else { - doClose(); - } - }; - const validate = () => { - if (props2.boxType === "prompt") { - const inputPattern = state.inputPattern; - if (inputPattern && !inputPattern.test(state.inputValue || "")) { - state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error"); - state.validateError = true; - return false; - } - const inputValidator = state.inputValidator; - if (isFunction(inputValidator)) { - const validateResult = inputValidator(state.inputValue); - if (validateResult === false) { - state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error"); - state.validateError = true; - return false; - } - if (isString(validateResult)) { - state.editorErrorMessage = validateResult; - state.validateError = true; - return false; - } - } - } - state.editorErrorMessage = ""; - state.validateError = false; - return true; - }; - const getInputElement = () => { - var _a, _b; - const inputRefs = (_a = inputRef.value) == null ? void 0 : _a.$refs; - return (_b = inputRefs == null ? void 0 : inputRefs.input) != null ? _b : inputRefs == null ? void 0 : inputRefs.textarea; - }; - const handleClose = () => { - handleAction("close"); - }; - const onCloseRequested = () => { - if (props2.closeOnPressEscape) { - handleClose(); - } - }; - if (props2.lockScroll) { - useLockscreen(visible, { ns }); - } - return { - ...toRefs(state), - ns, - overlayEvent, - visible, - hasMessage, - typeClass, - contentId, - inputId, - btnSize, - iconComponent, - confirmButtonClasses, - rootRef, - focusStartRef, - headerRef, - inputRef, - isDragging: isDragging2, - confirmRef, - doClose, - handleClose, - onCloseRequested, - handleWrapperClick, - handleInputEnter, - handleAction, - t - }; - } -}); -var _hoisted_184 = ["aria-label", "aria-describedby"]; -var _hoisted_245 = ["aria-label"]; -var _hoisted_318 = ["id"]; -function _sfc_render22(_ctx, _cache, $props, $setup, $data, $options) { - const _component_el_icon = resolveComponent("el-icon"); - const _component_el_input = resolveComponent("el-input"); - const _component_el_button = resolveComponent("el-button"); - const _component_el_focus_trap = resolveComponent("el-focus-trap"); - const _component_el_overlay = resolveComponent("el-overlay"); - return openBlock(), createBlock(Transition, { - name: "fade-in-linear", - onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish")), - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createVNode(_component_el_overlay, { - "z-index": _ctx.zIndex, - "overlay-class": [_ctx.ns.is("message-box"), _ctx.modalClass], - mask: _ctx.modal - }, { - default: withCtx(() => [ - createBaseVNode("div", { - role: "dialog", - "aria-label": _ctx.title, - "aria-modal": "true", - "aria-describedby": !_ctx.showInput ? _ctx.contentId : void 0, - class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`), - onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)), - onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)), - onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args)) - }, [ - createVNode(_component_el_focus_trap, { - loop: "", - trapped: _ctx.visible, - "focus-trap-el": _ctx.rootRef, - "focus-start-el": _ctx.focusStartRef, - onReleaseRequested: _ctx.onCloseRequested - }, { - default: withCtx(() => [ - createBaseVNode( - "div", - { - ref: "rootRef", - class: normalizeClass([ - _ctx.ns.b(), - _ctx.customClass, - _ctx.ns.is("draggable", _ctx.draggable), - _ctx.ns.is("dragging", _ctx.isDragging), - { [_ctx.ns.m("center")]: _ctx.center } - ]), - style: normalizeStyle(_ctx.customStyle), - tabindex: "-1", - onClick: _cache[7] || (_cache[7] = withModifiers(() => { - }, ["stop"])) - }, - [ - _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock( - "div", - { - key: 0, - ref: "headerRef", - class: normalizeClass([_ctx.ns.e("header"), { "show-close": _ctx.showClose }]) - }, - [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("title")) - }, - [ - _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, { - key: 0, - class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - createBaseVNode( - "span", - null, - toDisplayString(_ctx.title), - 1 - ) - ], - 2 - ), - _ctx.showClose ? (openBlock(), createElementBlock("button", { - key: 0, - type: "button", - class: normalizeClass(_ctx.ns.e("headerbtn")), - "aria-label": _ctx.t("el.messagebox.close"), - onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")), - onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])) - }, [ - createVNode(_component_el_icon, { - class: normalizeClass(_ctx.ns.e("close")) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || "close"))) - ]), - _: 1 - }, 8, ["class"]) - ], 42, _hoisted_245)) : createCommentVNode("v-if", true) - ], - 2 - )) : createCommentVNode("v-if", true), - createBaseVNode("div", { - id: _ctx.contentId, - class: normalizeClass(_ctx.ns.e("content")) - }, [ - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("container")) - }, - [ - _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, { - key: 0, - class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - _ctx.hasMessage ? (openBlock(), createElementBlock( - "div", - { - key: 1, - class: normalizeClass(_ctx.ns.e("message")) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), { - key: 0, - for: _ctx.showInput ? _ctx.inputId : void 0, - textContent: toDisplayString(_ctx.message) - }, null, 8, ["for", "textContent"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), { - key: 1, - for: _ctx.showInput ? _ctx.inputId : void 0, - innerHTML: _ctx.message - }, null, 8, ["for", "innerHTML"])) - ]) - ], - 2 - )) : createCommentVNode("v-if", true) - ], - 2 - ), - withDirectives(createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("input")) - }, - [ - createVNode(_component_el_input, { - id: _ctx.inputId, - ref: "inputRef", - modelValue: _ctx.inputValue, - "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event), - type: _ctx.inputType, - placeholder: _ctx.inputPlaceholder, - "aria-invalid": _ctx.validateError, - class: normalizeClass({ invalid: _ctx.validateError }), - onKeydown: withKeys(_ctx.handleInputEnter, ["enter"]) - }, null, 8, ["id", "modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]), - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("errormsg")), - style: normalizeStyle({ - visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden" - }) - }, - toDisplayString(_ctx.editorErrorMessage), - 7 - ) - ], - 2 - ), [ - [vShow, _ctx.showInput] - ]) - ], 10, _hoisted_318), - createBaseVNode( - "div", - { - class: normalizeClass(_ctx.ns.e("btns")) - }, - [ - _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, { - key: 0, - type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType, - text: _ctx.cancelButtonType === "text", - loading: _ctx.cancelButtonLoading, - "loading-icon": _ctx.cancelButtonLoadingIcon, - class: normalizeClass([_ctx.cancelButtonClass]), - round: _ctx.roundButton, - size: _ctx.btnSize, - onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")), - onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"])) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), - 1 - ) - ]), - _: 1 - }, 8, ["type", "text", "loading", "loading-icon", "class", "round", "size"])) : createCommentVNode("v-if", true), - withDirectives(createVNode(_component_el_button, { - ref: "confirmRef", - type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType, - text: _ctx.confirmButtonType === "text", - loading: _ctx.confirmButtonLoading, - "loading-icon": _ctx.confirmButtonLoadingIcon, - class: normalizeClass([_ctx.confirmButtonClasses]), - round: _ctx.roundButton, - disabled: _ctx.confirmButtonDisabled, - size: _ctx.btnSize, - onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")), - onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"])) - }, { - default: withCtx(() => [ - createTextVNode( - toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), - 1 - ) - ]), - _: 1 - }, 8, ["type", "text", "loading", "loading-icon", "class", "round", "disabled", "size"]), [ - [vShow, _ctx.showConfirmButton] - ]) - ], - 2 - ) - ], - 6 - ) - ]), - _: 3 - }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"]) - ], 42, _hoisted_184) - ]), - _: 3 - }, 8, ["z-index", "overlay-class", "mask"]), [ - [vShow, _ctx.visible] - ]) - ]), - _: 3 - }); -} -var MessageBoxConstructor = _export_sfc(_sfc_main160, [["render", _sfc_render22], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]); - -// node_modules/element-plus/es/components/message-box/src/messageBox.mjs -var messageInstance = /* @__PURE__ */ new Map(); -var getAppendToElement = (props2) => { - let appendTo = document.body; - if (props2.appendTo) { - if (isString(props2.appendTo)) { - appendTo = document.querySelector(props2.appendTo); - } - if (isElement2(props2.appendTo)) { - appendTo = props2.appendTo; - } - if (!isElement2(appendTo)) { - debugWarn( - "ElMessageBox", - "the appendTo option is not an HTMLElement. Falling back to document.body." - ); - appendTo = document.body; - } - } - return appendTo; -}; -var initInstance = (props2, container, appContext = null) => { - const vnode = createVNode( - MessageBoxConstructor, - props2, - isFunction(props2.message) || isVNode(props2.message) ? { - default: isFunction(props2.message) ? props2.message : () => props2.message - } : null - ); - vnode.appContext = appContext; - render(vnode, container); - getAppendToElement(props2).appendChild(container.firstElementChild); - return vnode.component; -}; -var genContainer = () => { - return document.createElement("div"); -}; -var showMessage = (options, appContext) => { - const container = genContainer(); - options.onVanish = () => { - render(null, container); - messageInstance.delete(vm); - }; - options.onAction = (action) => { - const currentMsg = messageInstance.get(vm); - let resolve; - if (options.showInput) { - resolve = { value: vm.inputValue, action }; - } else { - resolve = action; - } - if (options.callback) { - options.callback(resolve, instance.proxy); - } else { - if (action === "cancel" || action === "close") { - if (options.distinguishCancelAndClose && action !== "cancel") { - currentMsg.reject("close"); - } else { - currentMsg.reject("cancel"); - } - } else { - currentMsg.resolve(resolve); - } - } - }; - const instance = initInstance(options, container, appContext); - const vm = instance.proxy; - for (const prop in options) { - if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) { - if (prop === "closeIcon" && isObject(options[prop])) { - vm[prop] = markRaw(options[prop]); - } else { - vm[prop] = options[prop]; - } - } - } - vm.visible = true; - return vm; -}; -function MessageBox(options, appContext = null) { - if (!isClient) - return Promise.reject(); - let callback; - if (isString(options) || isVNode(options)) { - options = { - message: options - }; - } else { - callback = options.callback; - } - return new Promise((resolve, reject2) => { - const vm = showMessage( - options, - appContext != null ? appContext : MessageBox._context - ); - messageInstance.set(vm, { - options, - callback, - resolve, - reject: reject2 - }); - }); -} -var MESSAGE_BOX_VARIANTS = ["alert", "confirm", "prompt"]; -var MESSAGE_BOX_DEFAULT_OPTS = { - alert: { closeOnPressEscape: false, closeOnClickModal: false }, - confirm: { showCancelButton: true }, - prompt: { showCancelButton: true, showInput: true } -}; -MESSAGE_BOX_VARIANTS.forEach((boxType) => { - MessageBox[boxType] = messageBoxFactory( - boxType - ); -}); -function messageBoxFactory(boxType) { - return (message2, title, options, appContext) => { - let titleOrOpts = ""; - if (isObject(title)) { - options = title; - titleOrOpts = ""; - } else if (isUndefined2(title)) { - titleOrOpts = ""; - } else { - titleOrOpts = title; - } - return MessageBox( - Object.assign( - { - title: titleOrOpts, - message: message2, - type: "", - ...MESSAGE_BOX_DEFAULT_OPTS[boxType] - }, - options, - { - boxType - } - ), - appContext - ); - }; -} -MessageBox.close = () => { - messageInstance.forEach((_2, vm) => { - vm.doClose(); - }); - messageInstance.clear(); -}; -MessageBox._context = null; - -// node_modules/element-plus/es/components/message-box/index.mjs -var _MessageBox = MessageBox; -_MessageBox.install = (app) => { - _MessageBox._context = app._context; - app.config.globalProperties.$msgbox = _MessageBox; - app.config.globalProperties.$messageBox = _MessageBox; - app.config.globalProperties.$alert = _MessageBox.alert; - app.config.globalProperties.$confirm = _MessageBox.confirm; - app.config.globalProperties.$prompt = _MessageBox.prompt; -}; -var ElMessageBox = _MessageBox; - -// node_modules/element-plus/es/components/notification/src/notification.mjs -var notificationTypes = [ - "primary", - "success", - "info", - "warning", - "error" -]; -var notificationProps = buildProps({ - customClass: { - type: String, - default: "" - }, - dangerouslyUseHTMLString: Boolean, - duration: { - type: Number, - default: 4500 - }, - icon: { - type: iconPropType - }, - id: { - type: String, - default: "" - }, - message: { - type: definePropType([ - String, - Object, - Function - ]), - default: "" - }, - offset: { - type: Number, - default: 0 - }, - onClick: { - type: definePropType(Function), - default: () => void 0 - }, - onClose: { - type: definePropType(Function), - required: true - }, - position: { - type: String, - values: ["top-right", "top-left", "bottom-right", "bottom-left"], - default: "top-right" - }, - showClose: { - type: Boolean, - default: true - }, - title: { - type: String, - default: "" - }, - type: { - type: String, - values: [...notificationTypes, ""], - default: "" - }, - zIndex: Number, - closeIcon: { - type: iconPropType, - default: close_default - } -}); -var notificationEmits = { - destroy: () => true -}; - -// node_modules/element-plus/es/components/notification/src/notification2.mjs -var _hoisted_185 = ["id"]; -var _hoisted_246 = ["textContent"]; -var _hoisted_319 = { key: 0 }; -var _hoisted_413 = ["innerHTML"]; -var _sfc_main161 = defineComponent({ - ...{ - name: "ElNotification" - }, - __name: "notification", - props: notificationProps, - emits: notificationEmits, - setup(__props, { expose: __expose }) { - const props2 = __props; - const { ns, zIndex: zIndex2 } = useGlobalComponentSettings("notification"); - const { nextZIndex, currentZIndex } = zIndex2; - const visible = ref(false); - let timer = void 0; - const typeClass = computed(() => { - const type4 = props2.type; - return type4 && TypeComponentsMap[props2.type] ? ns.m(type4) : ""; - }); - const iconComponent = computed(() => { - if (!props2.type) - return props2.icon; - return TypeComponentsMap[props2.type] || props2.icon; - }); - const horizontalClass = computed( - () => props2.position.endsWith("right") ? "right" : "left" - ); - const verticalProperty = computed( - () => props2.position.startsWith("top") ? "top" : "bottom" - ); - const positionStyle = computed(() => { - var _a; - return { - [verticalProperty.value]: `${props2.offset}px`, - zIndex: (_a = props2.zIndex) != null ? _a : currentZIndex.value - }; - }); - function startTimer() { - if (props2.duration > 0) { - ({ stop: timer } = useTimeoutFn(() => { - if (visible.value) - close2(); - }, props2.duration)); - } - } - function clearTimer() { - timer == null ? void 0 : timer(); - } - function close2() { - visible.value = false; - } - function onKeydown(event) { - const code = getEventCode(event); - switch (code) { - case EVENT_CODE.delete: - case EVENT_CODE.backspace: - clearTimer(); - break; - case EVENT_CODE.esc: - if (visible.value) { - close2(); - } - break; - default: - startTimer(); - break; - } - } - onMounted(() => { - startTimer(); - nextZIndex(); - visible.value = true; - }); - useEventListener(document, "keydown", onKeydown); - __expose({ - visible, - close: close2 - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(Transition, { - name: unref(ns).b("fade"), - onBeforeLeave: _ctx.onClose, - onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")), - persisted: "" - }, { - default: withCtx(() => [ - withDirectives(createBaseVNode("div", { - id: _ctx.id, - class: normalizeClass([unref(ns).b(), _ctx.customClass, horizontalClass.value]), - style: normalizeStyle(positionStyle.value), - role: "alert", - onMouseenter: clearTimer, - onMouseleave: startTimer, - onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)) - }, [ - iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass([unref(ns).e("icon"), typeClass.value]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true), - createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("group")) - }, - [ - createBaseVNode("h2", { - class: normalizeClass(unref(ns).e("title")), - textContent: toDisplayString(_ctx.title) - }, null, 10, _hoisted_246), - withDirectives(createBaseVNode( - "div", - { - class: normalizeClass(unref(ns).e("content")), - style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 }) - }, - [ - renderSlot(_ctx.$slots, "default", {}, () => [ - !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock( - "p", - _hoisted_319, - toDisplayString(_ctx.message), - 1 - )) : (openBlock(), createElementBlock( - Fragment, - { key: 1 }, - [ - createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), - createBaseVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_413) - ], - 2112 - )) - ]) - ], - 6 - ), [ - [vShow, _ctx.message] - ]), - _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), { - key: 0, - class: normalizeClass(unref(ns).e("closeBtn")), - onClick: withModifiers(close2, ["stop"]) - }, { - default: withCtx(() => [ - (openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon))) - ]), - _: 1 - }, 8, ["class"])) : createCommentVNode("v-if", true) - ], - 2 - ) - ], 46, _hoisted_185), [ - [vShow, visible.value] - ]) - ]), - _: 3 - }, 8, ["name", "onBeforeLeave"]); - }; - } -}); -var NotificationConstructor = _export_sfc(_sfc_main161, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]); - -// node_modules/element-plus/es/components/notification/src/notify.mjs -var notifications = { - "top-left": [], - "top-right": [], - "bottom-left": [], - "bottom-right": [] -}; -var GAP_SIZE = 16; -var seed2 = 1; -var notify = function(options = {}, context) { - if (!isClient) - return { close: () => void 0 }; - if (isString(options) || isVNode(options)) { - options = { message: options }; - } - const position = options.position || "top-right"; - let verticalOffset = options.offset || 0; - notifications[position].forEach(({ vm: vm2 }) => { - var _a; - verticalOffset += (((_a = vm2.el) == null ? void 0 : _a.offsetHeight) || 0) + GAP_SIZE; - }); - verticalOffset += GAP_SIZE; - const id = `notification_${seed2++}`; - const userOnClose = options.onClose; - const props2 = { - ...options, - offset: verticalOffset, - id, - onClose: () => { - close(id, position, userOnClose); - } - }; - let appendTo = document.body; - if (isElement2(options.appendTo)) { - appendTo = options.appendTo; - } else if (isString(options.appendTo)) { - appendTo = document.querySelector(options.appendTo); - } - if (!isElement2(appendTo)) { - debugWarn( - "ElNotification", - "the appendTo option is not an HTMLElement. Falling back to document.body." - ); - appendTo = document.body; - } - const container = document.createElement("div"); - const vm = createVNode( - NotificationConstructor, - props2, - isFunction(props2.message) ? props2.message : isVNode(props2.message) ? () => props2.message : null - ); - vm.appContext = isUndefined2(context) ? notify._context : context; - vm.props.onDestroy = () => { - render(null, container); - }; - render(vm, container); - notifications[position].push({ vm }); - appendTo.appendChild(container.firstElementChild); - return { - close: () => { - vm.component.exposed.visible.value = false; - } - }; -}; -notificationTypes.forEach((type4) => { - notify[type4] = (options = {}, appContext) => { - if (isString(options) || isVNode(options)) { - options = { - message: options - }; - } - return notify({ ...options, type: type4 }, appContext); - }; -}); -function close(id, position, userOnClose) { - const orientedNotifications = notifications[position]; - const idx = orientedNotifications.findIndex( - ({ vm: vm2 }) => { - var _a; - return ((_a = vm2.component) == null ? void 0 : _a.props.id) === id; - } - ); - if (idx === -1) - return; - const { vm } = orientedNotifications[idx]; - if (!vm) - return; - userOnClose == null ? void 0 : userOnClose(vm); - const removedHeight = vm.el.offsetHeight; - const verticalPos = position.split("-")[0]; - orientedNotifications.splice(idx, 1); - const len = orientedNotifications.length; - if (len < 1) - return; - for (let i = idx; i < len; i++) { - const { el, component: component2 } = orientedNotifications[i].vm; - const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE; - component2.props.offset = pos; - } -} -function closeAll2() { - for (const orientedNotifications of Object.values(notifications)) { - orientedNotifications.forEach(({ vm }) => { - vm.component.exposed.visible.value = false; - }); - } -} -function updateOffsets(position = "top-right") { - var _a, _b, _c, _d; - let verticalOffset = ((_c = (_b = (_a = notifications[position][0]) == null ? void 0 : _a.vm.component) == null ? void 0 : _b.props) == null ? void 0 : _c.offset) || 0; - for (const { vm } of notifications[position]) { - vm.component.props.offset = verticalOffset; - verticalOffset += (((_d = vm.el) == null ? void 0 : _d.offsetHeight) || 0) + GAP_SIZE; - } -} -notify.closeAll = closeAll2; -notify.updateOffsets = updateOffsets; -notify._context = null; - -// node_modules/element-plus/es/components/notification/index.mjs -var ElNotification = withInstallFunction(notify, "$notify"); - -// node_modules/element-plus/es/plugin.mjs -var Plugins = [ - ElInfiniteScroll, - ElLoading, - ElMessage, - ElMessageBox, - ElNotification, - ElPopoverDirective -]; - -// node_modules/element-plus/es/defaults.mjs -var installer = makeInstaller([...Components, ...Plugins]); - -// node_modules/element-plus/es/index.mjs -var import_dayjs20 = __toESM(require_dayjs_min(), 1); - -// node_modules/element-plus/es/hooks/use-focus/index.mjs -var useFocus = (el) => { - return { - focus: () => { - var _a, _b; - (_b = (_a = el.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a); - } - }; -}; - -// node_modules/element-plus/es/hooks/use-modal/index.mjs -var modalStack = []; -var closeModal = (e) => { - if (modalStack.length === 0) - return; - const code = getEventCode(e); - if (code === EVENT_CODE.esc) { - e.stopPropagation(); - const topModal = modalStack[modalStack.length - 1]; - topModal.handleClose(); - } -}; -var useModal = (instance, visibleRef) => { - watch(visibleRef, (val) => { - if (val) { - modalStack.push(instance); - } else { - modalStack.splice(modalStack.indexOf(instance), 1); - } - }); -}; -if (isClient) - useEventListener(document, "keydown", closeModal); - -// node_modules/element-plus/es/hooks/use-prevent-global/index.mjs -var usePreventGlobal = (indicator, evt, cb) => { - const prevent = (e) => { - if (cb(e)) - e.stopImmediatePropagation(); - }; - let stop = void 0; - watch( - () => indicator.value, - (val) => { - if (val) { - stop = useEventListener(document, evt, prevent, true); - } else { - stop == null ? void 0 : stop(); - } - }, - { immediate: true } - ); -}; - -// node_modules/element-plus/es/utils/vue/global-node.mjs -var globalNodes = []; -var target = !isClient ? void 0 : document.body; -function createGlobalNode(id) { - const el = document.createElement("div"); - if (id !== void 0) { - el.setAttribute("id", id); - } - if (target) { - target.appendChild(el); - globalNodes.push(el); - } - return el; -} -function removeGlobalNode(el) { - globalNodes.splice(globalNodes.indexOf(el), 1); - el.remove(); -} - -// node_modules/element-plus/es/hooks/use-teleport/index.mjs -var useTeleport = (contentRenderer, appendToBody) => { - const isTeleportVisible = ref(false); - if (!isClient) { - return { - isTeleportVisible, - showTeleport: NOOP, - hideTeleport: NOOP, - renderTeleport: NOOP - }; - } - let $el = null; - const showTeleport = () => { - isTeleportVisible.value = true; - if ($el !== null) - return; - $el = createGlobalNode(); - }; - const hideTeleport = () => { - isTeleportVisible.value = false; - if ($el !== null) { - removeGlobalNode($el); - $el = null; - } - }; - const renderTeleport = () => { - return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [h(Teleport, { to: $el }, contentRenderer())] : void 0; - }; - onUnmounted(hideTeleport); - return { - isTeleportVisible, - showTeleport, - hideTeleport, - renderTeleport - }; -}; - -// node_modules/element-plus/es/hooks/use-transition-fallthrough/index.mjs -var AFTER_APPEAR = "after-appear"; -var AFTER_ENTER = "after-enter"; -var AFTER_LEAVE = "after-leave"; -var APPEAR = "appear"; -var APPEAR_CANCELLED = "appear-cancelled"; -var BEFORE_ENTER = "before-enter"; -var BEFORE_LEAVE = "before-leave"; -var ENTER = "enter"; -var ENTER_CANCELLED = "enter-cancelled"; -var LEAVE = "leave"; -var LEAVE_CANCELLED = "leave-cancelled"; -var useTransitionFallthroughEmits = [ - AFTER_APPEAR, - AFTER_ENTER, - AFTER_LEAVE, - APPEAR, - APPEAR_CANCELLED, - BEFORE_ENTER, - BEFORE_LEAVE, - ENTER, - ENTER_CANCELLED, - LEAVE, - LEAVE_CANCELLED -]; -var useTransitionFallthrough = () => { - const { emit } = getCurrentInstance(); - return { - onAfterAppear: () => { - emit(AFTER_APPEAR); - }, - onAfterEnter: () => { - emit(AFTER_ENTER); - }, - onAfterLeave: () => { - emit(AFTER_LEAVE); - }, - onAppearCancelled: () => { - emit(APPEAR_CANCELLED); - }, - onBeforeEnter: () => { - emit(BEFORE_ENTER); - }, - onBeforeLeave: () => { - emit(BEFORE_LEAVE); - }, - onEnter: () => { - emit(ENTER); - }, - onEnterCancelled: () => { - emit(ENTER_CANCELLED); - }, - onLeave: () => { - emit(LEAVE); - }, - onLeaveCancelled: () => { - emit(LEAVE_CANCELLED); - } - }; -}; - -// node_modules/element-plus/es/hooks/use-intermediate-render/index.mjs -var useDelayedRender = ({ - indicator, - intermediateIndicator, - shouldSetIntermediate = () => true, - beforeShow, - afterShow, - afterHide, - beforeHide -}) => { - watch( - () => unref(indicator), - (val) => { - if (val) { - beforeShow == null ? void 0 : beforeShow(); - nextTick(() => { - if (!unref(indicator)) - return; - if (shouldSetIntermediate("show")) { - intermediateIndicator.value = true; - } - }); - } else { - beforeHide == null ? void 0 : beforeHide(); - nextTick(() => { - if (unref(indicator)) - return; - if (shouldSetIntermediate("hide")) { - intermediateIndicator.value = false; - } - }); - } - } - ); - watch( - () => intermediateIndicator.value, - (val) => { - if (val) { - afterShow == null ? void 0 : afterShow(); - } else { - afterHide == null ? void 0 : afterHide(); - } - } - ); -}; - -// node_modules/element-plus/es/hooks/use-floating/index.mjs -var useFloatingProps = buildProps({}); -var unrefReference = (elRef) => { - if (!isClient) - return; - if (!elRef) - return elRef; - const unrefEl = unrefElement(elRef); - if (unrefEl) - return unrefEl; - return isRef(elRef) ? unrefEl : elRef; -}; -var getPositionDataWithUnit = (record, key) => { - const value = record == null ? void 0 : record[key]; - return isNil_default(value) ? "" : `${value}px`; -}; -var useFloating2 = ({ - middleware, - placement, - strategy -}) => { - const referenceRef = ref(); - const contentRef = ref(); - const x2 = ref(); - const y = ref(); - const middlewareData = ref({}); - const states = { - x: x2, - y, - placement, - strategy, - middlewareData - }; - const update2 = async () => { - if (!isClient) - return; - const referenceEl = unrefReference(referenceRef); - const contentEl = unrefElement(contentRef); - if (!referenceEl || !contentEl) - return; - const data = await computePosition2(referenceEl, contentEl, { - placement: unref(placement), - strategy: unref(strategy), - middleware: unref(middleware) - }); - keysOf(states).forEach((key) => { - states[key].value = data[key]; - }); - }; - onMounted(() => { - watchEffect(() => { - update2(); - }); - }); - return { - ...states, - update: update2, - referenceRef, - contentRef - }; -}; -var arrowMiddleware = ({ - arrowRef, - padding -}) => { - return { - name: "arrow", - options: { - element: arrowRef, - padding - }, - fn(args) { - const arrowEl = unref(arrowRef); - if (!arrowEl) - return {}; - return arrow2({ - element: arrowEl, - padding - }).fn(args); - } - }; -}; - -// node_modules/element-plus/es/index.mjs -var install = installer.install; -var version3 = installer.version; - -export { - INSTALLED_KEY, - configProviderContextKey, - defaultNamespace, - namespaceContextKey, - useGetDerivedNamespace, - useNamespace, - defaultInitialZIndex, - ZINDEX_INJECTION_KEY, - zIndexContextKey, - useZIndex, - buildTranslator, - translate, - buildLocaleContext, - localeContextKey, - useLocale, - componentSizes, - componentSizeMap, - useSizeProp, - useSizeProps, - SIZE_INJECTION_KEY, - useGlobalSize, - emptyValuesContextKey, - SCOPE, - DEFAULT_EMPTY_VALUES, - DEFAULT_VALUE_ON_CLEAR, - useEmptyValuesProps, - useEmptyValues, - useGlobalConfig, - useGlobalComponentSettings, - provideGlobalConfig, - makeInstaller, - UPDATE_MODEL_EVENT, - CHANGE_EVENT, - INPUT_EVENT, - affixProps, - affixEmits, - ElAffix, - iconProps, - ElIcon, - alertEffects, - alertProps, - alertEmits, - ElAlert, - ariaProps, - useAriaProps, - inputProps, - inputEmits, - useAttrs2 as useAttrs, - ID_INJECTION_KEY, - useIdInjection, - useId, - formContextKey, - formItemContextKey, - useFormItem, - useFormItemInputId, - useProp, - useFormSize, - useFormDisabled, - useSize, - useDisabled, - useFocusController, - useComposition, - useCursor, - ElInput, - GAP, - BAR_MAP, - renderThumbStyle, - scrollbarContextKey, - thumbProps, - scrollbarProps, - scrollbarEmits, - ElScrollbar, - POPPER_INJECTION_KEY, - POPPER_CONTENT_INJECTION_KEY, - Effect, - roleTypes, - popperProps, - usePopperProps, - ElPopperArrow, - popperTriggerProps, - usePopperTriggerProps, - FORWARD_REF_INJECTION_KEY, - useForwardRef, - useForwardRefDirective, - ElPopperTrigger, - EVENT_CODE, - useEscapeKeydown, - popperArrowProps, - usePopperArrowProps, - popperCoreConfigProps, - popperContentProps, - popperContentEmits, - usePopperCoreConfigProps, - usePopperContentProps, - usePopperContentEmits, - usePopper, - ElPopperContent, - ElPopper, - TOOLTIP_INJECTION_KEY, - useTimeout, - useDelayedToggleProps, - useDelayedToggle, - useTooltipContentProps, - useTooltipTriggerProps, - createModelToggleComposable, - useModelToggle, - useModelToggleProps, - useModelToggleEmits, - useTooltipModelToggleProps, - useTooltipModelToggleEmits, - useTooltipModelToggle, - useTooltipProps, - tooltipEmits, - usePopperContainerId, - usePopperContainer, - ElTooltip, - autocompleteProps, - autocompleteEmits, - ElAutocomplete, - avatarProps, - avatarEmits, - avatarGroupContextKey, - avatarGroupProps, - ElAvatar, - ElAvatarGroup, - backtopProps, - backtopEmits, - ElBacktop, - badgeProps, - ElBadge, - breadcrumbKey, - breadcrumbProps, - breadcrumbItemProps, - ElBreadcrumb, - ElBreadcrumbItem, - buttonGroupContextKey, - useDeprecated, - buttonTypes, - buttonNativeTypes, - buttonProps, - buttonEmits, - ElButton, - ElButtonGroup, - buildTimeList, - rangeArr, - extractDateFormat, - extractTimeFormat, - dateEquals, - valueEquals, - parseDate, - formatter, - makeList, - dayOrDaysToDate, - datePickTypes, - WEEK_DAYS, - calendarProps, - calendarEmits, - tagProps, - tagEmits, - ElTag, - selectGroupKey, - selectKey, - MINIMUM_INPUT_WIDTH, - BORDER_HORIZONTAL_WIDTH, - selectProps, - selectEmits, - ClickOutside, - useCalcInputWidth, - ElSelect, - ElOption, - ElOptionGroup, - ElCalendar, - cardProps, - cardContextKey, - ElCard, - carouselProps, - carouselEmits, - carouselContextKey, - CAROUSEL_ITEM_NAME, - useOrderedChildren, - carouselItemProps, - ElCarousel, - ElCarouselItem, - checkboxProps, - checkboxEmits, - checkboxGroupContextKey, - checkboxGroupProps, - checkboxGroupEmits, - checkboxDefaultProps, - ElCheckbox, - ElCheckboxButton, - ElCheckboxGroup, - radioPropsBase, - radioProps, - radioEmits, - radioGroupKey, - radioButtonProps, - radioGroupProps, - radioGroupEmits, - radioDefaultProps, - ElRadio, - ElRadioGroup, - ElRadioButton, - CASCADER_PANEL_INJECTION_KEY, - CommonProps, - DefaultProps, - cascaderPanelProps, - cascaderPanelEmits, - useCascaderConfig, - ElCascaderPanel, - cascaderProps, - cascaderEmits, - ElCascader, - checkTagProps, - checkTagEmits, - ElCheckTag, - colProps, - rowContextKey, - ElCol, - emitChangeFn3 as emitChangeFn, - collapseProps, - collapseEmits, - collapseContextKey, - ElCollapseTransition, - collapseItemProps, - ElCollapse, - ElCollapseItem, - colorPickerPanelProps, - colorPickerPanelEmits, - ROOT_COMMON_COLOR_INJECTION_KEY, - colorPickerPanelContextKey, - ElColorPickerPanel, - colorPickerProps, - colorPickerEmits, - ElColorPicker, - configProviderProps, - messageConfig, - ElConfigProvider, - ElContainer, - ElAside, - ElFooter, - ElHeader, - ElMain, - timeUnits, - PICKER_BASE_INJECTION_KEY, - PICKER_POPPER_OPTIONS_INJECTION_KEY, - ROOT_COMMON_PICKER_INJECTION_KEY, - DEFAULT_FORMATS_TIME, - DEFAULT_FORMATS_DATE, - DEFAULT_FORMATS_DATEPICKER, - timePickerDefaultProps, - timePickerRangeTriggerProps, - timePickerRngeTriggerProps, - CommonPicker, - vRepeatClick, - TimePickPanel, - ElTimePicker, - datePickerPanelProps, - ROOT_PICKER_INJECTION_KEY, - ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, - ElDatePickerPanel, - datePickerProps, - ElDatePicker, - descriptionProps, - columnAlignment, - descriptionItemProps, - ElDescriptions, - ElDescriptionsItem, - useSameTarget, - overlayProps, - overlayEmits, - ElOverlay, - dialogInjectionKey, - DEFAULT_DIALOG_TRANSITION, - useDraggable, - dialogProps, - dialogEmits, - dialogContextKey, - useLockscreen, - useDialog, - ElDialog, - dividerProps, - ElDivider, - drawerProps, - drawerEmits, - ElDrawer, - dropdownProps, - dropdownItemProps, - dropdownMenuProps, - FIRST_KEYS, - LAST_KEYS, - FIRST_LAST_KEYS, - DROPDOWN_INJECTION_KEY, - DROPDOWN_INSTANCE_INJECTION_KEY, - ElDropdown, - ElDropdownItem, - ElDropdownMenu, - emptyProps, - ElEmpty, - formMetaProps, - formProps, - formEmits, - formItemValidateStates, - formItemProps, - ElForm, - ElFormItem, - imageViewerProps, - imageViewerEmits, - ElImageViewer, - imageProps, - imageEmits, - ElImage, - inputNumberProps, - inputNumberEmits, - ElInputNumber, - inputTagProps, - inputTagEmits, - ElInputTag, - linkProps, - linkEmits, - ElLink, - MENU_INJECTION_KEY, - SUB_MENU_INJECTION_KEY, - subMenuProps, - menuProps, - menuEmits, - menuItemProps, - menuItemEmits, - menuItemGroupProps, - ElMenu, - ElMenuItem, - ElMenuItemGroup, - ElSubMenu, - pageHeaderProps, - pageHeaderEmits, - ElPageHeader, - elPaginationKey, - paginationProps, - paginationEmits, - ElPagination, - popconfirmProps, - popconfirmEmits, - ElPopconfirm, - popoverProps, - popoverEmits, - ElPopoverDirective, - ElPopover, - progressProps, - ElProgress, - rateProps, - rateEmits, - ElRate, - IconMap, - IconComponentMap, - resultProps, - ElResult, - RowJustify, - RowAlign, - rowProps, - ElRow, - selectV2InjectionKey, - virtualizedProps, - virtualizedListProps, - virtualizedGridProps, - virtualizedScrollbarProps, - FixedSizeList, - DynamicSizeList, - ElSelectV2, - skeletonProps, - skeletonItemProps, - useThrottleRender, - ElSkeleton, - ElSkeletonItem, - sliderContextKey, - sliderProps, - sliderEmits, - ElSlider, - spaceItemProps, - useSpace, - spaceProps, - ElSpace, - statisticProps, - ElStatistic, - countdownProps, - countdownEmits, - ElCountdown, - stepsProps, - stepsEmits, - STEPS_INJECTION_KEY, - stepProps, - ElSteps, - ElStep, - switchProps, - switchEmits, - ElSwitch, - Mousewheel, - ElTable, - ElTableColumn2 as ElTableColumn, - SortOrder, - Alignment, - FixedDir, - placeholderSign, - tableV2RowProps, - tableV2Props, - DynamicSizeGrid, - FixedSizeGrid, - TableV2$1, - autoResizerProps, - ElTableV2, - ElAutoResizer, - tabsRootContextKey, - tabBarProps, - tabNavProps, - tabNavEmits, - tabsProps, - tabsEmits, - tabPaneProps, - ElTabs, - ElTabPane, - textProps, - ElText, - timeSelectProps, - ElTimeSelect, - TIMELINE_INJECTION_KEY, - timelineProps, - timelineItemProps, - ElTimeline, - ElTimelineItem, - LEFT_CHECK_CHANGE_EVENT, - RIGHT_CHECK_CHANGE_EVENT, - transferProps, - transferCheckedChangeFn, - transferEmits, - ElTransfer, - ROOT_TREE_INJECTION_KEY, - NODE_INSTANCE_INJECTION_KEY, - TREE_NODE_MAP_INJECTION_KEY, - treeProps, - treeEmits, - ElTree, - ElTreeSelect, - ElTreeV2, - uploadContextKey, - uploadListTypes, - genFileId, - uploadBaseProps, - uploadProps, - uploadListProps, - uploadListEmits, - uploadDraggerProps, - uploadDraggerEmits, - uploadContentProps, - ElUpload, - watermarkProps, - ElWatermark, - tourStrategies, - tourPlacements, - tourContentProps, - tourContentEmits, - tourProps, - tourEmits, - tourStepProps, - tourStepEmits, - ElTour, - ElTourStep, - anchorProps, - anchorEmits, - ElAnchor, - ElAnchorLink, - defaultProps5 as defaultProps, - segmentedProps, - segmentedEmits, - ElSegmented, - mentionProps, - mentionEmits, - mentionDefaultProps, - ElMention, - splitterProps, - splitterEmits, - splitterPanelProps, - splitterPanelEmits, - ElSplitter, - ElSplitterPanel, - ElInfiniteScroll, - Loading, - vLoading, - ElLoading, - messageTypes, - messagePlacement, - MESSAGE_DEFAULT_PLACEMENT, - messageDefaults, - messageProps, - messageEmits, - ElMessage, - TrapFocus, - ElMessageBox, - notificationTypes, - notificationProps, - notificationEmits, - ElNotification, - installer, - useFocus, - useModal, - usePreventGlobal, - useTeleport, - useTransitionFallthroughEmits, - useTransitionFallthrough, - useDelayedRender, - useFloatingProps, - getPositionDataWithUnit, - useFloating2 as useFloating, - arrowMiddleware, - install, - version3 as version, - import_dayjs20 as import_dayjs -}; -/*! Bundled license information: - -lodash-es/lodash.default.js: - (** - * @license - * Lodash (Custom Build) - * Build: `lodash modularize exports="es" -o ./` - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - *) - -lodash-es/lodash.js: - (** - * @license - * Lodash (Custom Build) - * Build: `lodash modularize exports="es" -o ./` - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - *) - -normalize-wheel-es/dist/index.mjs: - (** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @param {?boolean} capture Check if the capture phase is supported. - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT - *) -*/ -//# sourceMappingURL=chunk-W7GFOP2W.js.map diff --git a/admin/node_modules/.vite/deps/chunk-W7GFOP2W.js.map b/admin/node_modules/.vite/deps/chunk-W7GFOP2W.js.map deleted file mode 100644 index b2188ae1..00000000 --- a/admin/node_modules/.vite/deps/chunk-W7GFOP2W.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../dayjs/plugin/localeData.js", "../../dayjs/plugin/customParseFormat.js", "../../dayjs/plugin/advancedFormat.js", "../../dayjs/plugin/weekOfYear.js", "../../dayjs/plugin/weekYear.js", "../../dayjs/plugin/dayOfYear.js", "../../dayjs/plugin/isSameOrAfter.js", "../../dayjs/plugin/isSameOrBefore.js", "../../../packages/element-plus/version.ts", "../../../packages/constants/key.ts", "../../../packages/components/config-provider/src/constants.ts", "../../../packages/hooks/use-namespace/index.ts", "../../lodash-es/_freeGlobal.js", "../../lodash-es/_root.js", "../../lodash-es/_Symbol.js", "../../lodash-es/_getRawTag.js", "../../lodash-es/_objectToString.js", "../../lodash-es/_baseGetTag.js", "../../lodash-es/isObjectLike.js", "../../lodash-es/isSymbol.js", "../../lodash-es/_baseToNumber.js", "../../lodash-es/_arrayMap.js", "../../lodash-es/isArray.js", "../../lodash-es/_baseToString.js", "../../lodash-es/_createMathOperation.js", "../../lodash-es/add.js", "../../lodash-es/_trimmedEndIndex.js", "../../lodash-es/_baseTrim.js", "../../lodash-es/isObject.js", "../../lodash-es/toNumber.js", "../../lodash-es/toFinite.js", "../../lodash-es/toInteger.js", "../../lodash-es/after.js", "../../lodash-es/identity.js", "../../lodash-es/isFunction.js", "../../lodash-es/_coreJsData.js", "../../lodash-es/_isMasked.js", "../../lodash-es/_toSource.js", "../../lodash-es/_baseIsNative.js", "../../lodash-es/_getValue.js", "../../lodash-es/_getNative.js", "../../lodash-es/_WeakMap.js", "../../lodash-es/_metaMap.js", "../../lodash-es/_baseSetData.js", "../../lodash-es/_baseCreate.js", "../../lodash-es/_createCtor.js", "../../lodash-es/_createBind.js", "../../lodash-es/_apply.js", "../../lodash-es/_composeArgs.js", "../../lodash-es/_composeArgsRight.js", "../../lodash-es/_countHolders.js", "../../lodash-es/_baseLodash.js", "../../lodash-es/_LazyWrapper.js", "../../lodash-es/noop.js", "../../lodash-es/_getData.js", "../../lodash-es/_realNames.js", "../../lodash-es/_getFuncName.js", "../../lodash-es/_LodashWrapper.js", "../../lodash-es/_copyArray.js", "../../lodash-es/_wrapperClone.js", "../../lodash-es/wrapperLodash.js", "../../lodash-es/_isLaziable.js", "../../lodash-es/_shortOut.js", "../../lodash-es/_setData.js", "../../lodash-es/_getWrapDetails.js", "../../lodash-es/_insertWrapDetails.js", "../../lodash-es/constant.js", "../../lodash-es/_defineProperty.js", "../../lodash-es/_baseSetToString.js", "../../lodash-es/_setToString.js", "../../lodash-es/_arrayEach.js", "../../lodash-es/_baseFindIndex.js", "../../lodash-es/_baseIsNaN.js", "../../lodash-es/_strictIndexOf.js", "../../lodash-es/_baseIndexOf.js", "../../lodash-es/_arrayIncludes.js", "../../lodash-es/_updateWrapDetails.js", "../../lodash-es/_setWrapToString.js", "../../lodash-es/_createRecurry.js", "../../lodash-es/_getHolder.js", "../../lodash-es/_isIndex.js", "../../lodash-es/_reorder.js", "../../lodash-es/_replaceHolders.js", "../../lodash-es/_createHybrid.js", "../../lodash-es/_createCurry.js", "../../lodash-es/_createPartial.js", "../../lodash-es/_mergeData.js", "../../lodash-es/_createWrap.js", "../../lodash-es/ary.js", "../../lodash-es/_baseAssignValue.js", "../../lodash-es/eq.js", "../../lodash-es/_assignValue.js", "../../lodash-es/_copyObject.js", "../../lodash-es/_overRest.js", "../../lodash-es/_baseRest.js", "../../lodash-es/isLength.js", "../../lodash-es/isArrayLike.js", "../../lodash-es/_isIterateeCall.js", "../../lodash-es/_createAssigner.js", "../../lodash-es/_isPrototype.js", "../../lodash-es/_baseTimes.js", "../../lodash-es/_baseIsArguments.js", "../../lodash-es/isArguments.js", "../../lodash-es/stubFalse.js", "../../lodash-es/isBuffer.js", "../../lodash-es/_baseIsTypedArray.js", "../../lodash-es/_baseUnary.js", "../../lodash-es/_nodeUtil.js", "../../lodash-es/isTypedArray.js", "../../lodash-es/_arrayLikeKeys.js", "../../lodash-es/_overArg.js", "../../lodash-es/_nativeKeys.js", "../../lodash-es/_baseKeys.js", "../../lodash-es/keys.js", "../../lodash-es/assign.js", "../../lodash-es/_nativeKeysIn.js", "../../lodash-es/_baseKeysIn.js", "../../lodash-es/keysIn.js", "../../lodash-es/assignIn.js", "../../lodash-es/assignInWith.js", "../../lodash-es/assignWith.js", "../../lodash-es/_isKey.js", "../../lodash-es/_nativeCreate.js", "../../lodash-es/_hashClear.js", "../../lodash-es/_hashDelete.js", "../../lodash-es/_hashGet.js", "../../lodash-es/_hashHas.js", "../../lodash-es/_hashSet.js", "../../lodash-es/_Hash.js", "../../lodash-es/_listCacheClear.js", "../../lodash-es/_assocIndexOf.js", "../../lodash-es/_listCacheDelete.js", "../../lodash-es/_listCacheGet.js", "../../lodash-es/_listCacheHas.js", "../../lodash-es/_listCacheSet.js", "../../lodash-es/_ListCache.js", "../../lodash-es/_Map.js", "../../lodash-es/_mapCacheClear.js", "../../lodash-es/_isKeyable.js", "../../lodash-es/_getMapData.js", "../../lodash-es/_mapCacheDelete.js", "../../lodash-es/_mapCacheGet.js", "../../lodash-es/_mapCacheHas.js", "../../lodash-es/_mapCacheSet.js", "../../lodash-es/_MapCache.js", "../../lodash-es/memoize.js", "../../lodash-es/_memoizeCapped.js", "../../lodash-es/_stringToPath.js", "../../lodash-es/toString.js", "../../lodash-es/_castPath.js", "../../lodash-es/_toKey.js", "../../lodash-es/_baseGet.js", "../../lodash-es/get.js", "../../lodash-es/_baseAt.js", "../../lodash-es/_arrayPush.js", "../../lodash-es/_isFlattenable.js", "../../lodash-es/_baseFlatten.js", "../../lodash-es/flatten.js", "../../lodash-es/_flatRest.js", "../../lodash-es/at.js", "../../lodash-es/_getPrototype.js", "../../lodash-es/isPlainObject.js", "../../lodash-es/isError.js", "../../lodash-es/attempt.js", "../../lodash-es/before.js", "../../lodash-es/bind.js", "../../lodash-es/bindAll.js", "../../lodash-es/bindKey.js", "../../lodash-es/_baseSlice.js", "../../lodash-es/_castSlice.js", "../../lodash-es/_hasUnicode.js", "../../lodash-es/_asciiToArray.js", "../../lodash-es/_unicodeToArray.js", "../../lodash-es/_stringToArray.js", "../../lodash-es/_createCaseFirst.js", "../../lodash-es/upperFirst.js", "../../lodash-es/capitalize.js", "../../lodash-es/_arrayReduce.js", "../../lodash-es/_basePropertyOf.js", "../../lodash-es/_deburrLetter.js", "../../lodash-es/deburr.js", "../../lodash-es/_asciiWords.js", "../../lodash-es/_hasUnicodeWord.js", "../../lodash-es/_unicodeWords.js", "../../lodash-es/words.js", "../../lodash-es/_createCompounder.js", "../../lodash-es/camelCase.js", "../../lodash-es/castArray.js", "../../lodash-es/_createRound.js", "../../lodash-es/ceil.js", "../../lodash-es/chain.js", "../../lodash-es/chunk.js", "../../lodash-es/_baseClamp.js", "../../lodash-es/clamp.js", "../../lodash-es/_stackClear.js", "../../lodash-es/_stackDelete.js", "../../lodash-es/_stackGet.js", "../../lodash-es/_stackHas.js", "../../lodash-es/_stackSet.js", "../../lodash-es/_Stack.js", "../../lodash-es/_baseAssign.js", "../../lodash-es/_baseAssignIn.js", "../../lodash-es/_cloneBuffer.js", "../../lodash-es/_arrayFilter.js", "../../lodash-es/stubArray.js", "../../lodash-es/_getSymbols.js", "../../lodash-es/_copySymbols.js", "../../lodash-es/_getSymbolsIn.js", "../../lodash-es/_copySymbolsIn.js", "../../lodash-es/_baseGetAllKeys.js", "../../lodash-es/_getAllKeys.js", "../../lodash-es/_getAllKeysIn.js", "../../lodash-es/_DataView.js", "../../lodash-es/_Promise.js", "../../lodash-es/_Set.js", "../../lodash-es/_getTag.js", "../../lodash-es/_initCloneArray.js", "../../lodash-es/_Uint8Array.js", "../../lodash-es/_cloneArrayBuffer.js", "../../lodash-es/_cloneDataView.js", "../../lodash-es/_cloneRegExp.js", "../../lodash-es/_cloneSymbol.js", "../../lodash-es/_cloneTypedArray.js", "../../lodash-es/_initCloneByTag.js", "../../lodash-es/_initCloneObject.js", "../../lodash-es/_baseIsMap.js", "../../lodash-es/isMap.js", "../../lodash-es/_baseIsSet.js", "../../lodash-es/isSet.js", "../../lodash-es/_baseClone.js", "../../lodash-es/clone.js", "../../lodash-es/cloneDeep.js", "../../lodash-es/cloneDeepWith.js", "../../lodash-es/cloneWith.js", "../../lodash-es/commit.js", "../../lodash-es/compact.js", "../../lodash-es/concat.js", "../../lodash-es/_setCacheAdd.js", "../../lodash-es/_setCacheHas.js", "../../lodash-es/_SetCache.js", "../../lodash-es/_arraySome.js", "../../lodash-es/_cacheHas.js", "../../lodash-es/_equalArrays.js", "../../lodash-es/_mapToArray.js", "../../lodash-es/_setToArray.js", "../../lodash-es/_equalByTag.js", "../../lodash-es/_equalObjects.js", "../../lodash-es/_baseIsEqualDeep.js", "../../lodash-es/_baseIsEqual.js", "../../lodash-es/_baseIsMatch.js", "../../lodash-es/_isStrictComparable.js", "../../lodash-es/_getMatchData.js", "../../lodash-es/_matchesStrictComparable.js", "../../lodash-es/_baseMatches.js", "../../lodash-es/_baseHasIn.js", "../../lodash-es/_hasPath.js", "../../lodash-es/hasIn.js", "../../lodash-es/_baseMatchesProperty.js", "../../lodash-es/_baseProperty.js", "../../lodash-es/_basePropertyDeep.js", "../../lodash-es/property.js", "../../lodash-es/_baseIteratee.js", "../../lodash-es/cond.js", "../../lodash-es/_baseConformsTo.js", "../../lodash-es/_baseConforms.js", "../../lodash-es/conforms.js", "../../lodash-es/conformsTo.js", "../../lodash-es/_arrayAggregator.js", "../../lodash-es/_createBaseFor.js", "../../lodash-es/_baseFor.js", "../../lodash-es/_baseForOwn.js", "../../lodash-es/_createBaseEach.js", "../../lodash-es/_baseEach.js", "../../lodash-es/_baseAggregator.js", "../../lodash-es/_createAggregator.js", "../../lodash-es/countBy.js", "../../lodash-es/create.js", "../../lodash-es/curry.js", "../../lodash-es/curryRight.js", "../../lodash-es/now.js", "../../lodash-es/debounce.js", "../../lodash-es/defaultTo.js", "../../lodash-es/defaults.js", "../../lodash-es/_assignMergeValue.js", "../../lodash-es/isArrayLikeObject.js", "../../lodash-es/_safeGet.js", "../../lodash-es/toPlainObject.js", "../../lodash-es/_baseMergeDeep.js", "../../lodash-es/_baseMerge.js", "../../lodash-es/_customDefaultsMerge.js", "../../lodash-es/mergeWith.js", "../../lodash-es/defaultsDeep.js", "../../lodash-es/_baseDelay.js", "../../lodash-es/defer.js", "../../lodash-es/delay.js", "../../lodash-es/_arrayIncludesWith.js", "../../lodash-es/_baseDifference.js", "../../lodash-es/difference.js", "../../lodash-es/last.js", "../../lodash-es/differenceBy.js", "../../lodash-es/differenceWith.js", "../../lodash-es/divide.js", "../../lodash-es/drop.js", "../../lodash-es/dropRight.js", "../../lodash-es/_baseWhile.js", "../../lodash-es/dropRightWhile.js", "../../lodash-es/dropWhile.js", "../../lodash-es/_castFunction.js", "../../lodash-es/forEach.js", "../../lodash-es/_arrayEachRight.js", "../../lodash-es/_baseForRight.js", "../../lodash-es/_baseForOwnRight.js", "../../lodash-es/_baseEachRight.js", "../../lodash-es/forEachRight.js", "../../lodash-es/endsWith.js", "../../lodash-es/_baseToPairs.js", "../../lodash-es/_setToPairs.js", "../../lodash-es/_createToPairs.js", "../../lodash-es/toPairs.js", "../../lodash-es/toPairsIn.js", "../../lodash-es/_escapeHtmlChar.js", "../../lodash-es/escape.js", "../../lodash-es/escapeRegExp.js", "../../lodash-es/_arrayEvery.js", "../../lodash-es/_baseEvery.js", "../../lodash-es/every.js", "../../lodash-es/toLength.js", "../../lodash-es/_baseFill.js", "../../lodash-es/fill.js", "../../lodash-es/_baseFilter.js", "../../lodash-es/filter.js", "../../lodash-es/_createFind.js", "../../lodash-es/findIndex.js", "../../lodash-es/find.js", "../../lodash-es/_baseFindKey.js", "../../lodash-es/findKey.js", "../../lodash-es/findLastIndex.js", "../../lodash-es/findLast.js", "../../lodash-es/findLastKey.js", "../../lodash-es/head.js", "../../lodash-es/_baseMap.js", "../../lodash-es/map.js", "../../lodash-es/flatMap.js", "../../lodash-es/flatMapDeep.js", "../../lodash-es/flatMapDepth.js", "../../lodash-es/flattenDeep.js", "../../lodash-es/flattenDepth.js", "../../lodash-es/flip.js", "../../lodash-es/floor.js", "../../lodash-es/_createFlow.js", "../../lodash-es/flow.js", "../../lodash-es/flowRight.js", "../../lodash-es/forIn.js", "../../lodash-es/forInRight.js", "../../lodash-es/forOwn.js", "../../lodash-es/forOwnRight.js", "../../lodash-es/fromPairs.js", "../../lodash-es/_baseFunctions.js", "../../lodash-es/functions.js", "../../lodash-es/functionsIn.js", "../../lodash-es/groupBy.js", "../../lodash-es/_baseGt.js", "../../lodash-es/_createRelationalOperation.js", "../../lodash-es/gt.js", "../../lodash-es/gte.js", "../../lodash-es/_baseHas.js", "../../lodash-es/has.js", "../../lodash-es/_baseInRange.js", "../../lodash-es/inRange.js", "../../lodash-es/isString.js", "../../lodash-es/_baseValues.js", "../../lodash-es/values.js", "../../lodash-es/includes.js", "../../lodash-es/indexOf.js", "../../lodash-es/initial.js", "../../lodash-es/_baseIntersection.js", "../../lodash-es/_castArrayLikeObject.js", "../../lodash-es/intersection.js", "../../lodash-es/intersectionBy.js", "../../lodash-es/intersectionWith.js", "../../lodash-es/_baseInverter.js", "../../lodash-es/_createInverter.js", "../../lodash-es/invert.js", "../../lodash-es/invertBy.js", "../../lodash-es/_parent.js", "../../lodash-es/_baseInvoke.js", "../../lodash-es/invoke.js", "../../lodash-es/invokeMap.js", "../../lodash-es/_baseIsArrayBuffer.js", "../../lodash-es/isArrayBuffer.js", "../../lodash-es/isBoolean.js", "../../lodash-es/_baseIsDate.js", "../../lodash-es/isDate.js", "../../lodash-es/isElement.js", "../../lodash-es/isEmpty.js", "../../lodash-es/isEqual.js", "../../lodash-es/isEqualWith.js", "../../lodash-es/isFinite.js", "../../lodash-es/isInteger.js", "../../lodash-es/isMatch.js", "../../lodash-es/isMatchWith.js", "../../lodash-es/isNumber.js", "../../lodash-es/isNaN.js", "../../lodash-es/_isMaskable.js", "../../lodash-es/isNative.js", "../../lodash-es/isNil.js", "../../lodash-es/isNull.js", "../../lodash-es/_baseIsRegExp.js", "../../lodash-es/isRegExp.js", "../../lodash-es/isSafeInteger.js", "../../lodash-es/isUndefined.js", "../../lodash-es/isWeakMap.js", "../../lodash-es/isWeakSet.js", "../../lodash-es/iteratee.js", "../../lodash-es/join.js", "../../lodash-es/kebabCase.js", "../../lodash-es/keyBy.js", "../../lodash-es/_strictLastIndexOf.js", "../../lodash-es/lastIndexOf.js", "../../lodash-es/lowerCase.js", "../../lodash-es/lowerFirst.js", "../../lodash-es/_baseLt.js", "../../lodash-es/lt.js", "../../lodash-es/lte.js", "../../lodash-es/mapKeys.js", "../../lodash-es/mapValues.js", "../../lodash-es/matches.js", "../../lodash-es/matchesProperty.js", "../../lodash-es/_baseExtremum.js", "../../lodash-es/max.js", "../../lodash-es/maxBy.js", "../../lodash-es/_baseSum.js", "../../lodash-es/_baseMean.js", "../../lodash-es/mean.js", "../../lodash-es/meanBy.js", "../../lodash-es/merge.js", "../../lodash-es/method.js", "../../lodash-es/methodOf.js", "../../lodash-es/min.js", "../../lodash-es/minBy.js", "../../lodash-es/mixin.js", "../../lodash-es/multiply.js", "../../lodash-es/negate.js", "../../lodash-es/_iteratorToArray.js", "../../lodash-es/toArray.js", "../../lodash-es/next.js", "../../lodash-es/_baseNth.js", "../../lodash-es/nth.js", "../../lodash-es/nthArg.js", "../../lodash-es/_baseUnset.js", "../../lodash-es/_customOmitClone.js", "../../lodash-es/omit.js", "../../lodash-es/_baseSet.js", "../../lodash-es/_basePickBy.js", "../../lodash-es/pickBy.js", "../../lodash-es/omitBy.js", "../../lodash-es/once.js", "../../lodash-es/_baseSortBy.js", "../../lodash-es/_compareAscending.js", "../../lodash-es/_compareMultiple.js", "../../lodash-es/_baseOrderBy.js", "../../lodash-es/orderBy.js", "../../lodash-es/_createOver.js", "../../lodash-es/over.js", "../../lodash-es/_castRest.js", "../../lodash-es/overArgs.js", "../../lodash-es/overEvery.js", "../../lodash-es/overSome.js", "../../lodash-es/_baseRepeat.js", "../../lodash-es/_asciiSize.js", "../../lodash-es/_unicodeSize.js", "../../lodash-es/_stringSize.js", "../../lodash-es/_createPadding.js", "../../lodash-es/pad.js", "../../lodash-es/padEnd.js", "../../lodash-es/padStart.js", "../../lodash-es/parseInt.js", "../../lodash-es/partial.js", "../../lodash-es/partialRight.js", "../../lodash-es/partition.js", "../../lodash-es/_basePick.js", "../../lodash-es/pick.js", "../../lodash-es/plant.js", "../../lodash-es/propertyOf.js", "../../lodash-es/_baseIndexOfWith.js", "../../lodash-es/_basePullAll.js", "../../lodash-es/pullAll.js", "../../lodash-es/pull.js", "../../lodash-es/pullAllBy.js", "../../lodash-es/pullAllWith.js", "../../lodash-es/_basePullAt.js", "../../lodash-es/pullAt.js", "../../lodash-es/_baseRandom.js", "../../lodash-es/random.js", "../../lodash-es/_baseRange.js", "../../lodash-es/_createRange.js", "../../lodash-es/range.js", "../../lodash-es/rangeRight.js", "../../lodash-es/rearg.js", "../../lodash-es/_baseReduce.js", "../../lodash-es/reduce.js", "../../lodash-es/_arrayReduceRight.js", "../../lodash-es/reduceRight.js", "../../lodash-es/reject.js", "../../lodash-es/remove.js", "../../lodash-es/repeat.js", "../../lodash-es/replace.js", "../../lodash-es/rest.js", "../../lodash-es/result.js", "../../lodash-es/reverse.js", "../../lodash-es/round.js", "../../lodash-es/_arraySample.js", "../../lodash-es/_baseSample.js", "../../lodash-es/sample.js", "../../lodash-es/_shuffleSelf.js", "../../lodash-es/_arraySampleSize.js", "../../lodash-es/_baseSampleSize.js", "../../lodash-es/sampleSize.js", "../../lodash-es/set.js", "../../lodash-es/setWith.js", "../../lodash-es/_arrayShuffle.js", "../../lodash-es/_baseShuffle.js", "../../lodash-es/shuffle.js", "../../lodash-es/size.js", "../../lodash-es/slice.js", "../../lodash-es/snakeCase.js", "../../lodash-es/_baseSome.js", "../../lodash-es/some.js", "../../lodash-es/sortBy.js", "../../lodash-es/_baseSortedIndexBy.js", "../../lodash-es/_baseSortedIndex.js", "../../lodash-es/sortedIndex.js", "../../lodash-es/sortedIndexBy.js", "../../lodash-es/sortedIndexOf.js", "../../lodash-es/sortedLastIndex.js", "../../lodash-es/sortedLastIndexBy.js", "../../lodash-es/sortedLastIndexOf.js", "../../lodash-es/_baseSortedUniq.js", "../../lodash-es/sortedUniq.js", "../../lodash-es/sortedUniqBy.js", "../../lodash-es/split.js", "../../lodash-es/spread.js", "../../lodash-es/startCase.js", "../../lodash-es/startsWith.js", "../../lodash-es/stubObject.js", "../../lodash-es/stubString.js", "../../lodash-es/stubTrue.js", "../../lodash-es/subtract.js", "../../lodash-es/sum.js", "../../lodash-es/sumBy.js", "../../lodash-es/tail.js", "../../lodash-es/take.js", "../../lodash-es/takeRight.js", "../../lodash-es/takeRightWhile.js", "../../lodash-es/takeWhile.js", "../../lodash-es/tap.js", "../../lodash-es/_customDefaultsAssignIn.js", "../../lodash-es/_escapeStringChar.js", "../../lodash-es/_reInterpolate.js", "../../lodash-es/_reEscape.js", "../../lodash-es/_reEvaluate.js", "../../lodash-es/templateSettings.js", "../../lodash-es/template.js", "../../lodash-es/throttle.js", "../../lodash-es/thru.js", "../../lodash-es/times.js", "../../lodash-es/toIterator.js", "../../lodash-es/_baseWrapperValue.js", "../../lodash-es/wrapperValue.js", "../../lodash-es/toLower.js", "../../lodash-es/toPath.js", "../../lodash-es/toSafeInteger.js", "../../lodash-es/toUpper.js", "../../lodash-es/transform.js", "../../lodash-es/_charsEndIndex.js", "../../lodash-es/_charsStartIndex.js", "../../lodash-es/trim.js", "../../lodash-es/trimEnd.js", "../../lodash-es/trimStart.js", "../../lodash-es/truncate.js", "../../lodash-es/unary.js", "../../lodash-es/_unescapeHtmlChar.js", "../../lodash-es/unescape.js", "../../lodash-es/_createSet.js", "../../lodash-es/_baseUniq.js", "../../lodash-es/union.js", "../../lodash-es/unionBy.js", "../../lodash-es/unionWith.js", "../../lodash-es/uniq.js", "../../lodash-es/uniqBy.js", "../../lodash-es/uniqWith.js", "../../lodash-es/uniqueId.js", "../../lodash-es/unset.js", "../../lodash-es/unzip.js", "../../lodash-es/unzipWith.js", "../../lodash-es/_baseUpdate.js", "../../lodash-es/update.js", "../../lodash-es/updateWith.js", "../../lodash-es/upperCase.js", "../../lodash-es/valuesIn.js", "../../lodash-es/without.js", "../../lodash-es/wrap.js", "../../lodash-es/wrapperAt.js", "../../lodash-es/wrapperChain.js", "../../lodash-es/wrapperReverse.js", "../../lodash-es/_baseXor.js", "../../lodash-es/xor.js", "../../lodash-es/xorBy.js", "../../lodash-es/xorWith.js", "../../lodash-es/zip.js", "../../lodash-es/_baseZipObject.js", "../../lodash-es/zipObject.js", "../../lodash-es/zipObjectDeep.js", "../../lodash-es/zipWith.js", "../../lodash-es/array.default.js", "../../lodash-es/collection.default.js", "../../lodash-es/date.default.js", "../../lodash-es/function.default.js", "../../lodash-es/lang.default.js", "../../lodash-es/math.default.js", "../../lodash-es/number.default.js", "../../lodash-es/object.default.js", "../../lodash-es/seq.default.js", "../../lodash-es/string.default.js", "../../lodash-es/util.default.js", "../../lodash-es/_lazyClone.js", "../../lodash-es/_lazyReverse.js", "../../lodash-es/_getView.js", "../../lodash-es/_lazyValue.js", "../../lodash-es/lodash.default.js", "../../../packages/utils/types.ts", "../../@vueuse/shared/index.mjs", "../../@vueuse/core/index.mjs", "../../../packages/utils/error.ts", "../../../packages/hooks/use-z-index/index.ts", "../../../packages/locale/lang/en.ts", "../../../packages/hooks/use-locale/index.ts", "../../../packages/utils/vue/props/runtime.ts", "../../../packages/constants/size.ts", "../../../packages/hooks/use-size/index.ts", "../../../packages/hooks/use-empty-values/index.ts", "../../../packages/utils/objects.ts", "../../../packages/components/config-provider/src/hooks/use-global-config.ts", "../../../packages/element-plus/make-installer.ts", "../../../packages/components/teleport/src/teleport.ts", "../../../internal/build/plugin-vue:export-helper", "../../../packages/components/teleport/src/teleport.vue", "../../../packages/utils/vue/install.ts", "../../../packages/components/teleport/index.ts", "../../../packages/constants/event.ts", "../../../packages/components/affix/src/affix.ts", "../../../packages/utils/easings.ts", "../../../packages/utils/raf.ts", "../../../packages/utils/dom/style.ts", "../../../packages/utils/dom/scroll.ts", "../../../packages/components/affix/src/affix.vue", "../../../packages/components/affix/index.ts", "../../../packages/components/icon/src/icon.ts", "../../../packages/components/icon/src/icon.vue", "../../../packages/components/icon/index.ts", "../../../packages/utils/vue/icon.ts", "../../../packages/components/alert/src/alert.ts", "../../../packages/utils/vue/vnode.ts", "../../../packages/components/alert/src/alert.vue", "../../../packages/components/alert/index.ts", "../../../packages/utils/browser.ts", "../../../packages/components/input/src/utils.ts", "../../../packages/utils/typescript.ts", "../../../packages/hooks/use-aria/index.ts", "../../../packages/components/input/src/input.ts", "../../../packages/hooks/use-attrs/index.ts", "../../../packages/hooks/use-id/index.ts", "../../../packages/components/form/src/constants.ts", "../../../packages/components/form/src/hooks/use-form-item.ts", "../../../packages/hooks/use-prop/index.ts", "../../../packages/components/form/src/hooks/use-form-common-props.ts", "../../../packages/utils/dom/aria.ts", "../../../packages/hooks/use-focus-controller/index.ts", "../../../packages/utils/i18n.ts", "../../../packages/hooks/use-composition/index.ts", "../../../packages/hooks/use-cursor/index.ts", "../../../packages/components/input/src/input.vue", "../../../packages/components/input/index.ts", "../../../packages/components/scrollbar/src/util.ts", "../../../packages/components/scrollbar/src/constants.ts", "../../../packages/components/scrollbar/src/thumb.ts", "../../../packages/components/scrollbar/src/thumb.vue", "../../../packages/components/scrollbar/src/bar.ts", "../../../packages/components/scrollbar/src/bar.vue", "../../../packages/components/scrollbar/src/scrollbar.ts", "../../../packages/components/scrollbar/src/scrollbar.vue", "../../../packages/components/scrollbar/index.ts", "../../../packages/components/popper/src/constants.ts", "../../../packages/components/popper/src/popper.ts", "../../../packages/components/popper/src/popper.vue", "../../../packages/components/popper/src/arrow.vue", "../../../packages/components/popper/src/trigger.ts", "../../../packages/hooks/use-forward-ref/index.ts", "../../../packages/components/slot/src/only-child.tsx", "../../../packages/components/popper/src/trigger.vue", "../../../packages/components/focus-trap/src/tokens.ts", "../../../packages/components/focus-trap/src/utils.ts", "../../../packages/constants/aria.ts", "../../../packages/utils/dom/event.ts", "../../../packages/hooks/use-escape-keydown/index.ts", "../../../packages/components/focus-trap/src/focus-trap.vue", "../../@popperjs/core/dist/index.mjs", "../../../packages/components/popper/src/arrow.ts", "../../../packages/components/popper/src/content.ts", "../../../packages/components/popper/src/composables/use-focus-trap.ts", "../../../packages/components/popper/src/utils.ts", "../../../packages/hooks/use-popper/index.ts", "../../../packages/components/popper/src/composables/use-content.ts", "../../../packages/components/popper/src/composables/use-content-dom.ts", "../../../packages/components/popper/src/content.vue", "../../../packages/components/popper/index.ts", "../../../packages/components/tooltip/src/constants.ts", "../../../packages/hooks/use-timeout/index.ts", "../../../packages/hooks/use-delayed-toggle/index.ts", "../../../packages/components/tooltip/src/content.ts", "../../../packages/components/tooltip/src/trigger.ts", "../../../packages/hooks/use-model-toggle/index.ts", "../../../packages/components/tooltip/src/tooltip.ts", "../../../packages/components/tooltip/src/utils.ts", "../../../packages/components/tooltip/src/trigger.vue", "../../../packages/hooks/use-popper-container/index.ts", "../../../packages/utils/arrays.ts", "../../../packages/components/tooltip/src/content.vue", "../../../packages/components/tooltip/src/tooltip.vue", "../../../packages/components/tooltip/index.ts", "../../../packages/components/autocomplete/src/autocomplete.ts", "../../../packages/components/autocomplete/src/autocomplete.vue", "../../../packages/components/autocomplete/index.ts", "../../../packages/components/avatar/src/avatar.ts", "../../../packages/components/avatar/src/constants.ts", "../../../packages/components/avatar/src/avatar.vue", "../../../packages/components/avatar/src/avatar-group-props.ts", "../../../packages/components/avatar/src/avatar-group.tsx", "../../../packages/components/avatar/index.ts", "../../../packages/components/backtop/src/backtop.ts", "../../../packages/components/backtop/src/use-backtop.ts", "../../../packages/components/backtop/src/backtop.vue", "../../../packages/components/backtop/index.ts", "../../../packages/components/badge/src/badge.ts", "../../../packages/components/badge/src/badge.vue", "../../../packages/components/badge/index.ts", "../../../packages/components/breadcrumb/src/constants.ts", "../../../packages/components/breadcrumb/src/breadcrumb.ts", "../../../packages/components/breadcrumb/src/breadcrumb.vue", "../../../packages/components/breadcrumb/src/breadcrumb-item.ts", "../../../packages/components/breadcrumb/src/breadcrumb-item.vue", "../../../packages/components/breadcrumb/index.ts", "../../../packages/components/button/src/constants.ts", "../../../packages/hooks/use-deprecated/index.ts", "../../../packages/components/button/src/use-button.ts", "../../../packages/components/button/src/button.ts", "../../@ctrl/tinycolor/dist/module/util.js", "../../@ctrl/tinycolor/dist/module/conversion.js", "../../@ctrl/tinycolor/dist/module/css-color-names.js", "../../@ctrl/tinycolor/dist/module/format-input.js", "../../@ctrl/tinycolor/dist/module/index.js", "../../../packages/components/button/src/button-custom.ts", "../../../packages/components/button/src/button.vue", "../../../packages/components/button/src/button-group.ts", "../../../packages/components/button/src/button-group.vue", "../../../packages/components/button/index.ts", "../../../packages/components/time-picker/src/utils.ts", "../../../packages/components/calendar/src/date-table.ts", "../../../packages/constants/date.ts", "../../../packages/components/calendar/src/use-date-table.ts", "../../../packages/components/calendar/src/date-table.vue", "../../../packages/components/calendar/src/use-calendar.ts", "../../../packages/components/calendar/src/calendar.ts", "../../../packages/components/tag/src/tag.ts", "../../../packages/components/tag/src/tag.vue", "../../../packages/components/tag/index.ts", "../../../packages/components/select-v2/src/useProps.ts", "../../../packages/components/select/src/token.ts", "../../../packages/components/select/src/option.ts", "../../../packages/utils/strings.ts", "../../../packages/components/select/src/useOption.ts", "../../../packages/components/select/src/option.vue", "../../../packages/constants/form.ts", "../../../packages/components/select/src/select-dropdown.vue", "../../../packages/components/select/src/useSelect.ts", "../../../packages/components/select/src/options.ts", "../../../packages/components/select/src/select.ts", "../../../packages/components/select/src/option-group.vue", "../../../packages/directives/click-outside/index.ts", "../../../packages/hooks/use-calc-input-width/index.ts", "../../../packages/components/select/src/select.vue", "../../../packages/components/select/index.ts", "../../../packages/components/calendar/src/select-controller.ts", "../../../packages/components/calendar/src/select-controller.vue", "../../../packages/components/calendar/src/calendar.vue", "../../../packages/components/calendar/index.ts", "../../../packages/components/card/src/card.ts", "../../../packages/components/card/src/card.vue", "../../../packages/components/card/index.ts", "../../../packages/components/carousel/src/carousel.ts", "../../../packages/components/carousel/src/constants.ts", "../../../packages/hooks/use-ordered-children/index.ts", "../../../packages/components/carousel/src/use-carousel.ts", "../../../packages/components/carousel/src/carousel.vue", "../../../packages/components/carousel/src/carousel-item.ts", "../../../packages/components/carousel/src/use-carousel-item.ts", "../../../packages/components/carousel/src/carousel-item.vue", "../../../packages/components/carousel/index.ts", "../../../packages/components/checkbox/src/checkbox.ts", "../../../packages/components/checkbox/src/constants.ts", "../../../packages/components/checkbox/src/composables/use-checkbox-disabled.ts", "../../../packages/components/checkbox/src/composables/use-checkbox-event.ts", "../../../packages/components/checkbox/src/composables/use-checkbox-model.ts", "../../../packages/components/checkbox/src/composables/use-checkbox-status.ts", "../../../packages/components/checkbox/src/composables/use-checkbox.ts", "../../../packages/components/checkbox/src/checkbox.vue", "../../../packages/components/checkbox/src/checkbox-button.vue", "../../../packages/components/checkbox/src/checkbox-group.ts", "../../../packages/components/checkbox/src/checkbox-group.vue", "../../../packages/components/checkbox/index.ts", "../../../packages/components/radio/src/radio.ts", "../../../packages/components/radio/src/constants.ts", "../../../packages/components/radio/src/use-radio.ts", "../../../packages/components/radio/src/radio.vue", "../../../packages/components/radio/src/radio-button.ts", "../../../packages/components/radio/src/radio-button.vue", "../../../packages/components/radio/src/radio-group.ts", "../../../packages/components/radio/src/radio-group.vue", "../../../packages/components/radio/index.ts", "../../../packages/components/cascader-panel/src/types.ts", "../../../packages/components/cascader-panel/src/node-content.tsx", "../../../packages/components/cascader-panel/src/node.vue", "../../../packages/components/cascader-panel/src/menu.vue", "../../../packages/components/cascader-panel/src/node.ts", "../../../packages/components/cascader-panel/src/store.ts", "../../../packages/components/cascader-panel/src/config.ts", "../../../packages/components/cascader-panel/src/utils.ts", "../../../packages/components/cascader-panel/src/index.vue", "../../../packages/components/cascader-panel/index.ts", "../../../packages/components/cascader/src/cascader.ts", "../../../packages/components/cascader/src/cascader.vue", "../../../packages/components/cascader/index.ts", "../../../packages/components/check-tag/src/check-tag.ts", "../../../packages/components/check-tag/src/check-tag.vue", "../../../packages/components/check-tag/index.ts", "../../../packages/components/col/src/col.ts", "../../../packages/components/row/src/constants.ts", "../../../packages/components/col/src/col.vue", "../../../packages/components/col/index.ts", "../../../packages/components/collapse/src/collapse.ts", "../../../packages/components/collapse/src/constants.ts", "../../../packages/components/collapse/src/use-collapse.ts", "../../../packages/components/collapse/src/collapse.vue", "../../../packages/components/collapse-transition/src/collapse-transition.vue", "../../../packages/components/collapse-transition/index.ts", "../../../packages/components/collapse/src/collapse-item.ts", "../../../packages/components/collapse/src/use-collapse-item.ts", "../../../packages/components/collapse/src/collapse-item.vue", "../../../packages/components/collapse/index.ts", "../../../packages/components/color-picker-panel/src/props/slider.ts", "../../../packages/components/color-picker-panel/src/utils/draggable.ts", "../../../packages/utils/dom/position.ts", "../../../packages/components/color-picker-panel/src/composables/use-slider.ts", "../../../packages/components/color-picker-panel/src/components/alpha-slider.vue", "../../../packages/components/color-picker-panel/src/components/hue-slider.vue", "../../../packages/components/color-picker-panel/src/props/predefine.ts", "../../../packages/components/color-picker-panel/src/color-picker-panel.ts", "../../../packages/components/color-picker-panel/src/utils/color.ts", "../../../packages/components/color-picker-panel/src/composables/use-predefine.ts", "../../../packages/components/color-picker-panel/src/components/predefine.vue", "../../../packages/components/color-picker-panel/src/props/sv-panel.ts", "../../../packages/components/color-picker-panel/src/composables/use-sv-panel.ts", "../../../packages/components/color-picker-panel/src/components/sv-panel.vue", "../../../packages/components/color-picker-panel/src/composables/use-common-color.ts", "../../../packages/components/color-picker-panel/src/color-picker-panel.vue", "../../../packages/components/color-picker-panel/index.ts", "../../../packages/components/color-picker/src/color-picker.ts", "../../../packages/components/color-picker/src/color-picker.vue", "../../../packages/components/color-picker/index.ts", "../../../packages/components/config-provider/src/config-provider-props.ts", "../../../packages/components/config-provider/src/config-provider.ts", "../../../packages/components/config-provider/index.ts", "../../../packages/components/container/src/container.vue", "../../../packages/components/container/src/aside.vue", "../../../packages/components/container/src/footer.vue", "../../../packages/components/container/src/header.vue", "../../../packages/components/container/src/main.vue", "../../../packages/components/container/index.ts", "../../../packages/components/time-picker/src/constants.ts", "../../../packages/components/time-picker/src/composables/use-common-picker.ts", "../../../packages/components/time-picker/src/props/shared.ts", "../../../packages/components/time-picker/src/common/props.ts", "../../../packages/components/time-picker/src/common/picker-range-trigger.vue", "../../../packages/components/time-picker/src/common/picker.vue", "../../../packages/components/time-picker/src/props/panel-time-picker.ts", "../../../packages/components/time-picker/src/composables/use-time-panel.ts", "../../../packages/components/time-picker/src/composables/use-time-picker.ts", "../../../packages/components/time-picker/src/props/basic-time-spinner.ts", "../../../packages/directives/repeat-click/index.ts", "../../../packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue", "../../../packages/components/time-picker/src/time-picker-com/panel-time-pick.vue", "../../../packages/components/time-picker/src/props/panel-time-range.ts", "../../../packages/components/time-picker/src/time-picker-com/panel-time-range.vue", "../../../packages/components/time-picker/src/time-picker.tsx", "../../../packages/components/time-picker/index.ts", "../../../packages/components/date-picker-panel/src/props/date-picker-panel.ts", "../../../packages/components/date-picker-panel/src/constants.ts", "../../../packages/components/date-picker-panel/src/props/shared.ts", "../../../packages/components/date-picker-panel/src/props/panel-date-pick.ts", "../../../packages/components/date-picker-panel/src/utils.ts", "../../../packages/components/date-picker-panel/src/props/basic-date-table.ts", "../../../packages/components/date-picker-panel/src/composables/use-basic-date-table.ts", "../../../packages/components/date-picker-panel/src/props/basic-cell.ts", "../../../packages/components/date-picker-panel/src/date-picker-com/basic-cell-render.tsx", "../../../packages/components/date-picker-panel/src/date-picker-com/basic-date-table.vue", "../../../packages/components/date-picker-panel/src/props/basic-month-table.ts", "../../../packages/components/date-picker-panel/src/date-picker-com/basic-month-table.vue", "../../../packages/components/date-picker-panel/src/props/basic-year-table.ts", "../../../packages/components/date-picker-panel/src/date-picker-com/basic-year-table.vue", "../../../packages/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue", "../../../packages/components/date-picker-panel/src/props/panel-date-range.ts", "../../../packages/components/date-picker-panel/src/composables/use-shortcut.ts", "../../../packages/components/date-picker-panel/src/composables/use-range-picker.ts", "../../../packages/components/date-picker-panel/src/composables/use-panel-date-range.ts", "../../../packages/components/date-picker-panel/src/date-picker-com/panel-date-range.vue", "../../../packages/components/date-picker-panel/src/props/panel-month-range.ts", "../../../packages/components/date-picker-panel/src/composables/use-month-range-header.ts", "../../../packages/components/date-picker-panel/src/date-picker-com/panel-month-range.vue", "../../../packages/components/date-picker-panel/src/props/panel-year-range.ts", "../../../packages/components/date-picker-panel/src/composables/use-year-range-header.ts", "../../../packages/components/date-picker-panel/src/date-picker-com/panel-year-range.vue", "../../../packages/components/date-picker-panel/src/panel-utils.ts", "../../../packages/components/date-picker-panel/src/date-picker-panel.tsx", "../../../packages/components/date-picker-panel/index.ts", "../../../packages/components/date-picker/src/props.ts", "../../../packages/components/date-picker/src/date-picker.tsx", "../../../packages/components/date-picker/index.ts", "../../../packages/components/descriptions/src/token.ts", "../../../packages/components/descriptions/src/descriptions-cell.ts", "../../../packages/components/descriptions/src/descriptions-row.ts", "../../../packages/components/descriptions/src/descriptions-row.vue", "../../../packages/components/descriptions/src/description.ts", "../../../packages/components/descriptions/src/constants.ts", "../../../packages/components/descriptions/src/description.vue", "../../../packages/constants/column-alignment.ts", "../../../packages/components/descriptions/src/description-item.ts", "../../../packages/components/descriptions/index.ts", "../../../packages/hooks/use-same-target/index.ts", "../../../packages/components/overlay/src/overlay.ts", "../../../packages/components/overlay/index.ts", "../../../packages/components/dialog/src/constants.ts", "../../../packages/components/dialog/src/dialog-content.ts", "../../../packages/hooks/use-draggable/index.ts", "../../../packages/utils/vue/refs.ts", "../../../packages/components/dialog/src/dialog-content.vue", "../../../packages/components/dialog/src/dialog.ts", "../../../packages/hooks/use-lockscreen/index.ts", "../../../packages/components/dialog/src/use-dialog.ts", "../../../packages/components/dialog/src/dialog.vue", "../../../packages/components/dialog/index.ts", "../../../packages/components/divider/src/divider.ts", "../../../packages/components/divider/src/divider.vue", "../../../packages/components/divider/index.ts", "../../../packages/components/drawer/src/drawer.ts", "../../../packages/components/drawer/src/composables/useResizable.ts", "../../../packages/components/drawer/src/drawer.vue", "../../../packages/components/drawer/index.ts", "../../../packages/components/collection/src/collection.vue", "../../../packages/components/collection/src/collection-item.vue", "../../../packages/components/collection/src/collection.ts", "../../../packages/components/roving-focus-group/src/roving-focus-group.ts", "../../../packages/components/roving-focus-group/src/tokens.ts", "../../../packages/components/roving-focus-group/src/utils.ts", "../../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue", "../../../packages/components/roving-focus-group/src/roving-focus-group.vue", "../../../packages/components/dropdown/src/dropdown.ts", "../../../packages/components/dropdown/src/tokens.ts", "../../../packages/components/dropdown/src/dropdown.vue", "../../../packages/components/roving-focus-group/src/roving-focus-item.vue", "../../../packages/components/dropdown/src/dropdown-item-impl.vue", "../../../packages/components/dropdown/src/useDropdown.ts", "../../../packages/components/dropdown/src/dropdown-item.vue", "../../../packages/components/dropdown/src/dropdown-menu.vue", "../../../packages/components/dropdown/index.ts", "../../../packages/components/empty/src/img-empty.vue", "../../../packages/components/empty/src/empty.ts", "../../../packages/components/empty/src/empty.vue", "../../../packages/components/empty/index.ts", "../../../packages/components/form/src/form.ts", "../../../packages/components/form/src/utils.ts", "../../../packages/components/form/src/form.vue", "../../src/util.ts", "../../src/rule/required.ts", "../../src/rule/whitespace.ts", "../../src/rule/url.ts", "../../src/rule/type.ts", "../../src/rule/range.ts", "../../src/rule/enum.ts", "../../src/rule/pattern.ts", "../../src/rule/index.ts", "../../src/validator/string.ts", "../../src/validator/method.ts", "../../src/validator/number.ts", "../../src/validator/boolean.ts", "../../src/validator/regexp.ts", "../../src/validator/integer.ts", "../../src/validator/float.ts", "../../src/validator/array.ts", "../../src/validator/object.ts", "../../src/validator/enum.ts", "../../src/validator/pattern.ts", "../../src/validator/date.ts", "../../src/validator/required.ts", "../../src/validator/type.ts", "../../src/validator/any.ts", "../../src/validator/index.ts", "../../src/messages.ts", "../../src/index.ts", "../../../packages/components/form/src/form-item.ts", "../../../packages/components/form/src/form-label-wrap.tsx", "../../../packages/components/form/src/form-item.vue", "../../../packages/components/form/index.ts", "../../../packages/components/image-viewer/src/image-viewer.ts", "../../../packages/components/image-viewer/src/image-viewer.vue", "../../../packages/components/image-viewer/index.ts", "../../../packages/components/image/src/image.ts", "../../../packages/components/image/src/image.vue", "../../../packages/components/image/index.ts", "../../../packages/components/input-number/src/input-number.ts", "../../../packages/components/input-number/src/input-number.vue", "../../../packages/components/input-number/index.ts", "../../../packages/components/input-tag/src/input-tag.ts", "../../../packages/components/input-tag/src/composables/use-input-tag.ts", "../../../packages/components/input-tag/src/composables/use-hovering.ts", "../../../packages/components/input-tag/src/composables/use-drag-tag.ts", "../../../packages/components/input-tag/src/composables/use-input-tag-dom.ts", "../../../packages/components/input-tag/src/input-tag.vue", "../../../packages/components/input-tag/index.ts", "../../../packages/components/link/src/link.ts", "../../../packages/components/link/src/link.vue", "../../../packages/components/link/index.ts", "../../../packages/components/menu/src/utils/submenu.ts", "../../../packages/components/menu/src/utils/menu-item.ts", "../../../packages/components/menu/src/utils/menu-bar.ts", "../../../packages/components/menu/src/menu-collapse-transition.vue", "../../../packages/components/menu/src/use-menu.ts", "../../../packages/components/menu/src/use-menu-color.ts", "../../../packages/components/menu/src/use-menu-css-var.ts", "../../../packages/components/menu/src/tokens.ts", "../../../packages/components/menu/src/sub-menu.ts", "../../../packages/components/menu/src/menu.ts", "../../../packages/components/menu/src/menu-item.ts", "../../../packages/components/menu/src/menu-item.vue", "../../../packages/components/menu/src/menu-item-group.ts", "../../../packages/components/menu/src/menu-item-group.vue", "../../../packages/components/menu/index.ts", "../../../packages/components/page-header/src/page-header.ts", "../../../packages/components/page-header/src/page-header.vue", "../../../packages/components/page-header/index.ts", "../../../packages/components/pagination/src/constants.ts", "../../../packages/components/pagination/src/components/prev.ts", "../../../packages/components/pagination/src/components/prev.vue", "../../../packages/components/pagination/src/components/next.ts", "../../../packages/components/pagination/src/components/next.vue", "../../../packages/components/pagination/src/usePagination.ts", "../../../packages/components/pagination/src/components/sizes.ts", "../../../packages/components/pagination/src/components/sizes.vue", "../../../packages/components/pagination/src/components/jumper.ts", "../../../packages/components/pagination/src/components/jumper.vue", "../../../packages/components/pagination/src/components/total.ts", "../../../packages/components/pagination/src/components/total.vue", "../../../packages/components/pagination/src/components/pager.ts", "../../../packages/components/pagination/src/components/pager.vue", "../../../packages/components/pagination/src/pagination.ts", "../../../packages/components/pagination/index.ts", "../../../packages/components/popconfirm/src/popconfirm.ts", "../../../packages/components/popconfirm/src/popconfirm.vue", "../../../packages/components/popconfirm/index.ts", "../../../packages/components/popover/src/popover.ts", "../../../packages/components/popover/src/popover.vue", "../../../packages/components/popover/src/directive.ts", "../../../packages/components/popover/index.ts", "../../../packages/components/progress/src/progress.ts", "../../../packages/components/progress/src/progress.vue", "../../../packages/components/progress/index.ts", "../../../packages/components/rate/src/rate.ts", "../../../packages/components/rate/src/rate.vue", "../../../packages/components/rate/index.ts", "../../../packages/components/result/src/result.ts", "../../../packages/components/result/src/result.vue", "../../../packages/components/result/index.ts", "../../../packages/components/row/src/row.ts", "../../../packages/components/row/src/row.vue", "../../../packages/components/row/index.ts", "../../../packages/components/select-v2/src/group-item.vue", "../../../packages/components/select-v2/src/useOption.ts", "../../../packages/components/select-v2/src/defaults.ts", "../../../packages/components/select-v2/src/token.ts", "../../../packages/components/select-v2/src/option-item.vue", "../../memoize-one/dist/memoize-one.esm.js", "../../../packages/components/virtual-list/src/hooks/use-cache.ts", "../../../packages/components/virtual-list/src/defaults.ts", "../../../packages/components/virtual-list/src/hooks/use-wheel.ts", "../../../packages/components/virtual-list/src/props.ts", "../../../packages/components/virtual-list/src/utils.ts", "../../../packages/components/virtual-list/src/components/scrollbar.ts", "../../../packages/components/virtual-list/src/builders/build-list.ts", "../../../packages/components/virtual-list/src/components/fixed-size-list.ts", "../../../packages/components/virtual-list/src/components/dynamic-size-list.ts", "../../../packages/components/select-v2/src/select-dropdown.tsx", "../../../packages/components/select-v2/src/useAllowCreate.ts", "../../../packages/components/select-v2/src/useSelect.ts", "../../../packages/components/select-v2/src/select.vue", "../../../packages/components/select-v2/index.ts", "../../../packages/components/skeleton/src/skeleton.ts", "../../../packages/components/skeleton/src/skeleton-item.ts", "../../../packages/components/skeleton/src/skeleton-item.vue", "../../../packages/hooks/use-throttle-render/index.ts", "../../../packages/components/skeleton/src/skeleton.vue", "../../../packages/components/skeleton/index.ts", "../../../packages/components/slider/src/constants.ts", "../../../packages/components/slider/src/slider.ts", "../../../packages/components/slider/src/button.ts", "../../../packages/components/slider/src/composables/use-slider-button.ts", "../../../packages/components/slider/src/button.vue", "../../../packages/components/slider/src/marker.ts", "../../../packages/components/slider/src/composables/use-slide.ts", "../../../packages/components/slider/src/composables/use-stops.ts", "../../../packages/components/slider/src/composables/use-marks.ts", "../../../packages/components/slider/src/composables/use-watch.ts", "../../../packages/components/slider/src/composables/use-lifecycle.ts", "../../../packages/components/slider/src/slider.vue", "../../../packages/components/slider/index.ts", "../../../packages/components/space/src/item.ts", "../../../packages/components/space/src/use-space.ts", "../../../packages/components/space/src/space.ts", "../../../packages/components/space/index.ts", "../../../packages/components/statistic/src/statistic.ts", "../../../packages/components/statistic/src/statistic.vue", "../../../packages/components/statistic/index.ts", "../../../packages/components/countdown/src/countdown.ts", "../../../packages/components/countdown/src/utils.ts", "../../../packages/components/countdown/src/countdown.vue", "../../../packages/components/countdown/index.ts", "../../../packages/components/steps/src/steps.ts", "../../../packages/components/steps/src/tokens.ts", "../../../packages/components/steps/src/steps.vue", "../../../packages/components/steps/src/item.ts", "../../../packages/components/steps/src/item.vue", "../../../packages/components/steps/index.ts", "../../../packages/utils/vue/validator.ts", "../../../packages/components/switch/src/switch.ts", "../../../packages/components/switch/src/switch.vue", "../../../packages/components/switch/index.ts", "../../../packages/components/table/src/util.ts", "../../../packages/components/table/src/store/expand.ts", "../../../packages/components/table/src/store/current.ts", "../../../packages/components/table/src/store/tree.ts", "../../../packages/components/table/src/store/watcher.ts", "../../../packages/components/table/src/store/index.ts", "../../../packages/components/table/src/store/helper.ts", "../../../packages/components/table/src/table-layout.ts", "../../../packages/components/table/src/filter-panel.vue", "../../../packages/components/table/src/layout-observer.ts", "../../../packages/components/table/src/tokens.ts", "../../../packages/components/table/src/table-header/event-helper.ts", "../../../packages/components/table/src/table-header/style.helper.ts", "../../../packages/components/table/src/table-header/utils-helper.ts", "../../../packages/components/table/src/table-header/index.ts", "../../../packages/components/table/src/table-body/events-helper.ts", "../../../packages/components/table/src/table-body/styles-helper.ts", "../../../packages/components/table/src/table-body/td-wrapper.vue", "../../../packages/components/table/src/table-body/render-helper.ts", "../../../packages/components/table/src/table-body/defaults.ts", "../../../packages/components/table/src/table-body/index.ts", "../../../packages/components/table/src/table-footer/mapState-helper.ts", "../../../packages/components/table/src/table-footer/style-helper.ts", "../../../packages/components/table/src/table-footer/index.ts", "../../../packages/components/table/src/table/utils-helper.ts", "../../../packages/components/table/src/table/style-helper.ts", "../../../packages/components/table/src/table/key-render-helper.ts", "../../../packages/components/table/src/table/defaults.ts", "../../../packages/components/table/src/h-helper.ts", "../../../packages/components/table/src/composables/use-scrollbar.ts", "../../normalize-wheel-es/src/UserAgent_DEPRECATED.js", "../../normalize-wheel-es/src/ExecutionEnvironment.js", "../../normalize-wheel-es/src/isEventSupported.js", "../../normalize-wheel-es/src/normalizeWheel.js", "../../../packages/directives/mousewheel/index.ts", "../../../packages/components/table/src/table.vue", "../../../packages/components/table/src/config.ts", "../../../packages/components/table/src/table-column/watcher-helper.ts", "../../../packages/components/table/src/table-column/render-helper.ts", "../../../packages/components/table/src/table-column/defaults.ts", "../../../packages/components/table/src/table-column/index.ts", "../../../packages/components/table/index.ts", "../../../packages/components/table-v2/src/constants.ts", "../../../packages/components/table-v2/src/private.ts", "../../../packages/components/table-v2/src/composables/utils.ts", "../../../packages/components/table-v2/src/composables/use-columns.ts", "../../../packages/components/table-v2/src/composables/use-scrollbar.ts", "../../../packages/components/table-v2/src/composables/use-row.ts", "../../../packages/components/table-v2/src/composables/use-data.ts", "../../../packages/components/table-v2/src/utils.ts", "../../../packages/components/table-v2/src/composables/use-styles.ts", "../../../packages/components/table-v2/src/use-table.ts", "../../../packages/components/table-v2/src/tokens.ts", "../../../packages/components/table-v2/src/common.ts", "../../../packages/components/table-v2/src/row.ts", "../../../packages/components/table-v2/src/header.ts", "../../../packages/components/table-v2/src/grid.ts", "../../../packages/components/table-v2/src/table.ts", "../../../packages/components/table-v2/src/components/header.tsx", "../../../packages/components/virtual-list/src/hooks/use-grid-wheel.ts", "../../../packages/components/virtual-list/src/hooks/use-grid-touch.ts", "../../../packages/components/virtual-list/src/builders/build-grid.ts", "../../../packages/components/virtual-list/src/components/dynamic-size-grid.ts", "../../../packages/components/virtual-list/src/components/fixed-size-grid.ts", "../../../packages/components/table-v2/src/table-grid.tsx", "../../../packages/components/table-v2/src/renderers/main-table.tsx", "../../../packages/components/table-v2/src/renderers/left-table.tsx", "../../../packages/components/table-v2/src/renderers/right-table.tsx", "../../../packages/components/table-v2/src/components/row.tsx", "../../../packages/components/table-v2/src/renderers/row.tsx", "../../../packages/components/table-v2/src/components/cell.tsx", "../../../packages/components/table-v2/src/components/expand-icon.tsx", "../../../packages/components/table-v2/src/renderers/cell.tsx", "../../../packages/components/table-v2/src/header-row.ts", "../../../packages/components/table-v2/src/components/header-row.tsx", "../../../packages/components/table-v2/src/renderers/header.tsx", "../../../packages/components/table-v2/src/components/header-cell.tsx", "../../../packages/components/table-v2/src/components/sort-icon.tsx", "../../../packages/components/table-v2/src/renderers/header-cell.tsx", "../../../packages/components/table-v2/src/renderers/footer.tsx", "../../../packages/components/table-v2/src/renderers/empty.tsx", "../../../packages/components/table-v2/src/renderers/overlay.tsx", "../../../packages/components/table-v2/src/table-v2.tsx", "../../../packages/components/table-v2/src/auto-resizer.ts", "../../../packages/components/table-v2/src/composables/use-auto-resize.ts", "../../../packages/components/table-v2/src/components/auto-resizer.tsx", "../../../packages/components/table-v2/index.ts", "../../../packages/components/tabs/src/constants.ts", "../../../packages/components/tabs/src/tab-bar.ts", "../../../packages/components/tabs/src/tab-bar.vue", "../../../packages/components/tabs/src/tab-nav.tsx", "../../../packages/components/tabs/src/tabs.tsx", "../../../packages/components/tabs/src/tab-pane.ts", "../../../packages/components/tabs/src/tab-pane.vue", "../../../packages/components/tabs/index.ts", "../../../packages/components/text/src/text.ts", "../../../packages/components/text/src/text.vue", "../../../packages/components/text/index.ts", "../../../packages/components/time-select/src/time-select.ts", "../../../packages/components/time-select/src/utils.ts", "../../../packages/components/time-select/src/time-select.vue", "../../../packages/components/time-select/index.ts", "../../../packages/components/timeline/src/tokens.ts", "../../../packages/components/timeline/src/timeline.ts", "../../../packages/components/timeline/src/timeline-item.ts", "../../../packages/components/timeline/src/timeline-item.vue", "../../../packages/components/timeline/index.ts", "../../../packages/components/transfer/src/transfer.ts", "../../../packages/components/transfer/src/transfer-panel.ts", "../../../packages/components/transfer/src/composables/use-props-alias.ts", "../../../packages/components/transfer/src/composables/use-check.ts", "../../../packages/components/transfer/src/transfer-panel.vue", "../../../packages/components/transfer/src/composables/use-computed-data.ts", "../../../packages/components/transfer/src/composables/use-move.ts", "../../../packages/components/transfer/src/composables/use-checked-change.ts", "../../../packages/components/transfer/src/transfer.vue", "../../../packages/components/transfer/index.ts", "../../../packages/components/tree/src/model/util.ts", "../../../packages/components/tree/src/model/node.ts", "../../../packages/components/tree/src/model/tree-store.ts", "../../../packages/components/tree/src/tokens.ts", "../../../packages/components/tree/src/tree-node-content.vue", "../../../packages/components/tree/src/model/useNodeExpandEventBroadcast.ts", "../../../packages/components/tree/src/model/useDragNode.ts", "../../../packages/components/tree/src/tree-node.vue", "../../../packages/components/tree/src/model/useKeydown.ts", "../../../packages/components/tree/src/tree.ts", "../../../packages/components/tree/src/tree.vue", "../../../packages/components/tree/index.ts", "../../../packages/components/tree-select/src/select.ts", "../../../packages/components/tree-select/src/tree-select-option.ts", "../../../packages/components/tree-select/src/utils.ts", "../../../packages/components/tree-select/src/tree.ts", "../../../packages/components/tree-select/src/cache-options.ts", "../../../packages/components/tree-select/src/tree-select.vue", "../../../packages/components/tree-select/index.ts", "../../../packages/components/tree-v2/src/virtual-tree.ts", "../../../packages/components/tree-v2/src/composables/useCheck.ts", "../../../packages/components/tree-v2/src/composables/useFilter.ts", "../../../packages/components/tree-v2/src/composables/useTree.ts", "../../../packages/components/tree-v2/src/tree-node-content.ts", "../../../packages/components/tree-v2/src/tree-node.vue", "../../../packages/components/tree-v2/src/tree.vue", "../../../packages/components/tree-v2/index.ts", "../../../packages/components/upload/src/constants.ts", "../../../packages/components/upload/src/ajax.ts", "../../../packages/components/upload/src/upload.ts", "../../../packages/components/upload/src/upload-list.ts", "../../../packages/components/upload/src/upload-list.vue", "../../../packages/components/upload/src/upload-dragger.ts", "../../../packages/components/upload/src/upload-dragger.vue", "../../../packages/components/upload/src/upload-content.ts", "../../../packages/components/upload/src/upload-content.vue", "../../../packages/components/upload/src/use-handlers.ts", "../../../packages/components/upload/src/upload.vue", "../../../packages/components/upload/index.ts", "../../../packages/components/watermark/src/watermark.ts", "../../../packages/components/watermark/src/utils.ts", "../../../packages/components/watermark/src/useClips.ts", "../../../packages/components/watermark/src/watermark.vue", "../../../packages/components/watermark/index.ts", "../../../packages/components/tour/src/mask.ts", "../../@floating-ui/utils/dist/floating-ui.utils.mjs", "../../@floating-ui/core/dist/floating-ui.core.mjs", "../../@floating-ui/utils/dist/floating-ui.utils.dom.mjs", "../../@floating-ui/dom/dist/floating-ui.dom.mjs", "../../../packages/components/tour/src/helper.ts", "../../../packages/components/tour/src/mask.vue", "../../../packages/components/tour/src/content.ts", "../../../packages/components/tour/src/content.vue", "../../../packages/components/tour/src/steps.ts", "../../../packages/components/tour/src/tour.ts", "../../../packages/components/tour/src/tour.vue", "../../../packages/components/tour/src/step.ts", "../../../packages/components/tour/src/step.vue", "../../../packages/components/tour/index.ts", "../../../packages/components/anchor/src/anchor.ts", "../../../packages/components/anchor/src/constants.ts", "../../../packages/utils/dom/element.ts", "../../../packages/utils/throttleByRaf.ts", "../../../packages/components/anchor/src/anchor.vue", "../../../packages/components/anchor/src/anchor-link.ts", "../../../packages/components/anchor/src/anchor-link.vue", "../../../packages/components/anchor/index.ts", "../../../packages/components/segmented/src/segmented.ts", "../../../packages/components/segmented/src/segmented.vue", "../../../packages/components/segmented/index.ts", "../../../packages/components/mention/src/helper.ts", "../../../packages/components/mention/src/mention.ts", "../../../packages/components/mention/src/mention-dropdown.ts", "../../../packages/components/mention/src/mention-dropdown.vue", "../../../packages/components/mention/src/mention.vue", "../../../packages/components/mention/index.ts", "../../../packages/components/splitter/src/splitter.ts", "../../../packages/components/splitter/src/type.ts", "../../../packages/components/splitter/src/hooks/useContainer.ts", "../../../packages/components/splitter/src/hooks/useSize.ts", "../../../packages/components/splitter/src/hooks/useResize.ts", "../../../packages/components/splitter/src/splitter.vue", "../../../packages/components/splitter/src/hooks/usePanel.ts", "../../../packages/components/splitter/src/split-bar.vue", "../../../packages/components/splitter/src/split-panel.ts", "../../../packages/components/splitter/src/split-panel.vue", "../../../packages/components/splitter/index.ts", "../../../packages/element-plus/component.ts", "../../../packages/components/infinite-scroll/src/index.ts", "../../../packages/components/infinite-scroll/index.ts", "../../../packages/components/loading/src/loading.ts", "../../../packages/components/loading/src/service.ts", "../../../packages/components/loading/src/directive.ts", "../../../packages/components/loading/index.ts", "../../../packages/components/message/src/message.ts", "../../../packages/components/message/src/instance.ts", "../../../packages/components/message/src/message.vue", "../../../packages/components/message/src/method.ts", "../../../packages/components/message/index.ts", "../../../packages/directives/trap-focus/index.ts", "../../../packages/components/message-box/src/index.vue", "../../../packages/components/message-box/src/messageBox.ts", "../../../packages/components/message-box/index.ts", "../../../packages/components/notification/src/notification.ts", "../../../packages/components/notification/src/notification.vue", "../../../packages/components/notification/src/notify.ts", "../../../packages/components/notification/index.ts", "../../../packages/element-plus/plugin.ts", "../../../packages/element-plus/defaults.ts", "../../../packages/hooks/use-focus/index.ts", "../../../packages/hooks/use-modal/index.ts", "../../../packages/hooks/use-prevent-global/index.ts", "../../../packages/utils/vue/global-node.ts", "../../../packages/hooks/use-teleport/index.ts", "../../../packages/hooks/use-transition-fallthrough/index.ts", "../../../packages/hooks/use-intermediate-render/index.ts", "../../../packages/hooks/use-floating/index.ts", "../../../packages/element-plus/index.ts"], - "sourcesContent": ["!function(n,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(n=\"undefined\"!=typeof globalThis?globalThis:n||self).dayjs_plugin_localeData=e()}(this,(function(){\"use strict\";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format(\"MMMM\"):u(n,\"months\")},monthsShort:function(e){return e?e.format(\"MMM\"):u(n,\"monthsShort\",\"months\",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format(\"dddd\"):u(n,\"weekdays\")},weekdaysMin:function(e){return e?e.format(\"dd\"):u(n,\"weekdaysMin\",\"weekdays\",2)},weekdaysShort:function(e){return e?e.format(\"ddd\"):u(n,\"weekdaysShort\",\"weekdays\",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),\"months\")},t.monthsShort=function(){return u(i(),\"monthsShort\",\"months\",3)},t.weekdays=function(n){return u(i(),\"weekdays\",null,null,n)},t.weekdaysShort=function(n){return u(i(),\"weekdaysShort\",\"weekdays\",3,n)},t.weekdaysMin=function(n){return u(i(),\"weekdaysMin\",\"weekdays\",2,n)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){\"use strict\";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||\"YYYY-MM-DDTHH:mm:ssZ\").replace(/\\[([^\\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case\"Q\":return Math.ceil((t.$M+1)/3);case\"Do\":return r.ordinal(t.$D);case\"gggg\":return t.weekYear();case\"GGGG\":return t.isoWeekYear();case\"wo\":return r.ordinal(t.week(),\"W\");case\"w\":case\"ww\":return s.s(t.week(),\"w\"===e?1:2,\"0\");case\"W\":case\"WW\":return s.s(t.isoWeek(),\"W\"===e?1:2,\"0\");case\"k\":case\"kk\":return s.s(String(0===t.$H?24:t.$H),\"k\"===e?1:2,\"0\");case\"X\":return Math.floor(t.$d.getTime()/1e3);case\"x\":return t.$d.getTime();case\"z\":return\"[\"+t.offsetName()+\"]\";case\"zzz\":return\"[\"+t.offsetName(\"long\")+\"]\";default:return e}}));return n.bind(this)(a)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekYear=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_dayOfYear=t()}(this,(function(){\"use strict\";return function(e,t,n){t.prototype.dayOfYear=function(e){var t=Math.round((n(this).startOf(\"day\")-n(this).startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"day\")}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));", "!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){\"use strict\";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));", "export const version = '2.13.1'\n", "export const INSTALLED_KEY = Symbol('INSTALLED_KEY')\n", "import type { ConfigProviderProps } from './config-provider-props'\nimport type { InjectionKey, Ref } from 'vue'\n\nexport type ConfigProviderContext = Partial\n\nexport const configProviderContextKey: InjectionKey<\n Ref\n> = Symbol()\n", "import { computed, getCurrentInstance, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'el'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey> =\n Symbol('namespaceContextKey')\n\nexport const useGetDerivedNamespace = (\n namespaceOverrides?: Ref\n) => {\n const derivedNamespace =\n namespaceOverrides ||\n (getCurrentInstance()\n ? inject(namespaceContextKey, ref(defaultNamespace))\n : ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport const useNamespace = (\n block: string,\n namespaceOverrides?: Ref\n) => {\n const namespace = useGetDerivedNamespace(namespaceOverrides)\n const b = (blockSuffix = '') =>\n _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(namespace.value, block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(namespace.value, block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(namespace.value, block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(namespace.value, block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(namespace.value, block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(namespace.value, block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record) => {\n const styles: Record = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record) => {\n const styles: Record = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) =>\n `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName,\n }\n}\n\nexport type UseNamespaceReturn = ReturnType\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n", "import Symbol from './_Symbol.js';\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 * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n", "import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\nfunction baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n}\n\nexport default baseToNumber;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n", "import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n", "import baseToNumber from './_baseToNumber.js';\nimport baseToString from './_baseToString.js';\n\n/**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\nfunction createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n}\n\nexport default createMathOperation;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\nvar add = createMathOperation(function(augend, addend) {\n return augend + addend;\n}, 0);\n\nexport default add;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n", "import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n", "import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n", "import toNumber from './toNumber.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nexport default toFinite;\n", "import toFinite from './toFinite.js';\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nexport default toInteger;\n", "import toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\nfunction after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n\nexport default after;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n", "import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n", "import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n", "import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n", "import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n", "import WeakMap from './_WeakMap.js';\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nexport default metaMap;\n", "import identity from './identity.js';\nimport metaMap from './_metaMap.js';\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nexport default baseSetData;\n", "import isObject from './isObject.js';\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\nexport default baseCreate;\n", "import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\n\nexport default createCtor;\n", "import createCtor from './_createCtor.js';\nimport root from './_root.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nexport default createBind;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nexport default composeArgs;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\n\nexport default composeArgsRight;\n", "/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nexport default countHolders;\n", "/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nexport default baseLodash;\n", "import baseCreate from './_baseCreate.js';\nimport baseLodash from './_baseLodash.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nexport default LazyWrapper;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nexport default noop;\n", "import metaMap from './_metaMap.js';\nimport noop from './noop.js';\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n};\n\nexport default getData;\n", "/** Used to lookup unminified function names. */\nvar realNames = {};\n\nexport default realNames;\n", "import realNames from './_realNames.js';\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 * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n}\n\nexport default getFuncName;\n", "import baseCreate from './_baseCreate.js';\nimport baseLodash from './_baseLodash.js';\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\n\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\n\nexport default LodashWrapper;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n", "import LazyWrapper from './_LazyWrapper.js';\nimport LodashWrapper from './_LodashWrapper.js';\nimport copyArray from './_copyArray.js';\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\n\nexport default wrapperClone;\n", "import LazyWrapper from './_LazyWrapper.js';\nimport LodashWrapper from './_LodashWrapper.js';\nimport baseLodash from './_baseLodash.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\nimport wrapperClone from './_wrapperClone.js';\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 a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\n\nexport default lodash;\n", "import LazyWrapper from './_LazyWrapper.js';\nimport getData from './_getData.js';\nimport getFuncName from './_getFuncName.js';\nimport lodash from './wrapperLodash.js';\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\nfunction isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n}\n\nexport default isLaziable;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n", "import baseSetData from './_baseSetData.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\n\nexport default setData;\n", "/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nexport default getWrapDetails;\n", "/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\n\nexport default insertWrapDetails;\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\nexport default constant;\n", "import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n", "import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n", "import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n", "import baseIndexOf from './_baseIndexOf.js';\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nexport default arrayIncludes;\n", "import arrayEach from './_arrayEach.js';\nimport arrayIncludes from './_arrayIncludes.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n}\n\nexport default updateWrapDetails;\n", "import getWrapDetails from './_getWrapDetails.js';\nimport insertWrapDetails from './_insertWrapDetails.js';\nimport setToString from './_setToString.js';\nimport updateWrapDetails from './_updateWrapDetails.js';\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nexport default setWrapToString;\n", "import isLaziable from './_isLaziable.js';\nimport setData from './_setData.js';\nimport setWrapToString from './_setWrapToString.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\n\nexport default createRecurry;\n", "/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nexport default getHolder;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n", "import copyArray from './_copyArray.js';\nimport isIndex from './_isIndex.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nexport default reorder;\n", "/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n}\n\nexport default replaceHolders;\n", "import composeArgs from './_composeArgs.js';\nimport composeArgsRight from './_composeArgsRight.js';\nimport countHolders from './_countHolders.js';\nimport createCtor from './_createCtor.js';\nimport createRecurry from './_createRecurry.js';\nimport getHolder from './_getHolder.js';\nimport reorder from './_reorder.js';\nimport replaceHolders from './_replaceHolders.js';\nimport root from './_root.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nexport default createHybrid;\n", "import apply from './_apply.js';\nimport createCtor from './_createCtor.js';\nimport createHybrid from './_createHybrid.js';\nimport createRecurry from './_createRecurry.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\nimport root from './_root.js';\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nexport default createCurry;\n", "import apply from './_apply.js';\nimport createCtor from './_createCtor.js';\nimport root from './_root.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\n\nexport default createPartial;\n", "import composeArgs from './_composeArgs.js';\nimport composeArgsRight from './_composeArgsRight.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n}\n\nexport default mergeData;\n", "import baseSetData from './_baseSetData.js';\nimport createBind from './_createBind.js';\nimport createCurry from './_createCurry.js';\nimport createHybrid from './_createHybrid.js';\nimport createPartial from './_createPartial.js';\nimport getData from './_getData.js';\nimport mergeData from './_mergeData.js';\nimport setData from './_setData.js';\nimport setWrapToString from './_setWrapToString.js';\nimport toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\n\nexport default createWrap;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_ARY_FLAG = 128;\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\nfunction ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n}\n\nexport default ary;\n", "import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n", "import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n", "import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n", "import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n", "import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n", "import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n", "import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n", "import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n", "import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n", "import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\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\nexport default baseIsTypedArray;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n", "import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\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\nexport default isTypedArray;\n", "import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\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\nexport default arrayLikeKeys;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n", "import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n", "import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\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 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n", "import assignValue from './_assignValue.js';\nimport copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport isArrayLike from './isArrayLike.js';\nimport isPrototype from './_isPrototype.js';\nimport keys from './keys.js';\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 * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nexport default assign;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n", "import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\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 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n", "import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\nvar assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n});\n\nexport default assignIn;\n", "import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n});\n\nexport default assignInWith;\n", "import copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n/**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n});\n\nexport default assignWith;\n", "import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n", "import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n", "import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n", "import nativeCreate from './_nativeCreate.js';\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 * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n", "import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n", "import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n", "import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n", "import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n", "import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n", "import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n", "import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n", "import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n", "import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n", "import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n", "import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n", "import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n", "import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n", "import get from './get.js';\n\n/**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\nfunction baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n}\n\nexport default baseAt;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n", "import Symbol from './_Symbol.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nexport default isFlattenable;\n", "import arrayPush from './_arrayPush.js';\nimport isFlattenable from './_isFlattenable.js';\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nexport default baseFlatten;\n", "import baseFlatten from './_baseFlatten.js';\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nexport default flatten;\n", "import flatten from './flatten.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nexport default flatRest;\n", "import baseAt from './_baseAt.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\nvar at = flatRest(baseAt);\n\nexport default at;\n", "import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n", "import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\nimport isPlainObject from './isPlainObject.js';\n\n/** `Object#toString` result references. */\nvar domExcTag = '[object DOMException]',\n errorTag = '[object Error]';\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\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 an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n}\n\nexport default isError;\n", "import apply from './_apply.js';\nimport baseRest from './_baseRest.js';\nimport isError from './isError.js';\n\n/**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\nvar attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n});\n\nexport default attempt;\n", "import toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nexport default before;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\nvar bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n});\n\n// Assign default placeholders.\nbind.placeholder = {};\n\nexport default bind;\n", "import arrayEach from './_arrayEach.js';\nimport baseAssignValue from './_baseAssignValue.js';\nimport bind from './bind.js';\nimport flatRest from './_flatRest.js';\nimport toKey from './_toKey.js';\n\n/**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\nvar bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n});\n\nexport default bindAll;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\nvar bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n});\n\n// Assign default placeholders.\nbindKey.placeholder = {};\n\nexport default bindKey;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nexport default castSlice;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n", "/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nexport default asciiToArray;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nexport default unicodeToArray;\n", "import asciiToArray from './_asciiToArray.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeToArray from './_unicodeToArray.js';\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nexport default stringToArray;\n", "import castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nexport default createCaseFirst;\n", "import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nexport default upperFirst;\n", "import toString from './toString.js';\nimport upperFirst from './upperFirst.js';\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nexport default capitalize;\n", "/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nexport default arrayReduce;\n", "/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default basePropertyOf;\n", "import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nexport default deburrLetter;\n", "import deburrLetter from './_deburrLetter.js';\nimport toString from './toString.js';\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nexport default deburr;\n", "/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nexport default asciiWords;\n", "/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nexport default hasUnicodeWord;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nexport default unicodeWords;\n", "import asciiWords from './_asciiWords.js';\nimport hasUnicodeWord from './_hasUnicodeWord.js';\nimport toString from './toString.js';\nimport unicodeWords from './_unicodeWords.js';\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nexport default words;\n", "import arrayReduce from './_arrayReduce.js';\nimport deburr from './deburr.js';\nimport words from './words.js';\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nexport default createCompounder;\n", "import capitalize from './capitalize.js';\nimport createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nexport default camelCase;\n", "import isArray from './isArray.js';\n\n/**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\nfunction castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n}\n\nexport default castArray;\n", "import root from './_root.js';\nimport toInteger from './toInteger.js';\nimport toNumber from './toNumber.js';\nimport toString from './toString.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite,\n nativeMin = Math.min;\n\n/**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\nfunction createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n}\n\nexport default createRound;\n", "import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\nvar ceil = createRound('ceil');\n\nexport default ceil;\n", "import lodash from './wrapperLodash.js';\n\n/**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\nfunction chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n}\n\nexport default chain;\n", "import baseSlice from './_baseSlice.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\nfunction chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n}\n\nexport default chunk;\n", "/**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\nfunction baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n}\n\nexport default baseClamp;\n", "import baseClamp from './_baseClamp.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\nfunction clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n}\n\nexport default clamp;\n", "import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n", "import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n", "import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n", "import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n", "import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n", "import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n", "import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n", "import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n", "import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n", "import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n", "import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\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 * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n", "import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\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\nexport default cloneRegExp;\n", "import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\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/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n", "import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n", "import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n", "import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n", "import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 genTag = '[object GeneratorFunction]',\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 symbolTag = '[object Symbol]',\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 supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\nfunction cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n}\n\nexport default cloneDeepWith;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\nfunction cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n}\n\nexport default cloneWith;\n", "import LodashWrapper from './_LodashWrapper.js';\n\n/**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\nfunction wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n}\n\nexport default wrapperCommit;\n", "/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default compact;\n", "import arrayPush from './_arrayPush.js';\nimport baseFlatten from './_baseFlatten.js';\nimport copyArray from './_copyArray.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\nfunction concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n}\n\nexport default concat;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n", "import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n", "import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n", "import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n", "import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\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 * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n", "import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\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 * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n", "import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n", "import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nexport default baseIsMatch;\n", "import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n", "import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nexport default getMatchData;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nexport default matchesStrictComparable;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nexport default baseMatches;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nexport default baseHasIn;\n", "import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n", "import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nexport default hasIn;\n", "import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nexport default baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default baseProperty;\n", "import baseGet from './_baseGet.js';\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nexport default basePropertyDeep;\n", "import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nexport default property;\n", "import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nexport default baseIteratee;\n", "import apply from './_apply.js';\nimport arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\nfunction cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = baseIteratee;\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n}\n\nexport default cond;\n", "/**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\nfunction baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n}\n\nexport default baseConformsTo;\n", "import baseConformsTo from './_baseConformsTo.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n}\n\nexport default baseConforms;\n", "import baseClone from './_baseClone.js';\nimport baseConforms from './_baseConforms.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\nfunction conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n}\n\nexport default conforms;\n", "import baseConformsTo from './_baseConformsTo.js';\nimport keys from './keys.js';\n\n/**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\nfunction conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n}\n\nexport default conformsTo;\n", "/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nexport default arrayAggregator;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n", "import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n", "import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n", "import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n", "import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n", "import baseEach from './_baseEach.js';\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nexport default baseAggregator;\n", "import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nexport default createAggregator;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\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 object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\nvar countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n});\n\nexport default countBy;\n", "import baseAssign from './_baseAssign.js';\nimport baseCreate from './_baseCreate.js';\n\n/**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\nfunction create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n}\n\nexport default create;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\n\nexport default curry;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_RIGHT_FLAG = 16;\n\n/**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\nfunction curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurryRight.placeholder = {};\n\nexport default curryRight;\n", "import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n", "import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n", "/**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\nfunction defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n}\n\nexport default defaultTo;\n", "import baseRest from './_baseRest.js';\nimport eq from './eq.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keysIn from './keysIn.js';\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 * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nexport default defaults;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n", "import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n", "/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n", "import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n", "import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n", "import baseMerge from './_baseMerge.js';\nimport isObject from './isObject.js';\n\n/**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n}\n\nexport default customDefaultsMerge;\n", "import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\nexport default mergeWith;\n", "import apply from './_apply.js';\nimport baseRest from './_baseRest.js';\nimport customDefaultsMerge from './_customDefaultsMerge.js';\nimport mergeWith from './mergeWith.js';\n\n/**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\nvar defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n});\n\nexport default defaultsDeep;\n", "/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\nfunction baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n}\n\nexport default baseDelay;\n", "import baseDelay from './_baseDelay.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\nvar defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n});\n\nexport default defer;\n", "import baseDelay from './_baseDelay.js';\nimport baseRest from './_baseRest.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\nvar delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n});\n\nexport default delay;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nexport default arrayIncludesWith;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseDifference;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nexport default difference;\n", "/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\nvar differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))\n : [];\n});\n\nexport default differenceBy;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\nvar differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n});\n\nexport default differenceWith;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\nvar divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n}, 1);\n\nexport default divide;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nexport default drop;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nexport default dropRight;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n}\n\nexport default baseWhile;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\nfunction dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3), true, true)\n : [];\n}\n\nexport default dropRightWhile;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\nfunction dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3), true)\n : [];\n}\n\nexport default dropWhile;\n", "import identity from './identity.js';\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nexport default castFunction;\n", "import arrayEach from './_arrayEach.js';\nimport baseEach from './_baseEach.js';\nimport castFunction from './_castFunction.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nexport default forEach;\n", "/**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEachRight;\n", "import createBaseFor from './_createBaseFor.js';\n\n/**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseForRight = createBaseFor(true);\n\nexport default baseForRight;\n", "import baseForRight from './_baseForRight.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n}\n\nexport default baseForOwnRight;\n", "import baseForOwnRight from './_baseForOwnRight.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEachRight = createBaseEach(baseForOwnRight, true);\n\nexport default baseEachRight;\n", "import arrayEachRight from './_arrayEachRight.js';\nimport baseEachRight from './_baseEachRight.js';\nimport castFunction from './_castFunction.js';\nimport isArray from './isArray.js';\n\n/**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\nfunction forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, castFunction(iteratee));\n}\n\nexport default forEachRight;\n", "import baseClamp from './_baseClamp.js';\nimport baseToString from './_baseToString.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\nfunction endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n}\n\nexport default endsWith;\n", "import arrayMap from './_arrayMap.js';\n\n/**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\nfunction baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n}\n\nexport default baseToPairs;\n", "/**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\nfunction setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n}\n\nexport default setToPairs;\n", "import baseToPairs from './_baseToPairs.js';\nimport getTag from './_getTag.js';\nimport mapToArray from './_mapToArray.js';\nimport setToPairs from './_setToPairs.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\nfunction createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n}\n\nexport default createToPairs;\n", "import createToPairs from './_createToPairs.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\nvar toPairs = createToPairs(keys);\n\nexport default toPairs;\n", "import createToPairs from './_createToPairs.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\nvar toPairsIn = createToPairs(keysIn);\n\nexport default toPairsIn;\n", "import basePropertyOf from './_basePropertyOf.js';\n\n/** Used to map characters to HTML entities. */\nvar htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\n/**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nvar escapeHtmlChar = basePropertyOf(htmlEscapes);\n\nexport default escapeHtmlChar;\n", "import escapeHtmlChar from './_escapeHtmlChar.js';\nimport toString from './toString.js';\n\n/** Used to match HTML entities and HTML characters. */\nvar reUnescapedHtml = /[&<>\"']/g,\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\nfunction escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n}\n\nexport default escape;\n", "import toString from './toString.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n}\n\nexport default escapeRegExp;\n", "/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nexport default arrayEvery;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nexport default baseEvery;\n", "import arrayEvery from './_arrayEvery.js';\nimport baseEvery from './_baseEvery.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default every;\n", "import baseClamp from './_baseClamp.js';\nimport toInteger from './toInteger.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\nfunction toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n}\n\nexport default toLength;\n", "import toInteger from './toInteger.js';\nimport toLength from './toLength.js';\n\n/**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\nfunction baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n}\n\nexport default baseFill;\n", "import baseFill from './_baseFill.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\nfunction fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n}\n\nexport default fill;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nexport default baseFilter;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default filter;\n", "import baseIteratee from './_baseIteratee.js';\nimport isArrayLike from './isArrayLike.js';\nimport keys from './keys.js';\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nexport default createFind;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nexport default findIndex;\n", "import createFind from './_createFind.js';\nimport findIndex from './findIndex.js';\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nexport default find;\n", "/**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\nfunction baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n}\n\nexport default baseFindKey;\n", "import baseFindKey from './_baseFindKey.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\nfunction findKey(object, predicate) {\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);\n}\n\nexport default findKey;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\nfunction findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\n}\n\nexport default findLastIndex;\n", "import createFind from './_createFind.js';\nimport findLastIndex from './findLastIndex.js';\n\n/**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\nvar findLast = createFind(findLastIndex);\n\nexport default findLast;\n", "import baseFindKey from './_baseFindKey.js';\nimport baseForOwnRight from './_baseForOwnRight.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\nfunction findLastKey(object, predicate) {\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);\n}\n\nexport default findLastKey;\n", "/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nexport default head;\n", "import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nexport default baseMap;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nexport default flatMap;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n}\n\nexport default flatMapDeep;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\nimport toInteger from './toInteger.js';\n\n/**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\nfunction flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n}\n\nexport default flatMapDepth;\n", "import baseFlatten from './_baseFlatten.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nexport default flattenDeep;\n", "import baseFlatten from './_baseFlatten.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\nfunction flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n}\n\nexport default flattenDepth;\n", "import createWrap from './_createWrap.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\nfunction flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n}\n\nexport default flip;\n", "import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\nvar floor = createRound('floor');\n\nexport default floor;\n", "import LodashWrapper from './_LodashWrapper.js';\nimport flatRest from './_flatRest.js';\nimport getData from './_getData.js';\nimport getFuncName from './_getFuncName.js';\nimport isArray from './isArray.js';\nimport isLaziable from './_isLaziable.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\nfunction createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n}\n\nexport default createFlow;\n", "import createFlow from './_createFlow.js';\n\n/**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flow = createFlow();\n\nexport default flow;\n", "import createFlow from './_createFlow.js';\n\n/**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\nvar flowRight = createFlow(true);\n\nexport default flowRight;\n", "import baseFor from './_baseFor.js';\nimport castFunction from './_castFunction.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nexport default forIn;\n", "import baseForRight from './_baseForRight.js';\nimport castFunction from './_castFunction.js';\nimport keysIn from './keysIn.js';\n\n/**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\nfunction forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, castFunction(iteratee), keysIn);\n}\n\nexport default forInRight;\n", "import baseForOwn from './_baseForOwn.js';\nimport castFunction from './_castFunction.js';\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nexport default forOwn;\n", "import baseForOwnRight from './_baseForOwnRight.js';\nimport castFunction from './_castFunction.js';\n\n/**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\nfunction forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, castFunction(iteratee));\n}\n\nexport default forOwnRight;\n", "/**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n}\n\nexport default fromPairs;\n", "import arrayFilter from './_arrayFilter.js';\nimport isFunction from './isFunction.js';\n\n/**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\nfunction baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n}\n\nexport default baseFunctions;\n", "import baseFunctions from './_baseFunctions.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\nfunction functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n}\n\nexport default functions;\n", "import baseFunctions from './_baseFunctions.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\nfunction functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n}\n\nexport default functionsIn;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\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 object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nexport default groupBy;\n", "/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nexport default baseGt;\n", "import toNumber from './toNumber.js';\n\n/**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\nfunction createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n}\n\nexport default createRelationalOperation;\n", "import baseGt from './_baseGt.js';\nimport createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\nvar gt = createRelationalOperation(baseGt);\n\nexport default gt;\n", "import createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\nvar gte = createRelationalOperation(function(value, other) {\n return value >= other;\n});\n\nexport default gte;\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 * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nexport default baseHas;\n", "import baseHas from './_baseHas.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nexport default has;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\nfunction baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n}\n\nexport default baseInRange;\n", "import baseInRange from './_baseInRange.js';\nimport toFinite from './toFinite.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\nfunction inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n}\n\nexport default inRange;\n", "import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n", "import arrayMap from './_arrayMap.js';\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nexport default baseValues;\n", "import baseValues from './_baseValues.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nexport default values;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport toInteger from './toInteger.js';\nimport values from './values.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nexport default includes;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\nfunction indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n}\n\nexport default indexOf;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\nfunction initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n}\n\nexport default initial;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseIntersection;\n", "import isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nexport default castArrayLikeObject;\n", "import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nexport default intersection;\n", "import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\nvar intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, baseIteratee(iteratee, 2))\n : [];\n});\n\nexport default intersectionBy;\n", "import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\nimport last from './last.js';\n\n/**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\nvar intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n});\n\nexport default intersectionWith;\n", "import baseForOwn from './_baseForOwn.js';\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nexport default baseInverter;\n", "import baseInverter from './_baseInverter.js';\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nexport default createInverter;\n", "import constant from './constant.js';\nimport createInverter from './_createInverter.js';\nimport identity from './identity.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nexport default invert;\n", "import baseIteratee from './_baseIteratee.js';\nimport createInverter from './_createInverter.js';\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 * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\nvar invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n}, baseIteratee);\n\nexport default invertBy;\n", "import baseGet from './_baseGet.js';\nimport baseSlice from './_baseSlice.js';\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nexport default parent;\n", "import apply from './_apply.js';\nimport castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\nfunction baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n}\n\nexport default baseInvoke;\n", "import baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\nvar invoke = baseRest(baseInvoke);\n\nexport default invoke;\n", "import apply from './_apply.js';\nimport baseEach from './_baseEach.js';\nimport baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\nvar invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n});\n\nexport default invokeMap;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\nvar arrayBufferTag = '[object ArrayBuffer]';\n\n/**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\nfunction baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n}\n\nexport default baseIsArrayBuffer;\n", "import baseIsArrayBuffer from './_baseIsArrayBuffer.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;\n\n/**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\nvar isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\nexport default isArrayBuffer;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nexport default isBoolean;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar dateTag = '[object Date]';\n\n/**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\nfunction baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n}\n\nexport default baseIsDate;\n", "import baseIsDate from './_baseIsDate.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsDate = nodeUtil && nodeUtil.isDate;\n\n/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\nvar isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\nexport default isDate;\n", "import isObjectLike from './isObjectLike.js';\nimport isPlainObject from './isPlainObject.js';\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\nfunction isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n}\n\nexport default isElement;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\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 * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n", "import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n", "import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\nfunction isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n}\n\nexport default isEqualWith;\n", "import root from './_root.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite;\n\n/**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\nfunction isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n}\n\nexport default isFinite;\n", "import toInteger from './toInteger.js';\n\n/**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\nfunction isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n}\n\nexport default isInteger;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\n\n/**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\nfunction isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n}\n\nexport default isMatch;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\n\n/**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\nfunction isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n}\n\nexport default isMatchWith;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nexport default isNumber;\n", "import isNumber from './isNumber.js';\n\n/**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\nfunction isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n}\n\nexport default isNaN;\n", "import coreJsData from './_coreJsData.js';\nimport isFunction from './isFunction.js';\nimport stubFalse from './stubFalse.js';\n\n/**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\nvar isMaskable = coreJsData ? isFunction : stubFalse;\n\nexport default isMaskable;\n", "import baseIsNative from './_baseIsNative.js';\nimport isMaskable from './_isMaskable.js';\n\n/** Error message constants. */\nvar CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';\n\n/**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\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 native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n}\n\nexport default isNative;\n", "/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nexport default isNil;\n", "/**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\nfunction isNull(value) {\n return value === null;\n}\n\nexport default isNull;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar regexpTag = '[object RegExp]';\n\n/**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\nfunction baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n}\n\nexport default baseIsRegExp;\n", "import baseIsRegExp from './_baseIsRegExp.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;\n\n/**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\nvar isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\nexport default isRegExp;\n", "import isInteger from './isInteger.js';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\nfunction isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isSafeInteger;\n", "/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nexport default isUndefined;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar weakMapTag = '[object WeakMap]';\n\n/**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\nfunction isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n}\n\nexport default isWeakMap;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar weakSetTag = '[object WeakSet]';\n\n/**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\nfunction isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n}\n\nexport default isWeakSet;\n", "import baseClone from './_baseClone.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\n\nexport default iteratee;\n", "/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeJoin = arrayProto.join;\n\n/**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\nfunction join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n}\n\nexport default join;\n", "import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\nvar kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n});\n\nexport default kebabCase;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\nvar keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n});\n\nexport default keyBy;\n", "/**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n}\n\nexport default strictLastIndexOf;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictLastIndexOf from './_strictLastIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\nfunction lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n}\n\nexport default lastIndexOf;\n", "import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\nvar lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n});\n\nexport default lowerCase;\n", "import createCaseFirst from './_createCaseFirst.js';\n\n/**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\nvar lowerFirst = createCaseFirst('toLowerCase');\n\nexport default lowerFirst;\n", "/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nexport default baseLt;\n", "import baseLt from './_baseLt.js';\nimport createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\nvar lt = createRelationalOperation(baseLt);\n\nexport default lt;\n", "import createRelationalOperation from './_createRelationalOperation.js';\n\n/**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\nvar lte = createRelationalOperation(function(value, other) {\n return value <= other;\n});\n\nexport default lte;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\nfunction mapKeys(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n}\n\nexport default mapKeys;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nexport default mapValues;\n", "import baseClone from './_baseClone.js';\nimport baseMatches from './_baseMatches.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\nfunction matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n}\n\nexport default matches;\n", "import baseClone from './_baseClone.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\nfunction matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n}\n\nexport default matchesProperty;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nexport default baseExtremum;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseGt from './_baseGt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n}\n\nexport default max;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseGt from './_baseGt.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nfunction maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt)\n : undefined;\n}\n\nexport default maxBy;\n", "/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n}\n\nexport default baseSum;\n", "import baseSum from './_baseSum.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\nfunction baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n}\n\nexport default baseMean;\n", "import baseMean from './_baseMean.js';\nimport identity from './identity.js';\n\n/**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\nfunction mean(array) {\n return baseMean(array, identity);\n}\n\nexport default mean;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseMean from './_baseMean.js';\n\n/**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\nfunction meanBy(array, iteratee) {\n return baseMean(array, baseIteratee(iteratee, 2));\n}\n\nexport default meanBy;\n", "import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n", "import baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\nvar method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n});\n\nexport default method;\n", "import baseInvoke from './_baseInvoke.js';\nimport baseRest from './_baseRest.js';\n\n/**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\nvar methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n});\n\nexport default methodOf;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseLt from './_baseLt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nexport default min;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseLt from './_baseLt.js';\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nexport default minBy;\n", "import arrayEach from './_arrayEach.js';\nimport arrayPush from './_arrayPush.js';\nimport baseFunctions from './_baseFunctions.js';\nimport copyArray from './_copyArray.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport keys from './keys.js';\n\n/**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\nfunction mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n}\n\nexport default mixin;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\nvar multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n}, 1);\n\nexport default multiply;\n", "/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\n\nexport default negate;\n", "/**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n}\n\nexport default iteratorToArray;\n", "import Symbol from './_Symbol.js';\nimport copyArray from './_copyArray.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport iteratorToArray from './_iteratorToArray.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\nimport stringToArray from './_stringToArray.js';\nimport values from './values.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Built-in value references. */\nvar symIterator = Symbol ? Symbol.iterator : undefined;\n\n/**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\nfunction toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n}\n\nexport default toArray;\n", "import toArray from './toArray.js';\n\n/**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\nfunction wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n}\n\nexport default wrapperNext;\n", "import isIndex from './_isIndex.js';\n\n/**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\nfunction baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n}\n\nexport default baseNth;\n", "import baseNth from './_baseNth.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\nfunction nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n}\n\nexport default nth;\n", "import baseNth from './_baseNth.js';\nimport baseRest from './_baseRest.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\nfunction nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n}\n\nexport default nthArg;\n", "import castPath from './_castPath.js';\nimport last from './last.js';\nimport parent from './_parent.js';\nimport toKey from './_toKey.js';\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 * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n\n // Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg\n var index = -1,\n length = path.length;\n\n if (!length) {\n return true;\n }\n\n var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');\n\n while (++index < length) {\n var key = path[index];\n\n // skip non-string keys (e.g., Symbols, numbers)\n if (typeof key !== 'string') {\n continue;\n }\n\n // Always block \"__proto__\" anywhere in the path if it's not expected\n if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {\n return false;\n }\n\n // Block \"constructor.prototype\" chains\n if (key === 'constructor' &&\n (index + 1) < length &&\n typeof path[index + 1] === 'string' &&\n path[index + 1] === 'prototype') {\n\n // Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')\n if (isRootPrimitive && index === 0) {\n continue;\n }\n\n return false;\n }\n }\n\n var obj = parent(object, path);\n return obj == null || delete obj[toKey(last(path))];\n}\n\nexport default baseUnset;\n", "import isPlainObject from './isPlainObject.js';\n\n/**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\n\nexport default customOmitClone;\n", "import arrayMap from './_arrayMap.js';\nimport baseClone from './_baseClone.js';\nimport baseUnset from './_baseUnset.js';\nimport castPath from './_castPath.js';\nimport copyObject from './_copyObject.js';\nimport customOmitClone from './_customOmitClone.js';\nimport flatRest from './_flatRest.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n});\n\nexport default omit;\n", "import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n", "import baseGet from './_baseGet.js';\nimport baseSet from './_baseSet.js';\nimport castPath from './_castPath.js';\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nexport default basePickBy;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport basePickBy from './_basePickBy.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nexport default pickBy;\n", "import baseIteratee from './_baseIteratee.js';\nimport negate from './negate.js';\nimport pickBy from './pickBy.js';\n\n/**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\nfunction omitBy(object, predicate) {\n return pickBy(object, negate(baseIteratee(predicate)));\n}\n\nexport default omitBy;\n", "import before from './before.js';\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nexport default once;\n", "/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nexport default baseSortBy;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nexport default compareAscending;\n", "import compareAscending from './_compareAscending.js';\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nexport default compareMultiple;\n", "import arrayMap from './_arrayMap.js';\nimport baseGet from './_baseGet.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport baseSortBy from './_baseSortBy.js';\nimport baseUnary from './_baseUnary.js';\nimport compareMultiple from './_compareMultiple.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nexport default baseOrderBy;\n", "import baseOrderBy from './_baseOrderBy.js';\nimport isArray from './isArray.js';\n\n/**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\nfunction orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n}\n\nexport default orderBy;\n", "import apply from './_apply.js';\nimport arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport baseUnary from './_baseUnary.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\nfunction createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n}\n\nexport default createOver;\n", "import arrayMap from './_arrayMap.js';\nimport createOver from './_createOver.js';\n\n/**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\nvar over = createOver(arrayMap);\n\nexport default over;\n", "import baseRest from './_baseRest.js';\n\n/**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nvar castRest = baseRest;\n\nexport default castRest;\n", "import apply from './_apply.js';\nimport arrayMap from './_arrayMap.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseRest from './_baseRest.js';\nimport baseUnary from './_baseUnary.js';\nimport castRest from './_castRest.js';\nimport isArray from './isArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\nvar overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(baseIteratee))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(baseIteratee));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n});\n\nexport default overArgs;\n", "import arrayEvery from './_arrayEvery.js';\nimport createOver from './_createOver.js';\n\n/**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\nvar overEvery = createOver(arrayEvery);\n\nexport default overEvery;\n", "import arraySome from './_arraySome.js';\nimport createOver from './_createOver.js';\n\n/**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n *\n * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n */\nvar overSome = createOver(arraySome);\n\nexport default overSome;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor;\n\n/**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\nfunction baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n}\n\nexport default baseRepeat;\n", "import baseProperty from './_baseProperty.js';\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nexport default asciiSize;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n}\n\nexport default unicodeSize;\n", "import asciiSize from './_asciiSize.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeSize from './_unicodeSize.js';\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n}\n\nexport default stringSize;\n", "import baseRepeat from './_baseRepeat.js';\nimport baseToString from './_baseToString.js';\nimport castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport stringSize from './_stringSize.js';\nimport stringToArray from './_stringToArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil;\n\n/**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\nfunction createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n}\n\nexport default createPadding;\n", "import createPadding from './_createPadding.js';\nimport stringSize from './_stringSize.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeFloor = Math.floor;\n\n/**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\nfunction pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n}\n\nexport default pad;\n", "import createPadding from './_createPadding.js';\nimport stringSize from './_stringSize.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\nfunction padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n}\n\nexport default padEnd;\n", "import createPadding from './_createPadding.js';\nimport stringSize from './_stringSize.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\nfunction padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n}\n\nexport default padStart;\n", "import root from './_root.js';\nimport toString from './toString.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeParseInt = root.parseInt;\n\n/**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\nfunction parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n}\n\nexport default parseInt;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_PARTIAL_FLAG = 32;\n\n/**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\nvar partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n});\n\n// Assign default placeholders.\npartial.placeholder = {};\n\nexport default partial;\n", "import baseRest from './_baseRest.js';\nimport createWrap from './_createWrap.js';\nimport getHolder from './_getHolder.js';\nimport replaceHolders from './_replaceHolders.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\nvar partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n});\n\n// Assign default placeholders.\npartialRight.placeholder = {};\n\nexport default partialRight;\n", "import createAggregator from './_createAggregator.js';\n\n/**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\nvar partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n}, function() { return [[], []]; });\n\nexport default partition;\n", "import basePickBy from './_basePickBy.js';\nimport hasIn from './hasIn.js';\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nexport default basePick;\n", "import basePick from './_basePick.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nexport default pick;\n", "import baseLodash from './_baseLodash.js';\nimport wrapperClone from './_wrapperClone.js';\n\n/**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\nfunction wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n}\n\nexport default wrapperPlant;\n", "import baseGet from './_baseGet.js';\n\n/**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\nfunction propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n}\n\nexport default propertyOf;\n", "/**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseIndexOfWith;\n", "import arrayMap from './_arrayMap.js';\nimport baseIndexOf from './_baseIndexOf.js';\nimport baseIndexOfWith from './_baseIndexOfWith.js';\nimport baseUnary from './_baseUnary.js';\nimport copyArray from './_copyArray.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n}\n\nexport default basePullAll;\n", "import basePullAll from './_basePullAll.js';\n\n/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\nfunction pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n}\n\nexport default pullAll;\n", "import baseRest from './_baseRest.js';\nimport pullAll from './pullAll.js';\n\n/**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\nvar pull = baseRest(pullAll);\n\nexport default pull;\n", "import baseIteratee from './_baseIteratee.js';\nimport basePullAll from './_basePullAll.js';\n\n/**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\nfunction pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, baseIteratee(iteratee, 2))\n : array;\n}\n\nexport default pullAllBy;\n", "import basePullAll from './_basePullAll.js';\n\n/**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\nfunction pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n}\n\nexport default pullAllWith;\n", "import baseUnset from './_baseUnset.js';\nimport isIndex from './_isIndex.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n}\n\nexport default basePullAt;\n", "import arrayMap from './_arrayMap.js';\nimport baseAt from './_baseAt.js';\nimport basePullAt from './_basePullAt.js';\nimport compareAscending from './_compareAscending.js';\nimport flatRest from './_flatRest.js';\nimport isIndex from './_isIndex.js';\n\n/**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\nvar pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n});\n\nexport default pullAt;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor,\n nativeRandom = Math.random;\n\n/**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\nfunction baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n}\n\nexport default baseRandom;\n", "import baseRandom from './_baseRandom.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toFinite from './toFinite.js';\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseFloat = parseFloat;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min,\n nativeRandom = Math.random;\n\n/**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\nfunction random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n}\n\nexport default random;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nexport default baseRange;\n", "import baseRange from './_baseRange.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toFinite from './toFinite.js';\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nexport default createRange;\n", "import createRange from './_createRange.js';\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nexport default range;\n", "import createRange from './_createRange.js';\n\n/**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\nvar rangeRight = createRange(true);\n\nexport default rangeRight;\n", "import createWrap from './_createWrap.js';\nimport flatRest from './_flatRest.js';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\nvar rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n});\n\nexport default rearg;\n", "/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\n\nexport default baseReduce;\n", "import arrayReduce from './_arrayReduce.js';\nimport baseEach from './_baseEach.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseReduce from './_baseReduce.js';\nimport isArray from './isArray.js';\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nexport default reduce;\n", "/**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n}\n\nexport default arrayReduceRight;\n", "import arrayReduceRight from './_arrayReduceRight.js';\nimport baseEachRight from './_baseEachRight.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseReduce from './_baseReduce.js';\nimport isArray from './isArray.js';\n\n/**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\nfunction reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n}\n\nexport default reduceRight;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport negate from './negate.js';\n\n/**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\nfunction reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(baseIteratee(predicate, 3)));\n}\n\nexport default reject;\n", "import baseIteratee from './_baseIteratee.js';\nimport basePullAt from './_basePullAt.js';\n\n/**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\nfunction remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = baseIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n}\n\nexport default remove;\n", "import baseRepeat from './_baseRepeat.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\nfunction repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n}\n\nexport default repeat;\n", "import toString from './toString.js';\n\n/**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\nfunction replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n}\n\nexport default replace;\n", "import baseRest from './_baseRest.js';\nimport toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n}\n\nexport default rest;\n", "import castPath from './_castPath.js';\nimport isFunction from './isFunction.js';\nimport toKey from './_toKey.js';\n\n/**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\nfunction result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n}\n\nexport default result;\n", "/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeReverse = arrayProto.reverse;\n\n/**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\nfunction reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n}\n\nexport default reverse;\n", "import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\nvar round = createRound('round');\n\nexport default round;\n", "import baseRandom from './_baseRandom.js';\n\n/**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\nfunction arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n}\n\nexport default arraySample;\n", "import arraySample from './_arraySample.js';\nimport values from './values.js';\n\n/**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\nfunction baseSample(collection) {\n return arraySample(values(collection));\n}\n\nexport default baseSample;\n", "import arraySample from './_arraySample.js';\nimport baseSample from './_baseSample.js';\nimport isArray from './isArray.js';\n\n/**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\nfunction sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n}\n\nexport default sample;\n", "import baseRandom from './_baseRandom.js';\n\n/**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\nfunction shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n}\n\nexport default shuffleSelf;\n", "import baseClamp from './_baseClamp.js';\nimport copyArray from './_copyArray.js';\nimport shuffleSelf from './_shuffleSelf.js';\n\n/**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\nfunction arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n}\n\nexport default arraySampleSize;\n", "import baseClamp from './_baseClamp.js';\nimport shuffleSelf from './_shuffleSelf.js';\nimport values from './values.js';\n\n/**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\nfunction baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n}\n\nexport default baseSampleSize;\n", "import arraySampleSize from './_arraySampleSize.js';\nimport baseSampleSize from './_baseSampleSize.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\nfunction sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n}\n\nexport default sampleSize;\n", "import baseSet from './_baseSet.js';\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;\n", "import baseSet from './_baseSet.js';\n\n/**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\nfunction setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n}\n\nexport default setWith;\n", "import copyArray from './_copyArray.js';\nimport shuffleSelf from './_shuffleSelf.js';\n\n/**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\nfunction arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n}\n\nexport default arrayShuffle;\n", "import shuffleSelf from './_shuffleSelf.js';\nimport values from './values.js';\n\n/**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\nfunction baseShuffle(collection) {\n return shuffleSelf(values(collection));\n}\n\nexport default baseShuffle;\n", "import arrayShuffle from './_arrayShuffle.js';\nimport baseShuffle from './_baseShuffle.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\nfunction shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n}\n\nexport default shuffle;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport stringSize from './_stringSize.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n}\n\nexport default size;\n", "import baseSlice from './_baseSlice.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n}\n\nexport default slice;\n", "import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\nvar snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n});\n\nexport default snakeCase;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nexport default baseSome;\n", "import arraySome from './_arraySome.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseSome from './_baseSome.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default some;\n", "import baseFlatten from './_baseFlatten.js';\nimport baseOrderBy from './_baseOrderBy.js';\nimport baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nexport default sortBy;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeFloor = Math.floor,\n nativeMin = Math.min;\n\n/**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\nfunction baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n}\n\nexport default baseSortedIndexBy;\n", "import baseSortedIndexBy from './_baseSortedIndexBy.js';\nimport identity from './identity.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n/**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\nfunction baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n}\n\nexport default baseSortedIndex;\n", "import baseSortedIndex from './_baseSortedIndex.js';\n\n/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\nfunction sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n}\n\nexport default sortedIndex;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSortedIndexBy from './_baseSortedIndexBy.js';\n\n/**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\nfunction sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));\n}\n\nexport default sortedIndexBy;\n", "import baseSortedIndex from './_baseSortedIndex.js';\nimport eq from './eq.js';\n\n/**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\nfunction sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default sortedIndexOf;\n", "import baseSortedIndex from './_baseSortedIndex.js';\n\n/**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\nfunction sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n}\n\nexport default sortedLastIndex;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSortedIndexBy from './_baseSortedIndexBy.js';\n\n/**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\nfunction sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2), true);\n}\n\nexport default sortedLastIndexBy;\n", "import baseSortedIndex from './_baseSortedIndex.js';\nimport eq from './eq.js';\n\n/**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\nfunction sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default sortedLastIndexOf;\n", "import eq from './eq.js';\n\n/**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n}\n\nexport default baseSortedUniq;\n", "import baseSortedUniq from './_baseSortedUniq.js';\n\n/**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\nfunction sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n}\n\nexport default sortedUniq;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSortedUniq from './_baseSortedUniq.js';\n\n/**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\nfunction sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, baseIteratee(iteratee, 2))\n : [];\n}\n\nexport default sortedUniqBy;\n", "import baseToString from './_baseToString.js';\nimport castSlice from './_castSlice.js';\nimport hasUnicode from './_hasUnicode.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport isRegExp from './isRegExp.js';\nimport stringToArray from './_stringToArray.js';\nimport toString from './toString.js';\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\nfunction split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n}\n\nexport default split;\n", "import apply from './_apply.js';\nimport arrayPush from './_arrayPush.js';\nimport baseRest from './_baseRest.js';\nimport castSlice from './_castSlice.js';\nimport toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\nfunction spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n}\n\nexport default spread;\n", "import createCompounder from './_createCompounder.js';\nimport upperFirst from './upperFirst.js';\n\n/**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\nvar startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n});\n\nexport default startCase;\n", "import baseClamp from './_baseClamp.js';\nimport baseToString from './_baseToString.js';\nimport toInteger from './toInteger.js';\nimport toString from './toString.js';\n\n/**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\nfunction startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n}\n\nexport default startsWith;\n", "/**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\nfunction stubObject() {\n return {};\n}\n\nexport default stubObject;\n", "/**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\nfunction stubString() {\n return '';\n}\n\nexport default stubString;\n", "/**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\nfunction stubTrue() {\n return true;\n}\n\nexport default stubTrue;\n", "import createMathOperation from './_createMathOperation.js';\n\n/**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\nvar subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n}, 0);\n\nexport default subtract;\n", "import baseSum from './_baseSum.js';\nimport identity from './identity.js';\n\n/**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\nfunction sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n}\n\nexport default sum;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseSum from './_baseSum.js';\n\n/**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\nfunction sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, baseIteratee(iteratee, 2))\n : 0;\n}\n\nexport default sumBy;\n", "import baseSlice from './_baseSlice.js';\n\n/**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\nfunction tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n}\n\nexport default tail;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\nfunction take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nexport default take;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\nfunction takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nexport default takeRight;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\nfunction takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3), false, true)\n : [];\n}\n\nexport default takeRightWhile;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseWhile from './_baseWhile.js';\n\n/**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\nfunction takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, baseIteratee(predicate, 3))\n : [];\n}\n\nexport default takeWhile;\n", "/**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\nfunction tap(value, interceptor) {\n interceptor(value);\n return value;\n}\n\nexport default tap;\n", "import eq from './eq.js';\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 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\nfunction customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n}\n\nexport default customDefaultsAssignIn;\n", "/** Used to escape characters for inclusion in compiled string literals. */\nvar stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\n/**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\nfunction escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n}\n\nexport default escapeStringChar;\n", "/** Used to match template delimiters. */\nvar reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\nexport default reInterpolate;\n", "/** Used to match template delimiters. */\nvar reEscape = /<%-([\\s\\S]+?)%>/g;\n\nexport default reEscape;\n", "/** Used to match template delimiters. */\nvar reEvaluate = /<%([\\s\\S]+?)%>/g;\n\nexport default reEvaluate;\n", "import escape from './escape.js';\nimport reEscape from './_reEscape.js';\nimport reEvaluate from './_reEvaluate.js';\nimport reInterpolate from './_reInterpolate.js';\n\n/**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\nvar templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': { 'escape': escape }\n }\n};\n\nexport default templateSettings;\n", "import assignInWith from './assignInWith.js';\nimport attempt from './attempt.js';\nimport baseValues from './_baseValues.js';\nimport customDefaultsAssignIn from './_customDefaultsAssignIn.js';\nimport escapeStringChar from './_escapeStringChar.js';\nimport isError from './isError.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keys from './keys.js';\nimport reInterpolate from './_reInterpolate.js';\nimport templateSettings from './templateSettings.js';\nimport toString from './toString.js';\n\n/** Error message constants. */\nvar INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n/** Used to match empty string literals in compiled template source. */\nvar reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n/**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\nvar reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n/**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\nvar reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n/** Used to ensure capturing order of template delimiters. */\nvar reNoMatch = /($^)/;\n\n/** Used to match unescaped characters in compiled string literals. */\nvar reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\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 a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '\n", "import { NOOP } from '../functions'\n\nimport type { App, Directive } from 'vue'\nimport type { SFCInstallWithContext, SFCWithInstall } from './typescript'\n\nexport const withInstall = >(\n main: T,\n extra?: E\n) => {\n ;(main as SFCWithInstall).install = (app): void => {\n for (const comp of [main, ...Object.values(extra ?? {})]) {\n app.component(comp.name, comp)\n }\n }\n\n if (extra) {\n for (const [key, comp] of Object.entries(extra)) {\n ;(main as any)[key] = comp\n }\n }\n return main as SFCWithInstall & E\n}\n\nexport const withInstallFunction = (fn: T, name: string) => {\n ;(fn as SFCWithInstall).install = (app: App) => {\n ;(fn as SFCInstallWithContext)._context = app._context\n app.config.globalProperties[name] = fn\n }\n\n return fn as SFCInstallWithContext\n}\n\nexport const withInstallDirective = (\n directive: T,\n name: string\n) => {\n ;(directive as SFCWithInstall).install = (app: App): void => {\n app.directive(name, directive)\n }\n\n return directive as SFCWithInstall\n}\n\nexport const withNoopInstall = (component: T) => {\n ;(component as SFCWithInstall).install = NOOP\n\n return component as SFCWithInstall\n}\n", "import { withInstall } from '@element-plus/utils'\nimport Teleport from './src/teleport.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElTeleport: SFCWithInstall = withInstall(Teleport)\n\nexport default ElTeleport\n\nexport * from './src/teleport'\n", "export const UPDATE_MODEL_EVENT = 'update:modelValue'\nexport const CHANGE_EVENT = 'change'\nexport const INPUT_EVENT = 'input'\n", "import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { teleportProps } from '@element-plus/components/teleport'\n\nimport type {\n CSSProperties,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n /**\n * @description whether affix element is teleported, if `true` it will be teleported to where `append-to` sets\n * */\n teleported: Boolean,\n /**\n * @description which element the affix element appends to\n * */\n appendTo: {\n type: teleportProps.to.type,\n default: 'body',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes\nexport type AffixPropsPublic = ExtractPublicPropTypes\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType & unknown\n", "export function easeInOutCubic(t: number, b: number, c: number, d: number) {\n const cc = c - b\n t /= d / 2\n if (t < 1) {\n return (cc / 2) * t * t * t + b\n }\n return (cc / 2) * ((t -= 2) * t * t + 2) + b\n}\n", "import { isClient } from './browser'\n\nexport const rAF = (fn: () => void) =>\n isClient\n ? window.requestAnimationFrame(fn)\n : (setTimeout(fn, 16) as unknown as number)\n\nexport const cAF = (handle: number) =>\n isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle)\n", "import { isNumber, isObject, isString, isStringNumber } from '../types'\nimport { isClient } from '../browser'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\n\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = (element.style as any)[key]\n if (style) return style\n const computed: any = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[key] : ''\n } catch {\n return (element.style as any)[key]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key: any = camelize(styleName)\n element.style[key] = value as any\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value && value !== 0) return ''\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`\n } else if (isString(value)) {\n return value\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n", "import { isClient } from '../browser'\nimport { easeInOutCubic } from '../easings'\nimport { isFunction, isWindow } from '../types'\nimport { cAF, rAF } from '../raf'\nimport { getStyle } from './style'\n\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\n if (!isClient) return false\n\n const key = (\n {\n undefined: 'overflow',\n true: 'overflow-y',\n false: 'overflow-x',\n } as const\n )[String(isVertical)]!\n const overflow = getStyle(el, key)\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\n}\n\nexport const getScrollContainer = (\n el: HTMLElement,\n isVertical?: boolean\n): Window | HTMLElement | undefined => {\n if (!isClient) return\n\n let parent: HTMLElement = el\n while (parent) {\n if ([window, document, document.documentElement].includes(parent))\n return window\n\n if (isScroll(parent, isVertical)) return parent\n\n parent = parent.parentNode as HTMLElement\n }\n\n return parent\n}\n\nlet scrollBarWidth: number\nexport const getScrollBarWidth = (namespace: string): number => {\n if (!isClient) return 0\n if (scrollBarWidth !== undefined) return scrollBarWidth\n\n const outer = document.createElement('div')\n outer.className = `${namespace}-scrollbar__wrap`\n outer.style.visibility = 'hidden'\n outer.style.width = '100px'\n outer.style.position = 'absolute'\n outer.style.top = '-9999px'\n document.body.appendChild(outer)\n\n const widthNoScroll = outer.offsetWidth\n outer.style.overflow = 'scroll'\n\n const inner = document.createElement('div')\n inner.style.width = '100%'\n outer.appendChild(inner)\n\n const widthWithScroll = inner.offsetWidth\n outer.parentNode?.removeChild(outer)\n scrollBarWidth = widthNoScroll - widthWithScroll\n\n return scrollBarWidth\n}\n\n/**\n * Scroll with in the container element, positioning the **selected** element at the top\n * of the container\n */\nexport function scrollIntoView(\n container: HTMLElement,\n selected: HTMLElement\n): void {\n if (!isClient) return\n\n if (!selected) {\n container.scrollTop = 0\n return\n }\n\n const offsetParents: HTMLElement[] = []\n let pointer = selected.offsetParent\n while (\n pointer !== null &&\n container !== pointer &&\n container.contains(pointer)\n ) {\n offsetParents.push(pointer as HTMLElement)\n pointer = (pointer as HTMLElement).offsetParent\n }\n const top =\n selected.offsetTop +\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\n const bottom = top + selected.offsetHeight\n const viewRectTop = container.scrollTop\n const viewRectBottom = viewRectTop + container.clientHeight\n\n if (top < viewRectTop) {\n container.scrollTop = top\n } else if (bottom > viewRectBottom) {\n container.scrollTop = bottom - container.clientHeight\n }\n}\n\nexport function animateScrollTo(\n container: HTMLElement | Window,\n from: number,\n to: number,\n duration: number,\n callback?: unknown\n) {\n const startTime = Date.now()\n\n let handle: number | undefined\n const scroll = () => {\n const timestamp = Date.now()\n const time = timestamp - startTime\n const nextScrollTop = easeInOutCubic(\n time > duration ? duration : time,\n from,\n to,\n duration\n )\n\n if (isWindow(container)) {\n container.scrollTo(window.pageXOffset, nextScrollTop)\n } else {\n container.scrollTop = nextScrollTop\n }\n if (time < duration) {\n handle = rAF(scroll)\n } else if (isFunction(callback)) {\n callback()\n }\n }\n\n scroll()\n\n return () => {\n handle && cAF(handle)\n }\n}\n\nexport const getScrollElement = (\n target: HTMLElement,\n container: HTMLElement | Window\n) => {\n if (isWindow(container)) {\n return target.ownerDocument.documentElement\n }\n return container\n}\n\nexport const getScrollTop = (container: HTMLElement | Window) => {\n if (isWindow(container)) {\n return window.scrollY\n }\n return container.scrollTop\n}\n", "\n \n \n \n \n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Affix from './src/affix.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElAffix: SFCWithInstall = withInstall(Affix)\nexport default ElAffix\n\nexport * from './src/affix'\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Icon from './icon.vue'\n\nexport const iconProps = buildProps({\n /**\n * @description SVG icon size, size x size\n */\n size: {\n type: definePropType([Number, String]),\n },\n /**\n * @description SVG tag's fill attribute\n */\n color: {\n type: String,\n },\n} as const)\nexport type IconProps = ExtractPropTypes\nexport type IconPropsPublic = ExtractPublicPropTypes\nexport type IconInstance = InstanceType & unknown\n", "\n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Icon from './src/icon.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElIcon: SFCWithInstall = withInstall(Icon)\nexport default ElIcon\n\nexport * from './src/icon'\n", "import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n primary: InfoFilled,\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n\n// All icon components have the same type, so we can pick any one of them to get the type\nexport type IconComponent = typeof Loading\n", "import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of appearance, in millisecond, not valid in controlled mode\n */\n showAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of disappear, in millisecond, not valid in controlled mode\n */\n hideAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description disappear automatically, in millisecond, not valid in controlled mode\n */\n autoClose: Number,\n} as const)\nexport type AlertProps = ExtractPropTypes\nexport type AlertPropsPublic = ExtractPublicPropTypes\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n", "import {\n Comment,\n Fragment,\n Text,\n createBlock,\n createCommentVNode,\n isVNode,\n openBlock,\n} from 'vue'\nimport { camelize } from '../strings'\nimport { isArray } from '../types'\nimport { hasOwn } from '../objects'\nimport { debugWarn } from '../error'\n\nimport type { VNode, VNodeChild, VNodeNormalizedChildren } from 'vue'\n\nconst SCOPE = 'utils/vue/vnode'\n\nexport enum PatchFlags {\n TEXT = 1,\n CLASS = 2,\n STYLE = 4,\n PROPS = 8,\n FULL_PROPS = 16,\n HYDRATE_EVENTS = 32,\n STABLE_FRAGMENT = 64,\n KEYED_FRAGMENT = 128,\n UNKEYED_FRAGMENT = 256,\n NEED_PATCH = 512,\n DYNAMIC_SLOTS = 1024,\n HOISTED = -1,\n BAIL = -2,\n}\n\nexport type VNodeChildAtom = Exclude>\nexport type RawSlots = Exclude<\n VNodeNormalizedChildren,\n Array | null | string\n>\n\nexport function isFragment(node: VNode): boolean\nexport function isFragment(node: unknown): node is VNode\nexport function isFragment(node: unknown): node is VNode {\n return isVNode(node) && node.type === Fragment\n}\n\nexport function isText(node: VNode): boolean\nexport function isText(node: unknown): node is VNode\nexport function isText(node: unknown): node is VNode {\n return isVNode(node) && node.type === Text\n}\n\nexport function isComment(node: VNode): boolean\nexport function isComment(node: unknown): node is VNode\nexport function isComment(node: unknown): node is VNode {\n return isVNode(node) && node.type === Comment\n}\n\nconst TEMPLATE = 'template'\nexport function isTemplate(node: VNode): boolean\nexport function isTemplate(node: unknown): node is VNode\nexport function isTemplate(node: unknown): node is VNode {\n return isVNode(node) && node.type === TEMPLATE\n}\n\n/**\n * determine if the element is a valid element type rather than fragments and comment e.g. v-if\n * @param node {VNode} node to be tested\n */\nexport function isValidElementNode(node: VNode): boolean\nexport function isValidElementNode(node: unknown): node is VNode\nexport function isValidElementNode(node: unknown): node is VNode {\n return isVNode(node) && !isFragment(node) && !isComment(node)\n}\n\n/**\n * get a valid child node (not fragment nor comment)\n * @param node {VNode} node to be searched\n * @param depth {number} depth to be searched\n */\nfunction getChildren(\n node: VNodeNormalizedChildren | VNodeChild,\n depth: number\n): VNodeNormalizedChildren | VNodeChild {\n if (isComment(node)) return\n if (isFragment(node) || isTemplate(node)) {\n return depth > 0 ? getFirstValidNode(node.children, depth - 1) : undefined\n }\n return node\n}\n\nexport const getFirstValidNode = (\n nodes: VNodeNormalizedChildren,\n maxDepth = 3\n) => {\n if (isArray(nodes)) {\n return getChildren(nodes[0], maxDepth)\n } else {\n return getChildren(nodes, maxDepth)\n }\n}\n\nexport function renderIf(\n condition: boolean,\n ...args: Parameters\n) {\n return condition ? renderBlock(...args) : createCommentVNode('v-if', true)\n}\n\nexport function renderBlock(...args: Parameters) {\n return (openBlock(), createBlock(...args))\n}\n\nexport const getNormalizedProps = (node: VNode) => {\n if (!isVNode(node)) {\n debugWarn(SCOPE, '[getNormalizedProps] must be a VNode')\n return {}\n }\n\n const raw = node.props || {}\n const type = (isVNode(node.type) ? node.type.props : undefined) || {}\n const props: Record = {}\n\n Object.keys(type).forEach((key) => {\n if (hasOwn(type[key], 'default')) {\n props[key] = type[key].default\n }\n })\n\n Object.keys(raw).forEach((key) => {\n props[camelize(key)] = raw[key]\n })\n\n return props\n}\n\nexport type FlattenVNodes = Array\n\nexport const flattedChildren = (\n children: FlattenVNodes | VNode | VNodeNormalizedChildren\n): FlattenVNodes => {\n const vNodes = isArray(children) ? children : [children]\n const result: FlattenVNodes = []\n\n vNodes.forEach((child) => {\n if (isArray(child)) {\n result.push(...flattedChildren(child))\n } else if (isVNode(child) && child.component?.subTree) {\n result.push(child, ...flattedChildren(child.component.subTree))\n } else if (isVNode(child) && isArray(child.children)) {\n result.push(...flattedChildren(child.children))\n } else if (isVNode(child) && child.shapeFlag === 2) {\n // @ts-ignore\n result.push(...flattedChildren(child.type()))\n } else {\n result.push(child)\n }\n })\n return result\n}\n", "\n \n \n \n \n \n \n \n\n \n \n {{ title }}\n \n \n \n {{ description }}\n \n \n \n \n {{ closeText }}\n \n \n \n \n \n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Alert from './src/alert.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElAlert: SFCWithInstall = withInstall(Alert)\nexport default ElAlert\n\nexport * from './src/alert'\nexport type { AlertInstance } from './src/instance'\n", "import { isClient, isIOS } from '@vueuse/core'\n\nexport const isFirefox = (): boolean =>\n isClient && /firefox/i.test(window.navigator.userAgent)\n\nexport const isAndroid = (): boolean =>\n isClient && /android/i.test(window.navigator.userAgent)\n\nexport { isClient, isIOS }\n", "import { isFirefox, isNumber } from '@element-plus/utils'\n\nlet hiddenTextarea: HTMLTextAreaElement | undefined = undefined\n\nconst HIDDEN_STYLE = {\n height: '0',\n visibility: 'hidden',\n overflow: isFirefox() ? '' : 'hidden',\n position: 'absolute',\n 'z-index': '-1000',\n top: '0',\n right: '0',\n}\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 'word-break',\n]\n\ntype NodeStyle = {\n contextStyle: string[][]\n boxSizing: string\n paddingSize: number\n borderSize: number\n}\n\ntype TextAreaHeight = {\n height: string\n minHeight?: string\n}\n\nexport const looseToNumber = (val: any): any => {\n const n = Number.parseFloat(val)\n return Number.isNaN(n) ? val : n\n}\n\nfunction calculateNodeStyling(targetElement: Element): NodeStyle {\n const style = window.getComputedStyle(targetElement)\n\n const boxSizing = style.getPropertyValue('box-sizing')\n\n const paddingSize =\n Number.parseFloat(style.getPropertyValue('padding-bottom')) +\n Number.parseFloat(style.getPropertyValue('padding-top'))\n\n const borderSize =\n Number.parseFloat(style.getPropertyValue('border-bottom-width')) +\n Number.parseFloat(style.getPropertyValue('border-top-width'))\n\n const contextStyle = CONTEXT_STYLE.map((name) => [\n name,\n style.getPropertyValue(name),\n ])\n\n return { contextStyle, paddingSize, borderSize, boxSizing }\n}\n\nexport function calcTextareaHeight(\n targetElement: HTMLTextAreaElement,\n minRows = 1,\n maxRows?: number\n): TextAreaHeight {\n if (!hiddenTextarea) {\n hiddenTextarea = document.createElement('textarea')\n ;(targetElement.parentNode ?? document.body).appendChild(hiddenTextarea)\n }\n\n const { paddingSize, borderSize, boxSizing, contextStyle } =\n calculateNodeStyling(targetElement)\n\n contextStyle.forEach(([key, value]) =>\n hiddenTextarea?.style.setProperty(key, value)\n )\n\n Object.entries(HIDDEN_STYLE).forEach(([key, value]) =>\n hiddenTextarea?.style.setProperty(key, value, 'important')\n )\n\n hiddenTextarea.value = targetElement.value || targetElement.placeholder || ''\n\n let height = hiddenTextarea.scrollHeight\n const result = {} as TextAreaHeight\n\n if (boxSizing === 'border-box') {\n height = height + borderSize\n } else if (boxSizing === 'content-box') {\n height = height - paddingSize\n }\n\n hiddenTextarea.value = ''\n const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize\n\n if (isNumber(minRows)) {\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 (isNumber(maxRows)) {\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 hiddenTextarea.parentNode?.removeChild(hiddenTextarea)\n hiddenTextarea = undefined\n\n return result\n}\n", "export const mutable = >(\n val: T\n) => val as Mutable\nexport type Mutable = { -readonly [P in keyof T]: T[P] }\n\nexport type HTMLElementCustomized = HTMLElement & T\n\n/**\n * @deprecated stop to use null\n * @see {@link https://github.com/sindresorhus/meta/discussions/7}\n */\nexport type Nullable = T | null\n\nexport type Arrayable = T | T[]\nexport type Awaitable = Promise | T\n\ntype Primitive = null | undefined | string | number | boolean | symbol | bigint\ntype BrowserNativeObject = Date | FileList | File | Blob | RegExp\n\n/**\n * Check whether it is tuple\n *\n * 检查是否为元组\n *\n * @example\n * IsTuple<[1, 2, 3]> => true\n * IsTuple => false\n */\ntype IsTuple> = number extends T['length']\n ? false\n : true\n\n/**\n * Array method key\n *\n * 数组方法键\n */\ntype ArrayMethodKey = keyof any[]\n\n/**\n * Tuple index key\n *\n * 元组下标键\n *\n * @example\n * TupleKey<[1, 2, 3]> => '0' | '1' | '2'\n */\ntype TupleKey> = Exclude\n\n/**\n * Array index key\n *\n * 数组下标键\n */\ntype ArrayKey = number\n\n/**\n * Helper type for recursively constructing paths through a type\n *\n * 用于通过一个类型递归构建路径的辅助类型\n */\ntype PathImpl = V extends\n | Primitive\n | BrowserNativeObject\n ? `${K}`\n : `${K}` | `${K}.${Path}`\n\n/**\n * Type which collects all paths through a type\n *\n * 通过一个类型收集所有路径的类型\n *\n * @see {@link FieldPath}\n */\ntype Path =\n T extends ReadonlyArray\n ? IsTuple extends true\n ? {\n [K in TupleKey]-?: PathImpl, T[K]>\n }[TupleKey] // tuple\n : PathImpl // array\n : {\n [K in keyof T]-?: PathImpl, T[K]>\n }[keyof T] // object\n\n/**\n * Type which collects all paths through a type\n *\n * 通过一个类型收集所有路径的类型\n *\n * @example\n * FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[]; h: Date; i: FileList; j: File; k: Blob; l: RegExp }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value' | 'h' | 'i' | 'j' | 'k' | 'l'\n */\nexport type FieldPath = T extends object ? Path : never\n", "import { pick } from 'lodash-unified'\nimport { buildProps } from '@element-plus/utils'\n\nexport const ariaProps = buildProps({\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel: String,\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation: {\n type: String,\n values: ['horizontal', 'vertical', 'undefined'],\n },\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls: String,\n})\n\nexport const useAriaProps = (\n arias: Array\n) => {\n return pick(ariaProps, arias)\n}\n", "import {\n buildProps,\n definePropType,\n iconPropType,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { CircleClose } from '@element-plus/icons-vue'\n\nimport type {\n ExtractPropTypes,\n ExtractPublicPropTypes,\n HTMLAttributes,\n StyleValue,\n} from 'vue'\n\nexport type InputModelModifiers = {\n lazy?: boolean\n number?: boolean\n trim?: boolean\n}\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n// Some commonly used values for input type\nexport type InputType =\n | 'text'\n | 'textarea'\n | 'number'\n | 'password'\n | 'email'\n | 'search'\n | 'tel'\n | 'url'\n | (string & NonNullable)\n\nexport const inputProps = buildProps({\n /**\n * @description native input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to disable\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType([\n String,\n Number,\n Object,\n ]),\n default: '',\n },\n /**\n * @description v-model modifiers, reference [Vue modifiers](https://vuejs.org/guide/essentials/forms.html#modifiers)\n */\n modelModifiers: {\n type: definePropType(Object),\n default: () => ({}),\n },\n /**\n * @description same as `maxlength` in native input\n */\n maxlength: {\n type: [String, Number],\n },\n /**\n * @description same as `minlength` in native input\n */\n minlength: {\n type: [String, Number],\n },\n /**\n * @description type of input, see more in [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)\n */\n type: {\n type: definePropType(String),\n default: 'text',\n },\n /**\n * @description control the resizability\n */\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n /**\n * @description whether textarea has an adaptive height\n */\n autosize: {\n type: definePropType([Boolean, Object]),\n default: false,\n },\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: definePropType(String),\n default: 'off',\n },\n /**\n * @description format content\n */\n formatter: {\n type: Function,\n },\n /**\n * @description parse content\n */\n parser: {\n type: Function,\n },\n /**\n * @description placeholder\n */\n placeholder: {\n type: String,\n },\n /**\n * @description native input form\n */\n form: {\n type: String,\n },\n /**\n * @description native input readonly\n */\n readonly: Boolean,\n /**\n * @description whether to show clear button\n */\n clearable: Boolean,\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: iconPropType,\n default: CircleClose,\n },\n /**\n * @description toggleable password input\n */\n showPassword: Boolean,\n /**\n * @description word count\n */\n showWordLimit: Boolean,\n /**\n * @description word count position, valid when `show-word-limit` is true\n */\n wordLimitPosition: {\n type: String,\n values: ['inside', 'outside'],\n default: 'inside',\n },\n /**\n * @description suffix icon\n */\n suffixIcon: {\n type: iconPropType,\n },\n /**\n * @description prefix icon\n */\n prefixIcon: {\n type: iconPropType,\n },\n /**\n * @description container role, internal properties provided for use by the picker component\n */\n containerRole: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description input or textarea element style\n */\n inputStyle: {\n type: definePropType([Object, Array, String]),\n default: () => mutable({} as const),\n },\n /**\n * @description native input autofocus\n */\n autofocus: Boolean,\n rows: {\n type: Number,\n default: 2,\n },\n ...useAriaProps(['ariaLabel']),\n /**\n * @description native input mode for virtual keyboards\n */\n inputmode: {\n type: definePropType(String),\n default: undefined,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n} as const)\nexport type InputProps = ExtractPropTypes\nexport type InputPropsPublic = ExtractPublicPropTypes\n\nexport const inputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string, evt?: Event) =>\n isString(value) && (evt instanceof Event || evt === undefined),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n // NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent\n // relative bug report https://github.com/element-plus/element-plus/issues/6665\n keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,\n compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n}\nexport type InputEmits = typeof inputEmits\n", "import { computed, getCurrentInstance } from 'vue'\nimport { fromPairs } from 'lodash-unified'\nimport { debugWarn } from '@element-plus/utils'\n\nimport type { ComputedRef } from 'vue'\n\ninterface Params {\n excludeListeners?: boolean\n excludeKeys?: ComputedRef\n}\n\nconst DEFAULT_EXCLUDE_KEYS = ['class', 'style']\nconst LISTENER_PREFIX = /^on[A-Z]/\n\nexport const useAttrs = (\n params: Params = {}\n): ComputedRef> => {\n const { excludeListeners = false, excludeKeys } = params\n const allExcludeKeys = computed(() => {\n return (excludeKeys?.value || []).concat(DEFAULT_EXCLUDE_KEYS)\n })\n\n const instance = getCurrentInstance()\n if (!instance) {\n debugWarn(\n 'use-attrs',\n 'getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function'\n )\n return computed(() => ({}))\n }\n\n return computed(() =>\n fromPairs(\n Object.entries(instance.proxy?.$attrs!).filter(\n ([key]) =>\n !allExcludeKeys.value.includes(key) &&\n !(excludeListeners && LISTENER_PREFIX.test(key))\n )\n )\n )\n}\n", "import { getCurrentInstance, inject, unref } from 'vue'\nimport { computedEager } from '@vueuse/core'\nimport { debugWarn, isClient } from '@element-plus/utils'\nimport { useGetDerivedNamespace } from '../use-namespace'\n\nimport type { MaybeRef } from '@vueuse/core'\nimport type { InjectionKey, Ref } from 'vue'\n\nexport type ElIdInjectionContext = {\n prefix: number\n current: number\n}\n\nconst defaultIdInjection = {\n prefix: Math.floor(Math.random() * 10000),\n current: 0,\n}\n\nexport const ID_INJECTION_KEY: InjectionKey =\n Symbol('elIdInjection')\n\nexport const useIdInjection = (): ElIdInjectionContext => {\n return getCurrentInstance()\n ? inject(ID_INJECTION_KEY, defaultIdInjection)\n : defaultIdInjection\n}\n\nexport const useId = (deterministicId?: MaybeRef): Ref => {\n const idInjection = useIdInjection()\n if (!isClient && idInjection === defaultIdInjection) {\n debugWarn(\n 'IdInjection',\n `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed\nusage: app.provide(ID_INJECTION_KEY, {\n prefix: number,\n current: number,\n})`\n )\n }\n\n const namespace = useGetDerivedNamespace()\n\n // NOTE: Here we use `computedEager` to calculate the id value immediately, avoiding inconsistent id generation due to the lazy feature of `computed` when server rendering.\n const idRef = computedEager(\n () =>\n unref(deterministicId) ||\n `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`\n )\n\n return idRef\n}\n", "import type { InjectionKey } from 'vue'\nimport type { FormContext, FormItemContext } from './types'\n\nexport const formContextKey: InjectionKey =\n Symbol('formContextKey')\nexport const formItemContextKey: InjectionKey =\n Symbol('formItemContextKey')\n", "import {\n computed,\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n ref,\n toRef,\n watch,\n} from 'vue'\nimport { useId } from '@element-plus/hooks/use-id'\nimport { formContextKey, formItemContextKey } from '../constants'\n\nimport type { ComputedRef, Ref, WatchStopHandle } from 'vue'\nimport type { FormItemContext } from '../types'\n\nexport const useFormItem = () => {\n const form = inject(formContextKey, undefined)\n const formItem = inject(formItemContextKey, undefined)\n return {\n form,\n formItem,\n }\n}\n\nexport type IUseFormItemInputCommonProps = {\n id?: string\n label?: string | number | boolean | Record\n ariaLabel?: string | number | boolean | Record\n}\n\nexport const useFormItemInputId = (\n props: Partial,\n {\n formItemContext,\n disableIdGeneration,\n disableIdManagement,\n }: {\n formItemContext?: FormItemContext\n disableIdGeneration?: ComputedRef | Ref\n disableIdManagement?: ComputedRef | Ref\n }\n) => {\n if (!disableIdGeneration) {\n disableIdGeneration = ref(false)\n }\n if (!disableIdManagement) {\n disableIdManagement = ref(false)\n }\n\n const instance = getCurrentInstance()\n\n const inLabel = () => {\n let parent = instance?.parent\n while (parent) {\n if (parent.type.name === 'ElFormItem') {\n return false\n }\n if (parent.type.name === 'ElLabelWrap') {\n return true\n }\n parent = parent.parent\n }\n return false\n }\n\n const inputId = ref()\n let idUnwatch: WatchStopHandle | undefined = undefined\n\n const isLabeledByFormItem = computed(() => {\n return !!(\n !(props.label || props.ariaLabel) &&\n formItemContext &&\n formItemContext.inputIds &&\n formItemContext.inputIds?.length <= 1\n )\n })\n\n // Generate id for ElFormItem label if not provided as prop\n onMounted(() => {\n idUnwatch = watch(\n [toRef(props, 'id'), disableIdGeneration] as any,\n ([id, disableIdGeneration]: [string, boolean]) => {\n const newId = id ?? (!disableIdGeneration ? useId().value : undefined)\n if (newId !== inputId.value) {\n if (formItemContext?.removeInputId && !inLabel()) {\n inputId.value && formItemContext.removeInputId(inputId.value)\n if (!disableIdManagement?.value && !disableIdGeneration && newId) {\n formItemContext.addInputId(newId)\n }\n }\n inputId.value = newId\n }\n },\n { immediate: true }\n )\n })\n\n onUnmounted(() => {\n idUnwatch && idUnwatch()\n if (formItemContext?.removeInputId) {\n inputId.value && formItemContext.removeInputId(inputId.value)\n }\n })\n\n return {\n isLabeledByFormItem,\n inputId,\n }\n}\n", "import { computed, getCurrentInstance } from 'vue'\n\nimport type { ComputedRef } from 'vue'\n\nexport const useProp = (name: string): ComputedRef => {\n const vm = getCurrentInstance()\n return computed(() => (vm?.proxy?.$props as any)?.[name])\n}\n", "import { computed, inject, ref, unref } from 'vue'\nimport { useGlobalSize } from '@element-plus/hooks/use-size'\nimport { useProp } from '@element-plus/hooks/use-prop'\nimport { formContextKey, formItemContextKey } from '../constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { MaybeRef } from '@vueuse/core'\n\nexport const useFormSize = (\n fallback?: MaybeRef,\n ignore: Partial> = {}\n) => {\n const emptyRef = ref(undefined)\n\n const size = ignore.prop ? emptyRef : useProp('size')\n const globalConfig = ignore.global ? emptyRef : useGlobalSize()\n const form = ignore.form\n ? { size: undefined }\n : inject(formContextKey, undefined)\n const formItem = ignore.formItem\n ? { size: undefined }\n : inject(formItemContextKey, undefined)\n\n return computed(\n (): ComponentSize =>\n size.value ||\n unref(fallback) ||\n formItem?.size ||\n form?.size ||\n globalConfig.value ||\n ''\n )\n}\n\nexport const useFormDisabled = (fallback?: MaybeRef) => {\n const disabled = useProp('disabled')\n const form = inject(formContextKey, undefined)\n\n return computed(() => {\n return disabled.value ?? unref(fallback) ?? form?.disabled ?? false\n })\n}\n\n// These exports are used for preventing breaking changes\nexport const useSize = useFormSize\nexport const useDisabled = useFormDisabled\n", "const 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])`\n\nconst isHTMLElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\n/**\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\n */\nexport const isVisible = (element: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return true\n const computed = getComputedStyle(element)\n // element.offsetParent won't work on fix positioned\n // WARNING: potential issue here, going to need some expert advices on this issue\n return computed.position === 'fixed' ? false : element.offsetParent !== null\n}\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n return Array.from(\n element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\n}\n\n/**\n * @desc Determine if target element is focusable\n * @param element {HTMLElement}\n * @returns {Boolean} true if it is focusable\n */\nexport const isFocusable = (element: HTMLElement): boolean => {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n if (\n element.tabIndex < 0 ||\n element.hasAttribute('disabled') ||\n element.getAttribute('aria-disabled') === 'true'\n ) {\n return false\n }\n\n switch (element.nodeName) {\n case 'A': {\n // casting current element to Specific HTMLElement in order to be more type precise\n return (\n !!(element as HTMLAnchorElement).href &&\n (element as HTMLAnchorElement).rel !== 'ignore'\n )\n }\n case 'INPUT': {\n return !(\n (element as HTMLInputElement).type === 'hidden' ||\n (element as HTMLInputElement).type === 'file'\n )\n }\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA': {\n return true\n }\n default: {\n return false\n }\n }\n}\n\n/**\n * Trigger an event\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\n * @param {HTMLElement} elm\n * @param {String} name\n * @param {*} opts\n */\nexport const triggerEvent = function (\n elm: HTMLElement,\n name: string,\n ...opts: Array\n): HTMLElement {\n let eventName: string\n\n if (name.includes('mouse') || name.includes('click')) {\n eventName = 'MouseEvents'\n } else if (name.includes('key')) {\n eventName = 'KeyboardEvent'\n } else {\n eventName = 'HTMLEvents'\n }\n const evt = document.createEvent(eventName)\n\n evt.initEvent(name, ...opts)\n elm.dispatchEvent(evt)\n return elm\n}\n\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\n\nexport const getSibling = (\n el: HTMLElement,\n distance: number,\n elClass: string\n) => {\n const { parentNode } = el\n if (!parentNode) return null\n const siblings = parentNode.querySelectorAll(elClass)\n const index = Array.prototype.indexOf.call(siblings, el)\n return siblings[index + distance] || null\n}\n\nexport const focusElement = (\n el?: HTMLElement | { focus: () => void } | null,\n options?: FocusOptions\n) => {\n if (!el || !el.focus) return\n let cleanup: boolean = false\n\n if (isHTMLElement(el) && !isFocusable(el) && !el.getAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1')\n cleanup = true\n }\n\n el.focus(options)\n\n if (isHTMLElement(el) && cleanup) {\n el.removeAttribute('tabindex')\n }\n}\n\nexport const focusNode = (el: HTMLElement) => {\n if (!el) return\n focusElement(el)\n !isLeaf(el) && el.click()\n}\n", "import {\n getCurrentInstance,\n onMounted,\n ref,\n shallowRef,\n unref,\n watch,\n} from 'vue'\nimport { useEventListener } from '@vueuse/core'\nimport { isElement, isFocusable, isFunction } from '@element-plus/utils'\n\nimport type { ShallowRef } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\n\ninterface UseFocusControllerOptions {\n disabled?: MaybeRef\n /**\n * return true to cancel focus\n * @param event FocusEvent\n */\n beforeFocus?: (event: FocusEvent) => boolean | undefined\n afterFocus?: () => void\n /**\n * return true to cancel blur\n * @param event FocusEvent\n */\n beforeBlur?: (event: FocusEvent) => boolean | undefined\n afterBlur?: () => void\n}\n\nexport function useFocusController void }>(\n target: ShallowRef,\n {\n disabled,\n beforeFocus,\n afterFocus,\n beforeBlur,\n afterBlur,\n }: UseFocusControllerOptions = {}\n) {\n const instance = getCurrentInstance()!\n const { emit } = instance\n const wrapperRef = shallowRef()\n const isFocused = ref(false)\n\n const handleFocus = (event: FocusEvent) => {\n const cancelFocus = isFunction(beforeFocus) ? beforeFocus(event) : false\n if (unref(disabled) || isFocused.value || cancelFocus) return\n\n isFocused.value = true\n emit('focus', event)\n afterFocus?.()\n }\n\n const handleBlur = (event: FocusEvent) => {\n const cancelBlur = isFunction(beforeBlur) ? beforeBlur(event) : false\n if (\n unref(disabled) ||\n (event.relatedTarget &&\n wrapperRef.value?.contains(event.relatedTarget as Node)) ||\n cancelBlur\n )\n return\n\n isFocused.value = false\n emit('blur', event)\n afterBlur?.()\n }\n\n const handleClick = (event: Event) => {\n if (\n unref(disabled) ||\n isFocusable(event.target as HTMLElement) ||\n (wrapperRef.value?.contains(document.activeElement) &&\n wrapperRef.value !== document.activeElement)\n )\n return\n\n target.value?.focus()\n }\n\n watch([wrapperRef, () => unref(disabled)], ([el, disabled]) => {\n if (!el) return\n if (disabled) {\n el.removeAttribute('tabindex')\n } else {\n el.setAttribute('tabindex', '-1')\n }\n })\n\n useEventListener(wrapperRef, 'focus', handleFocus, true)\n useEventListener(wrapperRef, 'blur', handleBlur, true)\n useEventListener(wrapperRef, 'click', handleClick, true)\n\n // only for test\n if (process.env.NODE_ENV === 'test') {\n onMounted(() => {\n const targetEl = isElement(target.value)\n ? target.value\n : document.querySelector('input,textarea')\n\n if (targetEl) {\n useEventListener(targetEl, 'focus', handleFocus, true)\n useEventListener(targetEl, 'blur', handleBlur, true)\n }\n })\n }\n\n return {\n isFocused,\n /** Avoid using wrapperRef and handleFocus/handleBlur together */\n wrapperRef,\n handleFocus,\n handleBlur,\n }\n}\n", "export const isKorean = (text: string) =>\n /([\\uAC00-\\uD7AF\\u3130-\\u318F])+/gi.test(text)\n", "import { nextTick, ref } from 'vue'\nimport { isKorean } from '@element-plus/utils'\n\ninterface UseCompositionOptions {\n afterComposition: (event: CompositionEvent) => void\n emit?: ((event: 'compositionstart', evt: CompositionEvent) => void) &\n ((event: 'compositionupdate', evt: CompositionEvent) => void) &\n ((event: 'compositionend', evt: CompositionEvent) => void)\n}\n\nexport function useComposition({\n afterComposition,\n emit,\n}: UseCompositionOptions) {\n const isComposing = ref(false)\n\n const handleCompositionStart = (event: CompositionEvent) => {\n emit?.('compositionstart', event)\n isComposing.value = true\n }\n\n const handleCompositionUpdate = (event: CompositionEvent) => {\n emit?.('compositionupdate', event)\n const text = (event.target as HTMLInputElement)?.value\n const lastCharacter = text[text.length - 1] || ''\n isComposing.value = !isKorean(lastCharacter)\n }\n\n const handleCompositionEnd = (event: CompositionEvent) => {\n emit?.('compositionend', event)\n if (isComposing.value) {\n isComposing.value = false\n nextTick(() => afterComposition(event))\n }\n }\n\n const handleComposition = (event: CompositionEvent) => {\n event.type === 'compositionend'\n ? handleCompositionEnd(event)\n : handleCompositionUpdate(event)\n }\n\n return {\n isComposing,\n handleComposition,\n handleCompositionStart,\n handleCompositionUpdate,\n handleCompositionEnd,\n }\n}\n", "import type { ShallowRef } from 'vue'\n\ninterface SelectionInfo {\n selectionStart?: number\n selectionEnd?: number\n value?: string\n beforeTxt?: string\n afterTxt?: string\n}\n\n// Keep input cursor in the correct position when we use formatter.\nexport function useCursor(\n input: ShallowRef\n): [() => void, () => void] {\n let selectionInfo: SelectionInfo\n function recordCursor() {\n if (input.value == undefined) return\n\n const { selectionStart, selectionEnd, value } = input.value\n\n if (selectionStart == null || selectionEnd == null) return\n\n const beforeTxt = value.slice(0, Math.max(0, selectionStart))\n const afterTxt = value.slice(Math.max(0, selectionEnd))\n\n selectionInfo = {\n selectionStart,\n selectionEnd,\n value,\n beforeTxt,\n afterTxt,\n }\n }\n function setCursor() {\n if (input.value == undefined || selectionInfo == undefined) return\n\n const { value } = input.value\n const { beforeTxt, afterTxt, selectionStart } = selectionInfo\n\n if (\n beforeTxt == undefined ||\n afterTxt == undefined ||\n selectionStart == undefined\n )\n return\n\n let startPos = value.length\n\n if (value.endsWith(afterTxt)) {\n startPos = value.length - afterTxt.length\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length\n } else {\n const beforeLastChar = beforeTxt[selectionStart - 1]\n const newIndex = value.indexOf(beforeLastChar, selectionStart - 1)\n if (newIndex !== -1) {\n startPos = newIndex + 1\n }\n }\n\n input.value.setSelectionRange(startPos, startPos)\n }\n\n return [recordCursor, setCursor]\n}\n", "\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{ textLength }} / {{ maxlength }}\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n {{ textLength }} / {{ maxlength }}\n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Input from './src/input.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElInput: SFCWithInstall = withInstall(Input)\nexport default ElInput\n\nexport * from './src/input'\nexport type { InputInstance } from './src/instance'\n", "import type { CSSProperties } from 'vue'\nimport type { ThumbProps } from './thumb'\n\nexport const GAP = 4 // top 2 + bottom 2 of bar instance\n\nexport const 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} as const\n\nexport const renderThumbStyle = ({\n move,\n size,\n bar,\n}: Pick & {\n bar: (typeof BAR_MAP)[keyof typeof BAR_MAP]\n}): CSSProperties => ({\n [bar.size]: size,\n transform: `translate${bar.axis}(${move}%)`,\n})\n", "import type { InjectionKey } from 'vue'\n\nexport interface ScrollbarContext {\n scrollbarElement: HTMLDivElement | undefined\n wrapElement: HTMLDivElement | undefined\n}\n\nexport const scrollbarContextKey: InjectionKey = Symbol(\n 'scrollbarContextKey'\n)\n", "import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Thumb from './thumb.vue'\n\nexport const thumbProps = buildProps({\n vertical: Boolean,\n size: String,\n move: Number,\n ratio: {\n type: Number,\n required: true,\n },\n always: Boolean,\n} as const)\nexport type ThumbProps = ExtractPropTypes\nexport type ThumbPropsPublic = ExtractPublicPropTypes\n\nexport type ThumbInstance = InstanceType & unknown\n", "\n \n \n \n \n \n\n\n\n", "import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Bar from './bar.vue'\n\nexport const barProps = buildProps({\n always: {\n type: Boolean,\n default: true,\n },\n minSize: {\n type: Number,\n required: true,\n },\n} as const)\nexport type BarProps = ExtractPropTypes\nexport type BarPropsPublic = ExtractPublicPropTypes\n\nexport type BarInstance = InstanceType & unknown\n", "\n \n \n\n\n\n", "import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description trigger distance(px)\n */\n distance: {\n type: Number,\n default: 0,\n },\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: Boolean,\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n /**\n * @description Wrap tabindex\n */\n tabindex: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description id of view\n */\n id: String,\n /**\n * @description role of view\n */\n role: String,\n ...useAriaProps(['ariaLabel', 'ariaOrientation']),\n} as const)\nexport type ScrollbarProps = ExtractPropTypes\nexport type ScrollbarPropsPublic = ExtractPublicPropTypes\n\nexport const scrollbarEmits = {\n 'end-reached': (direction: ScrollbarDirection) =>\n ['left', 'right', 'top', 'bottom'].includes(direction),\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\nexport type ScrollbarDirection = 'top' | 'bottom' | 'left' | 'right'\n\nexport type ScrollbarInstance = InstanceType & unknown\n", "\n \n \n \n \n \n \n \n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Scrollbar from './src/scrollbar.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElScrollbar: SFCWithInstall =\n withInstall(Scrollbar)\nexport default ElScrollbar\n\nexport * from './src/util'\nexport * from './src/scrollbar'\nexport * from './src/thumb'\nexport * from './src/constants'\n", "import type { CSSProperties, ComputedRef, InjectionKey, Ref } from 'vue'\nimport type { Instance } from '@popperjs/core'\n\nexport type Measurable = {\n getBoundingClientRect: () => DOMRect\n}\n\n/**\n * triggerRef indicates the element that triggers popper\n * contentRef indicates the element of popper content\n * referenceRef indicates the element that popper content relative with\n */\nexport type ElPopperInjectionContext = {\n triggerRef: Ref\n contentRef: Ref\n popperInstanceRef: Ref\n referenceRef: Ref\n role: ComputedRef\n}\n\nexport type ElPopperContentInjectionContext = {\n arrowRef: Ref\n arrowStyle: ComputedRef\n}\n\nexport const POPPER_INJECTION_KEY: InjectionKey =\n Symbol('popper')\n\nexport const POPPER_CONTENT_INJECTION_KEY: InjectionKey =\n Symbol('popperContent')\n", "/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Popper from './popper.vue'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const\n\nexport const roleTypes = [\n 'dialog',\n 'grid',\n 'group',\n 'listbox',\n 'menu',\n 'navigation',\n 'tooltip',\n 'tree',\n] as const\n\nexport type PopperEffect =\n | (typeof effects)[number]\n | (string & NonNullable)\nexport type PopperTrigger = (typeof triggers)[number]\n\nexport const popperProps = buildProps({\n role: {\n type: String,\n values: roleTypes,\n default: 'tooltip',\n },\n} as const)\n\nexport type PopperProps = ExtractPropTypes\nexport type PopperPropsPublic = ExtractPublicPropTypes\n\nexport type PopperInstance = InstanceType & unknown\n\n/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */\nexport const usePopperProps = popperProps\n\n/** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperProps = PopperProps\n", "\n \n\n\n\n", "\n \n\n\n\n", "import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Measurable } from './constants'\nimport type Trigger from './trigger.vue'\n\nexport const popperTriggerProps = buildProps({\n /** @description Indicates the reference element to which the popper is attached */\n virtualRef: {\n type: definePropType(Object),\n },\n /** @description Indicates whether virtual triggering is enabled */\n virtualTriggering: Boolean,\n onMouseenter: {\n type: definePropType<(e: MouseEvent) => void>(Function),\n },\n onMouseleave: {\n type: definePropType<(e: MouseEvent) => void>(Function),\n },\n onClick: {\n type: definePropType<(e: PointerEvent) => void>(Function),\n },\n onKeydown: {\n type: definePropType<(e: KeyboardEvent) => void>(Function),\n },\n onFocus: {\n type: definePropType<(e: FocusEvent) => void>(Function),\n },\n onBlur: {\n type: definePropType<(e: FocusEvent) => void>(Function),\n },\n onContextmenu: {\n type: definePropType<(e: PointerEvent) => void>(Function),\n },\n id: String,\n open: Boolean,\n} as const)\n\nexport type PopperTriggerProps = typeof popperTriggerProps\n\nexport type PopperTriggerInstance = InstanceType & unknown\n\n/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */\nexport const usePopperTriggerProps = popperTriggerProps\n\n/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowTrigger = PopperTriggerInstance\n", "import { provide } from 'vue'\n\nimport type { InjectionKey, ObjectDirective, Ref } from 'vue'\n\ntype ForwardRefSetter = (el: T) => void\n\nexport type ForwardRefInjectionContext = {\n setForwardRef: ForwardRefSetter\n}\n\nexport const FORWARD_REF_INJECTION_KEY: InjectionKey =\n Symbol('elForwardRef')\n\nexport const useForwardRef = (forwardRef: Ref) => {\n const setForwardRef = ((el: T) => {\n forwardRef.value = el\n }) as ForwardRefSetter\n\n provide(FORWARD_REF_INJECTION_KEY, {\n setForwardRef,\n })\n}\n\nexport const useForwardRefDirective = (\n setForwardRef: ForwardRefSetter\n): ObjectDirective => {\n return {\n mounted(el) {\n setForwardRef(el)\n },\n updated(el) {\n setForwardRef(el)\n },\n unmounted() {\n setForwardRef(null)\n },\n }\n}\n", "import {\n Comment,\n Fragment,\n Text,\n cloneVNode,\n defineComponent,\n inject,\n withDirectives,\n} from 'vue'\nimport { NOOP, debugWarn, isObject } from '@element-plus/utils'\nimport {\n FORWARD_REF_INJECTION_KEY,\n useForwardRefDirective,\n useNamespace,\n} from '@element-plus/hooks'\n\nimport type { Ref, VNode } from 'vue'\n\nconst NAME = 'ElOnlyChild'\n\nexport const OnlyChild = defineComponent({\n name: NAME,\n setup(_, { slots, attrs }) {\n const forwardRefInjection = inject(FORWARD_REF_INJECTION_KEY)\n const forwardRefDirective = useForwardRefDirective(\n forwardRefInjection?.setForwardRef ?? NOOP\n )\n return () => {\n const defaultSlot = slots.default?.(attrs)\n if (!defaultSlot) return null\n const [firstLegitNode, length] = findFirstLegitChild(defaultSlot)\n\n if (!firstLegitNode) {\n debugWarn(NAME, 'no valid child node found')\n return null\n }\n if (length > 1) {\n debugWarn(NAME, 'requires exact only one valid child.')\n }\n\n return withDirectives(cloneVNode(firstLegitNode!, attrs), [\n [forwardRefDirective],\n ])\n }\n },\n})\n\nfunction findFirstLegitChild(\n node: VNode[] | undefined\n): [VNode | null, number] {\n if (!node) return [null, 0]\n const children = node as VNode[]\n const len = children.filter((c) => c.type !== Comment).length\n\n for (const child of children) {\n /**\n * when user uses h(Fragment, [text]) to render plain string,\n * this switch case just cannot handle, when the value is primitives\n * we should just return the wrapped string\n */\n if (isObject(child)) {\n switch (child.type) {\n case Comment:\n continue\n case Text:\n case 'svg':\n return [wrapTextContent(child), len]\n case Fragment:\n return findFirstLegitChild(child.children as VNode[])\n default:\n return [child, len]\n }\n }\n return [wrapTextContent(child), len]\n }\n return [null, 0]\n}\n\nfunction wrapTextContent(s: string | VNode) {\n const ns = useNamespace('only-child')\n return {s}\n}\n\nexport type OnlyChildExpose = {\n forwardRef: Ref\n}\n", "\n \n \n \n\n\n\n", "import type { InjectionKey, Ref } from 'vue'\n\nexport const FOCUS_AFTER_TRAPPED = 'focus-trap.focus-after-trapped'\nexport const FOCUS_AFTER_RELEASED = 'focus-trap.focus-after-released'\nexport const FOCUSOUT_PREVENTED = 'focus-trap.focusout-prevented'\nexport const FOCUS_AFTER_TRAPPED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\nexport const FOCUSOUT_PREVENTED_OPTS: EventInit = {\n cancelable: true,\n bubbles: false,\n}\n\nexport const ON_TRAP_FOCUS_EVT = 'focusAfterTrapped'\nexport const ON_RELEASE_FOCUS_EVT = 'focusAfterReleased'\n\nexport type FocusTrapInjectionContext = {\n focusTrapRef: Ref\n onKeydown: (e: KeyboardEvent) => void\n}\n\nexport const FOCUS_TRAP_INJECTION_KEY: InjectionKey =\n Symbol('elFocusTrap')\n", "import { onBeforeUnmount, onMounted, ref } from 'vue'\nimport { focusElement } from '@element-plus/utils'\nimport { FOCUSOUT_PREVENTED, FOCUSOUT_PREVENTED_OPTS } from './tokens'\n\nconst focusReason = ref<'pointer' | 'keyboard'>()\nconst lastUserFocusTimestamp = ref(0)\nconst lastAutomatedFocusTimestamp = ref(0)\nlet focusReasonUserCount = 0\n\nexport type FocusLayer = {\n paused: boolean\n pause: () => void\n resume: () => void\n}\n\nexport type FocusStack = FocusLayer[]\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n const nodes: HTMLElement[] = []\n const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (\n node: Element & {\n disabled: boolean\n hidden: boolean\n type: string\n tabIndex: number\n }\n ) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP\n return node.tabIndex >= 0 || node === document.activeElement\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP\n },\n })\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n\n return nodes\n}\n\nexport const getVisibleElement = (\n elements: HTMLElement[],\n container: HTMLElement\n) => {\n for (const element of elements) {\n if (!isHidden(element, container)) return element\n }\n}\n\nexport const isHidden = (element: HTMLElement, container: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return false\n if (getComputedStyle(element).visibility === 'hidden') return true\n\n while (element) {\n if (container && element === container) return false\n if (getComputedStyle(element).display === 'none') return true\n element = element.parentElement as HTMLElement\n }\n\n return false\n}\n\nexport const getEdges = (container: HTMLElement) => {\n const focusable = obtainAllFocusableElements(container)\n const first = getVisibleElement(focusable, container)\n const last = getVisibleElement(focusable.reverse(), container)\n return [first, last]\n}\n\nconst isSelectable = (\n element: any\n): element is HTMLInputElement & { select: () => void } => {\n return element instanceof HTMLInputElement && 'select' in element\n}\n\nexport const tryFocus = (\n element?: HTMLElement | { focus: () => void } | null,\n shouldSelect?: boolean\n) => {\n if (element) {\n const prevFocusedElement = document.activeElement\n\n focusElement(element, { preventScroll: true })\n lastAutomatedFocusTimestamp.value = window.performance.now()\n\n if (\n element !== prevFocusedElement &&\n isSelectable(element) &&\n shouldSelect\n ) {\n element.select()\n }\n }\n}\n\nfunction removeFromStack(list: T[], item: T) {\n const copy = [...list]\n\n const idx = list.indexOf(item)\n\n if (idx !== -1) {\n copy.splice(idx, 1)\n }\n return copy\n}\n\nconst createFocusableStack = () => {\n let stack = [] as FocusStack\n\n const push = (layer: FocusLayer) => {\n const currentLayer = stack[0]\n\n if (currentLayer && layer !== currentLayer) {\n currentLayer.pause()\n }\n\n stack = removeFromStack(stack, layer)\n stack.unshift(layer)\n }\n\n const remove = (layer: FocusLayer) => {\n stack = removeFromStack(stack, layer)\n stack[0]?.resume?.()\n }\n\n return {\n push,\n remove,\n }\n}\n\nexport const focusFirstDescendant = (\n elements: HTMLElement[],\n shouldSelect = false\n) => {\n const prevFocusedElement = document.activeElement\n for (const element of elements) {\n tryFocus(element, shouldSelect)\n if (document.activeElement !== prevFocusedElement) return\n }\n}\n\nexport const focusableStack = createFocusableStack()\n\nexport const isFocusCausedByUserEvent = (): boolean => {\n return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value\n}\n\nconst notifyFocusReasonPointer = () => {\n focusReason.value = 'pointer'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nconst notifyFocusReasonKeydown = () => {\n focusReason.value = 'keyboard'\n lastUserFocusTimestamp.value = window.performance.now()\n}\n\nexport const useFocusReason = (): {\n focusReason: typeof focusReason\n lastUserFocusTimestamp: typeof lastUserFocusTimestamp\n lastAutomatedFocusTimestamp: typeof lastAutomatedFocusTimestamp\n} => {\n onMounted(() => {\n if (focusReasonUserCount === 0) {\n document.addEventListener('mousedown', notifyFocusReasonPointer)\n document.addEventListener('touchstart', notifyFocusReasonPointer)\n document.addEventListener('keydown', notifyFocusReasonKeydown)\n }\n focusReasonUserCount++\n })\n\n onBeforeUnmount(() => {\n focusReasonUserCount--\n if (focusReasonUserCount <= 0) {\n document.removeEventListener('mousedown', notifyFocusReasonPointer)\n document.removeEventListener('touchstart', notifyFocusReasonPointer)\n document.removeEventListener('keydown', notifyFocusReasonKeydown)\n }\n })\n\n return {\n focusReason,\n lastUserFocusTimestamp,\n lastAutomatedFocusTimestamp,\n }\n}\n\nexport const createFocusOutPreventedEvent = (\n detail: CustomEventInit['detail']\n) => {\n return new CustomEvent(FOCUSOUT_PREVENTED, {\n ...FOCUSOUT_PREVENTED_OPTS,\n detail,\n })\n}\n", "export const EVENT_CODE = {\n tab: 'Tab',\n enter: 'Enter',\n space: 'Space',\n left: 'ArrowLeft', // 37\n up: 'ArrowUp', // 38\n right: 'ArrowRight', // 39\n down: 'ArrowDown', // 40\n esc: 'Escape',\n delete: 'Delete',\n backspace: 'Backspace',\n numpadEnter: 'NumpadEnter',\n pageUp: 'PageUp',\n pageDown: 'PageDown',\n home: 'Home',\n end: 'End',\n}\n", "import { EVENT_CODE } from '@element-plus/constants'\nimport { isAndroid } from '../browser'\n\nexport const composeEventHandlers = (\n theirsHandler?: (event: E) => boolean | void,\n oursHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) => {\n const handleEvent = (event: E) => {\n const shouldPrevent = theirsHandler?.(event)\n\n if (checkForDefaultPrevented === false || !shouldPrevent) {\n return oursHandler?.(event)\n }\n }\n return handleEvent\n}\n\ntype WhenMouseHandler = (e: PointerEvent) => any\nexport const whenMouse = (handler: WhenMouseHandler): WhenMouseHandler => {\n return (e: PointerEvent) =>\n e.pointerType === 'mouse' ? handler(e) : undefined\n}\n\nexport const getEventCode = (event: KeyboardEvent): string => {\n if (event.code && event.code !== 'Unidentified') return event.code\n // On android, event.code is always '' (see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code#browser_compatibility)\n const key = getEventKey(event)\n\n if (key) {\n if (Object.values(EVENT_CODE).includes(key)) return key\n\n switch (key) {\n case ' ':\n return EVENT_CODE.space\n default:\n return ''\n }\n }\n\n return ''\n}\n\nexport const getEventKey = (event: KeyboardEvent): string => {\n let key = event.key && event.key !== 'Unidentified' ? event.key : ''\n\n // On Android, event.key and event.code may not be useful when entering characters or space\n // So here we directly get the last character of the input\n // **only takes effect in the keyup event**\n if (!key && event.type === 'keyup' && isAndroid()) {\n const target = event.target as HTMLInputElement\n key = target.value.charAt(target.selectionStart! - 1)\n }\n\n return key\n}\n", "import { onBeforeUnmount, onMounted } from 'vue'\nimport { getEventCode, isClient } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\n\nlet registeredEscapeHandlers: ((e: KeyboardEvent) => void)[] = []\n\nconst cachedHandler = (event: KeyboardEvent) => {\n const code = getEventCode(event)\n if (code === EVENT_CODE.esc) {\n registeredEscapeHandlers.forEach((registeredHandler) =>\n registeredHandler(event)\n )\n }\n}\n\nexport const useEscapeKeydown = (handler: (e: KeyboardEvent) => void) => {\n onMounted(() => {\n if (registeredEscapeHandlers.length === 0) {\n document.addEventListener('keydown', cachedHandler)\n }\n if (isClient) registeredEscapeHandlers.push(handler)\n })\n\n onBeforeUnmount(() => {\n registeredEscapeHandlers = registeredEscapeHandlers.filter(\n (registeredHandler) => registeredHandler !== handler\n )\n if (registeredEscapeHandlers.length === 0) {\n if (isClient) document.removeEventListener('keydown', cachedHandler)\n }\n })\n}\n", "\n \n\n\n\n", "var E=\"top\",R=\"bottom\",W=\"right\",P=\"left\",me=\"auto\",G=[E,R,W,P],U=\"start\",J=\"end\",Xe=\"clippingParents\",je=\"viewport\",K=\"popper\",Ye=\"reference\",De=G.reduce(function(t,e){return t.concat([e+\"-\"+U,e+\"-\"+J])},[]),Ee=[].concat(G,[me]).reduce(function(t,e){return t.concat([e,e+\"-\"+U,e+\"-\"+J])},[]),Ge=\"beforeRead\",Je=\"read\",Ke=\"afterRead\",Qe=\"beforeMain\",Ze=\"main\",et=\"afterMain\",tt=\"beforeWrite\",nt=\"write\",rt=\"afterWrite\",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(t){return t?(t.nodeName||\"\").toLowerCase():null}function H(t){if(t==null)return window;if(t.toString()!==\"[object Window]\"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Q(t){var e=H(t).Element;return t instanceof e||t instanceof Element}function B(t){var e=H(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Pe(t){if(typeof ShadowRoot==\"undefined\")return!1;var e=H(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Mt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!B(i)||!C(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?\"\":s)}))})}function Rt(t){var e=t.state,n={popper:{position:e.options.strategy,left:\"0\",top:\"0\",margin:\"0\"},arrow:{position:\"absolute\"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(f,c){return f[c]=\"\",f},{});!B(o)||!C(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(f){o.removeAttribute(f)}))})}}var Ae={name:\"applyStyles\",enabled:!0,phase:\"write\",fn:Mt,effect:Rt,requires:[\"computeStyles\"]};function q(t){return t.split(\"-\")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,o=1;if(B(t)&&e){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Z(n.width)/a||1),i>0&&(o=Z(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function ke(t){var e=ee(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Pe(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(t){return H(t).getComputedStyle(t)}function Wt(t){return[\"table\",\"td\",\"th\"].indexOf(C(t))>=0}function I(t){return((Q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ge(t){return C(t)===\"html\"?t:t.assignedSlot||t.parentNode||(Pe(t)?t.host:null)||I(t)}function at(t){return!B(t)||N(t).position===\"fixed\"?null:t.offsetParent}function Bt(t){var e=navigator.userAgent.toLowerCase().indexOf(\"firefox\")!==-1,n=navigator.userAgent.indexOf(\"Trident\")!==-1;if(n&&B(t)){var r=N(t);if(r.position===\"fixed\")return null}var o=ge(t);for(Pe(o)&&(o=o.host);B(o)&&[\"html\",\"body\"].indexOf(C(o))<0;){var i=N(o);if(i.transform!==\"none\"||i.perspective!==\"none\"||i.contain===\"paint\"||[\"transform\",\"perspective\"].indexOf(i.willChange)!==-1||e&&i.willChange===\"filter\"||e&&i.filter&&i.filter!==\"none\")return o;o=o.parentNode}return null}function se(t){for(var e=H(t),n=at(t);n&&Wt(n)&&N(n).position===\"static\";)n=at(n);return n&&(C(n)===\"html\"||C(n)===\"body\"&&N(n).position===\"static\")?e:n||Bt(t)||e}function Le(t){return[\"top\",\"bottom\"].indexOf(t)>=0?\"x\":\"y\"}function fe(t,e,n){return X(t,ve(e,n))}function St(t,e,n){var r=fe(t,e,n);return r>n?n:r}function st(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},st(),t)}function ct(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Tt=function(t,e){return t=typeof t==\"function\"?t(Object.assign({},e.rects,{placement:e.placement})):t,ft(typeof t!=\"number\"?t:ct(t,G))};function Ht(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=q(n.placement),f=Le(s),c=[P,W].indexOf(s)>=0,u=c?\"height\":\"width\";if(!(!i||!a)){var m=Tt(o.padding,n),v=ke(i),l=f===\"y\"?E:P,h=f===\"y\"?R:W,p=n.rects.reference[u]+n.rects.reference[f]-a[f]-n.rects.popper[u],g=a[f]-n.rects.reference[f],x=se(i),y=x?f===\"y\"?x.clientHeight||0:x.clientWidth||0:0,$=p/2-g/2,d=m[l],b=y-v[u]-m[h],w=y/2-v[u]/2+$,O=fe(d,w,b),j=f;n.modifiersData[r]=(e={},e[j]=O,e.centerOffset=O-w,e)}}function Ct(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?\"[data-popper-arrow]\":r;o!=null&&(typeof o==\"string\"&&(o=e.elements.popper.querySelector(o),!o)||!it(e.elements.popper,o)||(e.elements.arrow=o))}var pt={name:\"arrow\",enabled:!0,phase:\"main\",fn:Ht,effect:Ct,requires:[\"popperOffsets\"],requiresIfExists:[\"preventOverflow\"]};function te(t){return t.split(\"-\")[1]}var qt={top:\"auto\",right:\"auto\",bottom:\"auto\",left:\"auto\"};function Vt(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return{x:Z(e*o)/o||0,y:Z(n*o)/o||0}}function ut(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,m=t.isFixed,v=a.x,l=v===void 0?0:v,h=a.y,p=h===void 0?0:h,g=typeof u==\"function\"?u({x:l,y:p}):{x:l,y:p};l=g.x,p=g.y;var x=a.hasOwnProperty(\"x\"),y=a.hasOwnProperty(\"y\"),$=P,d=E,b=window;if(c){var w=se(n),O=\"clientHeight\",j=\"clientWidth\";if(w===H(n)&&(w=I(n),N(w).position!==\"static\"&&s===\"absolute\"&&(O=\"scrollHeight\",j=\"scrollWidth\")),w=w,o===E||(o===P||o===W)&&i===J){d=R;var A=m&&w===b&&b.visualViewport?b.visualViewport.height:w[O];p-=A-r.height,p*=f?1:-1}if(o===P||(o===E||o===R)&&i===J){$=W;var k=m&&w===b&&b.visualViewport?b.visualViewport.width:w[j];l-=k-r.width,l*=f?1:-1}}var D=Object.assign({position:s},c&&qt),S=u===!0?Vt({x:l,y:p}):{x:l,y:p};if(l=S.x,p=S.y,f){var L;return Object.assign({},D,(L={},L[d]=y?\"0\":\"\",L[$]=x?\"0\":\"\",L.transform=(b.devicePixelRatio||1)<=1?\"translate(\"+l+\"px, \"+p+\"px)\":\"translate3d(\"+l+\"px, \"+p+\"px, 0)\",L))}return Object.assign({},D,(e={},e[d]=y?p+\"px\":\"\",e[$]=x?l+\"px\":\"\",e.transform=\"\",e))}function Nt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,f=s===void 0?!0:s,c={placement:q(e.placement),variation:te(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy===\"fixed\"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ut(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ut(Object.assign({},c,{offsets:e.modifiersData.arrow,position:\"absolute\",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{\"data-popper-placement\":e.placement})}var Me={name:\"computeStyles\",enabled:!0,phase:\"beforeWrite\",fn:Nt,data:{}},ye={passive:!0};function It(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,f=H(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener(\"scroll\",n.update,ye)}),s&&f.addEventListener(\"resize\",n.update,ye),function(){i&&c.forEach(function(u){u.removeEventListener(\"scroll\",n.update,ye)}),s&&f.removeEventListener(\"resize\",n.update,ye)}}var Re={name:\"eventListeners\",enabled:!0,phase:\"write\",fn:function(){},effect:It,data:{}},_t={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function be(t){return t.replace(/left|right|bottom|top/g,function(e){return _t[e]})}var zt={start:\"end\",end:\"start\"};function lt(t){return t.replace(/start|end/g,function(e){return zt[e]})}function We(t){var e=H(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Be(t){return ee(I(t)).left+We(t).scrollLeft}function Ft(t){var e=H(t),n=I(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+Be(t),y:s}}function Ut(t){var e,n=I(t),r=We(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=X(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=X(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Be(t),f=-r.scrollTop;return N(o||n).direction===\"rtl\"&&(s+=X(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}function Se(t){var e=N(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function dt(t){return[\"html\",\"body\",\"#document\"].indexOf(C(t))>=0?t.ownerDocument.body:B(t)&&Se(t)?t:dt(ge(t))}function ce(t,e){var n;e===void 0&&(e=[]);var r=dt(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=H(r),a=o?[i].concat(i.visualViewport||[],Se(r)?r:[]):r,s=e.concat(a);return o?s:s.concat(ce(ge(a)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xt(t){var e=ee(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ht(t,e){return e===je?Te(Ft(t)):Q(e)?Xt(e):Te(Ut(I(t)))}function Yt(t){var e=ce(ge(t)),n=[\"absolute\",\"fixed\"].indexOf(N(t).position)>=0,r=n&&B(t)?se(t):t;return Q(r)?e.filter(function(o){return Q(o)&&it(o,r)&&C(o)!==\"body\"}):[]}function Gt(t,e,n){var r=e===\"clippingParents\"?Yt(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(s,f){var c=ht(t,f);return s.top=X(c.top,s.top),s.right=ve(c.right,s.right),s.bottom=ve(c.bottom,s.bottom),s.left=X(c.left,s.left),s},ht(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mt(t){var e=t.reference,n=t.element,r=t.placement,o=r?q(r):null,i=r?te(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,f;switch(o){case E:f={x:a,y:e.y-n.height};break;case R:f={x:a,y:e.y+e.height};break;case W:f={x:e.x+e.width,y:s};break;case P:f={x:e.x-n.width,y:s};break;default:f={x:e.x,y:e.y}}var c=o?Le(o):null;if(c!=null){var u=c===\"y\"?\"height\":\"width\";switch(i){case U:f[c]=f[c]-(e[u]/2-n[u]/2);break;case J:f[c]=f[c]+(e[u]/2-n[u]/2);break}}return f}function ne(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.boundary,a=i===void 0?Xe:i,s=n.rootBoundary,f=s===void 0?je:s,c=n.elementContext,u=c===void 0?K:c,m=n.altBoundary,v=m===void 0?!1:m,l=n.padding,h=l===void 0?0:l,p=ft(typeof h!=\"number\"?h:ct(h,G)),g=u===K?Ye:K,x=t.rects.popper,y=t.elements[v?g:u],$=Gt(Q(y)?y:y.contextElement||I(t.elements.popper),a,f),d=ee(t.elements.reference),b=mt({reference:d,element:x,strategy:\"absolute\",placement:o}),w=Te(Object.assign({},x,b)),O=u===K?w:d,j={top:$.top-O.top+p.top,bottom:O.bottom-$.bottom+p.bottom,left:$.left-O.left+p.left,right:O.right-$.right+p.right},A=t.modifiersData.offset;if(u===K&&A){var k=A[o];Object.keys(j).forEach(function(D){var S=[W,R].indexOf(D)>=0?1:-1,L=[E,R].indexOf(D)>=0?\"y\":\"x\";j[D]+=k[L]*S})}return j}function Jt(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=f===void 0?Ee:f,u=te(r),m=u?s?De:De.filter(function(h){return te(h)===u}):G,v=m.filter(function(h){return c.indexOf(h)>=0});v.length===0&&(v=m);var l=v.reduce(function(h,p){return h[p]=ne(t,{placement:p,boundary:o,rootBoundary:i,padding:a})[q(p)],h},{});return Object.keys(l).sort(function(h,p){return l[h]-l[p]})}function Kt(t){if(q(t)===me)return[];var e=be(t);return[lt(t),e,lt(e)]}function Qt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,m=n.rootBoundary,v=n.altBoundary,l=n.flipVariations,h=l===void 0?!0:l,p=n.allowedAutoPlacements,g=e.options.placement,x=q(g),y=x===g,$=f||(y||!h?[be(g)]:Kt(g)),d=[g].concat($).reduce(function(z,V){return z.concat(q(V)===me?Jt(e,{placement:V,boundary:u,rootBoundary:m,padding:c,flipVariations:h,allowedAutoPlacements:p}):V)},[]),b=e.rects.reference,w=e.rects.popper,O=new Map,j=!0,A=d[0],k=0;k=0,oe=re?\"width\":\"height\",M=ne(e,{placement:D,boundary:u,rootBoundary:m,altBoundary:v,padding:c}),T=re?L?W:P:L?R:E;b[oe]>w[oe]&&(T=be(T));var pe=be(T),_=[];if(i&&_.push(M[S]<=0),s&&_.push(M[T]<=0,M[pe]<=0),_.every(function(z){return z})){A=D,j=!1;break}O.set(D,_)}if(j)for(var ue=h?3:1,xe=function(z){var V=d.find(function(de){var ae=O.get(de);if(ae)return ae.slice(0,z).every(function(Y){return Y})});if(V)return A=V,\"break\"},ie=ue;ie>0;ie--){var le=xe(ie);if(le===\"break\")break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0)}}var vt={name:\"flip\",enabled:!0,phase:\"main\",fn:Qt,requiresIfExists:[\"offset\"],data:{_skip:!1}};function gt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yt(t){return[E,W,R,P].some(function(e){return t[e]>=0})}function Zt(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=ne(e,{elementContext:\"reference\"}),s=ne(e,{altBoundary:!0}),f=gt(a,r),c=gt(s,o,i),u=yt(f),m=yt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{\"data-popper-reference-hidden\":u,\"data-popper-escaped\":m})}var bt={name:\"hide\",enabled:!0,phase:\"main\",requiresIfExists:[\"preventOverflow\"],fn:Zt};function en(t,e,n){var r=q(t),o=[P,E].indexOf(r)>=0?-1:1,i=typeof n==\"function\"?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,W].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tn(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ee.reduce(function(u,m){return u[m]=en(m,e.rects,i),u},{}),s=a[e.placement],f=s.x,c=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=a}var wt={name:\"offset\",enabled:!0,phase:\"main\",requires:[\"popperOffsets\"],fn:tn};function nn(t){var e=t.state,n=t.name;e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:\"absolute\",placement:e.placement})}var He={name:\"popperOffsets\",enabled:!0,phase:\"read\",fn:nn,data:{}};function rn(t){return t===\"x\"?\"y\":\"x\"}function on(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,f=n.boundary,c=n.rootBoundary,u=n.altBoundary,m=n.padding,v=n.tether,l=v===void 0?!0:v,h=n.tetherOffset,p=h===void 0?0:h,g=ne(e,{boundary:f,rootBoundary:c,padding:m,altBoundary:u}),x=q(e.placement),y=te(e.placement),$=!y,d=Le(x),b=rn(d),w=e.modifiersData.popperOffsets,O=e.rects.reference,j=e.rects.popper,A=typeof p==\"function\"?p(Object.assign({},e.rects,{placement:e.placement})):p,k=typeof A==\"number\"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(w){if(i){var L,re=d===\"y\"?E:P,oe=d===\"y\"?R:W,M=d===\"y\"?\"height\":\"width\",T=w[d],pe=T+g[re],_=T-g[oe],ue=l?-j[M]/2:0,xe=y===U?O[M]:j[M],ie=y===U?-j[M]:-O[M],le=e.elements.arrow,z=l&&le?ke(le):{width:0,height:0},V=e.modifiersData[\"arrow#persistent\"]?e.modifiersData[\"arrow#persistent\"].padding:st(),de=V[re],ae=V[oe],Y=fe(0,O[M],z[M]),jt=$?O[M]/2-ue-Y-de-k.mainAxis:xe-Y-de-k.mainAxis,Dt=$?-O[M]/2+ue+Y+ae+k.mainAxis:ie+Y+ae+k.mainAxis,Oe=e.elements.arrow&&se(e.elements.arrow),Et=Oe?d===\"y\"?Oe.clientTop||0:Oe.clientLeft||0:0,Ce=(L=D==null?void 0:D[d])!=null?L:0,Pt=T+jt-Ce-Et,At=T+Dt-Ce,qe=fe(l?ve(pe,Pt):pe,T,l?X(_,At):_);w[d]=qe,S[d]=qe-T}if(s){var Ve,kt=d===\"x\"?E:P,Lt=d===\"x\"?R:W,F=w[b],he=b===\"y\"?\"height\":\"width\",Ne=F+g[kt],Ie=F-g[Lt],$e=[E,P].indexOf(x)!==-1,_e=(Ve=D==null?void 0:D[b])!=null?Ve:0,ze=$e?Ne:F-O[he]-j[he]-_e+k.altAxis,Fe=$e?F+O[he]+j[he]-_e-k.altAxis:Ie,Ue=l&&$e?St(ze,F,Fe):fe(l?ze:Ne,F,l?Fe:Ie);w[b]=Ue,S[b]=Ue-F}e.modifiersData[r]=S}}var xt={name:\"preventOverflow\",enabled:!0,phase:\"main\",fn:on,requiresIfExists:[\"offset\"]};function an(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sn(t){return t===H(t)||!B(t)?We(t):an(t)}function fn(t){var e=t.getBoundingClientRect(),n=Z(e.width)/t.offsetWidth||1,r=Z(e.height)/t.offsetHeight||1;return n!==1||r!==1}function cn(t,e,n){n===void 0&&(n=!1);var r=B(e),o=B(e)&&fn(e),i=I(e),a=ee(t,o),s={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(r||!r&&!n)&&((C(e)!==\"body\"||Se(i))&&(s=sn(e)),B(e)?(f=ee(e,!0),f.x+=e.clientLeft,f.y+=e.clientTop):i&&(f.x=Be(i))),{x:a.left+s.scrollLeft-f.x,y:a.top+s.scrollTop-f.y,width:a.width,height:a.height}}function pn(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var f=e.get(s);f&&o(f)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function un(t){var e=pn(t);return ot.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function ln(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function dn(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot={placement:\"bottom\",modifiers:[],strategy:\"absolute\"};function $t(){for(var t=arguments.length,e=new Array(t),n=0;n\nexport type PopperArrowPropsPublic = ExtractPublicPropTypes<\n typeof popperArrowProps\n>\n\nexport type PopperArrowInstance = InstanceType & unknown\n\n/** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */\nexport const usePopperArrowProps = popperArrowProps\n\n/** @deprecated use `PopperArrowProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperArrowProps = PopperArrowProps\n\n/** @deprecated use `PopperArrowInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowInstance = PopperArrowInstance\n", "import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\nimport { popperArrowProps } from './arrow'\n\nimport type { PopperEffect } from './popper'\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\nexport type PopperCoreConfigPropsPublic = ExtractPublicPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n ...popperArrowProps,\n id: String,\n style: {\n type: definePropType([String, Array, Object]),\n },\n className: {\n type: definePropType([String, Array, Object]),\n },\n effect: {\n type: definePropType(String),\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: Boolean,\n trapping: Boolean,\n popperClass: {\n type: definePropType([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType(Object),\n },\n triggerTargetEl: {\n type: definePropType(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n loop: Boolean,\n} as const)\nexport type PopperContentProps = ExtractPropTypes\nexport type PopperContentPropsPublic = ExtractPublicPropTypes<\n typeof popperContentProps\n>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType & unknown\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n", "import { onBeforeUnmount, ref } from 'vue'\n\nimport type { SetupContext } from 'vue'\nimport type { PopperContentEmits, PopperContentProps } from '../content'\n\nexport const usePopperContentFocusTrap = (\n props: PopperContentProps,\n emit: SetupContext['emit']\n) => {\n const trapped = ref(false)\n const focusStartRef = ref<'container' | 'first' | HTMLElement>()\n\n const onFocusAfterTrapped = () => {\n emit('focus')\n }\n\n const onFocusAfterReleased = (event: CustomEvent) => {\n if (event.detail?.focusReason !== 'pointer') {\n focusStartRef.value = 'first'\n emit('blur')\n }\n }\n\n const onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n }\n }\n\n const onFocusoutPrevented = (event: CustomEvent) => {\n if (!props.trapping) {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n trapped.value = false\n }\n }\n\n const onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n }\n\n onBeforeUnmount(() => {\n focusStartRef.value = undefined\n })\n\n return {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n }\n}\n\nexport type UsePopperContentFocusTrapReturn = ReturnType<\n typeof usePopperContentFocusTrap\n>\n", "import { unrefElement } from '@vueuse/core'\nimport { isClient } from '@element-plus/utils'\n\nimport type { ComponentPublicInstance } from 'vue'\nimport type { MaybeRef } from '@vueuse/core'\nimport type { Modifier } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type { PopperCoreConfigProps } from './content'\n\nexport const buildPopperOptions = (\n props: PopperCoreConfigProps,\n modifiers: Modifier[] = []\n) => {\n const { placement, strategy, popperOptions } = props\n const options = {\n placement,\n strategy,\n ...popperOptions,\n modifiers: [...genModifiers(props), ...modifiers],\n }\n\n deriveExtraModifiers(options, popperOptions?.modifiers)\n return options\n}\n\nexport const unwrapMeasurableEl = (\n $el: MaybeRef\n) => {\n if (!isClient) return\n return unrefElement($el as HTMLElement)\n}\n\nfunction genModifiers(options: PopperCoreConfigProps) {\n const { offset, gpuAcceleration, fallbackPlacements } = options\n return [\n {\n name: 'offset',\n options: {\n offset: [0, offset ?? 12],\n },\n },\n {\n name: 'preventOverflow',\n options: {\n padding: {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n },\n },\n },\n {\n name: 'flip',\n options: {\n padding: 5,\n fallbackPlacements,\n },\n },\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration,\n },\n },\n ]\n}\n\nfunction deriveExtraModifiers(\n options: any,\n modifiers: PopperCoreConfigProps['popperOptions']['modifiers']\n) {\n if (modifiers) {\n options.modifiers = [...options.modifiers, ...(modifiers ?? [])]\n }\n}\n", "import { computed, onBeforeUnmount, ref, shallowRef, unref, watch } from 'vue'\nimport { createPopper } from '@popperjs/core'\nimport { fromPairs } from 'lodash-unified'\n\nimport type { Ref } from 'vue'\nimport type {\n Instance,\n Modifier,\n Options,\n State,\n VirtualElement,\n} from '@popperjs/core'\n\ntype ElementType = HTMLElement | undefined\ntype ReferenceElement = ElementType | VirtualElement\nexport type PartialOptions = Partial\n\nexport const usePopper = (\n referenceElementRef: Ref,\n popperElementRef: Ref,\n opts: Ref | PartialOptions = {} as PartialOptions\n) => {\n const stateUpdater = {\n name: 'updateState',\n enabled: true,\n phase: 'write',\n fn: ({ state }) => {\n const derivedState = deriveState(state)\n\n Object.assign(states.value, derivedState)\n },\n requires: ['computeStyles'],\n } as Modifier<'updateState', any>\n\n const options = computed(() => {\n const { onFirstUpdate, placement, strategy, modifiers } = unref(opts)\n\n return {\n onFirstUpdate,\n placement: placement || 'bottom',\n strategy: strategy || 'absolute',\n modifiers: [\n ...(modifiers || []),\n stateUpdater,\n { name: 'applyStyles', enabled: false },\n ],\n }\n })\n\n const instanceRef = shallowRef()\n const states = ref>({\n styles: {\n popper: {\n position: unref(options).strategy,\n left: '0',\n top: '0',\n },\n arrow: {\n position: 'absolute',\n },\n },\n attributes: {},\n })\n\n const destroy = () => {\n if (!instanceRef.value) return\n\n instanceRef.value.destroy()\n instanceRef.value = undefined\n }\n\n watch(\n options,\n (newOptions) => {\n const instance = unref(instanceRef)\n if (instance) {\n instance.setOptions(newOptions)\n }\n },\n {\n deep: true,\n }\n )\n\n watch(\n [referenceElementRef, popperElementRef],\n ([referenceElement, popperElement]) => {\n destroy()\n if (!referenceElement || !popperElement) return\n\n instanceRef.value = createPopper(\n referenceElement,\n popperElement,\n unref(options)\n )\n }\n )\n\n onBeforeUnmount(() => {\n destroy()\n })\n\n return {\n state: computed(() => ({ ...(unref(instanceRef)?.state || {}) })),\n styles: computed(() => unref(states).styles),\n attributes: computed(() => unref(states).attributes),\n update: () => unref(instanceRef)?.update(),\n forceUpdate: () => unref(instanceRef)?.forceUpdate(),\n // Preventing end users from modifying the instance.\n instanceRef: computed(() => unref(instanceRef)),\n }\n}\n\nfunction deriveState(state: State) {\n const elements = Object.keys(state.elements) as unknown as Array<\n keyof State['elements']\n >\n\n const styles = fromPairs(\n elements.map(\n (element) =>\n [element, state.styles[element] || {}] as [\n string,\n State['styles'][keyof State['styles']],\n ]\n )\n )\n\n const attributes = fromPairs(\n elements.map(\n (element) =>\n [element, state.attributes[element]] as [\n string,\n State['attributes'][keyof State['attributes']],\n ]\n )\n )\n\n return {\n styles,\n attributes,\n }\n}\n\nexport type UsePopperReturn = ReturnType\n", "import {\n computed,\n inject,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isUndefined } from 'lodash-unified'\nimport { usePopper } from '@element-plus/hooks'\nimport { POPPER_INJECTION_KEY } from '../constants'\nimport { buildPopperOptions, unwrapMeasurableEl } from '../utils'\n\nimport type { Modifier } from '@popperjs/core'\nimport type { PartialOptions } from '@element-plus/hooks'\nimport type { PopperContentProps } from '../content'\n\nconst DEFAULT_ARROW_OFFSET = 0\n\nexport const usePopperContent = (props: PopperContentProps) => {\n const { popperInstanceRef, contentRef, triggerRef, role } = inject(\n POPPER_INJECTION_KEY,\n undefined\n )!\n\n const arrowRef = ref()\n const arrowOffset = computed(() => props.arrowOffset)\n\n const eventListenerModifier = computed(() => {\n return {\n name: 'eventListeners',\n enabled: !!props.visible,\n } as Modifier<'eventListeners', any>\n })\n\n const arrowModifier = computed(() => {\n const arrowEl = unref(arrowRef)\n const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET\n // Seems like the `phase` and `fn` is required by Modifier type\n // But on its documentation they didn't specify that.\n // Refer to https://popper.js.org/docs/v2/modifiers/arrow/\n return {\n name: 'arrow',\n enabled: !isUndefined(arrowEl),\n options: {\n element: arrowEl,\n padding: offset,\n },\n } as any\n })\n\n const options = computed(() => {\n return {\n onFirstUpdate: () => {\n update()\n },\n ...buildPopperOptions(props, [\n unref(arrowModifier),\n unref(eventListenerModifier),\n ]),\n }\n })\n\n const computedReference = computed(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)\n )\n\n const { attributes, state, styles, update, forceUpdate, instanceRef } =\n usePopper(computedReference, contentRef, options)\n\n watch(instanceRef, (instance) => (popperInstanceRef.value = instance), {\n flush: 'sync',\n })\n\n onMounted(() => {\n watch(\n () => unref(computedReference)?.getBoundingClientRect?.(),\n () => {\n update()\n }\n )\n })\n\n onBeforeUnmount(() => {\n popperInstanceRef.value = undefined\n })\n\n return {\n attributes,\n arrowRef,\n contentRef,\n instanceRef,\n state,\n styles,\n role,\n\n forceUpdate,\n update,\n }\n}\n\nexport type UsePopperContentReturn = ReturnType\n", "import { computed, ref, unref } from 'vue'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isNumber } from '@element-plus/utils'\n\nimport type { CSSProperties, StyleValue } from 'vue'\nimport type { UsePopperReturn } from '@element-plus/hooks'\nimport type { UsePopperContentReturn } from './use-content'\nimport type { PopperContentProps } from '../content'\n\nexport const usePopperContentDOM = (\n props: PopperContentProps,\n {\n attributes,\n styles,\n role,\n }: Pick &\n Pick\n) => {\n const { nextZIndex } = useZIndex()\n const ns = useNamespace('popper')\n\n const contentAttrs = computed(() => unref(attributes).popper)\n const contentZIndex = ref(\n isNumber(props.zIndex) ? props.zIndex : nextZIndex()\n )\n const contentClass = computed(() => [\n ns.b(),\n ns.is('pure', props.pure),\n ns.is(props.effect),\n props.popperClass,\n ])\n const contentStyle = computed(() => {\n return [\n { zIndex: unref(contentZIndex) } as CSSProperties,\n unref(styles).popper as CSSProperties,\n props.popperStyle || {},\n ]\n })\n const ariaModal = computed(() =>\n role.value === 'dialog' ? 'false' : undefined\n )\n const arrowStyle = computed(\n () => (unref(styles).arrow || {}) as CSSProperties\n )\n\n const updateZIndex = () => {\n contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex()\n }\n\n return {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n contentZIndex,\n\n updateZIndex,\n }\n}\n\nexport type UsePopperContentDOMReturn = ReturnType\n", "\n $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n \n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Popper from './src/popper.vue'\nimport ElPopperArrow from './src/arrow.vue'\nimport ElPopperTrigger from './src/trigger.vue'\nimport ElPopperContent from './src/content.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport { ElPopperArrow, ElPopperTrigger, ElPopperContent }\n\nexport const ElPopper: SFCWithInstall = withInstall(Popper)\nexport default ElPopper\n\nexport * from './src/popper'\nexport * from './src/trigger'\nexport * from './src/content'\nexport * from './src/arrow'\nexport * from './src/constants'\n\nexport type { Placement, Options } from '@popperjs/core'\n", "import type { Arrayable } from '@element-plus/utils'\nimport type { InjectionKey, Ref } from 'vue'\nimport type { TooltipTriggerType } from './trigger'\n\nexport type ElTooltipInjectionContext = {\n controlled: Ref\n id: Ref\n open: Ref\n trigger: Ref>\n onOpen: (e?: Event) => void\n onClose: (e?: Event) => void\n onToggle: (e: Event) => void\n onShow: () => void\n onHide: () => void\n onBeforeShow: () => void\n onBeforeHide: () => void\n updatePopper: () => void\n}\n\nexport const TOOLTIP_INJECTION_KEY: InjectionKey =\n Symbol('elTooltip')\n", "import { tryOnScopeDispose } from '@vueuse/core'\n\nexport function useTimeout() {\n let timeoutHandle: number\n\n const registerTimeout = (fn: (...args: any[]) => any, delay: number) => {\n cancelTimeout()\n timeoutHandle = window.setTimeout(fn, delay)\n }\n const cancelTimeout = () => window.clearTimeout(timeoutHandle)\n\n tryOnScopeDispose(() => cancelTimeout())\n\n return {\n registerTimeout,\n cancelTimeout,\n }\n}\n", "import { unref } from 'vue'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { useTimeout } from '../use-timeout'\n\nimport type { ExtractPropTypes, ToRefs } from 'vue'\n\nexport const useDelayedToggleProps = buildProps({\n /**\n * @description delay of appearance, in millisecond, not valid in controlled mode\n */\n showAfter: {\n type: Number,\n default: 0,\n },\n /**\n * @description delay of disappear, in millisecond, not valid in controlled mode\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description disappear automatically, in millisecond, not valid in controlled mode\n */\n autoClose: {\n type: Number,\n default: 0,\n },\n} as const)\n\nexport type UseDelayedToggleProps = {\n open: (event?: Event) => void\n close: (event?: Event) => void\n} & ToRefs>\n\nexport const useDelayedToggle = ({\n showAfter,\n hideAfter,\n autoClose,\n open,\n close,\n}: UseDelayedToggleProps) => {\n const { registerTimeout } = useTimeout()\n const {\n registerTimeout: registerTimeoutForAutoClose,\n cancelTimeout: cancelTimeoutForAutoClose,\n } = useTimeout()\n\n const onOpen = (event?: Event, delay = unref(showAfter)) => {\n registerTimeout(() => {\n open(event)\n\n const _autoClose = unref(autoClose)\n if (isNumber(_autoClose) && _autoClose > 0) {\n registerTimeoutForAutoClose(() => {\n close(event)\n }, _autoClose)\n }\n }, delay)\n }\n\n const onClose = (event?: Event, delay = unref(hideAfter)) => {\n cancelTimeoutForAutoClose()\n registerTimeout(() => {\n close(event)\n }, delay)\n }\n\n return {\n onOpen,\n onClose,\n }\n}\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperContentProps } from '@element-plus/components/popper'\nimport { useAriaProps, useDelayedToggleProps } from '@element-plus/hooks'\nimport { teleportProps } from '@element-plus/components/teleport'\n\nimport type TooltipContent from './content.vue'\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const useTooltipContentProps = buildProps({\n ...useDelayedToggleProps,\n ...popperContentProps,\n /**\n * @description which element the tooltip CONTENT appends to\n */\n appendTo: {\n type: teleportProps.to.type,\n },\n /**\n * @description display content, can be overridden by `slot#content`\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * @description whether `content` is treated as HTML string\n */\n rawContent: Boolean,\n /**\n * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: Boolean,\n // because model toggle prop is generated dynamically\n // so the typing cannot be evaluated by typescript as type:\n // [name]: { type: Boolean, default: null }\n // so we need to declare that again for type checking.\n /**\n * @description visibility of Tooltip\n */\n visible: {\n type: definePropType(Boolean),\n default: null,\n },\n /**\n * @description animation name\n */\n transition: String,\n /**\n * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type ElTooltipContentProps = ExtractPropTypes<\n typeof useTooltipContentProps\n>\nexport type ElTooltipContentPropsPublic = ExtractPublicPropTypes<\n typeof useTooltipContentProps\n>\n\nexport type TooltipContentInstance = InstanceType &\n unknown\n", "import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperTriggerProps } from '@element-plus/components/popper'\nimport { EVENT_CODE } from '@element-plus/constants'\n\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'\n\nexport const useTooltipTriggerProps = buildProps({\n ...popperTriggerProps,\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n /**\n * @description How should the tooltip be triggered (to show), not valid in controlled mode\n */\n trigger: {\n type: definePropType>([String, Array]),\n default: 'hover',\n },\n /**\n * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard, not valid in controlled mode\n */\n triggerKeys: {\n type: definePropType(Array),\n default: () => [EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space],\n },\n /**\n * @description when triggering tooltips through hover, whether to focus the trigger element, which improves accessibility\n */\n focusOnTarget: Boolean,\n} as const)\n\nexport type ElTooltipTriggerProps = ExtractPropTypes<\n typeof useTooltipTriggerProps\n>\n\nexport type ElTooltipTriggerPropsPublic = ExtractPublicPropTypes<\n typeof useTooltipTriggerProps\n>\n", "import { computed, getCurrentInstance, onMounted, watch } from 'vue'\nimport {\n buildProp,\n definePropType,\n isBoolean,\n isClient,\n isFunction,\n} from '@element-plus/utils'\n\nimport type { ExtractPropType } from '@element-plus/utils'\nimport type { RouteLocationNormalizedLoaded } from 'vue-router'\nimport type {\n ComponentPublicInstance,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n Ref,\n} from 'vue'\n\nconst _prop = buildProp({\n type: definePropType(Boolean),\n default: null,\n} as const)\nconst _event = buildProp({\n type: definePropType<(val: boolean) => void>(Function),\n} as const)\n\nexport type UseModelTogglePropsRaw = {\n [K in T]: typeof _prop\n} & {\n [K in `onUpdate:${T}`]: typeof _event\n}\n\nexport type UseModelTogglePropsGeneric = {\n [K in T]: ExtractPropType\n} & {\n [K in `onUpdate:${T}`]: ExtractPropType\n}\n\nexport const createModelToggleComposable = (name: T) => {\n const updateEventKey = `update:${name}` as const\n const updateEventKeyRaw = `onUpdate:${name}` as const\n const useModelToggleEmits = [updateEventKey]\n\n const useModelToggleProps = {\n [name]: _prop,\n [updateEventKeyRaw]: _event,\n } as UseModelTogglePropsRaw\n\n const useModelToggle = ({\n indicator,\n toggleReason,\n shouldHideWhenRouteChanges,\n shouldProceed,\n onShow,\n onHide,\n }: ModelToggleParams) => {\n const instance = getCurrentInstance()!\n const { emit } = instance\n const props = instance.props as UseModelTogglePropsGeneric & {\n disabled: boolean\n }\n const hasUpdateHandler = computed(() =>\n isFunction(props[updateEventKeyRaw])\n )\n // when it matches the default value we say this is absent\n // though this could be mistakenly passed from the user but we need to rule out that\n // condition\n const isModelBindingAbsent = computed(() => props[name] === null)\n\n const doShow = (event?: Event) => {\n if (indicator.value === true) {\n return\n }\n\n indicator.value = true\n if (toggleReason) {\n toggleReason.value = event\n }\n if (isFunction(onShow)) {\n onShow(event)\n }\n }\n\n const doHide = (event?: Event) => {\n if (indicator.value === false) {\n return\n }\n\n indicator.value = false\n if (toggleReason) {\n toggleReason.value = event\n }\n if (isFunction(onHide)) {\n onHide(event)\n }\n }\n\n const show = (event?: Event) => {\n if (\n props.disabled === true ||\n (isFunction(shouldProceed) && !shouldProceed())\n )\n return\n\n const shouldEmit = hasUpdateHandler.value && isClient\n\n if (shouldEmit) {\n emit(updateEventKey, true)\n }\n\n if (isModelBindingAbsent.value || !shouldEmit) {\n doShow(event)\n }\n }\n\n const hide = (event?: Event) => {\n if (props.disabled === true || !isClient) return\n\n const shouldEmit = hasUpdateHandler.value && isClient\n\n if (shouldEmit) {\n emit(updateEventKey, false)\n }\n\n if (isModelBindingAbsent.value || !shouldEmit) {\n doHide(event)\n }\n }\n\n const onChange = (val: boolean) => {\n if (!isBoolean(val)) return\n if (props.disabled && val) {\n if (hasUpdateHandler.value) {\n emit(updateEventKey, false)\n }\n } else if (indicator.value !== val) {\n if (val) {\n doShow()\n } else {\n doHide()\n }\n }\n }\n\n const toggle = () => {\n if (indicator.value) {\n hide()\n } else {\n show()\n }\n }\n\n watch(() => props[name], onChange)\n\n if (\n shouldHideWhenRouteChanges &&\n instance.appContext.config.globalProperties.$route !== undefined\n ) {\n watch(\n () => ({\n ...(\n instance.proxy as ComponentPublicInstance<{\n $route: RouteLocationNormalizedLoaded\n }>\n ).$route,\n }),\n () => {\n if (shouldHideWhenRouteChanges.value && indicator.value) {\n hide()\n }\n }\n )\n }\n\n onMounted(() => {\n onChange(props[name])\n })\n\n return {\n hide,\n show,\n toggle,\n hasUpdateHandler,\n }\n }\n\n return {\n useModelToggle,\n useModelToggleProps,\n useModelToggleEmits,\n }\n}\n\nconst { useModelToggle, useModelToggleProps, useModelToggleEmits } =\n createModelToggleComposable('modelValue')\n\nexport { useModelToggle, useModelToggleEmits, useModelToggleProps }\n\nexport type UseModelToggleProps = ExtractPropTypes\nexport type UseModelTogglePropsPublic = ExtractPublicPropTypes<\n typeof useModelToggleProps\n>\n\nexport type ModelToggleParams = {\n indicator: Ref\n toggleReason?: Ref\n shouldHideWhenRouteChanges?: Ref\n shouldProceed?: () => boolean\n onShow?: (event?: Event) => void\n onHide?: (event?: Event) => void\n}\n", "import { buildProps } from '@element-plus/utils'\nimport { createModelToggleComposable } from '@element-plus/hooks'\nimport { popperArrowProps, popperProps } from '@element-plus/components/popper'\nimport { useTooltipContentProps } from './content'\nimport { useTooltipTriggerProps } from './trigger'\n\nimport type Tooltip from './tooltip.vue'\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const {\n useModelToggleProps: useTooltipModelToggleProps,\n useModelToggleEmits: useTooltipModelToggleEmits,\n useModelToggle: useTooltipModelToggle,\n} = createModelToggleComposable('visible' as const)\n\nexport const useTooltipProps = buildProps({\n ...popperProps,\n ...useTooltipModelToggleProps,\n ...useTooltipContentProps,\n ...useTooltipTriggerProps,\n ...popperArrowProps,\n /**\n * @description whether the tooltip content has an arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n})\n\nexport const tooltipEmits = [\n ...useTooltipModelToggleEmits,\n 'before-show',\n 'before-hide',\n 'show',\n 'hide',\n 'open',\n 'close',\n]\n\nexport type ElTooltipProps = ExtractPropTypes\nexport type ElTooltipPropsPublic = ExtractPublicPropTypes<\n typeof useTooltipProps\n>\n\nexport type TooltipInstance = InstanceType & unknown\n", "import { unref } from 'vue'\nimport { isArray } from '@element-plus/utils'\n\nimport type { Arrayable } from '@element-plus/utils'\nimport type { Ref } from 'vue'\nimport type { TooltipTriggerType } from './trigger'\n\nexport const isTriggerType = (\n trigger: Arrayable,\n type: TooltipTriggerType\n) => {\n if (isArray(trigger)) {\n return trigger.includes(type)\n }\n return trigger === type\n}\n\nexport const whenTrigger = (\n trigger: Ref>,\n type: TooltipTriggerType,\n handler: (e: Event) => void\n) => {\n return (e: Event) => {\n isTriggerType(unref(trigger), type) && handler(e)\n }\n}\n", "\n \n \n \n\n\n\n", "import { computed, onBeforeMount } from 'vue'\nimport { isClient } from '@element-plus/utils'\nimport { useGetDerivedNamespace } from '../use-namespace'\nimport { useIdInjection } from '../use-id'\n\nexport const usePopperContainerId = () => {\n const namespace = useGetDerivedNamespace()\n const idInjection = useIdInjection()\n\n const id = computed(() => {\n return `${namespace.value}-popper-container-${idInjection.prefix}`\n })\n const selector = computed(() => `#${id.value}`)\n\n return {\n id,\n selector,\n }\n}\n\nconst createContainer = (id: string) => {\n const container = document.createElement('div')\n container.id = id\n document.body.appendChild(container)\n return container\n}\n\nexport const usePopperContainer = () => {\n const { id, selector } = usePopperContainerId()\n onBeforeMount(() => {\n if (!isClient) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (\n process.env.NODE_ENV === 'test' ||\n !document.body.querySelector(selector.value)\n ) {\n createContainer(id.value)\n }\n })\n\n return {\n id,\n selector,\n }\n}\n", "import { isArray } from './types'\n\nexport const unique = (arr: T[]) => [...new Set(arr)]\n\nexport const extractFirst = (arr: T | T[]): T => {\n return isArray(arr) ? arr[0] : arr\n}\n\ntype Many = T | ReadonlyArray\n// TODO: rename to `ensureArray`\n/** like `_.castArray`, except falsy value returns empty array. */\nexport const castArray = (arr: Many): T[] => {\n if (!arr && (arr as any) !== 0) return []\n return isArray(arr) ? arr : [arr as T]\n}\n\n// TODO: remove import alias\n// avoid naming conflicts\nexport { castArray as ensureArray } from 'lodash-unified'\n", "\n \n \n \n \n \n \n \n\n\n\n", "\n \n \n \n \n \n \n \n {{ content }}\n \n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Tooltip from './src/tooltip.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElTooltip: SFCWithInstall = withInstall(Tooltip)\nexport * from './src/tooltip'\nexport * from './src/trigger'\nexport * from './src/content'\nexport * from './src/constants'\nexport default ElTooltip\n", "import {\n NOOP,\n buildProps,\n definePropType,\n isNumber,\n isObject,\n isString,\n} from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputProps } from '@element-plus/components/input'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Autocomplete from './autocomplete.vue'\nimport type { Placement } from '@element-plus/components/popper'\nimport type { Awaitable } from '@element-plus/utils'\n\nexport type AutocompleteData = Record[]\nexport type AutocompleteFetchSuggestionsCallback = (\n data: AutocompleteData\n) => void\nexport type AutocompleteFetchSuggestions =\n | ((\n queryString: string,\n cb: AutocompleteFetchSuggestionsCallback\n ) => Awaitable | void)\n | AutocompleteData\n\nexport const autocompleteProps = buildProps({\n ...inputProps,\n /**\n * @description key name of the input suggestion object for display\n */\n valueKey: {\n type: String,\n default: 'value',\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description debounce delay when typing, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description placement of the popup menu\n */\n placement: {\n type: definePropType(String),\n values: [\n 'top',\n 'top-start',\n 'top-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n ],\n default: 'bottom-start',\n },\n /**\n * @description a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete\n */\n fetchSuggestions: {\n type: definePropType([Function, Array]),\n default: NOOP,\n },\n /**\n * @description custom class name for autocomplete's dropdown\n */\n popperClass: useTooltipContentProps.popperClass,\n /**\n * @description custom style for autocomplete's dropdown\n */\n popperStyle: useTooltipContentProps.popperStyle,\n /**\n * @description whether show suggestions when input focus\n */\n triggerOnFocus: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to emit a `select` event on enter when there is no autocomplete match\n */\n selectWhenUnmatched: Boolean,\n /**\n * @description whether to hide the loading icon in remote search\n */\n hideLoading: Boolean,\n /**\n * @description whether select dropdown is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description which select dropdown appends to\n */\n appendTo: useTooltipContentProps.appendTo,\n /**\n * @description whether to highlight first item in remote search suggestions by default\n */\n highlightFirstItem: Boolean,\n /**\n * @description whether the width of the dropdown is the same as the input\n */\n fitInputWidth: Boolean,\n /**\n * @description whether keyboard navigation loops from end to start\n */\n loopNavigation: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type AutocompleteProps = ExtractPropTypes\nexport type AutocompletePropsPublic = ExtractPublicPropTypes<\n typeof autocompleteProps\n>\n\nexport const autocompleteEmits = {\n [UPDATE_MODEL_EVENT]: (value: string | number) =>\n isString(value) || isNumber(value),\n [INPUT_EVENT]: (value: string | number) => isString(value) || isNumber(value),\n [CHANGE_EVENT]: (value: string | number) =>\n isString(value) || isNumber(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n select: (item: Record) => isObject(item),\n}\nexport type AutocompleteEmits = typeof autocompleteEmits\n\nexport type AutocompleteInstance = InstanceType & unknown\n", "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{ item[valueKey] }}\n \n \n \n \n \n \n \n \n \n\n\n\n", "import { withInstall } from '@element-plus/utils'\nimport Autocomplete from './src/autocomplete.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElAutocomplete: SFCWithInstall =\n withInstall(Autocomplete)\n\nexport default ElAutocomplete\n\nexport * from './src/autocomplete'\n", "import {\n buildProps,\n definePropType,\n iconPropType,\n isNumber,\n} from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type {\n CSSProperties,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\n\nexport const avatarProps = buildProps({\n /**\n * @description avatar size.\n */\n size: {\n type: [Number, String],\n values: componentSizes,\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description avatar shape.\n */\n shape: {\n type: String,\n values: ['circle', 'square'],\n },\n /**\n * @description representation type to icon, more info on icon component.\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description the source of the image for an image avatar.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description native attribute `alt` of image avatar.\n */\n alt: String,\n /**\n * @description native attribute srcset of image avatar.\n */\n srcSet: String,\n /**\n * @description set how the image fit its container for an image avatar.\n */\n fit: {\n type: definePropType(String),\n default: 'cover',\n },\n} as const)\nexport type AvatarProps = ExtractPropTypes\nexport type AvatarPropsPublic = ExtractPublicPropTypes\n\nexport const avatarEmits = {\n error: (evt: Event) => evt instanceof Event,\n}\nexport type AvatarEmits = typeof avatarEmits\n", "import type { InjectionKey } from 'vue'\nimport type { AvatarProps } from './avatar'\n\nexport interface AvatarGroupContext {\n size?: AvatarProps['size']\n shape?: AvatarProps['shape']\n}\n\nexport const avatarGroupContextKey: InjectionKey = Symbol(\n 'avatarGroupContextKey'\n)\n", "\n \n \n \n \n \n \n \n\n\n\n", "import { placements } from '@popperjs/core'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { avatarProps } from './avatar'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { Placement, PopperEffect } from '@element-plus/components/popper'\n\nexport const avatarGroupProps = buildProps({\n /**\n * @description control the size of avatars in this avatar-group\n */\n size: avatarProps.size,\n /**\n * @description control the shape of avatars in this avatar-group\n */\n shape: avatarProps.shape,\n /**\n * @description whether to collapse avatars\n */\n collapseAvatars: Boolean,\n /**\n * @description whether show all collapsed avatars when mouse hover text of the collapse-avatar. To use this, `collapse-avatars` must be true\n */\n collapseAvatarsTooltip: Boolean,\n /**\n * @description the max avatars number to be shown. To use this, `collapse-avatars` must be true\n */\n maxCollapseAvatars: {\n type: Number,\n default: 1,\n },\n /**\n * @description tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType(String),\n default: 'light',\n },\n /**\n * @description placement of tooltip\n */\n placement: {\n type: definePropType(String),\n values: placements,\n default: 'top',\n },\n /**\n * @description custom class name for tooltip\n */\n popperClass: useTooltipContentProps.popperClass,\n /**\n * @description custom style for tooltip\n */\n popperStyle: useTooltipContentProps.popperStyle,\n /**\n * @description custom class name for the collapse-avatar\n */\n collapseClass: String,\n /**\n * @description custom style for the collapse-avatar\n */\n collapseStyle: {\n type: definePropType([String, Array, Object]),\n },\n} as const)\nexport type AvatarGroupProps = ExtractPropTypes\nexport type AvatarGroupPropsPublic = ExtractPublicPropTypes<\n typeof avatarGroupProps\n>\n", "import {\n cloneVNode,\n defineComponent,\n isVNode,\n provide,\n reactive,\n toRef,\n} from 'vue'\nimport { flattedChildren } from '@element-plus/utils'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport ElAvatar from './avatar.vue'\nimport { avatarGroupContextKey } from './constants'\nimport { avatarGroupProps } from './avatar-group-props'\n\nexport default defineComponent({\n name: 'ElAvatarGroup',\n props: avatarGroupProps,\n setup(props, { slots }) {\n const ns = useNamespace('avatar-group')\n\n provide(\n avatarGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n shape: toRef(props, 'shape'),\n })\n )\n\n return () => {\n const avatars = flattedChildren(slots.default?.() ?? [])\n let visibleAvatars = avatars\n\n const showCollapseAvatar =\n props.collapseAvatars && avatars.length > props.maxCollapseAvatars\n\n if (showCollapseAvatar) {\n visibleAvatars = avatars.slice(0, props.maxCollapseAvatars)\n const hiddenAvatars = avatars.slice(props.maxCollapseAvatars)\n\n visibleAvatars.push(\n \n {{\n default: () => (\n \n + {hiddenAvatars.length}\n \n ),\n content: () => (\n \n {hiddenAvatars.map((node, idx) =>\n isVNode(node)\n ? cloneVNode(node, { key: node.key ?? idx })\n : node\n )}\n \n ),\n }}\n \n )\n }\n\n return {visibleAvatars}\n }\n },\n})\n", "import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Avatar from './src/avatar.vue'\nimport AvatarGroup from './src/avatar-group'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElAvatar: SFCWithInstall & {\n AvatarGroup: typeof AvatarGroup\n} = withInstall(Avatar, {\n AvatarGroup,\n})\nexport const ElAvatarGroup: SFCWithInstall =\n withNoopInstall(AvatarGroup)\nexport default ElAvatar\n\nexport * from './src/avatar'\nexport * from './src/constants'\nexport * from './src/avatar-group-props'\nexport type { AvatarInstance, AvatarGroupInstance } from './src/instance'\n", "import type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const backtopProps = {\n /**\n * @description the button will not show until the scroll height reaches this value.\n */\n visibilityHeight: {\n type: Number,\n default: 200,\n },\n /**\n * @description the target to trigger scroll.\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description right distance.\n */\n right: {\n type: Number,\n default: 40,\n },\n /**\n * @description bottom distance.\n */\n bottom: {\n type: Number,\n default: 40,\n },\n} as const\nexport type BacktopProps = ExtractPropTypes\nexport type BacktopPropsPublic = ExtractPublicPropTypes\n\nexport const backtopEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type BacktopEmits = typeof backtopEmits\n", "import { onMounted, ref, shallowRef } from 'vue'\nimport { useEventListener, useThrottleFn } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\n\nimport type { SetupContext } from 'vue'\nimport type { BacktopEmits, BacktopProps } from './backtop'\n\nexport const useBackTop = (\n props: BacktopProps,\n emit: SetupContext['emit'],\n componentName: string\n) => {\n const el = shallowRef()\n const container = shallowRef
\n \n {{ description }}\n \n