de(" <div> "), !_ctx.collapseTags ? (openBlock(), createBlock(Transition, { key: 1, onAfterLeave: _ctx.resetInputHeight }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass([ _ctx.nsSelect.b("tags-wrapper"), { "has-prefix": _ctx.prefixWidth && _ctx.selected.length } ]) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item) => { return openBlock(), createBlock(_component_el_tag, { key: _ctx.getValueKey(item), closable: !_ctx.selectDisabled && !item.isDisabled, size: _ctx.collapseTagSize, hit: item.hitState, type: _ctx.tagType, "disable-transitions": "", onClose: ($event) => _ctx.deleteTag($event, item) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")), style: normalizeStyle({ maxWidth: _ctx.inputWidth - 75 + "px" }) }, toDisplayString(item.currentLabel), 7) ]), _: 2 }, 1032, ["closable", "size", "hit", "type", "onClose"]); }), 128)) ], 2) ]), _: 1 }, 8, ["onAfterLeave"])) : createCommentVNode("v-if", true), createCommentVNode(" </div> "), _ctx.filterable ? withDirectives((openBlock(), createElementBlock("input", { key: 2, ref: "input", "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.query = $event), type: "text", class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]), disabled: _ctx.selectDisabled, autocomplete: _ctx.autocomplete, style: normalizeStyle({ marginLeft: _ctx.prefixWidth && !_ctx.selected.length || _ctx.tagInMultiLine ? `${_ctx.prefixWidth}px` : "", flexGrow: 1, width: `${_ctx.inputLength / (_ctx.inputWidth - 32)}%`, maxWidth: `${_ctx.inputWidth - 42}px` }), onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)), onKeyup: _cache[4] || (_cache[4] = (...args) => _ctx.managePlaceholder && _ctx.managePlaceholder(...args)), onKeydown: [ _cache[5] || (_cache[5] = (...args) => _ctx.resetInputState && _ctx.resetInputState(...args)), _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])), _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"])), _cache[8] || (_cache[8] = withKeys((...args) => _ctx.handleKeydownEscape && _ctx.handleKeydownEscape(...args), ["esc"])), _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.selectOption && _ctx.selectOption(...args), ["stop", "prevent"]), ["enter"])), _cache[10] || (_cache[10] = withKeys((...args) => _ctx.deletePrevTag && _ctx.deletePrevTag(...args), ["delete"])), _cache[11] || (_cache[11] = withKeys(($event) => _ctx.visible = false, ["tab"])) ], onCompositionstart: _cache[12] || (_cache[12] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)), onCompositionupdate: _cache[13] || (_cache[13] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)), onCompositionend: _cache[14] || (_cache[14] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)), onInput: _cache[15] || (_cache[15] = (...args) => _ctx.debouncedQueryChange && _ctx.debouncedQueryChange(...args)) }, null, 46, _hoisted_147)), [ [vModelText, _ctx.query] ]) : createCommentVNode("v-if", true) ], 6)) : createCommentVNode("v-if", true), createVNode(_component_el_input, { id: _ctx.id, ref: "reference", modelValue: _ctx.selectedLabel, "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => _ctx.selectedLabel = $event), type: "text", placeholder: typeof _ctx.currentPlaceholder === "function" ? _ctx.currentPlaceholder() : _ctx.currentPlaceholder, name: _ctx.name, autocomplete: _ctx.autocomplete, size: _ctx.selectSize, disabled: _ctx.selectDisabled, readonly: _ctx.readonly, "validate-event": false, class: normalizeClass([_ctx.nsSelect.is("focus", _ctx.visible)]), tabindex: _ctx.multiple && _ctx.filterable ? -1 : void 0, onFocus: _ctx.handleFocus, onBlur: _ctx.handleBlur, onInput: _ctx.debouncedOnInputChange, onPaste: _ctx.debouncedOnInputChange, onCompositionstart: _ctx.handleComposition, onCompositionupdate: _ctx.handleComposition, onCompositionend: _ctx.handleComposition, onKeydown: [ _cache[17] || (_cache[17] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["stop", "prevent"]), ["down"])), _cache[18] || (_cache[18] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["stop", "prevent"]), ["up"])), withKeys(withModifiers(_ctx.selectOption, ["stop", "prevent"]), ["enter"]), withKeys(_ctx.handleKeydownEscape, ["esc"]), _cache[19] || (_cache[19] = withKeys(($event) => _ctx.visible = false, ["tab"])) ] }, createSlots({ suffix: withCtx(() => [ _ctx.iconComponent && !_ctx.showClose ? (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.showClose && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, { key: 1, class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon")]), onClick: _ctx.handleClearClick }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon))) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ]), _: 2 }, [ _ctx.$slots.prefix ? { name: "prefix", fn: withCtx(() => [ createBaseVNode("div", _hoisted_229, [ renderSlot(_ctx.$slots, "prefix") ]) ]) } : void 0 ]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"]) ], 32) ]), content: withCtx(() => [ createVNode(_component_el_select_menu, null, { default: withCtx(() => [ withDirectives(createVNode(_component_el_scrollbar, { ref: "scrollbar", tag: "ul", "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"), "view-class": _ctx.nsSelect.be("dropdown", "list"), class: normalizeClass([ _ctx.nsSelect.is("empty", !_ctx.allowCreate && Boolean(_ctx.query) && _ctx.filteredOptionsCount === 0) ]) }, { default: withCtx(() => [ _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, { key: 0, value: _ctx.query, created: true }, null, 8, ["value"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["wrap-class", "view-class", "class"]), [ [vShow, _ctx.options.size > 0 && !_ctx.loading] ]), _ctx.emptyText && (!_ctx.allowCreate || _ctx.loading || _ctx.allowCreate && _ctx.options.size === 0) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ _ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1, class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) }, toDisplayString(_ctx.emptyText), 3)) ], 64)) : createCommentVNode("v-if", true) ]), _: 3 }) ]), _: 3 }, 8, ["visible", "placement", "teleported", "popper-class", "effect", "transition", "persistent", "onShow"]) ], 34)), [ [_directive_click_outside, _ctx.handleClose, _ctx.popperPaneRef] ]); } var Select = _export_sfc(_sfc_main96, [["render", _sfc_render24], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select/src/option-group.mjs var _sfc_main97 = defineComponent({ name: "ElOptionGroup", componentName: "ElOptionGroup", props: { label: String, disabled: { type: Boolean, default: false } }, setup(props) { const ns2 = useNamespace("select"); const visible = ref(true); const instance = getCurrentInstance(); const children = ref([]); provide(selectGroupKey, reactive({ ...toRefs(props) })); const select = inject(selectKey); onMounted(() => { children.value = flattedChildren2(instance.subTree); }); const flattedChildren2 = (node) => { const children2 = []; if (Array.isArray(node.children)) { node.children.forEach((child) => { var _a3; if (child.type && child.type.name === "ElOption" && child.component && child.component.proxy) { children2.push(child.component.proxy); } else if ((_a3 = child.children) == null ? void 0 : _a3.length) { children2.push(...flattedChildren2(child)); } }); } return children2; }; const { groupQueryChange } = toRaw(select); watch(groupQueryChange, () => { visible.value = children.value.some((option) => option.visible === true); }, { flush: "post" }); return { visible, ns: ns2 }; } }); function _sfc_render25(_ctx, _cache, $props, $setup, $data, $options) { return withDirectives((openBlock(), createElementBlock("ul", { 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_main97, [["render", _sfc_render25], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/usePagination.mjs var usePagination = () => inject(elPaginationKey, {}); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 }, disabled: Boolean, size: { type: String, values: componentSizes } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs var __default__63 = defineComponent({ name: "ElPaginationSizes" }); var _sfc_main98 = defineComponent({ ...__default__63, props: paginationSizesProps, emits: ["page-size-change"], setup(__props, { emit }) { const props = __props; const { t } = useLocale(); const ns2 = useNamespace("pagination"); const pagination = usePagination(); const innerPageSize = ref(props.pageSize); watch(() => props.pageSizes, (newVal, oldVal) => { if (isEqual_default(newVal, oldVal)) return; if (Array.isArray(newVal)) { const pageSize = newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0]; emit("page-size-change", pageSize); } }); watch(() => props.pageSize, (newVal) => { innerPageSize.value = newVal; }); const innerPageSizes = computed(() => props.pageSizes); function handleChange(val) { var _a3; if (val !== innerPageSize.value) { innerPageSize.value = val; (_a3 = pagination.handleSizeChange) == null ? void 0 : _a3.call(pagination, Number(val)); } } return (_ctx, _cache) => { return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns2).e("sizes")) }, [ createVNode(unref(ElSelect), { "model-value": innerPageSize.value, disabled: _ctx.disabled, "popper-class": _ctx.popperClass, size: _ctx.size, "validate-event": false, onChange: handleChange }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(innerPageSizes), (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", "size"]) ], 2); }; } }); var Sizes = _export_sfc(_sfc_main98, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/components/jumper.mjs var paginationJumperProps = buildProps({ size: { type: String, values: componentSizes } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs var _hoisted_148 = ["disabled"]; var __default__64 = defineComponent({ name: "ElPaginationJumper" }); var _sfc_main99 = defineComponent({ ...__default__64, props: paginationJumperProps, setup(__props) { const { t } = useLocale(); const ns2 = useNamespace("pagination"); const { pageCount, disabled, currentPage, changeEvent } = usePagination(); const userInput = ref(); const innerValue = computed(() => { var _a3; return (_a3 = userInput.value) != null ? _a3 : currentPage == null ? void 0 : currentPage.value; }); function handleInput(val) { userInput.value = +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(ns2).e("jump")), disabled: unref(disabled) }, [ createBaseVNode("span", { class: normalizeClass([unref(ns2).e("goto")]) }, toDisplayString(unref(t)("el.pagination.goto")), 3), createVNode(unref(ElInput), { size: _ctx.size, class: normalizeClass([unref(ns2).e("editor"), unref(ns2).is("in-pagination")]), min: 1, max: unref(pageCount), disabled: unref(disabled), "model-value": unref(innerValue), "validate-event": false, type: "number", "onUpdate:modelValue": handleInput, onChange: handleChange }, null, 8, ["size", "class", "max", "disabled", "model-value"]), createBaseVNode("span", { class: normalizeClass([unref(ns2).e("classifier")]) }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3) ], 10, _hoisted_148); }; } }); var Jumper = _export_sfc(_sfc_main99, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/components/total.mjs var paginationTotalProps = buildProps({ total: { type: Number, default: 1e3 } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/components/total2.mjs var _hoisted_149 = ["disabled"]; var __default__65 = defineComponent({ name: "ElPaginationTotal" }); var _sfc_main100 = defineComponent({ ...__default__65, props: paginationTotalProps, setup(__props) { const { t } = useLocale(); const ns2 = useNamespace("pagination"); const { disabled } = usePagination(); return (_ctx, _cache) => { return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns2).e("total")), disabled: unref(disabled) }, toDisplayString(unref(t)("el.pagination.total", { total: _ctx.total })), 11, _hoisted_149); }; } }); var Total = _export_sfc(_sfc_main100, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/components/pager2.mjs var _hoisted_150 = ["onKeyup"]; var _hoisted_230 = ["aria-current", "tabindex"]; var _hoisted_314 = ["tabindex"]; var _hoisted_47 = ["aria-current", "tabindex"]; var _hoisted_54 = ["tabindex"]; var _hoisted_62 = ["aria-current", "tabindex"]; var __default__66 = defineComponent({ name: "ElPaginationPager" }); var _sfc_main101 = defineComponent({ ...__default__66, props: paginationPagerProps, emits: ["change"], setup(__props, { emit }) { const props = __props; const nsPager = useNamespace("pager"); const nsIcon = useNamespace("icon"); 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 = props.pagerCount; const halfPagerCount = (pagerCount - 1) / 2; const currentPage = Number(props.currentPage); const pageCount = Number(props.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 offset2 = Math.floor(pagerCount / 2) - 1; for (let i = currentPage - offset2; i <= currentPage + offset2; i++) { array4.push(i); } } else { for (let i = 2; i < pageCount; i++) { array4.push(i); } } return array4; }); const tabindex = computed(() => props.disabled ? -1 : 0); watchEffect(() => { const halfPagerCount = (props.pagerCount - 1) / 2; showPrevMore.value = false; showNextMore.value = false; if (props.pageCount > props.pagerCount) { if (props.currentPage > props.pagerCount - halfPagerCount) { showPrevMore.value = true; } if (props.currentPage < props.pageCount - halfPagerCount) { showNextMore.value = true; } } }); function onMouseEnter(forward = false) { if (props.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 !== props.currentPage) { emit("change", 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" || props.disabled) { return; } let newPage = Number(target2.textContent); const pageCount = props.pageCount; const currentPage = props.currentPage; const pagerCountOffset = props.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", 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, tabindex: unref(tabindex) }, " 1 ", 10, _hoisted_230)) : createCommentVNode("v-if", true), showPrevMore.value ? (openBlock(), createElementBlock("li", { key: 1, class: normalizeClass([ "more", "btn-quickprev", unref(nsIcon).b(), unref(nsPager).is("disabled", _ctx.disabled) ]), tabindex: unref(tabindex), 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_314)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagers), (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, tabindex: unref(tabindex) }, toDisplayString(pager), 11, _hoisted_47); }), 128)), showNextMore.value ? (openBlock(), createElementBlock("li", { key: 2, class: normalizeClass([ "more", "btn-quicknext", unref(nsIcon).b(), unref(nsPager).is("disabled", _ctx.disabled) ]), tabindex: unref(tabindex), 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_54)) : 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, tabindex: unref(tabindex) }, toDisplayString(_ctx.pageCount), 11, _hoisted_62)) : createCommentVNode("v-if", true) ], 42, _hoisted_150); }; } }); var Pager = _export_sfc(_sfc_main101, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/src/pagination.mjs var isAbsent = (v2) => typeof v2 !== "number"; var paginationProps = buildProps({ total: Number, pageSize: Number, defaultPageSize: Number, currentPage: Number, defaultCurrentPage: Number, pageCount: Number, pagerCount: { type: Number, validator: (value) => { return isNumber2(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1; }, default: 7 }, 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: "" }, prevText: { type: String, default: "" }, prevIcon: { type: iconPropType, default: () => arrow_left_default }, nextText: { type: String, default: "" }, nextIcon: { type: iconPropType, default: () => arrow_right_default }, small: Boolean, background: Boolean, disabled: Boolean, hideOnSinglePage: Boolean }); var paginationEmits = { "update:current-page": (val) => isNumber2(val), "update:page-size": (val) => isNumber2(val), "size-change": (val) => isNumber2(val), "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(props, { emit, slots }) { const { t } = useLocale(); const ns2 = useNamespace("pagination"); const vnodeProps = getCurrentInstance().vnode.props || {}; 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(props.total) && isAbsent(props.pageCount)) return false; if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false; if (props.layout.includes("sizes")) { if (!isAbsent(props.pageCount)) { if (!hasPageSizeListener) return false; } else if (!isAbsent(props.total)) { if (!isAbsent(props.pageSize)) { if (!hasPageSizeListener) { return false; } } else { } } } return true; }); const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize); const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage); const pageSizeBridge = computed({ get() { return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize; }, set(v2) { if (isAbsent(props.pageSize)) { innerPageSize.value = v2; } if (hasPageSizeListener) { emit("update:page-size", v2); emit("size-change", v2); } } }); const pageCountBridge = computed(() => { let pageCount = 0; if (!isAbsent(props.pageCount)) { pageCount = props.pageCount; } else if (!isAbsent(props.total)) { pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value)); } return pageCount; }); const currentPageBridge = computed({ get() { return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage; }, set(v2) { let newCurrentPage = v2; if (v2 < 1) { newCurrentPage = 1; } else if (v2 > pageCountBridge.value) { newCurrentPage = pageCountBridge.value; } if (isAbsent(props.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; }); 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 (props.disabled) return; currentPageBridge.value -= 1; emit("prev-click", currentPageBridge.value); } function next() { if (props.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(() => props.disabled), currentPage: currentPageBridge, changeEvent: handleCurrentChange2, handleSizeChange }); return () => { var _a3, _b; if (!assertValidUsage.value) { debugWarn(componentName, t("el.pagination.deprecationWarning")); return null; } if (!props.layout) return null; if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null; const rootChildren = []; const rightWrapperChildren = []; const rightWrapperRoot = h("div", { class: ns2.e("rightwrapper") }, rightWrapperChildren); const TEMPLATE_MAP = { prev: h(Prev, { disabled: props.disabled, currentPage: currentPageBridge.value, prevText: props.prevText, prevIcon: props.prevIcon, onClick: prev }), jumper: h(Jumper, { size: props.small ? "small" : "default" }), pager: h(Pager, { currentPage: currentPageBridge.value, pageCount: pageCountBridge.value, pagerCount: props.pagerCount, onChange: handleCurrentChange2, disabled: props.disabled }), next: h(Next, { disabled: props.disabled, currentPage: currentPageBridge.value, pageCount: pageCountBridge.value, nextText: props.nextText, nextIcon: props.nextIcon, onClick: next }), sizes: h(Sizes, { pageSize: pageSizeBridge.value, pageSizes: props.pageSizes, popperClass: props.popperClass, disabled: props.disabled, size: props.small ? "small" : "default" }), slot: (_b = (_a3 = slots == null ? void 0 : slots.default) == null ? void 0 : _a3.call(slots)) != null ? _b : null, total: h(Total, { total: isAbsent(props.total) ? 0 : props.total }) }; const components = props.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], ns2.is("first")); addClass2(rootChildren[rootChildren.length - 1], ns2.is("last")); if (haveRightWrapper && rightWrapperChildren.length > 0) { addClass2(rightWrapperChildren[0], ns2.is("first")); addClass2(rightWrapperChildren[rightWrapperChildren.length - 1], ns2.is("last")); rootChildren.push(rightWrapperRoot); } return h("div", { role: "pagination", "aria-label": "pagination", class: [ ns2.b(), ns2.is("background", props.background), { [ns2.m("small")]: props.small } ] }, rootChildren); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/pagination/index.mjs var ElPagination = withInstall(Pagination); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/popconfirm/src/popconfirm.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: { type: Boolean, default: false }, hideAfter: { type: Number, default: 200 }, onConfirm: { type: definePropType(Function) }, onCancel: { type: definePropType(Function) }, teleported: useTooltipContentProps.teleported, persistent: useTooltipContentProps.persistent, width: { type: [String, Number], default: 150 } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs var __default__67 = defineComponent({ name: "ElPopconfirm" }); var _sfc_main102 = defineComponent({ ...__default__67, props: popconfirmProps, setup(__props) { const props = __props; const { t } = useLocale(); const ns2 = useNamespace("popconfirm"); const tooltipRef = ref(); const hidePopper = () => { var _a3, _b; (_b = (_a3 = tooltipRef.value) == null ? void 0 : _a3.onClose) == null ? void 0 : _b.call(_a3); }; const style = computed(() => { return { width: addUnit(props.width) }; }); const confirm = (e) => { var _a3; (_a3 = props.onConfirm) == null ? void 0 : _a3.call(props, e); hidePopper(); }; const cancel = (e) => { var _a3; (_a3 = props.onCancel) == null ? void 0 : _a3.call(props, e); hidePopper(); }; const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText")); const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText")); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ElTooltip), mergeProps({ ref_key: "tooltipRef", ref: tooltipRef, trigger: "click", effect: "light" }, _ctx.$attrs, { "popper-class": `${unref(ns2).namespace.value}-popover`, "popper-style": unref(style), teleported: _ctx.teleported, "fallback-placements": ["bottom", "top", "right", "left"], "hide-after": _ctx.hideAfter, persistent: _ctx.persistent }), { content: withCtx(() => [ createBaseVNode("div", { class: normalizeClass(unref(ns2).b()) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns2).e("main")) }, [ !_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns2).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(ns2).e("action")) }, [ createVNode(unref(ElButton), { size: "small", type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType, text: _ctx.cancelButtonType === "text", onClick: cancel }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(finalCancelButtonText)), 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(unref(finalConfirmButtonText)), 1) ]), _: 1 }, 8, ["type", "text"]) ], 2) ], 2) ]), default: withCtx(() => [ _ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true) ]), _: 3 }, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]); }; } }); var Popconfirm = _export_sfc(_sfc_main102, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popconfirm/src/popconfirm.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/popconfirm/index.mjs var ElPopconfirm = withInstall(Popconfirm); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/popover/src/popover.mjs var popoverProps = buildProps({ trigger: useTooltipTriggerProps.trigger, 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, 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/popover/src/popover2.mjs var updateEventKeyRaw = `onUpdate:visible`; var __default__68 = defineComponent({ name: "ElPopover" }); var _sfc_main103 = defineComponent({ ...__default__68, props: popoverProps, emits: popoverEmits, setup(__props, { expose, emit }) { const props = __props; const onUpdateVisible = computed(() => { return props[updateEventKeyRaw]; }); const ns2 = useNamespace("popover"); const tooltipRef = ref(); const popperRef = computed(() => { var _a3; return (_a3 = unref(tooltipRef)) == null ? void 0 : _a3.popperRef; }); const style = computed(() => { return [ { width: addUnit(props.width) }, props.popperStyle ]; }); const kls = computed(() => { return [ns2.b(), props.popperClass, { [ns2.m("plain")]: !!props.content }]; }); const gpuAcceleration = computed(() => { return props.transition === `${ns2.namespace.value}-fade-in-linear`; }); const hide2 = () => { var _a3; (_a3 = tooltipRef.value) == null ? void 0 : _a3.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, 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": unref(kls), "popper-style": unref(style), teleported: _ctx.teleported, persistent: _ctx.persistent, "gpu-acceleration": unref(gpuAcceleration), "onUpdate:visible": unref(onUpdateVisible), onBeforeShow: beforeEnter, onBeforeHide: beforeLeave, onShow: afterEnter, onHide: afterLeave }), { content: withCtx(() => [ _ctx.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).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", "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", "persistent", "gpu-acceleration", "onUpdate:visible"]); }; } }); var Popover = _export_sfc(_sfc_main103, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/popover/index.mjs var ElPopoverDirective = withInstallDirective(PopoverDirective, VPopover); var ElPopover = withInstall(Popover, { directive: ElPopoverDirective }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/progress/src/progress.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: { type: Boolean, default: false }, duration: { type: Number, default: 3 }, strokeWidth: { type: Number, default: 6 }, strokeLinecap: { type: definePropType(String), default: "round" }, textInside: { type: Boolean, default: false }, width: { type: Number, default: 126 }, showText: { type: Boolean, default: true }, color: { type: definePropType([ String, Array, Function ]), default: "" }, format: { type: definePropType(Function), default: (percentage) => `${percentage}%` } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/progress/src/progress2.mjs var _hoisted_151 = ["aria-valuenow"]; var _hoisted_231 = { viewBox: "0 0 100 100" }; var _hoisted_315 = ["d", "stroke", "stroke-width"]; var _hoisted_48 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"]; var _hoisted_55 = { key: 0 }; var __default__69 = defineComponent({ name: "ElProgress" }); var _sfc_main104 = defineComponent({ ...__default__69, props: progressProps, setup(__props) { const props = __props; const STATUS_COLOR_MAP = { success: "#13ce66", exception: "#ff4949", warning: "#e6a23c", default: "#20a0ff" }; const ns2 = useNamespace("progress"); const barStyle = computed(() => ({ width: `${props.percentage}%`, animationDuration: `${props.duration}s`, backgroundColor: getCurrentColor(props.percentage) })); const relativeStrokeWidth = computed(() => (props.strokeWidth / props.width * 100).toFixed(1)); const radius = computed(() => { if (["circle", "dashboard"].includes(props.type)) { return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10); } return 0; }); const trackPath = computed(() => { const r = radius.value; const isDashboard = props.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(() => props.type === "dashboard" ? 0.75 : 1); const strokeDashoffset = computed(() => { const offset2 = -1 * perimeter.value * (1 - rate.value) / 2; return `${offset2}px`; }); const trailPathStyle = computed(() => ({ strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`, strokeDashoffset: strokeDashoffset.value })); const circlePathStyle = computed(() => ({ strokeDasharray: `${perimeter.value * rate.value * (props.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 (props.color) { ret = getCurrentColor(props.percentage); } else { ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default; } return ret; }); const statusIcon = computed(() => { if (props.status === "warning") { return warning_filled_default; } if (props.type === "line") { return props.status === "success" ? circle_check_default : circle_close_default; } else { return props.status === "success" ? check_default : close_default; } }); const progressTextSize = computed(() => { return props.type === "line" ? 12 + props.strokeWidth * 0.4 : props.width * 0.111111 + 2; }); const content = computed(() => props.format(props.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 _a3; const { color } = props; 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 (_a3 = colors[colors.length - 1]) == null ? void 0 : _a3.color; } }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([ unref(ns2).b(), unref(ns2).m(_ctx.type), unref(ns2).is(_ctx.status), { [unref(ns2).m("without-text")]: !_ctx.showText, [unref(ns2).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(ns2).b("bar")) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns2).be("bar", "outer")), style: normalizeStyle({ height: `${_ctx.strokeWidth}px` }) }, [ createBaseVNode("div", { class: normalizeClass([ unref(ns2).be("bar", "inner"), { [unref(ns2).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate } ]), style: normalizeStyle(unref(barStyle)) }, [ (_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).be("bar", "innerText")) }, [ renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [ createBaseVNode("span", null, toDisplayString(unref(content)), 1) ]) ], 2)) : createCommentVNode("v-if", true) ], 6) ], 6) ], 2)) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(ns2).b("circle")), style: normalizeStyle({ height: `${_ctx.width}px`, width: `${_ctx.width}px` }) }, [ (openBlock(), createElementBlock("svg", _hoisted_231, [ createBaseVNode("path", { class: normalizeClass(unref(ns2).be("circle", "track")), d: unref(trackPath), stroke: `var(${unref(ns2).cssVarName("fill-color-light")}, #e5e9f2)`, "stroke-width": unref(relativeStrokeWidth), fill: "none", style: normalizeStyle(unref(trailPathStyle)) }, null, 14, _hoisted_315), createBaseVNode("path", { class: normalizeClass(unref(ns2).be("circle", "path")), d: unref(trackPath), stroke: unref(stroke), fill: "none", opacity: _ctx.percentage ? 1 : 0, "stroke-linecap": _ctx.strokeLinecap, "stroke-width": unref(relativeStrokeWidth), style: normalizeStyle(unref(circlePathStyle)) }, null, 14, _hoisted_48) ])) ], 6)), (_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (openBlock(), createElementBlock("div", { key: 2, class: normalizeClass(unref(ns2).e("text")), style: normalizeStyle({ fontSize: `${unref(progressTextSize)}px` }) }, [ renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [ !_ctx.status ? (openBlock(), createElementBlock("span", _hoisted_55, toDisplayString(unref(content)), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(statusIcon)))) ]), _: 1 })) ]) ], 6)) : createCommentVNode("v-if", true) ], 10, _hoisted_151); }; } }); var Progress = _export_sfc(_sfc_main104, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/progress/index.mjs var ElProgress = withInstall(Progress); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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: Boolean, 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, label: { type: String, default: void 0 }, clearable: { type: Boolean, default: false } }); var rateEmits = { [CHANGE_EVENT]: (value) => isNumber2(value), [UPDATE_MODEL_EVENT]: (value) => isNumber2(value) }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/rate/src/rate2.mjs var _hoisted_153 = ["id", "aria-label", "aria-labelledby", "aria-valuenow", "aria-valuetext", "aria-valuemax"]; var _hoisted_233 = ["onMousemove", "onClick"]; var __default__70 = defineComponent({ name: "ElRate" }); var _sfc_main105 = defineComponent({ ...__default__70, props: rateProps, emits: rateEmits, setup(__props, { expose, emit }) { const props = __props; 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 formContext = inject(formContextKey, void 0); const formItemContext = inject(formItemContextKey, void 0); const rateSize = useSize(); const ns2 = useNamespace("rate"); const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext }); const currentValue = ref(props.modelValue); const hoverIndex = ref(-1); const pointerAtLeftHalf = ref(true); const rateClasses = computed(() => [ns2.b(), ns2.m(rateSize.value)]); const rateDisabled = computed(() => props.disabled || (formContext == null ? void 0 : formContext.disabled)); const rateStyles = computed(() => { return ns2.cssVarBlock({ "void-color": props.voidColor, "disabled-void-color": props.disabledVoidColor, "fill-color": activeColor.value }); }); const text = computed(() => { let result2 = ""; if (props.showScore) { result2 = props.scoreTemplate.replace(/\{\s*value\s*\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`); } else if (props.showText) { result2 = props.texts[Math.ceil(currentValue.value) - 1]; } return result2; }); const valueDecimal = computed(() => props.modelValue * 100 - Math.floor(props.modelValue) * 100); const colorMap = computed(() => isArray(props.colors) ? { [props.lowThreshold]: props.colors[0], [props.highThreshold]: { value: props.colors[1], excluded: true }, [props.max]: props.colors[2] } : props.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 (props.allowHalf) { width = "50%"; } return { color: activeColor.value, width }; }); const componentMap = computed(() => { let icons = isArray(props.icons) ? [...props.icons] : { ...props.icons }; icons = markRaw(icons); return isArray(icons) ? { [props.lowThreshold]: icons[0], [props.highThreshold]: { value: icons[1], excluded: true }, [props.max]: icons[2] } : icons; }); const decimalIconComponent = computed(() => getValueFromMap(props.modelValue, componentMap.value)); const voidComponent = computed(() => rateDisabled.value ? isString(props.disabledVoidIcon) ? props.disabledVoidIcon : markRaw(props.disabledVoidIcon) : isString(props.voidIcon) ? props.voidIcon : markRaw(props.voidIcon)); const activeComponent = computed(() => getValueFromMap(currentValue.value, componentMap.value)); function showDecimalIcon(item) { const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue; const showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - 0.5 <= currentValue.value && item > currentValue.value; return showWhenDisabled || showWhenAllowHalf; } function emitValue(value) { if (props.clearable && value === props.modelValue) { value = 0; } emit(UPDATE_MODEL_EVENT, value); if (props.modelValue !== value) { emit("change", value); } } function selectValue(value) { if (rateDisabled.value) { return; } if (props.allowHalf && pointerAtLeftHalf.value) { emitValue(currentValue.value); } else { emitValue(value); } } function handleKey(e) { if (rateDisabled.value) { return; } let _currentValue = currentValue.value; const code = e.code; if (code === EVENT_CODE.up || code === EVENT_CODE.right) { if (props.allowHalf) { _currentValue += 0.5; } else { _currentValue += 1; } e.stopPropagation(); e.preventDefault(); } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) { if (props.allowHalf) { _currentValue -= 0.5; } else { _currentValue -= 1; } e.stopPropagation(); e.preventDefault(); } _currentValue = _currentValue < 0 ? 0 : _currentValue; _currentValue = _currentValue > props.max ? props.max : _currentValue; emit(UPDATE_MODEL_EVENT, _currentValue); emit("change", _currentValue); return _currentValue; } function setCurrentValue(value, event) { if (rateDisabled.value) { return; } if (props.allowHalf && event) { let target2 = event.target; if (hasClass(target2, ns2.e("item"))) { target2 = target2.querySelector(`.${ns2.e("icon")}`); } if (target2.clientWidth === 0 || hasClass(target2, ns2.e("decimal"))) { target2 = target2.parentNode; } pointerAtLeftHalf.value = event.offsetX * 2 <= target2.clientWidth; currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value; } else { currentValue.value = value; } hoverIndex.value = value; } function resetCurrentValue() { if (rateDisabled.value) { return; } if (props.allowHalf) { pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue); } currentValue.value = props.modelValue; hoverIndex.value = -1; } watch(() => props.modelValue, (val) => { currentValue.value = val; pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue); }); if (!props.modelValue) { emit(UPDATE_MODEL_EVENT, 0); } expose({ setCurrentValue, resetCurrentValue }); return (_ctx, _cache) => { var _a3; return openBlock(), createElementBlock("div", { id: unref(inputId), class: normalizeClass([unref(rateClasses), unref(ns2).is("disabled", unref(rateDisabled))]), role: "slider", "aria-label": !unref(isLabeledByFormItem) ? _ctx.label || "rating" : void 0, "aria-labelledby": unref(isLabeledByFormItem) ? (_a3 = unref(formItemContext)) == null ? void 0 : _a3.labelId : void 0, "aria-valuenow": currentValue.value, "aria-valuetext": unref(text) || void 0, "aria-valuemin": "0", "aria-valuemax": _ctx.max, tabindex: "0", style: normalizeStyle(unref(rateStyles)), onKeydown: handleKey }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.max, (item, key) => { return openBlock(), createElementBlock("span", { key, class: normalizeClass(unref(ns2).e("item")), onMousemove: ($event) => setCurrentValue(item, $event), onMouseleave: resetCurrentValue, onClick: ($event) => selectValue(item) }, [ createVNode(unref(ElIcon), { class: normalizeClass([ unref(ns2).e("icon"), { hover: hoverIndex.value === item }, unref(ns2).is("active", item <= currentValue.value) ]) }, { default: withCtx(() => [ !showDecimalIcon(item) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(activeComponent)), null, null, 512)), [ [vShow, item <= currentValue.value] ]), withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(voidComponent)), null, null, 512)), [ [vShow, !(item <= currentValue.value)] ]) ], 64)) : createCommentVNode("v-if", true), showDecimalIcon(item) ? (openBlock(), createBlock(unref(ElIcon), { key: 1, style: normalizeStyle(unref(decimalStyle)), class: normalizeClass([unref(ns2).e("icon"), unref(ns2).e("decimal")]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(decimalIconComponent)))) ]), _: 1 }, 8, ["style", "class"])) : createCommentVNode("v-if", true) ]), _: 2 }, 1032, ["class"]) ], 42, _hoisted_233); }), 128)), _ctx.showText || _ctx.showScore ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass(unref(ns2).e("text")) }, toDisplayString(unref(text)), 3)) : createCommentVNode("v-if", true) ], 46, _hoisted_153); }; } }); var Rate = _export_sfc(_sfc_main105, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/rate/src/rate.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/rate/index.mjs var ElRate = withInstall(Rate); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/result/src/result.mjs var IconMap = { success: "icon-success", warning: "icon-warning", error: "icon-error", info: "icon-info" }; var IconComponentMap = { [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: ["success", "warning", "info", "error"], default: "info" } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/result/src/result2.mjs var __default__71 = defineComponent({ name: "ElResult" }); var _sfc_main106 = defineComponent({ ...__default__71, props: resultProps, setup(__props) { const props = __props; const ns2 = useNamespace("result"); const resultIcon = computed(() => { const icon = props.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(ns2).b()) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns2).e("icon")) }, [ renderSlot(_ctx.$slots, "icon", {}, () => [ unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), { key: 0, class: normalizeClass(unref(resultIcon).class) }, null, 8, ["class"])) : createCommentVNode("v-if", true) ]) ], 2), _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).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(ns2).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(ns2).e("extra")) }, [ renderSlot(_ctx.$slots, "extra") ], 2)) : createCommentVNode("v-if", true) ], 2); }; } }); var Result = _export_sfc(_sfc_main106, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/result/src/result.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/result/index.mjs var ElResult = withInstall(Result); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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, default: "top" } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/row/src/row2.mjs var __default__72 = defineComponent({ name: "ElRow" }); var _sfc_main107 = defineComponent({ ...__default__72, props: rowProps, setup(__props) { const props = __props; const ns2 = useNamespace("row"); const gutter = computed(() => props.gutter); provide(rowContextKey, { gutter }); const style = computed(() => { const styles = {}; if (!props.gutter) { return styles; } styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`; return styles; }); const rowKls = computed(() => [ ns2.b(), ns2.is(`justify-${props.justify}`, props.justify !== "start"), ns2.is(`align-${props.align}`, props.align !== "top") ]); return (_ctx, _cache) => { return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { class: normalizeClass(unref(rowKls)), style: normalizeStyle(unref(style)) }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["class", "style"]); }; } }); var Row = _export_sfc(_sfc_main107, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/row/index.mjs var ElRow = withInstall(Row); // node_modules/.pnpm/memoize-one@6.0.0/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 clear2() { cache2 = null; }; return memoized; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/virtual-list/src/hooks/use-cache.mjs var useCache = () => { const vm = getCurrentInstance(); const props = vm.proxy.$props; return computed(() => { const _getItemStyleCache = (_2, __, ___) => ({}); return props.perfMode ? memoize_default(_getItemStyleCache) : memoizeOne(_getItemStyleCache); }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 PageKey = { [HORIZONTAL]: "pageX", [VERTICAL]: "pageY" }; var ScrollbarSizeKey = { [HORIZONTAL]: "height", [VERTICAL]: "width" }; var ScrollbarDirKey = { [HORIZONTAL]: "left", [VERTICAL]: "top" }; var SCROLLBAR_MIN_SIZE = 20; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/virtual-list/src/hooks/use-wheel.mjs var LayoutKeys = { [HORIZONTAL]: "deltaX", [VERTICAL]: "deltaY" }; var useWheel = ({ atEndEdge, atStartEdge, layout: layout2 }, onWheelDelta) => { let frameHandle; let offset2 = 0; const hasReachedEdge = (offset22) => { const edgeReached = offset22 < 0 && atStartEdge.value || offset22 > 0 && atEndEdge.value; return edgeReached; }; const onWheel = (e) => { cAF(frameHandle); const newOffset = e[LayoutKeys[layout2.value]]; if (hasReachedEdge(offset2) && hasReachedEdge(offset2 + newOffset)) return; offset2 += newOffset; if (!isFirefox()) { e.preventDefault(); } frameHandle = rAF(() => { onWheelDelta(offset2); offset2 = 0; }); }; return { hasReachedEdge, onWheel }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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" }, style: { type: definePropType([Object, String, Array]) }, useIsScrolling: { type: Boolean, default: false }, width: { type: [Number, String], required: false }, perfMode: { type: Boolean, default: true }, scrollbarAlwaysOn: { type: Boolean, default: false } }); 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, ...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/.pnpm/element-plus@2.2.32_vue@3.2.44/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: size4, bar }, layout2) { const style = {}; const translate2 = `translate${bar.axis}(${move}px)`; style[bar.size] = size4; style.transform = translate2; style.msTransform = translate2; style.webkitTransform = translate2; if (layout2 === "horizontal") { style.height = "100%"; } else { style.width = "100%"; } return style; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props, { emit }) { const GAP2 = computed(() => props.startGap + props.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[props.layout]); const trackSize = computed(() => props.clientSize - unref(GAP2)); const trackStyle = computed(() => ({ position: "absolute", width: `${HORIZONTAL === props.layout ? trackSize.value : props.scrollbarSize}px`, height: `${HORIZONTAL === props.layout ? props.scrollbarSize : trackSize.value}px`, [ScrollbarDirKey[props.layout]]: "2px", right: "2px", bottom: "2px", borderRadius: "4px" })); const thumbSize = computed(() => { const ratio = props.ratio; const clientSize = props.clientSize; if (ratio >= 100) { return Number.POSITIVE_INFINITY; } if (ratio >= 50) { return ratio * clientSize / 100; } const SCROLLBAR_MAX_SIZE = clientSize / 3; return Math.floor(Math.min(Math.max(ratio * clientSize, 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 }, props.layout); return style; }); const totalSteps = computed(() => Math.floor(props.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); 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 offset2 = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1; const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage; const distance = offset2 - thumbClickPosition; frameHandle = rAF(() => { state.traveled = Math.max(props.startGap, Math.min(distance, totalSteps.value)); emit("scroll", distance, totalSteps.value); }); }; const clickTrackHandler = (e) => { const offset2 = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]); const thumbHalf = thumbRef.value[bar.value.offset] / 2; const distance = offset2 - thumbHalf; state.traveled = Math.max(0, Math.min(distance, totalSteps.value)); emit("scroll", distance, totalSteps.value); }; watch(() => props.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(), props.class, (props.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/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props, { emit, expose }) { validateProps(props); const instance = getCurrentInstance(); const ns2 = useNamespace("vl"); const dynamicSizeCache = ref(initCache(props, instance)); const getItemStyleCache = useCache(); const windowRef = ref(); const innerRef = ref(); const scrollbarRef = ref(); const states = ref({ isScrolling: false, scrollDir: "forward", scrollOffset: isNumber2(props.initScrollOffset) ? props.initScrollOffset : 0, updateRequested: false, isScrollbarDragging: false, scrollbarAlwaysOn: props.scrollbarAlwaysOn }); const itemsToRender = computed(() => { const { total: total2, cache: cache2 } = props; const { isScrolling, scrollDir, scrollOffset } = unref(states); if (total2 === 0) { return [0, 0, 0, 0]; } const startIndex = getStartIndexForOffset(props, scrollOffset, unref(dynamicSizeCache)); const stopIndex = getStopIndexForStartIndex(props, 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(props, unref(dynamicSizeCache))); const _isHorizontal = computed(() => isHorizontal(props.layout)); const windowStyle = computed(() => [ { position: "relative", [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll", WebkitOverflowScrolling: "touch", willChange: "transform" }, { direction: props.direction, height: isNumber2(props.height) ? `${props.height}px` : props.height, width: isNumber2(props.width) ? `${props.width}px` : props.width }, props.style ]); const innerStyle = computed(() => { const size4 = unref(estimatedTotalSize); const horizontal = unref(_isHorizontal); return { height: horizontal ? "100%" : `${size4}px`, pointerEvents: unref(states).isScrolling ? "none" : void 0, width: horizontal ? `${size4}px` : "100%" }; }); const clientSize = computed(() => _isHorizontal.value ? props.width : props.height); const { onWheel } = useWheel({ atStartEdge: computed(() => states.value.scrollOffset <= 0), atEndEdge: computed(() => states.value.scrollOffset >= estimatedTotalSize.value), layout: computed(() => props.layout) }, (offset2) => { var _a3, _b; ; (_b = (_a3 = scrollbarRef.value).onMouseUp) == null ? void 0 : _b.call(_a3); scrollTo(Math.min(states.value.scrollOffset + offset2, estimatedTotalSize.value - clientSize.value)); }); const emitEvents = () => { const { total: total2 } = props; 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 } = props; 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 offset2 = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo; scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset2)); }; const scrollTo = (offset2) => { offset2 = Math.max(offset2, 0); if (offset2 === unref(states).scrollOffset) { return; } states.value = { ...unref(states), scrollOffset: offset2, scrollDir: getScrollDir(unref(states).scrollOffset, offset2), updateRequested: true }; nextTick(resetIsScrolling); }; const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => { const { scrollOffset } = unref(states); idx = Math.max(0, Math.min(idx, props.total - 1)); scrollTo(getOffset3(props, idx, alignment, scrollOffset, unref(dynamicSizeCache))); }; const getItemStyle = (idx) => { const { direction: direction2, itemSize: itemSize3, layout: layout2 } = props; const itemStyleCache = getItemStyleCache.value(clearCache && itemSize3, clearCache && layout2, clearCache && direction2); let style; if (hasOwn(itemStyleCache, String(idx))) { style = itemStyleCache[idx]; } else { const offset2 = getItemOffset(props, idx, unref(dynamicSizeCache)); const size4 = getItemSize(props, idx, unref(dynamicSizeCache)); const horizontal = unref(_isHorizontal); const isRtl = direction2 === RTL; const offsetHorizontal = horizontal ? offset2 : 0; itemStyleCache[idx] = style = { position: "absolute", left: isRtl ? void 0 : `${offsetHorizontal}px`, right: isRtl ? `${offsetHorizontal}px` : void 0, top: !horizontal ? `${offset2}px` : 0, height: !horizontal ? `${size4}px` : "100%", width: horizontal ? `${size4}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 } = props; 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 } = props; 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; } } }); const api = { ns: ns2, clientSize, estimatedTotalSize, windowStyle, windowRef, innerRef, innerStyle, itemsToRender, scrollbarRef, states, getItemStyle, onScroll, onScrollbarScroll, onWheel, scrollTo, scrollToItem, resetScrollTop }; expose({ windowRef, innerRef, getItemStyleCache, scrollTo, scrollToItem, resetScrollTop, states }); return api; }, render(ctx) { var _a3; const { $slots, className, clientSize, containerElement, data, getItemStyle, innerElement, itemsToRender, innerStyle, layout: layout2, total: total2, onScroll, onScrollbarScroll, onWheel, states, useIsScrolling, windowStyle, ns: ns2 } = ctx; const [start, end2] = itemsToRender; const Container2 = resolveDynamicComponent(containerElement); const Inner = resolveDynamicComponent(innerElement); const children = []; if (total2 > 0) { for (let i = start; i <= end2; i++) { children.push((_a3 = $slots.default) == null ? void 0 : _a3.call($slots, { data, key: i, index: i, isScrolling: useIsScrolling ? states.isScrolling : void 0, style: getItemStyle(i) })); } } const InnerNode = [ h(Inner, { 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 }); const listContainer = h(Container2, { class: [ns2.e("window"), className], style: windowStyle, onScroll, onWheel, ref: "windowRef", key: 0 }, !isString(Container2) ? { default: () => [InnerNode] } : [InnerNode]); return h("div", { key: 0, class: [ns2.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""] }, [listContainer, scrollbar]); } }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 size4 = isHorizontal(layout2) ? width : height; if (isString(size4)) { throwError("[ElVirtualList]", ` You should set width/height to number when your layout is horizontal/vertical `); } const lastItemOffset = Math.max(0, total2 * itemSize3 - size4); const maxOffset = Math.min(lastItemOffset, index * itemSize3); const minOffset = Math.max(0, (index + 1) * itemSize3 - size4); if (alignment === SMART_ALIGNMENT) { if (scrollOffset >= minOffset - size4 && scrollOffset <= maxOffset + size4) { 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(size4 / 2)) { return 0; } else if (middleOffset > lastItemOffset + Math.floor(size4 / 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 }, offset2) => Math.max(0, Math.min(total2 - 1, Math.floor(offset2 / itemSize3))), getStopIndexForStartIndex: ({ height, total: total2, itemSize: itemSize3, layout: layout2, width }, startIndex, scrollOffset) => { const offset2 = startIndex * itemSize3; const size4 = isHorizontal(layout2) ? width : height; const numVisibleItems = Math.ceil((size4 + scrollOffset - offset2) / itemSize3); return Math.max(0, Math.min(total2 - 1, startIndex + numVisibleItems - 1)); }, initCache() { return void 0; }, clearCache: true, validateProps() { } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-list.mjs var SCOPE4 = "ElDynamicSizeList"; var getItemFromCache = (props, index, listCache) => { const { itemSize: itemSize3 } = props; const { items, lastVisitedIndex } = listCache; if (index > lastVisitedIndex) { let offset2 = 0; if (lastVisitedIndex >= 0) { const item = items[lastVisitedIndex]; offset2 = item.offset + item.size; } for (let i = lastVisitedIndex + 1; i <= index; i++) { const size4 = itemSize3(i); items[i] = { offset: offset2, size: size4 }; offset2 += size4; } listCache.lastVisitedIndex = index; } return items[index]; }; var findItem = (props, listCache, offset2) => { const { items, lastVisitedIndex } = listCache; const lastVisitedOffset = lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0; if (lastVisitedOffset >= offset2) { return bs(props, listCache, 0, lastVisitedIndex, offset2); } return es(props, listCache, Math.max(0, lastVisitedIndex), offset2); }; var bs = (props, listCache, low, high, offset2) => { while (low <= high) { const mid = low + Math.floor((high - low) / 2); const currentOffset = getItemFromCache(props, mid, listCache).offset; if (currentOffset === offset2) { return mid; } else if (currentOffset < offset2) { low = mid + 1; } else if (currentOffset > offset2) { high = mid - 1; } } return Math.max(0, low - 1); }; var es = (props, listCache, index, offset2) => { const { total: total2 } = props; let exponent = 1; while (index < total2 && getItemFromCache(props, index, listCache).offset < offset2) { index += exponent; exponent *= 2; } return bs(props, listCache, Math.floor(index / 2), Math.min(index, total2 - 1), offset2); }; 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: (props, index, listCache) => getItemFromCache(props, index, listCache).offset, getItemSize: (_2, index, { items }) => items[index].size, getEstimatedTotalSize, getOffset: (props, index, alignment, scrollOffset, listCache) => { const { height, layout: layout2, width } = props; const size4 = isHorizontal(layout2) ? width : height; const item = getItemFromCache(props, index, listCache); const estimatedTotalSize = getEstimatedTotalSize(props, listCache); const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size4, item.offset)); const minOffset = Math.max(0, item.offset - size4 + item.size); if (alignment === SMART_ALIGNMENT) { if (scrollOffset >= minOffset - size4 && scrollOffset <= maxOffset + size4) { 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: (props, offset2, listCache) => findItem(props, listCache, offset2), getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => { const { height, total: total2, layout: layout2, width } = props; const size4 = isHorizontal(layout2) ? width : height; const item = getItemFromCache(props, startIndex, listCache); const maxOffset = scrollOffset + size4; let offset2 = item.offset + item.size; let stopIndex = startIndex; while (stopIndex < total2 - 1 && offset2 < maxOffset) { stopIndex++; offset2 += getItemFromCache(props, 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 _a3, _b; cache2.lastVisitedIndex = Math.min(cache2.lastVisitedIndex, index - 1); (_a3 = instance.exposed) == null ? void 0 : _a3.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(SCOPE4, ` itemSize is required as function, but the given value was ${typeof itemSize3} `); } } } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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(xOffset, yOffset) && hasReachedEdge(xOffset + x2, yOffset + y)) return; xOffset += x2; yOffset += y; e.preventDefault(); frameHandle = rAF(() => { onWheelDelta(xOffset, yOffset); xOffset = 0; yOffset = 0; }); }; return { hasReachedEdge, onWheel }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props, { emit, expose, slots }) { const ns2 = useNamespace("vl"); validateProps(props); const instance = getCurrentInstance(); const cache2 = ref(initCache(props, instance)); injectToInstance == null ? void 0 : injectToInstance(instance, cache2); const windowRef = ref(); const hScrollbar = ref(); const vScrollbar = ref(); const innerRef = ref(null); const states = ref({ isScrolling: false, scrollLeft: isNumber2(props.initScrollLeft) ? props.initScrollLeft : 0, scrollTop: isNumber2(props.initScrollTop) ? props.initScrollTop : 0, updateRequested: false, xAxisScrollDir: FORWARD, yAxisScrollDir: FORWARD }); const getItemStyleCache = useCache(); const parsedHeight = computed(() => Number.parseInt(`${props.height}`, 10)); const parsedWidth = computed(() => Number.parseInt(`${props.width}`, 10)); const columnsToRender = computed(() => { const { totalColumn, totalRow, columnCache } = props; const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states); if (totalColumn === 0 || totalRow === 0) { return [0, 0, 0, 0]; } const startIndex = getColumnStartIndexForOffset(props, scrollLeft, unref(cache2)); const stopIndex = getColumnStopIndexForStartIndex(props, 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 } = props; const { isScrolling, yAxisScrollDir, scrollTop } = unref(states); if (totalColumn === 0 || totalRow === 0) { return [0, 0, 0, 0]; } const startIndex = getRowStartIndexForOffset(props, scrollTop, unref(cache2)); const stopIndex = getRowStopIndexForStartIndex(props, 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(props, unref(cache2))); const estimatedTotalWidth = computed(() => getEstimatedTotalWidth2(props, unref(cache2))); const windowStyle = computed(() => { var _a3; return [ { position: "relative", overflow: "hidden", WebkitOverflowScrolling: "touch", willChange: "transform" }, { direction: props.direction, height: isNumber2(props.height) ? `${props.height}px` : props.height, width: isNumber2(props.width) ? `${props.width}px` : props.width }, (_a3 = props.style) != null ? _a3 : {} ]; }); const innerStyle = computed(() => { const width = `${unref(estimatedTotalWidth)}px`; const height = `${unref(estimatedTotalHeight)}px`; return { height, pointerEvents: unref(states).isScrolling ? "none" : void 0, width }; }); const emitEvents = () => { const { totalColumn, totalRow } = props; 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(props.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 offset2 = (estimatedTotalHeight.value - height) / totalSteps * distance; scrollTo({ scrollTop: Math.min(estimatedTotalHeight.value - height, offset2) }); }; const onHorizontalScroll = (distance, totalSteps) => { const width = unref(parsedWidth); const offset2 = (estimatedTotalWidth.value - width) / totalSteps * distance; scrollTo({ scrollLeft: Math.min(estimatedTotalWidth.value - width, offset2) }); }; 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 _a3, _b, _c, _d; (_b = (_a3 = hScrollbar.value) == null ? void 0 : _a3.onMouseUp) == null ? void 0 : _b.call(_a3); (_d = (_c = hScrollbar.value) == null ? void 0 : _c.onMouseUp) == null ? void 0 : _d.call(_c); const width = unref(parsedWidth); const height = unref(parsedHeight); scrollTo({ scrollLeft: Math.min(states.value.scrollLeft + x2, estimatedTotalWidth.value - width), scrollTop: Math.min(states.value.scrollTop + y, estimatedTotalHeight.value - height) }); }); const scrollTo = ({ 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 scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => { const _states = unref(states); columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn - 1)); rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow - 1)); const scrollBarWidth2 = getScrollBarWidth(ns2.namespace.value); const _cache = unref(cache2); const estimatedHeight = getEstimatedTotalHeight2(props, _cache); const estimatedWidth = getEstimatedTotalWidth2(props, _cache); scrollTo({ scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth2 : 0), scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth2 : 0) }); }; const getItemStyle = (rowIndex, columnIndex) => { const { columnWidth, direction: direction2, rowHeight } = props; const itemStyleCache = getItemStyleCache.value(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction2); const key = `${rowIndex},${columnIndex}`; if (hasOwn(itemStyleCache, key)) { return itemStyleCache[key]; } else { const [, left2] = getColumnPosition(props, columnIndex, unref(cache2)); const _cache = unref(cache2); const rtl = isRTL(direction2); const [height, top] = getRowPosition(props, rowIndex, _cache); const [width] = getColumnPosition(props, columnIndex, _cache); itemStyleCache[key] = { position: "absolute", left: rtl ? void 0 : `${left2}px`, right: rtl ? `${left2}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 } = props; const windowElement = unref(windowRef); if (windowElement) { if (isNumber2(initScrollLeft)) { windowElement.scrollLeft = initScrollLeft; } if (isNumber2(initScrollTop)) { windowElement.scrollTop = initScrollTop; } } emitEvents(); }); const onUpdated2 = () => { const { direction: direction2 } = props; 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, scrollTo, scrollToItem, states, resetAfterColumnIndex, resetAfterRowIndex, resetAfter }); const renderScrollbars = () => { const { scrollbarAlwaysOn, scrollbarStartGap, scrollbarEndGap, totalColumn, totalRow } = props; 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: ns2.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: ns2.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 _a3; const [columnStart, columnEnd] = unref(columnsToRender); const [rowStart, rowEnd] = unref(rowsToRender); const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props; const children = []; if (totalRow > 0 && totalColumn > 0) { for (let row = rowStart; row <= rowEnd; row++) { for (let column2 = columnStart; column2 <= columnEnd; column2++) { children.push((_a3 = slots.default) == null ? void 0 : _a3.call(slots, { columnIndex: column2, data, key: itemKey({ columnIndex: column2, data, rowIndex: row }), isScrolling: useIsScrolling ? unref(states).isScrolling : void 0, style: getItemStyle(row, column2), rowIndex: row })); } } } return children; }; const renderInner = () => { const Inner = resolveDynamicComponent(props.innerElement); const children = renderItems(); return [ h(Inner, { style: unref(innerStyle), ref: innerRef }, !isString(Inner) ? { default: () => children } : children) ]; }; const renderWindow = () => { const Container2 = resolveDynamicComponent(props.containerElement); const { horizontalScrollbar, verticalScrollbar } = renderScrollbars(); const Inner = renderInner(); return h("div", { key: 0, class: ns2.e("wrapper") }, [ h(Container2, { class: props.className, style: unref(windowStyle), onScroll, onWheel, ref: windowRef }, !isString(Container2) ? { default: () => Inner } : Inner), horizontalScrollbar, verticalScrollbar ]); }; return renderWindow; } }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs var SCOPE5 = "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 left2 = startIndex * columnWidth; const visibleColumnsCount = Math.ceil((width + scrollLeft - left2) / 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(SCOPE5, ` "columnWidth" must be passed as number, instead ${typeof columnWidth} was given. `); } if (!isNumber2(rowHeight)) { throwError(SCOPE5, ` "columnWidth" must be passed as number, instead ${typeof rowHeight} was given. `); } } } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs var { max: max4, min: min4, floor: floor2 } = Math; var SCOPE6 = "ElDynamicSizeGrid"; var ACCESS_SIZER_KEY_MAP = { column: "columnWidth", row: "rowHeight" }; var ACCESS_LAST_VISITED_KEY_MAP = { column: "lastVisitedColumnIndex", row: "lastVisitedRowIndex" }; var getItemFromCache2 = (props, index, gridCache, type4) => { const [cachedItems, sizer, lastVisited] = [ gridCache[type4], props[ACCESS_SIZER_KEY_MAP[type4]], gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] ]; if (index > lastVisited) { let offset2 = 0; if (lastVisited >= 0) { const item = cachedItems[lastVisited]; offset2 = item.offset + item.size; } for (let i = lastVisited + 1; i <= index; i++) { const size4 = sizer(i); cachedItems[i] = { offset: offset2, size: size4 }; offset2 += size4; } gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] = index; } return cachedItems[index]; }; var bs2 = (props, gridCache, low, high, offset2, type4) => { while (low <= high) { const mid = low + floor2((high - low) / 2); const currentOffset = getItemFromCache2(props, mid, gridCache, type4).offset; if (currentOffset === offset2) { return mid; } else if (currentOffset < offset2) { low = mid + 1; } else { high = mid - 1; } } return max4(0, low - 1); }; var es2 = (props, gridCache, idx, offset2, type4) => { const total2 = type4 === "column" ? props.totalColumn : props.totalRow; let exponent = 1; while (idx < total2 && getItemFromCache2(props, idx, gridCache, type4).offset < offset2) { idx += exponent; exponent *= 2; } return bs2(props, gridCache, floor2(idx / 2), min4(idx, total2 - 1), offset2, type4); }; var findItem2 = (props, gridCache, offset2, type4) => { const [cache2, lastVisitedIndex] = [ gridCache[type4], gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] ]; const lastVisitedItemOffset = lastVisitedIndex > 0 ? cache2[lastVisitedIndex].offset : 0; if (lastVisitedItemOffset >= offset2) { return bs2(props, gridCache, 0, lastVisitedIndex, offset2, type4); } return es2(props, gridCache, max4(0, lastVisitedIndex), offset2, 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 getOffset = (props, index, alignment, scrollOffset, cache2, type4, scrollBarWidth2) => { const [size4, estimatedSizeAssociates] = [ type4 === "row" ? props.height : props.width, ACCESS_ESTIMATED_SIZE_KEY_MAP[type4] ]; const item = getItemFromCache2(props, index, cache2, type4); const estimatedSize = estimatedSizeAssociates(props, cache2); const maxOffset = max4(0, min4(estimatedSize - size4, item.offset)); const minOffset = max4(0, item.offset - size4 + scrollBarWidth2 + item.size); if (alignment === SMART_ALIGNMENT) { if (scrollOffset >= minOffset - size4 && scrollOffset <= maxOffset + size4) { 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: (props, idx, cache2) => { const item = getItemFromCache2(props, idx, cache2, "column"); return [item.size, item.offset]; }, getRowPosition: (props, idx, cache2) => { const item = getItemFromCache2(props, idx, cache2, "row"); return [item.size, item.offset]; }, getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache2, scrollBarWidth2) => getOffset(props, columnIndex, alignment, scrollLeft, cache2, "column", scrollBarWidth2), getRowOffset: (props, rowIndex, alignment, scrollTop, cache2, scrollBarWidth2) => getOffset(props, rowIndex, alignment, scrollTop, cache2, "row", scrollBarWidth2), getColumnStartIndexForOffset: (props, scrollLeft, cache2) => findItem2(props, cache2, scrollLeft, "column"), getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache2) => { const item = getItemFromCache2(props, startIndex, cache2, "column"); const maxOffset = scrollLeft + props.width; let offset2 = item.offset + item.size; let stopIndex = startIndex; while (stopIndex < props.totalColumn - 1 && offset2 < maxOffset) { stopIndex++; offset2 += getItemFromCache2(props, startIndex, cache2, "column").size; } return stopIndex; }, getEstimatedTotalHeight, getEstimatedTotalWidth, getRowStartIndexForOffset: (props, scrollTop, cache2) => findItem2(props, cache2, scrollTop, "row"), getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache2) => { const { totalRow, height } = props; const item = getItemFromCache2(props, startIndex, cache2, "row"); const maxOffset = scrollTop + height; let offset2 = item.size + item.offset; let stopIndex = startIndex; while (stopIndex < totalRow - 1 && offset2 < maxOffset) { stopIndex++; offset2 += getItemFromCache2(props, stopIndex, cache2, "row").size; } return stopIndex; }, injectToInstance: (instance, cache2) => { const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => { var _a3, _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); } (_a3 = instance.exposed) == null ? void 0 : _a3.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(SCOPE6, ` "columnWidth" must be passed as function, instead ${typeof columnWidth} was given. `); } if (!isFunction(rowHeight)) { throwError(SCOPE6, ` "rowHeight" must be passed as function, instead ${typeof rowHeight} was given. `); } } } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/group-item.mjs var _sfc_main108 = defineComponent({ props: { item: { type: Object, required: true }, style: Object, height: Number }, setup() { const ns2 = useNamespace("select"); return { ns: ns2 }; } }); function _sfc_render26(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.item.isTitle ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(_ctx.ns.be("group", "title")), style: normalizeStyle([_ctx.style, { lineHeight: `${_ctx.height}px` }]) }, toDisplayString(_ctx.item.label), 7)) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(_ctx.ns.be("group", "split")), style: normalizeStyle(_ctx.style) }, [ createBaseVNode("span", { class: normalizeClass(_ctx.ns.be("group", "split-dash")), style: normalizeStyle({ top: `${_ctx.height / 2}px` }) }, null, 6) ], 6)); } var GroupItem = _export_sfc(_sfc_main108, [["render", _sfc_render26], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/useOption.mjs function useOption2(props, { emit }) { return { hoverItem: () => { if (!props.disabled) { emit("hover", props.index); } }, selectOptionClick: () => { if (!props.disabled) { emit("select", props.item, props.index); } } }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/defaults.mjs var SelectProps = { allowCreate: Boolean, autocomplete: { type: String, default: "none" }, automaticDropdown: Boolean, clearable: Boolean, clearIcon: { type: [String, Object], default: circle_close_default }, effect: { type: String, default: "light" }, collapseTags: Boolean, collapseTagsTooltip: { type: Boolean, default: false }, defaultFirstOption: Boolean, disabled: Boolean, estimatedOptionHeight: { type: Number, default: void 0 }, filterable: Boolean, filterMethod: Function, height: { type: Number, default: 170 }, itemHeight: { type: Number, default: 34 }, id: String, loading: Boolean, loadingText: String, label: String, modelValue: [Array, String, Number, Boolean, Object], multiple: Boolean, multipleLimit: { type: Number, default: 0 }, name: String, noDataText: String, noMatchText: String, remoteMethod: Function, reserveKeyword: { type: Boolean, default: true }, options: { type: Array, required: true }, placeholder: { type: String }, teleported: useTooltipContentProps.teleported, persistent: { type: Boolean, default: true }, popperClass: { type: String, default: "" }, popperOptions: { type: Object, default: () => ({}) }, remote: Boolean, size: { type: String, validator: isValidComponentSize }, valueKey: { type: String, default: "value" }, scrollbarAlwaysOn: { type: Boolean, default: false }, validateEvent: { type: Boolean, default: true }, placement: { type: definePropType(String), values: Ee, default: "bottom-start" } }; var OptionProps = { data: Array, disabled: Boolean, hovering: Boolean, item: Object, index: Number, style: Object, selected: Boolean, created: Boolean }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/option-item.mjs var _sfc_main109 = defineComponent({ props: OptionProps, emits: ["select", "hover"], setup(props, { emit }) { const ns2 = useNamespace("select"); const { hoverItem, selectOptionClick } = useOption2(props, { emit }); return { ns: ns2, hoverItem, selectOptionClick }; } }); var _hoisted_154 = ["aria-selected"]; function _sfc_render27(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("li", { "aria-selected": _ctx.selected, style: normalizeStyle(_ctx.style), class: normalizeClass([ _ctx.ns.be("dropdown", "option-item"), _ctx.ns.is("selected", _ctx.selected), _ctx.ns.is("disabled", _ctx.disabled), _ctx.ns.is("created", _ctx.created), { hover: _ctx.hovering } ]), onMouseenter: _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.item.label), 1) ]) ], 46, _hoisted_154); } var OptionItem = _export_sfc(_sfc_main109, [["render", _sfc_render27], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/token.mjs var selectV2InjectionKey = Symbol("ElSelectV2Injection"); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/select-dropdown.mjs var ElSelectMenu2 = defineComponent({ name: "ElSelectDropdown", props: { data: { type: Array, required: true }, hoveringIndex: Number, width: Number }, setup(props, { slots, expose }) { const select = inject(selectV2InjectionKey); const ns2 = useNamespace("select"); const cachedHeights = ref([]); const listRef = ref(); const size4 = computed(() => props.data.length); watch(() => size4.value, () => { var _a3, _b; (_b = (_a3 = select.popper.value).updatePopper) == null ? void 0 : _b.call(_a3); }); 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 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) => { const { valueKey } = select.props; if (select.props.multiple) { return contains(modelValue, get_default(target2, valueKey)); } return isEqual3(modelValue, get_default(target2, valueKey)); }; const isItemDisabled = (modelValue, selected) => { const { disabled, multiple, multipleLimit } = select.props; return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false); }; const isItemHovering = (target2) => props.hoveringIndex === target2; const scrollToItem = (index) => { const list = listRef.value; if (list) { list.scrollToItem(index); } }; const resetScrollTop = () => { const list = listRef.value; if (list) { list.resetScrollTop(); } }; expose({ listRef, isSized, isItemDisabled, isItemHovering, isItemSelected, scrollToItem, resetScrollTop }); 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": item.disabled || isDisabled, "created": !!item.created, "hovering": isHovering, "item": item, "onSelect": onSelect, "onHover": onHover }), { default: (props2) => { var _a3; return ((_a3 = slots.default) == null ? void 0 : _a3.call(slots, props2)) || createVNode("span", null, [item.label]); } }); }; const { onKeyboardNavigate, onKeyboardSelect } = select; const onForward = () => { onKeyboardNavigate("forward"); }; const onBackward = () => { onKeyboardNavigate("backward"); }; const onEscOrTab = () => { select.expanded = false; }; const onKeydown = (e) => { const { code } = e; const { tab, esc, down: down2, up: up2, enter } = EVENT_CODE; if (code !== tab) { e.preventDefault(); e.stopPropagation(); } switch (code) { case tab: case esc: { onEscOrTab(); break; } case down2: { onForward(); break; } case up2: { onBackward(); break; } case enter: { onKeyboardSelect(); break; } } }; return () => { var _a3; const { data, width } = props; const { height, multiple, scrollbarAlwaysOn } = select.props; if (data.length === 0) { return createVNode("div", { "class": ns2.b("dropdown"), "style": { width: `${width}px` } }, [(_a3 = slots.empty) == null ? void 0 : _a3.call(slots)]); } const List = unref(isSized) ? FixedSizeList : DynamicSizeList; return createVNode("div", { "class": [ns2.b("dropdown"), ns2.is("multiple", multiple)] }, [createVNode(List, mergeProps({ "ref": listRef }, unref(listProps), { "className": ns2.be("dropdown", "list"), "scrollbarAlwaysOn": scrollbarAlwaysOn, "data": data, "height": height, "width": width, "total": data.length, "onKeydown": onKeydown }), { default: (props2) => createVNode(Item, props2, null) })]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/useAllowCreate.mjs function useAllowCreate(props, states) { const createOptionCount = ref(0); const cachedSelectedOption = ref(null); const enableAllowCreateMode = computed(() => { return props.allowCreate && props.filterable; }); function hasExistingOption(query) { const hasValue = (option) => option.value === query; return props.options && props.options.some(hasValue) || states.createdOptions.some(hasValue); } function selectNewOption(option) { if (!enableAllowCreateMode.value) { return; } if (props.multiple && option.created) { createOptionCount.value++; } else { cachedSelectedOption.value = option; } } function createNewOption(query) { if (enableAllowCreateMode.value) { if (query && query.length > 0 && !hasExistingOption(query)) { const newOption = { value: query, label: query, created: true, disabled: false }; if (states.createdOptions.length >= createOptionCount.value) { states.createdOptions[createOptionCount.value] = newOption; } else { states.createdOptions.push(newOption); } } else { if (props.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 && props.reserveKeyword && states.inputValue === option.label) { return; } const idx = states.createdOptions.findIndex((it2) => it2.value === option.value); 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/util.mjs var flattenOptions = (options) => { const flattened = []; options.forEach((option) => { if (isArray(option.options)) { flattened.push({ label: option.label, isTitle: true, type: "Group" }); option.options.forEach((o2) => { flattened.push(o2); }); flattened.push({ type: "Group" }); } else { flattened.push(option); } }); return flattened; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/useInput.mjs function useInput(handleInput) { const isComposing = ref(false); const handleCompositionStart = () => { isComposing.value = true; }; const handleCompositionUpdate = (event) => { const text = event.target.value; const lastCharacter = text[text.length - 1] || ""; isComposing.value = !isKorean(lastCharacter); }; const handleCompositionEnd = (event) => { if (isComposing.value) { isComposing.value = false; if (isFunction(handleInput)) { handleInput(event); } } }; return { handleCompositionStart, handleCompositionUpdate, handleCompositionEnd }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/useSelect.mjs var DEFAULT_INPUT_PLACEHOLDER = ""; var MINIMUM_INPUT_WIDTH = 11; var TAG_BASE_WIDTH = { larget: 51, default: 42, small: 33 }; var useSelect2 = (props, emit) => { const { t } = useLocale(); const nsSelectV2 = useNamespace("select-v2"); const nsInput = useNamespace("input"); const { form: elForm, formItem: elFormItem } = useFormItem(); const states = reactive({ inputValue: DEFAULT_INPUT_PLACEHOLDER, displayInputValue: DEFAULT_INPUT_PLACEHOLDER, calculatedWidth: 0, cachedPlaceholder: "", cachedOptions: [], createdOptions: [], createdLabel: "", createdSelected: false, currentPlaceholder: "", hoveringIndex: -1, comboBoxHovering: false, isOnComposition: false, isSilentBlur: false, isComposing: false, inputLength: 20, selectWidth: 200, initialInputHeight: 0, previousQuery: null, previousValue: void 0, query: "", selectedLabel: "", softFocus: false, tagInMultiLine: false }); const selectedIndex = ref(-1); const popperSize = ref(-1); const controlRef = ref(null); const inputRef = ref(null); const menuRef = ref(null); const popper = ref(null); const selectRef = ref(null); const selectionRef = ref(null); const calculatorRef = ref(null); const expanded = ref(false); const selectDisabled = computed(() => props.disabled || (elForm == null ? void 0 : elForm.disabled)); const popupHeight = computed(() => { const totalHeight = filteredOptions.value.length * 34; return totalHeight > props.height ? props.height : totalHeight; }); const hasModelValue = computed(() => { return !isNil_default(props.modelValue); }); const showClearBtn = computed(() => { const hasValue = props.multiple ? Array.isArray(props.modelValue) && props.modelValue.length > 0 : hasModelValue.value; const criteria = props.clearable && !selectDisabled.value && states.comboBoxHovering && hasValue; return criteria; }); const iconComponent = computed(() => props.remote && props.filterable ? "" : arrow_up_default); const iconReverse = computed(() => iconComponent.value && nsSelectV2.is("reverse", expanded.value)); const validateState = computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || ""); const validateIcon = computed(() => ValidateComponentsMap[validateState.value]); const debounce$1 = computed(() => props.remote ? 300 : 0); const emptyText = computed(() => { const options = filteredOptions.value; if (props.loading) { return props.loadingText || t("el.select.loading"); } else { if (props.remote && states.inputValue === "" && options.length === 0) return false; if (props.filterable && states.inputValue && options.length > 0) { return props.noMatchText || t("el.select.noMatch"); } if (options.length === 0) { return props.noDataText || t("el.select.noData"); } } return null; }); const filteredOptions = computed(() => { const isValidOption = (o2) => { const query = states.inputValue; const regexp4 = new RegExp(escapeStringRegexp(query), "i"); const containsQueryString = query ? regexp4.test(o2.label || "") : true; return containsQueryString; }; if (props.loading) { return []; } return flattenOptions(props.options.concat(states.createdOptions).map((v2) => { if (isArray(v2.options)) { const filtered = v2.options.filter(isValidOption); if (filtered.length > 0) { return { ...v2, options: filtered }; } } else { if (props.remote || isValidOption(v2)) { return v2; } } return null; }).filter((v2) => v2 !== null)); }); const optionsAllDisabled = computed(() => filteredOptions.value.every((option) => option.disabled)); const selectSize = useSize(); const collapseTagSize = computed(() => selectSize.value === "small" ? "small" : "default"); const tagMaxWidth = computed(() => { const select = selectionRef.value; const size4 = collapseTagSize.value || "default"; const paddingLeft = select ? Number.parseInt(getComputedStyle(select).paddingLeft) : 0; const paddingRight = select ? Number.parseInt(getComputedStyle(select).paddingRight) : 0; return states.selectWidth - paddingRight - paddingLeft - TAG_BASE_WIDTH[size4]; }); const calculatePopperSize = () => { var _a3; popperSize.value = ((_a3 = selectRef.value) == null ? void 0 : _a3.offsetWidth) || 200; }; const inputWrapperStyle = computed(() => { return { width: `${states.calculatedWidth === 0 ? MINIMUM_INPUT_WIDTH : Math.ceil(states.calculatedWidth) + MINIMUM_INPUT_WIDTH}px` }; }); const shouldShowPlaceholder = computed(() => { if (isArray(props.modelValue)) { return props.modelValue.length === 0 && !states.displayInputValue; } return props.filterable ? states.displayInputValue.length === 0 : true; }); const currentPlaceholder = computed(() => { const _placeholder = props.placeholder || t("el.select.placeholder"); return props.multiple || isNil_default(props.modelValue) ? _placeholder : states.selectedLabel; }); const popperRef = computed(() => { var _a3, _b; return (_b = (_a3 = popper.value) == null ? void 0 : _a3.popperRef) == null ? void 0 : _b.contentRef; }); const indexRef = computed(() => { if (props.multiple) { const len = props.modelValue.length; if (props.modelValue.length > 0) { return filteredOptions.value.findIndex((o2) => o2.value === props.modelValue[len - 1]); } } else { if (props.modelValue) { return filteredOptions.value.findIndex((o2) => o2.value === props.modelValue); } } return -1; }); const dropdownMenuVisible = computed({ get() { return expanded.value && emptyText.value !== false; }, set(val) { expanded.value = val; } }); const { createNewOption, removeNewOption, selectNewOption, clearAllNewOption } = useAllowCreate(props, states); const { handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useInput((e) => onInput(e)); const focusAndUpdatePopup = () => { var _a3, _b, _c; (_b = (_a3 = inputRef.value).focus) == null ? void 0 : _b.call(_a3); (_c = popper.value) == null ? void 0 : _c.updatePopper(); }; const toggleMenu = () => { if (props.automaticDropdown) return; if (!selectDisabled.value) { if (states.isComposing) states.softFocus = true; return nextTick(() => { var _a3, _b; expanded.value = !expanded.value; (_b = (_a3 = inputRef.value) == null ? void 0 : _a3.focus) == null ? void 0 : _b.call(_a3); }); } }; const onInputChange = () => { if (props.filterable && states.inputValue !== states.selectedLabel) { states.query = states.selectedLabel; } handleQueryChange(states.inputValue); return nextTick(() => { createNewOption(states.inputValue); }); }; const debouncedOnInputChange = debounce_default(onInputChange, debounce$1.value); const handleQueryChange = (val) => { if (states.previousQuery === val) { return; } states.previousQuery = val; if (props.filterable && isFunction(props.filterMethod)) { props.filterMethod(val); } else if (props.filterable && props.remote && isFunction(props.remoteMethod)) { props.remoteMethod(val); } }; const emitChange = (val) => { if (!isEqual_default(props.modelValue, val)) { emit(CHANGE_EVENT, val); } }; const update2 = (val) => { emit(UPDATE_MODEL_EVENT, val); emitChange(val); states.previousValue = val == null ? void 0 : val.toString(); }; const getValueIndex = (arr = [], value) => { if (!isObject(value)) { return arr.indexOf(value); } const valueKey = props.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, props.valueKey) : item; }; const getLabel = (item) => { return isObject(item) ? item.label : item; }; const resetInputHeight = () => { if (props.collapseTags && !props.filterable) { return; } return nextTick(() => { var _a3, _b; if (!inputRef.value) return; const selection = selectionRef.value; selectRef.value.height = selection.offsetHeight; if (expanded.value && emptyText.value !== false) { (_b = (_a3 = popper.value) == null ? void 0 : _a3.updatePopper) == null ? void 0 : _b.call(_a3); } }); }; const handleResize = () => { var _a3, _b; resetInputWidth(); calculatePopperSize(); (_b = (_a3 = popper.value) == null ? void 0 : _a3.updatePopper) == null ? void 0 : _b.call(_a3); if (props.multiple) { return resetInputHeight(); } }; const resetInputWidth = () => { const select = selectionRef.value; if (select) { states.selectWidth = select.getBoundingClientRect().width; } }; const onSelect = (option, idx, byClick = true) => { var _a3, _b; if (props.multiple) { let selectedOptions = props.modelValue.slice(); const index = getValueIndex(selectedOptions, getValueKey(option)); if (index > -1) { selectedOptions = [ ...selectedOptions.slice(0, index), ...selectedOptions.slice(index + 1) ]; states.cachedOptions.splice(index, 1); removeNewOption(option); } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) { selectedOptions = [...selectedOptions, getValueKey(option)]; states.cachedOptions.push(option); selectNewOption(option); updateHoveringIndex(idx); } update2(selectedOptions); if (option.created) { states.query = ""; handleQueryChange(""); states.inputLength = 20; } if (props.filterable && !props.reserveKeyword) { (_b = (_a3 = inputRef.value).focus) == null ? void 0 : _b.call(_a3); onUpdateInputValue(""); } if (props.filterable) { states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width; } resetInputHeight(); setSoftFocus(); } else { selectedIndex.value = idx; states.selectedLabel = option.label; update2(getValueKey(option)); expanded.value = false; states.isComposing = false; states.isSilentBlur = byClick; selectNewOption(option); if (!option.created) { clearAllNewOption(); } updateHoveringIndex(idx); } }; const deleteTag = (event, tag) => { const { valueKey } = props; const index = props.modelValue.indexOf(get_default(tag, valueKey)); if (index > -1 && !selectDisabled.value) { const value = [ ...props.modelValue.slice(0, index), ...props.modelValue.slice(index + 1) ]; states.cachedOptions.splice(index, 1); update2(value); emit("remove-tag", get_default(tag, valueKey)); states.softFocus = true; removeNewOption(tag); return nextTick(focusAndUpdatePopup); } event.stopPropagation(); }; const handleFocus = (event) => { const focused = states.isComposing; states.isComposing = true; if (!states.softFocus) { if (!focused) emit("focus", event); } else { states.softFocus = false; } }; const handleBlur = (event) => { states.softFocus = false; return nextTick(() => { var _a3, _b; (_b = (_a3 = inputRef.value) == null ? void 0 : _a3.blur) == null ? void 0 : _b.call(_a3); if (calculatorRef.value) { states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width; } if (states.isSilentBlur) { states.isSilentBlur = false; } else { if (states.isComposing) { emit("blur", event); } } states.isComposing = false; }); }; const handleEsc = () => { if (states.displayInputValue.length > 0) { onUpdateInputValue(""); } else { expanded.value = false; } }; const handleDel = (e) => { if (states.displayInputValue.length === 0) { e.preventDefault(); const selected = props.modelValue.slice(); selected.pop(); removeNewOption(states.cachedOptions.pop()); update2(selected); } }; const handleClear = () => { let emptyValue; if (isArray(props.modelValue)) { emptyValue = []; } else { emptyValue = void 0; } states.softFocus = true; if (props.multiple) { states.cachedOptions = []; } else { states.selectedLabel = ""; } expanded.value = false; update2(emptyValue); emit("clear"); clearAllNewOption(); return nextTick(focusAndUpdatePopup); }; const onUpdateInputValue = (val) => { states.displayInputValue = val; states.inputValue = val; }; const onKeyboardNavigate = (direction2, hoveringIndex = void 0) => { const options = filteredOptions.value; if (!["forward", "backward"].includes(direction2) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value) { return; } if (!expanded.value) { return toggleMenu(); } if (hoveringIndex === void 0) { 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 (option.disabled || option.type === "Group") { return onKeyboardNavigate(direction2, newIndex); } else { updateHoveringIndex(newIndex); scrollToItem(newIndex); } }; const onKeyboardSelect = () => { if (!expanded.value) { return toggleMenu(); } else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) { onSelect(filteredOptions.value[states.hoveringIndex], states.hoveringIndex, false); } }; const updateHoveringIndex = (idx) => { states.hoveringIndex = idx; }; const resetHoveringIndex = () => { states.hoveringIndex = -1; }; const setSoftFocus = () => { var _a3; const _input = inputRef.value; if (_input) { (_a3 = _input.focus) == null ? void 0 : _a3.call(_input); } }; const onInput = (event) => { const value = event.target.value; onUpdateInputValue(value); if (states.displayInputValue.length > 0 && !expanded.value) { expanded.value = true; } states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width; if (props.multiple) { resetInputHeight(); } if (props.remote) { debouncedOnInputChange(); } else { return onInputChange(); } }; const handleClickOutside = () => { expanded.value = false; return handleBlur(); }; const handleMenuEnter = () => { states.inputValue = states.displayInputValue; return nextTick(() => { if (~indexRef.value) { updateHoveringIndex(indexRef.value); scrollToItem(states.hoveringIndex); } }); }; const scrollToItem = (index) => { menuRef.value.scrollToItem(index); }; const initStates = () => { resetHoveringIndex(); if (props.multiple) { if (props.modelValue.length > 0) { let initHovering = false; states.cachedOptions.length = 0; states.previousValue = props.modelValue.toString(); props.modelValue.forEach((selected) => { const itemIndex = filteredOptions.value.findIndex((option) => getValueKey(option) === selected); if (~itemIndex) { states.cachedOptions.push(filteredOptions.value[itemIndex]); if (!initHovering) { updateHoveringIndex(itemIndex); } initHovering = true; } }); } else { states.cachedOptions = []; states.previousValue = void 0; } } else { if (hasModelValue.value) { states.previousValue = props.modelValue; const options = filteredOptions.value; const selectedItemIndex = options.findIndex((option) => getValueKey(option) === getValueKey(props.modelValue)); if (~selectedItemIndex) { states.selectedLabel = options[selectedItemIndex].label; updateHoveringIndex(selectedItemIndex); } else { states.selectedLabel = `${props.modelValue}`; } } else { states.selectedLabel = ""; states.previousValue = void 0; } } clearAllNewOption(); calculatePopperSize(); }; watch(expanded, (val) => { var _a3, _b; emit("visible-change", val); if (val) { (_b = (_a3 = popper.value).update) == null ? void 0 : _b.call(_a3); } else { states.displayInputValue = ""; states.previousQuery = null; createNewOption(""); } }); watch(() => props.modelValue, (val, oldVal) => { var _a3; if (!val || val.toString() !== states.previousValue) { initStates(); } if (!isEqual_default(val, oldVal) && props.validateEvent) { (_a3 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a3.call(elFormItem, "change").catch((err) => debugWarn(err)); } }, { deep: true }); watch(() => props.options, () => { const input = inputRef.value; if (!input || input && document.activeElement !== input) { initStates(); } }, { deep: true }); watch(filteredOptions, () => { return nextTick(menuRef.value.resetScrollTop); }); onMounted(() => { initStates(); }); useResizeObserver(selectRef, handleResize); return { collapseTagSize, currentPlaceholder, expanded, emptyText, popupHeight, debounce: debounce$1, filteredOptions, iconComponent, iconReverse, inputWrapperStyle, popperSize, dropdownMenuVisible, hasModelValue, shouldShowPlaceholder, selectDisabled, selectSize, showClearBtn, states, tagMaxWidth, nsSelectV2, nsInput, calculatorRef, controlRef, inputRef, menuRef, popper, selectRef, selectionRef, popperRef, validateState, validateIcon, debouncedOnInputChange, deleteTag, getLabel, getValueKey, handleBlur, handleClear, handleClickOutside, handleDel, handleEsc, handleFocus, handleMenuEnter, handleResize, toggleMenu, scrollTo: scrollToItem, onInput, onKeyboardNavigate, onKeyboardSelect, onSelect, onHover: updateHoveringIndex, onUpdateInputValue, handleCompositionStart, handleCompositionEnd, handleCompositionUpdate }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/src/select.mjs var _sfc_main110 = defineComponent({ name: "ElSelectV2", components: { ElSelectMenu: ElSelectMenu2, ElTag, ElTooltip, ElIcon }, directives: { ClickOutside, ModelText: vModelText }, props: SelectProps, emits: [ UPDATE_MODEL_EVENT, CHANGE_EVENT, "remove-tag", "clear", "visible-change", "focus", "blur" ], setup(props, { emit }) { const modelValue = computed(() => { const { modelValue: rawModelValue, multiple } = props; const fallback = multiple ? [] : void 0; if (isArray(rawModelValue)) { return multiple ? rawModelValue : fallback; } return multiple ? fallback : rawModelValue; }); const API = useSelect2(reactive({ ...toRefs(props), modelValue }), emit); provide(selectV2InjectionKey, { props: reactive({ ...toRefs(props), height: API.popupHeight, modelValue }), popper: API.popper, onSelect: API.onSelect, onHover: API.onHover, onKeyboardNavigate: API.onKeyboardNavigate, onKeyboardSelect: API.onKeyboardSelect }); return { ...API, modelValue }; } }); var _hoisted_155 = { key: 0 }; var _hoisted_234 = ["id", "autocomplete", "aria-expanded", "aria-labelledby", "disabled", "readonly", "name", "unselectable"]; var _hoisted_316 = ["textContent"]; var _hoisted_49 = ["id", "aria-labelledby", "aria-expanded", "autocomplete", "disabled", "name", "readonly", "unselectable"]; var _hoisted_56 = ["textContent"]; function _sfc_render28(_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_model_text = resolveDirective("model-text"); const _directive_click_outside = resolveDirective("click-outside"); return withDirectives((openBlock(), createElementBlock("div", { ref: "selectRef", class: normalizeClass([_ctx.nsSelectV2.b(), _ctx.nsSelectV2.m(_ctx.selectSize)]), onClick: _cache[25] || (_cache[25] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"])), onMouseenter: _cache[26] || (_cache[26] = ($event) => _ctx.states.comboBoxHovering = true), onMouseleave: _cache[27] || (_cache[27] = ($event) => _ctx.states.comboBoxHovering = false) }, [ createVNode(_component_el_tooltip, { ref: "popper", visible: _ctx.dropdownMenuVisible, teleported: _ctx.teleported, "popper-class": [_ctx.nsSelectV2.e("popper"), _ctx.popperClass], "gpu-acceleration": false, "stop-popper-mouse-event": false, "popper-options": _ctx.popperOptions, "fallback-placements": ["bottom-start", "top-start", "right", "left"], effect: _ctx.effect, placement: _ctx.placement, pure: "", transition: `${_ctx.nsSelectV2.namespace.value}-zoom-in-top`, trigger: "click", persistent: _ctx.persistent, onBeforeShow: _ctx.handleMenuEnter, onHide: _cache[24] || (_cache[24] = ($event) => _ctx.states.inputValue = _ctx.states.displayInputValue) }, { default: withCtx(() => { var _a3; return [ createBaseVNode("div", { ref: "selectionRef", class: normalizeClass([ _ctx.nsSelectV2.e("wrapper"), _ctx.nsSelectV2.is("focused", _ctx.states.isComposing || _ctx.expanded), _ctx.nsSelectV2.is("hovering", _ctx.states.comboBoxHovering), _ctx.nsSelectV2.is("filterable", _ctx.filterable), _ctx.nsSelectV2.is("disabled", _ctx.selectDisabled) ]) }, [ _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_155, [ renderSlot(_ctx.$slots, "prefix") ])) : createCommentVNode("v-if", true), _ctx.multiple ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(_ctx.nsSelectV2.e("selection")) }, [ _ctx.collapseTags && _ctx.modelValue.length > 0 ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(_ctx.nsSelectV2.e("selected-item")) }, [ createVNode(_component_el_tag, { closable: !_ctx.selectDisabled && !((_a3 = _ctx.states.cachedOptions[0]) == null ? void 0 : _a3.disable), size: _ctx.collapseTagSize, type: "info", "disable-transitions": "", onClose: _cache[0] || (_cache[0] = ($event) => _ctx.deleteTag($event, _ctx.states.cachedOptions[0])) }, { default: withCtx(() => { var _a22; return [ createBaseVNode("span", { class: normalizeClass(_ctx.nsSelectV2.e("tags-text")), style: normalizeStyle({ maxWidth: `${_ctx.tagMaxWidth}px` }) }, toDisplayString((_a22 = _ctx.states.cachedOptions[0]) == null ? void 0 : _a22.label), 7) ]; }), _: 1 }, 8, ["closable", "size"]), _ctx.modelValue.length > 1 ? (openBlock(), createBlock(_component_el_tag, { key: 0, closable: false, size: _ctx.collapseTagSize, type: "info", "disable-transitions": "" }, { default: withCtx(() => [ _ctx.collapseTagsTooltip ? (openBlock(), createBlock(_component_el_tooltip, { key: 0, disabled: _ctx.dropdownMenuVisible, "fallback-placements": ["bottom", "top", "right", "left"], effect: _ctx.effect, placement: "bottom", teleported: false }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(_ctx.nsSelectV2.e("tags-text")), style: normalizeStyle({ maxWidth: `${_ctx.tagMaxWidth}px` }) }, "+ " + toDisplayString(_ctx.modelValue.length - 1), 7) ]), content: withCtx(() => [ createBaseVNode("div", { class: normalizeClass(_ctx.nsSelectV2.e("selection")) }, [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.states.cachedOptions.slice(1), (selected, idx) => { return openBlock(), createElementBlock("div", { key: idx, class: normalizeClass(_ctx.nsSelectV2.e("selected-item")) }, [ (openBlock(), createBlock(_component_el_tag, { key: _ctx.getValueKey(selected), closable: !_ctx.selectDisabled && !selected.disabled, size: _ctx.collapseTagSize, class: "in-tooltip", type: "info", "disable-transitions": "", onClose: ($event) => _ctx.deleteTag($event, selected) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(_ctx.nsSelectV2.e("tags-text")), style: normalizeStyle({ maxWidth: `${_ctx.tagMaxWidth}px` }) }, toDisplayString(_ctx.getLabel(selected)), 7) ]), _: 2 }, 1032, ["closable", "size", "onClose"])) ], 2); }), 128)) ], 2) ]), _: 1 }, 8, ["disabled", "effect"])) : (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(_ctx.nsSelectV2.e("tags-text")), style: normalizeStyle({ maxWidth: `${_ctx.tagMaxWidth}px` }) }, "+ " + toDisplayString(_ctx.modelValue.length - 1), 7)) ]), _: 1 }, 8, ["size"])) : createCommentVNode("v-if", true) ], 2)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.states.cachedOptions, (selected, idx) => { return openBlock(), createElementBlock("div", { key: idx, class: normalizeClass(_ctx.nsSelectV2.e("selected-item")) }, [ (openBlock(), createBlock(_component_el_tag, { key: _ctx.getValueKey(selected), closable: !_ctx.selectDisabled && !selected.disabled, size: _ctx.collapseTagSize, type: "info", "disable-transitions": "", onClose: ($event) => _ctx.deleteTag($event, selected) }, { default: withCtx(() => [ createBaseVNode("span", { class: normalizeClass(_ctx.nsSelectV2.e("tags-text")), style: normalizeStyle({ maxWidth: `${_ctx.tagMaxWidth}px` }) }, toDisplayString(_ctx.getLabel(selected)), 7) ]), _: 2 }, 1032, ["closable", "size", "onClose"])) ], 2); }), 128)), createBaseVNode("div", { class: normalizeClass([ _ctx.nsSelectV2.e("selected-item"), _ctx.nsSelectV2.e("input-wrapper") ]), style: normalizeStyle(_ctx.inputWrapperStyle) }, [ withDirectives(createBaseVNode("input", { id: _ctx.id, ref: "inputRef", autocomplete: _ctx.autocomplete, "aria-autocomplete": "list", "aria-haspopup": "listbox", autocapitalize: "off", "aria-expanded": _ctx.expanded, "aria-labelledby": _ctx.label, class: normalizeClass([ _ctx.nsSelectV2.is(_ctx.selectSize), _ctx.nsSelectV2.e("combobox-input") ]), disabled: _ctx.disabled, role: "combobox", readonly: !_ctx.filterable, spellcheck: "false", type: "text", name: _ctx.name, unselectable: _ctx.expanded ? "on" : void 0, "onUpdate:modelValue": _cache[1] || (_cache[1] = (...args) => _ctx.onUpdateInputValue && _ctx.onUpdateInputValue(...args)), onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)), onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args)), onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)), onCompositionupdate: _cache[6] || (_cache[6] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)), onCompositionend: _cache[7] || (_cache[7] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)), onKeydown: [ _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])), _cache[9] || (_cache[9] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])), _cache[10] || (_cache[10] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])), _cache[11] || (_cache[11] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])), _cache[12] || (_cache[12] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"])) ] }, null, 42, _hoisted_234), [ [_directive_model_text, _ctx.states.displayInputValue] ]), _ctx.filterable ? (openBlock(), createElementBlock("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: normalizeClass(_ctx.nsSelectV2.e("input-calculator")), textContent: toDisplayString(_ctx.states.displayInputValue) }, null, 10, _hoisted_316)) : createCommentVNode("v-if", true) ], 6) ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [ createBaseVNode("div", { class: normalizeClass([ _ctx.nsSelectV2.e("selected-item"), _ctx.nsSelectV2.e("input-wrapper") ]) }, [ withDirectives(createBaseVNode("input", { id: _ctx.id, ref: "inputRef", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-labelledby": _ctx.label, "aria-expanded": _ctx.expanded, autocapitalize: "off", autocomplete: _ctx.autocomplete, class: normalizeClass(_ctx.nsSelectV2.e("combobox-input")), disabled: _ctx.disabled, name: _ctx.name, role: "combobox", readonly: !_ctx.filterable, spellcheck: "false", type: "text", unselectable: _ctx.expanded ? "on" : void 0, onCompositionstart: _cache[13] || (_cache[13] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)), onCompositionupdate: _cache[14] || (_cache[14] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)), onCompositionend: _cache[15] || (_cache[15] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)), onFocus: _cache[16] || (_cache[16] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)), onBlur: _cache[17] || (_cache[17] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)), onInput: _cache[18] || (_cache[18] = (...args) => _ctx.onInput && _ctx.onInput(...args)), onKeydown: [ _cache[19] || (_cache[19] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])), _cache[20] || (_cache[20] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])), _cache[21] || (_cache[21] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])), _cache[22] || (_cache[22] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])) ], "onUpdate:modelValue": _cache[23] || (_cache[23] = (...args) => _ctx.onUpdateInputValue && _ctx.onUpdateInputValue(...args)) }, null, 42, _hoisted_49), [ [_directive_model_text, _ctx.states.displayInputValue] ]) ], 2), _ctx.filterable ? (openBlock(), createElementBlock("span", { key: 0, ref: "calculatorRef", "aria-hidden": "true", class: normalizeClass([ _ctx.nsSelectV2.e("selected-item"), _ctx.nsSelectV2.e("input-calculator") ]), textContent: toDisplayString(_ctx.states.displayInputValue) }, null, 10, _hoisted_56)) : createCommentVNode("v-if", true) ], 64)), _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("span", { key: 3, class: normalizeClass([ _ctx.nsSelectV2.e("placeholder"), _ctx.nsSelectV2.is("transparent", _ctx.multiple ? _ctx.modelValue.length === 0 : !_ctx.hasModelValue) ]) }, toDisplayString(_ctx.currentPlaceholder), 3)) : createCommentVNode("v-if", true), createBaseVNode("span", { class: normalizeClass(_ctx.nsSelectV2.e("suffix")) }, [ _ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, { key: 0, class: normalizeClass([_ctx.nsSelectV2.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.nsSelectV2.e("caret"), _ctx.nsInput.e("icon")]), 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 ? (openBlock(), createBlock(_component_el_icon, { key: 2, class: normalizeClass([_ctx.nsInput.e("icon"), _ctx.nsInput.e("validateIcon")]) }, { 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", data: _ctx.filteredOptions, width: _ctx.popperSize, "hovering-index": _ctx.states.hoveringIndex, "scrollbar-always-on": _ctx.scrollbarAlwaysOn }, { default: withCtx((scope) => [ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope))) ]), empty: withCtx(() => [ renderSlot(_ctx.$slots, "empty", {}, () => [ createBaseVNode("p", { class: normalizeClass(_ctx.nsSelectV2.e("empty")) }, toDisplayString(_ctx.emptyText ? _ctx.emptyText : ""), 3) ]) ]), _: 3 }, 8, ["data", "width", "hovering-index", "scrollbar-always-on"]) ]), _: 3 }, 8, ["visible", "teleported", "popper-class", "popper-options", "effect", "placement", "transition", "persistent", "onBeforeShow"]) ], 34)), [ [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef] ]); } var Select2 = _export_sfc(_sfc_main110, [["render", _sfc_render28], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/select.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/select-v2/index.mjs Select2.install = (app) => { app.component(Select2.name, Select2); }; var _Select = Select2; var ElSelectV2 = _Select; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/skeleton/src/skeleton.mjs var skeletonProps = buildProps({ animated: { type: Boolean, default: false }, count: { type: Number, default: 1 }, rows: { type: Number, default: 3 }, loading: { type: Boolean, default: true }, throttle: { type: Number } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs var skeletonItemProps = buildProps({ variant: { type: String, values: [ "circle", "rect", "h1", "h3", "text", "caption", "p", "image", "button" ], default: "text" } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs var __default__73 = defineComponent({ name: "ElSkeletonItem" }); var _sfc_main111 = defineComponent({ ...__default__73, props: skeletonItemProps, setup(__props) { const ns2 = useNamespace("skeleton"); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns2).e("item"), unref(ns2).e(_ctx.variant)]) }, [ _ctx.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true) ], 2); }; } }); var SkeletonItem = _export_sfc(_sfc_main111, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/skeleton/src/skeleton2.mjs var __default__74 = defineComponent({ name: "ElSkeleton" }); var _sfc_main112 = defineComponent({ ...__default__74, props: skeletonProps, setup(__props, { expose }) { const props = __props; const ns2 = useNamespace("skeleton"); const uiLoading = useThrottleRender(toRef(props, "loading"), props.throttle); expose({ uiLoading }); return (_ctx, _cache) => { return unref(uiLoading) ? (openBlock(), createElementBlock("div", mergeProps({ key: 0, class: [unref(ns2).b(), unref(ns2).is("animated", _ctx.animated)] }, _ctx.$attrs), [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (i) => { return openBlock(), createElementBlock(Fragment, { key: i }, [ _ctx.loading ? renderSlot(_ctx.$slots, "template", { key: i }, () => [ createVNode(SkeletonItem, { class: normalizeClass(unref(ns2).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(ns2).e("paragraph"), unref(ns2).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_main112, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/skeleton/index.mjs var ElSkeleton = withInstall(Skeleton, { SkeletonItem }); var ElSkeletonItem = withNoopInstall(SkeletonItem); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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: Boolean, range: Boolean, vertical: Boolean, height: String, debounce: { type: Number, default: 300 }, label: { type: String, default: void 0 }, 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 } }); var isValidValue = (value) => isNumber2(value) || isArray(value) && value.every(isNumber2); var sliderEmits = { [UPDATE_MODEL_EVENT]: isValidValue, [INPUT_EVENT]: isValidValue, [CHANGE_EVENT]: isValidValue }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs var useLifecycle = (props, initData, resetSize) => { const sliderWrapper = ref(); onMounted(async () => { if (props.range) { if (Array.isArray(props.modelValue)) { initData.firstValue = Math.max(props.min, props.modelValue[0]); initData.secondValue = Math.min(props.max, props.modelValue[1]); } else { initData.firstValue = props.min; initData.secondValue = props.max; } initData.oldValue = [initData.firstValue, initData.secondValue]; } else { if (typeof props.modelValue !== "number" || Number.isNaN(props.modelValue)) { initData.firstValue = props.min; } else { initData.firstValue = Math.min(props.max, Math.max(props.min, props.modelValue)); } initData.oldValue = initData.firstValue; } useEventListener(window, "resize", resetSize); await nextTick(); resetSize(); }); return { sliderWrapper }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs var useMarks = (props) => { return computed(() => { if (!props.marks) { return []; } const marksKeys = Object.keys(props.marks); return marksKeys.map(Number.parseFloat).sort((a2, b2) => a2 - b2).filter((point) => point <= props.max && point >= props.min).map((point) => ({ point, position: (point - props.min) * 100 / (props.max - props.min), mark: props.marks[point] })); }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs var useSlide = (props, initData, emit) => { const { form: elForm, formItem: elFormItem } = useFormItem(); const slider = shallowRef(); const firstButton = ref(); const secondButton = ref(); const buttonRefs = { firstButton, secondButton }; const sliderDisabled = computed(() => { return props.disabled || (elForm == null ? void 0 : elForm.disabled) || false; }); const minValue = computed(() => { return Math.min(initData.firstValue, initData.secondValue); }); const maxValue = computed(() => { return Math.max(initData.firstValue, initData.secondValue); }); const barSize = computed(() => { return props.range ? `${100 * (maxValue.value - minValue.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`; }); const barStart = computed(() => { return props.range ? `${100 * (minValue.value - props.min) / (props.max - props.min)}%` : "0%"; }); const runwayStyle = computed(() => { return props.vertical ? { height: props.height } : {}; }); const barStyle = computed(() => { return props.vertical ? { height: barSize.value, bottom: barStart.value } : { width: barSize.value, left: barStart.value }; }); const resetSize = () => { if (slider.value) { initData.sliderSize = slider.value[`client${props.vertical ? "Height" : "Width"}`]; } }; const getButtonRefByPercent = (percent) => { const targetValue = props.min + percent * (props.max - props.min) / 100; if (!props.range) { return firstButton; } let buttonRefName; if (Math.abs(minValue.value - targetValue) < Math.abs(maxValue.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; _emit(props.range ? [minValue.value, maxValue.value] : firstValue); }; const setSecondValue = (secondValue) => { initData.secondValue = secondValue; if (props.range) { _emit([minValue.value, maxValue.value]); } }; const _emit = (val) => { emit(UPDATE_MODEL_EVENT, val); emit(INPUT_EVENT, val); }; const emitChange = async () => { await nextTick(); emit(CHANGE_EVENT, props.range ? [minValue.value, maxValue.value] : props.modelValue); }; const handleSliderPointerEvent = (event) => { var _a3, _b, _c, _d, _e, _f; if (sliderDisabled.value || initData.dragging) return; resetSize(); let newPercent = 0; if (props.vertical) { const clientY = (_c = (_b = (_a3 = event.touches) == null ? void 0 : _a3.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 _a3, _b; if (((_a3 = buttonRefs["firstButton"].value) == null ? void 0 : _a3.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(); } }; return { elFormItem, slider, firstButton, secondButton, sliderDisabled, minValue, maxValue, runwayStyle, barStyle, resetSize, setPosition, emitChange, onSliderWrapperPrevent, onSliderClick, onSliderDown, setFirstValue, setSecondValue }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs var { left, down, right, up, home, end, pageUp, pageDown } = EVENT_CODE; var useTooltip = (props, 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(props.modelValue) || props.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 = (props, initData, emit) => { const { disabled, min: min5, max: max5, step, showTooltip, precision, sliderSize, formatTooltip, emitChange, resetSize, updateDragging } = inject(sliderContextKey); const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props, formatTooltip, showTooltip); const button = ref(); const currentPosition = computed(() => { return `${(props.modelValue - min5.value) / (max5.value - min5.value) * 100}%`; }); const wrapperStyle = computed(() => { return props.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 / (max5.value - min5.value) * 100; setPosition(initData.newPosition); emitChange(); }; const onLeftKeyDown = () => { incrementPosition(-step.value); }; const onRightKeyDown = () => { incrementPosition(step.value); }; const onPageDownKeyDown = () => { incrementPosition(-step.value * 4); }; const onPageUpKeyDown = () => { incrementPosition(step.value * 4); }; const onHomeKeyDown = () => { if (disabled.value) return; setPosition(0); emitChange(); }; const onEndKeyDown = () => { if (disabled.value) return; setPosition(100); emitChange(); }; const onKeyDown = (event) => { let isPreventDefault = true; if ([left, down].includes(event.key)) { onLeftKeyDown(); } else if ([right, up].includes(event.key)) { onRightKeyDown(); } else if (event.key === home) { onHomeKeyDown(); } else if (event.key === end) { onEndKeyDown(); } else if (event.key === pageDown) { onPageDownKeyDown(); } else if (event.key === pageUp) { onPageUpKeyDown(); } else { isPreventDefault = false; } 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 (props.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 (props.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; if (newPosition < 0) { newPosition = 0; } else if (newPosition > 100) { newPosition = 100; } const lengthPerStep = 100 / ((max5.value - min5.value) / step.value); const steps = Math.round(newPosition / lengthPerStep); let value = steps * lengthPerStep * (max5.value - min5.value) * 0.01 + min5.value; value = Number.parseFloat(value.toFixed(precision.value)); if (value !== props.modelValue) { emit(UPDATE_MODEL_EVENT, value); } if (!initData.dragging && props.modelValue !== initData.oldValue) { initData.oldValue = props.modelValue; } await nextTick(); initData.dragging && displayTooltip(); tooltip.value.updatePopper(); }; watch(() => initData.dragging, (val) => { updateDragging(val); }); return { disabled, button, tooltip, tooltipVisible, showTooltip, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs var useStops = (props, initData, minValue, maxValue) => { const stops = computed(() => { if (!props.showStops || props.min > props.max) return []; if (props.step === 0) { debugWarn("ElSlider", "step should not be 0."); return []; } const stopCount = (props.max - props.min) / props.step; const stepWidth = 100 * props.step / (props.max - props.min); const result2 = Array.from({ length: stopCount - 1 }).map((_2, index) => (index + 1) * stepWidth); if (props.range) { return result2.filter((step) => { return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min); }); } else { return result2.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min)); } }); const getStopStyle = (position) => { return props.vertical ? { bottom: `${position}%` } : { left: `${position}%` }; }; return { stops, getStopStyle }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs var useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => { const _emit = (val) => { emit(UPDATE_MODEL_EVENT, val); emit(INPUT_EVENT, val); }; const valueChanged = () => { if (props.range) { return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]); } else { return props.modelValue !== initData.oldValue; } }; const setValues = () => { var _a3, _b; if (props.min > props.max) { throwError("Slider", "min should not be greater than max."); return; } const val = props.modelValue; if (props.range && Array.isArray(val)) { if (val[1] < props.min) { _emit([props.min, props.min]); } else if (val[0] > props.max) { _emit([props.max, props.max]); } else if (val[0] < props.min) { _emit([props.min, val[1]]); } else if (val[1] > props.max) { _emit([val[0], props.max]); } else { initData.firstValue = val[0]; initData.secondValue = val[1]; if (valueChanged()) { if (props.validateEvent) { (_a3 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a3.call(elFormItem, "change").catch((err) => debugWarn(err)); } initData.oldValue = val.slice(); } } } else if (!props.range && typeof val === "number" && !Number.isNaN(val)) { if (val < props.min) { _emit(props.min); } else if (val > props.max) { _emit(props.max); } else { initData.firstValue = val; if (valueChanged()) { if (props.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(() => props.modelValue, (val, oldVal) => { if (initData.dragging || Array.isArray(val) && Array.isArray(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) { return; } setValues(); }, { deep: true }); watch(() => [props.min, props.max], () => { setValues(); }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/button2.mjs var _hoisted_156 = ["tabindex"]; var __default__75 = defineComponent({ name: "ElSliderButton" }); var _sfc_main113 = defineComponent({ ...__default__75, props: sliderButtonProps, emits: sliderButtonEmits, setup(__props, { expose, emit }) { const props = __props; const ns2 = useNamespace("slider"); const initData = reactive({ hovering: false, dragging: false, isClick: false, startX: 0, currentX: 0, startY: 0, currentY: 0, startPosition: 0, newPosition: 0, oldValue: props.modelValue }); const { disabled, button, tooltip, showTooltip, tooltipVisible, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition } = useSliderButton(props, 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(ns2).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]), style: normalizeStyle(unref(wrapperStyle)), tabindex: unref(disabled) ? -1 : 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)), onTouchstart: _cache[3] || (_cache[3] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)), onFocus: _cache[4] || (_cache[4] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)), onBlur: _cache[5] || (_cache[5] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)), onKeydown: _cache[6] || (_cache[6] = (...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: "" }, { content: withCtx(() => [ createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1) ]), default: withCtx(() => [ createBaseVNode("div", { class: normalizeClass([unref(ns2).e("button"), { hover: unref(hovering), dragging: unref(dragging) }]) }, null, 2) ]), _: 1 }, 8, ["visible", "placement", "popper-class", "disabled"]) ], 46, _hoisted_156); }; } }); var SliderButton = _export_sfc(_sfc_main113, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props) { const ns2 = useNamespace("slider"); const label = computed(() => { return isString(props.mark) ? props.mark : props.mark.label; }); const style = computed(() => isString(props.mark) ? void 0 : props.mark.style); return () => h("div", { class: ns2.e("marks-text"), style: style.value }, label.value); } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/src/slider2.mjs var _hoisted_157 = ["id", "role", "aria-label", "aria-labelledby"]; var _hoisted_235 = { key: 1 }; var __default__76 = defineComponent({ name: "ElSlider" }); var _sfc_main114 = defineComponent({ ...__default__76, props: sliderProps, emits: sliderEmits, setup(__props, { expose, emit }) { const props = __props; const ns2 = 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, maxValue, runwayStyle, barStyle, resetSize, emitChange, onSliderWrapperPrevent, onSliderClick, onSliderDown, setFirstValue, setSecondValue } = useSlide(props, initData, emit); const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue); const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: elFormItem }); const sliderWrapperSize = useSize(); const sliderInputSize = computed(() => props.inputSize || sliderWrapperSize.value); const groupLabel = computed(() => { return props.label || t("el.slider.defaultLabel", { min: props.min, max: props.max }); }); const firstButtonLabel = computed(() => { if (props.range) { return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel"); } else { return groupLabel.value; } }); const firstValueText = computed(() => { return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`; }); const secondButtonLabel = computed(() => { return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel"); }); const secondValueText = computed(() => { return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`; }); const sliderKls = computed(() => [ ns2.b(), ns2.m(sliderWrapperSize.value), ns2.is("vertical", props.vertical), { [ns2.m("with-input")]: props.showInput } ]); const markList = useMarks(props); useWatch(props, initData, minValue, maxValue, emit, elFormItem); const precision = computed(() => { const precisions = [props.min, props.max, props.step].map((item) => { const decimal = `${item}`.split(".")[1]; return decimal ? decimal.length : 0; }); return Math.max.apply(null, precisions); }); const { sliderWrapper } = useLifecycle(props, initData, resetSize); const { firstValue, secondValue, sliderSize } = toRefs(initData); const updateDragging = (val) => { initData.dragging = val; }; provide(sliderContextKey, { ...toRefs(props), sliderSize, disabled: sliderDisabled, precision, emitChange, resetSize, updateDragging }); expose({ onSliderClick }); return (_ctx, _cache) => { var _a3, _b; return openBlock(), createElementBlock("div", { id: _ctx.range ? unref(inputId) : void 0, ref_key: "sliderWrapper", ref: sliderWrapper, class: normalizeClass(unref(sliderKls)), role: _ctx.range ? "group" : void 0, "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? unref(groupLabel) : void 0, "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? (_a3 = unref(elFormItem)) == null ? void 0 : _a3.labelId : void 0, onTouchstart: _cache[2] || (_cache[2] = (...args) => unref(onSliderWrapperPrevent) && unref(onSliderWrapperPrevent)(...args)), onTouchmove: _cache[3] || (_cache[3] = (...args) => unref(onSliderWrapperPrevent) && unref(onSliderWrapperPrevent)(...args)) }, [ createBaseVNode("div", { ref_key: "slider", ref: slider, class: normalizeClass([ unref(ns2).e("runway"), { "show-input": _ctx.showInput && !_ctx.range }, unref(ns2).is("disabled", unref(sliderDisabled)) ]), style: normalizeStyle(unref(runwayStyle)), onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)), onTouchstart: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns2).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) ? unref(firstButtonLabel) : 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": unref(firstValueText), "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": unref(secondButtonLabel), "aria-valuemin": unref(firstValue), "aria-valuemax": _ctx.max, "aria-valuenow": unref(secondValue), "aria-valuetext": unref(secondValueText), "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_235, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => { return openBlock(), createElementBlock("div", { key, class: normalizeClass(unref(ns2).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(ns2).e("stop"), unref(ns2).e("marks-stop")]) }, null, 6); }), 128)) ]), createBaseVNode("div", { class: normalizeClass(unref(ns2).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)) }, null, 8, ["mark", "style"]); }), 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(ns2).e("input")), step: _ctx.step, disabled: unref(sliderDisabled), controls: _ctx.showInputControls, min: _ctx.min, max: _ctx.max, debounce: _ctx.debounce, size: unref(sliderInputSize), "onUpdate:modelValue": unref(setFirstValue), onChange: unref(emitChange) }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true) ], 42, _hoisted_157); }; } }); var Slider = _export_sfc(_sfc_main114, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/slider/index.mjs var ElSlider = withInstall(Slider); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/space/src/item.mjs var spaceItemProps = buildProps({ prefixCls: { type: String } }); var SpaceItem = defineComponent({ name: "ElSpaceItem", props: spaceItemProps, setup(props, { slots }) { const ns2 = useNamespace("space"); const classes = computed(() => `${props.prefixCls || ns2.b()}__item`); return () => h("div", { class: classes.value }, renderSlot(slots, "default")); } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/space/src/use-space.mjs var SIZE_MAP = { small: 8, default: 12, large: 16 }; function useSpace(props) { const ns2 = useNamespace("space"); const classes = computed(() => [ns2.b(), ns2.m(props.direction), props.class]); const horizontalSize = ref(0); const verticalSize = ref(0); const containerStyle = computed(() => { const wrapKls = props.wrap || props.fill ? { flexWrap: "wrap", marginBottom: `-${verticalSize.value}px` } : {}; const alignment = { alignItems: props.alignment }; return [wrapKls, alignment, props.style]; }); const itemStyle = computed(() => { const itemBaseStyle = { paddingBottom: `${verticalSize.value}px`, marginRight: `${horizontalSize.value}px` }; const fillStyle = props.fill ? { flexGrow: 1, minWidth: `${props.fillRatio}%` } : {}; return [itemBaseStyle, fillStyle]; }); watchEffect(() => { const { size: size4 = "small", wrap: wrap2, direction: dir, fill: fill2 } = props; if (isArray(size4)) { const [h3 = 0, v2 = 0] = size4; horizontalSize.value = h3; verticalSize.value = v2; } else { let val; if (isNumber2(size4)) { val = size4; } else { val = SIZE_MAP[size4 || "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/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props, { slots }) { const { classes, containerStyle, itemStyle } = useSpace(props); function extractChildren(children, parentKey = "", extractedChildren = []) { const { prefixCls } = props; 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 { 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 _a3; const { spacer, direction: direction2 } = props; const children = renderSlot(slots, "default", { key: 0 }, () => []); if (((_a3 = children.children) != null ? _a3 : []).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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/space/index.mjs var ElSpace = withInstall(Space); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/statistic/src/statistic2.mjs var __default__77 = defineComponent({ name: "ElStatistic" }); var _sfc_main115 = defineComponent({ ...__default__77, props: statisticProps, setup(__props, { expose }) { const props = __props; const ns2 = useNamespace("statistic"); const displayValue = computed(() => { const { value, formatter: formatter2, precision, decimalSeparator, groupSeparator } = props; if (isFunction(formatter2)) return formatter2(value); if (!isNumber2(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(ns2).b()) }, [ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).e("head")) }, [ renderSlot(_ctx.$slots, "title", {}, () => [ createTextVNode(toDisplayString(_ctx.title), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns2).e("content")) }, [ _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).e("prefix")) }, [ renderSlot(_ctx.$slots, "prefix", {}, () => [ createBaseVNode("span", null, toDisplayString(_ctx.prefix), 1) ]) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("span", { class: normalizeClass(unref(ns2).e("number")), style: normalizeStyle(_ctx.valueStyle) }, toDisplayString(unref(displayValue)), 7), _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(ns2).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_main115, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/statistic/index.mjs var ElStatistic = withInstall(Statistic); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/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, unit3]) => { const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g"); if (replaceRegex.test(current)) { const value = Math.floor(timeLeft / unit3); timeLeft -= value * unit3; return current.replace(replaceRegex, (match) => String(value).padStart(match.length, "0")); } return current; }, format2); return replacedText.replace(escapeRegex, "$1"); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/countdown/src/countdown2.mjs var __default__78 = defineComponent({ name: "ElCountdown" }); var _sfc_main116 = defineComponent({ ...__default__78, props: countdownProps, emits: countdownEmits, setup(__props, { expose, emit }) { const props = __props; let timer; const rawValue = ref(getTime(props.value) - Date.now()); const displayValue = computed(() => formatTime(rawValue.value, props.format)); const formatter2 = (val) => formatTime(val, props.format); const stopTimer = () => { if (timer) { cAF(timer); timer = void 0; } }; const startTimer = () => { const timestamp2 = getTime(props.value); const frameFunc = () => { let diff = timestamp2 - Date.now(); emit("change", diff); if (diff <= 0) { diff = 0; stopTimer(); emit("finish"); } else { timer = rAF(frameFunc); } rawValue.value = diff; }; timer = rAF(frameFunc); }; watch(() => [props.value, props.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_main116, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/countdown/index.mjs var ElCountdown = withInstall(Countdown); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/steps/src/steps.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/steps/src/steps2.mjs var __default__79 = defineComponent({ name: "ElSteps" }); var _sfc_main117 = defineComponent({ ...__default__79, props: stepsProps, emits: stepsEmits, setup(__props, { emit }) { const props = __props; const ns2 = useNamespace("steps"); const steps = ref([]); watch(steps, () => { steps.value.forEach((instance, index) => { instance.setIndex(index); }); }); provide("ElSteps", { props, steps }); watch(() => props.active, (newVal, oldVal) => { emit(CHANGE_EVENT, newVal, oldVal); }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns2).b(), unref(ns2).m(_ctx.simple ? "simple" : _ctx.direction)]) }, [ renderSlot(_ctx.$slots, "default") ], 2); }; } }); var Steps = _export_sfc(_sfc_main117, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/steps/src/item.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/steps/src/item2.mjs var __default__80 = defineComponent({ name: "ElStep" }); var _sfc_main118 = defineComponent({ ...__default__80, props: stepProps, setup(__props) { const props = __props; const ns2 = useNamespace("step"); const index = ref(-1); const lineStyle = ref({}); const internalStatus = ref(""); const parent2 = inject("ElSteps"); const currentInstance = getCurrentInstance(); onMounted(() => { watch([ () => parent2.props.active, () => parent2.props.processStatus, () => parent2.props.finishStatus ], ([active]) => { updateStatus(active); }, { immediate: true }); }); onBeforeUnmount(() => { parent2.steps.value = parent2.steps.value.filter((instance) => instance.uid !== (currentInstance == null ? void 0 : currentInstance.uid)); }); const currentStatus = computed(() => { return props.status || internalStatus.value; }); const prevStatus = computed(() => { const prevStep = parent2.steps.value[index.value - 1]; return prevStep ? prevStep.currentStatus : "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 _a3; return ((_a3 = parent2.steps.value[stepsCount.value - 1]) == null ? void 0 : _a3.uid) === (currentInstance == null ? void 0 : currentInstance.uid); }); const space = computed(() => { return isSimple.value ? "" : parent2.props.space; }); const style = computed(() => { const style2 = { flexBasis: typeof space.value === "number" ? `${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) => { let step = 100; const style2 = {}; style2.transitionDelay = `${150 * index.value}ms`; if (status === parent2.props.processStatus) { step = 0; } else if (status === "wait") { step = 0; style2.transitionDelay = `${-150 * index.value}ms`; } style2.borderWidth = step && !isSimple.value ? "1px" : 0; style2[parent2.props.direction === "vertical" ? "height" : "width"] = `${step}%`; lineStyle.value = style2; }; const updateStatus = (activeIndex) => { if (activeIndex > index.value) { internalStatus.value = parent2.props.finishStatus; } else if (activeIndex === index.value && prevStatus.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 = reactive({ uid: computed(() => currentInstance == null ? void 0 : currentInstance.uid), currentStatus, setIndex, calcProgress }); parent2.steps.value = [...parent2.steps.value, stepItemState]; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { style: normalizeStyle(unref(style)), class: normalizeClass([ unref(ns2).b(), unref(ns2).is(unref(isSimple) ? "simple" : unref(parent2).props.direction), unref(ns2).is("flex", unref(isLast) && !unref(space) && !unref(isCenter)), unref(ns2).is("center", unref(isCenter) && !unref(isVertical) && !unref(isSimple)) ]) }, [ createCommentVNode(" icon & line "), createBaseVNode("div", { class: normalizeClass([unref(ns2).e("head"), unref(ns2).is(unref(currentStatus))]) }, [ !unref(isSimple) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).e("line")) }, [ createBaseVNode("i", { class: normalizeClass(unref(ns2).e("line-inner")), style: normalizeStyle(lineStyle.value) }, null, 6) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(ns2).e("icon"), unref(ns2).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")]) }, [ renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns2).e("icon-inner")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))) ]), _: 1 }, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), { key: 1, class: normalizeClass([unref(ns2).e("icon-inner"), unref(ns2).is("status")]) }, { default: withCtx(() => [ createVNode(unref(check_default)) ]), _: 1 }, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), { key: 2, class: normalizeClass([unref(ns2).e("icon-inner"), unref(ns2).is("status")]) }, { default: withCtx(() => [ createVNode(unref(close_default)) ]), _: 1 }, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", { key: 3, class: normalizeClass(unref(ns2).e("icon-inner")) }, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true) ]) ], 2) ], 2), createCommentVNode(" title & description "), createBaseVNode("div", { class: normalizeClass(unref(ns2).e("main")) }, [ createBaseVNode("div", { class: normalizeClass([unref(ns2).e("title"), unref(ns2).is(unref(currentStatus))]) }, [ renderSlot(_ctx.$slots, "title", {}, () => [ createTextVNode(toDisplayString(_ctx.title), 1) ]) ], 2), unref(isSimple) ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).e("arrow")) }, null, 2)) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([unref(ns2).e("description"), unref(ns2).is(unref(currentStatus))]) }, [ renderSlot(_ctx.$slots, "description", {}, () => [ createTextVNode(toDisplayString(_ctx.description), 1) ]) ], 2)) ], 2) ], 6); }; } }); var Step = _export_sfc(_sfc_main118, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/steps/index.mjs var ElSteps = withInstall(Steps, { Step }); var ElStep = withNoopInstall(Step); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/switch/src/switch.mjs var switchProps = buildProps({ modelValue: { type: [Boolean, String, Number], default: false }, value: { type: [Boolean, String, Number], default: false }, disabled: { type: Boolean, default: false }, width: { type: [String, Number], default: "" }, inlinePrompt: { type: Boolean, default: false }, activeIcon: { type: iconPropType }, inactiveIcon: { type: iconPropType }, activeText: { type: String, default: "" }, inactiveText: { type: String, default: "" }, activeColor: { type: String, default: "" }, inactiveColor: { type: String, default: "" }, borderColor: { type: String, default: "" }, activeValue: { type: [Boolean, String, Number], default: true }, inactiveValue: { type: [Boolean, String, Number], default: false }, name: { type: String, default: "" }, validateEvent: { type: Boolean, default: true }, id: String, loading: { type: Boolean, default: false }, beforeChange: { type: definePropType(Function) }, size: { type: String, validator: isValidComponentSize }, tabindex: { type: [String, Number] } }); 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/switch/src/switch2.mjs var _hoisted_158 = ["onClick"]; var _hoisted_236 = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]; var _hoisted_317 = ["aria-hidden"]; var _hoisted_410 = ["aria-hidden"]; var _hoisted_57 = ["aria-hidden"]; var COMPONENT_NAME16 = "ElSwitch"; var __default__81 = defineComponent({ name: COMPONENT_NAME16 }); var _sfc_main119 = defineComponent({ ...__default__81, props: switchProps, emits: switchEmits, setup(__props, { expose, emit }) { const props = __props; const vm = getCurrentInstance(); const { formItem } = useFormItem(); const switchSize = useSize(); const ns2 = useNamespace("switch"); useDeprecated({ from: '"value"', replacement: '"model-value" or "v-model"', scope: COMPONENT_NAME16, version: "2.3.0", ref: "https://element-plus.org/en-US/component/switch.html#attributes", type: "Attribute" }, computed(() => { var _a3; return !!((_a3 = vm.vnode.props) == null ? void 0 : _a3.value); })); const { inputId } = useFormItemInputId(props, { formItemContext: formItem }); const switchDisabled = useDisabled(computed(() => props.loading)); const isControlled = ref(props.modelValue !== false); const input = ref(); const core = ref(); const switchKls = computed(() => [ ns2.b(), ns2.m(switchSize.value), ns2.is("disabled", switchDisabled.value), ns2.is("checked", checked.value) ]); const coreStyle = computed(() => ({ width: addUnit(props.width) })); watch(() => props.modelValue, () => { isControlled.value = true; }); watch(() => props.value, () => { isControlled.value = false; }); const actualValue = computed(() => { return isControlled.value ? props.modelValue : props.value; }); const checked = computed(() => actualValue.value === props.activeValue); if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) { emit(UPDATE_MODEL_EVENT, props.inactiveValue); emit(CHANGE_EVENT, props.inactiveValue); emit(INPUT_EVENT, props.inactiveValue); } watch(checked, (val) => { var _a3; input.value.checked = val; if (props.validateEvent) { (_a3 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a3.call(formItem, "change").catch((err) => debugWarn(err)); } }); const handleChange = () => { const val = checked.value ? props.inactiveValue : props.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 } = props; if (!beforeChange) { handleChange(); return; } const shouldChange = beforeChange(); const isPromiseOrBool = [ isPromise(shouldChange), isBoolean2(shouldChange) ].includes(true); if (!isPromiseOrBool) { throwError(COMPONENT_NAME16, "beforeChange must return type `Promise<boolean>` or `boolean`"); } if (isPromise(shouldChange)) { shouldChange.then((result2) => { if (result2) { handleChange(); } }).catch((e) => { debugWarn(COMPONENT_NAME16, `some error occurred: ${e}`); }); } else if (shouldChange) { handleChange(); } }; const styles = computed(() => { return ns2.cssVarBlock({ ...props.activeColor ? { "on-color": props.activeColor } : null, ...props.inactiveColor ? { "off-color": props.inactiveColor } : null, ...props.borderColor ? { "border-color": props.borderColor } : null }); }); const focus = () => { var _a3, _b; (_b = (_a3 = input.value) == null ? void 0 : _a3.focus) == null ? void 0 : _b.call(_a3); }; onMounted(() => { input.value.checked = checked.value; }); expose({ focus, checked }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(unref(switchKls)), style: normalizeStyle(unref(styles)), onClick: withModifiers(switchValue, ["prevent"]) }, [ createBaseVNode("input", { id: unref(inputId), ref_key: "input", ref: input, class: normalizeClass(unref(ns2).e("input")), type: "checkbox", role: "switch", "aria-checked": unref(checked), "aria-disabled": unref(switchDisabled), 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_236), !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", { key: 0, class: normalizeClass([ unref(ns2).e("label"), unref(ns2).em("label", "left"), unref(ns2).is("active", !unref(checked)) ]) }, [ _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": unref(checked) }, toDisplayString(_ctx.inactiveText), 9, _hoisted_317)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("span", { ref_key: "core", ref: core, class: normalizeClass(unref(ns2).e("core")), style: normalizeStyle(unref(coreStyle)) }, [ _ctx.inlinePrompt ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass(unref(ns2).e("inner")) }, [ _ctx.activeIcon || _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns2).is("icon")) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon))) ]), _: 1 }, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass(unref(ns2).is("text")), "aria-hidden": !unref(checked) }, toDisplayString(unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, _hoisted_410)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns2).e("action")) }, [ _ctx.loading ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns2).is("loading")) }, { default: withCtx(() => [ createVNode(unref(loading_default)) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true) ], 2) ], 6), !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", { key: 1, class: normalizeClass([ unref(ns2).e("label"), unref(ns2).em("label", "right"), unref(ns2).is("active", unref(checked)) ]) }, [ _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": !unref(checked) }, toDisplayString(_ctx.activeText), 9, _hoisted_57)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ], 14, _hoisted_158); }; } }); var Switch = _export_sfc(_sfc_main119, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/switch/index.mjs var ElSwitch = withInstall(Switch); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/util.mjs var import_escape_html = __toESM(require_escape_html(), 1); var getCell = function(event) { var _a3; return (_a3 = event.target) == null ? void 0 : _a3.closest("td"); }; var orderBy2 = function(array4, sortKey, reverse2, sortMethod, sortBy2) { if (!sortKey && !sortMethod && (!sortBy2 || Array.isArray(sortBy2) && !sortBy2.length)) { return array4; } if (typeof reverse2 === "string") { reverse2 = reverse2 === "descending" ? -1 : 1; } else { reverse2 = reverse2 && reverse2 < 0 ? -1 : 1; } const getKey = sortMethod ? null : function(value, index) { if (sortBy2) { if (!Array.isArray(sortBy2)) { sortBy2 = [sortBy2]; } return sortBy2.map((by) => { if (typeof by === "string") { 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) ? get_default(value, sortKey) : value]; }; const compare = function(a2, b2) { if (sortMethod) { return sortMethod(a2.value, b2.value); } for (let i = 0, len = a2.key.length; i < len; i++) { if (a2.key[i] < b2.key[i]) { return -1; } if (a2.key[i] > b2.key[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 (typeof rowKey2 === "string") { 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 (typeof rowKey2 === "function") { return rowKey2.call(null, row); } }; var getKeysMap = function(array4, rowKey2) { const arrayMap2 = {}; (array4 || []).forEach((row, index) => { arrayMap2[getRowIdentity(row, rowKey2)] = { row, index }; }); 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 (typeof value !== "undefined") { options[key] = value; } } } return options; } function parseWidth(width) { if (width === "") return width; if (width !== void 0) { width = Number.parseInt(width, 10); if (Number.isNaN(width)) { width = ""; } } return width; } function parseMinWidth(minWidth) { if (minWidth === "") return minWidth; if (minWidth !== void 0) { minWidth = parseWidth(minWidth); if (Number.isNaN(minWidth)) { minWidth = 80; } } return minWidth; } function parseHeight(height) { if (typeof height === "number") { return height; } if (typeof height === "string") { if (/^\d+(?:px)?$/.test(height)) { return 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) { let changed = false; const index = statusArr.indexOf(row); const included = index !== -1; const toggleStatus = (type4) => { if (type4 === "add") { statusArr.push(row); } else { statusArr.splice(index, 1); } changed = true; if (isArray(row.children)) { row.children.forEach((item) => { toggleRowStatus(statusArr, item, newVal != null ? newVal : !included); }); } }; if (isBoolean2(newVal)) { if (newVal && !included) { toggleStatus("add"); } else if (!newVal && included) { toggleStatus("remove"); } } else { included ? toggleStatus("remove") : toggleStatus("add"); } return changed; } function walkTreeNode(root2, cb, childrenKey = "children", lazyKey = "hasChildren") { const isNil2 = (array4) => !(Array.isArray(array4) && array4.length); function _walker(parent2, children, level) { cb(parent2, children, level); children.forEach((item) => { if (item[lazyKey]) { cb(item, null, level + 1); return; } const children2 = item[childrenKey]; if (!isNil2(children2)) { _walker(item, children2, level + 1); } }); } root2.forEach((item) => { if (item[lazyKey]) { cb(item, null, 0); return; } const children = item[childrenKey]; if (!isNil2(children)) { _walker(item, children, 0); } }); } var removePopper; function createTablePopper(parentNode, trigger2, popperContent, tooltipOptions) { tooltipOptions = merge_default({ enterable: true, showArrow: true }, tooltipOptions); const { nextZIndex } = useZIndex(); const ns2 = parentNode == null ? void 0 : parentNode.dataset.prefix; const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns2}-scrollbar__wrap`); function renderContent() { const isLight = tooltipOptions.effect === "light"; const content2 = document.createElement("div"); content2.className = [ `${ns2}-popper`, isLight ? "is-light" : "is-dark", tooltipOptions.popperClass || "" ].join(" "); popperContent = (0, import_escape_html.default)(popperContent); content2.innerHTML = popperContent; content2.style.zIndex = String(nextZIndex()); parentNode == null ? void 0 : parentNode.appendChild(content2); return content2; } function renderArrow() { const arrow2 = document.createElement("div"); arrow2.className = `${ns2}-popper__arrow`; return arrow2; } function showPopper() { popperInstance && popperInstance.update(); } removePopper == null ? void 0 : removePopper(); removePopper = () => { try { popperInstance && popperInstance.destroy(); content && (parentNode == null ? void 0 : parentNode.removeChild(content)); trigger2.removeEventListener("mouseenter", onOpen); trigger2.removeEventListener("mouseleave", onClose); scrollContainer == null ? void 0 : scrollContainer.removeEventListener("scroll", removePopper); removePopper = void 0; } catch (e) { } }; let popperInstance = null; let onOpen = showPopper; let onClose = removePopper; if (tooltipOptions.enterable) { ; ({ onOpen, onClose } = useDelayedToggle({ showAfter: tooltipOptions.showAfter, hideAfter: tooltipOptions.hideAfter, open: showPopper, close: removePopper })); } const content = renderContent(); content.onmouseenter = onOpen; content.onmouseleave = onClose; const modifiers = []; if (tooltipOptions.offset) { modifiers.push({ name: "offset", options: { offset: [0, tooltipOptions.offset] } }); } if (tooltipOptions.showArrow) { const arrow2 = content.appendChild(renderArrow()); modifiers.push({ name: "arrow", options: { element: arrow2, padding: 10 } }); } const popperOptions = tooltipOptions.popperOptions || {}; popperInstance = yn(trigger2, content, { placement: tooltipOptions.placement || "top", strategy: "fixed", ...popperOptions, modifiers: popperOptions.modifiers ? modifiers.concat(popperOptions.modifiers) : modifiers }); trigger2.addEventListener("mouseenter", onOpen); trigger2.addEventListener("mouseleave", onClose); scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper); return popperInstance; } 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, offset2 = 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 + offset2 === store.states.fixedLeafColumnsLength.value - 1) { classes.push("is-last-column"); } else if (!isLeft && start - offset2 === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) { classes.push("is-first-column"); } } return classes; }; function getOffset2(offset2, column2) { return offset2 + (column2.realWidth === null || 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(getOffset2, 0); } else { styles.right = columns2.slice(after2 + 1).reverse().reduce(getOffset2, 0); } return styles; }; var ensurePosition = (style, key) => { if (!style) return; if (!Number.isNaN(style[key])) { style[key] = `${style[key]}px`; } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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); 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/.pnpm/element-plus@2.2.32_vue@3.2.44/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) => { const { data, rowKey: rowKey2 } = watcherData; let _currentRow = null; if (rowKey2.value) { _currentRow = (unref(data) || []).find((item) => getRowIdentity(item, rowKey2.value) === key); } currentRow.value = _currentRow; instance.emit("current-change", currentRow.value, null); }; 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 (!data.includes(oldCurrentRow) && oldCurrentRow) { if (rowKey2) { const currentRowKey = getRowIdentity(oldCurrentRow, rowKey2); setCurrentRowByKey(currentRowKey); } else { currentRow.value = null; } if (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/.pnpm/element-plus@2.2.32_vue@3.2.44/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 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 (Array.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); return res; }; const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll = ((_a3) => (_a3 = instance.store) == null ? void 0 : _a3.states.defaultExpandAll.value)()) => { var _a22; 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) => { const oldValue = oldTreeData[key]; const lazyNodeChildren = normalizedLazyNode_[key].children; if (rootLazyRowKeys.includes(key)) { if (newTreeData[key].children.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: "" }; } }); } } treeData.value = newTreeData; (_a22 = instance.store) == null ? void 0 : _a22.updateTableScrollY(); }; watch(() => expandRowKeys.value, () => { updateTreeData(true); }); watch(() => normalizedData.value, () => { updateTreeData(); }); watch(() => normalizedLazyNode.value, () => { updateTreeData(); }); const updateTreeExpandKeys = (value) => { expandRowKeys.value = value; updateTreeData(); }; 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 = typeof expanded === "undefined" ? !data.expanded : expanded; treeData.value[id].expanded = expanded; if (oldExpanded !== expanded) { instance.emit("expand-change", row, expanded); } 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 (lazy.value && data && "loaded" in data && !data.loaded) { 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 (!Array.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); }); } }; return { loadData, loadOrToggle, toggleTreeExpansion, updateTreeExpandKeys, updateTreeData, normalize, states: { expandRowKeys, treeData, indent, lazy, lazyTreeNodeMap, lazyColumnIdentifier, childrenColumnName } }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/store/watcher.mjs var sortData = (data, states) => { const sortingColumn = states.sortingColumn; if (!sortingColumn || typeof sortingColumn.sortable === "string") { return data; } return orderBy2(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy); }; var doFlattenColumns = (columns2) => { const result2 = []; columns2.forEach((column2) => { if (column2.children) { result2.push.apply(result2, doFlattenColumns(column2.children)); } else { result2.push(column2); } }); return result2; }; function useWatcher() { var _a3; const instance = getCurrentInstance(); const { size: tableSize } = toRefs((_a3 = instance.proxy) == null ? void 0 : _a3.$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); watch(data, () => instance.state && scheduleLayout(false), { deep: true }); const assertRowKey = () => { if (!rowKey2.value) throw new Error("[ElTable] prop row-key is required"); }; const updateChildFixed = (column2) => { var _a22; (_a22 = column2.children) == null ? void 0 : _a22.forEach((childColumn) => { childColumn.fixed = column2.fixed; updateChildFixed(childColumn); }); }; const updateColumns = () => { _columns.value.forEach((column2) => { updateChildFixed(column2); }); fixedColumns.value = _columns.value.filter((column2) => column2.fixed === true || column2.fixed === "left"); rightFixedColumns.value = _columns.value.filter((column2) => column2.fixed === "right"); if (fixedColumns.value.length > 0 && _columns.value[0] && _columns.value[0].type === "selection" && !_columns.value[0].fixed) { _columns.value[0].fixed = true; fixedColumns.value.unshift(_columns.value[0]); } const notFixedColumns = _columns.value.filter((column2) => !column2.fixed); originColumns.value = [].concat(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 = [].concat(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) => { return selection.value.includes(row); }; const clearSelection = () => { isAllSelected.value = false; const oldSelection = selection.value; if (oldSelection.length) { selection.value = []; instance.emit("selection-change", []); } }; const cleanSelection = () => { let deleted; if (rowKey2.value) { deleted = []; const selectedMap = getKeysMap(selection.value, rowKey2.value); const dataMap = getKeysMap(data.value, rowKey2.value); for (const key in selectedMap) { if (hasOwn(selectedMap, key) && !dataMap[key]) { deleted.push(selectedMap[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 = void 0, emitChange = true) => { const changed = toggleRowStatus(selection.value, row, selected); if (changed) { const newSelection = (selection.value || []).slice(); if (emitChange) { instance.emit("select", newSelection, row); } instance.emit("selection-change", newSelection); } }; const _toggleAllSelection = () => { var _a22, _b; const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length); isAllSelected.value = value; let selectionChanged = false; let childrenCount = 0; const rowKey22 = (_b = (_a22 = instance == null ? void 0 : instance.store) == null ? void 0 : _a22.states) == null ? void 0 : _b.rowKey.value; data.value.forEach((row, index) => { const rowIndex = index + childrenCount; if (selectable.value) { if (selectable.value.call(null, row, rowIndex) && toggleRowStatus(selection.value, row, value)) { selectionChanged = true; } } else { if (toggleRowStatus(selection.value, row, value)) { selectionChanged = true; } } childrenCount += getChildrenCount(getRowIdentity(row, rowKey22)); }); if (selectionChanged) { instance.emit("selection-change", selection.value ? selection.value.slice() : []); } instance.emit("select-all", selection.value); }; const updateSelectionByRowKey = () => { const selectedMap = getKeysMap(selection.value, rowKey2.value); data.value.forEach((row) => { const rowId = getRowIdentity(row, rowKey2.value); const rowInfo = selectedMap[rowId]; if (rowInfo) { selection.value[rowInfo.index] = row; } }); }; const updateAllSelected = () => { var _a22, _b, _c; if (((_a22 = data.value) == null ? void 0 : _a22.length) === 0) { isAllSelected.value = false; return; } let selectedMap; if (rowKey2.value) { selectedMap = getKeysMap(selection.value, rowKey2.value); } const isSelected2 = function(row) { if (selectedMap) { return !!selectedMap[getRowIdentity(row, rowKey2.value)]; } else { return selection.value.includes(row); } }; let isAllSelected_ = true; let selectedCount = 0; let childrenCount = 0; for (let i = 0, j = (data.value || []).length; i < j; i++) { const keyProp = (_c = (_b = instance == null ? void 0 : instance.store) == null ? void 0 : _b.states) == null ? void 0 : _c.rowKey.value; const rowIndex = i + childrenCount; const item = data.value[i]; const isRowSelectable = selectable.value && selectable.value.call(null, item, rowIndex); if (!isSelected2(item)) { if (!selectable.value || isRowSelectable) { isAllSelected_ = false; break; } } else { selectedCount++; } childrenCount += getChildrenCount(getRowIdentity(item, keyProp)); } if (selectedCount === 0) isAllSelected_ = false; isAllSelected.value = isAllSelected_; }; const getChildrenCount = (rowKey22) => { var _a22; if (!instance || !instance.store) return 0; const { treeData } = instance.store.states; let count = 0; const children = (_a22 = treeData.value[rowKey22]) == null ? void 0 : _a22.children; if (children) { count += children.length; children.forEach((childKey) => { count += getChildrenCount(childKey); }); } return count; }; const updateFilters = (columns22, values2) => { if (!Array.isArray(columns22)) { columns22 = [columns22]; } const filters_ = {}; columns22.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 = () => { data.value = sortData(filteredData.value, { sortingColumn: sortingColumn.value, sortProp: sortProp.value, sortOrder: sortOrder.value }); }; const execQuery = (ignore = void 0) => { if (!(ignore && 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 (typeof columnKeys === "string") { columnKeys = [columnKeys]; } if (Array.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, 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, updateSelectionByRowKey, updateAllSelected, updateFilters, updateCurrentRow, updateSort, execFilter, execSort, execQuery, clearFilter, clearSort, toggleRowExpansion, setExpandRowKeysAdapter, setCurrentRowKey, toggleRowExpansionAdapter, isRowExpanded, updateExpandRows, updateCurrentRowData, loadOrToggle, updateTreeData, 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/store/index.mjs function replaceColumn(array4, column2) { return array4.map((item) => { var _a3; if (item.id === column2.id) { return column2; } else if ((_a3 = item.children) == null ? void 0 : _a3.length) { item.children = replaceColumn(item.children, column2); } return item; }); } function sortColumn(array4) { array4.forEach((item) => { var _a3, _b; item.no = (_a3 = item.getColumnIndex) == null ? void 0 : _a3.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 ns2 = useNamespace("table"); 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(); instance.store.updateSelectionByRowKey(); } else { if (dataInstanceChanged) { instance.store.clearSelection(); } else { instance.store.cleanSelection(); } } instance.store.updateAllSelected(); if (instance.$ready) { instance.store.scheduleLayout(); } }, insertColumn(states, column2, parent2, updateColumnOrder) { const array4 = unref(states._columns); let newColumns = []; if (!parent2) { array4.push(column2); newColumns = array4; } else { if (parent2 && !parent2.children) { parent2.children = []; } parent2.children.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 _a3; const newColumnIndex = (_a3 = column2.getColumnIndex) == null ? void 0 : _a3.call(column2); if (newColumnIndex === column2.no) return; sortColumn(states._columns.value); if (instance.$ready) { instance.store.updateColumns(); } }, removeColumn(states, column2, parent2, updateColumnOrder) { const array4 = unref(states._columns) || []; if (parent2) { parent2.children.splice(parent2.children.findIndex((item) => item.id === column2.id), 1); nextTick(() => { var _a3; if (((_a3 = parent2.children) == null ? void 0 : _a3.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 (orderValue === null) { 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() { instance.store.toggleAllSelection(); }, 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].concat(args)); } else { throw new Error(`Action not found: ${name}`); } }; const updateTableScrollY = function() { nextTick(() => instance.layout.updateScrollY.apply(instance.layout)); }; return { ns: ns2, ...watcher, mutations, commit, updateTableScrollY }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/store/helper.mjs var InitialStateMap = { rowKey: "rowKey", defaultExpandAll: "defaultExpandAll", selectOnIndeterminate: "selectOnIndeterminate", indent: "indent", lazy: "lazy", data: "data", ["treeProps.hasChildren"]: { key: "lazyColumnIdentifier", default: "hasChildren" }, ["treeProps.children"]: { key: "childrenColumnName", default: "children" } }; function createStore(table, props) { 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(props, key), key, store); }); proxyTableProps(store, props); return store; } function proxyTableProps(store, props) { Object.keys(InitialStateMap).forEach((key) => { watch(() => getArrKeysValue(props, key), (value) => { handleValue(value, key, store); }); }); } function handleValue(value, propsKey, store) { let newVal = value; let storeKey = InitialStateMap[propsKey]; if (typeof InitialStateMap[propsKey] === "object") { storeKey = storeKey.key; newVal = newVal || InitialStateMap[propsKey].default; } store.states[storeKey].value = newVal; } function getArrKeysValue(props, keys3) { if (keys3.includes(".")) { const keyList = keys3.split("."); let value = props; keyList.forEach((key) => { value = value[key]; }); return value; } else { return props[keys3]; } } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 (height === null) 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)) return nextTick(() => this.setHeight(value, prop)); if (typeof value === "number") { el.style[prop] = `${value}px`; this.updateElsHeight(); } else if (typeof value === "string") { el.style[prop] = value; this.updateElsHeight(); } } 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() { if (!isClient) return; const fit = this.fit; const bodyWidth = this.table.vnode.el.clientWidth; let bodyMinWidth = 0; const flattenColumns = this.getFlattenColumns(); const flexColumns = flattenColumns.filter((column2) => typeof column2.width !== "number"); flattenColumns.forEach((column2) => { if (typeof column2.width === "number" && 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 _a3, _b; switch (event) { case "columns": (_a3 = observer.state) == null ? void 0 : _a3.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/filter-panel.mjs var { CheckboxGroup: ElCheckboxGroup2 } = ElCheckbox; var _sfc_main120 = defineComponent({ name: "ElTableFilterPanel", components: { ElCheckbox, ElCheckboxGroup: ElCheckboxGroup2, ElScrollbar, ElTooltip, ElIcon, ArrowDown: arrow_down_default, ArrowUp: arrow_up_default }, directives: { ClickOutside }, props: { placement: { type: String, default: "bottom-start" }, store: { type: Object }, column: { type: Object }, upDataColumn: { type: Function } }, setup(props) { const instance = getCurrentInstance(); const { t } = useLocale(); const ns2 = useNamespace("table-filter"); const parent2 = instance == null ? void 0 : instance.parent; if (!parent2.filterPanels.value[props.column.id]) { parent2.filterPanels.value[props.column.id] = instance; } const tooltipVisible = ref(false); const tooltip = ref(null); const filters = computed(() => { return props.column && props.column.filters; }); const filterValue = computed({ get: () => { var _a3; return (((_a3 = props.column) == null ? void 0 : _a3.filteredValue) || [])[0]; }, set: (value) => { if (filteredValue.value) { if (typeof value !== "undefined" && value !== null) { filteredValue.value.splice(0, 1, value); } else { filteredValue.value.splice(0, 1); } } } }); const filteredValue = computed({ get() { if (props.column) { return props.column.filteredValue || []; } return []; }, set(value) { if (props.column) { props.upDataColumn("filteredValue", value); } } }); const multiple = computed(() => { if (props.column) { return props.column.filterMultiple; } return true; }); const isActive = (filter2) => { return filter2.value === filterValue.value; }; const hidden = () => { tooltipVisible.value = false; }; const showFilterPanel = (e) => { e.stopPropagation(); tooltipVisible.value = !tooltipVisible.value; }; const hideFilterPanel = () => { tooltipVisible.value = false; }; const handleConfirm = () => { confirmFilter(filteredValue.value); hidden(); }; const handleReset = () => { filteredValue.value = []; confirmFilter(filteredValue.value); hidden(); }; const handleSelect = (_filterValue) => { filterValue.value = _filterValue; if (typeof _filterValue !== "undefined" && _filterValue !== null) { confirmFilter(filteredValue.value); } else { confirmFilter([]); } hidden(); }; const confirmFilter = (filteredValue2) => { props.store.commit("filterChange", { column: props.column, values: filteredValue2 }); props.store.updateAllSelected(); }; watch(tooltipVisible, (value) => { if (props.column) { props.upDataColumn("filterOpened", value); } }, { immediate: true }); const popperPaneRef = computed(() => { var _a3, _b; return (_b = (_a3 = tooltip.value) == null ? void 0 : _a3.popperRef) == null ? void 0 : _b.contentRef; }); return { tooltipVisible, multiple, filteredValue, filterValue, filters, handleConfirm, handleReset, handleSelect, isActive, t, ns: ns2, showFilterPanel, hideFilterPanel, popperPaneRef, tooltip }; } }); var _hoisted_159 = { key: 0 }; var _hoisted_237 = ["disabled"]; var _hoisted_318 = ["label", "onClick"]; function _sfc_render29(_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"); const _directive_click_outside = resolveDirective("click-outside"); return openBlock(), createBlock(_component_el_tooltip, { ref: "tooltip", visible: _ctx.tooltipVisible, offset: 0, placement: _ctx.placement, "show-arrow": false, "stop-popper-mouse-event": false, teleported: "", effect: "light", pure: "", "popper-class": _ctx.ns.b(), persistent: "" }, { content: withCtx(() => [ _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_159, [ 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, label: filter2.value }, { default: withCtx(() => [ createTextVNode(toDisplayString(filter2.text), 1) ]), _: 2 }, 1032, ["label"]); }), 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_237), createBaseVNode("button", { type: "button", onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args)) }, toDisplayString(_ctx.t("el.table.resetFilter")), 1) ], 2) ])) : (openBlock(), createElementBlock("ul", { key: 1, class: normalizeClass(_ctx.ns.e("list")) }, [ createBaseVNode("li", { class: normalizeClass([ _ctx.ns.e("list-item"), { [_ctx.ns.is("active")]: _ctx.filterValue === void 0 || _ctx.filterValue === null } ]), onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null)) }, toDisplayString(_ctx.t("el.table.clearFilter")), 3), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter2) => { return openBlock(), createElementBlock("li", { key: filter2.value, class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter2))]), label: filter2.value, onClick: ($event) => _ctx.handleSelect(filter2.value) }, toDisplayString(filter2.text), 11, _hoisted_318); }), 128)) ], 2)) ]), default: withCtx(() => [ withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass([ `${_ctx.ns.namespace.value}-table__column-filter-trigger`, `${_ctx.ns.namespace.value}-none-outline` ]), onClick: _cache[4] || (_cache[4] = (...args) => _ctx.showFilterPanel && _ctx.showFilterPanel(...args)) }, [ createVNode(_component_el_icon, null, { default: withCtx(() => [ _ctx.column.filterOpened ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 })) ]), _: 1 }) ], 2)), [ [_directive_click_outside, _ctx.hideFilterPanel, _ctx.popperPaneRef] ]) ]), _: 1 }, 8, ["visible", "placement", "popper-class"]); } var FilterPanel = _export_sfc(_sfc_main120, [["render", _sfc_render29], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 _a3; const cols = ((_a3 = root2.vnode.el) == null ? void 0 : _a3.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 _a3, _b; const cols = ((_a3 = root2.vnode.el) == null ? void 0 : _a3.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/tokens.mjs var TABLE_INJECTION_KEY = Symbol("ElTable"); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs function useEvent(props, 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) => { if (!isClient) return; if (column2.children && column2.children.length > 0) return; if (draggingColumn.value && props.border) { dragging.value = true; const table = parent2; emit("set-drag-visible", true); const tableEl = table == null ? void 0 : table.vnode.el; const tableLeft = tableEl.getBoundingClientRect().left; const columnEl = instance.vnode.el.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(() => { props.store.scheduleLayout(false, true); }); document.body.style.cursor = ""; dragging.value = false; draggingColumn.value = null; dragState.value = {}; 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 _a3; if (column2.children && column2.children.length > 0) return; const target2 = (_a3 = event.target) == null ? void 0 : _a3.closest("th"); if (!column2 || !column2.resizable) return; if (!dragging.value && props.border) { const rect = target2.getBoundingClientRect(); const bodyStyle = document.body.style; if (rect.width > 12 && rect.right - event.pageX < 8) { bodyStyle.cursor = "col-resize"; if (hasClass(target2, "is-sortable")) { target2.style.cursor = "col-resize"; } draggingColumn.value = column2; } else if (!dragging.value) { bodyStyle.cursor = ""; if (hasClass(target2, "is-sortable")) { target2.style.cursor = "pointer"; } draggingColumn.value = null; } } }; const handleMouseOut = () => { if (!isClient) 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 _a3; event.stopPropagation(); const order = column2.order === givenOrder ? null : givenOrder || toggleOrder(column2); const target2 = (_a3 = event.target) == null ? void 0 : _a3.closest("th"); if (target2) { if (hasClass(target2, "noclick")) { removeClass(target2, "noclick"); return; } } if (!column2.sortable) return; const states = props.store.states; let sortProp = states.sortProp.value; let sortOrder; const sortingColumn = states.sortingColumn.value; if (sortingColumn !== column2 || sortingColumn === column2 && sortingColumn.order === null) { 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs function useStyle(props) { const parent2 = inject(TABLE_INJECTION_KEY); const ns2 = useNamespace("table"); const getHeaderRowStyle = (rowIndex) => { const headerRowStyle = parent2 == null ? void 0 : parent2.props.headerRowStyle; if (typeof headerRowStyle === "function") { return headerRowStyle.call(null, { rowIndex }); } return headerRowStyle; }; const getHeaderRowClass = (rowIndex) => { const classes = []; const headerRowClassName = parent2 == null ? void 0 : parent2.props.headerRowClassName; if (typeof headerRowClassName === "string") { classes.push(headerRowClassName); } else if (typeof headerRowClassName === "function") { classes.push(headerRowClassName.call(null, { rowIndex })); } return classes.join(" "); }; const getHeaderCellStyle = (rowIndex, columnIndex, row, column2) => { var _a3; let headerCellStyles = (_a3 = parent2 == null ? void 0 : parent2.props.headerCellStyle) != null ? _a3 : {}; if (typeof headerCellStyles === "function") { headerCellStyles = headerCellStyles.call(null, { rowIndex, columnIndex, row, column: column2 }); } const fixedStyle = getFixedColumnOffset(columnIndex, column2.fixed, props.store, row); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return Object.assign({}, headerCellStyles, fixedStyle); }; const getHeaderCellClass = (rowIndex, columnIndex, row, column2) => { const fixedClasses = getFixedColumnsClass(ns2.b(), columnIndex, column2.fixed, props.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 (typeof headerCellClassName === "string") { classes.push(headerCellClassName); } else if (typeof headerCellClassName === "function") { classes.push(headerCellClassName.call(null, { rowIndex, columnIndex, row, column: column2 })); } classes.push(ns2.e("cell")); return classes.filter((className) => Boolean(className)).join(" "); }; return { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props) { const parent2 = inject(TABLE_INJECTION_KEY); const columnRows = computed(() => { return convertToRows(props.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/.pnpm/element-plus@2.2.32_vue@3.2.44/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: "" }; } } }, setup(props, { emit }) { const instance = getCurrentInstance(); const parent2 = inject(TABLE_INJECTION_KEY); const ns2 = useNamespace("table"); const filterPanels = ref({}); const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2); onMounted(async () => { await nextTick(); await nextTick(); const { prop, order } = props.defaultSort; parent2 == null ? void 0 : parent2.store.commit("sort", { prop, order, init: true }); }); const { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick } = useEvent(props, emit); const { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass } = useStyle(props); const { isGroup, toggleAllSelection, columnRows } = useUtils(props); instance.state = { onColumnsChange, onScrollableChange }; instance.filterPanels = filterPanels; return { ns: ns2, filterPanels, onColumnsChange, onScrollableChange, columnRows, getHeaderRowClass, getHeaderRowStyle, getHeaderCellClass, getHeaderCellStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick, isGroup, toggleAllSelection }; }, render() { const { ns: ns2, isGroup, columnRows, getHeaderCellStyle, getHeaderCellClass, getHeaderRowClass, getHeaderRowStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleSortClick, handleMouseOut, store, $parent } = this; let rowSpan = 1; return h("thead", { class: { [ns2.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; } return h("th", { class: getHeaderCellClass(rowIndex, cellIndex, subColumns, column2), colspan: column2.colSpan, key: `${column2.id}-thead`, rowspan: column2.rowSpan, style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column2), onClick: ($event) => 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("span", { onClick: ($event) => handleSortClick($event, column2), class: "caret-wrapper" }, [ 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", column: column2, upDataColumn: (key, value) => { column2[key] = value; } }) ]) ]); })))); } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs function useEvents(props) { const parent2 = inject(TABLE_INJECTION_KEY); const tooltipContent = ref(""); const tooltipTrigger = ref(h("div")); const handleEvent = (event, row, name) => { var _a3; const table = parent2; const cell = getCell(event); let column2; const namespace = (_a3 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a3.dataset.prefix; if (cell) { column2 = getColumnByCell({ columns: props.store.states.columns.value }, 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) => { props.store.commit("setCurrentRow", row); handleEvent(event, row, "click"); }; const handleContextMenu = (event, row) => { handleEvent(event, row, "contextmenu"); }; const handleMouseEnter = debounce_default((index) => { props.store.commit("setHoverRow", index); }, 30); const handleMouseLeave = debounce_default(() => { props.store.commit("setHoverRow", null); }, 30); const handleCellMouseEnter = (event, row, tooltipOptions) => { var _a3; const table = parent2; const cell = getCell(event); const namespace = (_a3 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a3.dataset.prefix; if (cell) { const column2 = getColumnByCell({ columns: props.store.states.columns.value }, cell, namespace); 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) { return; } const cellChild = event.target.querySelector(".cell"); if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length)) { return; } const range4 = document.createRange(); range4.setStart(cellChild, 0); range4.setEnd(cellChild, cellChild.childNodes.length); const rangeWidth = Math.round(range4.getBoundingClientRect().width); const padding = (Number.parseInt(getStyle(cellChild, "paddingLeft"), 10) || 0) + (Number.parseInt(getStyle(cellChild, "paddingRight"), 10) || 0); if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) { createTablePopper(parent2 == null ? void 0 : parent2.refs.tableWrapper, cell, cell.innerText || cell.textContent, tooltipOptions); } }; const handleCellMouseLeave = (event) => { const cell = getCell(event); if (!cell) return; 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs function useStyles(props) { const parent2 = inject(TABLE_INJECTION_KEY); const ns2 = useNamespace("table"); const getRowStyle = (row, rowIndex) => { const rowStyle = parent2 == null ? void 0 : parent2.props.rowStyle; if (typeof rowStyle === "function") { return rowStyle.call(null, { row, rowIndex }); } return rowStyle || null; }; const getRowClass = (row, rowIndex) => { const classes = [ns2.e("row")]; if ((parent2 == null ? void 0 : parent2.props.highlightCurrentRow) && row === props.store.states.currentRow.value) { classes.push("current-row"); } if (props.stripe && rowIndex % 2 === 1) { classes.push(ns2.em("row", "striped")); } const rowClassName = parent2 == null ? void 0 : parent2.props.rowClassName; if (typeof rowClassName === "string") { classes.push(rowClassName); } else if (typeof rowClassName === "function") { 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 (typeof cellStyle === "function") { cellStyles = cellStyle.call(null, { rowIndex, columnIndex, row, column: column2 }); } const fixedStyle = getFixedColumnOffset(columnIndex, props == null ? void 0 : props.fixed, props.store); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return Object.assign({}, cellStyles, fixedStyle); }; const getCellClass = (rowIndex, columnIndex, row, column2, offset2) => { const fixedClasses = getFixedColumnsClass(ns2.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset2); const classes = [column2.id, column2.align, column2.className, ...fixedClasses]; const cellClassName = parent2 == null ? void 0 : parent2.props.cellClassName; if (typeof cellClassName === "string") { classes.push(cellClassName); } else if (typeof cellClassName === "function") { classes.push(cellClassName.call(null, { rowIndex, columnIndex, row, column: column2 })); } classes.push(ns2.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 (typeof fn2 === "function") { const result2 = fn2({ row, column: column2, rowIndex, columnIndex }); if (Array.isArray(result2)) { rowspan = result2[0]; colspan = result2[1]; } else if (typeof result2 === "object") { 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs function useRender(props) { const parent2 = inject(TABLE_INJECTION_KEY); const ns2 = useNamespace("table"); const { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger } = useEvents(props); const { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth } = useStyles(props); const firstDefaultColumnIndex = computed(() => { return props.store.states.columns.value.findIndex(({ type: type4 }) => type4 === "default"); }); const getKeyOfRow = (row, index) => { const rowKey2 = parent2.props.rowKey; if (rowKey2) { return getRowIdentity(row, rowKey2); } return index; }; const rowRender = (row, $index, treeRowData, expanded = false) => { const { tooltipEffect, tooltipOptions, store } = props; const { indent, columns: columns2 } = store.states; const rowClasses = getRowClass(row, $index); let display = true; if (treeRowData) { rowClasses.push(ns2.em("row", `level-${treeRowData.level}`)); display = treeRowData.display; } 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 = { ...column2 }; columnData.realWidth = getColspanRealWidth(columns2.value, colspan, cellIndex); const data = { store: props.store, _self: props.context || parent2, column: columnData, row, $index, cellIndex, expanded }; if (cellIndex === firstDefaultColumnIndex.value && treeRowData) { data.treeNode = { indent: treeRowData.level * indent.value, level: treeRowData.level }; if (typeof treeRowData.expanded === "boolean") { data.treeNode.expanded = treeRowData.expanded; if ("loading" in treeRowData) { data.treeNode.loading = treeRowData.loading; } if ("noLazyChildren" in treeRowData) { data.treeNode.noLazyChildren = treeRowData.noLazyChildren; } } } const baseKey = `${$index},${cellIndex}`; const patchKey = columnData.columnKey || columnData.rawColumnKey || ""; const tdChildren = cellChildren(cellIndex, column2, data); const mergedTooltipOptions = column2.showOverflowTooltip && merge_default({ effect: tooltipEffect }, tooltipOptions, column2.showOverflowTooltip); return h("td", { 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 }, [tdChildren]); })); }; const cellChildren = (cellIndex, column2, data) => { return column2.renderCell(data); }; const wrappedRowRender = (row, $index) => { const store = props.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.renderExpanded; if (expanded) { if (!renderExpanded) { console.error("[Element Error]renderExpanded is required."); return tr; } return [ [ tr, h("tr", { key: `expanded-row__${tr.key}` }, [ h("td", { colspan: columns2.length, class: `${ns2.e("cell")} ${ns2.e("expanded-cell")}` }, [renderExpanded({ row, $index, store, expanded })]) ]) ] ]; } else { return [[tr]]; } } 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 }; if (typeof cur.lazy === "boolean") { if (typeof cur.loaded === "boolean" && cur.loaded) { treeRowData.noLazyChildren = !(cur.children && cur.children.length); } treeRowData.loading = cur.loading; } } const tmp = [rowRender(row, $index, treeRowData)]; 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 (childKey === void 0 || childKey === null) { 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 (typeof cur.lazy === "boolean") { if (typeof cur.loaded === "boolean" && cur.loaded) { innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length); } innerTreeRowData.loading = cur.loading; } } i++; tmp.push(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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-body/defaults.mjs var defaultProps = { 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-body/index.mjs var TableBody = defineComponent({ name: "ElTableBody", props: defaultProps, setup(props) { const instance = getCurrentInstance(); const parent2 = inject(TABLE_INJECTION_KEY); const ns2 = useNamespace("table"); const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender(props); const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2); watch(props.store.states.hoverRow, (newVal, oldVal) => { if (!props.store.states.isComplex.value || !isClient) return; let raf = window.requestAnimationFrame; if (!raf) { raf = (fn2) => window.setTimeout(fn2, 16); } raf(() => { 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(`${ns2.e("row")}`)); const oldRow = rows[oldVal]; const newRow = rows[newVal]; if (oldRow) { removeClass(oldRow, "hover-row"); } if (newRow) { addClass(newRow, "hover-row"); } }); }); onUnmounted(() => { var _a3; (_a3 = removePopper) == null ? void 0 : _a3(); }); return { ns: ns2, onColumnsChange, onScrollableChange, wrappedRowRender, tooltipContent, tooltipTrigger }; }, render() { const { wrappedRowRender, store } = this; const data = store.states.data.value || []; return h("tbody", {}, [ data.reduce((acc, row) => { return acc.concat(wrappedRowRender(row, acc.length)); }, []) ]); } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/h-helper.mjs function hColgroup(props) { const isAuto = props.tableLayout === "auto"; let columns2 = props.columns || []; if (isAuto) { if (columns2.every((column2) => column2.width === void 0)) { columns2 = []; } } const getPropsData = (column2) => { const propsData = { key: `${props.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/.pnpm/element-plus@2.2.32_vue@3.2.44/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(() => { return store.states.fixedLeafColumnsLength.value; }); const rightFixedLeafCount = computed(() => { return store.states.rightFixedColumns.value.length; }); const columnsCount = computed(() => { return store.states.columns.value.length; }); const leftFixedCount = computed(() => { return store.states.fixedColumns.value.length; }); const rightFixedCount = computed(() => { return store.states.rightFixedColumns.value.length; }); return { leftFixedLeafCount, rightFixedLeafCount, columnsCount, leftFixedCount, rightFixedCount, columns: store.states.columns }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs function useStyle2(props) { const { columns: columns2 } = useMapState(); const ns2 = useNamespace("table"); const getCellClasses = (columns22, cellIndex) => { const column2 = columns22[cellIndex]; const classes = [ ns2.e("cell"), column2.id, column2.align, column2.labelClassName, ...getFixedColumnsClass(ns2.b(), cellIndex, column2.fixed, props.store) ]; if (column2.className) { classes.push(column2.className); } if (!column2.children) { classes.push(ns2.is("leaf")); } return classes; }; const getCellStyles = (column2, cellIndex) => { const fixedStyle = getFixedColumnOffset(cellIndex, column2.fixed, props.store); ensurePosition(fixedStyle, "left"); ensurePosition(fixedStyle, "right"); return fixedStyle; }; return { getCellClasses, getCellStyles, columns: columns2 }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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(props) { const { getCellClasses, getCellStyles, columns: columns2 } = useStyle2(props); const ns2 = useNamespace("table"); return { ns: ns2, getCellClasses, getCellStyles, columns: columns2 }; }, render() { const { columns: columns2, getCellStyles, getCellClasses, summaryMethod, sumText, ns: ns2 } = 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("table", { class: ns2.e("footer"), cellspacing: "0", cellpadding: "0", border: "0" }, [ hColgroup({ columns: columns2 }), h("tbody", [ 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/.pnpm/element-plus@2.2.32_vue@3.2.44/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) => { store.toggleRowSelection(row, selected, false); 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 }); }; return { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table/style-helper.mjs function useStyle3(props, 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); watchEffect(() => { layout2.setHeight(props.height); }); watchEffect(() => { layout2.setMaxHeight(props.maxHeight); }); watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey2]) => { if (!unref(rowKey2) || !unref(currentRowKey)) return; store.setCurrentRowKey(`${currentRowKey}`); }, { immediate: true }); watch(() => props.data, (data) => { table.store.commit("setData", data); }, { immediate: true, deep: true }); watchEffect(() => { if (props.expandRowKeys) { store.setExpandRowKeysAdapter(props.expandRowKeys); } }); const handleMouseLeave = () => { table.store.commit("setHoverRow", null); if (table.hoverState) table.hoverState = null; }; const handleHeaderFooterMousewheel = (event, data) => { const { pixelX, pixelY } = data; if (Math.abs(pixelX) >= Math.abs(pixelY)) { table.refs.bodyWrapper.scrollLeft += data.pixelX / 5; } }; const shouldUpdateHeight = computed(() => { return props.height || props.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(); requestAnimationFrame(syncPosition); }; onMounted(async () => { await nextTick(); store.updateColumns(); bindEvents(); requestAnimationFrame(doLayout); const el = table.vnode.el; const tableHeader = table.refs.headerWrapper; if (props.flexible && el && el.parentElement) { el.parentElement.style.minWidth = "0"; } resizeState.value = { width: tableWidth.value = el.offsetWidth, height: el.offsetHeight, headerHeight: props.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 (props.fit) { useResizeObserver(table.vnode.el, resizeListener); } else { useEventListener(window, "resize", resizeListener); } useResizeObserver(table.refs.bodyWrapper, () => { var _a3, _b; resizeListener(); (_b = (_a3 = table.refs) == null ? void 0 : _a3.scrollBarRef) == null ? void 0 : _b.update(); }); }; const resizeListener = () => { var _a3, _b, _c; 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 ((props.height || shouldUpdateHeight.value) && oldHeight !== height) { shouldUpdateLayout = true; } const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : (_a3 = table.refs.tableHeaderRef) == null ? void 0 : _a3.$el; if (props.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; bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value; if (shouldUpdateLayout) { resizeState.value = { width, height, headerHeight: props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) || 0 }; doLayout(); } }; const tableSize = useSize(); const bodyWidth = computed(() => { const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout2; return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : ""; }); const tableLayout = computed(() => { if (props.maxHeight) return "fixed"; return props.tableLayout; }); const emptyBlockStyle = computed(() => { if (props.data && props.data.length) return null; let height = "100%"; if (props.height && bodyScrollHeight.value) { height = `${bodyScrollHeight.value}px`; } const width = tableWidth.value; return { width: width ? `${width}px` : "", height }; }); const tableInnerStyle = computed(() => { if (props.height) { return { height: !Number.isNaN(Number(props.height)) ? `${props.height}px` : props.height }; } if (props.maxHeight) { return { maxHeight: !Number.isNaN(Number(props.maxHeight)) ? `${props.maxHeight}px` : props.maxHeight }; } return {}; }); const scrollbarStyle = computed(() => { if (props.height) { return { height: "100%" }; } if (props.maxHeight) { if (!Number.isNaN(Number(props.maxHeight))) { const maxHeight = props.maxHeight; const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight); if (reachMaxHeight) { return { maxHeight: `${tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value}px` }; } } else { return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` }; } } return {}; }); const handleFixedMousewheel = (event, data) => { const bodyWrapper = table.refs.bodyWrapper; if (Math.abs(data.spinY) > 0) { const currentScrollTop = bodyWrapper.scrollTop; if (data.pixelY < 0 && currentScrollTop !== 0) { event.preventDefault(); } if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) { event.preventDefault(); } bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5); } else { bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5); } }; return { isHidden: isHidden2, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, handleFixedMousewheel, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, tableInnerStyle, scrollbarStyle }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table/key-render-helper.mjs function useKeyRender(table) { const observer = ref(); 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.value = new MutationObserver(() => { updateOrderFns.forEach((fn2) => fn2()); }); observer.value.observe(columnsWrapper, config); }; onMounted(() => { initWatchDom(); }); onUnmounted(() => { var _a3; (_a3 = observer.value) == null ? void 0 : _a3.disconnect(); }); } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table/defaults.mjs var defaultProps2 = { 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" }; } }, lazy: Boolean, load: Function, style: { type: Object, default: () => ({}) }, className: { type: String, default: "" }, tableLayout: { type: String, default: "fixed" }, scrollbarAlwaysOn: { type: Boolean, default: false }, flexible: Boolean }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs var useScrollbar = () => { const scrollBarRef = ref(); const scrollTo = (options, yCoord) => { const scrollbar = scrollBarRef.value; if (scrollbar) { scrollbar.scrollTo(options, yCoord); } }; const setScrollPosition = (position, offset2) => { const scrollbar = scrollBarRef.value; if (scrollbar && isNumber2(offset2) && ["Top", "Left"].includes(position)) { scrollbar[`setScroll${position}`](offset2); } }; const setScrollTop = (top) => setScrollPosition("Top", top); const setScrollLeft = (left2) => setScrollPosition("Left", left2); return { scrollBarRef, scrollTo, setScrollTop, setScrollLeft }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table.mjs var tableIdSeed = 1; var _sfc_main121 = defineComponent({ name: "ElTable", directives: { Mousewheel }, components: { TableHeader, TableBody, TableFooter, ElScrollbar, hColgroup }, props: defaultProps2, 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" ], setup(props) { const { t } = useLocale(); const ns2 = useNamespace("table"); const table = getCurrentInstance(); provide(TABLE_INJECTION_KEY, table); const store = createStore(table, props); table.store = store; const layout2 = new TableLayout({ store: table.store, table, fit: props.fit, showHeader: props.showHeader }); table.layout = layout2; const isEmpty3 = computed(() => (store.states.data.value || []).length === 0); const { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort } = useUtils2(store); const { isHidden: isHidden2, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, handleFixedMousewheel, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, tableInnerStyle, scrollbarStyle } = useStyle3(props, layout2, store, table); const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar(); const debouncedUpdateLayout = debounce_default(doLayout, 50); const tableId = `${ns2.namespace.value}-table_${tableIdSeed++}`; table.tableId = tableId; table.state = { isGroup, resizeState, doLayout, debouncedUpdateLayout }; const computedSumText = computed(() => props.sumText || t("el.table.sumText")); const computedEmptyText = computed(() => { return props.emptyText || t("el.table.emptyText"); }); useKeyRender(table); return { ns: ns2, layout: layout2, store, handleHeaderFooterMousewheel, handleMouseLeave, tableId, tableSize, isHidden: isHidden2, isEmpty: isEmpty3, renderExpanded, resizeProxyVisible, resizeState, isGroup, bodyWidth, tableBodyStyles, emptyBlockStyle, debouncedUpdateLayout, handleFixedMousewheel, setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, doLayout, sort, t, setDragVisible, context: table, computedSumText, computedEmptyText, tableLayout, scrollbarViewStyle, tableInnerStyle, scrollbarStyle, scrollBarRef, scrollTo, setScrollLeft, setScrollTop }; } }); var _hoisted_160 = ["data-prefix"]; var _hoisted_238 = { ref: "hiddenColumns", class: "hidden-columns" }; function _sfc_render30(_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_el_scrollbar = resolveComponent("el-scrollbar"); const _component_table_footer = resolveComponent("table-footer"); 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[0] || (_cache[0] = ($event) => _ctx.handleMouseLeave()) }, [ createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("inner-wrapper")), style: normalizeStyle(_ctx.tableInnerStyle) }, [ createBaseVNode("div", _hoisted_238, [ 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, onSetDragVisible: _ctx.setDragVisible }, null, 8, ["border", "default-sort", "store", "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 }, { 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", border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, onSetDragVisible: _ctx.setDragVisible }, null, 8, ["border", "default-sort", "store", "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"]) ], 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"]) ], 2), _ctx.showSummary ? withDirectives((openBlock(), createElementBlock("div", { key: 1, ref: "footerWrapper", class: normalizeClass(_ctx.ns.e("footer-wrapper")) }, [ createVNode(_component_table_footer, { border: _ctx.border, "default-sort": _ctx.defaultSort, store: _ctx.store, style: normalizeStyle(_ctx.tableBodyStyles), "sum-text": _ctx.computedSumText, "summary-method": _ctx.summaryMethod }, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"]) ], 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) ], 6), withDirectives(createBaseVNode("div", { ref: "resizeProxy", class: normalizeClass(_ctx.ns.e("column-resize-proxy")) }, null, 2), [ [vShow, _ctx.resizeProxyVisible] ]) ], 46, _hoisted_160); } var Table = _export_sfc(_sfc_main121, [["render", _sfc_render30], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 }) { 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": store.toggleAllSelection, modelValue: store.states.isAllSelected.value }); }, 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) }); }, sortable: false, resizable: false }, index: { renderHeader({ column: column2 }) { return column2.label || "#"; }, renderCell({ column: column2, $index }) { let i = $index + 1; const index = column2.index; if (typeof index === "number") { i = $index + index; } else if (typeof index === "function") { i = index($index); } return h("div", {}, [i]); }, sortable: false }, expand: { renderHeader({ column: column2 }) { return column2.label || ""; }, renderCell({ row, store, expanded }) { const { ns: ns2 } = store; const classes = [ns2.e("expand-icon")]; if (expanded) { classes.push(ns2.em("expand-icon", "expanded")); } const callback = function(e) { e.stopPropagation(); store.toggleRowExpansion(row); }; return h("div", { class: classes, onClick: callback }, { default: () => { return [ h(ElIcon, null, { default: () => { return [h(arrow_right_default)]; } }) ]; } }); }, sortable: false, resizable: false } }; function defaultRenderCell({ row, column: column2, $index }) { var _a3; const property2 = column2.property; const value = property2 && getProp(row, property2).value; if (column2 && column2.formatter) { return column2.formatter(row, column2, value, $index); } return ((_a3 = value == null ? void 0 : value.toString) == null ? void 0 : _a3.call(value)) || ""; } function treeCellPrefix({ row, treeNode, store }, createPlacehoder = false) { const { ns: ns2 } = store; if (!treeNode) { if (createPlacehoder) { return [ h("span", { class: ns2.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: ns2.e("indent"), style: { "padding-left": `${treeNode.indent}px` } })); } if (typeof treeNode.expanded === "boolean" && !treeNode.noLazyChildren) { const expandClasses = [ ns2.e("expand-icon"), treeNode.expanded ? ns2.em("expand-icon", "expanded") : "" ]; let icon = arrow_right_default; if (treeNode.loading) { icon = loading_default; } ele.push(h("div", { class: expandClasses, onClick: callback }, { default: () => { return [ h(ElIcon, { class: { [ns2.is("loading")]: treeNode.loading } }, { default: () => [h(icon)] }) ]; } })); } else { ele.push(h("span", { class: ns2.e("placeholder") })); } return ele; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs function getAllAliases(props, aliases) { return props.reduce((prev, cur) => { prev[cur] = cur; return prev; }, aliases); } function useWatcher2(owner, props_) { const instance = getCurrentInstance(); const registerComplexWatchers = () => { const props = ["fixed"]; const aliases = { realWidth: "width", realMinWidth: "minWidth" }; const allAliases = getAllAliases(props, 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 props = [ "label", "filters", "filterMultiple", "sortable", "index", "formatter", "className", "labelClassName", "showOverflowTooltip" ]; const aliases = { property: "prop", align: "realAlign", headerAlign: "realHeaderAlign" }; const allAliases = getAllAliases(props, aliases); Object.keys(allAliases).forEach((key) => { const columnKey = aliases[key]; if (hasOwn(props_, columnKey)) { watch(() => props_[columnKey], (newVal) => { instance.columnConfig.value[key] = newVal; }); } }); }; return { registerComplexWatchers, registerNormalWatchers }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs function useRender2(props, slots, owner) { const instance = getCurrentInstance(); const columnId = ref(""); const isSubColumn = ref(false); const realAlign = ref(); const realHeaderAlign = ref(); const ns2 = useNamespace("table"); watchEffect(() => { realAlign.value = props.align ? `is-${props.align}` : null; realAlign.value; }); watchEffect(() => { realHeaderAlign.value = props.headerAlign ? `is-${props.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(props.width)); const realMinWidth = ref(parseMinWidth(props.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(column2.width === void 0 ? 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" && value !== void 0) { column2[prop] = value; } }); const className = getDefaultClassName(type4); if (className) { const forceClass = `${unref(ns2.namespace)}-${className}`; column2.className = column2.className ? `${column2.className} ${forceClass}` : forceClass; } return column2; }; const checkSubColumn = (children) => { if (Array.isArray(children)) { children.forEach((child) => check(child)); } else { check(children); } function check(item) { var _a3; if (((_a3 = item == null ? void 0 : item.type) == null ? void 0 : _a3.name) === "ElTableColumn") { item.vParent = instance; } } }; const setColumnRenders = (column2) => { if (props.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"]; const renderHeader = slots.header; return renderHeader ? renderHeader(scope) : column2.label; }; } let originRenderCell = column2.renderCell; if (column2.type === "expand") { column2.renderCell = (data) => h("div", { class: "cell" }, [originRenderCell(data)]); owner.value.renderExpanded = (data) => { return slots.default ? slots.default(data) : 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 shouldCreatePlaceholder = hasTreeColumn.value && data.cellIndex === 0 && data.column.type !== "selection"; const prefix = treeCellPrefix(data, shouldCreatePlaceholder); const props2 = { class: "cell", style: {} }; if (column2.showOverflowTooltip) { props2.class = `${props2.class} ${unref(ns2.namespace)}-tooltip`; props2.style = { width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` }; } checkSubColumn(children); return h("div", props2, [prefix, children]); }; } return column2; }; const getPropsData = (...propsKey) => { return propsKey.reduce((prev, cur) => { if (Array.isArray(cur)) { cur.forEach((key) => { prev[key] = props[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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-column/defaults.mjs var defaultProps3 = { 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: [Boolean, Object], fixed: [Boolean, String], formatter: Function, selectable: Function, reserveSelection: Boolean, filterMethod: Function, filteredValue: Array, filters: Array, filterPlacement: String, filterMultiple: { type: Boolean, default: true }, index: [Number, Function], sortOrders: { type: Array, default: () => { return ["ascending", "descending", null]; }, validator: (val) => { return val.every((order) => ["ascending", "descending", null].includes(order)); } } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/src/table-column/index.mjs var columnIdSeed = 1; var ElTableColumn = defineComponent({ name: "ElTableColumn", components: { ElCheckbox }, props: defaultProps3, setup(props, { 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, props); const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = useRender2(props, slots, owner); const parent2 = columnOrTableParent.value; columnId.value = `${parent2.tableId || parent2.columnId}_column_${columnIdSeed++}`; onBeforeMount(() => { isSubColumn.value = owner.value !== parent2; const type4 = props.type || "default"; const sortable = props.sortable === "" ? true : props.sortable; const defaults2 = { ...cellStarts[type4], id: columnId.value, type: type4, property: props.prop || props.property, align: realAlign, headerAlign: realHeaderAlign, showOverflowTooltip: props.showOverflowTooltip, filterable: props.filters || props.filterMethod, filteredValue: [], filterPlacement: "", isColumnGroup: false, isSubColumn: false, filterOpened: false, sortable, index: props.index, rawColumnKey: instance.vnode.key }; const basicProps = [ "columnKey", "label", "className", "labelClassName", "type", "renderHeader", "formatter", "fixed", "resizable" ]; const sortProps = ["sortMethod", "sortBy", "sortOrders"]; const selectProps = ["selectable", "reserveSelection"]; const filterProps = [ "filterMethod", "filters", "filterMultiple", "filterOpened", "filteredValue", "filterPlacement" ]; let column2 = getPropsData(basicProps, sortProps, selectProps, filterProps); column2 = mergeOptions(defaults2, column2); const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps); column2 = chains(column2); columnConfig.value = column2; registerNormalWatchers(); registerComplexWatchers(); }); onMounted(() => { var _a3; const parent22 = columnOrTableParent.value; const children = isSubColumn.value ? parent22.vnode.el.children : (_a3 = parent22.refs.hiddenColumns) == null ? void 0 : _a3.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 ? parent22.columnConfig.value : null, updateColumnOrder); }); onBeforeUnmount(() => { owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? parent2.columnConfig.value : null, updateColumnOrder); }); instance.columnId = columnId.value; instance.columnConfig = columnConfig; return; }, render() { var _a3, _b, _c; try { const renderDefault = (_b = (_a3 = this.$slots).default) == null ? void 0 : _b.call(_a3, { row: {}, column: {}, $index: -1 }); const children = []; if (Array.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 && Array.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table/index.mjs var ElTable = withInstall(Table, { TableColumn: ElTableColumn }); var ElTableColumn2 = withNoopInstall(ElTableColumn); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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["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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/private.mjs var placeholderSign = Symbol("placeholder"); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs var calcColumnStyle = (column2, fixedColumn, fixed) => { var _a3; const flex = { flexGrow: 0, flexShrink: 0, ...fixed ? {} : { flexGrow: column2.flexGrow || 0, flexShrink: column2.flexShrink || 1 } }; if (!fixed) { flex.flexShrink = 1; } const style = { ...(_a3 = column2.style) != null ? _a3 : {}, ...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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs function useColumns(props, columns2, fixed) { const visibleColumns = computed(() => { return unref(columns2).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(() => { const _columns = unref(columns2); return _columns.reduce((style, column2) => { style[column2.key] = calcColumnStyle(column2, unref(fixed), props.fixed); return style; }, {}); }); const columnsTotalWidth = computed(() => { return unref(visibleColumns).reduce((width, column2) => width + column2.width, 0); }); const getColumn = (key) => { return unref(columns2).find((column2) => column2.key === key); }; const getColumnStyle = (key) => { return unref(columnsStyles)[key]; }; const updateColumnWidth = (column2, width) => { column2.width = width; }; function onColumnSorted(e) { var _a3; const { key } = e.currentTarget.dataset; if (!key) return; const { sortState, sortBy: sortBy2 } = props; let order = SortOrder.ASC; if (isObject(sortState)) { order = oppositeOrderMap[sortState[key]]; } else { order = oppositeOrderMap[sortBy2.order]; } (_a3 = props.onColumnSort) == null ? void 0 : _a3.call(props, { column: getColumn(key), key, order }); } return { columns: columns2, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, normalColumns, visibleColumns, getColumn, getColumnStyle, updateColumnWidth, onColumnSorted }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs var useScrollbar2 = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => { const scrollPos = ref({ scrollLeft: 0, scrollTop: 0 }); function doScroll(params) { var _a3, _b, _c; const { scrollTop } = params; (_a3 = mainTableRef.value) == null ? void 0 : _a3.scrollTo(params); (_b = leftTableRef.value) == null ? void 0 : _b.scrollToTop(scrollTop); (_c = rightTableRef.value) == null ? void 0 : _c.scrollToTop(scrollTop); } function scrollTo(params) { scrollPos.value = params; doScroll(params); } function scrollToTop(scrollTop) { scrollPos.value.scrollTop = scrollTop; doScroll(unref(scrollPos)); } function scrollToLeft(scrollLeft) { var _a3, _b; scrollPos.value.scrollLeft = scrollLeft; (_b = (_a3 = mainTableRef.value) == null ? void 0 : _a3.scrollTo) == null ? void 0 : _b.call(_a3, unref(scrollPos)); } function onScroll(params) { var _a3; scrollTo(params); (_a3 = props.onScroll) == null ? void 0 : _a3.call(props, params); } function onVerticalScroll({ scrollTop }) { const { scrollTop: currentScrollTop } = unref(scrollPos); if (scrollTop !== currentScrollTop) scrollToTop(scrollTop); } function scrollToRow(row, strategy = "auto") { var _a3; (_a3 = mainTableRef.value) == null ? void 0 : _a3.scrollToRow(row, strategy); } watch(() => unref(scrollPos).scrollTop, (cur, prev) => { if (cur > prev) onMaybeEndReached(); }); return { scrollPos, scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs var useRow = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => { const vm = getCurrentInstance(); const { emit } = vm; const isResetting = shallowRef(false); const hoveringRowKey = shallowRef(null); const expandedRowKeys = ref(props.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(props.estimatedRowHeight)); function onRowsRendered(params) { var _a3; (_a3 = props.onRowsRendered) == null ? void 0 : _a3.call(props, params); if (params.rowCacheEnd > unref(lastRenderedRowIndex)) { lastRenderedRowIndex.value = params.rowCacheEnd; } } function onRowHovered({ hovered, rowKey: rowKey2 }) { hoveringRowKey.value = hovered ? rowKey2 : null; } function onRowExpanded({ expanded, rowData, rowIndex, rowKey: rowKey2 }) { var _a3, _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); (_a3 = props.onRowExpand) == null ? void 0 : _a3.call(props, { expanded, rowData, rowIndex, rowKey: rowKey2 }); (_b = props.onExpandedRowsChange) == null ? void 0 : _b.call(props, _expandedRowKeys); } const flushingRowHeights = debounce_default(() => { var _a3, _b, _c, _d; isResetting.value = true; rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) }; resetAfterIndex(unref(resetIndex), false); pendingRowHeights.value = {}; resetIndex.value = null; (_a3 = mainTableRef.value) == null ? void 0 : _a3.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(); } } watch(lastRenderedRowIndex, () => onMaybeEndReached()); return { hoveringRowKey, expandedRowKeys, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHovered, onRowsRendered, onRowHeightChange }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs var useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => { const depthMap = ref({}); const flattenedData = computed(() => { const depths = {}; const { data: data2, rowKey: rowKey2 } = props; 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]) && Array.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 } = props; return expandColumnKey2 ? unref(flattenedData) : data2; }); watch(data, (val, prev) => { if (val !== prev) { lastRenderedRowIndex.value = -1; resetAfterIndex(0, true); } }); return { data, depthMap }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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) ? (props) => h(ComponentLike, props) : ComponentLike; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs var useStyles2 = (props, { columnsTotalWidth, data, fixedColumnsOnLeft, fixedColumnsOnRight }) => { const bodyWidth = computed(() => { const { fixed, width, vScrollbarSize } = props; const ret = width - vScrollbarSize; return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret; }); const headerWidth = computed(() => unref(bodyWidth) + (props.fixed ? props.vScrollbarSize : 0)); const mainTableHeight = computed(() => { const { height = 0, maxHeight = 0, footerHeight: footerHeight2, hScrollbarSize } = props; 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 rowsHeight = computed(() => { const { rowHeight, estimatedRowHeight } = props; const _data = unref(data); if (isNumber2(estimatedRowHeight)) { return _data.length * estimatedRowHeight; } return _data.length * rowHeight; }); const fixedTableHeight = computed(() => { const { maxHeight } = props; 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(props.headerHeight)); const fixedRowsHeight = computed(() => { var _a3; return (((_a3 = props.fixedData) == null ? void 0 : _a3.length) || 0) * props.rowHeight; }); const windowHeight = computed(() => { return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight); }); const rootStyle = computed(() => { const { style = {}, height, width } = props; return enforceUnit({ ...style, height, width }); }); const footerHeight = computed(() => enforceUnit({ height: props.footerHeight })); const emptyStyle = computed(() => ({ top: addUnit(unref(headerHeight)), bottom: addUnit(props.footerHeight), width: addUnit(props.width) })); return { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, headerWidth, rowsHeight, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs var useAutoResize = (props) => { 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 left2 = Number.parseInt(paddingLeft) || 0; const right2 = Number.parseInt(paddingRight) || 0; const top = Number.parseInt(paddingTop) || 0; const bottom = Number.parseInt(paddingBottom) || 0; width$.value = width - left2 - right2; height$.value = height - top - bottom; }).stop; }); onBeforeUnmount(() => { resizerStopper == null ? void 0 : resizerStopper(); }); watch([width$, height$], ([width, height]) => { var _a3; (_a3 = props.onResize) == null ? void 0 : _a3.call(props, { width, height }); }); return { sizer, width: width$, height: height$ }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/use-table.mjs function useTable(props) { const mainTableRef = ref(); const leftTableRef = ref(); const rightTableRef = ref(); const { columns: columns2, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, onColumnSorted } = useColumns(props, toRef(props, "columns"), toRef(props, "fixed")); const { scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll, scrollPos } = useScrollbar2(props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }); const { expandedRowKeys, hoveringRowKey, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHeightChange, onRowHovered, onRowsRendered } = useRow(props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }); const { data, depthMap } = useData(props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }); const { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, headerWidth, rowsHeight, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight } = useStyles2(props, { columnsTotalWidth, data, fixedColumnsOnLeft, fixedColumnsOnRight }); const isScrolling = shallowRef(false); const containerRef = ref(); const showEmpty = computed(() => { const noData = unref(data).length === 0; return isArray(props.fixedData) ? props.fixedData.length === 0 && noData : noData; }); function getRowHeight(rowIndex) { const { estimatedRowHeight, rowHeight, rowKey: rowKey2 } = props; if (!estimatedRowHeight) return rowHeight; return unref(rowHeights)[unref(data)[rowIndex][rowKey2]] || estimatedRowHeight; } function onMaybeEndReached() { const { onEndReached } = props; if (!onEndReached) return; const { scrollTop } = unref(scrollPos); const _totalHeight = unref(rowsHeight); const clientHeight = unref(windowHeight); const heightUntilEnd = _totalHeight - (scrollTop + clientHeight) + props.hScrollbarSize; if (unref(lastRenderedRowIndex) >= 0 && _totalHeight === scrollTop + unref(mainTableHeight) - unref(headerHeight)) { onEndReached(heightUntilEnd); } } watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, { deep: true }); return { columns: columns2, containerRef, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, hoveringRowKey, hasFixedColumns, columnsStyles, columnsTotalWidth, data, expandedRowKeys, depthMap, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, bodyWidth, emptyStyle, rootStyle, headerWidth, footerHeight, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, showEmpty, getRowHeight, onColumnSorted, onRowHovered, onRowExpanded, onRowsRendered, onRowHeightChange, scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/tokens.mjs var TableV2InjectionKey = Symbol("tableV2"); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/cell.mjs var TableV2Cell = (props, { slots }) => { var _a3; const { cellData, style } = props; const displayText = ((_a3 = cellData == null ? void 0 : cellData.toString) == null ? void 0 : _a3.call(cellData)) || ""; return createVNode("div", { "class": props.class, "title": displayText, "style": style }, [slots.default ? slots.default(props) : displayText]); }; TableV2Cell.displayName = "ElTableV2Cell"; TableV2Cell.inheritAttrs = false; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs var HeaderCell = (props, { slots }) => { var _a3, _b; return slots.default ? slots.default(props) : createVNode("div", { "class": props.class, "title": (_a3 = props.column) == null ? void 0 : _a3.title }, [(_b = props.column) == null ? void 0 : _b.title]); }; HeaderCell.displayName = "ElTableV2HeaderCell"; HeaderCell.inheritAttrs = false; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs var TableV2HeaderRow = defineComponent({ name: "ElTableV2HeaderRow", props: tableV2HeaderRowProps, setup(props, { slots }) { return () => { const { columns: columns2, columnsStyles, headerIndex, style } = props; 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": props.class, "style": style }, [Cells]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/header.mjs var COMPONENT_NAME17 = "ElTableV2Header"; var TableV2Header = defineComponent({ name: COMPONENT_NAME17, props: tableV2HeaderProps, setup(props, { slots, expose }) { const ns2 = useNamespace("table-v2"); const headerRef = ref(); const headerStyle = computed(() => enforceUnit({ width: props.width, height: props.height })); const rowStyle = computed(() => enforceUnit({ width: props.rowWidth, height: props.height })); const headerHeights = computed(() => castArray_default(unref(props.headerHeight))); const scrollToLeft = (left2) => { const headerEl = unref(headerRef); nextTick(() => { (headerEl == null ? void 0 : headerEl.scroll) && headerEl.scroll({ left: left2 }); }); }; const renderFixedRows = () => { const fixedRowClassName = ns2.e("fixed-header-row"); const { columns: columns2, fixedHeaderData, rowHeight } = props; return fixedHeaderData == null ? void 0 : fixedHeaderData.map((fixedRowData, fixedRowIndex) => { var _a3; const style = enforceUnit({ height: rowHeight, width: "100%" }); return (_a3 = slots.fixed) == null ? void 0 : _a3.call(slots, { class: fixedRowClassName, columns: columns2, rowData: fixedRowData, rowIndex: -(fixedRowIndex + 1), style }); }); }; const renderDynamicRows = () => { const dynamicRowClassName = ns2.e("dynamic-header-row"); const { columns: columns2 } = props; return unref(headerHeights).map((rowHeight, rowIndex) => { var _a3; const style = enforceUnit({ width: "100%", height: rowHeight }); return (_a3 = slots.dynamic) == null ? void 0 : _a3.call(slots, { class: dynamicRowClassName, columns: columns2, headerIndex: rowIndex, style }); }); }; expose({ scrollToLeft }); return () => { if (props.height <= 0) return; return createVNode("div", { "ref": headerRef, "class": props.class, "style": unref(headerStyle) }, [createVNode("div", { "style": unref(rowStyle), "class": ns2.e("header") }, [renderDynamicRows(), renderFixedRows()])]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/row.mjs var useTableRow = (props) => { const { isScrolling } = inject(TableV2InjectionKey); const measured = ref(false); const rowRef = ref(); const measurable = computed(() => { return isNumber2(props.estimatedRowHeight) && props.rowIndex >= 0; }); const doMeasure = (isInit = false) => { const $rowRef = unref(rowRef); if (!$rowRef) return; const { columns: columns2, onRowHeightChange, rowKey: rowKey2, rowIndex, style } = props; 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 } = props; const handlers2 = props.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 } = props; 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_NAME18 = "ElTableV2TableRow"; var TableV2Row = defineComponent({ name: COMPONENT_NAME18, props: tableV2RowProps, setup(props, { expose, slots, attrs }) { const { eventHandlers, isScrolling, measurable, measured, rowRef, onExpand } = useTableRow(props); expose({ onExpand }); return () => { const { columns: columns2, columnsStyles, expandColumnKey: expandColumnKey2, depth, rowData, rowIndex, style } = props; 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": props.class, "style": _measured ? style : exceptHeightStyle }, attrs, unref(eventHandlers)), [ColumnCells]); } return createVNode("div", mergeProps(attrs, { "ref": rowRef, "class": props.class, "style": style }, unref(eventHandlers)), [ColumnCells]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs var SortIcon = (props) => { const { sortOrder } = props; return createVNode(ElIcon, { "size": 14, "class": props.class }, { default: () => [sortOrder === SortOrder.ASC ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs var ExpandIcon = (props) => { const { expanded, expandable, onExpand, style, size: size4 } = props; const expandIconProps = { onClick: expandable ? () => onExpand(!expanded) : void 0, class: props.class }; return createVNode(ElIcon, mergeProps(expandIconProps, { "size": size4, "style": style }), { default: () => [createVNode(arrow_right_default, null, null)] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/table-grid.mjs var COMPONENT_NAME19 = "ElTableV2Grid"; var useTableGrid = (props) => { const headerRef = ref(); const bodyRef = ref(); const totalHeight = computed(() => { const { data, rowHeight, estimatedRowHeight } = props; if (estimatedRowHeight) { return; } return data.length * rowHeight; }); const fixedRowHeight = computed(() => { const { fixedData, rowHeight } = props; return ((fixedData == null ? void 0 : fixedData.length) || 0) * rowHeight; }); const headerHeight = computed(() => sum2(props.headerHeight)); const gridHeight = computed(() => { const { height } = props; return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight)); }); const hasHeader = computed(() => { return unref(headerHeight) + unref(fixedRowHeight) > 0; }); const itemKey = ({ data, rowIndex }) => data[rowIndex][props.rowKey]; function onItemRendered({ rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }) { var _a3; (_a3 = props.onRowsRendered) == null ? void 0 : _a3.call(props, { rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }); } function resetAfterRowIndex(index, forceUpdate2) { var _a3; (_a3 = bodyRef.value) == null ? void 0 : _a3.resetAfterRowIndex(index, forceUpdate2); } function scrollTo(leftOrOptions, top) { const header$ = unref(headerRef); const body$ = unref(bodyRef); if (!header$ || !body$) return; if (isObject(leftOrOptions)) { header$.scrollToLeft(leftOrOptions.scrollLeft); body$.scrollTo(leftOrOptions); } else { header$.scrollToLeft(leftOrOptions); body$.scrollTo({ scrollLeft: leftOrOptions, scrollTop: top }); } } function scrollToTop(scrollTop) { var _a3; (_a3 = unref(bodyRef)) == null ? void 0 : _a3.scrollTo({ scrollTop }); } function scrollToRow(row, strategy) { var _a3; (_a3 = unref(bodyRef)) == null ? void 0 : _a3.scrollToItem(row, 1, strategy); } function forceUpdate() { var _a3, _b; (_a3 = unref(bodyRef)) == null ? void 0 : _a3.$forceUpdate(); (_b = unref(headerRef)) == null ? void 0 : _b.$forceUpdate(); } return { bodyRef, forceUpdate, fixedRowHeight, gridHeight, hasHeader, headerHeight, headerRef, totalHeight, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow }; }; var TableGrid = defineComponent({ name: COMPONENT_NAME19, props: tableV2GridProps, setup(props, { slots, expose }) { const { ns: ns2 } = inject(TableV2InjectionKey); const { bodyRef, fixedRowHeight, gridHeight, hasHeader, headerRef, headerHeight, totalHeight, forceUpdate, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow } = useTableGrid(props); expose({ forceUpdate, totalHeight, scrollTo, scrollToTop, scrollToRow, resetAfterRowIndex }); const getColumnWidth = () => props.bodyWidth; return () => { const { cache: cache2, columns: columns2, data, fixedData, useIsScrolling, scrollbarAlwaysOn, scrollbarEndGap, scrollbarStartGap, style, rowHeight, bodyWidth, estimatedRowHeight, headerWidth, height, width, getRowHeight, onScroll } = props; const isDynamicRowEnabled = isNumber2(estimatedRowHeight); const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid; const _headerHeight = unref(headerHeight); return createVNode("div", { "role": "table", "class": [ns2.e("table"), props.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": ns2.e("body"), "scrollbarStartGap": scrollbarStartGap, "scrollbarEndGap": scrollbarEndGap, "scrollbarAlwaysOn": scrollbarAlwaysOn, "onScroll": onScroll, "onItemRendered": onItemRendered, "perfMode": false }, { default: (params) => { var _a3; const rowData = data[params.rowIndex]; return (_a3 = slots.row) == null ? void 0 : _a3.call(slots, { ...params, columns: columns2, rowData }); } }), unref(hasHeader) && createVNode(TableV2Header, { "ref": headerRef, "class": ns2.e("header-wrapper"), "columns": columns2, "headerData": data, "headerHeight": props.headerHeight, "fixedHeaderData": fixedData, "rowWidth": headerWidth, "rowHeight": rowHeight, "width": width, "height": Math.min(_headerHeight + unref(fixedRowHeight), height) }, { dynamic: slots.header, fixed: slots.row })]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs function _isSlot(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var MainTable = (props, { slots }) => { const { mainTableRef, ...rest2 } = props; return createVNode(TableGrid, mergeProps({ "ref": mainTableRef }, rest2), _isSlot(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs function _isSlot2(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var LeftTable = (props, { slots }) => { if (!props.columns.length) return; const { leftTableRef, ...rest2 } = props; return createVNode(TableGrid, mergeProps({ "ref": leftTableRef }, rest2), _isSlot2(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs function _isSlot3(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var LeftTable2 = (props, { slots }) => { if (!props.columns.length) return; const { rightTableRef, ...rest2 } = props; return createVNode(TableGrid, mergeProps({ "ref": rightTableRef }, rest2), _isSlot3(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs function _isSlot4(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var RowRenderer = (props, { slots }) => { const { columns: columns2, columnsStyles, depthMap, expandColumnKey: expandColumnKey2, expandedRowKeys, estimatedRowHeight, hasFixedColumns, hoveringRowKey, rowData, rowIndex, style, isScrolling, rowProps: rowProps2, rowClass, rowKey: rowKey2, rowEventHandlers, ns: ns2, onRowHovered, onRowExpanded } = props; 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 = [ns2.e("row"), rowKls, { [ns2.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0, [ns2.is("expanded")]: canExpand && expandedRowKeys.includes(_rowKey), [ns2.is("hovered")]: !isScrolling && _rowKey === hoveringRowKey, [ns2.is("fixed")]: !depth && isFixedRow, [ns2.is("customized")]: Boolean(slots.row) }]; 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 }; return createVNode(TableV2Row, mergeProps(_rowProps, { "onRowHover": onRowHover, "onRowExpand": onRowExpanded }), _isSlot4(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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: ns2, cellProps: _cellProps, expandColumnKey: expandColumnKey2, indentSize, iconSize, rowKey: rowKey2 }, { slots }) => { const cellStyle = enforceUnit(style); if (column2.placeholderSign === placeholderSign) { return createVNode("div", { "class": ns2.em("row-cell", "placeholder"), "style": cellStyle }, null); } const { cellRenderer, dataKey, dataGetter } = column2; const columnCellRenderer = componentToSlot(cellRenderer); const CellComponent = columnCellRenderer || slots.default || ((props) => createVNode(TableV2Cell, props, null)); 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: ns2.e("cell-text"), columns: columns2, column: column2, columnIndex, cellData, isScrolling, rowData, rowIndex }; const Cell = CellComponent(cellProps); const kls = [ns2.e("row-cell"), column2.align === Alignment.CENTER && ns2.is("align-center"), column2.align === Alignment.RIGHT && ns2.is("align-right")]; const expandable = rowIndex >= 0 && 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, mergeProps(expandIconProps, { "class": [ns2.e("expand-icon"), ns2.is("expanded", expanded)], "size": iconSize, "expanded": expanded, "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), [IconOrPlaceholder, Cell]); }; CellRenderer.inheritAttrs = false; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs function _isSlot5(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var HeaderRenderer = ({ columns: columns2, columnsStyles, headerIndex, style, headerClass, headerProps, ns: ns2 }, { slots }) => { const param = { columns: columns2, headerIndex }; const kls = [ns2.e("header-row"), tryCall(headerClass, param, ""), { [ns2.is("customized")]: Boolean(slots.header) }]; const extraProps = { ...tryCall(headerProps, param), columnsStyles, class: kls, columns: columns2, headerIndex, style }; return createVNode(TableV2HeaderRow, extraProps, _isSlot5(slots) ? slots : { default: () => [slots] }); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs var HeaderCellRenderer = (props, { slots }) => { const { column: column2, ns: ns2, style, onColumnSorted } = props; const cellStyle = enforceUnit(style); if (column2.placeholderSign === placeholderSign) { return createVNode("div", { "class": ns2.em("header-row-cell", "placeholder"), "style": cellStyle }, null); } const { headerCellRenderer, headerClass, sortable } = column2; const cellProps = { ...props, class: ns2.e("header-cell-text") }; const cellRenderer = componentToSlot(headerCellRenderer) || slots.default || ((props2) => createVNode(HeaderCell, props2, null)); const Cell = cellRenderer(cellProps); const { sortBy: sortBy2, sortState, headerCellProps } = props; let sorting, sortOrder; 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; } const cellKls = [ns2.e("header-cell"), tryCall(headerClass, props, ""), column2.align === Alignment.CENTER && ns2.is("align-center"), column2.align === Alignment.RIGHT && ns2.is("align-right"), sortable && ns2.is("sortable")]; const cellWrapperProps = { ...tryCall(headerCellProps, props), onClick: column2.sortable ? onColumnSorted : void 0, class: cellKls, style: cellStyle, ["data-key"]: column2.key }; return createVNode("div", cellWrapperProps, [Cell, sortable && createVNode(SortIcon, { "class": [ns2.e("sort-icon"), sorting && ns2.is("sorting")], "sortOrder": sortOrder }, null)]); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs var Footer2 = (props, { slots }) => { var _a3; return createVNode("div", { "class": props.class, "style": props.style }, [(_a3 = slots.default) == null ? void 0 : _a3.call(slots)]); }; Footer2.displayName = "ElTableV2Footer"; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs var Footer3 = (props, { slots }) => { return createVNode("div", { "class": props.class, "style": props.style }, [slots.default ? slots.default() : createVNode(ElEmpty, null, null)]); }; Footer3.displayName = "ElTableV2Empty"; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs var Overlay2 = (props, { slots }) => { var _a3; return createVNode("div", { "class": props.class, "style": props.style }, [(_a3 = slots.default) == null ? void 0 : _a3.call(slots)]); }; Overlay2.displayName = "ElTableV2Overlay"; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/table-v2.mjs function _isSlot6(s2) { return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2); } var COMPONENT_NAME20 = "ElTableV2"; var TableV2 = defineComponent({ name: COMPONENT_NAME20, props: tableV2Props, setup(props, { slots, expose }) { const ns2 = useNamespace("table-v2"); const { columnsStyles, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, data, depthMap, expandedRowKeys, hasFixedColumns, hoveringRowKey, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, bodyWidth, emptyStyle, rootStyle, headerWidth, footerHeight, showEmpty, scrollTo, scrollToLeft, scrollToTop, scrollToRow, getRowHeight, onColumnSorted, onRowHeightChange, onRowHovered, onRowExpanded, onRowsRendered, onScroll, onVerticalScroll } = useTable(props); expose({ scrollTo, scrollToLeft, scrollToTop, scrollToRow }); provide(TableV2InjectionKey, { ns: ns2, isResetting, hoveringRowKey, 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 } = props; const _data = unref(data); const mainTableProps = { cache: cache2, class: ns2.e("main"), columns: unref(mainColumns), data: _data, fixedData, estimatedRowHeight, bodyWidth: unref(bodyWidth), headerHeight, headerWidth: unref(headerWidth), 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: ns2.e("left"), columns: unref(fixedColumnsOnLeft), data: _data, 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 rightColumnsWidthWithScrollbar = rightColumnsWidth + vScrollbarSize; const rightTableProps = { cache: cache2, class: ns2.e("right"), columns: unref(fixedColumnsOnRight), data: _data, estimatedRowHeight, rightTableRef, rowHeight, bodyWidth: rightColumnsWidthWithScrollbar, headerWidth: rightColumnsWidthWithScrollbar, headerHeight, height: _fixedTableHeight, rowKey: rowKey2, scrollbarAlwaysOn, scrollbarStartGap: 2, scrollbarEndGap: vScrollbarSize, width: rightColumnsWidthWithScrollbar, style: `--${unref(ns2.namespace)}-table-scrollbar-size: ${vScrollbarSize}px`, useIsScrolling, getRowHeight, onScroll: onVerticalScroll }; const _columnsStyles = unref(columnsStyles); const tableRowProps = { ns: ns2, depthMap: unref(depthMap), columnsStyles: _columnsStyles, expandColumnKey: expandColumnKey2, expandedRowKeys: unref(expandedRowKeys), estimatedRowHeight, hasFixedColumns: unref(hasFixedColumns), hoveringRowKey: unref(hoveringRowKey), rowProps: rowProps2, rowClass, rowKey: rowKey2, rowEventHandlers, onRowHovered, onRowExpanded, onRowHeightChange }; const tableCellProps = { cellProps, expandColumnKey: expandColumnKey2, indentSize, iconSize, rowKey: rowKey2, expandedRowKeys: unref(expandedRowKeys), ns: ns2 }; const tableHeaderProps = { ns: ns2, headerClass, headerProps, columnsStyles: _columnsStyles }; const tableHeaderCellProps = { ns: ns2, sortBy: sortBy2, sortState, headerCellProps, onColumnSorted }; const tableSlots = { row: (props2) => createVNode(RowRenderer, mergeProps(props2, tableRowProps), { row: slots.row, cell: (props3) => { let _slot; return slots.cell ? createVNode(CellRenderer, mergeProps(props3, tableCellProps, { "style": _columnsStyles[props3.column.key] }), _isSlot6(_slot = slots.cell(props3)) ? _slot : { default: () => [_slot] }) : createVNode(CellRenderer, mergeProps(props3, tableCellProps, { "style": _columnsStyles[props3.column.key] }), null); } }), header: (props2) => createVNode(HeaderRenderer, mergeProps(props2, tableHeaderProps), { header: slots.header, cell: (props3) => { let _slot2; return slots["header-cell"] ? createVNode(HeaderCellRenderer, mergeProps(props3, tableHeaderCellProps, { "style": _columnsStyles[props3.column.key] }), _isSlot6(_slot2 = slots["header-cell"](props3)) ? _slot2 : { default: () => [_slot2] }) : createVNode(HeaderCellRenderer, mergeProps(props3, tableHeaderCellProps, { "style": _columnsStyles[props3.column.key] }), null); } }) }; const rootKls = [props.class, ns2.b(), ns2.e("root"), { [ns2.is("dynamic")]: unref(isDynamic) }]; const footerProps = { class: ns2.e("footer"), style: unref(footerHeight) }; return createVNode("div", { "class": rootKls, "style": unref(rootStyle) }, [createVNode(MainTable, mainTableProps, _isSlot6(tableSlots) ? tableSlots : { default: () => [tableSlots] }), createVNode(LeftTable, leftTableProps, _isSlot6(tableSlots) ? tableSlots : { default: () => [tableSlots] }), createVNode(LeftTable2, rightTableProps, _isSlot6(tableSlots) ? tableSlots : { default: () => [tableSlots] }), slots.footer && createVNode(Footer2, footerProps, { default: slots.footer }), unref(showEmpty) && createVNode(Footer3, { "class": ns2.e("empty"), "style": unref(emptyStyle) }, { default: slots.empty }), slots.overlay && createVNode(Overlay2, { "class": ns2.e("overlay") }, { default: slots.overlay })]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs var AutoResizer = defineComponent({ name: "ElAutoResizer", props: autoResizerProps, setup(props, { slots }) { const ns2 = useNamespace("auto-resizer"); const { height, width, sizer } = useAutoResize(props); const style = { width: "100%", height: "100%" }; return () => { var _a3; return createVNode("div", { "ref": sizer, "class": ns2.b(), "style": style }, [(_a3 = slots.default) == null ? void 0 : _a3.call(slots, { height: height.value, width: width.value })]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/table-v2/index.mjs var ElTableV2 = withInstall(TableV2); var ElAutoResizer = withInstall(AutoResizer); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tabs/src/tab-bar.mjs var tabBarProps = buildProps({ tabs: { type: definePropType(Array), default: () => mutable([]) } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs var COMPONENT_NAME21 = "ElTabBar"; var __default__82 = defineComponent({ name: COMPONENT_NAME21 }); var _sfc_main122 = defineComponent({ ...__default__82, props: tabBarProps, setup(__props, { expose }) { const props = __props; const instance = getCurrentInstance(); const rootTabs = inject(tabsRootContextKey); if (!rootTabs) throwError(COMPONENT_NAME21, "<el-tabs><el-tab-bar /></el-tabs>"); const ns2 = useNamespace("tabs"); const barRef = ref(); const barStyle = ref(); const getBarStyle = () => { let offset2 = 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"; props.tabs.every((tab) => { var _a3, _b; const $el = (_b = (_a3 = instance.parent) == null ? void 0 : _a3.refs) == null ? void 0 : _b[`tab-${tab.uid}`]; if (!$el) return false; if (!tab.active) { return true; } offset2 = $el[`offset${capitalize3(position)}`]; tabSize = $el[`client${capitalize3(sizeName)}`]; const tabStyles = window.getComputedStyle($el); if (sizeName === "width") { if (props.tabs.length > 1) { tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight); } offset2 += Number.parseFloat(tabStyles.paddingLeft); } return false; }); return { [sizeName]: `${tabSize}px`, transform: `translate${capitalize3(sizeDir)}(${offset2}px)` }; }; const update2 = () => barStyle.value = getBarStyle(); watch(() => props.tabs, async () => { await nextTick(); update2(); }, { immediate: true }); useResizeObserver(barRef, () => update2()); expose({ ref: barRef, update: update2 }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { ref_key: "barRef", ref: barRef, class: normalizeClass([unref(ns2).e("active-bar"), unref(ns2).is(unref(rootTabs).props.tabPosition)]), style: normalizeStyle(barStyle.value) }, null, 6); }; } }); var TabBar = _export_sfc(_sfc_main122, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 }); var tabNavEmits = { tabClick: (tab, tabName, ev) => ev instanceof Event, tabRemove: (tab, ev) => ev instanceof Event }; var COMPONENT_NAME22 = "ElTabNav"; var TabNav = defineComponent({ name: COMPONENT_NAME22, props: tabNavProps, emits: tabNavEmits, setup(props, { expose, emit }) { const vm = getCurrentInstance(); const rootTabs = inject(tabsRootContextKey); if (!rootTabs) throwError(COMPONENT_NAME22, `<el-tabs><tab-nav /></el-tabs>`); const ns2 = useNamespace("tabs"); const visibility = useDocumentVisibility(); const focused = useWindowFocus(); const navScroll$ = ref(); const nav$ = ref(); const el$ = ref(); const scrollable = ref(false); const navOffset = ref(0); const isFocus = ref(false); const focusable = ref(true); const sizeName = computed(() => ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height"); const navStyle = computed(() => { const dir = sizeName.value === "width" ? "X" : "Y"; return { transform: `translate${dir}(-${navOffset.value}px)` }; }); 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 navSize = nav$.value[`offset${capitalize3(sizeName.value)}`]; const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; const currentOffset = navOffset.value; if (navSize - currentOffset <= containerSize) return; const newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize; navOffset.value = newOffset; }; const scrollToActiveTab = async () => { const nav = nav$.value; if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return; await nextTick(); const activeTab = el$.value.querySelector(".is-active"); if (!activeTab) return; const navScroll = navScroll$.value; const isHorizontal2 = ["top", "bottom"].includes(rootTabs.props.tabPosition); const activeTabBounding = activeTab.getBoundingClientRect(); const navScrollBounding = navScroll.getBoundingClientRect(); const maxOffset = isHorizontal2 ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height; const currentOffset = navOffset.value; let newOffset = currentOffset; if (isHorizontal2) { 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 = () => { if (!nav$.value || !navScroll$.value) return; const navSize = nav$.value[`offset${capitalize3(sizeName.value)}`]; const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`]; const currentOffset = navOffset.value; if (containerSize < navSize) { scrollable.value = scrollable.value || {}; scrollable.value.prev = currentOffset; scrollable.value.next = currentOffset + containerSize < navSize; if (navSize - currentOffset < containerSize) { navOffset.value = navSize - containerSize; } } else { scrollable.value = false; if (currentOffset > 0) { navOffset.value = 0; } } }; const changeTab = (e) => { const code = e.code; const { up: up2, down: down2, left: left2, right: right2 } = EVENT_CODE; if (![up2, down2, left2, right2].includes(code)) return; const tabList = Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")); const currentIndex = tabList.indexOf(e.target); let nextIndex; if (code === left2 || code === up2) { if (currentIndex === 0) { nextIndex = tabList.length - 1; } else { nextIndex = currentIndex - 1; } } else { if (currentIndex < tabList.length - 1) { nextIndex = currentIndex + 1; } else { nextIndex = 0; } } tabList[nextIndex].focus({ preventScroll: true }); tabList[nextIndex].click(); setFocus(); }; const setFocus = () => { if (focusable.value) isFocus.value = true; }; const removeFocus = () => isFocus.value = false; 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$, update2); onMounted(() => setTimeout(() => scrollToActiveTab(), 0)); onUpdated(() => update2()); expose({ scrollToActiveTab, removeFocus }); watch(() => props.panes, () => vm.update(), { flush: "post" }); return () => { const scrollBtn = scrollable.value ? [createVNode("span", { "class": [ns2.e("nav-prev"), ns2.is("disabled", !scrollable.value.prev)], "onClick": scrollPrev }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_left_default, null, null)] })]), createVNode("span", { "class": [ns2.e("nav-next"), ns2.is("disabled", !scrollable.value.next)], "onClick": scrollNext }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_right_default, null, null)] })])] : null; const tabs = props.panes.map((pane, index) => { var _a3, _b, _c, _d; const uid2 = pane.uid; const disabled = pane.props.disabled; const tabName = (_b = (_a3 = pane.props.name) != null ? _a3 : pane.index) != null ? _b : `${index}`; const closable = !disabled && (pane.isClosable || props.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 ? 0 : -1; return createVNode("div", { "ref": `tab-${uid2}`, "class": [ns2.e("item"), ns2.is(rootTabs.props.tabPosition), ns2.is("active", pane.active), ns2.is("disabled", disabled), ns2.is("closable", closable), ns2.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) => { if (closable && (ev.code === EVENT_CODE.delete || ev.code === EVENT_CODE.backspace)) { emit("tabRemove", pane, ev); } } }, [...[tabLabelContent, btnClose]]); }); return createVNode("div", { "ref": el$, "class": [ns2.e("nav-wrap"), ns2.is("scrollable", !!scrollable.value), ns2.is(rootTabs.props.tabPosition)] }, [scrollBtn, createVNode("div", { "class": ns2.e("nav-scroll"), "ref": navScroll$ }, [createVNode("div", { "class": [ns2.e("nav"), ns2.is(rootTabs.props.tabPosition), ns2.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))], "ref": nav$, "style": navStyle.value, "role": "tablist", "onKeydown": changeTab }, [...[!props.type ? createVNode(TabBar, { "tabs": [...props.panes] }, null) : null, tabs]])])]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tabs/src/tabs.mjs var tabsProps = buildProps({ type: { type: String, values: ["card", "border-card", ""], default: "" }, activeName: { type: [String, Number] }, closable: Boolean, addable: Boolean, modelValue: { type: [String, Number] }, editable: Boolean, tabPosition: { type: String, values: ["top", "right", "bottom", "left"], default: "top" }, beforeLeave: { type: definePropType(Function), default: () => true }, stretch: Boolean }); 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(props, { emit, slots, expose }) { var _a3, _b; const ns2 = useNamespace("tabs"); const { children: panes, addChild: registerPane, removeChild: unregisterPane } = useOrderedChildren(getCurrentInstance(), "ElTabPane"); const nav$ = ref(); const currentName = ref((_b = (_a3 = props.modelValue) != null ? _a3 : props.activeName) != null ? _b : "0"); const changeCurrentName = (value) => { currentName.value = value; emit(UPDATE_MODEL_EVENT, value); emit("tabChange", value); }; const setCurrentName = async (value) => { var _a22, _b2, _c; if (currentName.value === value || isUndefined2(value)) return; try { const canLeave = await ((_a22 = props.beforeLeave) == null ? void 0 : _a22.call(props, value, currentName.value)); if (canLeave !== false) { changeCurrentName(value); (_c = (_b2 = nav$.value) == null ? void 0 : _b2.removeFocus) == null ? void 0 : _c.call(_b2); } } catch (e) { } }; const handleTabClick = (tab, tabName, event) => { if (tab.props.disabled) return; setCurrentName(tabName); emit("tabClick", tab, event); }; 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"); }; useDeprecated({ from: '"activeName"', replacement: '"model-value" or "v-model"', scope: "ElTabs", version: "2.3.0", ref: "https://element-plus.org/en-US/component/tabs.html#attributes", type: "Attribute" }, computed(() => !!props.activeName)); watch(() => props.activeName, (modelValue) => setCurrentName(modelValue)); watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue)); watch(currentName, async () => { var _a22; await nextTick(); (_a22 = nav$.value) == null ? void 0 : _a22.scrollToActiveTab(); }); provide(tabsRootContextKey, { props, currentName, registerPane, unregisterPane }); expose({ currentName }); return () => { const newButton = props.editable || props.addable ? createVNode("span", { "class": ns2.e("new-tab"), "tabindex": "0", "onClick": handleTabAdd, "onKeydown": (ev) => { if (ev.code === EVENT_CODE.enter) handleTabAdd(); } }, [createVNode(ElIcon, { "class": ns2.is("icon-plus") }, { default: () => [createVNode(plus_default, null, null)] })]) : null; const header = createVNode("div", { "class": [ns2.e("header"), ns2.is(props.tabPosition)] }, [newButton, createVNode(TabNav, { "ref": nav$, "currentName": currentName.value, "editable": props.editable, "type": props.type, "panes": panes.value, "stretch": props.stretch, "onTabClick": handleTabClick, "onTabRemove": handleTabRemove }, null)]); const panels = createVNode("div", { "class": ns2.e("content") }, [renderSlot(slots, "default")]); return createVNode("div", { "class": [ns2.b(), ns2.m(props.tabPosition), { [ns2.m("card")]: props.type === "card", [ns2.m("border-card")]: props.type === "border-card" }] }, [...props.tabPosition !== "bottom" ? [header, panels] : [panels, header]]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tabs/src/tab-pane.mjs var tabPaneProps = buildProps({ label: { type: String, default: "" }, name: { type: [String, Number] }, closable: Boolean, disabled: Boolean, lazy: Boolean }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs var _hoisted_161 = ["id", "aria-hidden", "aria-labelledby"]; var COMPONENT_NAME23 = "ElTabPane"; var __default__83 = defineComponent({ name: COMPONENT_NAME23 }); var _sfc_main123 = defineComponent({ ...__default__83, props: tabPaneProps, setup(__props) { const props = __props; const instance = getCurrentInstance(); const slots = useSlots(); const tabsRoot = inject(tabsRootContextKey); if (!tabsRoot) throwError(COMPONENT_NAME23, "usage: <el-tabs><el-tab-pane /></el-tabs/>"); const ns2 = useNamespace("tab-pane"); const index = ref(); const isClosable = computed(() => props.closable || tabsRoot.props.closable); const active = computedEager(() => { var _a3; return tabsRoot.currentName.value === ((_a3 = props.name) != null ? _a3 : index.value); }); const loaded = ref(active.value); const paneName = computed(() => { var _a3; return (_a3 = props.name) != null ? _a3 : index.value; }); const shouldBeRender = computedEager(() => !props.lazy || loaded.value || active.value); watch(active, (val) => { if (val) loaded.value = true; }); const pane = reactive({ uid: instance.uid, slots, props, paneName, active, index, isClosable }); onMounted(() => { tabsRoot.registerPane(pane); }); onUnmounted(() => { tabsRoot.unregisterPane(pane.uid); }); return (_ctx, _cache) => { return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", { key: 0, id: `pane-${unref(paneName)}`, class: normalizeClass(unref(ns2).b()), role: "tabpanel", "aria-hidden": !unref(active), "aria-labelledby": `tab-${unref(paneName)}` }, [ renderSlot(_ctx.$slots, "default") ], 10, _hoisted_161)), [ [vShow, unref(active)] ]) : createCommentVNode("v-if", true); }; } }); var TabPane = _export_sfc(_sfc_main123, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tabs/index.mjs var ElTabs = withInstall(Tabs, { TabPane }); var ElTabPane = withNoopInstall(TabPane); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/time-select/src/time-select2.mjs var import_dayjs16 = __toESM(require_dayjs_min(), 1); var import_customParseFormat3 = __toESM(require_customParseFormat(), 1); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/time-select/src/time-select.mjs var timeSelectProps = buildProps({ format: { type: String, default: "HH:mm" }, modelValue: String, disabled: Boolean, editable: { type: Boolean, default: true }, effect: { type: 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: String, maxTime: String, name: String, prefixIcon: { type: definePropType([String, Object]), default: () => clock_default }, clearIcon: { type: definePropType([String, Object]), default: () => circle_close_default } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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, step) => { const timeValue = parseTime(time); if (!timeValue) return ""; const stepValue = parseTime(step); 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/time-select/src/time-select2.mjs var __default__84 = defineComponent({ name: "ElTimeSelect" }); var _sfc_main124 = defineComponent({ ...__default__84, props: timeSelectProps, emits: ["change", "blur", "focus", "update:modelValue"], setup(__props, { expose }) { const props = __props; import_dayjs16.default.extend(import_customParseFormat3.default); const { Option: ElOption2 } = ElSelect; const nsInput = useNamespace("input"); const select = ref(); const _disabled = useDisabled(); const value = computed(() => props.modelValue); const start = computed(() => { const time = parseTime(props.start); return time ? formatTime2(time) : null; }); const end2 = computed(() => { const time = parseTime(props.end); return time ? formatTime2(time) : null; }); const step = computed(() => { const time = parseTime(props.step); return time ? formatTime2(time) : null; }); const minTime = computed(() => { const time = parseTime(props.minTime || ""); return time ? formatTime2(time) : null; }); const maxTime = computed(() => { const time = parseTime(props.maxTime || ""); return time ? formatTime2(time) : null; }); const items = computed(() => { const result2 = []; if (props.start && props.end && props.step) { let current = start.value; let currentTime; while (current && end2.value && compareTime(current, end2.value) <= 0) { currentTime = (0, import_dayjs16.default)(current, "HH:mm").format(props.format); result2.push({ value: currentTime, disabled: compareTime(current, minTime.value || "-1:-1") <= 0 || compareTime(current, maxTime.value || "100:100") >= 0 }); current = nextTime(current, step.value); } } return result2; }); const blur = () => { var _a3, _b; (_b = (_a3 = select.value) == null ? void 0 : _a3.blur) == null ? void 0 : _b.call(_a3); }; const focus = () => { var _a3, _b; (_b = (_a3 = select.value) == null ? void 0 : _a3.focus) == null ? void 0 : _b.call(_a3); }; expose({ blur, focus }); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ElSelect), { ref_key: "select", ref: select, "model-value": unref(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, "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit("update:modelValue", event)), onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit("change", event)), onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)), onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event)) }, { 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(unref(items), (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"]); }; } }); var TimeSelect = _export_sfc(_sfc_main124, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/time-select/index.mjs TimeSelect.install = (app) => { app.component(TimeSelect.name, TimeSelect); }; var _TimeSelect = TimeSelect; var ElTimeSelect = _TimeSelect; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/timeline/src/timeline.mjs var Timeline = defineComponent({ name: "ElTimeline", setup(_2, { slots }) { const ns2 = useNamespace("timeline"); provide("timeline", slots); return () => { return h("ul", { class: [ns2.b()] }, [renderSlot(slots, "default")]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/timeline/src/timeline-item.mjs var timelineItemProps = buildProps({ timestamp: { type: String, default: "" }, hideTimestamp: { type: Boolean, default: false }, center: { type: Boolean, default: false }, 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: { type: Boolean, default: false } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs var __default__85 = defineComponent({ name: "ElTimelineItem" }); var _sfc_main125 = defineComponent({ ...__default__85, props: timelineItemProps, setup(__props) { const ns2 = useNamespace("timeline-item"); return (_ctx, _cache) => { return openBlock(), createElementBlock("li", { class: normalizeClass([unref(ns2).b(), { [unref(ns2).e("center")]: _ctx.center }]) }, [ createBaseVNode("div", { class: normalizeClass(unref(ns2).e("tail")) }, null, 2), !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([ unref(ns2).e("node"), unref(ns2).em("node", _ctx.size || ""), unref(ns2).em("node", _ctx.type || ""), unref(ns2).is("hollow", _ctx.hollow) ]), style: normalizeStyle({ backgroundColor: _ctx.color }) }, [ _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns2).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(ns2).e("dot")) }, [ renderSlot(_ctx.$slots, "dot") ], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns2).e("wrapper")) }, [ !_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", { key: 0, class: normalizeClass([unref(ns2).e("timestamp"), unref(ns2).is("top")]) }, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns2).e("content")) }, [ renderSlot(_ctx.$slots, "default") ], 2), !_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass([unref(ns2).e("timestamp"), unref(ns2).is("bottom")]) }, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true) ], 2) ], 2); }; } }); var TimelineItem = _export_sfc(_sfc_main125, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/timeline/index.mjs var ElTimeline = withInstall(Timeline, { TimelineItem }); var ElTimelineItem = withNoopInstall(TimelineItem); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/common.mjs var tooltipV2CommonProps = buildProps({ nowrap: Boolean }); var TooltipV2Sides = ((TooltipV2Sides2) => { TooltipV2Sides2["top"] = "top"; TooltipV2Sides2["bottom"] = "bottom"; TooltipV2Sides2["left"] = "left"; TooltipV2Sides2["right"] = "right"; return TooltipV2Sides2; })(TooltipV2Sides || {}); var tooltipV2Sides = Object.values(TooltipV2Sides); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/arrow.mjs var tooltipV2ArrowProps = buildProps({ width: { type: Number, default: 10 }, height: { type: Number, default: 10 }, style: { type: definePropType(Object), default: null } }); var tooltipV2ArrowSpecialProps = buildProps({ side: { type: definePropType(String), values: tooltipV2Sides, required: true } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/content.mjs var tooltipV2Strategies = ["absolute", "fixed"]; var tooltipV2Placements = [ "top-start", "top-end", "top", "bottom-start", "bottom-end", "bottom", "left-start", "left-end", "left", "right-start", "right-end", "right" ]; var tooltipV2ContentProps = buildProps({ ariaLabel: String, arrowPadding: { type: definePropType(Number), default: 5 }, effect: { type: String, default: "" }, contentClass: String, placement: { type: definePropType(String), values: tooltipV2Placements, default: "bottom" }, reference: { type: definePropType(Object), default: null }, offset: { type: Number, default: 8 }, strategy: { type: definePropType(String), values: tooltipV2Strategies, default: "absolute" }, showArrow: { type: Boolean, default: false } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/root.mjs var tooltipV2RootProps = buildProps({ delayDuration: { type: Number, default: 300 }, defaultOpen: Boolean, open: { type: Boolean, default: void 0 }, onOpenChange: { type: definePropType(Function) }, "onUpdate:open": { type: definePropType(Function) } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/trigger.mjs var EventHandler = { type: definePropType(Function) }; var tooltipV2TriggerProps = buildProps({ onBlur: EventHandler, onClick: EventHandler, onFocus: EventHandler, onMouseDown: EventHandler, onMouseEnter: EventHandler, onMouseLeave: EventHandler }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/tooltip.mjs var tooltipV2Props = buildProps({ ...tooltipV2RootProps, ...tooltipV2ArrowProps, ...tooltipV2TriggerProps, ...tooltipV2ContentProps, alwaysOn: Boolean, fullTransition: Boolean, transitionProps: { type: definePropType(Object), default: null }, teleported: Boolean, to: { type: definePropType(String), default: "body" } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/root2.mjs var __default__86 = defineComponent({ name: "ElTooltipV2Root" }); var _sfc_main126 = defineComponent({ ...__default__86, props: tooltipV2RootProps, setup(__props, { expose }) { const props = __props; const _open = ref(props.defaultOpen); const triggerRef2 = ref(null); const open = computed({ get: () => isPropAbsent(props.open) ? _open.value : props.open, set: (open2) => { var _a3; _open.value = open2; (_a3 = props["onUpdate:open"]) == null ? void 0 : _a3.call(props, open2); } }); const isOpenDelayed = computed(() => isNumber2(props.delayDuration) && props.delayDuration > 0); const { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(() => { open.value = true; }, computed(() => props.delayDuration), { immediate: false }); const ns2 = useNamespace("tooltip-v2"); const contentId = useId(); const onNormalOpen = () => { clearTimer(); open.value = true; }; const onDelayOpen = () => { unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen(); }; const onOpen = onNormalOpen; const onClose = () => { clearTimer(); open.value = false; }; const onChange = (open2) => { var _a3; if (open2) { document.dispatchEvent(new CustomEvent(TOOLTIP_V2_OPEN)); onOpen(); } (_a3 = props.onOpenChange) == null ? void 0 : _a3.call(props, open2); }; watch(open, onChange); onMounted(() => { document.addEventListener(TOOLTIP_V2_OPEN, onClose); }); onBeforeUnmount(() => { clearTimer(); document.removeEventListener(TOOLTIP_V2_OPEN, onClose); }); provide(tooltipV2RootKey, { contentId, triggerRef: triggerRef2, ns: ns2, onClose, onDelayOpen, onOpen }); expose({ onOpen, onClose }); return (_ctx, _cache) => { return renderSlot(_ctx.$slots, "default", { open: unref(open) }); }; } }); var TooltipV2Root = _export_sfc(_sfc_main126, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/root.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/arrow2.mjs var __default__87 = defineComponent({ name: "ElTooltipV2Arrow" }); var _sfc_main127 = defineComponent({ ...__default__87, props: { ...tooltipV2ArrowProps, ...tooltipV2ArrowSpecialProps }, setup(__props) { const props = __props; const { ns: ns2 } = inject(tooltipV2RootKey); const { arrowRef } = inject(tooltipV2ContentKey); const arrowStyle = computed(() => { const { style, width, height } = props; const namespace = ns2.namespace.value; return { [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`, [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`, [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`, [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1, ...style || {} }; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("span", { ref_key: "arrowRef", ref: arrowRef, style: normalizeStyle(unref(arrowStyle)), class: normalizeClass(unref(ns2).e("arrow")) }, null, 6); }; } }); var TooltipV2Arrow = _export_sfc(_sfc_main127, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/arrow.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/visual-hidden/src/visual-hidden.mjs var visualHiddenProps = buildProps({ style: { type: definePropType([String, Object, Array]), default: () => ({}) } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/visual-hidden/src/visual-hidden2.mjs var __default__88 = defineComponent({ name: "ElVisuallyHidden" }); var _sfc_main128 = defineComponent({ ...__default__88, props: visualHiddenProps, setup(__props) { const props = __props; const computedStyle = computed(() => { return [ props.style, { position: "absolute", border: 0, width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", wordWrap: "normal" } ]; }); return (_ctx, _cache) => { return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, { style: unref(computedStyle) }), [ renderSlot(_ctx.$slots, "default") ], 16); }; } }); var ElVisuallyHidden = _export_sfc(_sfc_main128, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/visual-hidden/src/visual-hidden.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/content2.mjs var _hoisted_163 = ["data-side"]; var __default__89 = defineComponent({ name: "ElTooltipV2Content" }); var _sfc_main129 = defineComponent({ ...__default__89, props: { ...tooltipV2ContentProps, ...tooltipV2CommonProps }, setup(__props) { const props = __props; const { triggerRef: triggerRef2, contentId } = inject(tooltipV2RootKey); const placement = ref(props.placement); const strategy = ref(props.strategy); const arrowRef = ref(null); const { referenceRef, contentRef, middlewareData, x: x2, y, update: update2 } = useFloating({ placement, strategy, middleware: computed(() => { const middleware = [offset(props.offset)]; if (props.showArrow) { middleware.push(arrowMiddleware({ arrowRef })); } return middleware; }) }); const zIndex2 = useZIndex().nextZIndex(); const ns2 = useNamespace("tooltip-v2"); const side = computed(() => { return placement.value.split("-")[0]; }); const contentStyle = computed(() => { return { position: unref(strategy), top: `${unref(y) || 0}px`, left: `${unref(x2) || 0}px`, zIndex: zIndex2 }; }); const arrowStyle = computed(() => { if (!props.showArrow) return {}; const { arrow: arrow2 } = unref(middlewareData); return { [`--${ns2.namespace.value}-tooltip-v2-arrow-x`]: `${arrow2 == null ? void 0 : arrow2.x}px` || "", [`--${ns2.namespace.value}-tooltip-v2-arrow-y`]: `${arrow2 == null ? void 0 : arrow2.y}px` || "" }; }); const contentClass = computed(() => [ ns2.e("content"), ns2.is("dark", props.effect === "dark"), ns2.is(unref(strategy)), props.contentClass ]); watch(arrowRef, () => update2()); watch(() => props.placement, (val) => placement.value = val); onMounted(() => { watch(() => props.reference || triggerRef2.value, (el) => { referenceRef.value = el || void 0; }, { immediate: true }); }); provide(tooltipV2ContentKey, { arrowRef }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { ref_key: "contentRef", ref: contentRef, style: normalizeStyle(unref(contentStyle)), "data-tooltip-v2-root": "" }, [ !_ctx.nowrap ? (openBlock(), createElementBlock("div", { key: 0, "data-side": unref(side), class: normalizeClass(unref(contentClass)) }, [ renderSlot(_ctx.$slots, "default", { contentStyle: unref(contentStyle), contentClass: unref(contentClass) }), createVNode(unref(ElVisuallyHidden), { id: unref(contentId), role: "tooltip" }, { default: withCtx(() => [ _ctx.ariaLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ createTextVNode(toDisplayString(_ctx.ariaLabel), 1) ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 }) ]), _: 3 }, 8, ["id"]), renderSlot(_ctx.$slots, "arrow", { style: normalizeStyle(unref(arrowStyle)), side: unref(side) }) ], 10, _hoisted_163)) : createCommentVNode("v-if", true) ], 4); }; } }); var TooltipV2Content = _export_sfc(_sfc_main129, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/content.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/forward-ref.mjs var forwardRefProps = buildProps({ setRef: { type: definePropType(Function), required: true }, onlyChild: Boolean }); var ForwardRef = defineComponent({ props: forwardRefProps, setup(props, { slots }) { const fragmentRef = ref(); const setRef = composeRefs(fragmentRef, (el) => { if (el) { props.setRef(el.nextElementSibling); } else { props.setRef(null); } }); return () => { var _a3; const [firstChild] = ((_a3 = slots.default) == null ? void 0 : _a3.call(slots)) || []; const child = props.onlyChild ? ensureOnlyChild(firstChild.children) : firstChild.children; return createVNode(Fragment, { "ref": setRef }, [child]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/trigger2.mjs var __default__90 = defineComponent({ name: "ElTooltipV2Trigger" }); var _sfc_main130 = defineComponent({ ...__default__90, props: { ...tooltipV2CommonProps, ...tooltipV2TriggerProps }, setup(__props) { const props = __props; const { onClose, onOpen, onDelayOpen, triggerRef: triggerRef2, contentId } = inject(tooltipV2RootKey); let isMousedown = false; const setTriggerRef = (el) => { triggerRef2.value = el; }; const onMouseup = () => { isMousedown = false; }; const onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen); const onMouseleave = composeEventHandlers(props.onMouseLeave, onClose); const onMousedown = composeEventHandlers(props.onMouseDown, () => { onClose(); isMousedown = true; document.addEventListener("mouseup", onMouseup, { once: true }); }); const onFocus = composeEventHandlers(props.onFocus, () => { if (!isMousedown) onOpen(); }); const onBlur = composeEventHandlers(props.onBlur, onClose); const onClick = composeEventHandlers(props.onClick, (e) => { if (e.detail === 0) onClose(); }); const events = { blur: onBlur, click: onClick, focus: onFocus, mousedown: onMousedown, mouseenter: onMouseenter, mouseleave: onMouseleave }; const setEvents = (el, events2, type4) => { if (el) { Object.entries(events2).forEach(([name, handler]) => { el[type4](name, handler); }); } }; watch(triggerRef2, (triggerEl, previousTriggerEl) => { setEvents(triggerEl, events, "addEventListener"); setEvents(previousTriggerEl, events, "removeEventListener"); if (triggerEl) { triggerEl.setAttribute("aria-describedby", contentId.value); } }); onBeforeUnmount(() => { setEvents(triggerRef2.value, events, "removeEventListener"); document.removeEventListener("mouseup", onMouseup); }); return (_ctx, _cache) => { return _ctx.nowrap ? (openBlock(), createBlock(unref(ForwardRef), { key: 0, "set-ref": setTriggerRef, "only-child": "" }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 })) : (openBlock(), createElementBlock("button", mergeProps({ key: 1, ref_key: "triggerRef", ref: triggerRef2 }, _ctx.$attrs), [ renderSlot(_ctx.$slots, "default") ], 16)); }; } }); var TooltipV2Trigger = _export_sfc(_sfc_main130, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/trigger.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/src/tooltip2.mjs var __default__91 = defineComponent({ name: "ElTooltipV2" }); var _sfc_main131 = defineComponent({ ...__default__91, props: tooltipV2Props, setup(__props) { const props = __props; const refedProps = toRefs(props); const arrowProps = reactive(pick_default(refedProps, Object.keys(tooltipV2ArrowProps))); const contentProps = reactive(pick_default(refedProps, Object.keys(tooltipV2ContentProps))); const rootProps = reactive(pick_default(refedProps, Object.keys(tooltipV2RootProps))); const triggerProps = reactive(pick_default(refedProps, Object.keys(tooltipV2TriggerProps))); return (_ctx, _cache) => { return openBlock(), createBlock(TooltipV2Root, normalizeProps(guardReactiveProps(rootProps)), { default: withCtx(({ open }) => [ createVNode(TooltipV2Trigger, mergeProps(triggerProps, { nowrap: "" }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "trigger") ]), _: 3 }, 16), (openBlock(), createBlock(Teleport, { to: _ctx.to, disabled: !_ctx.teleported }, [ _ctx.fullTransition ? (openBlock(), createBlock(Transition, normalizeProps(mergeProps({ key: 0 }, _ctx.transitionProps)), { default: withCtx(() => [ _ctx.alwaysOn || open ? (openBlock(), createBlock(TooltipV2Content, normalizeProps(mergeProps({ key: 0 }, contentProps)), { arrow: withCtx(({ style, side }) => [ _ctx.showArrow ? (openBlock(), createBlock(TooltipV2Arrow, mergeProps({ key: 0 }, arrowProps, { style, side }), null, 16, ["style", "side"])) : createCommentVNode("v-if", true) ]), default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16)) : createCommentVNode("v-if", true) ]), _: 2 }, 1040)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ _ctx.alwaysOn || open ? (openBlock(), createBlock(TooltipV2Content, normalizeProps(mergeProps({ key: 0 }, contentProps)), { arrow: withCtx(({ style, side }) => [ _ctx.showArrow ? (openBlock(), createBlock(TooltipV2Arrow, mergeProps({ key: 0 }, arrowProps, { style, side }), null, 16, ["style", "side"])) : createCommentVNode("v-if", true) ]), default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16)) : createCommentVNode("v-if", true) ], 64)) ], 8, ["to", "disabled"])) ]), _: 3 }, 16); }; } }); var TooltipV2 = _export_sfc(_sfc_main131, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/tooltip.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tooltip-v2/index.mjs var ElTooltipV2 = withInstall(TooltipV2); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs var usePropsAlias = (props) => { const initProps = { label: "label", key: "key", disabled: "disabled" }; return computed(() => ({ ...initProps, ...props.props })); }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs var useCheck = (props, panelState, emit) => { const propsAlias = usePropsAlias(props); const filteredData = computed(() => { return props.data.filter((item) => { if (isFunction(props.filterMethod)) { return props.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 = props.data.length; const { noChecked, hasChecked } = props.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(() => props.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(() => props.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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs var useComputedData = (props) => { const propsAlias = usePropsAlias(props); const dataObj = computed(() => props.data.reduce((o2, cur) => (o2[cur[propsAlias.value.key]] = cur) && o2, {})); const sourceData = computed(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key]))); const targetData = computed(() => { if (props.targetOrder === "original") { return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key])); } else { return props.modelValue.reduce((arr, cur) => { const val = dataObj.value[cur]; if (val) { arr.push(val); } return arr; }, []); } }); return { sourceData, targetData }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs var useMove = (props, checkedState, emit) => { const propsAlias = usePropsAlias(props); const _emit = (value, direction2, movedKeys) => { emit(UPDATE_MODEL_EVENT, value); emit(CHANGE_EVENT, value, direction2, movedKeys); }; const addToLeft = () => { const currentValue = props.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 = props.modelValue.slice(); const itemsToBeMoved = props.data.filter((item) => { const itemKey = item[propsAlias.value.key]; return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey); }).map((item) => item[propsAlias.value.key]); currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved); if (props.targetOrder === "original") { currentValue = props.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs var __default__92 = defineComponent({ name: "ElTransferPanel" }); var _sfc_main132 = defineComponent({ ...__default__92, props: transferPanelProps, emits: transferPanelEmits, setup(__props, { expose, emit }) { const props = __props; const slots = useSlots(); const OptionContent = ({ option }) => option; const { t } = useLocale(); const ns2 = useNamespace("transfer"); const panelState = reactive({ checked: [], allChecked: false, query: "", checkChangeByUser: true }); const propsAlias = usePropsAlias(props); const { filteredData, checkedSummary, isIndeterminate, handleAllCheckedChange } = useCheck(props, 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(ns2).b("panel")) }, [ createBaseVNode("p", { class: normalizeClass(unref(ns2).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(ns2).be("panel", "body"), unref(ns2).is("with-footer", unref(hasFooter))]) }, [ _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(ns2).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(ns2).is("filterable", _ctx.filterable), unref(ns2).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(ns2).be("panel", "item")), label: item[unref(propsAlias).key], disabled: item[unref(propsAlias).disabled], "validate-event": false }, { default: withCtx(() => { var _a3; return [ createVNode(OptionContent, { option: (_a3 = _ctx.optionRender) == null ? void 0 : _a3.call(_ctx, item) }, null, 8, ["option"]) ]; }), _: 2 }, 1032, ["class", "label", "disabled"]); }), 128)) ]), _: 1 }, 8, ["modelValue", "class"]), [ [vShow, !unref(hasNoMatch) && !unref(isEmpty2)(_ctx.data)] ]), withDirectives(createBaseVNode("p", { class: normalizeClass(unref(ns2).be("panel", "empty")) }, toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 3), [ [vShow, unref(hasNoMatch) || unref(isEmpty2)(_ctx.data)] ]) ], 2), unref(hasFooter) ? (openBlock(), createElementBlock("p", { key: 0, class: normalizeClass(unref(ns2).be("panel", "footer")) }, [ renderSlot(_ctx.$slots, "default") ], 2)) : createCommentVNode("v-if", true) ], 2); }; } }); var TransferPanel = _export_sfc(_sfc_main132, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/src/transfer2.mjs var _hoisted_164 = { key: 0 }; var _hoisted_239 = { key: 0 }; var __default__93 = defineComponent({ name: "ElTransfer" }); var _sfc_main133 = defineComponent({ ...__default__93, props: transferProps, emits: transferEmits, setup(__props, { expose, emit }) { const props = __props; const slots = useSlots(); const { t } = useLocale(); const ns2 = useNamespace("transfer"); const { formItem } = useFormItem(); const checkedState = reactive({ leftChecked: [], rightChecked: [] }); const propsAlias = usePropsAlias(props); const { sourceData, targetData } = useComputedData(props); const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit); const { addToLeft, addToRight } = useMove(props, 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(() => props.buttonTexts.length === 2); const leftPanelTitle = computed(() => props.titles[0] || t("el.transfer.titles.0")); const rightPanelTitle = computed(() => props.titles[1] || t("el.transfer.titles.1")); const panelFilterPlaceholder = computed(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder")); watch(() => props.modelValue, () => { var _a3; if (props.validateEvent) { (_a3 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a3.call(formItem, "change").catch((err) => debugWarn(err)); } }); const optionRender = computed(() => (option) => { if (props.renderContent) return props.renderContent(h, option); if (slots.default) return slots.default({ option }); 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(ns2).b()) }, [ createVNode(TransferPanel, { ref_key: "leftPanel", ref: leftPanel, data: unref(sourceData), "option-render": unref(optionRender), placeholder: unref(panelFilterPlaceholder), title: unref(leftPanelTitle), filterable: _ctx.filterable, format: _ctx.format, "filter-method": _ctx.filterMethod, "default-checked": _ctx.leftDefaultChecked, props: props.props, onCheckedChange: unref(onSourceCheckedChange) }, { 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(ns2).e("buttons")) }, [ createVNode(unref(ElButton), { type: "primary", class: normalizeClass([unref(ns2).e("button"), unref(ns2).is("with-texts", unref(hasButtonTexts))]), 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_164, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true) ]), _: 1 }, 8, ["class", "disabled", "onClick"]), createVNode(unref(ElButton), { type: "primary", class: normalizeClass([unref(ns2).e("button"), unref(ns2).is("with-texts", unref(hasButtonTexts))]), disabled: unref(isEmpty2)(checkedState.leftChecked), onClick: unref(addToRight) }, { default: withCtx(() => [ !unref(isUndefined2)(_ctx.buttonTexts[1]) ? (openBlock(), createElementBlock("span", _hoisted_239, 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": unref(optionRender), placeholder: unref(panelFilterPlaceholder), filterable: _ctx.filterable, format: _ctx.format, "filter-method": _ctx.filterMethod, title: unref(rightPanelTitle), "default-checked": _ctx.rightDefaultChecked, props: props.props, onCheckedChange: unref(onTargetCheckedChange) }, { 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_main133, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/transfer/index.mjs var ElTransfer = withInstall(Transfer); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 = function(key, data) { if (!key) return data[NODE_KEY]; return data[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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/model/node.mjs var getChildState = (node) => { let all = true; let none = true; let allWithoutDisable = 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; } } return { all, none, allWithoutDisable, half: !all && !none }; }; var reInitChecked = function(node) { if (node.childNodes.length === 0 || node.loading) return; const { all, none, half } = getChildState(node.childNodes); 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 props = node.store.props; const data = node.data || {}; const config = props[prop]; if (typeof config === "function") { return config(data, node); } else if (typeof config === "string") { return data[config]; } else if (typeof config === "undefined") { const dataProp = data[prop]; return dataProp === void 0 ? "" : dataProp; } }; var nodeIdSeed = 0; var Node2 = class { constructor(options) { 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() { const store = this.store; if (!store) { throw new Error("[Node]store is required!"); } store.registerNode(this); const props = store.props; if (props && typeof props.isLeaf !== "undefined") { const isLeaf2 = getPropertyFromData(this, "isLeaf"); if (typeof isLeaf2 === "boolean") { 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.expand(); } if (!Array.isArray(this.data)) { markNodeData(this, this.data); } if (!this.data) return; const defaultExpandedKeys = store.defaultExpandedKeys; const key = store.key; if (key && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) { this.expand(null, store.autoExpandParent); } if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) { store.currentNode = this; store.currentNode.isCurrent = true; } if (store.lazy) { store._initDefaultCheckedNode(this); } this.updateLeafState(); if (this.parent && (this.level === 1 || this.parent.expanded === true)) this.canFocus = true; } setData(data) { if (!Array.isArray(data)) { markNodeData(this, data); } this.data = data; this.childNodes = []; let children; if (this.level === 0 && Array.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 Node2)) { if (!batch) { const children = this.getChildren(true); if (!children.includes(child.data)) { if (typeof index === "undefined" || index < 0) { children.push(child.data); } else { children.splice(index, 0, child.data); } } } Object.assign(child, { parent: this, store: this.store }); child = reactive(new Node2(child)); if (child instanceof Node2) { child.initialize(); } } ; child.level = this.level + 1; if (typeof index === "undefined" || 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) { let targetNode = null; for (let i = 0; i < this.childNodes.length; i++) { if (this.childNodes[i].data === data) { targetNode = this.childNodes[i]; break; } } if (targetNode) { this.removeChild(targetNode); } } expand(callback, expandParent) { const done = () => { if (expandParent) { let parent2 = this.parent; while (parent2.level > 0) { parent2.expanded = true; parent2 = parent2.parent; } } this.expanded = true; if (callback) callback(); this.childNodes.forEach((item) => { item.canFocus = true; }); }; if (this.shouldLoadData()) { this.loadData((data) => { if (Array.isArray(data)) { if (this.checked) { this.setChecked(true, true); } else if (!this.store.checkStrictly) { reInitChecked(this); } done(); } }); } else { done(); } } doCreateChildren(array4, defaultProps4 = {}) { array4.forEach((item) => { this.insertChild(Object.assign({ data: item }, defaultProps4), void 0, true); }); } collapse() { this.expanded = false; this.childNodes.forEach((item) => { item.canFocus = false; }); } shouldLoadData() { return 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; return; } const childNodes = this.childNodes; if (!this.store.lazy || this.store.lazy === true && this.loaded === true) { this.isLeaf = !childNodes || childNodes.length === 0; return; } this.isLeaf = false; } setChecked(value, deep, recursion, passValue) { this.indeterminate = value === "half"; this.checked = value === true; if (this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all, allWithoutDisable } = getChildState(this.childNodes); if (!this.isLeaf && !all && allWithoutDisable) { this.checked = false; value = false; } 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.checked : passValue; child.setChecked(isCheck, deep, true, passValue); } const { half, all: all2 } = getChildState(childNodes); if (!all2) { this.checked = all2; this.indeterminate = half; } } }; 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 props = this.store.props; let children = "children"; if (props) { children = props.children || "children"; } if (data[children] === void 0) { 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.findIndex((data) => data[NODE_KEY] === key) >= 0; if (isNodeExists) { newDataMap[key] = { index, data: item }; } else { newNodes.push({ index, data: item }); } }); if (!this.store.lazy) { oldData.forEach((item) => { if (!newDataMap[item[NODE_KEY]]) this.removeChildByData(item); }); } newNodes.forEach(({ index, data }) => { this.insertChild({ data }, index); }); this.updateLeafState(); } loadData(callback, defaultProps4 = {}) { if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps4).length)) { this.loading = true; const resolve = (children) => { this.childNodes = []; this.doCreateChildren(children, defaultProps4); this.loaded = true; this.loading = false; this.updateLeafState(); if (callback) { callback.call(this, children); } }; this.store.load(this, resolve); } else { if (callback) { callback.call(this); } } } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/model/tree-store.mjs var TreeStore = class { constructor(options) { 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 Node2({ 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(); }); } else { this._initDefaultCheckedNodes(); } } filter(value) { const filterNodeMethod = this.filterNodeMethod; const lazy = this.lazy; const traverse = function(node) { const childNodes = node.root ? node.root.childNodes : node.childNodes; childNodes.forEach((child) => { child.visible = filterNodeMethod.call(child, value, child.data, child); 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 && !lazy) node.expand(); }; traverse(this); } setData(newVal) { const instanceChanged = newVal !== this.root.data; if (instanceChanged) { this.root.setData(newVal); this._initDefaultCheckedNodes(); } else { this.root.updateChildren(); } } getNode(data) { if (data instanceof Node2) return data; const key = isObject(data) ? getNodeKey(this.key, data) : data; return this.nodesMap[key] || null; } insertBefore(data, refData) { const refNode = this.getNode(refData); refNode.parent.insertBefore({ data }, refNode); } insertAfter(data, refData) { const refNode = this.getNode(refData); refNode.parent.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 = 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 (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 (nodeKey !== void 0) this.nodesMap[node.key] = 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) => b2.level - a2.level); const cache2 = /* @__PURE__ */ Object.create(null); const keys3 = Object.keys(checkedKeys); allNodes.forEach((node) => node.setChecked(false, false)); 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; } let parent2 = node.parent; while (parent2 && parent2.level > 0) { cache2[parent2.data[key]] = true; parent2 = parent2.parent; } 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) { const key = node[this.key]; const currNode = this.nodesMap[key]; this.setCurrentNode(currNode); if (shouldAutoExpandParent && this.currentNode.level > 1) { this.currentNode.parent.expand(null, true); } } setCurrentNodeKey(key, shouldAutoExpandParent = true) { if (key === null || key === void 0) { this.currentNode && (this.currentNode.isCurrent = false); this.currentNode = null; return; } const node = this.getNode(key); if (node) { this.setCurrentNode(node); if (shouldAutoExpandParent && this.currentNode.level > 1) { this.currentNode.parent.expand(null, true); } } } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/tree-node-content.mjs var _sfc_main134 = defineComponent({ name: "ElTreeNodeContent", props: { node: { type: Object, required: true }, renderContent: Function }, setup(props) { const ns2 = useNamespace("tree"); const nodeInstance = inject("NodeInstance"); const tree = inject("RootTree"); return () => { const node = props.node; const { data, store } = node; return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : tree.ctx.slots.default ? tree.ctx.slots.default({ node, data }) : h("span", { class: ns2.be("node", "label") }, [node.label]); }; } }); var NodeContent2 = _export_sfc(_sfc_main134, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs function useNodeExpandEventBroadcast(props) { const parentNodeMap = inject("TreeNodeMap", null); const currentNodeMap = { treeNodeExpand: (node) => { if (props.node !== node) { props.node.collapse(); } }, children: [] }; if (parentNodeMap) { parentNodeMap.children.push(currentNodeMap); } provide("TreeNodeMap", currentNodeMap); return { broadcastExpanded: (node) => { if (!props.accordion) return; for (const childNode of currentNodeMap.children) { childNode.treeNodeExpand(node); } } }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs var dragEventsKey = Symbol("dragEvents"); function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) { const ns2 = useNamespace("tree"); const dragState = ref({ showDropIndicator: false, draggingNode: null, dropNode: null, allowDrop: true, dropType: null }); const treeNodeDragStart = ({ event, treeNode }) => { if (typeof props.allowDrag === "function" && !props.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 }) => { const dropNode = treeNode; const oldDropNode = dragState.value.dropNode; if (oldDropNode && oldDropNode !== dropNode) { removeClass(oldDropNode.$el, ns2.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 (typeof props.allowDrop === "function") { dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev"); userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner"); dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next"); } event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none"; if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) { 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; } 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 targetPosition = dropNode.$el.getBoundingClientRect(); const treePosition = el$.value.getBoundingClientRect(); let dropType; const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1; const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1; 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 = dropNode.$el.querySelector(`.${ns2.be("node", "expand-icon")}`).getBoundingClientRect(); const dropIndicator = dropIndicator$.value; if (dropType === "before") { indicatorTop = iconPosition.top - treePosition.top; } else if (dropType === "after") { indicatorTop = iconPosition.bottom - treePosition.top; } dropIndicator.style.top = `${indicatorTop}px`; dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`; if (dropType === "inner") { addClass(dropNode.$el, ns2.is("drop-inner")); } else { removeClass(dropNode.$el, ns2.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) => { const { draggingNode, dropType, dropNode } = dragState.value; event.preventDefault(); event.dataTransfer.dropEffect = "move"; if (draggingNode && dropNode) { const draggingNodeCopy = { data: draggingNode.node.data }; if (dropType !== "none") { draggingNode.node.remove(); } if (dropType === "before") { dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node); } else if (dropType === "after") { dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node); } else if (dropType === "inner") { dropNode.node.insertChild(draggingNodeCopy); } if (dropType !== "none") { store.value.registerNode(draggingNodeCopy); } removeClass(dropNode.$el, ns2.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/tree-node.mjs var _sfc_main135 = defineComponent({ name: "ElTreeNode", components: { ElCollapseTransition: _CollapseTransition, ElCheckbox, NodeContent: NodeContent2, ElIcon, Loading: loading_default }, props: { node: { type: Node2, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: false } }, emits: ["node-expand"], setup(props, ctx) { const ns2 = useNamespace("tree"); const { broadcastExpanded } = useNodeExpandEventBroadcast(props); const tree = inject("RootTree"); const expanded = ref(false); const childNodeRendered = ref(false); const oldChecked = ref(null); const oldIndeterminate = ref(null); const node$ = ref(null); const dragEvents = inject(dragEventsKey); const instance = getCurrentInstance(); provide("NodeInstance", instance); if (!tree) { debugWarn("Tree", "Can not find node's tree."); } if (props.node.expanded) { expanded.value = true; childNodeRendered.value = true; } const childrenKey = tree.props["children"] || "children"; watch(() => { const children = props.node.data[childrenKey]; return children && [...children]; }, () => { props.node.updateChildren(); }); watch(() => props.node.indeterminate, (val) => { handleSelectChange(props.node.checked, val); }); watch(() => props.node.checked, (val) => { handleSelectChange(val, props.node.indeterminate); }); watch(() => props.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 = props.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", props.node.data, checked, indeterminate); } oldChecked.value = checked; oldIndeterminate.value = indeterminate; }; const handleClick = (e) => { handleCurrentChange(tree.store, tree.ctx.emit, () => tree.store.value.setCurrentNode(props.node)); tree.currentNode.value = props.node; if (tree.props.expandOnClickNode) { handleExpandIconClick(); } if (tree.props.checkOnClickNode && !props.node.disabled) { handleCheckChange(null, { target: { checked: !props.node.checked } }); } tree.ctx.emit("node-click", props.node.data, props.node, instance, e); }; const handleContextMenu = (event) => { if (tree.instance.vnode.props["onNodeContextmenu"]) { event.stopPropagation(); event.preventDefault(); } tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance); }; const handleExpandIconClick = () => { if (props.node.isLeaf) return; if (expanded.value) { tree.ctx.emit("node-collapse", props.node.data, props.node, instance); props.node.collapse(); } else { props.node.expand(); ctx.emit("node-expand", props.node.data, props.node, instance); } }; const handleCheckChange = (value, ev) => { props.node.setChecked(ev.target.checked, !tree.props.checkStrictly); nextTick(() => { const store = tree.store.value; tree.ctx.emit("check", props.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: props }); }; const handleDragOver = (event) => { event.preventDefault(); if (!tree.props.draggable) return; dragEvents.treeNodeDragOver({ event, treeNode: { $el: node$.value, node: props.node } }); }; const handleDrop = (event) => { event.preventDefault(); }; const handleDragEnd = (event) => { if (!tree.props.draggable) return; dragEvents.treeNodeDragEnd(event); }; return { ns: ns2, 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_165 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"]; var _hoisted_240 = ["aria-expanded"]; function _sfc_render31(_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[1] || (_cache[1] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])), onContextmenu: _cache[2] || (_cache[2] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)), onDragstart: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])), onDragover: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])), onDragend: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])), onDrop: _cache[6] || (_cache[6] = 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 }, [ (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_240)), [ [vShow, _ctx.expanded] ]) : createCommentVNode("v-if", true) ]), _: 1 }) ], 42, _hoisted_165)), [ [vShow, _ctx.node.visible] ]); } var ElTreeNode = _export_sfc(_sfc_main135, [["render", _sfc_render31], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs function useKeydown({ el$ }, store) { const ns2 = useNamespace("tree"); const treeItems = shallowRef([]); const checkboxItems = shallowRef([]); onMounted(() => { initTabIndex(); }); onUpdated(() => { treeItems.value = Array.from(el$.value.querySelectorAll("[role=treeitem]")); checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]")); }); watch(checkboxItems, (val) => { val.forEach((checkbox) => { checkbox.setAttribute("tabindex", "-1"); }); }); const handleKeydown = (ev) => { const currentItem = ev.target; if (!currentItem.className.includes(ns2.b("node"))) return; const code = ev.code; treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns2.is("focusable")}[role=treeitem]`)); const currentIndex = treeItems.value.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.value.length - 1; const startIndex = nextIndex; while (true) { if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus) break; nextIndex--; if (nextIndex === startIndex) { nextIndex = -1; break; } if (nextIndex < 0) { nextIndex = treeItems.value.length - 1; } } } else { nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.value.length - 1 ? currentIndex + 1 : 0; const startIndex = nextIndex; while (true) { if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus) break; nextIndex++; if (nextIndex === startIndex) { nextIndex = -1; break; } if (nextIndex >= treeItems.value.length) { nextIndex = 0; } } } nextIndex !== -1 && treeItems.value[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.space].includes(code) && hasInput) { ev.preventDefault(); hasInput.click(); } }; useEventListener(el$, "keydown", handleKeydown); const initTabIndex = () => { var _a3; treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns2.is("focusable")}[role=treeitem]`)); checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]")); const checkedItem = el$.value.querySelectorAll(`.${ns2.is("checked")}[role=treeitem]`); if (checkedItem.length) { checkedItem[0].setAttribute("tabindex", "0"); return; } (_a3 = treeItems.value[0]) == null ? void 0 : _a3.setAttribute("tabindex", "0"); }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/src/tree.mjs var _sfc_main136 = defineComponent({ name: "ElTree", components: { ElTreeNode }, props: { data: { type: Array, default: () => [] }, emptyText: { type: String }, renderAfterExpand: { type: Boolean, default: true }, nodeKey: String, checkStrictly: Boolean, defaultExpandAll: Boolean, expandOnClickNode: { type: Boolean, default: true }, checkOnClickNode: Boolean, checkDescendants: { type: Boolean, default: false }, autoExpandParent: { type: Boolean, default: true }, defaultCheckedKeys: Array, defaultExpandedKeys: Array, currentNodeKey: [String, Number], renderContent: Function, showCheckbox: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, allowDrag: Function, allowDrop: Function, props: { type: Object, default: () => ({ children: "children", label: "label", disabled: "disabled" }) }, lazy: { type: Boolean, default: false }, highlightCurrent: Boolean, load: Function, filterNodeMethod: Function, accordion: Boolean, indent: { type: Number, default: 18 }, icon: { type: iconPropType } }, emits: [ "check-change", "current-change", "node-click", "node-contextmenu", "node-collapse", "node-expand", "check", "node-drag-start", "node-drag-end", "node-drop", "node-drag-leave", "node-drag-enter", "node-drag-over" ], setup(props, ctx) { const { t } = useLocale(); const ns2 = useNamespace("tree"); const store = ref(new TreeStore({ key: props.nodeKey, data: props.data, lazy: props.lazy, props: props.props, load: props.load, currentNodeKey: props.currentNodeKey, checkStrictly: props.checkStrictly, checkDescendants: props.checkDescendants, defaultCheckedKeys: props.defaultCheckedKeys, defaultExpandedKeys: props.defaultExpandedKeys, autoExpandParent: props.autoExpandParent, defaultExpandAll: props.defaultExpandAll, filterNodeMethod: props.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(props); const { dragState } = useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }); useKeydown({ el$ }, store); const isEmpty3 = computed(() => { const { childNodes } = root2.value; return !childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible); }); watch(() => props.currentNodeKey, (newVal) => { store.value.setCurrentNodeKey(newVal); }); watch(() => props.defaultCheckedKeys, (newVal) => { store.value.setDefaultCheckedKey(newVal); }); watch(() => props.defaultExpandedKeys, (newVal) => { store.value.setDefaultExpandedKeys(newVal); }); watch(() => props.data, (newVal) => { store.value.setData(newVal); }, { deep: true }); watch(() => props.checkStrictly, (newVal) => { store.value.checkStrictly = newVal; }); const filter2 = (value) => { if (!props.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter"); store.value.filter(value); }; const getNodeKey$1 = (node) => { return getNodeKey(props.nodeKey, node.data); }; const getNodePath = (data) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in 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 = () => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in getCurrentKey"); const currentNode2 = getCurrentNode(); return currentNode2 ? currentNode2[props.nodeKey] : null; }; const setCheckedNodes = (nodes, leafOnly) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCheckedNodes"); store.value.setCheckedNodes(nodes, leafOnly); }; const setCheckedKeys = (keys3, leafOnly) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in 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) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentNode"); handleCurrentChange(store, ctx.emit, () => store.value.setUserCurrentNode(node, shouldAutoExpandParent)); }; const setCurrentKey = (key, shouldAutoExpandParent = true) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in setCurrentKey"); handleCurrentChange(store, ctx.emit, () => 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, instance) => { broadcastExpanded(node); ctx.emit("node-expand", nodeData, node, instance); }; const updateKeyChildren = (key, data) => { if (!props.nodeKey) throw new Error("[Tree] nodeKey is required in updateKeyChild"); store.value.updateChildren(key, data); }; provide("RootTree", { ctx, props, store, root: root2, currentNode, instance: getCurrentInstance() }); provide(formItemContextKey, void 0); return { ns: ns2, 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_render32(_ctx, _cache, $props, $setup, $data, $options) { var _a3; 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")) }, [ createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, toDisplayString((_a3 = _ctx.emptyText) != null ? _a3 : _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_main136, [["render", _sfc_render32], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree/index.mjs Tree.install = (app) => { app.component(Tree.name, Tree); }; var _Tree = Tree; var ElTree = _Tree; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/src/select.mjs var useSelect3 = (props, { attrs }, { tree, key }) => { const ns2 = useNamespace("tree-select"); const result2 = { ...pick_default(toRefs(props), Object.keys(ElSelect.props)), ...attrs, valueKey: key, popperClass: computed(() => { const classes = [ns2.e("popper")]; if (props.popperClass) classes.push(props.popperClass); return classes.join(" "); }), filterMethod: (keyword = "") => { if (props.filterMethod) props.filterMethod(keyword); nextTick(() => { var _a3; (_a3 = tree.value) == null ? void 0 : _a3.filter(keyword); }); }, onVisibleChange: (visible) => { var _a3; (_a3 = attrs.onVisibleChange) == null ? void 0 : _a3.call(attrs, visible); if (props.filterable && visible) { result2.filterMethod(); } } }; return result2; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs var component = defineComponent({ extends: ElOption, setup(props, ctx) { const result2 = ElOption.setup(props, ctx); delete result2.selectOptionClick; const vm = getCurrentInstance().proxy; nextTick(() => { if (!result2.select.cachedOptions.get(vm.value)) { result2.select.onOptionCreate(vm); } }); return result2; }, methods: { selectOptionClick() { this.$el.parentElement.click(); } } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/src/utils.mjs function isValidValue2(val) { return val || val === 0; } function isValidArray(val) { return Array.isArray(val) && val.length; } function toValidArray(val) { return Array.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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/src/tree.mjs var useTree2 = (props, { attrs, slots, emit }, { select, tree, key }) => { watch(() => props.modelValue, () => { if (props.showCheckbox) { nextTick(() => { const treeInstance = tree.value; if (treeInstance && !isEqual_default(treeInstance.getCheckedKeys(), toValidArray(props.modelValue))) { treeInstance.setCheckedKeys(toValidArray(props.modelValue)); } }); } }, { immediate: true, deep: true }); const propsMap = computed(() => ({ value: key.value, label: "label", children: "children", disabled: "disabled", isLeaf: "isLeaf", ...props.props })); const getNodeValByProp = (prop, data) => { var _a3; const propVal = propsMap.value[prop]; if (isFunction(propVal)) { return propVal(data, (_a3 = tree.value) == null ? void 0 : _a3.getNode(getNodeValByProp("value", data))); } else { return data[propVal]; } }; const defaultExpandedParentKeys = toValidArray(props.modelValue).map((value) => { return treeFind(props.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 (!props.renderAfterExpand && !props.lazy) return []; const options = []; treeEach(props.data.concat(props.cacheData), (node) => { const value = getNodeValByProp("value", node); options.push({ value, currentLabel: getNodeValByProp("label", node), isDisabled: getNodeValByProp("disabled", node) }); }, (data) => getNodeValByProp("children", data)); return options; }); return { ...pick_default(toRefs(props), Object.keys(_Tree.props)), ...attrs, nodeKey: key, expandOnClickNode: computed(() => { return !props.checkStrictly && props.expandOnClickNode; }), defaultExpandedKeys: computed(() => { return props.defaultExpandedKeys ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys; }), renderContent: (h3, { node, data, store }) => { return h3(component, { value: getNodeValByProp("value", data), label: getNodeValByProp("label", data), disabled: getNodeValByProp("disabled", data) }, props.renderContent ? () => props.renderContent(h3, { node, data, store }) : slots.default ? () => slots.default({ node, data, store }) : void 0); }, filterNodeMethod: (value, data, node) => { var _a3; if (props.filterNodeMethod) return props.filterNodeMethod(value, data, node); if (!value) return true; return (_a3 = getNodeValByProp("label", data)) == null ? void 0 : _a3.includes(value); }, onNodeClick: (data, node, e) => { var _a3, _b, _c; (_a3 = attrs.onNodeClick) == null ? void 0 : _a3.call(attrs, data, node, e); if (props.showCheckbox && props.checkOnClickNode) return; if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) { if (!getNodeValByProp("disabled", data)) { const option = (_b = select.value) == null ? void 0 : _b.options.get(getNodeValByProp("value", data)); (_c = select.value) == null ? void 0 : _c.handleOptionSelect(option, true); } } else if (props.expandOnClickNode) { e.proxy.handleExpandIconClick(); } }, onCheck: (data, params) => { var _a3; (_a3 = attrs.onCheck) == null ? void 0 : _a3.call(attrs, data, params); const dataValue = getNodeValByProp("value", data); if (props.checkStrictly) { emit(UPDATE_MODEL_EVENT, props.multiple ? params.checkedKeys : params.checkedKeys.includes(dataValue) ? dataValue : void 0); } else { if (props.multiple) { emit(UPDATE_MODEL_EVENT, tree.value.getCheckedKeys(true)); } 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(props.modelValue) && !!treeFind([data], (data2) => getNodeValByProp("value", data2) === props.modelValue, (data2) => getNodeValByProp("children", data2)); emit(UPDATE_MODEL_EVENT, firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey); } } }, cacheOptions }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/src/cache-options.mjs var CacheOptions = defineComponent({ props: { data: { type: Array, default: () => [] } }, setup(props) { const select = inject(selectKey); watch(() => props.data, () => { props.data.forEach((item) => { if (!select.cachedOptions.has(item.value)) { select.cachedOptions.set(item.value, item); } }); select.setSelected(); }, { immediate: true, deep: true }); return () => void 0; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/src/tree-select.mjs var _sfc_main137 = defineComponent({ name: "ElTreeSelect", inheritAttrs: false, props: { ...ElSelect.props, ..._Tree.props, cacheData: { type: Array, default: () => [] } }, setup(props, context) { const { slots, expose } = context; const select = ref(); const tree = ref(); const key = computed(() => props.nodeKey || props.valueKey || "value"); const selectProps = useSelect3(props, context, { select, tree, key }); const { cacheOptions, ...treeProps2 } = useTree2(props, 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"]) }); }); return () => h(ElSelect, reactive({ ...selectProps, ref: (ref2) => select.value = ref2 }), { ...slots, default: () => [ h(CacheOptions, { data: cacheOptions.value }), h(_Tree, reactive({ ...treeProps2, ref: (ref2) => tree.value = ref2 })) ] }); } }); var TreeSelect = _export_sfc(_sfc_main137, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-select/index.mjs TreeSelect.install = (app) => { app.component(TreeSelect.name, TreeSelect); }; var _TreeSelect = TreeSelect; var ElTreeSelect = _TreeSelect; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs var ROOT_TREE_INJECTION_KEY = Symbol(); var EMPTY_NODE = { key: -1, level: -1, data: {} }; var TreeOptionsEnum = ((TreeOptionsEnum2) => { TreeOptionsEnum2["KEY"] = "id"; TreeOptionsEnum2["LABEL"] = "label"; TreeOptionsEnum2["CHILDREN"] = "children"; TreeOptionsEnum2["DISABLED"] = "disabled"; return TreeOptionsEnum2; })(TreeOptionsEnum || {}); var SetOperationEnum = ((SetOperationEnum2) => { SetOperationEnum2["ADD"] = "add"; SetOperationEnum2["DELETE"] = "delete"; return SetOperationEnum2; })(SetOperationEnum || {}); var treeProps = 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" /* KEY */ }) }, highlightCurrent: { type: Boolean, default: false }, showCheckbox: { type: Boolean, default: false }, defaultCheckedKeys: { type: definePropType(Array), default: () => mutable([]) }, checkStrictly: { type: Boolean, default: false }, defaultExpandedKeys: { type: definePropType(Array), default: () => mutable([]) }, indent: { type: Number, default: 16 }, icon: { type: iconPropType }, expandOnClickNode: { type: Boolean, default: true }, checkOnClickNode: { type: Boolean, default: false }, currentNodeKey: { type: definePropType([String, Number]) }, accordion: { type: Boolean, default: false }, filterMethod: { type: definePropType(Function) }, perfMode: { type: Boolean, default: true } }); var treeNodeProps = buildProps({ node: { type: definePropType(Object), default: () => mutable(EMPTY_NODE) }, expanded: { type: Boolean, default: false }, checked: { type: Boolean, default: false }, indeterminate: { type: Boolean, default: false }, showCheckbox: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, current: { type: Boolean, default: false }, hiddenExpandIcon: { type: Boolean, default: false } }); var treeNodeContentProps = buildProps({ node: { type: definePropType(Object), required: true } }); var NODE_CLICK = "node-click"; 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 treeEmits = { [NODE_CLICK]: (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 && typeof checked === "boolean", [NODE_CONTEXTMENU]: (event, data, node) => event && data && node }; var treeNodeEmits = { click: (node, e) => !!(node && e), toggle: (node) => !!node, check: (node, checked) => node && typeof checked === "boolean" }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs function useCheck2(props, tree) { const checkedKeys = ref(/* @__PURE__ */ new Set()); const indeterminateKeys = ref(/* @__PURE__ */ new Set()); const { emit } = getCurrentInstance(); watch([() => tree.value, () => props.defaultCheckedKeys], () => { return nextTick(() => { _setCheckedKeys(props.defaultCheckedKeys); }); }, { immediate: true }); const updateCheckedKeys = () => { if (!tree.value || !props.showCheckbox || props.checkStrictly) { return; } const { levelTreeNodeMap, maxLevel } = tree.value; const checkedKeySet = checkedKeys.value; const indeterminateKeySet = /* @__PURE__ */ new Set(); for (let level = maxLevel - 1; level >= 1; --level) { const nodes = levelTreeNodeMap.get(level); if (!nodes) continue; nodes.forEach((node) => { const children = node.children; if (children) { let allChecked = true; let hasChecked = false; for (const childNode of children) { const key = childNode.key; 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); } } }); } 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) => { const checkedKeySet = checkedKeys.value; const toggle = (node2, checked) => { checkedKeySet[checked ? SetOperationEnum.ADD : SetOperationEnum.DELETE](node2.key); const children = node2.children; if (!props.checkStrictly && children) { children.forEach((childNode) => { if (!childNode.disabled) { toggle(childNode, checked); } }); } }; toggle(node, isChecked2); 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) && props.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) && props.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(); _setCheckedKeys(keys3); } function setChecked(key, isChecked2) { if ((tree == null ? void 0 : tree.value) && props.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 (props.showCheckbox && treeNodeMap && keys3) { for (const key of keys3) { const node = treeNodeMap.get(key); if (node && !isChecked(node)) { toggleCheckbox(node, true, false); } } } } } return { updateCheckedKeys, toggleCheckbox, isChecked, isIndeterminate, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs function useFilter(props, tree) { const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([])); const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([])); const filterable = computed(() => { return isFunction(props.filterMethod); }); function doFilter(query) { var _a3; if (!filterable.value) { return; } const expandKeySet = /* @__PURE__ */ new Set(); const hiddenExpandIconKeys = hiddenExpandIconKeySet.value; const hiddenKeys = hiddenNodeKeySet.value; const family = []; const nodes = ((_a3 = tree.value) == null ? void 0 : _a3.treeNodes) || []; const filter2 = props.filterMethod; hiddenKeys.clear(); function traverse(nodes2) { nodes2.forEach((node) => { family.push(node); if (filter2 == null ? void 0 : filter2(query, node.data)) { family.forEach((member) => { expandKeySet.add(member.key); }); } else 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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs function useTree3(props, emit) { const expandedKeySet = ref(new Set(props.defaultExpandedKeys)); const currentKey = ref(); const tree = shallowRef(); watch(() => props.currentNodeKey, (key) => { currentKey.value = key; }, { immediate: true }); watch(() => props.data, (data) => { setData2(data); }, { immediate: true }); const { isIndeterminate, isChecked, toggleCheckbox, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys } = useCheck2(props, tree); const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree); const valueKey = computed(() => { var _a3; return ((_a3 = props.props) == null ? void 0 : _a3.value) || TreeOptionsEnum.KEY; }); const childrenKey = computed(() => { var _a3; return ((_a3 = props.props) == null ? void 0 : _a3.children) || TreeOptionsEnum.CHILDREN; }); const disabledKey = computed(() => { var _a3; return ((_a3 = props.props) == null ? void 0 : _a3.disabled) || TreeOptionsEnum.DISABLED; }); const labelKey = computed(() => { var _a3; return ((_a3 = props.props) == null ? void 0 : _a3.label) || TreeOptionsEnum.LABEL; }); const flattenTree = computed(() => { const expandedKeys = expandedKeySet.value; const hiddenKeys = hiddenNodeKeySet.value; const flattenNodes = []; const nodes = tree.value && tree.value.treeNodes || []; function traverse() { const stack = []; for (let i = nodes.length - 1; i >= 0; --i) { stack.push(nodes[i]); } while (stack.length) { const node = stack.pop(); if (!node) continue; if (!hiddenKeys.has(node.key)) { flattenNodes.push(node); } if (expandedKeys.has(node.key)) { const children = node.children; if (children) { const length = children.length; for (let i = length - 1; i >= 0; --i) { stack.push(children[i]); } } } } } traverse(); 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 _a3; 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; 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, []); } (_a3 = levelTreeNodeMap.get(level)) == null ? void 0 : _a3.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) { expandedKeySet.value = new Set(keys3); } function handleNodeClick(node, e) { emit(NODE_CLICK, node.data, node, e); handleCurrentChange2(node); if (props.expandOnClickNode) { toggleExpand(node); } if (props.showCheckbox && props.checkOnClickNode && !node.disabled) { toggleCheckbox(node, !isChecked(node), true); } } 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 && props.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); } }); } keySet.add(node.key); emit(NODE_EXPAND, node.data, node); } function collapseNode(node) { expandedKeySet.value.delete(node.key); emit(NODE_COLLAPSE, node.data, node); } function isExpanded(node) { return expandedKeySet.value.has(node.key); } function isDisabled(node) { return !!node.disabled; } function isCurrent(node) { const current = currentKey.value; return !!current && current === node.key; } function getCurrentNode() { var _a3, _b; if (!currentKey.value) return void 0; return (_b = (_a3 = tree.value) == null ? void 0 : _a3.treeNodeMap.get(currentKey.value)) == null ? void 0 : _b.data; } function getCurrentKey() { return currentKey.value; } function setCurrentKey(key) { currentKey.value = key; } function setData2(data) { nextTick(() => tree.value = createTree(data)); } function getNode(data) { var _a3; const key = isObject(data) ? getKey(data) : data; return (_a3 = tree.value) == null ? void 0 : _a3.treeNodeMap.get(key); } return { tree, flattenTree, isNotEmpty, getKey, getChildren, toggleExpand, toggleCheckbox, isExpanded, isChecked, isIndeterminate, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeCheck, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter: filter2, setData: setData2, getNode, expandNode, collapseNode, setExpandedKeys }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs var ElNodeContent = defineComponent({ name: "ElTreeNodeContent", props: treeNodeContentProps, setup(props) { const tree = inject(ROOT_TREE_INJECTION_KEY); const ns2 = useNamespace("tree"); return () => { const node = props.node; const { data } = node; return (tree == null ? void 0 : tree.ctx.slots.default) ? tree.ctx.slots.default({ node, data }) : h("span", { class: ns2.be("node", "label") }, [node == null ? void 0 : node.label]); }; } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs var _hoisted_166 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"]; var __default__94 = defineComponent({ name: "ElTreeNode" }); var _sfc_main138 = defineComponent({ ...__default__94, props: treeNodeProps, emits: treeNodeEmits, setup(__props, { emit }) { const props = __props; const tree = inject(ROOT_TREE_INJECTION_KEY); const ns2 = useNamespace("tree"); const indent = computed(() => { var _a3; return (_a3 = tree == null ? void 0 : tree.props.indent) != null ? _a3 : 16; }); const icon = computed(() => { var _a3; return (_a3 = tree == null ? void 0 : tree.props.icon) != null ? _a3 : caret_right_default; }); const handleClick = (e) => { emit("click", props.node, e); }; const handleExpandIconClick = () => { emit("toggle", props.node); }; const handleCheckChange = (value) => { emit("check", props.node, value); }; const handleContextMenu = (event) => { var _a3, _b, _c, _d; if ((_c = (_b = (_a3 = tree == null ? void 0 : tree.instance) == null ? void 0 : _a3.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 = props.node) == null ? void 0 : _d.data, props.node); }; return (_ctx, _cache) => { var _a3, _b, _c; return openBlock(), createElementBlock("div", { ref: "node$", class: normalizeClass([ unref(ns2).b("node"), unref(ns2).is("expanded", _ctx.expanded), unref(ns2).is("current", _ctx.current), unref(ns2).is("focusable", !_ctx.disabled), unref(ns2).is("checked", !_ctx.disabled && _ctx.checked) ]), role: "treeitem", tabindex: "-1", "aria-expanded": _ctx.expanded, "aria-disabled": _ctx.disabled, "aria-checked": _ctx.checked, "data-key": (_a3 = _ctx.node) == null ? void 0 : _a3.key, onClick: withModifiers(handleClick, ["stop"]), onContextmenu: handleContextMenu }, [ createBaseVNode("div", { class: normalizeClass(unref(ns2).be("node", "content")), style: normalizeStyle({ paddingLeft: `${(_ctx.node.level - 1) * unref(indent)}px` }) }, [ unref(icon) ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass([ unref(ns2).is("leaf", !!((_b = _ctx.node) == null ? void 0 : _b.isLeaf)), unref(ns2).is("hidden", _ctx.hiddenExpandIcon), { expanded: !((_c = _ctx.node) == null ? void 0 : _c.isLeaf) && _ctx.expanded }, unref(ns2).be("node", "expand-icon") ]), onClick: withModifiers(handleExpandIconClick, ["stop"]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(icon)))) ]), _: 1 }, 8, ["class", "onClick"])) : 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 }, null, 8, ["node"]) ], 6) ], 42, _hoisted_166); }; } }); var ElTreeNode2 = _export_sfc(_sfc_main138, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/src/tree.mjs var itemSize2 = 26; var __default__95 = defineComponent({ name: "ElTreeV2" }); var _sfc_main139 = defineComponent({ ...__default__95, props: treeProps, emits: treeEmits, setup(__props, { expose, emit }) { const props = __props; const slots = useSlots(); provide(ROOT_TREE_INJECTION_KEY, { ctx: { emit, slots }, props, instance: getCurrentInstance() }); provide(formItemContextKey, void 0); const { t } = useLocale(); const ns2 = useNamespace("tree"); const { flattenTree, isNotEmpty, toggleExpand, isExpanded, isIndeterminate, isChecked, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeCheck, toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter: filter2, setData: setData2, getNode, expandNode, collapseNode, setExpandedKeys } = useTree3(props, emit); expose({ toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter: filter2, setData: setData2, getNode, expandNode, collapseNode, setExpandedKeys }); return (_ctx, _cache) => { var _a3; return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns2).b(), { [unref(ns2).m("highlight-current")]: _ctx.highlightCurrent }]), role: "tree" }, [ unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), { key: 0, "class-name": unref(ns2).b("virtual-list"), data: unref(flattenTree), total: unref(flattenTree).length, height: _ctx.height, "item-size": itemSize2, "perf-mode": _ctx.perfMode }, { default: withCtx(({ data, index, style }) => [ (openBlock(), createBlock(ElTreeNode2, { key: data[index].key, style: normalizeStyle(style), node: data[index], expanded: unref(isExpanded)(data[index]), "show-checkbox": _ctx.showCheckbox, checked: unref(isChecked)(data[index]), indeterminate: unref(isIndeterminate)(data[index]), 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) }, null, 8, ["style", "node", "expanded", "show-checkbox", "checked", "indeterminate", "disabled", "current", "hidden-expand-icon", "onClick", "onToggle", "onCheck"])) ]), _: 1 }, 8, ["class-name", "data", "total", "height", "perf-mode"])) : (openBlock(), createElementBlock("div", { key: 1, class: normalizeClass(unref(ns2).e("empty-block")) }, [ createBaseVNode("span", { class: normalizeClass(unref(ns2).e("empty-text")) }, toDisplayString((_a3 = _ctx.emptyText) != null ? _a3 : unref(t)("el.tree.emptyText")), 3) ], 2)) ], 2); }; } }); var TreeV2 = _export_sfc(_sfc_main139, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/tree-v2/index.mjs var ElTreeV2 = withInstall(TreeV2); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/ajax.mjs var SCOPE7 = "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(SCOPE7, "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 (Array.isArray(value)) 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/.pnpm/element-plus@2.2.32_vue@3.2.44/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: Object, default: () => mutable({}) }, multiple: { type: Boolean, default: false }, name: { type: String, default: "file" }, drag: { type: Boolean, default: false }, withCredentials: Boolean, showFileList: { type: Boolean, default: true }, accept: { type: String, default: "" }, type: { type: String, default: "select" }, 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: Boolean, limit: Number }); 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 } }); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/upload-list.mjs var uploadListProps = buildProps({ files: { type: definePropType(Array), default: () => mutable([]) }, disabled: { type: Boolean, default: false }, handlePreview: { type: definePropType(Function), default: NOOP }, listType: { type: String, values: uploadListTypes, default: "text" } }); var uploadListEmits = { remove: (file) => !!file }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/upload-list2.mjs var _hoisted_167 = ["onKeydown"]; var _hoisted_241 = ["src"]; var _hoisted_319 = ["onClick"]; var _hoisted_411 = ["onClick"]; var _hoisted_58 = ["onClick"]; var __default__96 = defineComponent({ name: "ElUploadList" }); var _sfc_main140 = defineComponent({ ...__default__96, props: uploadListProps, emits: uploadListEmits, setup(__props, { emit }) { const { t } = useLocale(); const nsUpload = useNamespace("upload"); const nsIcon = useNamespace("icon"); const nsList = useNamespace("list"); const disabled = useDisabled(); const focusing = ref(false); const handleRemove = (file) => { emit("remove", file); }; return (_ctx, _cache) => { return openBlock(), createBlock(TransitionGroup, { tag: "ul", class: normalizeClass([ unref(nsUpload).b("list"), unref(nsUpload).bm("list", _ctx.listType), unref(nsUpload).is("disabled", unref(disabled)) ]), name: unref(nsList).b() }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.files, (file) => { 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: "0", 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 }, () => [ _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, alt: "" }, null, 10, _hoisted_241)) : 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")) }, toDisplayString(file.name), 3) ], 10, _hoisted_319), 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)) ]), _: 2 }, 1032, ["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_411), !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_58)) : createCommentVNode("v-if", true) ], 2)) : createCommentVNode("v-if", true) ]) ], 42, _hoisted_167); }), 128)), renderSlot(_ctx.$slots, "append") ]), _: 3 }, 8, ["class", "name"]); }; } }); var UploadList = _export_sfc(_sfc_main140, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/upload-dragger.mjs var uploadDraggerProps = buildProps({ disabled: { type: Boolean, default: false } }); var uploadDraggerEmits = { file: (file) => isArray(file) }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs var _hoisted_168 = ["onDrop", "onDragover"]; var COMPONENT_NAME24 = "ElUploadDrag"; var __default__97 = defineComponent({ name: COMPONENT_NAME24 }); var _sfc_main141 = defineComponent({ ...__default__97, props: uploadDraggerProps, emits: uploadDraggerEmits, setup(__props, { emit }) { const uploaderContext = inject(uploadContextKey); if (!uploaderContext) { throwError(COMPONENT_NAME24, "usage: <el-upload><el-upload-dragger /></el-upload>"); } const ns2 = useNamespace("upload"); const dragover = ref(false); const disabled = useDisabled(); const onDrop = (e) => { if (disabled.value) return; dragover.value = false; e.stopPropagation(); const files = Array.from(e.dataTransfer.files); const accept = uploaderContext.accept.value; if (!accept) { emit("file", files); return; } const filesFiltered = files.filter((file) => { const { type: type4, name } = file; const extension = name.includes(".") ? `.${name.split(".").pop()}` : ""; const baseType = type4.replace(/\/.*$/, ""); return accept.split(",").map((type22) => type22.trim()).filter((type22) => type22).some((acceptedType) => { if (acceptedType.startsWith(".")) { return extension === acceptedType; } if (/\/\*$/.test(acceptedType)) { return baseType === acceptedType.replace(/\/\*$/, ""); } if (/^[^/]+\/[^/]+$/.test(acceptedType)) { return type4 === acceptedType; } return false; }); }); emit("file", filesFiltered); }; const onDragover = () => { if (!disabled.value) dragover.value = true; }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns2).b("dragger"), unref(ns2).is("dragover", dragover.value)]), onDrop: withModifiers(onDrop, ["prevent"]), onDragover: withModifiers(onDragover, ["prevent"]), onDragleave: _cache[0] || (_cache[0] = withModifiers(($event) => dragover.value = false, ["prevent"])) }, [ renderSlot(_ctx.$slots, "default") ], 42, _hoisted_168); }; } }); var UploadDragger = _export_sfc(_sfc_main141, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/upload-content2.mjs var _hoisted_169 = ["onKeydown"]; var _hoisted_242 = ["name", "multiple", "accept"]; var __default__98 = defineComponent({ name: "ElUploadContent", inheritAttrs: false }); var _sfc_main142 = defineComponent({ ...__default__98, props: uploadContentProps, setup(__props, { expose }) { const props = __props; const ns2 = useNamespace("upload"); const disabled = useDisabled(); const requests = shallowRef({}); const inputRef = shallowRef(); const uploadFiles = (files) => { if (files.length === 0) return; const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props; 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 (!props.beforeUpload) { return doUpload(rawFile); } let hookResult; try { hookResult = await props.beforeUpload(rawFile); } catch (e) { hookResult = false; } if (hookResult === false) { props.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 })); }; const doUpload = (rawFile) => { const { headers, data, method: method5, withCredentials, name: filename, action, onProgress, onSuccess, onError, httpRequest } = props; const { uid: uid2 } = rawFile; const options = { headers: headers || {}, withCredentials, file: rawFile, data, 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(ns2).b(), unref(ns2).m(_ctx.listType), unref(ns2).is("drag", _ctx.drag)]), tabindex: "0", onClick: handleClick, onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"]) }, [ _ctx.drag ? (openBlock(), createBlock(UploadDragger, { key: 0, disabled: unref(disabled), onFile: uploadFiles }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["disabled"])) : renderSlot(_ctx.$slots, "default", { key: 1 }), createBaseVNode("input", { ref_key: "inputRef", ref: inputRef, class: normalizeClass(unref(ns2).e("input")), name: _ctx.name, multiple: _ctx.multiple, accept: _ctx.accept, type: "file", onChange: handleChange, onClick: _cache[0] || (_cache[0] = withModifiers(() => { }, ["stop"])) }, null, 42, _hoisted_242) ], 42, _hoisted_169); }; } }); var UploadContent = _export_sfc(_sfc_main142, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/use-handlers.mjs var SCOPE8 = "ElUpload"; var revokeObjectURL = (file) => { var _a3; if ((_a3 = file.url) == null ? void 0 : _a3.startsWith("blob:")) { URL.revokeObjectURL(file.url); } }; var useHandlers = (props, uploadRef) => { const uploadFiles = useVModel(props, "fileList", void 0, { passive: true }); const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid); function abort(file) { var _a3; (_a3 = uploadRef.value) == null ? void 0 : _a3.abort(file); } function clearFiles(states = ["ready", "uploading", "success", "fail"]) { uploadFiles.value = uploadFiles.value.filter((row) => !states.includes(row.status)); } const handleError = (err, rawFile) => { const file = getFile(rawFile); if (!file) return; console.error(err); file.status = "fail"; uploadFiles.value.splice(uploadFiles.value.indexOf(file), 1); props.onError(err, file, uploadFiles.value); props.onChange(file, uploadFiles.value); }; const handleProgress = (evt, rawFile) => { const file = getFile(rawFile); if (!file) return; props.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; props.onSuccess(response, file, uploadFiles.value); props.onChange(file, uploadFiles.value); }; 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 (props.listType === "picture-card" || props.listType === "picture") { try { uploadFile.url = URL.createObjectURL(file); } catch (err) { debugWarn(SCOPE8, err.message); props.onError(err, uploadFile, uploadFiles.value); } } uploadFiles.value = [...uploadFiles.value, uploadFile]; props.onChange(uploadFile, uploadFiles.value); }; const handleRemove = async (file) => { const uploadFile = file instanceof File ? getFile(file) : file; if (!uploadFile) throwError(SCOPE8, "file to be removed not found"); const doRemove = (file2) => { abort(file2); const fileList = uploadFiles.value; fileList.splice(fileList.indexOf(file2), 1); props.onRemove(file2, fileList); revokeObjectURL(file2); }; if (props.beforeRemove) { const before2 = await props.beforeRemove(uploadFile, uploadFiles.value); if (before2 !== false) doRemove(uploadFile); } else { doRemove(uploadFile); } }; function submit() { uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => { var _a3; return raw && ((_a3 = uploadRef.value) == null ? void 0 : _a3.upload(raw)); }); } watch(() => props.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) { props.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 }; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/src/upload2.mjs var __default__99 = defineComponent({ name: "ElUpload" }); var _sfc_main143 = defineComponent({ ...__default__99, props: uploadProps, setup(__props, { expose }) { const props = __props; const slots = useSlots(); const disabled = useDisabled(); const uploadRef = shallowRef(); const { abort, submit, clearFiles, uploadFiles, handleStart, handleError, handleRemove, handleSuccess, handleProgress } = useHandlers(props, uploadRef); const isPictureCard = computed(() => props.listType === "picture-card"); const uploadContentProps2 = computed(() => ({ ...props, fileList: uploadFiles.value, onStart: handleStart, onProgress: handleProgress, onSuccess: handleSuccess, onError: handleError, onRemove: handleRemove })); onBeforeUnmount(() => { uploadFiles.value.forEach(({ url: url2 }) => { if (url2 == null ? void 0 : url2.startsWith("blob:")) URL.revokeObjectURL(url2); }); }); provide(uploadContextKey, { accept: toRef(props, "accept") }); expose({ abort, submit, clearFiles, handleStart, handleRemove }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", null, [ unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, { key: 0, disabled: unref(disabled), "list-type": _ctx.listType, files: unref(uploadFiles), "handle-preview": _ctx.onPreview, onRemove: unref(handleRemove) }, createSlots({ append: withCtx(() => [ createVNode(UploadContent, mergeProps({ ref_key: "uploadRef", ref: uploadRef }, unref(uploadContentProps2)), { default: withCtx(() => [ unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true) ]), _: 3 }, 16) ]), _: 2 }, [ _ctx.$slots.file ? { name: "default", fn: withCtx(({ file }) => [ renderSlot(_ctx.$slots, "file", { file }) ]) } : void 0 ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true), !unref(isPictureCard) || unref(isPictureCard) && !_ctx.showFileList ? (openBlock(), createBlock(UploadContent, mergeProps({ key: 1, ref_key: "uploadRef", ref: uploadRef }, unref(uploadContentProps2)), { default: withCtx(() => [ unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !unref(slots).trigger && unref(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"), !unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, { key: 3, disabled: unref(disabled), "list-type": _ctx.listType, files: unref(uploadFiles), "handle-preview": _ctx.onPreview, onRemove: unref(handleRemove) }, createSlots({ _: 2 }, [ _ctx.$slots.file ? { name: "default", fn: withCtx(({ file }) => [ renderSlot(_ctx.$slots, "file", { file }) ]) } : void 0 ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true) ]); }; } }); var Upload = _export_sfc(_sfc_main143, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/upload/index.mjs var ElUpload = withInstall(Upload); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/component.mjs var Components = [ ElAffix, ElAlert, ElAutocomplete, ElAutoResizer, ElAvatar, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElConfigProvider, ElContainer, ElAside, ElFooter, ElHeader, ElMain, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElForm, ElFormItem, ElIcon, ElImage, ElImageViewer, ElInput, ElInputNumber, 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, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTooltipV2, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload ]; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/infinite-scroll/src/index.mjs var SCOPE9 = "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 _a3, _b; const { type: type4, default: defaultValue } = option; const attrVal = el.getAttribute(`infinite-scroll-${name}`); let value = (_b = (_a3 = instance[attrVal]) != null ? _a3 : 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[SCOPE9]; if (observer) { observer.disconnect(); delete el[SCOPE9].observer; } }; var handleScroll = (el, cb) => { const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE9]; const { disabled, distance } = getScrollOptions(el, instance); const { clientHeight, scrollHeight, scrollTop } = containerEl; const delta = scrollTop - lastScrollTop; el[SCOPE9].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[SCOPE9]; 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; if (!isFunction(cb)) { throwError(SCOPE9, "'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[SCOPE9] = { 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[SCOPE9].observer = observer; observer.observe(el, { childList: true, subtree: true }); checkFull(el, cb); } container.addEventListener("scroll", onScroll); }, unmounted(el) { const { container, onScroll } = el[SCOPE9]; container == null ? void 0 : container.removeEventListener("scroll", onScroll); destroyObserver(el); }, async updated(el) { if (!el[SCOPE9]) { await nextTick(); } else { const { containerEl, cb, observer } = el[SCOPE9]; if (containerEl.clientHeight && observer) { checkFull(el, cb); } } } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/loading/src/loading.mjs function createLoadingComponent(options) { let afterLeaveTimer; const ns2 = useNamespace("loading"); const afterLeaveFlag = ref(false); const data = reactive({ ...options, originalPosition: "", originalOverflow: "", visible: false }); function setText(text) { data.text = text; } function destroySelf() { const target2 = data.parent; if (!target2.vLoadingAddClassList) { let loadingNumber = target2.getAttribute("loading-number"); loadingNumber = Number.parseInt(loadingNumber) - 1; if (!loadingNumber) { removeClass(target2, ns2.bm("parent", "relative")); target2.removeAttribute("loading-number"); } else { target2.setAttribute("loading-number", loadingNumber.toString()); } removeClass(target2, ns2.bm("parent", "hidden")); } removeElLoadingChild(); loadingInstance.unmount(); } function removeElLoadingChild() { var _a3, _b; (_b = (_a3 = vm.$el) == null ? void 0 : _a3.parentNode) == null ? void 0 : _b.removeChild(vm.$el); } function close2() { var _a3; if (options.beforeClose && !options.beforeClose()) return; afterLeaveFlag.value = true; clearTimeout(afterLeaveTimer); afterLeaveTimer = window.setTimeout(handleAfterLeave, 400); data.visible = false; (_a3 = options.closed) == null ? void 0 : _a3.call(options); } function handleAfterLeave() { if (!afterLeaveFlag.value) return; const target2 = data.parent; afterLeaveFlag.value = false; target2.vLoadingAddClassList = void 0; destroySelf(); } const elLoadingComponent = { name: "ElLoading", setup() { 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: ns2.b("text") }, [data.text]) : void 0; return h(Transition, { name: ns2.b("fade"), onAfterLeave: handleAfterLeave }, { default: withCtx(() => [ withDirectives(createVNode("div", { style: { backgroundColor: data.background || "" }, class: [ ns2.b("mask"), data.customClass, data.fullscreen ? "is-fullscreen" : "" ] }, [ h("div", { class: ns2.b("spinner") }, [spinner, spinnerText]) ]), [[vShow, data.visible]]) ]) }); }; } }; const loadingInstance = createApp(elLoadingComponent); const vm = loadingInstance.mount(document.createElement("div")); return { ...toRefs(data), setText, removeElLoadingChild, close: close2, handleAfterLeave, vm, get $el() { return vm.$el; } }; } // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/loading/src/service.mjs var fullscreenInstance = void 0; var Loading = function(options = {}) { if (!isClient) return void 0; const resolved = resolveOptions(options); if (resolved.fullscreen && fullscreenInstance) { return fullscreenInstance; } const instance = createLoadingComponent({ ...resolved, closed: () => { var _a3; (_a3 = resolved.closed) == null ? void 0 : _a3.call(resolved); if (resolved.fullscreen) fullscreenInstance = void 0; } }); 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 _a3, _b, _c, _d; let target2; if (isString(options.target)) { target2 = (_a3 = document.querySelector(options.target)) != null ? _a3 : 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, target: target2 }; }; var addStyle = async (options, parent2, instance) => { const { nextZIndex } = useZIndex(); 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 ns2 = useNamespace("loading"); if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) { addClass(parent2, ns2.bm("parent", "relative")); } else { removeClass(parent2, ns2.bm("parent", "relative")); } if (options.fullscreen && options.lock) { addClass(parent2, ns2.bm("parent", "hidden")); } else { removeClass(parent2, ns2.bm("parent", "hidden")); } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/loading/src/directive.mjs var INSTANCE_KEY = Symbol("ElLoading"); var createInstance = (el, binding) => { var _a3, _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; if (data) return ref(data); else return data; }; const getProp2 = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(`element-loading-${hyphenate(name)}`)); const fullscreen = (_a3 = getBindingProp("fullscreen")) != null ? _a3 : 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 }; el[INSTANCE_KEY] = { options, instance: Loading(options) }; }; var updateOptions = (newOptions, originalOptions) => { 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.oldValue !== binding.value) { if (binding.value && !binding.oldValue) { createInstance(el, binding); } else if (binding.value && binding.oldValue) { if (isObject(binding.value)) updateOptions(binding.value, instance.options); } else { instance == null ? void 0 : instance.instance.close(); } } }, unmounted(el) { var _a3; (_a3 = el[INSTANCE_KEY]) == null ? void 0 : _a3.instance.close(); } }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/loading/index.mjs var ElLoading = { install(app) { app.directive("loading", vLoading); app.config.globalProperties.$loading = Loading; }, directive: vLoading, service: Loading }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message/src/message.mjs var messageTypes = ["success", "info", "warning", "error"]; var messageDefaults = mutable({ customClass: "", center: false, dangerouslyUseHTMLString: false, duration: 3e3, icon: void 0, id: "", message: "", onClose: void 0, showClose: false, type: "info", offset: 16, zIndex: 0, grouping: false, repeatNum: 1, appendTo: isClient ? document.body : void 0 }); var messageProps = buildProps({ customClass: { type: String, default: messageDefaults.customClass }, center: { type: Boolean, default: messageDefaults.center }, 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), required: false }, showClose: { type: Boolean, default: messageDefaults.showClose }, type: { type: String, values: messageTypes, default: messageDefaults.type }, offset: { type: Number, default: messageDefaults.offset }, zIndex: { type: Number, default: messageDefaults.zIndex }, grouping: { type: Boolean, default: messageDefaults.grouping }, repeatNum: { type: Number, default: messageDefaults.repeatNum } }); var messageEmits = { destroy: () => true }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message/src/instance.mjs var instances = shallowReactive([]); var getInstance = (id) => { 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) => { const { prev } = getInstance(id); if (!prev) return 0; return prev.vm.exposed.bottom.value; }; var getOffsetOrSpace = (id, offset2) => { const idx = instances.findIndex((instance) => instance.id === id); return idx > 0 ? 20 : offset2; }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message/src/message2.mjs var _hoisted_170 = ["id"]; var _hoisted_243 = ["innerHTML"]; var __default__100 = defineComponent({ name: "ElMessage" }); var _sfc_main144 = defineComponent({ ...__default__100, props: messageProps, emits: messageEmits, setup(__props, { expose }) { const props = __props; const { Close } = TypeComponents; const ns2 = useNamespace("message"); const messageRef = ref(); const visible = ref(false); const height = ref(0); let stopTimer = void 0; const badgeType = computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info"); const typeClass = computed(() => { const type4 = props.type; return { [ns2.bm("icon", type4)]: type4 && TypeComponentsMap[type4] }; }); const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || ""); const lastOffset = computed(() => getLastOffset(props.id)); const offset2 = computed(() => getOffsetOrSpace(props.id, props.offset) + lastOffset.value); const bottom = computed(() => height.value + offset2.value); const customStyle = computed(() => ({ top: `${offset2.value}px`, zIndex: props.zIndex })); function startTimer() { if (props.duration === 0) return; ({ stop: stopTimer } = useTimeoutFn(() => { close2(); }, props.duration)); } function clearTimer() { stopTimer == null ? void 0 : stopTimer(); } function close2() { visible.value = false; } function keydown({ code }) { if (code === EVENT_CODE.esc) { close2(); } } onMounted(() => { startTimer(); visible.value = true; }); watch(() => props.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(ns2).b("fade"), onBeforeLeave: _ctx.onClose, onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")), persisted: "" }, { default: withCtx(() => [ withDirectives(createBaseVNode("div", { id: _ctx.id, ref_key: "messageRef", ref: messageRef, class: normalizeClass([ unref(ns2).b(), { [unref(ns2).m(_ctx.type)]: _ctx.type && !_ctx.icon }, unref(ns2).is("center", _ctx.center), unref(ns2).is("closable", _ctx.showClose), _ctx.customClass ]), style: normalizeStyle(unref(customStyle)), role: "alert", onMouseenter: clearTimer, onMouseleave: startTimer }, [ _ctx.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), { key: 0, value: _ctx.repeatNum, type: unref(badgeType), class: normalizeClass(unref(ns2).e("badge")) }, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true), unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), { key: 1, class: normalizeClass([unref(ns2).e("icon"), unref(typeClass)]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", {}, () => [ !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", { key: 0, class: normalizeClass(unref(ns2).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(ns2).e("content")), innerHTML: _ctx.message }, null, 10, _hoisted_243) ], 2112)) ]), _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), { key: 2, class: normalizeClass(unref(ns2).e("closeBtn")), onClick: withModifiers(close2, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Close)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 46, _hoisted_170), [ [vShow, visible.value] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave"]); }; } }); var MessageConstructor = _export_sfc(_sfc_main144, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message/src/method.mjs var seed = 1; var normalizeOptions = (params) => { const options = !params || isString(params) || isVNode(params) || isFunction(params) ? { message: params } : params; const normalized = { ...messageDefaults, ...options }; if (!normalized.appendTo) { normalized.appendTo = document.body; } else if (isString(normalized.appendTo)) { let appendTo = document.querySelector(normalized.appendTo); if (!isElement2(appendTo)) { debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."); appendTo = document.body; } normalized.appendTo = appendTo; } return normalized; }; var closeMessage = (instance) => { const idx = instances.indexOf(instance); if (idx === -1) return; instances.splice(idx, 1); const { handler } = instance; handler.close(); }; var createMessage = ({ appendTo, ...options }, context) => { const { nextZIndex } = useZIndex(); const id = `message_${seed++}`; const userOnClose = options.onClose; const container = document.createElement("div"); const props = { ...options, zIndex: nextZIndex() + options.zIndex, id, onClose: () => { userOnClose == null ? void 0 : userOnClose(); closeMessage(instance); }, onDestroy: () => { render(null, container); } }; const vnode = createVNode(MessageConstructor, props, isFunction(props.message) || isVNode(props.message) ? { default: isFunction(props.message) ? props.message : () => props.message } : null); vnode.appContext = context || message._context; render(vnode, container); appendTo.appendChild(container.firstElementChild); const vm = vnode.component; const handler = { close: () => { vm.exposed.visible.value = false; } }; const instance = { id, vnode, vm, handler, props: vnode.component.props }; return instance; }; var message = (options = {}, context) => { if (!isClient) return { close: () => void 0 }; if (isNumber2(messageConfig.max) && instances.length >= messageConfig.max) { return { close: () => void 0 }; } const normalized = normalizeOptions(options); if (normalized.grouping && instances.length) { const instance2 = instances.find(({ vnode: vm }) => { var _a3; return ((_a3 = vm.props) == null ? void 0 : _a3.message) === normalized.message; }); if (instance2) { instance2.props.repeatNum += 1; instance2.props.type = normalized.type; return instance2.handler; } } 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 instance of instances) { if (!type4 || type4 === instance.props.type) { instance.handler.close(); } } } message.closeAll = closeAll; message._context = null; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message/index.mjs var ElMessage = withInstallFunction(message, "$message"); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message-box/src/index.mjs var _sfc_main145 = 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, roundButton: { default: false, type: Boolean }, container: { type: String, default: "body" }, boxType: { type: String, default: "" } }, emits: ["vanish", "action"], setup(props, { emit }) { const { t } = useLocale(); const ns2 = useNamespace("message-box"); const visible = ref(false); const { nextZIndex } = useZIndex(); const state = reactive({ autofocus: true, beforeClose: null, callback: null, cancelButtonText: "", cancelButtonClass: "", confirmButtonText: "", confirmButtonClass: "", customClass: "", customStyle: {}, dangerouslyUseHTMLString: false, distinguishCancelAndClose: false, icon: "", inputPattern: null, inputPlaceholder: "", inputType: "text", inputValue: null, inputValidator: null, inputErrorMessage: "", message: null, modalFade: true, modalClass: "", showCancelButton: false, showConfirmButton: true, type: "", title: void 0, showInput: false, action: "", confirmButtonLoading: false, cancelButtonLoading: false, confirmButtonDisabled: false, editorErrorMessage: "", validateError: false, zIndex: nextZIndex() }); const typeClass = computed(() => { const type4 = state.type; return { [ns2.bm("icon", type4)]: type4 && TypeComponentsMap[type4] }; }); const contentId = useId(); const inputId = useId(); const btnSize = useSize(computed(() => props.buttonSize), { prop: true, form: true, formItem: true }); const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || ""); 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 (props.boxType === "prompt" && val !== null) { validate(); } }, { immediate: true }); watch(() => visible.value, (val) => { var _a3, _b; if (val) { if (props.boxType !== "prompt") { if (state.autofocus) { focusStartRef.value = (_b = (_a3 = confirmRef.value) == null ? void 0 : _a3.$el) != null ? _b : rootRef.value; } else { focusStartRef.value = rootRef.value; } } state.zIndex = nextZIndex(); } if (props.boxType !== "prompt") return; if (val) { nextTick().then(() => { var _a22; if (inputRef.value && inputRef.value.$el) { if (state.autofocus) { focusStartRef.value = (_a22 = getInputElement()) != null ? _a22 : rootRef.value; } else { focusStartRef.value = rootRef.value; } } }); } else { state.editorErrorMessage = ""; state.validateError = false; } }); const draggable2 = computed(() => props.draggable); useDraggable(rootRef, headerRef, draggable2); onMounted(async () => { await nextTick(); if (props.closeOnHashChange) { window.addEventListener("hashchange", doClose); } }); onBeforeUnmount(() => { if (props.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 (props.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 _a3; if (props.boxType === "prompt" && action === "confirm" && !validate()) { return; } state.action = action; if (state.beforeClose) { (_a3 = state.beforeClose) == null ? void 0 : _a3.call(state, action, state, doClose); } else { doClose(); } }; const validate = () => { if (props.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 (typeof inputValidator === "function") { const validateResult = inputValidator(state.inputValue); if (validateResult === false) { state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error"); state.validateError = true; return false; } if (typeof validateResult === "string") { state.editorErrorMessage = validateResult; state.validateError = true; return false; } } } state.editorErrorMessage = ""; state.validateError = false; return true; }; const getInputElement = () => { const inputRefs = inputRef.value.$refs; return inputRefs.input || inputRefs.textarea; }; const handleClose = () => { handleAction("close"); }; const onCloseRequested = () => { if (props.closeOnPressEscape) { handleClose(); } }; if (props.lockScroll) { useLockscreen(visible); } useRestoreActive(visible); return { ...toRefs(state), ns: ns2, overlayEvent, visible, hasMessage, typeClass, contentId, inputId, btnSize, iconComponent, confirmButtonClasses, rootRef, focusStartRef, headerRef, inputRef, confirmRef, doClose, handleClose, onCloseRequested, handleWrapperClick, handleInputEnter, handleAction, t }; } }); var _hoisted_171 = ["aria-label", "aria-describedby"]; var _hoisted_244 = ["aria-label"]; var _hoisted_320 = ["id"]; function _sfc_render33(_ctx, _cache, $props, $setup, $data, $options) { const _component_el_icon = resolveComponent("el-icon"); const _component_close = resolveComponent("close"); 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.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")) }, [ 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(() => [ createVNode(_component_close) ]), _: 1 }, 8, ["class"]) ], 42, _hoisted_244)) : 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 }, { default: withCtx(() => [ createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : ""), 1) ]), _: 1 }, 8, ["for"])) : (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_320), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("btns")) }, [ _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, { key: 0, loading: _ctx.cancelButtonLoading, 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, ["loading", "class", "round", "size"])) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_el_button, { ref: "confirmRef", type: "primary", loading: _ctx.confirmButtonLoading, 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, ["loading", "class", "round", "disabled", "size"]), [ [vShow, _ctx.showConfirmButton] ]) ], 2) ], 6) ]), _: 3 }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"]) ], 42, _hoisted_171) ]), _: 3 }, 8, ["z-index", "overlay-class", "mask"]), [ [vShow, _ctx.visible] ]) ]), _: 3 }); } var MessageBoxConstructor = _export_sfc(_sfc_main145, [["render", _sfc_render33], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/message-box/src/messageBox.mjs var messageInstance = /* @__PURE__ */ new Map(); var getAppendToElement = (props) => { let appendTo = document.body; if (props.appendTo) { if (isString(props.appendTo)) { appendTo = document.querySelector(props.appendTo); } if (isElement2(props.appendTo)) { appendTo = props.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 = (props, container, appContext = null) => { const vnode = createVNode(MessageBoxConstructor, props, isFunction(props.message) || isVNode(props.message) ? { default: isFunction(props.message) ? props.message : () => props.message } : null); vnode.appContext = appContext; render(vnode, container); getAppendToElement(props).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)) { 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/.pnpm/element-plus@2.2.32_vue@3.2.44/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/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/notification/src/notification.mjs var notificationTypes = [ "success", "info", "warning", "error" ]; var notificationProps = buildProps({ customClass: { type: String, default: "" }, dangerouslyUseHTMLString: { type: Boolean, default: false }, duration: { type: Number, default: 4500 }, icon: { type: iconPropType }, id: { type: String, default: "" }, message: { type: definePropType([String, Object]), 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: { type: Number, default: 0 } }); var notificationEmits = { destroy: () => true }; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/notification/src/notification2.mjs var _hoisted_173 = ["id"]; var _hoisted_245 = ["textContent"]; var _hoisted_321 = { key: 0 }; var _hoisted_412 = ["innerHTML"]; var __default__101 = defineComponent({ name: "ElNotification" }); var _sfc_main146 = defineComponent({ ...__default__101, props: notificationProps, emits: notificationEmits, setup(__props, { expose }) { const props = __props; const ns2 = useNamespace("notification"); const { Close } = CloseComponents; const visible = ref(false); let timer = void 0; const typeClass = computed(() => { const type4 = props.type; return type4 && TypeComponentsMap[props.type] ? ns2.m(type4) : ""; }); const iconComponent = computed(() => { if (!props.type) return props.icon; return TypeComponentsMap[props.type] || props.icon; }); const horizontalClass = computed(() => props.position.endsWith("right") ? "right" : "left"); const verticalProperty = computed(() => props.position.startsWith("top") ? "top" : "bottom"); const positionStyle = computed(() => { return { [verticalProperty.value]: `${props.offset}px`, zIndex: props.zIndex }; }); function startTimer() { if (props.duration > 0) { ; ({ stop: timer } = useTimeoutFn(() => { if (visible.value) close2(); }, props.duration)); } } function clearTimer() { timer == null ? void 0 : timer(); } function close2() { visible.value = false; } function onKeydown({ code }) { if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) { clearTimer(); } else if (code === EVENT_CODE.esc) { if (visible.value) { close2(); } } else { startTimer(); } } onMounted(() => { startTimer(); visible.value = true; }); useEventListener(document, "keydown", onKeydown); expose({ visible, close: close2 }); return (_ctx, _cache) => { return openBlock(), createBlock(Transition, { name: unref(ns2).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(ns2).b(), _ctx.customClass, unref(horizontalClass)]), style: normalizeStyle(unref(positionStyle)), role: "alert", onMouseenter: clearTimer, onMouseleave: startTimer, onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)) }, [ unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass([unref(ns2).e("icon"), unref(typeClass)]) }, { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)))) ]), _: 1 }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns2).e("group")) }, [ createBaseVNode("h2", { class: normalizeClass(unref(ns2).e("title")), textContent: toDisplayString(_ctx.title) }, null, 10, _hoisted_245), withDirectives(createBaseVNode("div", { class: normalizeClass(unref(ns2).e("content")), style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 }) }, [ renderSlot(_ctx.$slots, "default", {}, () => [ !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_321, 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_412) ], 2112)) ]) ], 6), [ [vShow, _ctx.message] ]), _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), { key: 0, class: normalizeClass(unref(ns2).e("closeBtn")), onClick: withModifiers(close2, ["stop"]) }, { default: withCtx(() => [ createVNode(unref(Close)) ]), _: 1 }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true) ], 2) ], 46, _hoisted_173), [ [vShow, visible.value] ]) ]), _: 3 }, 8, ["name", "onBeforeLeave"]); }; } }); var NotificationConstructor = _export_sfc(_sfc_main146, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/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 = null) { if (!isClient) return { close: () => void 0 }; if (typeof options === "string" || isVNode(options)) { options = { message: options }; } const position = options.position || "top-right"; let verticalOffset = options.offset || 0; notifications[position].forEach(({ vm: vm2 }) => { var _a3; verticalOffset += (((_a3 = vm2.el) == null ? void 0 : _a3.offsetHeight) || 0) + GAP_SIZE; }); verticalOffset += GAP_SIZE; const { nextZIndex } = useZIndex(); const id = `notification_${seed2++}`; const userOnClose = options.onClose; const props = { zIndex: nextZIndex(), ...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, props, isVNode(props.message) ? { default: () => props.message } : null); vm.appContext = context != null ? context : notify._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 = {}) => { if (typeof options === "string" || isVNode(options)) { options = { message: options }; } return notify({ ...options, type: type4 }); }; }); function close(id, position, userOnClose) { const orientedNotifications = notifications[position]; const idx = orientedNotifications.findIndex(({ vm: vm2 }) => { var _a3; return ((_a3 = vm2.component) == null ? void 0 : _a3.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; }); } } notify.closeAll = closeAll2; notify._context = null; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/components/notification/index.mjs var ElNotification = withInstallFunction(notify, "$notify"); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/plugin.mjs var Plugins = [ ElInfiniteScroll, ElLoading, ElMessage, ElMessageBox, ElNotification, ElPopoverDirective ]; // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/defaults.mjs var installer = makeInstaller([...Components, ...Plugins]); // node_modules/.pnpm/element-plus@2.2.32_vue@3.2.44/node_modules/element-plus/es/index.mjs var import_dayjs17 = __toESM(require_dayjs_min(), 1); var install = installer.install; var version3 = installer.version; var export_dayjs = import_dayjs17.default; export { BAR_MAP, CASCADER_PANEL_INJECTION_KEY, CHANGE_EVENT, ClickOutside, CommonPicker, CommonProps, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, COLLECTION_INJECTION_KEY2 as DROPDOWN_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY2 as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, DROPDOWN_INJECTION_KEY, DefaultProps, DynamicSizeGrid, DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElCollection2 as ElCollection, ElCollectionItem2 as ElCollectionItem, ElColorPicker, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElLink, ElLoading, vLoading as ElLoadingDirective, Loading as ElLoadingService, ElMain, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, ElPopperArrow, ElPopperContent, ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn2 as ElTableColumn, ElTableV2, ElTabs, ElTag, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid, FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, Mousewheel, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_PICKER_INJECTION_KEY, RowAlign, RowJustify, TOOLTIP_INJECTION_KEY, TOOLTIP_V2_OPEN, TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, affixEmits, affixProps, alertEffects, alertEmits, alertProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderProps, checkTagEmits, checkTagProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerContextKey, colorPickerEmits, colorPickerProps, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, export_dayjs as dayjs, installer as default, defaultNamespace, descriptionProps, dialogEmits, dialogInjectionKey, dialogProps, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, install, linkEmits, linkProps, makeInstaller, makeList, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messageProps, messageTypes, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmProps, popoverEmits, popoverProps, popperArrowProps, popperContentEmits, popperContentProps, popperCoreConfigProps, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioProps, radioPropsBase, rangeArr, rateEmits, rateProps, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, selectGroupKey, selectKey, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, thumbProps, timePickerDefaultProps, timeUnits, timelineItemProps, tooltipEmits, tooltipV2ContentKey, tooltipV2RootKey, transferCheckedChangeFn, transferEmits, transferProps, translate, uploadBaseProps, uploadContentProps, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, useAttrs2 as useAttrs, useCascaderConfig, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDeprecated, useDialog, useDisabled, useDraggable, useEscapeKeydown, useFloating, useFloatingProps, useFocus, useFormItem, useFormItemInputId, useForwardRef, useForwardRefDirective, useGlobalConfig, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useRestoreActive, useSameTarget, useSize, useSizeProp, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vLoading, vRepeatClick, valueEquals, version3 as version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps }; /*! Bundled license information: escape-html/index.js: (*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed *) lodash-es/lodash.default.js: (** * @license * Lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors *) lodash-es/lodash.js: (** * @license * Lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * 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=element-plus.js.map ios-share - Nuosi Git Service

ipu的trunk版ios客户端工程

liufl5 a26be3fbc5 IPU标准版:整理指纹解锁 & 手势锁插件 3 years ago
IPUCommon e2f170ac27 @liuql6 @更新IPUPush.framework, 增加deleteAlias插件配置 3 years ago
IPUMobileFunc a26be3fbc5 IPU标准版:整理指纹解锁 & 手势锁插件 3 years ago
IpuLib 3ac0b2e2a8 @liuql6 @移除zip以及动态插件部分代码、添加shownotification插件 3 years ago
SuperMenu 4a8676a7f9 @liuql6 @补充缺失的插件 3 years ago
display-center a26be3fbc5 IPU标准版:整理指纹解锁 & 手势锁插件 3 years ago
.gitignore 6bb7727bd0 忽略文件 9 years ago
IPUMobile.podspec 6069ed820b update podspec 5 years ago
README.md c3118ddcab ios-new仓库代码迁移 IPU秀 5 years ago

README.md

ios-share

IPU-iOS3.1版本开源代码