import {
arrow,
autoUpdate,
computePosition,
detectOverflow,
flip,
offset,
shift
} from "./chunk-JVHQO7TW.js";
import {
ElCollapseTransition,
ElOption,
ElOptionGroup,
ElSelect,
ElText,
ElTree,
ElTreeSelect,
NODE_INSTANCE_INJECTION_KEY,
ROOT_TREE_INJECTION_KEY,
TREE_NODE_MAP_INJECTION_KEY,
animateScrollTo,
getScrollBarWidth,
getScrollContainer,
getScrollElement,
getScrollTop,
scrollIntoView,
selectEmits,
selectGroupKey,
selectKey,
selectProps,
textProps,
treeEmits
} from "./chunk-TZNJWHO5.js";
import {
ElProgress,
ElUpload,
genFileId,
progressProps,
uploadBaseProps,
uploadContentProps,
uploadContextKey,
uploadDraggerEmits,
uploadDraggerProps,
uploadListEmits,
uploadListProps,
uploadListTypes,
uploadProps
} from "./chunk-KGN7MWY2.js";
import {
ElRadio,
ElRadioButton,
ElRadioGroup,
radioButtonProps,
radioDefaultProps,
radioEmits,
radioGroupEmits,
radioGroupKey,
radioGroupProps,
radioProps,
radioPropsBase
} from "./chunk-SE2XFLE7.js";
import {
AUTO_ALIGNMENT,
BACKWARD,
CENTERED_ALIGNMENT,
DEFAULT_DYNAMIC_LIST_ITEM_SIZE,
DynamicSizeList,
END_ALIGNMENT,
ElSelectV2,
FORWARD,
FixedSizeList,
ITEM_RENDER_EVT,
RTL,
RTL_OFFSET_NAG,
RTL_OFFSET_POS_ASC,
RTL_OFFSET_POS_DESC,
SCROLL_EVT,
SMART_ALIGNMENT,
START_ALIGNMENT,
ScrollBar,
getRTLOffsetType,
getScrollDir,
isRTL,
selectV2InjectionKey,
useCache,
useWheel,
virtualizedGridProps,
virtualizedListProps,
virtualizedProps,
virtualizedScrollbarProps
} from "./chunk-D4Z6ZKNZ.js";
import {
BORDER_HORIZONTAL_WIDTH,
ElTag,
MINIMUM_INPUT_WIDTH,
cAF,
capitalize,
rAF,
tagEmits,
tagProps,
useCalcInputWidth
} from "./chunk-LZ2AJP2V.js";
import {
ElSpace,
spaceItemProps,
spaceProps,
useSpace
} from "./chunk-L2H4UQBX.js";
import {
PatchFlags,
flattedChildren,
getNormalizedProps
} from "./chunk-57H52JND.js";
import {
ElSwitch,
isValidComponentSize,
switchEmits,
switchProps
} from "./chunk-D6CONENK.js";
import {
ElDivider,
dividerProps
} from "./chunk-SHVY6NQV.js";
import {
ElInputNumber,
inputNumberEmits,
inputNumberProps
} from "./chunk-QTR36KE6.js";
import {
ElCheckbox,
ElCheckboxButton,
ElCheckboxGroup,
checkboxDefaultProps,
checkboxEmits,
checkboxGroupContextKey,
checkboxGroupEmits,
checkboxGroupProps,
checkboxProps
} from "./chunk-IOI5IEYC.js";
import {
ElDatePicker,
ElDatePickerPanel,
ROOT_PICKER_INJECTION_KEY,
ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY,
datePickerPanelProps,
datePickerProps,
require_localeData
} from "./chunk-I2FLD7DU.js";
import {
CommonPicker,
DEFAULT_FORMATS_DATE,
DEFAULT_FORMATS_DATEPICKER,
DEFAULT_FORMATS_TIME,
ElTimePicker,
PICKER_BASE_INJECTION_KEY,
PICKER_POPPER_OPTIONS_INJECTION_KEY,
ROOT_COMMON_PICKER_INJECTION_KEY,
TimePickPanel,
buildTimeList,
dateEquals,
dayOrDaysToDate,
extractDateFormat,
extractTimeFormat,
formatter,
makeList,
parseDate,
rangeArr,
require_customParseFormat,
timePickerDefaultProps,
timePickerRangeTriggerProps,
timePickerRngeTriggerProps,
timeUnits,
valueEquals
} from "./chunk-FCRAESCL.js";
import {
ElScrollbar,
scrollbarContextKey,
scrollbarEmits,
scrollbarProps,
thumbProps
} from "./chunk-SY5SN5AU.js";
import {
ClickOutside
} from "./chunk-SSCO4CCM.js";
import {
BAR_MAP,
Ee,
Effect,
ElFocusTrap,
ElPopper,
ElPopperArrow,
ElPopperContent,
ElPopperTrigger,
ElTeleport,
ElTooltip,
FOCUS_TRAP_INJECTION_KEY,
FORWARD_REF_INJECTION_KEY,
GAP,
OnlyChild,
POPPER_CONTENT_INJECTION_KEY,
POPPER_INJECTION_KEY,
TOOLTIP_INJECTION_KEY,
castArray,
createModelToggleComposable,
popperArrowProps,
popperContentEmits,
popperContentProps,
popperCoreConfigProps,
popperProps,
popperTriggerProps,
renderThumbStyle,
roleTypes,
teleportProps,
tooltipEmits,
unique,
useDelayedToggle,
useDelayedToggleProps,
useEscapeKeydown,
useForwardRef,
useForwardRefDirective,
useModelToggle,
useModelToggleEmits,
useModelToggleProps,
usePopper,
usePopperArrowProps,
usePopperContainer,
usePopperContainerId,
usePopperContentEmits,
usePopperContentProps,
usePopperCoreConfigProps,
usePopperProps,
usePopperTriggerProps,
useTimeout,
useTooltipContentProps,
useTooltipModelToggle,
useTooltipModelToggleEmits,
useTooltipModelToggleProps,
useTooltipProps,
useTooltipTriggerProps
} from "./chunk-7F6Y7TML.js";
import {
WEEK_DAYS,
datePickTypes
} from "./chunk-RJD6ACU2.js";
import {
vRepeatClick
} from "./chunk-SMVFL2UA.js";
import {
EVENT_CODE,
composeEventHandlers,
getEventCode,
whenMouse
} from "./chunk-BUVJOKYK.js";
import {
ElInput,
inputEmits,
inputProps,
useAttrs as useAttrs2,
useCursor
} from "./chunk-G7ZFAANB.js";
import {
focusElement,
focusNode,
getSibling,
isAndroid,
isFirefox,
isLeaf,
obtainAllFocusableElements,
triggerEvent,
useComposition,
useFocusController
} from "./chunk-6KKRONM6.js";
import {
mutable
} from "./chunk-VJPYMOVT.js";
import {
ElButton,
ElButtonGroup,
buttonEmits,
buttonGroupContextKey,
buttonNativeTypes,
buttonProps,
buttonTypes,
configProviderContextKey,
provideGlobalConfig,
useGlobalComponentSettings,
useGlobalConfig
} from "./chunk-DXOVFSWI.js";
import {
DEFAULT_EMPTY_VALUES,
DEFAULT_VALUE_ON_CLEAR,
SCOPE,
ZINDEX_INJECTION_KEY,
defaultInitialZIndex,
emptyValuesContextKey,
useEmptyValues,
useEmptyValuesProps,
useZIndex,
zIndexContextKey
} from "./chunk-22HKH5YS.js";
import {
buildLocaleContext,
buildTranslator,
localeContextKey,
translate,
useLocale
} from "./chunk-APPTXKCZ.js";
import "./chunk-I27RJOCH.js";
import {
CloseComponents,
TypeComponents,
TypeComponentsMap,
ValidateComponentsMap,
iconPropType
} from "./chunk-R665FMDM.js";
import {
ElIcon,
addClass,
addUnit,
getProp,
getStyle,
hasClass,
iconProps,
keysOf,
removeClass,
setStyle
} from "./chunk-3DJYPQW6.js";
import {
CHANGE_EVENT,
INPUT_EVENT,
UPDATE_MODEL_EVENT,
ariaProps,
useAriaProps
} from "./chunk-6VHTGKN7.js";
import {
useDeprecated
} from "./chunk-HYWPQNOB.js";
import {
ID_INJECTION_KEY,
useFormItem,
useFormItemInputId,
useId,
useIdInjection
} from "./chunk-DIGHH22S.js";
import {
SIZE_INJECTION_KEY,
clamp,
computedEager,
formContextKey,
formItemContextKey,
isClient,
onClickOutside,
reactiveComputed,
refDebounced,
unrefElement,
useActiveElement,
useCssVar,
useDebounceFn,
useDisabled,
useDocumentVisibility,
useElementBounding,
useElementSize,
useEventListener,
useFormDisabled,
useFormSize,
useGlobalSize,
useIntersectionObserver,
useMutationObserver,
useProp,
useResizeObserver,
useSize,
useSizeProp,
useSizeProps,
useThrottleFn,
useTimeoutFn,
useVModel,
useWindowFocus,
useWindowSize
} from "./chunk-FYPMSKES.js";
import {
componentSizeMap,
componentSizes,
debugWarn,
isBoolean,
isElement,
isEmpty,
isNumber,
isPropAbsent,
isUndefined,
isWindow,
throwError
} from "./chunk-UFIWN4M6.js";
import {
_export_sfc
} from "./chunk-MUJDDH7P.js";
import {
buildProps,
castArray_default,
clamp_default,
cloneDeep_default,
clone_default,
debounce_default,
defaultNamespace,
definePropType,
flatMap_default,
flattenDeep_default,
fromPairs_default,
get_default,
isEqual_default,
isNil_default,
isNull_default,
merge_default,
namespaceContextKey,
omit_default,
pick_default,
throttle_default,
useGetDerivedNamespace,
useNamespace,
withInstall,
withInstallDirective,
withInstallFunction,
withNoopInstall
} from "./chunk-R2OGZABH.js";
import {
require_dayjs_min
} from "./chunk-YYGDCKLY.js";
import {
TinyColor
} from "./chunk-VK2ZSTB7.js";
import {
arrow_down_default,
arrow_left_default,
arrow_right_default,
arrow_up_default,
back_default,
caret_right_default,
caret_top_default,
check_default,
circle_check_filled_default,
circle_close_default,
circle_close_filled_default,
clock_default,
close_default,
d_arrow_left_default,
d_arrow_right_default,
full_screen_default,
info_filled_default,
loading_default,
more_default,
more_filled_default,
picture_filled_default,
plus_default,
question_filled_default,
refresh_left_default,
refresh_right_default,
scale_to_original_default,
search_default,
sort_down_default,
sort_up_default,
star_default,
star_filled_default,
warning_filled_default,
zoom_in_default,
zoom_out_default
} from "./chunk-3C23FNYW.js";
import "./chunk-4CSS7JW7.js";
import "./chunk-VAL2CHZC.js";
import {
Comment,
Fragment,
Teleport,
Transition,
TransitionGroup,
computed,
createApp,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
createSlots,
createTextVNode,
createVNode,
defineComponent,
effectScope,
getCurrentInstance,
guardReactiveProps,
h,
inject,
isRef,
isVNode,
markRaw,
mergeProps,
nextTick,
onActivated,
onBeforeMount,
onBeforeUnmount,
onBeforeUpdate,
onMounted,
onScopeDispose,
onUnmounted,
onUpdated,
openBlock,
provide,
reactive,
readonly,
ref,
render,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
shallowReactive,
shallowRef,
toRef,
toRefs,
triggerRef,
unref,
useAttrs,
useSlots,
vModelText,
vShow,
watch,
watchEffect,
withCtx,
withDirectives,
withKeys,
withModifiers
} from "./chunk-AAHVYXXY.js";
import {
NOOP,
hasOwn,
hyphenate,
init_shared_esm_bundler,
isArray,
isDate,
isFunction,
isObject,
isPromise,
isString,
normalizeClass,
normalizeProps,
normalizeStyle,
toDisplayString
} from "./chunk-OWZYVOTZ.js";
import {
__toESM
} from "./chunk-V4OQ3NZ2.js";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/version.mjs
var version = "2.11.7";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/constants/key.mjs
var INSTALLED_KEY = Symbol("INSTALLED_KEY");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/make-installer.mjs
var makeInstaller = (components = []) => {
const install2 = (app, options) => {
if (app[INSTALLED_KEY])
return;
app[INSTALLED_KEY] = true;
components.forEach((c2) => app.use(c2));
if (options)
provideGlobalConfig(options, app, true);
};
return {
version,
install: install2
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/affix/src/affix.mjs
var affixProps = buildProps({
zIndex: {
type: definePropType([Number, String]),
default: 100
},
target: {
type: String,
default: ""
},
offset: {
type: Number,
default: 0
},
position: {
type: String,
values: ["top", "bottom"],
default: "top"
}
});
var affixEmits = {
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/affix/src/affix2.mjs
var COMPONENT_NAME = "ElAffix";
var __default__ = defineComponent({
name: COMPONENT_NAME
});
var _sfc_main = defineComponent({
...__default__,
props: affixProps,
emits: affixEmits,
setup(__props, { expose, emit }) {
const props = __props;
const ns = useNamespace("affix");
const target2 = shallowRef();
const root = shallowRef();
const scrollContainer = shallowRef();
const { height: windowHeight } = useWindowSize();
const {
height: rootHeight,
width: rootWidth,
top: rootTop,
bottom: rootBottom,
update: updateRoot
} = useElementBounding(root, { windowScroll: false });
const targetRect = useElementBounding(target2);
const fixed = ref(false);
const scrollTop = ref(0);
const transform = ref(0);
const rootStyle = computed(() => {
return {
height: fixed.value ? `${rootHeight.value}px` : "",
width: fixed.value ? `${rootWidth.value}px` : ""
};
});
const affixStyle = computed(() => {
if (!fixed.value)
return {};
const offset2 = props.offset ? addUnit(props.offset) : 0;
return {
height: `${rootHeight.value}px`,
width: `${rootWidth.value}px`,
top: props.position === "top" ? offset2 : "",
bottom: props.position === "bottom" ? offset2 : "",
transform: transform.value ? `translateY(${transform.value}px)` : "",
zIndex: props.zIndex
};
});
const update = () => {
if (!scrollContainer.value)
return;
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
const { position, target: target22, offset: offset2 } = props;
const rootHeightOffset = offset2 + rootHeight.value;
if (position === "top") {
if (target22) {
const difference = targetRect.bottom.value - rootHeightOffset;
fixed.value = offset2 > rootTop.value && targetRect.bottom.value > 0;
transform.value = difference < 0 ? difference : 0;
} else {
fixed.value = offset2 > rootTop.value;
}
} else if (target22) {
const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
fixed.value = windowHeight.value - offset2 < rootBottom.value && windowHeight.value > targetRect.top.value;
transform.value = difference < 0 ? -difference : 0;
} else {
fixed.value = windowHeight.value - offset2 < rootBottom.value;
}
};
const updateRootRect = async () => {
if (!fixed.value) {
updateRoot();
return;
}
fixed.value = false;
await nextTick();
updateRoot();
fixed.value = true;
};
const handleScroll2 = async () => {
updateRoot();
await nextTick();
emit("scroll", {
scrollTop: scrollTop.value,
fixed: fixed.value
});
};
watch(fixed, (val) => emit(CHANGE_EVENT, val));
onMounted(() => {
var _a;
if (props.target) {
target2.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
if (!target2.value)
throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`);
} else {
target2.value = document.documentElement;
}
scrollContainer.value = getScrollContainer(root.value, true);
updateRoot();
});
useEventListener(scrollContainer, "scroll", handleScroll2);
watchEffect(update);
expose({
update,
updateRoot: updateRootRect
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "root",
ref: root,
class: normalizeClass(unref(ns).b()),
style: normalizeStyle(unref(rootStyle))
}, [
createBaseVNode("div", {
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
style: normalizeStyle(unref(affixStyle))
}, [
renderSlot(_ctx.$slots, "default")
], 6)
], 6);
};
}
});
var Affix = _export_sfc(_sfc_main, [["__file", "affix.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/affix/index.mjs
var ElAffix = withInstall(Affix);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/alert/src/alert2.mjs
var alertEffects = ["light", "dark"];
var alertProps = buildProps({
title: {
type: String,
default: ""
},
description: {
type: String,
default: ""
},
type: {
type: String,
values: keysOf(TypeComponentsMap),
default: "info"
},
closable: {
type: Boolean,
default: true
},
closeText: {
type: String,
default: ""
},
showIcon: Boolean,
center: Boolean,
effect: {
type: String,
values: alertEffects,
default: "light"
},
...useDelayedToggleProps,
showAfter: Number
});
var alertEmits = {
open: () => true,
close: (evt) => isUndefined(evt) || evt instanceof Event
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/alert/src/alert.mjs
var __default__2 = defineComponent({
name: "ElAlert"
});
var _sfc_main2 = defineComponent({
...__default__2,
props: alertProps,
emits: alertEmits,
setup(__props, { emit }) {
const props = __props;
const { Close } = TypeComponents;
const slots = useSlots();
const ns = useNamespace("alert");
const visible = ref(isUndefined(props.showAfter));
const iconComponent = computed(() => TypeComponentsMap[props.type]);
const hasDesc = computed(() => !!(props.description || slots.default));
const open = () => {
visible.value = true;
emit("open");
};
const close2 = (event) => {
visible.value = false;
emit("close", event);
};
const { onOpen, onClose } = useDelayedToggle({
showAfter: toRef(props, "showAfter", 0),
hideAfter: toRef(props, "hideAfter"),
autoClose: toRef(props, "autoClose"),
open,
close: close2
});
if (isClient) {
onOpen();
}
return (_ctx, _cache) => {
return openBlock(), createBlock(Transition, {
name: unref(ns).b("fade"),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
role: "alert"
}, [
_ctx.showIcon && (_ctx.$slots.icon || unref(iconComponent)) ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", unref(hasDesc))])
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "icon", {}, () => [
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
])
]),
_: 3
}, 8, ["class"])) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("content"))
}, [
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass([unref(ns).e("title"), { "with-description": unref(hasDesc) }])
}, [
renderSlot(_ctx.$slots, "title", {}, () => [
createTextVNode(toDisplayString(_ctx.title), 1)
])
], 2)) : createCommentVNode("v-if", true),
unref(hasDesc) ? (openBlock(), createElementBlock("p", {
key: 1,
class: normalizeClass(unref(ns).e("description"))
}, [
renderSlot(_ctx.$slots, "default", {}, () => [
createTextVNode(toDisplayString(_ctx.description), 1)
])
], 2)) : createCommentVNode("v-if", true),
_ctx.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
_ctx.closeText ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
onClick: close2
}, toDisplayString(_ctx.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
key: 1,
class: normalizeClass(unref(ns).e("close-btn")),
onClick: unref(onClose)
}, {
default: withCtx(() => [
createVNode(unref(Close))
]),
_: 1
}, 8, ["class", "onClick"]))
], 64)) : createCommentVNode("v-if", true)
], 2)
], 2), [
[vShow, visible.value]
])
]),
_: 3
}, 8, ["name"]);
};
}
});
var Alert = _export_sfc(_sfc_main2, [["__file", "alert.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/alert/index.mjs
var ElAlert = withInstall(Alert);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/autocomplete/src/autocomplete2.mjs
init_shared_esm_bundler();
var autocompleteProps = buildProps({
...inputProps,
valueKey: {
type: String,
default: "value"
},
modelValue: {
type: [String, Number],
default: ""
},
debounce: {
type: Number,
default: 300
},
placement: {
type: definePropType(String),
values: [
"top",
"top-start",
"top-end",
"bottom",
"bottom-start",
"bottom-end"
],
default: "bottom-start"
},
fetchSuggestions: {
type: definePropType([Function, Array]),
default: NOOP
},
popperClass: useTooltipContentProps.popperClass,
popperStyle: useTooltipContentProps.popperStyle,
triggerOnFocus: {
type: Boolean,
default: true
},
selectWhenUnmatched: Boolean,
hideLoading: Boolean,
teleported: useTooltipContentProps.teleported,
appendTo: useTooltipContentProps.appendTo,
highlightFirstItem: Boolean,
fitInputWidth: Boolean,
loopNavigation: {
type: Boolean,
default: true
}
});
var autocompleteEmits = {
[UPDATE_MODEL_EVENT]: (value) => isString(value) || isNumber(value),
[INPUT_EVENT]: (value) => isString(value) || isNumber(value),
[CHANGE_EVENT]: (value) => isString(value) || isNumber(value),
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent,
clear: () => true,
select: (item) => isObject(item)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs
init_shared_esm_bundler();
var COMPONENT_NAME2 = "ElAutocomplete";
var __default__3 = defineComponent({
name: COMPONENT_NAME2,
inheritAttrs: false
});
var _sfc_main3 = defineComponent({
...__default__3,
props: autocompleteProps,
emits: autocompleteEmits,
setup(__props, { expose, emit }) {
const props = __props;
const passInputProps = computed(() => pick_default(props, Object.keys(inputProps)));
const rawAttrs = useAttrs();
const disabled = useFormDisabled();
const ns = useNamespace("autocomplete");
const inputRef = ref();
const regionRef = ref();
const popperRef = ref();
const listboxRef = ref();
let readonly2 = false;
let ignoreFocusEvent = false;
const suggestions = ref([]);
const highlightedIndex = ref(-1);
const dropdownWidth = ref("");
const activated = ref(false);
const suggestionDisabled = ref(false);
const loading = ref(false);
const listboxId = useId();
const styles = computed(() => rawAttrs.style);
const suggestionVisible = computed(() => {
const isValidData = suggestions.value.length > 0;
return (isValidData || loading.value) && activated.value;
});
const suggestionLoading = computed(() => !props.hideLoading && loading.value);
const refInput = computed(() => {
if (inputRef.value) {
return Array.from(inputRef.value.$el.querySelectorAll("input"));
}
return [];
});
const onSuggestionShow = () => {
if (suggestionVisible.value) {
dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
}
};
const onHide = () => {
highlightedIndex.value = -1;
};
const getData = async (queryString) => {
if (suggestionDisabled.value)
return;
const cb = (suggestionList) => {
loading.value = false;
if (suggestionDisabled.value)
return;
if (isArray(suggestionList)) {
suggestions.value = suggestionList;
highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
} else {
throwError(COMPONENT_NAME2, "autocomplete suggestions must be an array");
}
};
loading.value = true;
if (isArray(props.fetchSuggestions)) {
cb(props.fetchSuggestions);
} else {
const result = await props.fetchSuggestions(queryString, cb);
if (isArray(result))
cb(result);
}
};
const debounce = computed(() => props.debounce);
const debouncedGetData = useDebounceFn(getData, debounce);
const handleInput = (value) => {
const valuePresented = !!value;
emit(INPUT_EVENT, value);
emit(UPDATE_MODEL_EVENT, value);
suggestionDisabled.value = false;
activated.value || (activated.value = valuePresented);
if (!props.triggerOnFocus && !value) {
suggestionDisabled.value = true;
suggestions.value = [];
return;
}
debouncedGetData(value);
};
const handleMouseDown = (event) => {
var _a;
if (disabled.value)
return;
if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
activated.value = true;
}
};
const handleChange = (value) => {
emit(CHANGE_EVENT, value);
};
const handleFocus = (evt) => {
var _a;
if (!ignoreFocusEvent) {
activated.value = true;
emit("focus", evt);
const queryString = (_a = props.modelValue) != null ? _a : "";
if (props.triggerOnFocus && !readonly2) {
debouncedGetData(String(queryString));
}
} else {
ignoreFocusEvent = false;
}
};
const handleBlur = (evt) => {
setTimeout(() => {
var _a;
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent()) {
ignoreFocusEvent = true;
return;
}
activated.value && close2();
emit("blur", evt);
});
};
const handleClear = () => {
activated.value = false;
emit(UPDATE_MODEL_EVENT, "");
emit("clear");
};
const handleKeyEnter = async () => {
var _a;
if ((_a = inputRef.value) == null ? void 0 : _a.isComposing) {
return;
}
if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) {
handleSelect(suggestions.value[highlightedIndex.value]);
} else {
if (props.selectWhenUnmatched) {
emit("select", { value: props.modelValue });
suggestions.value = [];
highlightedIndex.value = -1;
}
activated.value = true;
debouncedGetData(String(props.modelValue));
}
};
const handleKeyEscape = (evt) => {
if (suggestionVisible.value) {
evt.preventDefault();
evt.stopPropagation();
close2();
}
};
const close2 = () => {
activated.value = false;
};
const focus = () => {
var _a;
(_a = inputRef.value) == null ? void 0 : _a.focus();
};
const blur = () => {
var _a;
(_a = inputRef.value) == null ? void 0 : _a.blur();
};
const handleSelect = async (item) => {
emit(INPUT_EVENT, item[props.valueKey]);
emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
emit("select", item);
suggestions.value = [];
highlightedIndex.value = -1;
};
const highlight = (index) => {
var _a, _b;
if (!suggestionVisible.value || loading.value)
return;
if (index < 0) {
if (!props.loopNavigation) {
highlightedIndex.value = -1;
return;
}
index = suggestions.value.length - 1;
}
if (index >= suggestions.value.length) {
index = props.loopNavigation ? 0 : suggestions.value.length - 1;
}
const [suggestion, suggestionList] = getSuggestionContext();
const highlightItem = suggestionList[index];
const scrollTop = suggestion.scrollTop;
const { offsetTop, scrollHeight } = highlightItem;
if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) {
suggestion.scrollTop = offsetTop + scrollHeight - suggestion.clientHeight;
}
if (offsetTop < scrollTop) {
suggestion.scrollTop = offsetTop;
}
highlightedIndex.value = index;
(_b = (_a = inputRef.value) == null ? void 0 : _a.ref) == null ? void 0 : _b.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
};
const getSuggestionContext = () => {
const suggestion = regionRef.value.querySelector(`.${ns.be("suggestion", "wrap")}`);
const suggestionList = suggestion.querySelectorAll(`.${ns.be("suggestion", "list")} li`);
return [suggestion, suggestionList];
};
const stopHandle = onClickOutside(listboxRef, () => {
var _a;
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent())
return;
suggestionVisible.value && close2();
});
const handleKeydown = (e) => {
const code = getEventCode(e);
switch (code) {
case EVENT_CODE.up:
e.preventDefault();
highlight(highlightedIndex.value - 1);
break;
case EVENT_CODE.down:
e.preventDefault();
highlight(highlightedIndex.value + 1);
break;
case EVENT_CODE.enter:
e.preventDefault();
handleKeyEnter();
break;
case EVENT_CODE.tab:
close2();
break;
case EVENT_CODE.esc:
handleKeyEscape(e);
break;
case EVENT_CODE.home:
e.preventDefault();
highlight(0);
break;
case EVENT_CODE.end:
e.preventDefault();
highlight(suggestions.value.length - 1);
break;
case EVENT_CODE.pageUp:
e.preventDefault();
highlight(Math.max(0, highlightedIndex.value - 10));
break;
case EVENT_CODE.pageDown:
e.preventDefault();
highlight(Math.min(suggestions.value.length - 1, highlightedIndex.value + 10));
break;
}
};
onBeforeUnmount(() => {
stopHandle == null ? void 0 : stopHandle();
});
onMounted(() => {
var _a;
const inputElement = (_a = inputRef.value) == null ? void 0 : _a.ref;
if (!inputElement)
return;
[
{ key: "role", value: "textbox" },
{ key: "aria-autocomplete", value: "list" },
{ key: "aria-controls", value: "id" },
{
key: "aria-activedescendant",
value: `${listboxId.value}-item-${highlightedIndex.value}`
}
].forEach(({ key, value }) => inputElement.setAttribute(key, value));
readonly2 = inputElement.hasAttribute("readonly");
});
expose({
highlightedIndex,
activated,
loading,
inputRef,
popperRef,
suggestions,
handleSelect,
handleKeyEnter,
focus,
blur,
close: close2,
highlight,
getData
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTooltip), {
ref_key: "popperRef",
ref: popperRef,
visible: unref(suggestionVisible),
placement: _ctx.placement,
"fallback-placements": ["bottom-start", "top-start"],
"popper-class": [unref(ns).e("popper"), _ctx.popperClass],
"popper-style": _ctx.popperStyle,
teleported: _ctx.teleported,
"append-to": _ctx.appendTo,
"gpu-acceleration": false,
pure: "",
"manual-mode": "",
effect: "light",
trigger: "click",
transition: `${unref(ns).namespace.value}-zoom-in-top`,
persistent: "",
role: "listbox",
onBeforeShow: onSuggestionShow,
onHide
}, {
content: withCtx(() => [
createBaseVNode("div", {
ref_key: "regionRef",
ref: regionRef,
class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", unref(suggestionLoading))]),
style: normalizeStyle({
[_ctx.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
outline: "none"
}),
role: "region"
}, [
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).be("suggestion", "header")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(_ctx.$slots, "header")
], 10, ["onClick"])) : createCommentVNode("v-if", true),
createVNode(unref(ElScrollbar), {
id: unref(listboxId),
tag: "ul",
"wrap-class": unref(ns).be("suggestion", "wrap"),
"view-class": unref(ns).be("suggestion", "list"),
role: "listbox"
}, {
default: withCtx(() => [
unref(suggestionLoading) ? (openBlock(), createElementBlock("li", { key: 0 }, [
renderSlot(_ctx.$slots, "loading", {}, () => [
createVNode(unref(ElIcon), {
class: normalizeClass(unref(ns).is("loading"))
}, {
default: withCtx(() => [
createVNode(unref(loading_default))
]),
_: 1
}, 8, ["class"])
])
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
return openBlock(), createElementBlock("li", {
id: `${unref(listboxId)}-item-${index}`,
key: index,
class: normalizeClass({ highlighted: highlightedIndex.value === index }),
role: "option",
"aria-selected": highlightedIndex.value === index,
onClick: ($event) => handleSelect(item)
}, [
renderSlot(_ctx.$slots, "default", { item }, () => [
createTextVNode(toDisplayString(item[_ctx.valueKey]), 1)
])
], 10, ["id", "aria-selected", "onClick"]);
}), 128))
]),
_: 3
}, 8, ["id", "wrap-class", "view-class"]),
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).be("suggestion", "footer")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(_ctx.$slots, "footer")
], 10, ["onClick"])) : createCommentVNode("v-if", true)
], 6)
]),
default: withCtx(() => [
createBaseVNode("div", {
ref_key: "listboxRef",
ref: listboxRef,
class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]),
style: normalizeStyle(unref(styles)),
role: "combobox",
"aria-haspopup": "listbox",
"aria-expanded": unref(suggestionVisible),
"aria-owns": unref(listboxId)
}, [
createVNode(unref(ElInput), mergeProps({
ref_key: "inputRef",
ref: inputRef
}, mergeProps(unref(passInputProps), _ctx.$attrs), {
"model-value": _ctx.modelValue,
disabled: unref(disabled),
onInput: handleInput,
onChange: handleChange,
onFocus: handleFocus,
onBlur: handleBlur,
onClear: handleClear,
onKeydown: handleKeydown,
onMousedown: handleMouseDown
}), createSlots({
_: 2
}, [
_ctx.$slots.prepend ? {
name: "prepend",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "prepend")
])
} : void 0,
_ctx.$slots.append ? {
name: "append",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "append")
])
} : void 0,
_ctx.$slots.prefix ? {
name: "prefix",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "prefix")
])
} : void 0,
_ctx.$slots.suffix ? {
name: "suffix",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "suffix")
])
} : void 0
]), 1040, ["model-value", "disabled"])
], 14, ["aria-expanded", "aria-owns"])
]),
_: 3
}, 8, ["visible", "placement", "popper-class", "popper-style", "teleported", "append-to", "transition"]);
};
}
});
var Autocomplete = _export_sfc(_sfc_main3, [["__file", "autocomplete.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/autocomplete/index.mjs
var ElAutocomplete = withInstall(Autocomplete);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/avatar/src/avatar.mjs
var avatarProps = buildProps({
size: {
type: [Number, String],
values: componentSizes,
default: "",
validator: (val) => isNumber(val)
},
shape: {
type: String,
values: ["circle", "square"],
default: "circle"
},
icon: {
type: iconPropType
},
src: {
type: String,
default: ""
},
alt: String,
srcSet: String,
fit: {
type: definePropType(String),
default: "cover"
}
});
var avatarEmits = {
error: (evt) => evt instanceof Event
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/avatar/src/avatar2.mjs
init_shared_esm_bundler();
var __default__4 = defineComponent({
name: "ElAvatar"
});
var _sfc_main4 = defineComponent({
...__default__4,
props: avatarProps,
emits: avatarEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("avatar");
const hasLoadError = ref(false);
const avatarClass = computed(() => {
const { size, icon, shape } = props;
const classList = [ns.b()];
if (isString(size))
classList.push(ns.m(size));
if (icon)
classList.push(ns.m("icon"));
if (shape)
classList.push(ns.m(shape));
return classList;
});
const sizeStyle = computed(() => {
const { size } = props;
return isNumber(size) ? ns.cssVarBlock({
size: addUnit(size) || ""
}) : void 0;
});
const fitStyle = computed(() => ({
objectFit: props.fit
}));
watch(() => props.src, () => hasLoadError.value = false);
function handleError(e) {
hasLoadError.value = true;
emit("error", e);
}
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", {
class: normalizeClass(unref(avatarClass)),
style: normalizeStyle(unref(sizeStyle))
}, [
(_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
key: 0,
src: _ctx.src,
alt: _ctx.alt,
srcset: _ctx.srcSet,
style: normalizeStyle(unref(fitStyle)),
onError: handleError
}, null, 44, ["src", "alt", "srcset"])) : _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
})) : renderSlot(_ctx.$slots, "default", { key: 2 })
], 6);
};
}
});
var Avatar = _export_sfc(_sfc_main4, [["__file", "avatar.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/avatar/index.mjs
var ElAvatar = withInstall(Avatar);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/backtop/src/backtop.mjs
var backtopProps = {
visibilityHeight: {
type: Number,
default: 200
},
target: {
type: String,
default: ""
},
right: {
type: Number,
default: 40
},
bottom: {
type: Number,
default: 40
}
};
var backtopEmits = {
click: (evt) => evt instanceof MouseEvent
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/backtop/src/use-backtop.mjs
var useBackTop = (props, emit, componentName2) => {
const el = shallowRef();
const container = shallowRef();
const visible = ref(false);
const handleScroll2 = () => {
if (el.value)
visible.value = el.value.scrollTop >= props.visibilityHeight;
};
const handleClick = (event) => {
var _a;
(_a = el.value) == null ? void 0 : _a.scrollTo({ top: 0, behavior: "smooth" });
emit("click", event);
};
const handleScrollThrottled = useThrottleFn(handleScroll2, 300, true);
useEventListener(container, "scroll", handleScrollThrottled);
onMounted(() => {
var _a;
container.value = document;
el.value = document.documentElement;
if (props.target) {
el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
if (!el.value) {
throwError(componentName2, `target does not exist: ${props.target}`);
}
container.value = el.value;
}
handleScroll2();
});
return {
visible,
handleClick
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/backtop/src/backtop2.mjs
var COMPONENT_NAME3 = "ElBacktop";
var __default__5 = defineComponent({
name: COMPONENT_NAME3
});
var _sfc_main5 = defineComponent({
...__default__5,
props: backtopProps,
emits: backtopEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("backtop");
const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME3);
const backTopStyle = computed(() => ({
right: `${props.right}px`,
bottom: `${props.bottom}px`
}));
return (_ctx, _cache) => {
return openBlock(), createBlock(Transition, {
name: `${unref(ns).namespace.value}-fade-in`
}, {
default: withCtx(() => [
unref(visible) ? (openBlock(), createElementBlock("div", {
key: 0,
style: normalizeStyle(unref(backTopStyle)),
class: normalizeClass(unref(ns).b()),
onClick: withModifiers(unref(handleClick), ["stop"])
}, [
renderSlot(_ctx.$slots, "default", {}, () => [
createVNode(unref(ElIcon), {
class: normalizeClass(unref(ns).e("icon"))
}, {
default: withCtx(() => [
createVNode(unref(caret_top_default))
]),
_: 1
}, 8, ["class"])
])
], 14, ["onClick"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"]);
};
}
});
var Backtop = _export_sfc(_sfc_main5, [["__file", "backtop.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/backtop/index.mjs
var ElBacktop = withInstall(Backtop);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/badge/src/badge.mjs
var badgeProps = buildProps({
value: {
type: [String, Number],
default: ""
},
max: {
type: Number,
default: 99
},
isDot: Boolean,
hidden: Boolean,
type: {
type: String,
values: ["primary", "success", "warning", "info", "danger"],
default: "danger"
},
showZero: {
type: Boolean,
default: true
},
color: String,
badgeStyle: {
type: definePropType([String, Object, Array])
},
offset: {
type: definePropType(Array),
default: [0, 0]
},
badgeClass: {
type: String
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/badge/src/badge2.mjs
var __default__6 = defineComponent({
name: "ElBadge"
});
var _sfc_main6 = defineComponent({
...__default__6,
props: badgeProps,
setup(__props, { expose }) {
const props = __props;
const ns = useNamespace("badge");
const content = computed(() => {
if (props.isDot)
return "";
if (isNumber(props.value) && isNumber(props.max)) {
return props.max < props.value ? `${props.max}+` : `${props.value}`;
}
return `${props.value}`;
});
const style = computed(() => {
var _a, _b, _c, _d, _e;
return [
{
backgroundColor: props.color,
marginRight: addUnit(-((_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : 0)),
marginTop: addUnit((_d = (_c = props.offset) == null ? void 0 : _c[1]) != null ? _d : 0)
},
(_e = props.badgeStyle) != null ? _e : {}
];
});
expose({
content
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).b())
}, [
renderSlot(_ctx.$slots, "default"),
createVNode(Transition, {
name: `${unref(ns).namespace.value}-zoom-in-center`,
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("sup", {
class: normalizeClass([
unref(ns).e("content"),
unref(ns).em("content", _ctx.type),
unref(ns).is("fixed", !!_ctx.$slots.default),
unref(ns).is("dot", _ctx.isDot),
unref(ns).is("hide-zero", !_ctx.showZero && _ctx.value === 0),
_ctx.badgeClass
]),
style: normalizeStyle(unref(style))
}, [
renderSlot(_ctx.$slots, "content", { value: unref(content) }, () => [
createTextVNode(toDisplayString(unref(content)), 1)
])
], 6), [
[vShow, !_ctx.hidden && (unref(content) || _ctx.isDot || _ctx.$slots.content)]
])
]),
_: 3
}, 8, ["name"])
], 2);
};
}
});
var Badge = _export_sfc(_sfc_main6, [["__file", "badge.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/badge/index.mjs
var ElBadge = withInstall(Badge);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/breadcrumb/src/constants.mjs
var breadcrumbKey = Symbol("breadcrumbKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/breadcrumb/src/breadcrumb2.mjs
var breadcrumbProps = buildProps({
separator: {
type: String,
default: "/"
},
separatorIcon: {
type: iconPropType
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.mjs
var __default__7 = defineComponent({
name: "ElBreadcrumb"
});
var _sfc_main7 = defineComponent({
...__default__7,
props: breadcrumbProps,
setup(__props) {
const props = __props;
const { t } = useLocale();
const ns = useNamespace("breadcrumb");
const breadcrumb = ref();
provide(breadcrumbKey, props);
onMounted(() => {
const items = breadcrumb.value.querySelectorAll(`.${ns.e("item")}`);
if (items.length) {
items[items.length - 1].setAttribute("aria-current", "page");
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "breadcrumb",
ref: breadcrumb,
class: normalizeClass(unref(ns).b()),
"aria-label": unref(t)("el.breadcrumb.label"),
role: "navigation"
}, [
renderSlot(_ctx.$slots, "default")
], 10, ["aria-label"]);
};
}
});
var Breadcrumb = _export_sfc(_sfc_main7, [["__file", "breadcrumb.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item.mjs
var breadcrumbItemProps = buildProps({
to: {
type: definePropType([String, Object]),
default: ""
},
replace: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item2.mjs
var __default__8 = defineComponent({
name: "ElBreadcrumbItem"
});
var _sfc_main8 = defineComponent({
...__default__8,
props: breadcrumbItemProps,
setup(__props) {
const props = __props;
const instance = getCurrentInstance();
const breadcrumbContext = inject(breadcrumbKey, void 0);
const ns = useNamespace("breadcrumb");
const router = instance.appContext.config.globalProperties.$router;
const link = ref();
const onClick = () => {
if (!props.to || !router)
return;
props.replace ? router.replace(props.to) : router.push(props.to);
};
return (_ctx, _cache) => {
var _a, _b;
return openBlock(), createElementBlock("span", {
class: normalizeClass(unref(ns).e("item"))
}, [
createBaseVNode("span", {
ref_key: "link",
ref: link,
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
role: "link",
onClick
}, [
renderSlot(_ctx.$slots, "default")
], 2),
((_a = unref(breadcrumbContext)) == null ? void 0 : _a.separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(ns).e("separator"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))
]),
_: 1
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
key: 1,
class: normalizeClass(unref(ns).e("separator")),
role: "presentation"
}, toDisplayString((_b = unref(breadcrumbContext)) == null ? void 0 : _b.separator), 3))
], 2);
};
}
});
var BreadcrumbItem = _export_sfc(_sfc_main8, [["__file", "breadcrumb-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/breadcrumb/index.mjs
var ElBreadcrumb = withInstall(Breadcrumb, {
BreadcrumbItem
});
var ElBreadcrumbItem = withNoopInstall(BreadcrumbItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/src/date-table.mjs
init_shared_esm_bundler();
var getPrevMonthLastDays = (date4, count) => {
const lastDay = date4.subtract(1, "month").endOf("month").date();
return rangeArr(count).map((_2, index) => lastDay - (count - index - 1));
};
var getMonthDays = (date4) => {
const days = date4.daysInMonth();
return rangeArr(days).map((_2, index) => index + 1);
};
var toNestedArr = (days) => rangeArr(days.length / 7).map((index) => {
const start = index * 7;
return days.slice(start, start + 7);
});
var dateTableProps = buildProps({
selectedDay: {
type: definePropType(Object)
},
range: {
type: definePropType(Array)
},
date: {
type: definePropType(Object),
required: true
},
hideHeader: {
type: Boolean
}
});
var dateTableEmits = {
pick: (value) => isObject(value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/src/use-date-table.mjs
var import_dayjs = __toESM(require_dayjs_min(), 1);
var import_localeData = __toESM(require_localeData(), 1);
var useDateTable = (props, emit) => {
import_dayjs.default.extend(import_localeData.default);
const firstDayOfWeek = import_dayjs.default.localeData().firstDayOfWeek();
const { t, lang } = useLocale();
const now = (0, import_dayjs.default)().locale(lang.value);
const isInRange = computed(() => !!props.range && !!props.range.length);
const rows = computed(() => {
let days = [];
if (isInRange.value) {
const [start, end] = props.range;
const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((index) => ({
text: start.date() + index,
type: "current"
}));
let remaining = currentMonthRange.length % 7;
remaining = remaining === 0 ? 0 : 7 - remaining;
const nextMonthRange = rangeArr(remaining).map((_2, index) => ({
text: index + 1,
type: "next"
}));
days = currentMonthRange.concat(nextMonthRange);
} else {
const firstDay = props.date.startOf("month").day();
const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
text: day,
type: "prev"
}));
const currentMonthDays = getMonthDays(props.date).map((day) => ({
text: day,
type: "current"
}));
days = [...prevMonthDays, ...currentMonthDays];
const remaining = 7 - (days.length % 7 || 7);
const nextMonthDays = rangeArr(remaining).map((_2, index) => ({
text: index + 1,
type: "next"
}));
days = days.concat(nextMonthDays);
}
return toNestedArr(days);
});
const weekDays = computed(() => {
const start = firstDayOfWeek;
if (start === 0) {
return WEEK_DAYS.map((_2) => t(`el.datepicker.weeks.${_2}`));
} else {
return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_2) => t(`el.datepicker.weeks.${_2}`));
}
});
const getFormattedDate = (day, type4) => {
switch (type4) {
case "prev":
return props.date.startOf("month").subtract(1, "month").date(day);
case "next":
return props.date.startOf("month").add(1, "month").date(day);
case "current":
return props.date.date(day);
}
};
const handlePickDay = ({ text, type: type4 }) => {
const date4 = getFormattedDate(text, type4);
emit("pick", date4);
};
const getSlotData = ({ text, type: type4 }) => {
const day = getFormattedDate(text, type4);
return {
isSelected: day.isSame(props.selectedDay),
type: `${type4}-month`,
day: day.format("YYYY-MM-DD"),
date: day.toDate()
};
};
return {
now,
isInRange,
rows,
weekDays,
getFormattedDate,
handlePickDay,
getSlotData
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/src/date-table2.mjs
var __default__9 = defineComponent({
name: "DateTable"
});
var _sfc_main9 = defineComponent({
...__default__9,
props: dateTableProps,
emits: dateTableEmits,
setup(__props, { expose, emit }) {
const props = __props;
const {
isInRange,
now,
rows,
weekDays,
getFormattedDate,
handlePickDay,
getSlotData
} = useDateTable(props, emit);
const nsTable = useNamespace("calendar-table");
const nsDay = useNamespace("calendar-day");
const getCellClass = ({ text, type: type4 }) => {
const classes = [type4];
if (type4 === "current") {
const date4 = getFormattedDate(text, type4);
if (date4.isSame(props.selectedDay, "day")) {
classes.push(nsDay.is("selected"));
}
if (date4.isSame(now, "day")) {
classes.push(nsDay.is("today"));
}
}
return classes;
};
expose({
getFormattedDate
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("table", {
class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]),
cellspacing: "0",
cellpadding: "0"
}, [
!_ctx.hideHeader ? (openBlock(), createElementBlock("thead", { key: 0 }, [
createBaseVNode("tr", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
return openBlock(), createElementBlock("th", {
key: day,
scope: "col"
}, toDisplayString(day), 1);
}), 128))
])
])) : createCommentVNode("v-if", true),
createBaseVNode("tbody", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, index) => {
return openBlock(), createElementBlock("tr", {
key: index,
class: normalizeClass({
[unref(nsTable).e("row")]: true,
[unref(nsTable).em("row", "hide-border")]: index === 0 && _ctx.hideHeader
})
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key) => {
return openBlock(), createElementBlock("td", {
key,
class: normalizeClass(getCellClass(cell)),
onClick: ($event) => unref(handlePickDay)(cell)
}, [
createBaseVNode("div", {
class: normalizeClass(unref(nsDay).b())
}, [
renderSlot(_ctx.$slots, "date-cell", {
data: unref(getSlotData)(cell)
}, () => [
createBaseVNode("span", null, toDisplayString(cell.text), 1)
])
], 2)
], 10, ["onClick"]);
}), 128))
], 2);
}), 128))
])
], 2);
};
}
});
var DateTable = _export_sfc(_sfc_main9, [["__file", "date-table.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/src/use-calendar.mjs
var import_dayjs2 = __toESM(require_dayjs_min(), 1);
init_shared_esm_bundler();
var adjacentMonth = (start, end) => {
const firstMonthLastDay = start.endOf("month");
const lastMonthFirstDay = end.startOf("month");
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
return [
[start, firstMonthLastDay],
[lastMonthStartDay.startOf("week"), end]
];
};
var threeConsecutiveMonth = (start, end) => {
const firstMonthLastDay = start.endOf("month");
const secondMonthFirstDay = start.add(1, "month").startOf("month");
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
const secondMonthLastDay = secondMonthStartDay.endOf("month");
const lastMonthFirstDay = end.startOf("month");
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
return [
[start, firstMonthLastDay],
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
[lastMonthStartDay.startOf("week"), end]
];
};
var useCalendar = (props, emit, componentName2) => {
const { lang } = useLocale();
const selectedDay = ref();
const now = (0, import_dayjs2.default)().locale(lang.value);
const realSelectedDay = computed({
get() {
if (!props.modelValue)
return selectedDay.value;
return date4.value;
},
set(val) {
if (!val)
return;
selectedDay.value = val;
const result = val.toDate();
emit(INPUT_EVENT, result);
emit(UPDATE_MODEL_EVENT, result);
}
});
const validatedRange = computed(() => {
if (!props.range || !isArray(props.range) || props.range.length !== 2 || props.range.some((item) => !isDate(item)))
return [];
const rangeArrDayjs = props.range.map((_2) => (0, import_dayjs2.default)(_2).locale(lang.value));
const [startDayjs, endDayjs] = rangeArrDayjs;
if (startDayjs.isAfter(endDayjs)) {
debugWarn(componentName2, "end time should be greater than start time");
return [];
}
if (startDayjs.isSame(endDayjs, "month")) {
return calculateValidatedDateRange(startDayjs, endDayjs);
} else {
if (startDayjs.add(1, "month").month() !== endDayjs.month()) {
debugWarn(componentName2, "start time and end time interval must not exceed two months");
return [];
}
return calculateValidatedDateRange(startDayjs, endDayjs);
}
});
const date4 = computed(() => {
if (!props.modelValue) {
return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
} else {
return (0, import_dayjs2.default)(props.modelValue).locale(lang.value);
}
});
const prevMonthDayjs = computed(() => date4.value.subtract(1, "month").date(1));
const nextMonthDayjs = computed(() => date4.value.add(1, "month").date(1));
const prevYearDayjs = computed(() => date4.value.subtract(1, "year").date(1));
const nextYearDayjs = computed(() => date4.value.add(1, "year").date(1));
const calculateValidatedDateRange = (startDayjs, endDayjs) => {
const firstDay = startDayjs.startOf("week");
const lastDay = endDayjs.endOf("week");
const firstMonth = firstDay.get("month");
const lastMonth = lastDay.get("month");
if (firstMonth === lastMonth) {
return [[firstDay, lastDay]];
} else if ((firstMonth + 1) % 12 === lastMonth) {
return adjacentMonth(firstDay, lastDay);
} else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) {
return threeConsecutiveMonth(firstDay, lastDay);
} else {
debugWarn(componentName2, "start time and end time interval must not exceed two months");
return [];
}
};
const pickDay = (day) => {
realSelectedDay.value = day;
};
const selectDate = (type4) => {
const dateMap = {
"prev-month": prevMonthDayjs.value,
"next-month": nextMonthDayjs.value,
"prev-year": prevYearDayjs.value,
"next-year": nextYearDayjs.value,
today: now
};
const day = dateMap[type4];
if (!day.isSame(date4.value, "day")) {
pickDay(day);
}
};
return {
calculateValidatedDateRange,
date: date4,
realSelectedDay,
pickDay,
selectDate,
validatedRange
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/src/calendar.mjs
init_shared_esm_bundler();
var isValidRange = (range3) => isArray(range3) && range3.length === 2 && range3.every((item) => isDate(item));
var calendarProps = buildProps({
modelValue: {
type: Date
},
range: {
type: definePropType(Array),
validator: isValidRange
}
});
var calendarEmits = {
[UPDATE_MODEL_EVENT]: (value) => isDate(value),
[INPUT_EVENT]: (value) => isDate(value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/src/calendar2.mjs
var COMPONENT_NAME4 = "ElCalendar";
var __default__10 = defineComponent({
name: COMPONENT_NAME4
});
var _sfc_main10 = defineComponent({
...__default__10,
props: calendarProps,
emits: calendarEmits,
setup(__props, { expose, emit }) {
const props = __props;
const ns = useNamespace("calendar");
const {
calculateValidatedDateRange,
date: date4,
pickDay,
realSelectedDay,
selectDate,
validatedRange
} = useCalendar(props, emit, COMPONENT_NAME4);
const { t } = useLocale();
const i18nDate = computed(() => {
const pickedMonth = `el.datepicker.month${date4.value.format("M")}`;
return `${date4.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
});
expose({
selectedDay: realSelectedDay,
pickDay,
selectDate,
calculateValidatedDateRange
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).b())
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("header"))
}, [
renderSlot(_ctx.$slots, "header", { date: unref(i18nDate) }, () => [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("title"))
}, toDisplayString(unref(i18nDate)), 3),
unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("button-group"))
}, [
createVNode(unref(ElButtonGroup), null, {
default: withCtx(() => [
createVNode(unref(ElButton), {
size: "small",
onClick: ($event) => unref(selectDate)("prev-month")
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)
]),
_: 1
}, 8, ["onClick"]),
createVNode(unref(ElButton), {
size: "small",
onClick: ($event) => unref(selectDate)("today")
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)
]),
_: 1
}, 8, ["onClick"]),
createVNode(unref(ElButton), {
size: "small",
onClick: ($event) => unref(selectDate)("next-month")
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)
]),
_: 1
}, 8, ["onClick"])
]),
_: 1
})
], 2)) : createCommentVNode("v-if", true)
])
], 2),
unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("body"))
}, [
createVNode(DateTable, {
date: unref(date4),
"selected-day": unref(realSelectedDay),
onPick: unref(pickDay)
}, createSlots({
_: 2
}, [
_ctx.$slots["date-cell"] ? {
name: "date-cell",
fn: withCtx((data) => [
renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))
])
} : void 0
]), 1032, ["date", "selected-day", "onPick"])
], 2)) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("body"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
return openBlock(), createBlock(DateTable, {
key: index,
date: range_[0],
"selected-day": unref(realSelectedDay),
range: range_,
"hide-header": index !== 0,
onPick: unref(pickDay)
}, createSlots({
_: 2
}, [
_ctx.$slots["date-cell"] ? {
name: "date-cell",
fn: withCtx((data) => [
renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))
])
} : void 0
]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
}), 128))
], 2))
], 2);
};
}
});
var Calendar = _export_sfc(_sfc_main10, [["__file", "calendar.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/calendar/index.mjs
var ElCalendar = withInstall(Calendar);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/card/src/card.mjs
var cardProps = buildProps({
header: {
type: String,
default: ""
},
footer: {
type: String,
default: ""
},
bodyStyle: {
type: definePropType([String, Object, Array]),
default: ""
},
headerClass: String,
bodyClass: String,
footerClass: String,
shadow: {
type: String,
values: ["always", "hover", "never"],
default: void 0
}
});
var cardContextKey = Symbol("cardContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/card/src/card2.mjs
var __default__11 = defineComponent({
name: "ElCard"
});
var _sfc_main11 = defineComponent({
...__default__11,
props: cardProps,
setup(__props) {
const globalConfig = useGlobalConfig("card");
const ns = useNamespace("card");
return (_ctx, _cache) => {
var _a;
return openBlock(), createElementBlock("div", {
class: normalizeClass([
unref(ns).b(),
unref(ns).is(`${_ctx.shadow || ((_a = unref(globalConfig)) == null ? void 0 : _a.shadow) || "always"}-shadow`)
])
}, [
_ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass([unref(ns).e("header"), _ctx.headerClass])
}, [
renderSlot(_ctx.$slots, "header", {}, () => [
createTextVNode(toDisplayString(_ctx.header), 1)
])
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]),
style: normalizeStyle(_ctx.bodyStyle)
}, [
renderSlot(_ctx.$slots, "default")
], 6),
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass])
}, [
renderSlot(_ctx.$slots, "footer", {}, () => [
createTextVNode(toDisplayString(_ctx.footer), 1)
])
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var Card = _export_sfc(_sfc_main11, [["__file", "card.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/card/index.mjs
var ElCard = withInstall(Card);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/carousel.mjs
var carouselProps = buildProps({
initialIndex: {
type: Number,
default: 0
},
height: {
type: String,
default: ""
},
trigger: {
type: String,
values: ["hover", "click"],
default: "hover"
},
autoplay: {
type: Boolean,
default: true
},
interval: {
type: Number,
default: 3e3
},
indicatorPosition: {
type: String,
values: ["", "none", "outside"],
default: ""
},
arrow: {
type: String,
values: ["always", "hover", "never"],
default: "hover"
},
type: {
type: String,
values: ["", "card"],
default: ""
},
cardScale: {
type: Number,
default: 0.83
},
loop: {
type: Boolean,
default: true
},
direction: {
type: String,
values: ["horizontal", "vertical"],
default: "horizontal"
},
pauseOnHover: {
type: Boolean,
default: true
},
motionBlur: Boolean
});
var carouselEmits = {
change: (current, prev) => [current, prev].every(isNumber)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/constants.mjs
var carouselContextKey = Symbol("carouselContextKey");
var CAROUSEL_ITEM_NAME = "ElCarouselItem";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-ordered-children/index.mjs
var getOrderedChildren = (vm, childComponentName, children) => {
const nodes = flattedChildren(vm.subTree).filter((n) => {
var _a;
return isVNode(n) && ((_a = n.type) == null ? void 0 : _a.name) === childComponentName && !!n.component;
});
const uids = nodes.map((n) => n.component.uid);
return uids.map((uid2) => children[uid2]).filter((p2) => !!p2);
};
var useOrderedChildren = (vm, childComponentName) => {
const children = shallowRef({});
const orderedChildren = shallowRef([]);
const nodesMap = /* @__PURE__ */ new WeakMap();
const addChild = (child) => {
children.value[child.uid] = child;
triggerRef(children);
onMounted(() => {
const childNode = child.getVnode().el;
const parentNode = childNode.parentNode;
if (!nodesMap.has(parentNode)) {
nodesMap.set(parentNode, []);
const originalFn = parentNode.insertBefore.bind(parentNode);
parentNode.insertBefore = (node, anchor) => {
const shouldSortChildren = nodesMap.get(parentNode).some((el) => node === el || anchor === el);
if (shouldSortChildren)
triggerRef(children);
return originalFn(node, anchor);
};
}
nodesMap.get(parentNode).push(childNode);
});
};
const removeChild = (child) => {
delete children.value[child.uid];
triggerRef(children);
const childNode = child.getVnode().el;
const parentNode = childNode.parentNode;
const childNodes = nodesMap.get(parentNode);
const index = childNodes.indexOf(childNode);
childNodes.splice(index, 1);
};
const sortChildren = () => {
orderedChildren.value = getOrderedChildren(vm, childComponentName, children.value);
};
const IsolatedRenderer = (props) => {
return props.render();
};
const ChildrenSorter = defineComponent({
setup(_2, { slots }) {
return () => {
sortChildren();
return slots.default ? h(IsolatedRenderer, {
render: slots.default
}) : null;
};
}
});
return {
children: orderedChildren,
addChild,
removeChild,
ChildrenSorter
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/use-carousel.mjs
init_shared_esm_bundler();
var THROTTLE_TIME = 300;
var useCarousel = (props, emit, componentName2) => {
const {
children: items,
addChild: addItem,
removeChild: removeItem,
ChildrenSorter: ItemsSorter
} = useOrderedChildren(getCurrentInstance(), CAROUSEL_ITEM_NAME);
const slots = useSlots();
const activeIndex = ref(-1);
const timer = ref(null);
const hover = ref(false);
const root = ref();
const containerHeight = ref(0);
const isItemsTwoLength = ref(true);
const arrowDisplay = computed(() => props.arrow !== "never" && !unref(isVertical));
const hasLabel = computed(() => {
return items.value.some((item) => item.props.label.toString().length > 0);
});
const isCardType = computed(() => props.type === "card");
const isVertical = computed(() => props.direction === "vertical");
const containerStyle = computed(() => {
if (props.height !== "auto") {
return {
height: props.height
};
}
return {
height: `${containerHeight.value}px`,
overflow: "hidden"
};
});
const throttledArrowClick = throttle_default((index) => {
setActiveItem(index);
}, THROTTLE_TIME, { trailing: true });
const throttledIndicatorHover = throttle_default((index) => {
handleIndicatorHover(index);
}, THROTTLE_TIME);
const isTwoLengthShow = (index) => {
if (!isItemsTwoLength.value)
return true;
return activeIndex.value <= 1 ? index <= 1 : index > 1;
};
function pauseTimer() {
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
}
function startTimer() {
if (props.interval <= 0 || !props.autoplay || timer.value)
return;
timer.value = setInterval(() => playSlides(), props.interval);
}
const playSlides = () => {
if (activeIndex.value < items.value.length - 1) {
activeIndex.value = activeIndex.value + 1;
} else if (props.loop) {
activeIndex.value = 0;
}
};
function setActiveItem(index) {
if (isString(index)) {
const filteredItems = items.value.filter((item) => item.props.name === index);
if (filteredItems.length > 0) {
index = items.value.indexOf(filteredItems[0]);
}
}
index = Number(index);
if (Number.isNaN(index) || index !== Math.floor(index)) {
debugWarn(componentName2, "index must be integer.");
return;
}
const itemCount = items.value.length;
const oldIndex = activeIndex.value;
if (index < 0) {
activeIndex.value = props.loop ? itemCount - 1 : 0;
} else if (index >= itemCount) {
activeIndex.value = props.loop ? 0 : itemCount - 1;
} else {
activeIndex.value = index;
}
if (oldIndex === activeIndex.value) {
resetItemPosition(oldIndex);
}
resetTimer();
}
function resetItemPosition(oldIndex) {
items.value.forEach((item, index) => {
item.translateItem(index, activeIndex.value, oldIndex);
});
}
function itemInStage(item, index) {
var _a, _b, _c, _d;
const _items = unref(items);
const itemCount = _items.length;
if (itemCount === 0 || !item.states.inStage)
return false;
const nextItemIndex = index + 1;
const prevItemIndex = index - 1;
const lastItemIndex = itemCount - 1;
const isLastItemActive = _items[lastItemIndex].states.active;
const isFirstItemActive = _items[0].states.active;
const isNextItemActive = (_b = (_a = _items[nextItemIndex]) == null ? void 0 : _a.states) == null ? void 0 : _b.active;
const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active;
if (index === lastItemIndex && isFirstItemActive || isNextItemActive) {
return "left";
} else if (index === 0 && isLastItemActive || isPrevItemActive) {
return "right";
}
return false;
}
function handleMouseEnter() {
hover.value = true;
if (props.pauseOnHover) {
pauseTimer();
}
}
function handleMouseLeave() {
hover.value = false;
startTimer();
}
function handleButtonEnter(arrow2) {
if (unref(isVertical))
return;
items.value.forEach((item, index) => {
if (arrow2 === itemInStage(item, index)) {
item.states.hover = true;
}
});
}
function handleButtonLeave() {
if (unref(isVertical))
return;
items.value.forEach((item) => {
item.states.hover = false;
});
}
function handleIndicatorClick(index) {
activeIndex.value = index;
}
function handleIndicatorHover(index) {
if (props.trigger === "hover" && index !== activeIndex.value) {
activeIndex.value = index;
}
}
function prev() {
setActiveItem(activeIndex.value - 1);
}
function next() {
setActiveItem(activeIndex.value + 1);
}
function resetTimer() {
pauseTimer();
if (!props.pauseOnHover)
startTimer();
}
function setContainerHeight(height) {
if (props.height !== "auto")
return;
containerHeight.value = height;
}
function PlaceholderItem() {
var _a;
const defaultSlots = (_a = slots.default) == null ? void 0 : _a.call(slots);
if (!defaultSlots)
return null;
const flatSlots = flattedChildren(defaultSlots);
const normalizeSlots = flatSlots.filter((slot) => {
return isVNode(slot) && slot.type.name === CAROUSEL_ITEM_NAME;
});
if ((normalizeSlots == null ? void 0 : normalizeSlots.length) === 2 && props.loop && !isCardType.value) {
isItemsTwoLength.value = true;
return normalizeSlots;
}
isItemsTwoLength.value = false;
return null;
}
watch(() => activeIndex.value, (current, prev2) => {
resetItemPosition(prev2);
if (isItemsTwoLength.value) {
current = current % 2;
prev2 = prev2 % 2;
}
if (prev2 > -1) {
emit(CHANGE_EVENT, current, prev2);
}
});
const exposeActiveIndex = computed({
get: () => {
return isItemsTwoLength.value ? activeIndex.value % 2 : activeIndex.value;
},
set: (value) => activeIndex.value = value
});
watch(() => props.autoplay, (autoplay) => {
autoplay ? startTimer() : pauseTimer();
});
watch(() => props.loop, () => {
setActiveItem(activeIndex.value);
});
watch(() => props.interval, () => {
resetTimer();
});
const resizeObserver = shallowRef();
onMounted(() => {
watch(() => items.value, () => {
if (items.value.length > 0)
setActiveItem(props.initialIndex);
}, {
immediate: true
});
resizeObserver.value = useResizeObserver(root.value, () => {
resetItemPosition();
});
startTimer();
});
onBeforeUnmount(() => {
pauseTimer();
if (root.value && resizeObserver.value)
resizeObserver.value.stop();
});
provide(carouselContextKey, {
root,
isCardType,
isVertical,
items,
loop: props.loop,
cardScale: props.cardScale,
addItem,
removeItem,
setActiveItem,
setContainerHeight
});
return {
root,
activeIndex,
exposeActiveIndex,
arrowDisplay,
hasLabel,
hover,
isCardType,
items,
isVertical,
containerStyle,
isItemsTwoLength,
handleButtonEnter,
handleButtonLeave,
handleIndicatorClick,
handleMouseEnter,
handleMouseLeave,
setActiveItem,
prev,
next,
PlaceholderItem,
isTwoLengthShow,
ItemsSorter,
throttledArrowClick,
throttledIndicatorHover
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/carousel2.mjs
var COMPONENT_NAME5 = "ElCarousel";
var __default__12 = defineComponent({
name: COMPONENT_NAME5
});
var _sfc_main12 = defineComponent({
...__default__12,
props: carouselProps,
emits: carouselEmits,
setup(__props, { expose, emit }) {
const props = __props;
const {
root,
activeIndex,
exposeActiveIndex,
arrowDisplay,
hasLabel,
hover,
isCardType,
items,
isVertical,
containerStyle,
handleButtonEnter,
handleButtonLeave,
handleIndicatorClick,
handleMouseEnter,
handleMouseLeave,
setActiveItem,
prev,
next,
PlaceholderItem,
isTwoLengthShow,
ItemsSorter,
throttledArrowClick,
throttledIndicatorHover
} = useCarousel(props, emit, COMPONENT_NAME5);
const ns = useNamespace("carousel");
const { t } = useLocale();
const carouselClasses = computed(() => {
const classes = [ns.b(), ns.m(props.direction)];
if (unref(isCardType)) {
classes.push(ns.m("card"));
}
return classes;
});
const indicatorsClasses = computed(() => {
const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
if (unref(hasLabel)) {
classes.push(ns.em("indicators", "labels"));
}
if (props.indicatorPosition === "outside") {
classes.push(ns.em("indicators", "outside"));
}
if (unref(isVertical)) {
classes.push(ns.em("indicators", "right"));
}
return classes;
});
function handleTransitionStart(e) {
if (!props.motionBlur)
return;
const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
e.currentTarget.classList.add(kls);
}
function handleTransitionEnd(e) {
if (!props.motionBlur)
return;
const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
e.currentTarget.classList.remove(kls);
}
expose({
activeIndex: exposeActiveIndex,
setActiveItem,
prev,
next
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "root",
ref: root,
class: normalizeClass(unref(carouselClasses)),
onMouseenter: withModifiers(unref(handleMouseEnter), ["stop"]),
onMouseleave: withModifiers(unref(handleMouseLeave), ["stop"])
}, [
unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
key: 0,
name: "carousel-arrow-left",
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("button", {
type: "button",
class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "left")]),
"aria-label": unref(t)("el.carousel.leftArrow"),
onMouseenter: ($event) => unref(handleButtonEnter)("left"),
onMouseleave: unref(handleButtonLeave),
onClick: withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"])
}, [
createVNode(unref(ElIcon), null, {
default: withCtx(() => [
createVNode(unref(arrow_left_default))
]),
_: 1
})
], 42, ["aria-label", "onMouseenter", "onMouseleave", "onClick"]), [
[vShow, (_ctx.arrow === "always" || unref(hover)) && (_ctx.loop || unref(activeIndex) > 0)]
])
]),
_: 1
})) : createCommentVNode("v-if", true),
unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
key: 1,
name: "carousel-arrow-right",
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("button", {
type: "button",
class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "right")]),
"aria-label": unref(t)("el.carousel.rightArrow"),
onMouseenter: ($event) => unref(handleButtonEnter)("right"),
onMouseleave: unref(handleButtonLeave),
onClick: withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"])
}, [
createVNode(unref(ElIcon), null, {
default: withCtx(() => [
createVNode(unref(arrow_right_default))
]),
_: 1
})
], 42, ["aria-label", "onMouseenter", "onMouseleave", "onClick"]), [
[
vShow,
(_ctx.arrow === "always" || unref(hover)) && (_ctx.loop || unref(activeIndex) < unref(items).length - 1)
]
])
]),
_: 1
})) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("container")),
style: normalizeStyle(unref(containerStyle)),
onTransitionstart: handleTransitionStart,
onTransitionend: handleTransitionEnd
}, [
createVNode(unref(PlaceholderItem)),
renderSlot(_ctx.$slots, "default")
], 38),
createVNode(unref(ItemsSorter), null, {
default: withCtx(() => [
_ctx.indicatorPosition !== "none" ? (openBlock(), createElementBlock("ul", {
key: 0,
class: normalizeClass(unref(indicatorsClasses))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
return withDirectives((openBlock(), createElementBlock("li", {
key: index,
class: normalizeClass([
unref(ns).e("indicator"),
unref(ns).em("indicator", _ctx.direction),
unref(ns).is("active", index === unref(activeIndex))
]),
onMouseenter: ($event) => unref(throttledIndicatorHover)(index),
onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"])
}, [
createBaseVNode("button", {
class: normalizeClass(unref(ns).e("button")),
"aria-label": unref(t)("el.carousel.indicator", { index: index + 1 })
}, [
unref(hasLabel) ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true)
], 10, ["aria-label"])
], 42, ["onMouseenter", "onClick"])), [
[vShow, unref(isTwoLengthShow)(index)]
]);
}), 128))
], 2)) : createCommentVNode("v-if", true)
]),
_: 1
}),
_ctx.motionBlur ? (openBlock(), createElementBlock("svg", {
key: 2,
xmlns: "http://www.w3.org/2000/svg",
version: "1.1",
style: { "display": "none" }
}, [
createBaseVNode("defs", null, [
createBaseVNode("filter", { id: "elCarouselHorizontal" }, [
createBaseVNode("feGaussianBlur", {
in: "SourceGraphic",
stdDeviation: "12,0"
})
]),
createBaseVNode("filter", { id: "elCarouselVertical" }, [
createBaseVNode("feGaussianBlur", {
in: "SourceGraphic",
stdDeviation: "0,10"
})
])
])
])) : createCommentVNode("v-if", true)
], 42, ["onMouseenter", "onMouseleave"]);
};
}
});
var Carousel = _export_sfc(_sfc_main12, [["__file", "carousel.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/carousel-item2.mjs
var carouselItemProps = buildProps({
name: { type: String, default: "" },
label: {
type: [String, Number],
default: ""
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/use-carousel-item.mjs
var useCarouselItem = (props) => {
const carouselContext = inject(carouselContextKey);
const instance = getCurrentInstance();
if (!carouselContext) {
debugWarn(CAROUSEL_ITEM_NAME, "usage: ");
}
if (!instance) {
debugWarn(CAROUSEL_ITEM_NAME, "compositional hook can only be invoked inside setups");
}
const carouselItemRef = ref();
const hover = ref(false);
const translate2 = ref(0);
const scale = ref(1);
const active = ref(false);
const ready = ref(false);
const inStage = ref(false);
const animating = ref(false);
const { isCardType, isVertical, cardScale } = carouselContext;
function processIndex(index, activeIndex, length) {
const lastItemIndex = length - 1;
const prevItemIndex = activeIndex - 1;
const nextItemIndex = activeIndex + 1;
const halfItemIndex = length / 2;
if (activeIndex === 0 && index === lastItemIndex) {
return -1;
} else if (activeIndex === lastItemIndex && index === 0) {
return length;
} else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {
return length + 1;
} else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {
return -2;
}
return index;
}
function calcCardTranslate(index, activeIndex) {
var _a, _b;
const parentWidth = unref(isVertical) ? ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetHeight) || 0 : ((_b = carouselContext.root.value) == null ? void 0 : _b.offsetWidth) || 0;
if (inStage.value) {
return parentWidth * ((2 - cardScale) * (index - activeIndex) + 1) / 4;
} else if (index < activeIndex) {
return -(1 + cardScale) * parentWidth / 4;
} else {
return (3 + cardScale) * parentWidth / 4;
}
}
function calcTranslate(index, activeIndex, isVertical2) {
const rootEl = carouselContext.root.value;
if (!rootEl)
return 0;
const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0;
return distance * (index - activeIndex);
}
const translateItem = (index, activeIndex, oldIndex) => {
var _a;
const _isCardType = unref(isCardType);
const carouselItemLength = (_a = carouselContext.items.value.length) != null ? _a : Number.NaN;
const isActive = index === activeIndex;
if (!_isCardType && !isUndefined(oldIndex)) {
animating.value = isActive || index === oldIndex;
}
if (!isActive && carouselItemLength > 2 && carouselContext.loop) {
index = processIndex(index, activeIndex, carouselItemLength);
}
const _isVertical = unref(isVertical);
active.value = isActive;
if (_isCardType) {
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
translate2.value = calcCardTranslate(index, activeIndex);
scale.value = unref(active) ? 1 : cardScale;
} else {
translate2.value = calcTranslate(index, activeIndex, _isVertical);
}
ready.value = true;
if (isActive && carouselItemRef.value) {
carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight);
}
};
function handleItemClick() {
if (carouselContext && unref(isCardType)) {
const index = carouselContext.items.value.findIndex(({ uid: uid2 }) => uid2 === instance.uid);
carouselContext.setActiveItem(index);
}
}
const carouselItemContext = {
props,
states: reactive({
hover,
translate: translate2,
scale,
active,
ready,
inStage,
animating
}),
uid: instance.uid,
getVnode: () => instance.vnode,
translateItem
};
carouselContext.addItem(carouselItemContext);
onBeforeUnmount(() => {
carouselContext.removeItem(carouselItemContext);
});
return {
carouselItemRef,
active,
animating,
hover,
inStage,
isVertical,
translate: translate2,
isCardType,
scale,
ready,
handleItemClick
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/src/carousel-item.mjs
var __default__13 = defineComponent({
name: CAROUSEL_ITEM_NAME
});
var _sfc_main13 = defineComponent({
...__default__13,
props: carouselItemProps,
setup(__props) {
const props = __props;
const ns = useNamespace("carousel");
const {
carouselItemRef,
active,
animating,
hover,
inStage,
isVertical,
translate: translate2,
isCardType,
scale,
ready,
handleItemClick
} = useCarouselItem(props);
const itemKls = computed(() => [
ns.e("item"),
ns.is("active", active.value),
ns.is("in-stage", inStage.value),
ns.is("hover", hover.value),
ns.is("animating", animating.value),
{
[ns.em("item", "card")]: isCardType.value,
[ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
}
]);
const itemStyle = computed(() => {
const translateType = `translate${unref(isVertical) ? "Y" : "X"}`;
const _translate = `${translateType}(${unref(translate2)}px)`;
const _scale = `scale(${unref(scale)})`;
const transform = [_translate, _scale].join(" ");
return {
transform
};
});
return (_ctx, _cache) => {
return withDirectives((openBlock(), createElementBlock("div", {
ref_key: "carouselItemRef",
ref: carouselItemRef,
class: normalizeClass(unref(itemKls)),
style: normalizeStyle(unref(itemStyle)),
onClick: unref(handleItemClick)
}, [
unref(isCardType) ? withDirectives((openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("mask"))
}, null, 2)), [
[vShow, !unref(active)]
]) : createCommentVNode("v-if", true),
renderSlot(_ctx.$slots, "default")
], 14, ["onClick"])), [
[vShow, unref(ready)]
]);
};
}
});
var CarouselItem = _export_sfc(_sfc_main13, [["__file", "carousel-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/carousel/index.mjs
var ElCarousel = withInstall(Carousel, {
CarouselItem
});
var ElCarouselItem = withNoopInstall(CarouselItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/types.mjs
var CASCADER_PANEL_INJECTION_KEY = Symbol();
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
init_shared_esm_bundler();
function isVNodeEmpty(vnodes) {
return !!(isArray(vnodes) ? vnodes.every(({
type: type4
}) => type4 === Comment) : (vnodes == null ? void 0 : vnodes.type) === Comment);
}
var NodeContent = defineComponent({
name: "NodeContent",
props: {
node: {
type: Object,
required: true
}
},
setup(props) {
const ns = useNamespace("cascader-node");
const {
renderLabelFn
} = inject(CASCADER_PANEL_INJECTION_KEY);
const {
node
} = props;
const {
data,
label: nodeLabel
} = node;
const label = () => {
const renderLabel = renderLabelFn == null ? void 0 : renderLabelFn({
node,
data
});
return isVNodeEmpty(renderLabel) ? nodeLabel : renderLabel != null ? renderLabel : nodeLabel;
};
return () => createVNode("span", {
"class": ns.e("label")
}, [label()]);
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/node2.mjs
var __default__14 = defineComponent({
name: "ElCascaderNode"
});
var _sfc_main14 = defineComponent({
...__default__14,
props: {
node: {
type: Object,
required: true
},
menuId: String
},
emits: ["expand"],
setup(__props, { emit }) {
const props = __props;
const panel = inject(CASCADER_PANEL_INJECTION_KEY);
const ns = useNamespace("cascader-node");
const isHoverMenu = computed(() => panel.isHoverMenu);
const multiple = computed(() => panel.config.multiple);
const checkStrictly = computed(() => panel.config.checkStrictly);
const showPrefix = computed(() => panel.config.showPrefix);
const checkedNodeId = computed(() => {
var _a;
return (_a = panel.checkedNodes[0]) == null ? void 0 : _a.uid;
});
const isDisabled = computed(() => props.node.isDisabled);
const isLeaf2 = computed(() => props.node.isLeaf);
const expandable = computed(() => checkStrictly.value && !isLeaf2.value || !isDisabled.value);
const inExpandingPath = computed(() => isInPath(panel.expandingNode));
const inCheckedPath = computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
const isInPath = (node) => {
var _a;
const { level, uid: uid2 } = props.node;
return ((_a = node == null ? void 0 : node.pathNodes[level - 1]) == null ? void 0 : _a.uid) === uid2;
};
const doExpand = () => {
if (inExpandingPath.value)
return;
panel.expandNode(props.node);
};
const doCheck = (checked) => {
const { node } = props;
if (checked === node.checked)
return;
panel.handleCheckChange(node, checked);
};
const doLoad = () => {
panel.lazyLoad(props.node, () => {
if (!isLeaf2.value)
doExpand();
});
};
const handleHoverExpand = (e) => {
if (!isHoverMenu.value)
return;
handleExpand();
!isLeaf2.value && emit("expand", e);
};
const handleExpand = () => {
const { node } = props;
if (!expandable.value || node.loading)
return;
node.loaded ? doExpand() : doLoad();
};
const handleClick = () => {
if (isLeaf2.value && !isDisabled.value && !checkStrictly.value && !multiple.value) {
handleCheck(true);
} else if ((panel.config.checkOnClickNode && (multiple.value || checkStrictly.value) || isLeaf2.value && panel.config.checkOnClickLeaf) && !isDisabled.value) {
handleSelectCheck(!props.node.checked);
} else if (!isHoverMenu.value) {
handleExpand();
}
};
const handleSelectCheck = (checked) => {
if (checkStrictly.value) {
doCheck(checked);
if (props.node.loaded) {
doExpand();
}
} else {
handleCheck(checked);
}
};
const handleCheck = (checked) => {
if (!props.node.loaded) {
doLoad();
} else {
doCheck(checked);
!checkStrictly.value && doExpand();
}
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("li", {
id: `${__props.menuId}-${__props.node.uid}`,
role: "menuitem",
"aria-haspopup": !unref(isLeaf2),
"aria-owns": unref(isLeaf2) ? void 0 : __props.menuId,
"aria-expanded": unref(inExpandingPath),
tabindex: unref(expandable) ? -1 : void 0,
class: normalizeClass([
unref(ns).b(),
unref(ns).is("selectable", unref(checkStrictly)),
unref(ns).is("active", __props.node.checked),
unref(ns).is("disabled", !unref(expandable)),
unref(inExpandingPath) && "in-active-path",
unref(inCheckedPath) && "in-checked-path"
]),
onMouseenter: handleHoverExpand,
onFocus: handleHoverExpand,
onClick: handleClick
}, [
createCommentVNode(" prefix "),
unref(multiple) && unref(showPrefix) ? (openBlock(), createBlock(unref(ElCheckbox), {
key: 0,
"model-value": __props.node.checked,
indeterminate: __props.node.indeterminate,
disabled: unref(isDisabled),
onClick: withModifiers(() => {
}, ["stop"]),
"onUpdate:modelValue": handleSelectCheck
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : unref(checkStrictly) && unref(showPrefix) ? (openBlock(), createBlock(unref(ElRadio), {
key: 1,
"model-value": unref(checkedNodeId),
label: __props.node.uid,
disabled: unref(isDisabled),
"onUpdate:modelValue": handleSelectCheck,
onClick: withModifiers(() => {
}, ["stop"])
}, {
default: withCtx(() => [
createCommentVNode("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "),
createBaseVNode("span")
]),
_: 1
}, 8, ["model-value", "label", "disabled", "onClick"])) : unref(isLeaf2) && __props.node.checked ? (openBlock(), createBlock(unref(ElIcon), {
key: 2,
class: normalizeClass(unref(ns).e("prefix"))
}, {
default: withCtx(() => [
createVNode(unref(check_default))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
createCommentVNode(" content "),
createVNode(unref(NodeContent), { node: __props.node }, null, 8, ["node"]),
createCommentVNode(" postfix "),
!unref(isLeaf2) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
__props.node.loading ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass([unref(ns).is("loading"), unref(ns).e("postfix")])
}, {
default: withCtx(() => [
createVNode(unref(loading_default))
]),
_: 1
}, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
key: 1,
class: normalizeClass(["arrow-right", unref(ns).e("postfix")])
}, {
default: withCtx(() => [
createVNode(unref(arrow_right_default))
]),
_: 1
}, 8, ["class"]))
], 64)) : createCommentVNode("v-if", true)
], 42, ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"]);
};
}
});
var ElCascaderNode = _export_sfc(_sfc_main14, [["__file", "node.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/menu.mjs
var __default__15 = defineComponent({
name: "ElCascaderMenu"
});
var _sfc_main15 = defineComponent({
...__default__15,
props: {
nodes: {
type: Array,
required: true
},
index: {
type: Number,
required: true
}
},
setup(__props) {
const props = __props;
const instance = getCurrentInstance();
const ns = useNamespace("cascader-menu");
const { t } = useLocale();
const id = useId();
let activeNode;
let hoverTimer;
const panel = inject(CASCADER_PANEL_INJECTION_KEY);
const hoverZone = ref();
const isEmpty2 = computed(() => !props.nodes.length);
const isLoading = computed(() => !panel.initialLoaded);
const menuId = computed(() => `${id.value}-${props.index}`);
const handleExpand = (e) => {
activeNode = e.target;
};
const handleMouseMove = (e) => {
if (!panel.isHoverMenu || !activeNode || !hoverZone.value)
return;
if (activeNode.contains(e.target)) {
clearHoverTimer();
const el = instance.vnode.el;
const { left } = el.getBoundingClientRect();
const { offsetWidth, offsetHeight } = el;
const startX = e.clientX - left;
const top = activeNode.offsetTop;
const bottom = top + activeNode.offsetHeight;
hoverZone.value.innerHTML = `
`;
} else if (!hoverTimer) {
hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);
}
};
const clearHoverTimer = () => {
if (!hoverTimer)
return;
clearTimeout(hoverTimer);
hoverTimer = void 0;
};
const clearHoverZone = () => {
if (!hoverZone.value)
return;
hoverZone.value.innerHTML = "";
clearHoverTimer();
};
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElScrollbar), {
key: unref(menuId),
tag: "ul",
role: "menu",
class: normalizeClass(unref(ns).b()),
"wrap-class": unref(ns).e("wrap"),
"view-class": [unref(ns).e("list"), unref(ns).is("empty", unref(isEmpty2))],
onMousemove: handleMouseMove,
onMouseleave: clearHoverZone
}, {
default: withCtx(() => {
var _a;
return [
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes, (node) => {
return openBlock(), createBlock(ElCascaderNode, {
key: node.uid,
node,
"menu-id": unref(menuId),
onExpand: handleExpand
}, null, 8, ["node", "menu-id"]);
}), 128)),
unref(isLoading) ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("empty-text"))
}, [
createVNode(unref(ElIcon), {
size: "14",
class: normalizeClass(unref(ns).is("loading"))
}, {
default: withCtx(() => [
createVNode(unref(loading_default))
]),
_: 1
}, 8, ["class"]),
createTextVNode(" " + toDisplayString(unref(t)("el.cascader.loading")), 1)
], 2)) : unref(isEmpty2) ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("empty-text"))
}, [
renderSlot(_ctx.$slots, "empty", {}, () => [
createTextVNode(toDisplayString(unref(t)("el.cascader.noData")), 1)
])
], 2)) : ((_a = unref(panel)) == null ? void 0 : _a.isHoverMenu) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
createCommentVNode(" eslint-disable-next-line vue/html-self-closing "),
(openBlock(), createElementBlock("svg", {
ref_key: "hoverZone",
ref: hoverZone,
class: normalizeClass(unref(ns).e("hover-zone"))
}, null, 2))
], 2112)) : createCommentVNode("v-if", true)
];
}),
_: 3
}, 8, ["class", "wrap-class", "view-class"]);
};
}
});
var ElCascaderMenu = _export_sfc(_sfc_main15, [["__file", "menu.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/node.mjs
init_shared_esm_bundler();
var uid = 0;
var calculatePathNodes = (node) => {
const nodes = [node];
let { parent } = node;
while (parent) {
nodes.unshift(parent);
parent = parent.parent;
}
return nodes;
};
var Node = class _Node {
constructor(data, config, parent, root = false) {
this.data = data;
this.config = config;
this.parent = parent;
this.root = root;
this.uid = uid++;
this.checked = false;
this.indeterminate = false;
this.loading = false;
const { value: valueKey, label: labelKey, children: childrenKey } = config;
const childrenData = data[childrenKey];
const pathNodes = calculatePathNodes(this);
this.level = root ? 0 : parent ? parent.level + 1 : 1;
this.value = data[valueKey];
this.label = data[labelKey];
this.pathNodes = pathNodes;
this.pathValues = pathNodes.map((node) => node.value);
this.pathLabels = pathNodes.map((node) => node.label);
this.childrenData = childrenData;
this.children = (childrenData || []).map((child) => new _Node(child, config, this));
this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
this.text = "";
}
get isDisabled() {
const { data, parent, config } = this;
const { disabled, checkStrictly } = config;
const isDisabled = isFunction(disabled) ? disabled(data, this) : !!data[disabled];
return isDisabled || !checkStrictly && !!(parent == null ? void 0 : parent.isDisabled);
}
get isLeaf() {
const { data, config, childrenData, loaded } = this;
const { lazy, leaf } = config;
const isLeaf2 = isFunction(leaf) ? leaf(data, this) : data[leaf];
return isUndefined(isLeaf2) ? lazy && !loaded ? false : !(isArray(childrenData) && childrenData.length) : !!isLeaf2;
}
get valueByOption() {
return this.config.emitPath ? this.pathValues : this.value;
}
appendChild(childData) {
const { childrenData, children } = this;
const node = new _Node(childData, this.config, this);
if (isArray(childrenData)) {
childrenData.push(childData);
} else {
this.childrenData = [childData];
}
children.push(node);
return node;
}
calcText(allLevels, separator) {
const text = allLevels ? this.pathLabels.join(separator) : this.label;
this.text = text;
return text;
}
broadcast(checked) {
this.children.forEach((child) => {
var _a;
if (child) {
child.broadcast(checked);
(_a = child.onParentCheck) == null ? void 0 : _a.call(child, checked);
}
});
}
emit() {
var _a;
const { parent } = this;
if (parent) {
(_a = parent.onChildCheck) == null ? void 0 : _a.call(parent);
parent.emit();
}
}
onParentCheck(checked) {
if (!this.isDisabled) {
this.setCheckState(checked);
}
}
onChildCheck() {
const { children } = this;
const validChildren = children.filter((child) => !child.isDisabled);
const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
this.setCheckState(checked);
}
setCheckState(checked) {
const totalNum = this.children.length;
const checkedNum = this.children.reduce((c2, p2) => {
const num = p2.checked ? 1 : p2.indeterminate ? 0.5 : 0;
return c2 + num;
}, 0);
this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
}
doCheck(checked) {
if (this.checked === checked)
return;
const { checkStrictly, multiple } = this.config;
if (checkStrictly || !multiple) {
this.checked = checked;
} else {
this.broadcast(checked);
this.setCheckState(checked);
this.emit();
}
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/store.mjs
var flatNodes = (nodes, leafOnly) => {
return nodes.reduce((res, node) => {
if (node.isLeaf) {
res.push(node);
} else {
!leafOnly && res.push(node);
res = res.concat(flatNodes(node.children, leafOnly));
}
return res;
}, []);
};
var Store = class {
constructor(data, config) {
this.config = config;
const nodes = (data || []).map((nodeData) => new Node(nodeData, this.config));
this.nodes = nodes;
this.allNodes = flatNodes(nodes, false);
this.leafNodes = flatNodes(nodes, true);
}
getNodes() {
return this.nodes;
}
getFlattedNodes(leafOnly) {
return leafOnly ? this.leafNodes : this.allNodes;
}
appendNode(nodeData, parentNode) {
const node = parentNode ? parentNode.appendChild(nodeData) : new Node(nodeData, this.config);
if (!parentNode)
this.nodes.push(node);
this.appendAllNodesAndLeafNodes(node);
}
appendNodes(nodeDataList, parentNode) {
if (nodeDataList.length > 0) {
nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));
} else {
parentNode && parentNode.isLeaf && this.leafNodes.push(parentNode);
}
}
appendAllNodesAndLeafNodes(node) {
this.allNodes.push(node);
node.isLeaf && this.leafNodes.push(node);
if (node.children) {
node.children.forEach((subNode) => {
this.appendAllNodesAndLeafNodes(subNode);
});
}
}
getNodeByValue(value, leafOnly = false) {
if (isPropAbsent(value))
return null;
const node = this.getFlattedNodes(leafOnly).find((node2) => isEqual_default(node2.value, value) || isEqual_default(node2.pathValues, value));
return node || null;
}
getSameNode(node) {
if (!node)
return null;
const node_ = this.getFlattedNodes(false).find(({ value, level }) => isEqual_default(node.value, value) && node.level === level);
return node_ || null;
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/config.mjs
init_shared_esm_bundler();
var CommonProps = buildProps({
modelValue: {
type: definePropType([Number, String, Array, Object])
},
options: {
type: definePropType(Array),
default: () => []
},
props: {
type: definePropType(Object),
default: () => ({})
}
});
var DefaultProps = {
expandTrigger: "click",
multiple: false,
checkStrictly: false,
emitPath: true,
lazy: false,
lazyLoad: NOOP,
value: "value",
label: "label",
children: "children",
leaf: "leaf",
disabled: "disabled",
hoverThreshold: 500,
checkOnClickNode: false,
checkOnClickLeaf: true,
showPrefix: true
};
var cascaderPanelProps = buildProps({
...CommonProps,
border: {
type: Boolean,
default: true
},
renderLabel: {
type: Function
}
});
var emitChangeFn = (value) => true;
var cascaderPanelEmits = {
[UPDATE_MODEL_EVENT]: emitChangeFn,
[CHANGE_EVENT]: emitChangeFn,
close: () => true,
"expand-change": (value) => value
};
var useCascaderConfig = (props) => {
return computed(() => ({
...DefaultProps,
...props.props
}));
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/utils.mjs
var getMenuIndex = (el) => {
if (!el)
return 0;
const pieces = el.id.split("-");
return Number(pieces[pieces.length - 2]);
};
var checkNode = (el) => {
if (!el)
return;
const input = el.querySelector("input");
if (input) {
input.click();
} else if (isLeaf(el)) {
el.click();
}
};
var sortByOriginalOrder = (oldNodes, newNodes) => {
const newNodesCopy = newNodes.slice(0);
const newIds = newNodesCopy.map((node) => node.uid);
const res = oldNodes.reduce((acc, item) => {
const index = newIds.indexOf(item.uid);
if (index > -1) {
acc.push(item);
newNodesCopy.splice(index, 1);
newIds.splice(index, 1);
}
return acc;
}, []);
res.push(...newNodesCopy);
return res;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/src/index.mjs
var __default__16 = defineComponent({
name: "ElCascaderPanel",
inheritAttrs: false
});
var _sfc_main16 = defineComponent({
...__default__16,
props: cascaderPanelProps,
emits: cascaderPanelEmits,
setup(__props, { expose, emit }) {
const props = __props;
let manualChecked = false;
const ns = useNamespace("cascader");
const config = useCascaderConfig(props);
const slots = useSlots();
let store;
const initialLoaded = ref(true);
const initialLoadedOnce = ref(false);
const menuList = ref([]);
const checkedValue = ref();
const menus = ref([]);
const expandingNode = ref();
const checkedNodes = ref([]);
const isHoverMenu = computed(() => config.value.expandTrigger === "hover");
const renderLabelFn = computed(() => props.renderLabel || slots.default);
const initStore = () => {
const { options } = props;
const cfg = config.value;
manualChecked = false;
store = new Store(options, cfg);
menus.value = [store.getNodes()];
if (cfg.lazy && isEmpty(props.options)) {
initialLoaded.value = false;
lazyLoad(void 0, (list) => {
if (list) {
store = new Store(list, cfg);
menus.value = [store.getNodes()];
}
initialLoaded.value = true;
syncCheckedValue(false, true);
});
} else {
syncCheckedValue(false, true);
}
};
const lazyLoad = (node, cb) => {
const cfg = config.value;
node = node || new Node({}, cfg, void 0, true);
node.loading = true;
const resolve = (dataList) => {
const _node = node;
const parent = _node.root ? null : _node;
_node.loading = false;
_node.loaded = true;
_node.childrenData = _node.childrenData || [];
dataList && (store == null ? void 0 : store.appendNodes(dataList, parent));
dataList && (cb == null ? void 0 : cb(dataList));
if (node.level === 0) {
initialLoadedOnce.value = true;
}
};
const reject = () => {
node.loading = false;
node.loaded = false;
if (node.level === 0) {
initialLoaded.value = true;
}
};
cfg.lazyLoad(node, resolve, reject);
};
const expandNode = (node, silent) => {
var _a;
const { level } = node;
const newMenus = menus.value.slice(0, level);
let newExpandingNode;
if (node.isLeaf) {
newExpandingNode = node.pathNodes[level - 2];
} else {
newExpandingNode = node;
newMenus.push(node.children);
}
if (((_a = expandingNode.value) == null ? void 0 : _a.uid) !== (newExpandingNode == null ? void 0 : newExpandingNode.uid)) {
expandingNode.value = node;
menus.value = newMenus;
!silent && emit("expand-change", (node == null ? void 0 : node.pathValues) || []);
}
};
const handleCheckChange = (node, checked, emitClose = true) => {
const { checkStrictly, multiple } = config.value;
const oldNode = checkedNodes.value[0];
manualChecked = true;
!multiple && (oldNode == null ? void 0 : oldNode.doCheck(false));
node.doCheck(checked);
calculateCheckedValue();
emitClose && !multiple && !checkStrictly && emit("close");
!emitClose && !multiple && expandParentNode(node);
};
const expandParentNode = (node) => {
if (!node)
return;
node = node.parent;
expandParentNode(node);
node && expandNode(node);
};
const getFlattedNodes = (leafOnly) => store == null ? void 0 : store.getFlattedNodes(leafOnly);
const getCheckedNodes = (leafOnly) => {
var _a;
return (_a = getFlattedNodes(leafOnly)) == null ? void 0 : _a.filter(({ checked }) => checked !== false);
};
const clearCheckedNodes = () => {
checkedNodes.value.forEach((node) => node.doCheck(false));
calculateCheckedValue();
menus.value = menus.value.slice(0, 1);
expandingNode.value = void 0;
emit("expand-change", []);
};
const calculateCheckedValue = () => {
var _a;
const { checkStrictly, multiple } = config.value;
const oldNodes = checkedNodes.value;
const newNodes = getCheckedNodes(!checkStrictly);
const nodes = sortByOriginalOrder(oldNodes, newNodes);
const values = nodes.map((node) => node.valueByOption);
checkedNodes.value = nodes;
checkedValue.value = multiple ? values : (_a = values[0]) != null ? _a : null;
};
const syncCheckedValue = (loaded = false, forced = false) => {
const { modelValue } = props;
const { lazy, multiple, checkStrictly } = config.value;
const leafOnly = !checkStrictly;
if (!initialLoaded.value || manualChecked || !forced && isEqual_default(modelValue, checkedValue.value))
return;
if (lazy && !loaded) {
const values = unique(flattenDeep_default(castArray(modelValue)));
const nodes = values.map((val) => store == null ? void 0 : store.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);
if (nodes.length) {
nodes.forEach((node) => {
lazyLoad(node, () => syncCheckedValue(false, forced));
});
} else {
syncCheckedValue(true, forced);
}
} else {
const values = multiple ? castArray(modelValue) : [modelValue];
const nodes = unique(values.map((val) => store == null ? void 0 : store.getNodeByValue(val, leafOnly)));
syncMenuState(nodes, forced);
checkedValue.value = cloneDeep_default(modelValue != null ? modelValue : void 0);
}
};
const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {
const { checkStrictly } = config.value;
const oldNodes = checkedNodes.value;
const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));
const oldExpandingNode = store == null ? void 0 : store.getSameNode(expandingNode.value);
const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];
if (newExpandingNode) {
newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));
} else {
expandingNode.value = void 0;
}
oldNodes.forEach((node) => node.doCheck(false));
reactive(newNodes).forEach((node) => node.doCheck(true));
checkedNodes.value = newNodes;
nextTick(scrollToExpandingNode);
};
const scrollToExpandingNode = () => {
if (!isClient)
return;
menuList.value.forEach((menu) => {
const menuElement = menu == null ? void 0 : menu.$el;
if (menuElement) {
const container = menuElement.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
const activeNode = menuElement.querySelector(`.${ns.b("node")}.${ns.is("active")}:last-child`) || menuElement.querySelector(`.${ns.b("node")}.in-active-path`);
scrollIntoView(container, activeNode);
}
});
};
const handleKeyDown = (e) => {
const target2 = e.target;
const code = getEventCode(e);
switch (code) {
case EVENT_CODE.up:
case EVENT_CODE.down: {
e.preventDefault();
const distance = code === EVENT_CODE.up ? -1 : 1;
focusNode(getSibling(target2, distance, `.${ns.b("node")}[tabindex="-1"]`));
break;
}
case EVENT_CODE.left: {
e.preventDefault();
const preMenu = menuList.value[getMenuIndex(target2) - 1];
const expandedNode = preMenu == null ? void 0 : preMenu.$el.querySelector(`.${ns.b("node")}[aria-expanded="true"]`);
focusNode(expandedNode);
break;
}
case EVENT_CODE.right: {
e.preventDefault();
const nextMenu = menuList.value[getMenuIndex(target2) + 1];
const firstNode = nextMenu == null ? void 0 : nextMenu.$el.querySelector(`.${ns.b("node")}[tabindex="-1"]`);
focusNode(firstNode);
break;
}
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
checkNode(target2);
break;
}
};
provide(CASCADER_PANEL_INJECTION_KEY, reactive({
config,
expandingNode,
checkedNodes,
isHoverMenu,
initialLoaded,
renderLabelFn,
lazyLoad,
expandNode,
handleCheckChange
}));
watch(config, (newVal, oldVal) => {
if (isEqual_default(newVal, oldVal))
return;
initStore();
}, {
immediate: true
});
watch(() => props.options, initStore, {
deep: true
});
watch(() => props.modelValue, () => {
manualChecked = false;
syncCheckedValue();
}, {
deep: true
});
watch(() => checkedValue.value, (val) => {
if (!isEqual_default(val, props.modelValue)) {
emit(UPDATE_MODEL_EVENT, val);
emit(CHANGE_EVENT, val);
}
});
const loadLazyRootNodes = () => {
if (initialLoadedOnce.value)
return;
initStore();
};
onBeforeUpdate(() => menuList.value = []);
onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue());
expose({
menuList,
menus,
checkedNodes,
handleKeyDown,
handleCheckChange,
getFlattedNodes,
getCheckedNodes,
clearCheckedNodes,
calculateCheckedValue,
scrollToExpandingNode,
loadLazyRootNodes
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([unref(ns).b("panel"), unref(ns).is("bordered", _ctx.border)]),
onKeydown: handleKeyDown
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(menus.value, (menu, index) => {
return openBlock(), createBlock(ElCascaderMenu, {
key: index,
ref_for: true,
ref: (item) => menuList.value[index] = item,
index,
nodes: [...menu]
}, {
empty: withCtx(() => [
renderSlot(_ctx.$slots, "empty")
]),
_: 2
}, 1032, ["index", "nodes"]);
}), 128))
], 34);
};
}
});
var CascaderPanel = _export_sfc(_sfc_main16, [["__file", "index.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader-panel/index.mjs
var ElCascaderPanel = withInstall(CascaderPanel);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader/src/cascader.mjs
var cascaderProps = buildProps({
...CommonProps,
size: useSizeProp,
placeholder: String,
disabled: Boolean,
clearable: Boolean,
clearIcon: {
type: iconPropType,
default: circle_close_default
},
filterable: Boolean,
filterMethod: {
type: definePropType(Function),
default: (node, keyword) => node.text.includes(keyword)
},
separator: {
type: String,
default: " / "
},
showAllLevels: {
type: Boolean,
default: true
},
collapseTags: Boolean,
maxCollapseTags: {
type: Number,
default: 1
},
collapseTagsTooltip: Boolean,
maxCollapseTagsTooltipHeight: {
type: [String, Number]
},
debounce: {
type: Number,
default: 300
},
beforeFilter: {
type: definePropType(Function),
default: () => true
},
placement: {
type: definePropType(String),
values: Ee,
default: "bottom-start"
},
fallbackPlacements: {
type: definePropType(Array),
default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
},
popperClass: useTooltipContentProps.popperClass,
popperStyle: useTooltipContentProps.popperStyle,
teleported: useTooltipContentProps.teleported,
effect: {
type: definePropType(String),
default: "light"
},
tagType: { ...tagProps.type, default: "info" },
tagEffect: { ...tagProps.effect, default: "light" },
validateEvent: {
type: Boolean,
default: true
},
persistent: {
type: Boolean,
default: true
},
showCheckedStrategy: {
type: String,
values: ["parent", "child"],
default: "child"
},
checkOnClickNode: Boolean,
showPrefix: {
type: Boolean,
default: true
},
...useEmptyValuesProps
});
var emitChangeFn2 = (value) => true;
var cascaderEmits = {
[UPDATE_MODEL_EVENT]: emitChangeFn2,
[CHANGE_EVENT]: emitChangeFn2,
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent,
clear: () => true,
visibleChange: (val) => isBoolean(val),
expandChange: (val) => !!val,
removeTag: (val) => !!val
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader/src/cascader2.mjs
init_shared_esm_bundler();
var __default__17 = defineComponent({
name: "ElCascader"
});
var _sfc_main17 = defineComponent({
...__default__17,
props: cascaderProps,
emits: cascaderEmits,
setup(__props, { expose, emit }) {
const props = __props;
const popperOptions = {
modifiers: [
{
name: "arrowPosition",
enabled: true,
phase: "main",
fn: ({ state }) => {
const { modifiersData, placement } = state;
if (["right", "left", "bottom", "top"].includes(placement))
return;
if (modifiersData.arrow) {
modifiersData.arrow.x = 35;
}
},
requires: ["arrow"]
}
]
};
const attrs = useAttrs();
let inputInitialHeight = 0;
let pressDeleteCount = 0;
const nsCascader = useNamespace("cascader");
const nsInput = useNamespace("input");
const { t } = useLocale();
const { formItem } = useFormItem();
const isDisabled = useFormDisabled();
const { valueOnClear } = useEmptyValues(props);
const { isComposing, handleComposition } = useComposition({
afterComposition(event) {
var _a;
const text = (_a = event.target) == null ? void 0 : _a.value;
handleInput(text);
}
});
const tooltipRef = ref();
const tagTooltipRef = ref();
const inputRef = ref();
const tagWrapper = ref();
const cascaderPanelRef = ref();
const suggestionPanel = ref();
const popperVisible = ref(false);
const inputHover = ref(false);
const filtering = ref(false);
const inputValue = ref("");
const searchInputValue = ref("");
const tags = ref([]);
const suggestions = ref([]);
const showTagList = computed(() => {
if (!props.props.multiple) {
return [];
}
return props.collapseTags ? tags.value.slice(0, props.maxCollapseTags) : tags.value;
});
const collapseTagList = computed(() => {
if (!props.props.multiple) {
return [];
}
return props.collapseTags ? tags.value.slice(props.maxCollapseTags) : [];
});
const cascaderStyle = computed(() => {
return attrs.style;
});
const inputPlaceholder = computed(() => {
var _a;
return (_a = props.placeholder) != null ? _a : t("el.cascader.placeholder");
});
const currentPlaceholder = computed(() => searchInputValue.value || tags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value);
const realSize = useFormSize();
const tagSize = computed(() => realSize.value === "small" ? "small" : "default");
const multiple = computed(() => !!props.props.multiple);
const readonly2 = computed(() => !props.filterable || multiple.value);
const searchKeyword = computed(() => multiple.value ? searchInputValue.value : inputValue.value);
const checkedNodes = computed(() => {
var _a;
return ((_a = cascaderPanelRef.value) == null ? void 0 : _a.checkedNodes) || [];
});
const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
disabled: isDisabled,
beforeBlur(event) {
var _a, _b;
return ((_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event)) || ((_b = tagTooltipRef.value) == null ? void 0 : _b.isFocusInsideContent(event));
},
afterBlur() {
var _a;
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
}
}
});
const clearBtnVisible = computed(() => {
if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value && !isFocused.value)
return false;
return !!checkedNodes.value.length;
});
const presentText = computed(() => {
const { showAllLevels, separator } = props;
const nodes = checkedNodes.value;
return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
});
const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
const checkedValue = computed({
get() {
return cloneDeep_default(props.modelValue);
},
set(val) {
const value = val != null ? val : valueOnClear.value;
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value);
if (props.validateEvent) {
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
}
}
});
const cascaderKls = computed(() => {
return [
nsCascader.b(),
nsCascader.m(realSize.value),
nsCascader.is("disabled", isDisabled.value),
attrs.class
];
});
const cascaderIconKls = computed(() => {
return [
nsInput.e("icon"),
"icon-arrow-down",
nsCascader.is("reverse", popperVisible.value)
];
});
const inputClass = computed(() => nsCascader.is("focus", isFocused.value));
const contentRef = computed(() => {
var _a, _b;
return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
});
const handleClickOutside = (event) => {
if (isFocused.value) {
const _event = new FocusEvent("blur", event);
handleBlur(_event);
}
togglePopperVisible(false);
};
const togglePopperVisible = (visible) => {
var _a, _b, _c;
if (isDisabled.value)
return;
visible = visible != null ? visible : !popperVisible.value;
if (visible !== popperVisible.value) {
popperVisible.value = visible;
(_b = (_a = inputRef.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
if (visible) {
updatePopperPosition();
nextTick((_c = cascaderPanelRef.value) == null ? void 0 : _c.scrollToExpandingNode);
} else if (props.filterable) {
syncPresentTextValue();
}
emit("visibleChange", visible);
}
};
const updatePopperPosition = () => {
nextTick(() => {
var _a;
(_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
});
};
const hideSuggestionPanel = () => {
filtering.value = false;
};
const genTag = (node) => {
const { showAllLevels, separator } = props;
return {
node,
key: node.uid,
text: node.calcText(showAllLevels, separator),
hitState: false,
closable: !isDisabled.value && !node.isDisabled
};
};
const deleteTag = (tag) => {
var _a;
const node = tag.node;
node.doCheck(false);
(_a = cascaderPanelRef.value) == null ? void 0 : _a.calculateCheckedValue();
emit("removeTag", node.valueByOption);
};
const getStrategyCheckedNodes = () => {
switch (props.showCheckedStrategy) {
case "child":
return checkedNodes.value;
case "parent": {
const clickedNodes = getCheckedNodes(false);
const clickedNodesValue = clickedNodes.map((o2) => o2.value);
const parentNodes = clickedNodes.filter((o2) => !o2.parent || !clickedNodesValue.includes(o2.parent.value));
return parentNodes;
}
default:
return [];
}
};
const calculatePresentTags = () => {
if (!multiple.value)
return;
const nodes = getStrategyCheckedNodes();
const allTags = [];
nodes.forEach((node) => allTags.push(genTag(node)));
tags.value = allTags;
};
const calculateSuggestions = () => {
var _a, _b;
const { filterMethod, showAllLevels, separator } = props;
const res = (_b = (_a = cascaderPanelRef.value) == null ? void 0 : _a.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
if (node.isDisabled)
return false;
node.calcText(showAllLevels, separator);
return filterMethod(node, searchKeyword.value);
});
if (multiple.value) {
tags.value.forEach((tag) => {
tag.hitState = false;
});
}
filtering.value = true;
suggestions.value = res;
updatePopperPosition();
};
const focusFirstNode = () => {
var _a;
let firstNode;
if (filtering.value && suggestionPanel.value) {
firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
} else {
firstNode = (_a = cascaderPanelRef.value) == null ? void 0 : _a.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
}
if (firstNode) {
firstNode.focus();
!filtering.value && firstNode.click();
}
};
const updateStyle = () => {
var _a, _b;
const inputInner = (_a = inputRef.value) == null ? void 0 : _a.input;
const tagWrapperEl = tagWrapper.value;
const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
if (!isClient || !inputInner)
return;
if (suggestionPanelEl) {
const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
}
if (tagWrapperEl) {
const { offsetHeight } = tagWrapperEl;
const height = tags.value.length > 0 ? `${Math.max(offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`;
inputInner.style.height = height;
updatePopperPosition();
}
};
const getCheckedNodes = (leafOnly) => {
var _a;
return (_a = cascaderPanelRef.value) == null ? void 0 : _a.getCheckedNodes(leafOnly);
};
const handleExpandChange = (value) => {
updatePopperPosition();
emit("expandChange", value);
};
const handleKeyDown = (e) => {
if (isComposing.value)
return;
const code = getEventCode(e);
switch (code) {
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
togglePopperVisible();
break;
case EVENT_CODE.down:
togglePopperVisible(true);
nextTick(focusFirstNode);
e.preventDefault();
break;
case EVENT_CODE.esc:
if (popperVisible.value === true) {
e.preventDefault();
e.stopPropagation();
togglePopperVisible(false);
}
break;
case EVENT_CODE.tab:
togglePopperVisible(false);
break;
}
};
const handleClear = () => {
var _a;
(_a = cascaderPanelRef.value) == null ? void 0 : _a.clearCheckedNodes();
if (!popperVisible.value && props.filterable) {
syncPresentTextValue();
}
togglePopperVisible(false);
emit("clear");
};
const syncPresentTextValue = () => {
const { value } = presentText;
inputValue.value = value;
searchInputValue.value = value;
};
const handleSuggestionClick = (node) => {
var _a, _b;
const { checked } = node;
if (multiple.value) {
(_a = cascaderPanelRef.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false);
} else {
!checked && ((_b = cascaderPanelRef.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
togglePopperVisible(false);
}
};
const handleSuggestionKeyDown = (e) => {
const target2 = e.target;
const code = getEventCode(e);
switch (code) {
case EVENT_CODE.up:
case EVENT_CODE.down: {
e.preventDefault();
const distance = code === EVENT_CODE.up ? -1 : 1;
focusNode(getSibling(target2, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
break;
}
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
target2.click();
break;
}
};
const handleDelete = () => {
const lastTag = tags.value[tags.value.length - 1];
pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
if (!lastTag || !pressDeleteCount || props.collapseTags && tags.value.length > 1)
return;
if (lastTag.hitState) {
deleteTag(lastTag);
} else {
lastTag.hitState = true;
}
};
const debounce = computed(() => props.debounce);
const handleFilter = useDebounceFn(() => {
const { value } = searchKeyword;
if (!value)
return;
const passed = props.beforeFilter(value);
if (isPromise(passed)) {
passed.then(calculateSuggestions).catch(() => {
});
} else if (passed !== false) {
calculateSuggestions();
} else {
hideSuggestionPanel();
}
}, debounce);
const handleInput = (val, e) => {
!popperVisible.value && togglePopperVisible(true);
if (e == null ? void 0 : e.isComposing)
return;
val ? handleFilter() : hideSuggestionPanel();
};
const getInputInnerHeight = (inputInner) => Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
watch(filtering, updatePopperPosition);
watch([
checkedNodes,
isDisabled,
() => props.collapseTags,
() => props.maxCollapseTags
], calculatePresentTags);
watch(tags, () => {
nextTick(() => updateStyle());
});
watch(realSize, async () => {
await nextTick();
const inputInner = inputRef.value.input;
inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
updateStyle();
});
watch(presentText, syncPresentTextValue, { immediate: true });
watch(() => popperVisible.value, (val) => {
var _a;
if (val && props.props.lazy && props.props.lazyLoad) {
(_a = cascaderPanelRef.value) == null ? void 0 : _a.loadLazyRootNodes();
}
});
onMounted(() => {
const inputInner = inputRef.value.input;
const inputInnerHeight = getInputInnerHeight(inputInner);
inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
useResizeObserver(inputInner, updateStyle);
});
expose({
getCheckedNodes,
cascaderPanelRef,
togglePopperVisible,
contentRef,
presentText
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTooltip), {
ref_key: "tooltipRef",
ref: tooltipRef,
visible: popperVisible.value,
teleported: _ctx.teleported,
"popper-class": [unref(nsCascader).e("dropdown"), _ctx.popperClass],
"popper-style": _ctx.popperStyle,
"popper-options": popperOptions,
"fallback-placements": _ctx.fallbackPlacements,
"stop-popper-mouse-event": false,
"gpu-acceleration": false,
placement: _ctx.placement,
transition: `${unref(nsCascader).namespace.value}-zoom-in-top`,
effect: _ctx.effect,
pure: "",
persistent: _ctx.persistent,
onHide: hideSuggestionPanel
}, {
default: withCtx(() => [
withDirectives((openBlock(), createElementBlock("div", {
ref_key: "wrapperRef",
ref: wrapperRef,
class: normalizeClass(unref(cascaderKls)),
style: normalizeStyle(unref(cascaderStyle)),
onClick: () => togglePopperVisible(unref(readonly2) ? void 0 : true),
onKeydown: handleKeyDown,
onMouseenter: ($event) => inputHover.value = true,
onMouseleave: ($event) => inputHover.value = false
}, [
createVNode(unref(ElInput), {
ref_key: "inputRef",
ref: inputRef,
modelValue: inputValue.value,
"onUpdate:modelValue": ($event) => inputValue.value = $event,
placeholder: unref(currentPlaceholder),
readonly: unref(readonly2),
disabled: unref(isDisabled),
"validate-event": false,
size: unref(realSize),
class: normalizeClass(unref(inputClass)),
tabindex: unref(multiple) && _ctx.filterable && !unref(isDisabled) ? -1 : void 0,
onCompositionstart: unref(handleComposition),
onCompositionupdate: unref(handleComposition),
onCompositionend: unref(handleComposition),
onInput: handleInput
}, createSlots({
suffix: withCtx(() => [
unref(clearBtnVisible) ? (openBlock(), createBlock(unref(ElIcon), {
key: "clear",
class: normalizeClass([unref(nsInput).e("icon"), "icon-circle-close"]),
onClick: withModifiers(handleClear, ["stop"])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : (openBlock(), createBlock(unref(ElIcon), {
key: "arrow-down",
class: normalizeClass(unref(cascaderIconKls)),
onClick: withModifiers(($event) => togglePopperVisible(), ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(arrow_down_default))
]),
_: 1
}, 8, ["class", "onClick"]))
]),
_: 2
}, [
_ctx.$slots.prefix ? {
name: "prefix",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "prefix")
])
} : void 0
]), 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
unref(multiple) ? (openBlock(), createElementBlock("div", {
key: 0,
ref_key: "tagWrapper",
ref: tagWrapper,
class: normalizeClass([
unref(nsCascader).e("tags"),
unref(nsCascader).is("validate", Boolean(unref(validateState)))
])
}, [
renderSlot(_ctx.$slots, "tag", {
data: tags.value,
deleteTag
}, () => [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showTagList), (tag) => {
return openBlock(), createBlock(unref(ElTag), {
key: tag.key,
type: _ctx.tagType,
size: unref(tagSize),
effect: _ctx.tagEffect,
hit: tag.hitState,
closable: tag.closable,
"disable-transitions": "",
onClose: ($event) => deleteTag(tag)
}, {
default: withCtx(() => [
createBaseVNode("span", null, toDisplayString(tag.text), 1)
]),
_: 2
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]);
}), 128))
]),
_ctx.collapseTags && tags.value.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
key: 0,
ref_key: "tagTooltipRef",
ref: tagTooltipRef,
disabled: popperVisible.value || !_ctx.collapseTagsTooltip,
"fallback-placements": ["bottom", "top", "right", "left"],
placement: "bottom",
"popper-class": _ctx.popperClass,
"popper-style": _ctx.popperStyle,
effect: _ctx.effect,
persistent: _ctx.persistent
}, {
default: withCtx(() => [
createVNode(unref(ElTag), {
closable: false,
size: unref(tagSize),
type: _ctx.tagType,
effect: _ctx.tagEffect,
"disable-transitions": ""
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(unref(nsCascader).e("tags-text"))
}, " + " + toDisplayString(tags.value.length - _ctx.maxCollapseTags), 3)
]),
_: 1
}, 8, ["size", "type", "effect"])
]),
content: withCtx(() => [
createVNode(unref(ElScrollbar), { "max-height": _ctx.maxCollapseTagsTooltipHeight }, {
default: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass(unref(nsCascader).e("collapse-tags"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(collapseTagList), (tag, idx) => {
return openBlock(), createElementBlock("div", {
key: idx,
class: normalizeClass(unref(nsCascader).e("collapse-tag"))
}, [
(openBlock(), createBlock(unref(ElTag), {
key: tag.key,
class: "in-tooltip",
type: _ctx.tagType,
size: unref(tagSize),
effect: _ctx.tagEffect,
hit: tag.hitState,
closable: tag.closable,
"disable-transitions": "",
onClose: ($event) => deleteTag(tag)
}, {
default: withCtx(() => [
createBaseVNode("span", null, toDisplayString(tag.text), 1)
]),
_: 2
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
], 2);
}), 128))
], 2)
]),
_: 1
}, 8, ["max-height"])
]),
_: 1
}, 8, ["disabled", "popper-class", "popper-style", "effect", "persistent"])) : createCommentVNode("v-if", true),
_ctx.filterable && !unref(isDisabled) ? withDirectives((openBlock(), createElementBlock("input", {
key: 1,
"onUpdate:modelValue": ($event) => searchInputValue.value = $event,
type: "text",
class: normalizeClass(unref(nsCascader).e("search-input")),
placeholder: unref(presentText) ? "" : unref(inputPlaceholder),
onInput: (e) => handleInput(searchInputValue.value, e),
onClick: withModifiers(($event) => togglePopperVisible(true), ["stop"]),
onKeydown: withKeys(handleDelete, ["delete"]),
onCompositionstart: unref(handleComposition),
onCompositionupdate: unref(handleComposition),
onCompositionend: unref(handleComposition)
}, null, 42, ["onUpdate:modelValue", "placeholder", "onInput", "onClick", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend"])), [
[vModelText, searchInputValue.value]
]) : createCommentVNode("v-if", true)
], 2)) : createCommentVNode("v-if", true)
], 46, ["onClick", "onMouseenter", "onMouseleave"])), [
[unref(ClickOutside), handleClickOutside, unref(contentRef)]
])
]),
content: withCtx(() => [
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(nsCascader).e("header")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(_ctx.$slots, "header")
], 10, ["onClick"])) : createCommentVNode("v-if", true),
withDirectives(createVNode(unref(ElCascaderPanel), {
ref_key: "cascaderPanelRef",
ref: cascaderPanelRef,
modelValue: unref(checkedValue),
"onUpdate:modelValue": ($event) => isRef(checkedValue) ? checkedValue.value = $event : null,
options: _ctx.options,
props: props.props,
border: false,
"render-label": _ctx.$slots.default,
onExpandChange: handleExpandChange,
onClose: ($event) => _ctx.$nextTick(() => togglePopperVisible(false))
}, {
empty: withCtx(() => [
renderSlot(_ctx.$slots, "empty")
]),
_: 3
}, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "render-label", "onClose"]), [
[vShow, !filtering.value]
]),
_ctx.filterable ? withDirectives((openBlock(), createBlock(unref(ElScrollbar), {
key: 1,
ref_key: "suggestionPanel",
ref: suggestionPanel,
tag: "ul",
class: normalizeClass(unref(nsCascader).e("suggestion-panel")),
"view-class": unref(nsCascader).e("suggestion-list"),
onKeydown: handleSuggestionKeyDown
}, {
default: withCtx(() => [
suggestions.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(suggestions.value, (item) => {
return openBlock(), createElementBlock("li", {
key: item.uid,
class: normalizeClass([
unref(nsCascader).e("suggestion-item"),
unref(nsCascader).is("checked", item.checked)
]),
tabindex: -1,
onClick: ($event) => handleSuggestionClick(item)
}, [
renderSlot(_ctx.$slots, "suggestion-item", { item }, () => [
createBaseVNode("span", null, toDisplayString(item.text), 1),
item.checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
default: withCtx(() => [
createVNode(unref(check_default))
]),
_: 1
})) : createCommentVNode("v-if", true)
])
], 10, ["onClick"]);
}), 128)) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
createBaseVNode("li", {
class: normalizeClass(unref(nsCascader).e("empty-text"))
}, toDisplayString(unref(t)("el.cascader.noMatch")), 3)
])
]),
_: 3
}, 8, ["class", "view-class"])), [
[vShow, filtering.value]
]) : createCommentVNode("v-if", true),
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(unref(nsCascader).e("footer")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(_ctx.$slots, "footer")
], 10, ["onClick"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["visible", "teleported", "popper-class", "popper-style", "fallback-placements", "placement", "transition", "effect", "persistent"]);
};
}
});
var Cascader = _export_sfc(_sfc_main17, [["__file", "cascader.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/cascader/index.mjs
var ElCascader = withInstall(Cascader);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/check-tag/src/check-tag2.mjs
var checkTagProps = buildProps({
checked: Boolean,
disabled: Boolean,
type: {
type: String,
values: ["primary", "success", "info", "warning", "danger"],
default: "primary"
}
});
var checkTagEmits = {
"update:checked": (value) => isBoolean(value),
[CHANGE_EVENT]: (value) => isBoolean(value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/check-tag/src/check-tag.mjs
var __default__18 = defineComponent({
name: "ElCheckTag"
});
var _sfc_main18 = defineComponent({
...__default__18,
props: checkTagProps,
emits: checkTagEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("check-tag");
const containerKls = computed(() => [
ns.b(),
ns.is("checked", props.checked),
ns.is("disabled", props.disabled),
ns.m(props.type || "primary")
]);
const handleChange = () => {
if (props.disabled)
return;
const checked = !props.checked;
emit(CHANGE_EVENT, checked);
emit("update:checked", checked);
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", {
class: normalizeClass(unref(containerKls)),
onClick: handleChange
}, [
renderSlot(_ctx.$slots, "default")
], 2);
};
}
});
var CheckTag = _export_sfc(_sfc_main18, [["__file", "check-tag.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/check-tag/index.mjs
var ElCheckTag = withInstall(CheckTag);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/col/src/col.mjs
var colProps = buildProps({
tag: {
type: String,
default: "div"
},
span: {
type: Number,
default: 24
},
offset: {
type: Number,
default: 0
},
pull: {
type: Number,
default: 0
},
push: {
type: Number,
default: 0
},
xs: {
type: definePropType([Number, Object]),
default: () => mutable({})
},
sm: {
type: definePropType([Number, Object]),
default: () => mutable({})
},
md: {
type: definePropType([Number, Object]),
default: () => mutable({})
},
lg: {
type: definePropType([Number, Object]),
default: () => mutable({})
},
xl: {
type: definePropType([Number, Object]),
default: () => mutable({})
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/row/src/constants.mjs
var rowContextKey = Symbol("rowContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/col/src/col2.mjs
init_shared_esm_bundler();
var __default__19 = defineComponent({
name: "ElCol"
});
var _sfc_main19 = defineComponent({
...__default__19,
props: colProps,
setup(__props) {
const props = __props;
const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) });
const ns = useNamespace("col");
const style = computed(() => {
const styles = {};
if (gutter.value) {
styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
}
return styles;
});
const colKls = computed(() => {
const classes = [];
const pos = ["span", "offset", "pull", "push"];
pos.forEach((prop) => {
const size = props[prop];
if (isNumber(size)) {
if (prop === "span")
classes.push(ns.b(`${props[prop]}`));
else if (size > 0)
classes.push(ns.b(`${prop}-${props[prop]}`));
}
});
const sizes = ["xs", "sm", "md", "lg", "xl"];
sizes.forEach((size) => {
if (isNumber(props[size])) {
classes.push(ns.b(`${size}-${props[size]}`));
} else if (isObject(props[size])) {
Object.entries(props[size]).forEach(([prop, sizeProp]) => {
classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
});
}
});
if (gutter.value) {
classes.push(ns.is("guttered"));
}
return [ns.b(), classes];
});
return (_ctx, _cache) => {
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
class: normalizeClass(unref(colKls)),
style: normalizeStyle(unref(style))
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]);
};
}
});
var Col = _export_sfc(_sfc_main19, [["__file", "col.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/col/index.mjs
var ElCol = withInstall(Col);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/collapse.mjs
init_shared_esm_bundler();
var emitChangeFn3 = (value) => isNumber(value) || isString(value) || isArray(value);
var collapseProps = buildProps({
accordion: Boolean,
modelValue: {
type: definePropType([Array, String, Number]),
default: () => mutable([])
},
expandIconPosition: {
type: definePropType([String]),
default: "right"
},
beforeCollapse: {
type: definePropType(Function)
}
});
var collapseEmits = {
[UPDATE_MODEL_EVENT]: emitChangeFn3,
[CHANGE_EVENT]: emitChangeFn3
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/constants.mjs
var collapseContextKey = Symbol("collapseContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/use-collapse.mjs
init_shared_esm_bundler();
var SCOPE2 = "ElCollapse";
var useCollapse = (props, emit) => {
const activeNames = ref(castArray_default(props.modelValue));
const setActiveNames = (_activeNames) => {
activeNames.value = _activeNames;
const value = props.accordion ? activeNames.value[0] : activeNames.value;
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value);
};
const handleChange = (name) => {
if (props.accordion) {
setActiveNames([activeNames.value[0] === name ? "" : name]);
} else {
const _activeNames = [...activeNames.value];
const index = _activeNames.indexOf(name);
if (index > -1) {
_activeNames.splice(index, 1);
} else {
_activeNames.push(name);
}
setActiveNames(_activeNames);
}
};
const handleItemClick = async (name) => {
const { beforeCollapse } = props;
if (!beforeCollapse) {
handleChange(name);
return;
}
const shouldChange = beforeCollapse(name);
const isPromiseOrBool = [
isPromise(shouldChange),
isBoolean(shouldChange)
].includes(true);
if (!isPromiseOrBool) {
throwError(SCOPE2, "beforeCollapse must return type `Promise` or `boolean`");
}
if (isPromise(shouldChange)) {
shouldChange.then((result) => {
if (result !== false) {
handleChange(name);
}
}).catch((e) => {
debugWarn(SCOPE2, `some error occurred: ${e}`);
});
} else if (shouldChange) {
handleChange(name);
}
};
watch(() => props.modelValue, () => activeNames.value = castArray_default(props.modelValue), { deep: true });
provide(collapseContextKey, {
activeNames,
handleItemClick
});
return {
activeNames,
setActiveNames
};
};
var useCollapseDOM = (props) => {
const ns = useNamespace("collapse");
const rootKls = computed(() => [
ns.b(),
ns.b(`icon-position-${props.expandIconPosition}`)
]);
return {
rootKls
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/collapse2.mjs
var __default__20 = defineComponent({
name: "ElCollapse"
});
var _sfc_main20 = defineComponent({
...__default__20,
props: collapseProps,
emits: collapseEmits,
setup(__props, { expose, emit }) {
const props = __props;
const { activeNames, setActiveNames } = useCollapse(props, emit);
const { rootKls } = useCollapseDOM(props);
expose({
activeNames,
setActiveNames
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(rootKls))
}, [
renderSlot(_ctx.$slots, "default")
], 2);
};
}
});
var Collapse = _export_sfc(_sfc_main20, [["__file", "collapse.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/collapse-item.mjs
var collapseItemProps = buildProps({
title: {
type: String,
default: ""
},
name: {
type: definePropType([String, Number]),
default: void 0
},
icon: {
type: iconPropType,
default: arrow_right_default
},
disabled: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/use-collapse-item.mjs
var useCollapseItem = (props) => {
const collapse = inject(collapseContextKey);
const { namespace } = useNamespace("collapse");
const focusing = ref(false);
const isClick = ref(false);
const idInjection = useIdInjection();
const id = computed(() => idInjection.current++);
const name = computed(() => {
var _a;
return (_a = props.name) != null ? _a : `${namespace.value}-id-${idInjection.prefix}-${unref(id)}`;
});
const isActive = computed(() => collapse == null ? void 0 : collapse.activeNames.value.includes(unref(name)));
const handleFocus = () => {
setTimeout(() => {
if (!isClick.value) {
focusing.value = true;
} else {
isClick.value = false;
}
}, 50);
};
const handleHeaderClick = (e) => {
if (props.disabled)
return;
const target2 = e.target;
if (target2 == null ? void 0 : target2.closest("input, textarea, select"))
return;
collapse == null ? void 0 : collapse.handleItemClick(unref(name));
focusing.value = false;
isClick.value = true;
};
const handleEnterClick = (e) => {
const target2 = e.target;
if (target2 == null ? void 0 : target2.closest("input, textarea, select"))
return;
e.preventDefault();
collapse == null ? void 0 : collapse.handleItemClick(unref(name));
};
return {
focusing,
id,
isActive,
handleFocus,
handleHeaderClick,
handleEnterClick
};
};
var useCollapseItemDOM = (props, { focusing, isActive, id }) => {
const ns = useNamespace("collapse");
const rootKls = computed(() => [
ns.b("item"),
ns.is("active", unref(isActive)),
ns.is("disabled", props.disabled)
]);
const headKls = computed(() => [
ns.be("item", "header"),
ns.is("active", unref(isActive)),
{ focusing: unref(focusing) && !props.disabled }
]);
const arrowKls = computed(() => [
ns.be("item", "arrow"),
ns.is("active", unref(isActive))
]);
const itemTitleKls = computed(() => [ns.be("item", "title")]);
const itemWrapperKls = computed(() => ns.be("item", "wrap"));
const itemContentKls = computed(() => ns.be("item", "content"));
const scopedContentId = computed(() => ns.b(`content-${unref(id)}`));
const scopedHeadId = computed(() => ns.b(`head-${unref(id)}`));
return {
itemTitleKls,
arrowKls,
headKls,
rootKls,
itemWrapperKls,
itemContentKls,
scopedContentId,
scopedHeadId
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs
var __default__21 = defineComponent({
name: "ElCollapseItem"
});
var _sfc_main21 = defineComponent({
...__default__21,
props: collapseItemProps,
setup(__props, { expose }) {
const props = __props;
const {
focusing,
id,
isActive,
handleFocus,
handleHeaderClick,
handleEnterClick
} = useCollapseItem(props);
const {
arrowKls,
headKls,
rootKls,
itemTitleKls,
itemWrapperKls,
itemContentKls,
scopedContentId,
scopedHeadId
} = useCollapseItemDOM(props, { focusing, isActive, id });
expose({
isActive
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(rootKls))
}, [
createBaseVNode("div", {
id: unref(scopedHeadId),
class: normalizeClass(unref(headKls)),
"aria-expanded": unref(isActive),
"aria-controls": unref(scopedContentId),
"aria-describedby": unref(scopedContentId),
tabindex: _ctx.disabled ? void 0 : 0,
"aria-disabled": _ctx.disabled,
role: "button",
onClick: unref(handleHeaderClick),
onKeydown: withKeys(withModifiers(unref(handleEnterClick), ["stop"]), ["space", "enter"]),
onFocus: unref(handleFocus),
onBlur: ($event) => focusing.value = false
}, [
createBaseVNode("span", {
class: normalizeClass(unref(itemTitleKls))
}, [
renderSlot(_ctx.$slots, "title", { isActive: unref(isActive) }, () => [
createTextVNode(toDisplayString(_ctx.title), 1)
])
], 2),
renderSlot(_ctx.$slots, "icon", { isActive: unref(isActive) }, () => [
createVNode(unref(ElIcon), {
class: normalizeClass(unref(arrowKls))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
}, 8, ["class"])
])
], 42, ["id", "aria-expanded", "aria-controls", "aria-describedby", "tabindex", "aria-disabled", "onClick", "onKeydown", "onFocus", "onBlur"]),
createVNode(unref(ElCollapseTransition), null, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
id: unref(scopedContentId),
role: "region",
class: normalizeClass(unref(itemWrapperKls)),
"aria-hidden": !unref(isActive),
"aria-labelledby": unref(scopedHeadId)
}, [
createBaseVNode("div", {
class: normalizeClass(unref(itemContentKls))
}, [
renderSlot(_ctx.$slots, "default")
], 2)
], 10, ["id", "aria-hidden", "aria-labelledby"]), [
[vShow, unref(isActive)]
])
]),
_: 3
})
], 2);
};
}
});
var CollapseItem = _export_sfc(_sfc_main21, [["__file", "collapse-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collapse/index.mjs
var ElCollapse = withInstall(Collapse, {
CollapseItem
});
var ElCollapseItem = withNoopInstall(CollapseItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/props/slider.mjs
var alphaSliderProps = buildProps({
color: {
type: definePropType(Object),
required: true
},
vertical: Boolean,
disabled: Boolean
});
var hueSliderProps = alphaSliderProps;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/utils/draggable.mjs
var isDragging = false;
function draggable(element, options) {
if (!isClient)
return;
const moveFn = function(event) {
var _a;
(_a = options.drag) == null ? void 0 : _a.call(options, event);
};
const upFn = function(event) {
var _a;
document.removeEventListener("mousemove", moveFn);
document.removeEventListener("mouseup", upFn);
document.removeEventListener("touchmove", moveFn);
document.removeEventListener("touchend", upFn);
document.onselectstart = null;
document.ondragstart = null;
isDragging = false;
(_a = options.end) == null ? void 0 : _a.call(options, event);
};
const downFn = function(event) {
var _a;
if (isDragging)
return;
document.onselectstart = () => false;
document.ondragstart = () => false;
document.addEventListener("mousemove", moveFn);
document.addEventListener("mouseup", upFn);
document.addEventListener("touchmove", moveFn);
document.addEventListener("touchend", upFn);
isDragging = true;
(_a = options.start) == null ? void 0 : _a.call(options, event);
};
element.addEventListener("mousedown", downFn);
element.addEventListener("touchstart", downFn, { passive: false });
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/position.mjs
var getOffsetTop = (el) => {
let offset2 = 0;
let parent = el;
while (parent) {
offset2 += parent.offsetTop;
parent = parent.offsetParent;
}
return offset2;
};
var getOffsetTopDistance = (el, containerEl) => {
return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));
};
var getClientXY = (event) => {
let clientX;
let clientY;
if (event.type === "touchend") {
clientY = event.changedTouches[0].clientY;
clientX = event.changedTouches[0].clientX;
} else if (event.type.startsWith("touch")) {
clientY = event.touches[0].clientY;
clientX = event.touches[0].clientX;
} else {
clientY = event.clientY;
clientX = event.clientX;
}
return {
clientX,
clientY
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/composables/use-slider.mjs
var useSlider = (props, { key, minValue: minValue3, maxValue: maxValue3 }) => {
const instance = getCurrentInstance();
const thumb = shallowRef();
const bar = shallowRef();
const currentValue = computed(() => props.color.get(key));
function handleClick(event) {
var _a;
if (props.disabled)
return;
const target2 = event.target;
if (target2 !== thumb.value) {
handleDrag(event);
}
(_a = thumb.value) == null ? void 0 : _a.focus();
}
function handleDrag(event) {
if (!bar.value || !thumb.value || props.disabled)
return;
const el = instance.vnode.el;
const rect = el.getBoundingClientRect();
const { clientX, clientY } = getClientXY(event);
let value;
if (!props.vertical) {
let left = clientX - rect.left;
left = Math.max(thumb.value.offsetWidth / 2, left);
left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);
value = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * maxValue3);
} else {
let top = clientY - rect.top;
top = Math.max(thumb.value.offsetHeight / 2, top);
top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
value = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * maxValue3);
}
props.color.set(key, value);
}
function handleKeydown(event) {
if (props.disabled)
return;
const { shiftKey } = event;
const code = getEventCode(event);
const step = shiftKey ? 10 : 1;
const reverse = key === "hue" ? -1 : 1;
let isPreventDefault = true;
switch (code) {
case EVENT_CODE.left:
case EVENT_CODE.down:
incrementPosition(-step * reverse);
break;
case EVENT_CODE.right:
case EVENT_CODE.up:
incrementPosition(step * reverse);
break;
case EVENT_CODE.home:
props.color.set(key, key === "hue" ? maxValue3 : minValue3);
break;
case EVENT_CODE.end:
props.color.set(key, key === "hue" ? minValue3 : maxValue3);
break;
case EVENT_CODE.pageDown:
incrementPosition(-4 * reverse);
break;
case EVENT_CODE.pageUp:
incrementPosition(4 * reverse);
break;
default:
isPreventDefault = false;
break;
}
isPreventDefault && event.preventDefault();
}
function incrementPosition(step) {
let next = currentValue.value + step;
next = next < minValue3 ? minValue3 : next > maxValue3 ? maxValue3 : next;
props.color.set(key, next);
}
return {
thumb,
bar,
currentValue,
handleDrag,
handleClick,
handleKeydown
};
};
var useSliderDOM = (props, {
namespace,
maxValue: maxValue3,
bar,
thumb,
currentValue,
handleDrag,
getBackground
}) => {
const instance = getCurrentInstance();
const ns = useNamespace(namespace);
const thumbLeft = ref(0);
const thumbTop = ref(0);
const background = ref();
function getThumbLeft() {
if (!thumb.value)
return 0;
if (props.vertical)
return 0;
const el = instance.vnode.el;
const value = currentValue.value;
if (!el)
return 0;
return Math.round(value * (el.offsetWidth - thumb.value.offsetWidth / 2) / maxValue3);
}
function getThumbTop() {
if (!thumb.value)
return 0;
const el = instance.vnode.el;
if (!props.vertical)
return 0;
const value = currentValue.value;
if (!el)
return 0;
return Math.round(value * (el.offsetHeight - thumb.value.offsetHeight / 2) / maxValue3);
}
function update() {
thumbLeft.value = getThumbLeft();
thumbTop.value = getThumbTop();
background.value = getBackground == null ? void 0 : getBackground();
}
onMounted(() => {
if (!bar.value || !thumb.value)
return;
const dragConfig = {
drag: (event) => {
handleDrag(event);
},
end: (event) => {
handleDrag(event);
}
};
draggable(bar.value, dragConfig);
draggable(thumb.value, dragConfig);
update();
});
watch(currentValue, () => update());
watch(() => props.color.value, () => update());
const rootKls = computed(() => [
ns.b(),
ns.is("vertical", props.vertical),
ns.is("disabled", props.disabled)
]);
const barKls = computed(() => ns.e("bar"));
const thumbKls = computed(() => ns.e("thumb"));
const barStyle = computed(() => ({ background: background.value }));
const thumbStyle = computed(() => ({
left: addUnit(thumbLeft.value),
top: addUnit(thumbTop.value)
}));
return {
rootKls,
barKls,
barStyle,
thumbKls,
thumbStyle,
thumbLeft,
thumbTop,
update
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.mjs
var minValue = 0;
var maxValue = 100;
var __default__22 = defineComponent({
name: "ElColorAlphaSlider"
});
var _sfc_main22 = defineComponent({
...__default__22,
props: alphaSliderProps,
setup(__props, { expose }) {
const props = __props;
const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, { key: "alpha", minValue, maxValue });
const { rootKls, barKls, barStyle, thumbKls, thumbStyle, update } = useSliderDOM(props, {
namespace: "color-alpha-slider",
maxValue,
currentValue,
bar,
thumb,
handleDrag,
getBackground
});
const { t } = useLocale();
const ariaLabel = computed(() => t("el.colorpicker.alphaLabel"));
const ariaValuetext = computed(() => {
return t("el.colorpicker.alphaDescription", {
alpha: currentValue.value,
color: props.color.value
});
});
function getBackground() {
if (props.color && props.color.value) {
const { r, g, b: b2 } = props.color.toRgb();
return `linear-gradient(to right, rgba(${r}, ${g}, ${b2}, 0) 0%, rgba(${r}, ${g}, ${b2}, 1) 100%)`;
}
return "";
}
expose({
update,
bar,
thumb
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(rootKls))
}, [
createBaseVNode("div", {
ref_key: "bar",
ref: bar,
class: normalizeClass(unref(barKls)),
style: normalizeStyle(unref(barStyle)),
onClick: unref(handleClick)
}, null, 14, ["onClick"]),
createBaseVNode("div", {
ref_key: "thumb",
ref: thumb,
class: normalizeClass(unref(thumbKls)),
style: normalizeStyle(unref(thumbStyle)),
"aria-label": unref(ariaLabel),
"aria-valuenow": unref(currentValue),
"aria-valuetext": unref(ariaValuetext),
"aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
"aria-valuemin": minValue,
"aria-valuemax": maxValue,
role: "slider",
tabindex: "0",
onKeydown: unref(handleKeydown)
}, null, 46, ["aria-label", "aria-valuenow", "aria-valuetext", "aria-orientation", "onKeydown"])
], 2);
};
}
});
var AlphaSlider = _export_sfc(_sfc_main22, [["__file", "alpha-slider.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.mjs
var minValue2 = 0;
var maxValue2 = 360;
var __default__23 = defineComponent({
name: "ElColorHueSlider"
});
var _sfc_main23 = defineComponent({
...__default__23,
props: hueSliderProps,
setup(__props, { expose }) {
const props = __props;
const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, { key: "hue", minValue: minValue2, maxValue: maxValue2 });
const { rootKls, barKls, thumbKls, thumbStyle, thumbTop, update } = useSliderDOM(props, {
namespace: "color-hue-slider",
maxValue: maxValue2,
currentValue,
bar,
thumb,
handleDrag
});
const { t } = useLocale();
const ariaLabel = computed(() => t("el.colorpicker.hueLabel"));
const ariaValuetext = computed(() => {
return t("el.colorpicker.hueDescription", {
hue: currentValue.value,
color: props.color.value
});
});
expose({
bar,
thumb,
thumbTop,
update
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(rootKls))
}, [
createBaseVNode("div", {
ref_key: "bar",
ref: bar,
class: normalizeClass(unref(barKls)),
onClick: unref(handleClick)
}, null, 10, ["onClick"]),
createBaseVNode("div", {
ref_key: "thumb",
ref: thumb,
class: normalizeClass(unref(thumbKls)),
style: normalizeStyle(unref(thumbStyle)),
"aria-label": unref(ariaLabel),
"aria-valuenow": unref(currentValue),
"aria-valuetext": unref(ariaValuetext),
"aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
"aria-valuemin": minValue2,
"aria-valuemax": maxValue2,
role: "slider",
tabindex: "0",
onKeydown: unref(handleKeydown)
}, null, 46, ["aria-label", "aria-valuenow", "aria-valuetext", "aria-orientation", "onKeydown"])
], 2);
};
}
});
var HueSlider = _export_sfc(_sfc_main23, [["__file", "hue-slider.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/props/predefine.mjs
var predefineProps = buildProps({
colors: {
type: definePropType(Array),
required: true
},
color: {
type: definePropType(Object),
required: true
},
enableAlpha: {
type: Boolean,
required: true
},
disabled: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel.mjs
init_shared_esm_bundler();
var colorPickerPanelProps = buildProps({
modelValue: {
type: definePropType(String),
default: void 0
},
border: {
type: Boolean,
default: true
},
showAlpha: Boolean,
colorFormat: String,
disabled: Boolean,
predefine: {
type: definePropType(Array)
},
validateEvent: {
type: Boolean,
default: true
}
});
var colorPickerPanelEmits = {
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil_default(val)
};
var ROOT_COMMON_COLOR_INJECTION_KEY = Symbol("colorCommonPickerKey");
var colorPickerPanelContextKey = Symbol("colorPickerPanelContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/utils/color.mjs
init_shared_esm_bundler();
var Color = class {
constructor(options = {}) {
this._hue = 0;
this._saturation = 100;
this._value = 100;
this._alpha = 100;
this._tiny = new TinyColor();
this._isValid = false;
this.enableAlpha = false;
this.format = "";
this.value = "";
for (const option in options) {
if (hasOwn(options, option)) {
this[option] = options[option];
}
}
if (options.value) {
this.fromString(options.value);
} else {
this.doOnChange();
}
}
set(prop, value) {
if (arguments.length === 1 && typeof prop === "object") {
for (const p2 in prop) {
if (hasOwn(prop, p2)) {
this.set(p2, prop[p2]);
}
}
return;
}
this[`_${prop}`] = value;
this._isValid = true;
this.doOnChange();
}
get(prop) {
if (["hue", "saturation", "value", "alpha"].includes(prop)) {
return Math.round(this[`_${prop}`]);
}
return this[`_${prop}`];
}
toRgb() {
return this._isValid ? this._tiny.toRgb() : { r: 255, g: 255, b: 255, a: 0 };
}
fromString(value) {
const color = new TinyColor(value);
this._isValid = color.isValid;
if (color.isValid) {
const { h: h3, s: s2, v: v2, a: a2 } = color.toHsv();
this._hue = h3;
this._saturation = s2 * 100;
this._value = v2 * 100;
this._alpha = a2 * 100;
} else {
this._hue = 0;
this._saturation = 100;
this._value = 100;
this._alpha = 100;
}
this.doOnChange();
}
clear() {
this._isValid = false;
this.value = "";
this._hue = 0;
this._saturation = 100;
this._value = 100;
this._alpha = 100;
}
compare(color) {
const compareColor = new TinyColor({
h: color._hue,
s: color._saturation / 100,
v: color._value / 100,
a: color._alpha / 100
});
return this._tiny.equals(compareColor);
}
doOnChange() {
const { _hue, _saturation, _value, _alpha, format: format2, enableAlpha } = this;
let _format = format2 || (enableAlpha ? "rgb" : "hex");
if (format2 === "hex" && enableAlpha) {
_format = "hex8";
}
this._tiny = new TinyColor({
h: _hue,
s: _saturation / 100,
v: _value / 100,
a: _alpha / 100
});
this.value = this._isValid ? this._tiny.toString(_format) : "";
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/composables/use-predefine.mjs
var usePredefine = (props) => {
const { currentColor } = inject(colorPickerPanelContextKey);
const rgbaColors = ref(parseColors(props.colors, props.color));
watch(() => currentColor.value, (val) => {
const color = new Color({
value: val,
enableAlpha: props.enableAlpha
});
rgbaColors.value.forEach((item) => {
item.selected = color.compare(item);
});
});
watchEffect(() => {
rgbaColors.value = parseColors(props.colors, props.color);
});
function handleSelect(index) {
props.color.fromString(props.colors[index]);
}
function parseColors(colors, color) {
return colors.map((value) => {
const c2 = new Color({
value,
enableAlpha: props.enableAlpha
});
c2.selected = c2.compare(color);
return c2;
});
}
return {
rgbaColors,
handleSelect
};
};
var usePredefineDOM = (props) => {
const ns = useNamespace("color-predefine");
const rootKls = computed(() => [ns.b(), ns.is("disabled", props.disabled)]);
const colorsKls = computed(() => ns.e("colors"));
function colorSelectorKls(item) {
return [
ns.e("color-selector"),
ns.is("alpha", item.get("alpha") < 100),
{ selected: item.selected }
];
}
return {
rootKls,
colorsKls,
colorSelectorKls
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.mjs
var __default__24 = defineComponent({
name: "ElColorPredefine"
});
var _sfc_main24 = defineComponent({
...__default__24,
props: predefineProps,
setup(__props) {
const props = __props;
const { rgbaColors, handleSelect } = usePredefine(props);
const { rootKls, colorsKls, colorSelectorKls } = usePredefineDOM(props);
const { t } = useLocale();
const ariaLabel = (value) => {
return t("el.colorpicker.predefineDescription", { value });
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(rootKls))
}, [
createBaseVNode("div", {
class: normalizeClass(unref(colorsKls))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rgbaColors), (item, index) => {
return openBlock(), createElementBlock("button", {
key: _ctx.colors[index],
type: "button",
disabled: _ctx.disabled,
"aria-label": ariaLabel(item.value),
class: normalizeClass(unref(colorSelectorKls)(item)),
onClick: ($event) => unref(handleSelect)(index)
}, [
createBaseVNode("div", {
style: normalizeStyle({ backgroundColor: item.value })
}, null, 4)
], 10, ["disabled", "aria-label", "onClick"]);
}), 128))
], 2)
], 2);
};
}
});
var Predefine = _export_sfc(_sfc_main24, [["__file", "predefine.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/props/sv-panel.mjs
var svPanelProps = buildProps({
color: {
type: definePropType(Object),
required: true
},
disabled: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/composables/use-sv-panel.mjs
var useSvPanel = (props) => {
const instance = getCurrentInstance();
const cursorRef = ref();
const cursorTop = ref(0);
const cursorLeft = ref(0);
const background = ref("hsl(0, 100%, 50%)");
const saturation = computed(() => props.color.get("saturation"));
const brightness = computed(() => props.color.get("value"));
const hue = computed(() => props.color.get("hue"));
function handleClick(event) {
var _a;
if (props.disabled)
return;
const target2 = event.target;
if (target2 !== cursorRef.value) {
handleDrag(event);
}
(_a = cursorRef.value) == null ? void 0 : _a.focus({ preventScroll: true });
}
function handleDrag(event) {
if (props.disabled)
return;
const el = instance.vnode.el;
const rect = el.getBoundingClientRect();
const { clientX, clientY } = getClientXY(event);
let left = clientX - rect.left;
let top = clientY - rect.top;
left = Math.max(0, left);
left = Math.min(left, rect.width);
top = Math.max(0, top);
top = Math.min(top, rect.height);
cursorLeft.value = left;
cursorTop.value = top;
props.color.set({
saturation: left / rect.width * 100,
value: 100 - top / rect.height * 100
});
}
function handleKeydown(event) {
if (props.disabled)
return;
const { shiftKey } = event;
const code = getEventCode(event);
const step = shiftKey ? 10 : 1;
let isPreventDefault = true;
switch (code) {
case EVENT_CODE.left:
incrementSaturation(-step);
break;
case EVENT_CODE.right:
incrementSaturation(step);
break;
case EVENT_CODE.up:
incrementBrightness(step);
break;
case EVENT_CODE.down:
incrementBrightness(-step);
break;
default:
isPreventDefault = false;
break;
}
isPreventDefault && event.preventDefault();
}
function incrementSaturation(step) {
let next = saturation.value + step;
next = next < 0 ? 0 : next > 100 ? 100 : next;
props.color.set("saturation", next);
}
function incrementBrightness(step) {
let next = brightness.value + step;
next = next < 0 ? 0 : next > 100 ? 100 : next;
props.color.set("value", next);
}
return {
cursorRef,
cursorTop,
cursorLeft,
background,
saturation,
brightness,
hue,
handleClick,
handleDrag,
handleKeydown
};
};
var useSvPanelDOM = (props, {
cursorTop,
cursorLeft,
background,
handleDrag
}) => {
const instance = getCurrentInstance();
const ns = useNamespace("color-svpanel");
function update() {
const saturation = props.color.get("saturation");
const brightness = props.color.get("value");
const el = instance.vnode.el;
const { clientWidth: width, clientHeight: height } = el;
cursorLeft.value = saturation * width / 100;
cursorTop.value = (100 - brightness) * height / 100;
background.value = `hsl(${props.color.get("hue")}, 100%, 50%)`;
}
onMounted(() => {
draggable(instance.vnode.el, {
drag: (event) => {
handleDrag(event);
},
end: (event) => {
handleDrag(event);
}
});
update();
});
watch([
() => props.color.get("hue"),
() => props.color.get("value"),
() => props.color.value
], () => update());
const rootKls = computed(() => ns.b());
const cursorKls = computed(() => ns.e("cursor"));
const rootStyle = computed(() => ({
backgroundColor: background.value
}));
const cursorStyle = computed(() => ({
top: addUnit(cursorTop.value),
left: addUnit(cursorLeft.value)
}));
return {
rootKls,
cursorKls,
rootStyle,
cursorStyle,
update
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.mjs
var __default__25 = defineComponent({
name: "ElSvPanel"
});
var _sfc_main25 = defineComponent({
...__default__25,
props: svPanelProps,
setup(__props, { expose }) {
const props = __props;
const {
cursorRef,
cursorTop,
cursorLeft,
background,
saturation,
brightness,
handleClick,
handleDrag,
handleKeydown
} = useSvPanel(props);
const { rootKls, cursorKls, rootStyle, cursorStyle, update } = useSvPanelDOM(props, {
cursorTop,
cursorLeft,
background,
handleDrag
});
const { t } = useLocale();
const ariaLabel = computed(() => t("el.colorpicker.svLabel"));
const ariaValuetext = computed(() => {
return t("el.colorpicker.svDescription", {
saturation: saturation.value,
brightness: brightness.value,
color: props.color.value
});
});
expose({
update
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(rootKls)),
style: normalizeStyle(unref(rootStyle)),
onClick: unref(handleClick)
}, [
createBaseVNode("div", {
ref_key: "cursorRef",
ref: cursorRef,
class: normalizeClass(unref(cursorKls)),
style: normalizeStyle(unref(cursorStyle)),
tabindex: "0",
role: "slider",
"aria-valuemin": "0,0",
"aria-valuemax": "100,100",
"aria-label": unref(ariaLabel),
"aria-valuenow": `${unref(saturation)},${unref(brightness)}`,
"aria-valuetext": unref(ariaValuetext),
onKeydown: unref(handleKeydown)
}, null, 46, ["aria-label", "aria-valuenow", "aria-valuetext", "onKeydown"])
], 14, ["onClick"]);
};
}
});
var SvPanel = _export_sfc(_sfc_main25, [["__file", "sv-panel.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/composables/use-common-color.mjs
var useCommonColor = (props, emit) => {
const color = reactive(new Color({
enableAlpha: props.showAlpha,
format: props.colorFormat || "",
value: props.modelValue
}));
watch(() => [props.colorFormat, props.showAlpha], () => {
color.enableAlpha = props.showAlpha;
color.format = props.colorFormat || color.format;
color.doOnChange();
emit(UPDATE_MODEL_EVENT, color.value);
});
return {
color
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel2.mjs
var __default__26 = defineComponent({
name: "ElColorPickerPanel"
});
var _sfc_main26 = defineComponent({
...__default__26,
props: colorPickerPanelProps,
emits: colorPickerPanelEmits,
setup(__props, { expose, emit }) {
const props = __props;
const ns = useNamespace("color-picker-panel");
const { formItem } = useFormItem();
const disabled = useFormDisabled();
const hueRef = ref();
const svRef = ref();
const alphaRef = ref();
const inputRef = ref();
const customInput = ref("");
const { color } = inject(ROOT_COMMON_COLOR_INJECTION_KEY, () => useCommonColor(props, emit), true);
function handleConfirm() {
color.fromString(customInput.value);
if (color.value !== customInput.value) {
customInput.value = color.value;
}
}
function handleFocusout() {
var _a;
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
}
}
function update() {
var _a, _b, _c;
(_a = hueRef.value) == null ? void 0 : _a.update();
(_b = svRef.value) == null ? void 0 : _b.update();
(_c = alphaRef.value) == null ? void 0 : _c.update();
}
onMounted(() => {
if (props.modelValue) {
customInput.value = color.value;
}
nextTick(update);
});
watch(() => props.modelValue, (newVal) => {
if (newVal !== color.value) {
newVal ? color.fromString(newVal) : color.clear();
}
});
watch(() => color.value, (val) => {
emit(UPDATE_MODEL_EVENT, val);
customInput.value = val;
if (props.validateEvent) {
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
}
});
provide(colorPickerPanelContextKey, {
currentColor: computed(() => color.value)
});
expose({
color,
inputRef,
update
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([unref(ns).b(), unref(ns).is("disabled", unref(disabled)), unref(ns).is("border", _ctx.border)]),
onFocusout: handleFocusout
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("wrapper"))
}, [
createVNode(HueSlider, {
ref_key: "hueRef",
ref: hueRef,
class: "hue-slider",
color: unref(color),
vertical: "",
disabled: unref(disabled)
}, null, 8, ["color", "disabled"]),
createVNode(SvPanel, {
ref_key: "svRef",
ref: svRef,
color: unref(color),
disabled: unref(disabled)
}, null, 8, ["color", "disabled"])
], 2),
_ctx.showAlpha ? (openBlock(), createBlock(AlphaSlider, {
key: 0,
ref_key: "alphaRef",
ref: alphaRef,
color: unref(color),
disabled: unref(disabled)
}, null, 8, ["color", "disabled"])) : createCommentVNode("v-if", true),
_ctx.predefine ? (openBlock(), createBlock(Predefine, {
key: 1,
ref: "predefine",
"enable-alpha": _ctx.showAlpha,
color: unref(color),
colors: _ctx.predefine,
disabled: unref(disabled)
}, null, 8, ["enable-alpha", "color", "colors", "disabled"])) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("footer"))
}, [
createVNode(unref(ElInput), {
ref_key: "inputRef",
ref: inputRef,
modelValue: customInput.value,
"onUpdate:modelValue": ($event) => customInput.value = $event,
"validate-event": false,
size: "small",
disabled: unref(disabled),
onChange: handleConfirm
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]),
renderSlot(_ctx.$slots, "footer")
], 2)
], 34);
};
}
});
var ColorPickerPanel = _export_sfc(_sfc_main26, [["__file", "color-picker-panel.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker-panel/index.mjs
var ElColorPickerPanel = withInstall(ColorPickerPanel);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker/src/color-picker.mjs
init_shared_esm_bundler();
var colorPickerProps = buildProps({
persistent: {
type: Boolean,
default: true
},
modelValue: {
type: definePropType(String),
default: void 0
},
id: String,
showAlpha: Boolean,
colorFormat: String,
disabled: Boolean,
size: useSizeProp,
popperClass: useTooltipContentProps.popperClass,
popperStyle: useTooltipContentProps.popperStyle,
tabindex: {
type: [String, Number],
default: 0
},
teleported: useTooltipContentProps.teleported,
appendTo: useTooltipContentProps.appendTo,
predefine: {
type: definePropType(Array)
},
validateEvent: {
type: Boolean,
default: true
},
...useEmptyValuesProps,
...useAriaProps(["ariaLabel"])
});
var colorPickerEmits = {
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil_default(val),
[CHANGE_EVENT]: (val) => isString(val) || isNil_default(val),
activeChange: (val) => isString(val) || isNil_default(val),
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker/src/color-picker2.mjs
var __default__27 = defineComponent({
name: "ElColorPicker"
});
var _sfc_main27 = defineComponent({
...__default__27,
props: colorPickerProps,
emits: colorPickerEmits,
setup(__props, { expose, emit }) {
const props = __props;
const { t } = useLocale();
const ns = useNamespace("color");
const { formItem } = useFormItem();
const colorSize = useFormSize();
const colorDisabled = useFormDisabled();
const { valueOnClear, isEmptyValue: isEmptyValue2 } = useEmptyValues(props, null);
const commonColor = useCommonColor(props, emit);
const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {
formItemContext: formItem
});
const popper = ref();
const triggerRef2 = ref();
const pickerPanelRef = ref();
const showPicker = ref(false);
const showPanelColor = ref(false);
let shouldActiveChange = true;
const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef2, {
disabled: colorDisabled,
beforeBlur(event) {
var _a;
return (_a = popper.value) == null ? void 0 : _a.isFocusInsideContent(event);
},
afterBlur() {
var _a;
setShowPicker(false);
resetColor();
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
}
}
});
const color = reactiveComputed(() => {
var _a, _b;
return (_b = (_a = pickerPanelRef.value) == null ? void 0 : _a.color) != null ? _b : commonColor.color;
});
const panelProps = computed(() => pick_default(props, Object.keys(colorPickerPanelProps)));
const displayedColor = computed(() => {
if (!props.modelValue && !showPanelColor.value) {
return "transparent";
}
return displayedRgb(color, props.showAlpha);
});
const currentColor = computed(() => {
return !props.modelValue && !showPanelColor.value ? "" : color.value;
});
const buttonAriaLabel = computed(() => {
return !isLabeledByFormItem.value ? props.ariaLabel || t("el.colorpicker.defaultLabel") : void 0;
});
const buttonAriaLabelledby = computed(() => {
return isLabeledByFormItem.value ? formItem == null ? void 0 : formItem.labelId : void 0;
});
const btnKls = computed(() => {
return [
ns.b("picker"),
ns.is("disabled", colorDisabled.value),
ns.bm("picker", colorSize.value),
ns.is("focused", isFocused.value)
];
});
function displayedRgb(color2, showAlpha) {
const { r, g, b: b2, a: a2 } = color2.toRgb();
return showAlpha ? `rgba(${r}, ${g}, ${b2}, ${a2})` : `rgb(${r}, ${g}, ${b2})`;
}
function setShowPicker(value) {
showPicker.value = value;
}
const debounceSetShowPicker = debounce_default(setShowPicker, 100, { leading: true });
function show() {
if (colorDisabled.value)
return;
setShowPicker(true);
}
function hide() {
debounceSetShowPicker(false);
resetColor();
}
function resetColor() {
nextTick(() => {
if (props.modelValue) {
color.fromString(props.modelValue);
} else {
color.value = "";
nextTick(() => {
showPanelColor.value = false;
});
}
});
}
function handleTrigger() {
if (colorDisabled.value)
return;
if (showPicker.value) {
resetColor();
}
debounceSetShowPicker(!showPicker.value);
}
function confirmValue() {
const value = isEmptyValue2(color.value) ? valueOnClear.value : color.value;
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value);
if (props.validateEvent) {
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
}
debounceSetShowPicker(false);
nextTick(() => {
const newColor = new Color({
enableAlpha: props.showAlpha,
format: props.colorFormat || "",
value: props.modelValue
});
if (!color.compare(newColor)) {
resetColor();
}
});
}
function clear() {
debounceSetShowPicker(false);
emit(UPDATE_MODEL_EVENT, valueOnClear.value);
emit(CHANGE_EVENT, valueOnClear.value);
if (props.modelValue !== valueOnClear.value && props.validateEvent) {
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
}
resetColor();
}
function handleShowTooltip() {
var _a, _b;
(_b = (_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.inputRef) == null ? void 0 : _b.focus();
}
function handleClickOutside() {
if (!showPicker.value)
return;
hide();
isFocused.value && focus();
}
function handleEsc(event) {
event.preventDefault();
event.stopPropagation();
setShowPicker(false);
resetColor();
}
function handleKeyDown(event) {
const code = getEventCode(event);
switch (code) {
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
case EVENT_CODE.space:
event.preventDefault();
event.stopPropagation();
show();
break;
case EVENT_CODE.esc:
handleEsc(event);
break;
}
}
function focus() {
triggerRef2.value.focus();
}
function blur() {
triggerRef2.value.blur();
}
watch(() => currentColor.value, (val) => {
shouldActiveChange && emit("activeChange", val);
shouldActiveChange = true;
});
watch(() => color.value, () => {
if (!props.modelValue && !showPanelColor.value) {
showPanelColor.value = true;
}
});
watch(() => props.modelValue, (newVal) => {
if (!newVal) {
showPanelColor.value = false;
} else if (newVal && newVal !== color.value) {
shouldActiveChange = false;
color.fromString(newVal);
}
});
watch(() => showPicker.value, () => {
var _a;
nextTick((_a = pickerPanelRef.value) == null ? void 0 : _a.update);
});
provide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor);
expose({
color,
show,
hide,
focus,
blur
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTooltip), {
ref_key: "popper",
ref: popper,
visible: showPicker.value,
"show-arrow": false,
"fallback-placements": ["bottom", "top", "right", "left"],
offset: 0,
"gpu-acceleration": false,
"popper-class": [unref(ns).be("picker", "panel"), _ctx.popperClass],
"popper-style": _ctx.popperStyle,
"stop-popper-mouse-event": false,
pure: "",
loop: "",
role: "dialog",
effect: "light",
trigger: "click",
teleported: _ctx.teleported,
transition: `${unref(ns).namespace.value}-zoom-in-top`,
persistent: _ctx.persistent,
"append-to": _ctx.appendTo,
onShow: handleShowTooltip,
onHide: ($event) => setShowPicker(false)
}, {
content: withCtx(() => [
withDirectives((openBlock(), createBlock(unref(ElColorPickerPanel), mergeProps({
ref_key: "pickerPanelRef",
ref: pickerPanelRef
}, unref(panelProps), {
border: false,
"validate-event": false,
onKeydown: withKeys(handleEsc, ["esc"])
}), {
footer: withCtx(() => [
createBaseVNode("div", null, [
createVNode(unref(ElButton), {
class: normalizeClass(unref(ns).be("footer", "link-btn")),
text: "",
size: "small",
onClick: clear
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("el.colorpicker.clear")), 1)
]),
_: 1
}, 8, ["class"]),
createVNode(unref(ElButton), {
plain: "",
size: "small",
class: normalizeClass(unref(ns).be("footer", "btn")),
onClick: confirmValue
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("el.colorpicker.confirm")), 1)
]),
_: 1
}, 8, ["class"])
])
]),
_: 1
}, 16, ["onKeydown"])), [
[unref(ClickOutside), handleClickOutside, triggerRef2.value]
])
]),
default: withCtx(() => [
createBaseVNode("div", mergeProps({
id: unref(buttonId),
ref_key: "triggerRef",
ref: triggerRef2
}, _ctx.$attrs, {
class: unref(btnKls),
role: "button",
"aria-label": unref(buttonAriaLabel),
"aria-labelledby": unref(buttonAriaLabelledby),
"aria-description": unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }),
"aria-disabled": unref(colorDisabled),
tabindex: unref(colorDisabled) ? void 0 : _ctx.tabindex,
onKeydown: handleKeyDown,
onFocus: unref(handleFocus),
onBlur: unref(handleBlur)
}), [
createBaseVNode("div", {
class: normalizeClass(unref(ns).be("picker", "trigger")),
onClick: handleTrigger
}, [
createBaseVNode("span", {
class: normalizeClass([unref(ns).be("picker", "color"), unref(ns).is("alpha", _ctx.showAlpha)])
}, [
createBaseVNode("span", {
class: normalizeClass(unref(ns).be("picker", "color-inner")),
style: normalizeStyle({
backgroundColor: unref(displayedColor)
})
}, [
withDirectives(createVNode(unref(ElIcon), {
class: normalizeClass([unref(ns).be("picker", "icon"), unref(ns).is("icon-arrow-down")])
}, {
default: withCtx(() => [
createVNode(unref(arrow_down_default))
]),
_: 1
}, 8, ["class"]), [
[vShow, _ctx.modelValue || showPanelColor.value]
]),
withDirectives(createVNode(unref(ElIcon), {
class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")])
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class"]), [
[vShow, !_ctx.modelValue && !showPanelColor.value]
])
], 6)
], 2)
], 2)
], 16, ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex", "onFocus", "onBlur"])
]),
_: 1
}, 8, ["visible", "popper-class", "popper-style", "teleported", "transition", "persistent", "append-to", "onHide"]);
};
}
});
var ColorPicker = _export_sfc(_sfc_main27, [["__file", "color-picker.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/color-picker/index.mjs
var ElColorPicker = withInstall(ColorPicker);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/config-provider/src/config-provider-props.mjs
var configProviderProps = buildProps({
a11y: {
type: Boolean,
default: true
},
locale: {
type: definePropType(Object)
},
size: useSizeProp,
button: {
type: definePropType(Object)
},
card: {
type: definePropType(Object)
},
dialog: {
type: definePropType(Object)
},
link: {
type: definePropType(Object)
},
experimentalFeatures: {
type: definePropType(Object)
},
keyboardNavigation: {
type: Boolean,
default: true
},
message: {
type: definePropType(Object)
},
zIndex: Number,
namespace: {
type: String,
default: "el"
},
...useEmptyValuesProps
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/config-provider/src/config-provider.mjs
var messageConfig = {
placement: "top"
};
var ConfigProvider = defineComponent({
name: "ElConfigProvider",
props: configProviderProps,
setup(props, { slots }) {
const config = provideGlobalConfig(props);
watch(() => props.message, (val) => {
var _a, _b;
Object.assign(messageConfig, (_b = (_a = config == null ? void 0 : config.value) == null ? void 0 : _a.message) != null ? _b : {}, val != null ? val : {});
}, { immediate: true, deep: true });
return () => renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/config-provider/index.mjs
var ElConfigProvider = withInstall(ConfigProvider);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/container/src/container.mjs
var __default__28 = defineComponent({
name: "ElContainer"
});
var _sfc_main28 = defineComponent({
...__default__28,
props: buildProps({
direction: {
type: String,
values: ["horizontal", "vertical"]
}
}),
setup(__props) {
const props = __props;
const slots = useSlots();
const ns = useNamespace("container");
const isVertical = computed(() => {
if (props.direction === "vertical") {
return true;
} else if (props.direction === "horizontal") {
return false;
}
if (slots && slots.default) {
const vNodes = slots.default();
return vNodes.some((vNode) => {
const tag = vNode.type.name;
return tag === "ElHeader" || tag === "ElFooter";
});
} else {
return false;
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("section", {
class: normalizeClass([unref(ns).b(), unref(ns).is("vertical", unref(isVertical))])
}, [
renderSlot(_ctx.$slots, "default")
], 2);
};
}
});
var Container = _export_sfc(_sfc_main28, [["__file", "container.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/container/src/aside.mjs
var __default__29 = defineComponent({
name: "ElAside"
});
var _sfc_main29 = defineComponent({
...__default__29,
props: {
width: {
type: String,
default: null
}
},
setup(__props) {
const props = __props;
const ns = useNamespace("aside");
const style = computed(() => props.width ? ns.cssVarBlock({ width: props.width }) : {});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("aside", {
class: normalizeClass(unref(ns).b()),
style: normalizeStyle(unref(style))
}, [
renderSlot(_ctx.$slots, "default")
], 6);
};
}
});
var Aside = _export_sfc(_sfc_main29, [["__file", "aside.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/container/src/footer.mjs
var __default__30 = defineComponent({
name: "ElFooter"
});
var _sfc_main30 = defineComponent({
...__default__30,
props: {
height: {
type: String,
default: null
}
},
setup(__props) {
const props = __props;
const ns = useNamespace("footer");
const style = computed(() => props.height ? ns.cssVarBlock({ height: props.height }) : {});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("footer", {
class: normalizeClass(unref(ns).b()),
style: normalizeStyle(unref(style))
}, [
renderSlot(_ctx.$slots, "default")
], 6);
};
}
});
var Footer = _export_sfc(_sfc_main30, [["__file", "footer.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/container/src/header.mjs
var __default__31 = defineComponent({
name: "ElHeader"
});
var _sfc_main31 = defineComponent({
...__default__31,
props: {
height: {
type: String,
default: null
}
},
setup(__props) {
const props = __props;
const ns = useNamespace("header");
const style = computed(() => {
return props.height ? ns.cssVarBlock({
height: props.height
}) : {};
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("header", {
class: normalizeClass(unref(ns).b()),
style: normalizeStyle(unref(style))
}, [
renderSlot(_ctx.$slots, "default")
], 6);
};
}
});
var Header = _export_sfc(_sfc_main31, [["__file", "header.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/container/src/main.mjs
var __default__32 = defineComponent({
name: "ElMain"
});
var _sfc_main32 = defineComponent({
...__default__32,
setup(__props) {
const ns = useNamespace("main");
return (_ctx, _cache) => {
return openBlock(), createElementBlock("main", {
class: normalizeClass(unref(ns).b())
}, [
renderSlot(_ctx.$slots, "default")
], 2);
};
}
});
var Main = _export_sfc(_sfc_main32, [["__file", "main.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/container/index.mjs
var ElContainer = withInstall(Container, {
Aside,
Footer,
Header,
Main
});
var ElAside = withNoopInstall(Aside);
var ElFooter = withNoopInstall(Footer);
var ElHeader = withNoopInstall(Header);
var ElMain = withNoopInstall(Main);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/token.mjs
var descriptionsKey = Symbol("elDescriptions");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/descriptions-cell.mjs
var ElDescriptionsCell = defineComponent({
name: "ElDescriptionsCell",
props: {
cell: {
type: Object
},
tag: {
type: String,
default: "td"
},
type: {
type: String
}
},
setup() {
const descriptions = inject(descriptionsKey, {});
return {
descriptions
};
},
render() {
var _a;
const item = getNormalizedProps(this.cell);
const directives = (((_a = this.cell) == null ? void 0 : _a.dirs) || []).map((dire) => {
const { dir, arg, modifiers, value } = dire;
return [dir, value, arg, modifiers];
});
const { border, direction } = this.descriptions;
const isVertical = direction === "vertical";
const renderLabel = () => {
var _a2, _b, _c;
return ((_c = (_b = (_a2 = this.cell) == null ? void 0 : _a2.children) == null ? void 0 : _b.label) == null ? void 0 : _c.call(_b)) || item.label;
};
const renderContent = () => {
var _a2, _b, _c;
return (_c = (_b = (_a2 = this.cell) == null ? void 0 : _a2.children) == null ? void 0 : _b.default) == null ? void 0 : _c.call(_b);
};
const span = item.span;
const rowspan = item.rowspan;
const align = item.align ? `is-${item.align}` : "";
const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align;
const className = item.className;
const labelClassName = item.labelClassName;
const width = this.type === "label" ? item.labelWidth || this.descriptions.labelWidth || item.width : item.width;
const style = {
width: addUnit(width),
minWidth: addUnit(item.minWidth)
};
const ns = useNamespace("descriptions");
switch (this.type) {
case "label":
return withDirectives(h(this.tag, {
style,
class: [
ns.e("cell"),
ns.e("label"),
ns.is("bordered-label", border),
ns.is("vertical-label", isVertical),
labelAlign,
labelClassName
],
colSpan: isVertical ? span : 1,
rowspan: isVertical ? 1 : rowspan
}, renderLabel()), directives);
case "content":
return withDirectives(h(this.tag, {
style,
class: [
ns.e("cell"),
ns.e("content"),
ns.is("bordered-content", border),
ns.is("vertical-content", isVertical),
align,
className
],
colSpan: isVertical ? span : span * 2 - 1,
rowspan: isVertical ? rowspan * 2 - 1 : rowspan
}, renderContent()), directives);
default: {
const label = renderLabel();
const labelStyle = {};
const width2 = addUnit(item.labelWidth || this.descriptions.labelWidth);
if (width2) {
labelStyle.width = width2;
labelStyle.display = "inline-block";
}
return withDirectives(h("td", {
style,
class: [ns.e("cell"), align],
colSpan: span,
rowspan
}, [
!isNil_default(label) ? h("span", {
style: labelStyle,
class: [ns.e("label"), labelClassName]
}, label) : void 0,
h("span", {
class: [ns.e("content"), className]
}, renderContent())
]), directives);
}
}
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/descriptions-row.mjs
var descriptionsRowProps = buildProps({
row: {
type: definePropType(Array),
default: () => []
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs
var __default__33 = defineComponent({
name: "ElDescriptionsRow"
});
var _sfc_main33 = defineComponent({
...__default__33,
props: descriptionsRowProps,
setup(__props) {
const descriptions = inject(descriptionsKey, {});
return (_ctx, _cache) => {
return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createBaseVNode("tr", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
return openBlock(), createBlock(unref(ElDescriptionsCell), {
key: `tr1-${_index}`,
cell,
tag: "th",
type: "label"
}, null, 8, ["cell"]);
}), 128))
]),
createBaseVNode("tr", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
return openBlock(), createBlock(unref(ElDescriptionsCell), {
key: `tr2-${_index}`,
cell,
tag: "td",
type: "content"
}, null, 8, ["cell"]);
}), 128))
])
], 64)) : (openBlock(), createElementBlock("tr", { key: 1 }, [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, _index) => {
return openBlock(), createElementBlock(Fragment, {
key: `tr3-${_index}`
}, [
unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createVNode(unref(ElDescriptionsCell), {
cell,
tag: "td",
type: "label"
}, null, 8, ["cell"]),
createVNode(unref(ElDescriptionsCell), {
cell,
tag: "td",
type: "content"
}, null, 8, ["cell"])
], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
key: 1,
cell,
tag: "td",
type: "both"
}, null, 8, ["cell"]))
], 64);
}), 128))
]));
};
}
});
var ElDescriptionsRow = _export_sfc(_sfc_main33, [["__file", "descriptions-row.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/description.mjs
var descriptionProps = buildProps({
border: Boolean,
column: {
type: Number,
default: 3
},
direction: {
type: String,
values: ["horizontal", "vertical"],
default: "horizontal"
},
size: useSizeProp,
title: {
type: String,
default: ""
},
extra: {
type: String,
default: ""
},
labelWidth: {
type: [String, Number],
default: ""
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/constants.mjs
var COMPONENT_NAME6 = "ElDescriptionsItem";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/description2.mjs
var __default__34 = defineComponent({
name: "ElDescriptions"
});
var _sfc_main34 = defineComponent({
...__default__34,
props: descriptionProps,
setup(__props) {
const props = __props;
const ns = useNamespace("descriptions");
const descriptionsSize = useFormSize();
const slots = useSlots();
provide(descriptionsKey, props);
const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
const filledNode = (node, span, count, isLast = false) => {
if (!node.props) {
node.props = {};
}
if (span > count) {
node.props.span = count;
}
if (isLast) {
node.props.span = span;
}
return node;
};
const getRows = () => {
if (!slots.default)
return [];
const children = flattedChildren(slots.default()).filter((node) => {
var _a;
return ((_a = node == null ? void 0 : node.type) == null ? void 0 : _a.name) === COMPONENT_NAME6;
});
const rows = [];
let temp = [];
let count = props.column;
let totalSpan = 0;
const rowspanTemp = [];
children.forEach((node, index) => {
var _a, _b, _c;
const span = ((_a = node.props) == null ? void 0 : _a.span) || 1;
const rowspan = ((_b = node.props) == null ? void 0 : _b.rowspan) || 1;
const rowNo = rows.length;
rowspanTemp[rowNo] || (rowspanTemp[rowNo] = 0);
if (rowspan > 1) {
for (let i = 1; i < rowspan; i++) {
rowspanTemp[_c = rowNo + i] || (rowspanTemp[_c] = 0);
rowspanTemp[rowNo + i]++;
totalSpan++;
}
}
if (rowspanTemp[rowNo] > 0) {
count -= rowspanTemp[rowNo];
rowspanTemp[rowNo] = 0;
}
if (index < children.length - 1) {
totalSpan += span > count ? count : span;
}
if (index === children.length - 1) {
const lastSpan = props.column - totalSpan % props.column;
temp.push(filledNode(node, lastSpan, count, true));
rows.push(temp);
return;
}
if (span < count) {
count -= span;
temp.push(node);
} else {
temp.push(filledNode(node, span, count));
rows.push(temp);
count = props.column;
temp = [];
}
});
return rows;
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(descriptionKls))
}, [
_ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("header"))
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("title"))
}, [
renderSlot(_ctx.$slots, "title", {}, () => [
createTextVNode(toDisplayString(_ctx.title), 1)
])
], 2),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("extra"))
}, [
renderSlot(_ctx.$slots, "extra", {}, () => [
createTextVNode(toDisplayString(_ctx.extra), 1)
])
], 2)
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("body"))
}, [
createBaseVNode("table", {
class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", _ctx.border)])
}, [
createBaseVNode("tbody", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, _index) => {
return openBlock(), createBlock(ElDescriptionsRow, {
key: _index,
row
}, null, 8, ["row"]);
}), 128))
])
], 2)
], 2)
], 2);
};
}
});
var Descriptions = _export_sfc(_sfc_main34, [["__file", "description.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/constants/column-alignment.mjs
var columnAlignment = ["left", "center", "right"];
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/src/description-item.mjs
var descriptionItemProps = buildProps({
label: {
type: String,
default: ""
},
span: {
type: Number,
default: 1
},
rowspan: {
type: Number,
default: 1
},
width: {
type: [String, Number],
default: ""
},
minWidth: {
type: [String, Number],
default: ""
},
labelWidth: {
type: [String, Number],
default: ""
},
align: {
type: String,
values: columnAlignment,
default: "left"
},
labelAlign: {
type: String,
values: columnAlignment
},
className: {
type: String,
default: ""
},
labelClassName: {
type: String,
default: ""
}
});
var DescriptionItem = defineComponent({
name: COMPONENT_NAME6,
props: descriptionItemProps
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/descriptions/index.mjs
var ElDescriptions = withInstall(Descriptions, {
DescriptionsItem: DescriptionItem
});
var ElDescriptionsItem = withNoopInstall(DescriptionItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-same-target/index.mjs
init_shared_esm_bundler();
var useSameTarget = (handleClick) => {
if (!handleClick) {
return { onClick: NOOP, onMousedown: NOOP, onMouseup: NOOP };
}
let mousedownTarget = false;
let mouseupTarget = false;
const onClick = (e) => {
if (mousedownTarget && mouseupTarget) {
handleClick(e);
}
mousedownTarget = mouseupTarget = false;
};
const onMousedown = (e) => {
mousedownTarget = e.target === e.currentTarget;
};
const onMouseup = (e) => {
mouseupTarget = e.target === e.currentTarget;
};
return { onClick, onMousedown, onMouseup };
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/overlay/src/overlay.mjs
var overlayProps = buildProps({
mask: {
type: Boolean,
default: true
},
customMaskEvent: Boolean,
overlayClass: {
type: definePropType([
String,
Array,
Object
])
},
zIndex: {
type: definePropType([String, Number])
}
});
var overlayEmits = {
click: (evt) => evt instanceof MouseEvent
};
var BLOCK = "overlay";
var Overlay = defineComponent({
name: "ElOverlay",
props: overlayProps,
emits: overlayEmits,
setup(props, { slots, emit }) {
const ns = useNamespace(BLOCK);
const onMaskClick = (e) => {
emit("click", e);
};
const { onClick, onMousedown, onMouseup } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
return () => {
return props.mask ? createVNode("div", {
class: [ns.b(), props.overlayClass],
style: {
zIndex: props.zIndex
},
onClick,
onMousedown,
onMouseup
}, [renderSlot(slots, "default")], PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, ["onClick", "onMouseup", "onMousedown"]) : h("div", {
class: props.overlayClass,
style: {
zIndex: props.zIndex,
position: "fixed",
top: "0px",
right: "0px",
bottom: "0px",
left: "0px"
}
}, [renderSlot(slots, "default")]);
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/overlay/index.mjs
var ElOverlay = Overlay;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/src/constants.mjs
var dialogInjectionKey = Symbol("dialogInjectionKey");
var DEFAULT_DIALOG_TRANSITION = "dialog-fade";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
var dialogContentProps = buildProps({
center: Boolean,
alignCenter: {
type: Boolean,
default: void 0
},
closeIcon: {
type: iconPropType
},
draggable: {
type: Boolean,
default: void 0
},
overflow: {
type: Boolean,
default: void 0
},
fullscreen: Boolean,
headerClass: String,
bodyClass: String,
footerClass: String,
showClose: {
type: Boolean,
default: true
},
title: {
type: String,
default: ""
},
ariaLevel: {
type: String,
default: "2"
}
});
var dialogContentEmits = {
close: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-draggable/index.mjs
var useDraggable = (targetRef, dragRef, draggable2, overflow) => {
const transform = {
offsetX: 0,
offsetY: 0
};
const isDragging2 = ref(false);
const adjustPosition = (moveX, moveY) => {
if (targetRef.value) {
const { offsetX, offsetY } = transform;
const targetRect = targetRef.value.getBoundingClientRect();
const targetLeft = targetRect.left;
const targetTop = targetRect.top;
const targetWidth = targetRect.width;
const targetHeight = targetRect.height;
const clientWidth = document.documentElement.clientWidth;
const clientHeight = document.documentElement.clientHeight;
const minLeft = -targetLeft + offsetX;
const minTop = -targetTop + offsetY;
const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
const maxTop = clientHeight - targetTop - (targetHeight < clientHeight ? targetHeight : 0) + offsetY;
if (!(overflow == null ? void 0 : overflow.value)) {
moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
moveY = Math.min(Math.max(moveY, minTop), maxTop);
}
transform.offsetX = moveX;
transform.offsetY = moveY;
targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
}
};
const onMousedown = (e) => {
const downX = e.clientX;
const downY = e.clientY;
const { offsetX, offsetY } = transform;
const onMousemove = (e2) => {
if (!isDragging2.value) {
isDragging2.value = true;
}
const moveX = offsetX + e2.clientX - downX;
const moveY = offsetY + e2.clientY - downY;
adjustPosition(moveX, moveY);
};
const onMouseup = () => {
isDragging2.value = false;
document.removeEventListener("mousemove", onMousemove);
document.removeEventListener("mouseup", onMouseup);
};
document.addEventListener("mousemove", onMousemove);
document.addEventListener("mouseup", onMouseup);
};
const onDraggable = () => {
if (dragRef.value && targetRef.value) {
dragRef.value.addEventListener("mousedown", onMousedown);
window.addEventListener("resize", updatePosition);
}
};
const offDraggable = () => {
if (dragRef.value && targetRef.value) {
dragRef.value.removeEventListener("mousedown", onMousedown);
window.removeEventListener("resize", updatePosition);
}
};
const resetPosition = () => {
transform.offsetX = 0;
transform.offsetY = 0;
if (targetRef.value) {
targetRef.value.style.transform = "";
}
};
const updatePosition = () => {
const { offsetX, offsetY } = transform;
adjustPosition(offsetX, offsetY);
};
onMounted(() => {
watchEffect(() => {
if (draggable2.value) {
onDraggable();
} else {
offDraggable();
}
});
});
onBeforeUnmount(() => {
offDraggable();
});
return {
isDragging: isDragging2,
resetPosition,
updatePosition
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/refs.mjs
var composeRefs = (...refs) => {
return (el) => {
refs.forEach((ref2) => {
ref2.value = el;
});
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
var __default__35 = defineComponent({ name: "ElDialogContent" });
var _sfc_main35 = defineComponent({
...__default__35,
props: dialogContentProps,
emits: dialogContentEmits,
setup(__props, { expose }) {
const props = __props;
const { t } = useLocale();
const { Close } = CloseComponents;
const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey);
const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
const draggable2 = computed(() => !!props.draggable);
const overflow = computed(() => !!props.overflow);
const { resetPosition, updatePosition, isDragging: isDragging2 } = useDraggable(dialogRef, headerRef, draggable2, overflow);
const dialogKls = computed(() => [
ns.b(),
ns.is("fullscreen", props.fullscreen),
ns.is("draggable", draggable2.value),
ns.is("dragging", isDragging2.value),
ns.is("align-center", !!props.alignCenter),
{ [ns.m("center")]: props.center }
]);
expose({
resetPosition,
updatePosition
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref: unref(composedDialogRef),
class: normalizeClass(unref(dialogKls)),
style: normalizeStyle(unref(style)),
tabindex: "-1"
}, [
createBaseVNode("header", {
ref_key: "headerRef",
ref: headerRef,
class: normalizeClass([unref(ns).e("header"), _ctx.headerClass, { "show-close": _ctx.showClose }])
}, [
renderSlot(_ctx.$slots, "header", {}, () => [
createBaseVNode("span", {
role: "heading",
"aria-level": _ctx.ariaLevel,
class: normalizeClass(unref(ns).e("title"))
}, toDisplayString(_ctx.title), 11, ["aria-level"])
]),
_ctx.showClose ? (openBlock(), createElementBlock("button", {
key: 0,
"aria-label": unref(t)("el.dialog.close"),
class: normalizeClass(unref(ns).e("headerbtn")),
type: "button",
onClick: ($event) => _ctx.$emit("close")
}, [
createVNode(unref(ElIcon), {
class: normalizeClass(unref(ns).e("close"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || unref(Close))))
]),
_: 1
}, 8, ["class"])
], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true)
], 2),
createBaseVNode("div", {
id: unref(bodyId),
class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass])
}, [
renderSlot(_ctx.$slots, "default")
], 10, ["id"]),
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
key: 0,
class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass])
}, [
renderSlot(_ctx.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 6);
};
}
});
var ElDialogContent = _export_sfc(_sfc_main35, [["__file", "dialog-content.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/src/dialog.mjs
var dialogProps = buildProps({
...dialogContentProps,
appendToBody: Boolean,
appendTo: {
type: teleportProps.to.type,
default: "body"
},
beforeClose: {
type: definePropType(Function)
},
destroyOnClose: Boolean,
closeOnClickModal: {
type: Boolean,
default: true
},
closeOnPressEscape: {
type: Boolean,
default: true
},
lockScroll: {
type: Boolean,
default: true
},
modal: {
type: Boolean,
default: true
},
modalPenetrable: Boolean,
openDelay: {
type: Number,
default: 0
},
closeDelay: {
type: Number,
default: 0
},
top: {
type: String
},
modelValue: Boolean,
modalClass: String,
headerClass: String,
bodyClass: String,
footerClass: String,
width: {
type: [String, Number]
},
zIndex: {
type: Number
},
trapFocus: Boolean,
headerAriaLevel: {
type: String,
default: "2"
},
transition: {
type: definePropType([String, Object]),
default: void 0
}
});
var dialogEmits = {
open: () => true,
opened: () => true,
close: () => true,
closed: () => true,
[UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
openAutoFocus: () => true,
closeAutoFocus: () => true
};
var dialogContextKey = Symbol("dialogContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-lockscreen/index.mjs
var useLockscreen = (trigger, options = {}) => {
if (!isRef(trigger)) {
throwError("[useLockscreen]", "You need to pass a ref param to this function");
}
const ns = options.ns || useNamespace("popup");
const hiddenCls = computed(() => ns.bm("parent", "hidden"));
let scrollBarWidth = 0;
let withoutHiddenClass = false;
let bodyWidth = "0";
const cleanup = () => {
setTimeout(() => {
if (typeof document === "undefined")
return;
if (withoutHiddenClass && document) {
document.body.style.width = bodyWidth;
removeClass(document.body, hiddenCls.value);
}
}, 200);
};
watch(trigger, (val) => {
if (!val) {
cleanup();
return;
}
withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
if (withoutHiddenClass) {
bodyWidth = document.body.style.width;
addClass(document.body, hiddenCls.value);
}
scrollBarWidth = getScrollBarWidth(ns.namespace.value);
const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
const bodyOverflowY = getStyle(document.body, "overflowY");
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) {
document.body.style.width = `calc(100% - ${scrollBarWidth}px)`;
}
});
onScopeDispose(() => cleanup());
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
init_shared_esm_bundler();
var COMPONENT_NAME7 = "ElDialog";
var useDialog = (props, targetRef) => {
var _a;
const instance = getCurrentInstance();
const emit = instance.emit;
const { nextZIndex } = useZIndex();
let lastPosition = "";
const titleId = useId();
const bodyId = useId();
const visible = ref(false);
const closed = ref(false);
const rendered = ref(false);
const zIndex = ref((_a = props.zIndex) != null ? _a : nextZIndex());
let openTimer = void 0;
let closeTimer = void 0;
const config = useGlobalConfig();
const namespace = computed(() => {
var _a2, _b;
return (_b = (_a2 = config.value) == null ? void 0 : _a2.namespace) != null ? _b : defaultNamespace;
});
const globalConfig = computed(() => {
var _a2;
return (_a2 = config.value) == null ? void 0 : _a2.dialog;
});
const style = computed(() => {
const style2 = {};
const varPrefix = `--${namespace.value}-dialog`;
if (!props.fullscreen) {
if (props.top) {
style2[`${varPrefix}-margin-top`] = props.top;
}
if (props.width) {
style2[`${varPrefix}-width`] = addUnit(props.width);
}
}
return style2;
});
const _draggable = computed(() => {
var _a2, _b, _c;
return ((_c = (_b = props.draggable) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.draggable) != null ? _c : false) && !props.fullscreen;
});
const _alignCenter = computed(() => {
var _a2, _b, _c;
return (_c = (_b = props.alignCenter) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.alignCenter) != null ? _c : false;
});
const _overflow = computed(() => {
var _a2, _b, _c;
return (_c = (_b = props.overflow) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.overflow) != null ? _c : false;
});
const overlayDialogStyle = computed(() => {
if (_alignCenter.value) {
return { display: "flex" };
}
return {};
});
const transitionConfig = computed(() => {
var _a2, _b, _c;
const transition = (_c = (_b = props.transition) != null ? _b : (_a2 = globalConfig.value) == null ? void 0 : _a2.transition) != null ? _c : DEFAULT_DIALOG_TRANSITION;
const baseConfig = {
name: transition,
onAfterEnter: afterEnter,
onBeforeLeave: beforeLeave,
onAfterLeave: afterLeave
};
if (isObject(transition)) {
const config2 = { ...transition };
const _mergeHook = (userHook, defaultHook) => {
return (el) => {
if (isArray(userHook)) {
userHook.forEach((fn) => {
if (isFunction(fn))
fn(el);
});
} else if (isFunction(userHook)) {
userHook(el);
}
defaultHook();
};
};
config2.onAfterEnter = _mergeHook(config2.onAfterEnter, afterEnter);
config2.onBeforeLeave = _mergeHook(config2.onBeforeLeave, beforeLeave);
config2.onAfterLeave = _mergeHook(config2.onAfterLeave, afterLeave);
if (!config2.name) {
config2.name = DEFAULT_DIALOG_TRANSITION;
debugWarn(COMPONENT_NAME7, `transition.name is missing when using object syntax, fallback to '${DEFAULT_DIALOG_TRANSITION}'`);
}
return config2;
}
return baseConfig;
});
function afterEnter() {
emit("opened");
}
function afterLeave() {
emit("closed");
emit(UPDATE_MODEL_EVENT, false);
if (props.destroyOnClose) {
rendered.value = false;
}
}
function beforeLeave() {
emit("close");
}
function open() {
closeTimer == null ? void 0 : closeTimer();
openTimer == null ? void 0 : openTimer();
if (props.openDelay && props.openDelay > 0) {
({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay));
} else {
doOpen();
}
}
function close2() {
openTimer == null ? void 0 : openTimer();
closeTimer == null ? void 0 : closeTimer();
if (props.closeDelay && props.closeDelay > 0) {
({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay));
} else {
doClose();
}
}
function handleClose() {
function hide(shouldCancel) {
if (shouldCancel)
return;
closed.value = true;
visible.value = false;
}
if (props.beforeClose) {
props.beforeClose(hide);
} else {
close2();
}
}
function onModalClick() {
if (props.closeOnClickModal) {
handleClose();
}
}
function doOpen() {
if (!isClient)
return;
visible.value = true;
}
function doClose() {
visible.value = false;
}
function onOpenAutoFocus() {
emit("openAutoFocus");
}
function onCloseAutoFocus() {
emit("closeAutoFocus");
}
function onFocusoutPrevented(event) {
var _a2;
if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) === "pointer") {
event.preventDefault();
}
}
if (props.lockScroll) {
useLockscreen(visible);
}
function onCloseRequested() {
if (props.closeOnPressEscape) {
handleClose();
}
}
watch(() => props.zIndex, () => {
var _a2;
zIndex.value = (_a2 = props.zIndex) != null ? _a2 : nextZIndex();
});
watch(() => props.modelValue, (val) => {
var _a2;
if (val) {
closed.value = false;
open();
rendered.value = true;
zIndex.value = (_a2 = props.zIndex) != null ? _a2 : nextZIndex();
nextTick(() => {
emit("open");
if (targetRef.value) {
targetRef.value.parentElement.scrollTop = 0;
targetRef.value.parentElement.scrollLeft = 0;
targetRef.value.scrollTop = 0;
}
});
} else {
if (visible.value) {
close2();
}
}
});
watch(() => props.fullscreen, (val) => {
if (!targetRef.value)
return;
if (val) {
lastPosition = targetRef.value.style.transform;
targetRef.value.style.transform = "";
} else {
targetRef.value.style.transform = lastPosition;
}
});
onMounted(() => {
if (props.modelValue) {
visible.value = true;
rendered.value = true;
open();
}
});
return {
afterEnter,
afterLeave,
beforeLeave,
handleClose,
onModalClick,
close: close2,
doClose,
onOpenAutoFocus,
onCloseAutoFocus,
onCloseRequested,
onFocusoutPrevented,
titleId,
bodyId,
closed,
style,
overlayDialogStyle,
rendered,
visible,
zIndex,
transitionConfig,
_draggable,
_alignCenter,
_overflow
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/src/dialog2.mjs
var __default__36 = defineComponent({
name: "ElDialog",
inheritAttrs: false
});
var _sfc_main36 = defineComponent({
...__default__36,
props: dialogProps,
emits: dialogEmits,
setup(__props, { expose }) {
const props = __props;
const slots = useSlots();
useDeprecated({
scope: "el-dialog",
from: "the title slot",
replacement: "the header slot",
version: "3.0.0",
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
}, computed(() => !!slots.title));
const ns = useNamespace("dialog");
const dialogRef = ref();
const headerRef = ref();
const dialogContentRef = ref();
const {
visible,
titleId,
bodyId,
style,
overlayDialogStyle,
rendered,
transitionConfig,
zIndex,
_draggable,
_alignCenter,
_overflow,
handleClose,
onModalClick,
onOpenAutoFocus,
onCloseAutoFocus,
onCloseRequested,
onFocusoutPrevented
} = useDialog(props, dialogRef);
provide(dialogInjectionKey, {
dialogRef,
headerRef,
bodyId,
ns,
rendered,
style
});
const overlayEvent = useSameTarget(onModalClick);
const penetrable = computed(() => props.modalPenetrable && !props.modal && !props.fullscreen);
const resetPosition = () => {
var _a;
(_a = dialogContentRef.value) == null ? void 0 : _a.resetPosition();
};
expose({
visible,
dialogContentRef,
resetPosition,
handleClose
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTeleport), {
to: _ctx.appendTo,
disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody
}, {
default: withCtx(() => [
createVNode(Transition, mergeProps(unref(transitionConfig), { persisted: "" }), {
default: withCtx(() => {
var _a;
return [
withDirectives(createVNode(unref(ElOverlay), {
"custom-mask-event": "",
mask: _ctx.modal,
"overlay-class": [
(_a = _ctx.modalClass) != null ? _a : "",
`${unref(ns).namespace.value}-modal-dialog`,
unref(ns).is("penetrable", unref(penetrable))
],
"z-index": unref(zIndex)
}, {
default: withCtx(() => [
createBaseVNode("div", {
role: "dialog",
"aria-modal": "true",
"aria-label": _ctx.title || void 0,
"aria-labelledby": !_ctx.title ? unref(titleId) : void 0,
"aria-describedby": unref(bodyId),
class: normalizeClass(`${unref(ns).namespace.value}-overlay-dialog`),
style: normalizeStyle(unref(overlayDialogStyle)),
onClick: unref(overlayEvent).onClick,
onMousedown: unref(overlayEvent).onMousedown,
onMouseup: unref(overlayEvent).onMouseup
}, [
createVNode(unref(ElFocusTrap), {
loop: "",
trapped: unref(visible),
"focus-start-el": "container",
onFocusAfterTrapped: unref(onOpenAutoFocus),
onFocusAfterReleased: unref(onCloseAutoFocus),
onFocusoutPrevented: unref(onFocusoutPrevented),
onReleaseRequested: unref(onCloseRequested)
}, {
default: withCtx(() => [
unref(rendered) ? (openBlock(), createBlock(ElDialogContent, mergeProps({
key: 0,
ref_key: "dialogContentRef",
ref: dialogContentRef
}, _ctx.$attrs, {
center: _ctx.center,
"align-center": unref(_alignCenter),
"close-icon": _ctx.closeIcon,
draggable: unref(_draggable),
overflow: unref(_overflow),
fullscreen: _ctx.fullscreen,
"header-class": _ctx.headerClass,
"body-class": _ctx.bodyClass,
"footer-class": _ctx.footerClass,
"show-close": _ctx.showClose,
title: _ctx.title,
"aria-level": _ctx.headerAriaLevel,
onClose: unref(handleClose)
}), createSlots({
header: withCtx(() => [
!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
key: 0,
close: unref(handleClose),
titleId: unref(titleId),
titleClass: unref(ns).e("title")
}) : renderSlot(_ctx.$slots, "title", { key: 1 })
]),
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 2
}, [
_ctx.$slots.footer ? {
name: "footer",
fn: withCtx(() => [
renderSlot(_ctx.$slots, "footer")
])
} : void 0
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
]),
_: 3
}, 8, ["mask", "overlay-class", "z-index"]), [
[vShow, unref(visible)]
])
];
}),
_: 3
}, 16)
]),
_: 3
}, 8, ["to", "disabled"]);
};
}
});
var Dialog = _export_sfc(_sfc_main36, [["__file", "dialog.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dialog/index.mjs
var ElDialog = withInstall(Dialog);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/drawer/src/drawer.mjs
var drawerProps = buildProps({
...dialogProps,
direction: {
type: String,
default: "rtl",
values: ["ltr", "rtl", "ttb", "btt"]
},
resizable: Boolean,
size: {
type: [String, Number],
default: "30%"
},
withHeader: {
type: Boolean,
default: true
},
modalFade: {
type: Boolean,
default: true
},
headerAriaLevel: {
type: String,
default: "2"
}
});
var drawerEmits = dialogEmits;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/drawer/src/composables/useResizable.mjs
function useResizable(props, target2) {
const { width, height } = useWindowSize();
const isHorizontal = computed(() => ["ltr", "rtl"].includes(props.direction));
const sign = computed(() => ["ltr", "ttb"].includes(props.direction) ? 1 : -1);
const windowSize = computed(() => isHorizontal.value ? width.value : height.value);
const getSize = computed(() => {
return clamp(startSize.value + sign.value * offset2.value, 4, windowSize.value);
});
const startSize = ref(0);
const offset2 = ref(0);
const isResizing = ref(false);
const hasStartedDragging = ref(false);
let startPos = [];
let cleanups = [];
const getActualSize = () => {
var _a;
const drawerEl = (_a = target2.value) == null ? void 0 : _a.closest('[aria-modal="true"]');
if (drawerEl) {
return isHorizontal.value ? drawerEl.offsetWidth : drawerEl.offsetHeight;
}
return 100;
};
watch(() => [props.size, props.resizable], () => {
hasStartedDragging.value = false;
startSize.value = 0;
offset2.value = 0;
onMouseUp();
});
const onMousedown = (e) => {
if (!props.resizable)
return;
if (!hasStartedDragging.value) {
startSize.value = getActualSize();
hasStartedDragging.value = true;
}
startPos = [e.pageX, e.pageY];
isResizing.value = true;
cleanups.push(useEventListener(window, "mouseup", onMouseUp), useEventListener(window, "mousemove", onMouseMove));
};
const onMouseMove = (e) => {
const { pageX, pageY } = e;
const offsetX = pageX - startPos[0];
const offsetY = pageY - startPos[1];
offset2.value = isHorizontal.value ? offsetX : offsetY;
};
const onMouseUp = () => {
startPos = [];
startSize.value = getSize.value;
offset2.value = 0;
isResizing.value = false;
cleanups.forEach((cleanup2) => cleanup2 == null ? void 0 : cleanup2());
cleanups = [];
};
const cleanup = useEventListener(target2, "mousedown", onMousedown);
onBeforeUnmount(() => {
cleanup();
onMouseUp();
});
return {
size: computed(() => {
return hasStartedDragging.value ? `${getSize.value}px` : addUnit(props.size);
}),
isResizing,
isHorizontal
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/drawer/src/drawer2.mjs
var __default__37 = defineComponent({
name: "ElDrawer",
inheritAttrs: false
});
var _sfc_main37 = defineComponent({
...__default__37,
props: drawerProps,
emits: drawerEmits,
setup(__props, { expose }) {
const props = __props;
const slots = useSlots();
useDeprecated({
scope: "el-drawer",
from: "the title slot",
replacement: "the header slot",
version: "3.0.0",
ref: "https://element-plus.org/en-US/component/drawer.html#slots"
}, computed(() => !!slots.title));
const drawerRef = ref();
const focusStartRef = ref();
const draggerRef = ref();
const ns = useNamespace("drawer");
const { t } = useLocale();
const {
afterEnter,
afterLeave,
beforeLeave,
visible,
rendered,
titleId,
bodyId,
zIndex,
onModalClick,
onOpenAutoFocus,
onCloseAutoFocus,
onFocusoutPrevented,
onCloseRequested,
handleClose
} = useDialog(props, drawerRef);
const { isHorizontal, size, isResizing } = useResizable(props, draggerRef);
const penetrable = computed(() => props.modalPenetrable && !props.modal);
expose({
handleClose,
afterEnter,
afterLeave
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTeleport), {
to: _ctx.appendTo,
disabled: _ctx.appendTo !== "body" ? false : !_ctx.appendToBody
}, {
default: withCtx(() => [
createVNode(Transition, {
name: unref(ns).b("fade"),
onAfterEnter: unref(afterEnter),
onAfterLeave: unref(afterLeave),
onBeforeLeave: unref(beforeLeave),
persisted: ""
}, {
default: withCtx(() => {
var _a;
return [
withDirectives(createVNode(unref(ElOverlay), {
mask: _ctx.modal,
"overlay-class": [
unref(ns).is("drawer"),
(_a = _ctx.modalClass) != null ? _a : "",
`${unref(ns).namespace.value}-modal-drawer`,
unref(ns).is("penetrable", unref(penetrable))
],
"z-index": unref(zIndex),
onClick: unref(onModalClick)
}, {
default: withCtx(() => [
createVNode(unref(ElFocusTrap), {
loop: "",
trapped: unref(visible),
"focus-trap-el": drawerRef.value,
"focus-start-el": focusStartRef.value,
onFocusAfterTrapped: unref(onOpenAutoFocus),
onFocusAfterReleased: unref(onCloseAutoFocus),
onFocusoutPrevented: unref(onFocusoutPrevented),
onReleaseRequested: unref(onCloseRequested)
}, {
default: withCtx(() => [
createBaseVNode("div", mergeProps({
ref_key: "drawerRef",
ref: drawerRef,
"aria-modal": "true",
"aria-label": _ctx.title || void 0,
"aria-labelledby": !_ctx.title ? unref(titleId) : void 0,
"aria-describedby": unref(bodyId)
}, _ctx.$attrs, {
class: [
unref(ns).b(),
_ctx.direction,
unref(visible) && "open",
unref(ns).is("dragging", unref(isResizing))
],
style: { [unref(isHorizontal) ? "width" : "height"]: unref(size) },
role: "dialog",
onClick: withModifiers(() => {
}, ["stop"])
}), [
createBaseVNode("span", {
ref_key: "focusStartRef",
ref: focusStartRef,
class: normalizeClass(unref(ns).e("sr-focus")),
tabindex: "-1"
}, null, 2),
_ctx.withHeader ? (openBlock(), createElementBlock("header", {
key: 0,
class: normalizeClass([unref(ns).e("header"), _ctx.headerClass])
}, [
!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
key: 0,
close: unref(handleClose),
titleId: unref(titleId),
titleClass: unref(ns).e("title")
}, () => [
createBaseVNode("span", {
id: unref(titleId),
role: "heading",
"aria-level": _ctx.headerAriaLevel,
class: normalizeClass(unref(ns).e("title"))
}, toDisplayString(_ctx.title), 11, ["id", "aria-level"])
]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
createCommentVNode(" DEPRECATED SLOT ")
]),
_ctx.showClose ? (openBlock(), createElementBlock("button", {
key: 2,
"aria-label": unref(t)("el.drawer.close"),
class: normalizeClass(unref(ns).e("close-btn")),
type: "button",
onClick: unref(handleClose)
}, [
createVNode(unref(ElIcon), {
class: normalizeClass(unref(ns).e("close"))
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class"])
], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true)
], 2)) : createCommentVNode("v-if", true),
unref(rendered) ? (openBlock(), createElementBlock("div", {
key: 1,
id: unref(bodyId),
class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass])
}, [
renderSlot(_ctx.$slots, "default")
], 10, ["id"])) : createCommentVNode("v-if", true),
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass])
}, [
renderSlot(_ctx.$slots, "footer")
], 2)) : createCommentVNode("v-if", true),
_ctx.resizable ? (openBlock(), createElementBlock("div", {
key: 3,
ref_key: "draggerRef",
ref: draggerRef,
style: normalizeStyle({ zIndex: unref(zIndex) }),
class: normalizeClass(unref(ns).e("dragger"))
}, null, 6)) : createCommentVNode("v-if", true)
], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"])
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
]),
_: 3
}, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
[vShow, unref(visible)]
])
];
}),
_: 3
}, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
]),
_: 3
}, 8, ["to", "disabled"]);
};
}
});
var Drawer = _export_sfc(_sfc_main37, [["__file", "drawer.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/drawer/index.mjs
var ElDrawer = withInstall(Drawer);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collection/src/collection2.mjs
var _sfc_main38 = defineComponent({
inheritAttrs: false
});
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return renderSlot(_ctx.$slots, "default");
}
var Collection = _export_sfc(_sfc_main38, [["render", _sfc_render], ["__file", "collection.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collection/src/collection-item.mjs
var _sfc_main39 = defineComponent({
name: "ElCollectionItem",
inheritAttrs: false
});
function _sfc_render2(_ctx, _cache, $props, $setup, $data, $options) {
return renderSlot(_ctx.$slots, "default");
}
var CollectionItem = _export_sfc(_sfc_main39, [["render", _sfc_render2], ["__file", "collection-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/collection/src/collection.mjs
var COLLECTION_ITEM_SIGN = `data-el-collection-item`;
var createCollectionWithScope = (name) => {
const COLLECTION_NAME = `El${name}Collection`;
const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
const COLLECTION_INJECTION_KEY2 = Symbol(COLLECTION_NAME);
const COLLECTION_ITEM_INJECTION_KEY2 = Symbol(COLLECTION_ITEM_NAME);
const ElCollection2 = {
...Collection,
name: COLLECTION_NAME,
setup() {
const collectionRef = ref();
const itemMap = /* @__PURE__ */ new Map();
const getItems = () => {
const collectionEl = unref(collectionRef);
if (!collectionEl)
return [];
const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
const items = [...itemMap.values()];
return items.sort((a2, b2) => orderedNodes.indexOf(a2.ref) - orderedNodes.indexOf(b2.ref));
};
provide(COLLECTION_INJECTION_KEY2, {
itemMap,
getItems,
collectionRef
});
}
};
const ElCollectionItem2 = {
...CollectionItem,
name: COLLECTION_ITEM_NAME,
setup(_2, { attrs }) {
const collectionItemRef = ref();
const collectionInjection = inject(COLLECTION_INJECTION_KEY2, void 0);
provide(COLLECTION_ITEM_INJECTION_KEY2, {
collectionItemRef
});
onMounted(() => {
const collectionItemEl = unref(collectionItemRef);
if (collectionItemEl) {
collectionInjection.itemMap.set(collectionItemEl, {
ref: collectionItemEl,
...attrs
});
}
});
onBeforeUnmount(() => {
const collectionItemEl = unref(collectionItemRef);
collectionInjection.itemMap.delete(collectionItemEl);
});
}
};
return {
COLLECTION_INJECTION_KEY: COLLECTION_INJECTION_KEY2,
COLLECTION_ITEM_INJECTION_KEY: COLLECTION_ITEM_INJECTION_KEY2,
ElCollection: ElCollection2,
ElCollectionItem: ElCollectionItem2
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
var rovingFocusGroupProps = buildProps({
style: { type: definePropType([String, Array, Object]) },
currentTabId: {
type: definePropType(String)
},
defaultCurrentTabId: String,
loop: Boolean,
dir: {
type: String,
values: ["ltr", "rtl"],
default: "ltr"
},
orientation: {
type: definePropType(String)
},
onBlur: Function,
onFocus: Function,
onMousedown: Function
});
var {
ElCollection,
ElCollectionItem,
COLLECTION_INJECTION_KEY,
COLLECTION_ITEM_INJECTION_KEY
} = createCollectionWithScope("RovingFocusGroup");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
var ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
var ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
var MAP_KEY_TO_FOCUS_INTENT = {
ArrowLeft: "prev",
ArrowUp: "prev",
ArrowRight: "next",
ArrowDown: "next",
PageUp: "first",
Home: "first",
PageDown: "last",
End: "last"
};
var getDirectionAwareKey = (key, dir) => {
if (dir !== "rtl")
return key;
switch (key) {
case EVENT_CODE.right:
return EVENT_CODE.left;
case EVENT_CODE.left:
return EVENT_CODE.right;
default:
return key;
}
};
var getFocusIntent = (event, orientation, dir) => {
const code = getEventCode(event);
const key = getDirectionAwareKey(code, dir);
if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key))
return void 0;
if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key))
return void 0;
return MAP_KEY_TO_FOCUS_INTENT[key];
};
var reorderArray = (array4, atIdx) => {
return array4.map((_2, idx) => array4[(idx + atIdx) % array4.length]);
};
var focusFirst = (elements) => {
const { activeElement: prevActive } = document;
for (const element of elements) {
if (element === prevActive)
return;
element.focus();
if (prevActive !== document.activeElement)
return;
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
var CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
var ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
var EVT_OPTS = { bubbles: false, cancelable: true };
var _sfc_main40 = defineComponent({
name: "ElRovingFocusGroupImpl",
inheritAttrs: false,
props: rovingFocusGroupProps,
emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
setup(props, { emit }) {
var _a;
const currentTabbedId = ref((_a = props.currentTabId || props.defaultCurrentTabId) != null ? _a : null);
const isBackingOut = ref(false);
const isClickFocus = ref(false);
const rovingFocusGroupRef = ref();
const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
const rovingFocusGroupRootStyle = computed(() => {
return [
{
outline: "none"
},
props.style
];
});
const onItemFocus = (tabbedId) => {
emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId);
};
const onItemShiftTab = () => {
isBackingOut.value = true;
};
const onMousedown = composeEventHandlers((e) => {
var _a2;
(_a2 = props.onMousedown) == null ? void 0 : _a2.call(props, e);
}, () => {
isClickFocus.value = true;
});
const onFocus = composeEventHandlers((e) => {
var _a2;
(_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
}, (e) => {
const isKeyboardFocus = !unref(isClickFocus);
const { target: target2, currentTarget } = e;
if (target2 === currentTarget && isKeyboardFocus && !unref(isBackingOut)) {
const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS);
currentTarget == null ? void 0 : currentTarget.dispatchEvent(entryFocusEvt);
if (!entryFocusEvt.defaultPrevented) {
const items = getItems().filter((item) => item.focusable);
const activeItem = items.find((item) => item.active);
const currentItem = items.find((item) => item.id === unref(currentTabbedId));
const candidates = [activeItem, currentItem, ...items].filter(Boolean);
const candidateNodes = candidates.map((item) => item.ref);
focusFirst(candidateNodes);
}
}
isClickFocus.value = false;
});
const onBlur = composeEventHandlers((e) => {
var _a2;
(_a2 = props.onBlur) == null ? void 0 : _a2.call(props, e);
}, () => {
isBackingOut.value = false;
});
const handleEntryFocus = (...args) => {
emit("entryFocus", ...args);
};
const onKeydown = (e) => {
const focusIntent = getFocusIntent(e);
if (focusIntent) {
e.preventDefault();
const items = getItems().filter((item) => item.focusable);
let elements = items.map((item) => item.ref);
switch (focusIntent) {
case "last": {
elements.reverse();
break;
}
case "prev":
case "next": {
if (focusIntent === "prev") {
elements.reverse();
}
const currentIdx = elements.indexOf(e.currentTarget);
elements = props.loop ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1);
break;
}
}
nextTick(() => {
focusFirst(elements);
});
}
};
provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {
currentTabbedId: readonly(currentTabbedId),
loop: toRef(props, "loop"),
tabIndex: computed(() => {
return unref(isBackingOut) ? -1 : 0;
}),
rovingFocusGroupRef,
rovingFocusGroupRootStyle,
orientation: toRef(props, "orientation"),
dir: toRef(props, "dir"),
onItemFocus,
onItemShiftTab,
onBlur,
onFocus,
onMousedown,
onKeydown
});
watch(() => props.currentTabId, (val) => {
currentTabbedId.value = val != null ? val : null;
});
useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
}
});
function _sfc_render3(_ctx, _cache, $props, $setup, $data, $options) {
return renderSlot(_ctx.$slots, "default");
}
var ElRovingFocusGroupImpl = _export_sfc(_sfc_main40, [["render", _sfc_render3], ["__file", "roving-focus-group-impl.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
var _sfc_main41 = defineComponent({
name: "ElRovingFocusGroup",
components: {
ElFocusGroupCollection: ElCollection,
ElRovingFocusGroupImpl
}
});
function _sfc_render4(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
return openBlock(), createBlock(_component_el_focus_group_collection, null, {
default: withCtx(() => [
createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16)
]),
_: 3
});
}
var ElRovingFocusGroup = _export_sfc(_sfc_main41, [["render", _sfc_render4], ["__file", "roving-focus-group.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/dropdown.mjs
var dropdownProps = buildProps({
trigger: {
...useTooltipTriggerProps.trigger,
type: definePropType([
String,
Array
])
},
triggerKeys: {
type: definePropType(Array),
default: () => [
EVENT_CODE.enter,
EVENT_CODE.numpadEnter,
EVENT_CODE.space,
EVENT_CODE.down
]
},
virtualTriggering: useTooltipTriggerProps.virtualTriggering,
virtualRef: useTooltipTriggerProps.virtualRef,
effect: {
...useTooltipContentProps.effect,
default: "light"
},
type: {
type: definePropType(String)
},
placement: {
type: definePropType(String),
default: "bottom"
},
popperOptions: {
type: definePropType(Object),
default: () => ({})
},
id: String,
size: {
type: String,
default: ""
},
splitButton: Boolean,
hideOnClick: {
type: Boolean,
default: true
},
loop: {
type: Boolean,
default: true
},
showArrow: {
type: Boolean,
default: true
},
showTimeout: {
type: Number,
default: 150
},
hideTimeout: {
type: Number,
default: 150
},
tabindex: {
type: definePropType([Number, String]),
default: 0
},
maxHeight: {
type: definePropType([Number, String]),
default: ""
},
popperClass: useTooltipContentProps.popperClass,
popperStyle: useTooltipContentProps.popperStyle,
disabled: Boolean,
role: {
type: String,
values: roleTypes,
default: "menu"
},
buttonProps: {
type: definePropType(Object)
},
teleported: useTooltipContentProps.teleported,
persistent: {
type: Boolean,
default: true
}
});
var dropdownItemProps = buildProps({
command: {
type: [Object, String, Number],
default: () => ({})
},
disabled: Boolean,
divided: Boolean,
textValue: String,
icon: {
type: iconPropType
}
});
var dropdownMenuProps = buildProps({
onKeydown: { type: definePropType(Function) }
});
var FIRST_KEYS = [
EVENT_CODE.down,
EVENT_CODE.pageDown,
EVENT_CODE.home
];
var LAST_KEYS = [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end];
var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/tokens.mjs
var DROPDOWN_INJECTION_KEY = Symbol("elDropdown");
var DROPDOWN_INSTANCE_INJECTION_KEY = "elDropdown";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs
var { ButtonGroup: ElButtonGroup2 } = ElButton;
var _sfc_main42 = defineComponent({
name: "ElDropdown",
components: {
ElButton,
ElButtonGroup: ElButtonGroup2,
ElScrollbar,
ElTooltip,
ElRovingFocusGroup,
ElOnlyChild: OnlyChild,
ElIcon,
ArrowDown: arrow_down_default
},
props: dropdownProps,
emits: ["visible-change", "click", "command"],
setup(props, { emit }) {
const _instance = getCurrentInstance();
const ns = useNamespace("dropdown");
const { t } = useLocale();
const triggeringElementRef = ref();
const referenceElementRef = ref();
const popperRef = ref();
const contentRef = ref();
const scrollbar = ref(null);
const currentTabId = ref(null);
const isUsingKeyboard = ref(false);
const wrapStyle = computed(() => ({
maxHeight: addUnit(props.maxHeight)
}));
const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)]);
const trigger = computed(() => castArray_default(props.trigger));
const defaultTriggerId = useId().value;
const triggerId = computed(() => props.id || defaultTriggerId);
function handleClick() {
var _a;
(_a = popperRef.value) == null ? void 0 : _a.onClose(void 0, 0);
}
function handleClose() {
var _a;
(_a = popperRef.value) == null ? void 0 : _a.onClose();
}
function handleOpen() {
var _a;
(_a = popperRef.value) == null ? void 0 : _a.onOpen();
}
const dropdownSize = useFormSize();
function commandHandler(...args) {
emit("command", ...args);
}
function onItemEnter() {
}
function onItemLeave() {
const contentEl = unref(contentRef);
trigger.value.includes("hover") && (contentEl == null ? void 0 : contentEl.focus({
preventScroll: true
}));
currentTabId.value = null;
}
function handleCurrentTabIdChange(id) {
currentTabId.value = id;
}
function handleBeforeShowTooltip() {
emit("visible-change", true);
}
function handleShowTooltip(event) {
var _a;
isUsingKeyboard.value = (event == null ? void 0 : event.type) === "keydown";
(_a = contentRef.value) == null ? void 0 : _a.focus();
}
function handleBeforeHideTooltip() {
emit("visible-change", false);
}
provide(DROPDOWN_INJECTION_KEY, {
contentRef,
role: computed(() => props.role),
triggerId,
isUsingKeyboard,
onItemEnter,
onItemLeave,
handleClose
});
provide(DROPDOWN_INSTANCE_INJECTION_KEY, {
instance: _instance,
dropdownSize,
handleClick,
commandHandler,
trigger: toRef(props, "trigger"),
hideOnClick: toRef(props, "hideOnClick")
});
const handlerMainButtonClick = (event) => {
emit("click", event);
};
return {
t,
ns,
scrollbar,
wrapStyle,
dropdownTriggerKls,
dropdownSize,
triggerId,
currentTabId,
handleCurrentTabIdChange,
handlerMainButtonClick,
handleClose,
handleOpen,
handleBeforeShowTooltip,
handleShowTooltip,
handleBeforeHideTooltip,
popperRef,
contentRef,
triggeringElementRef,
referenceElementRef
};
}
});
function _sfc_render5(_ctx, _cache, $props, $setup, $data, $options) {
var _a;
const _component_el_roving_focus_group = resolveComponent("el-roving-focus-group");
const _component_el_scrollbar = resolveComponent("el-scrollbar");
const _component_el_only_child = resolveComponent("el-only-child");
const _component_el_tooltip = resolveComponent("el-tooltip");
const _component_el_button = resolveComponent("el-button");
const _component_arrow_down = resolveComponent("arrow-down");
const _component_el_icon = resolveComponent("el-icon");
const _component_el_button_group = resolveComponent("el-button-group");
return openBlock(), createElementBlock("div", {
class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("disabled", _ctx.disabled)])
}, [
createVNode(_component_el_tooltip, {
ref: "popperRef",
role: _ctx.role,
effect: _ctx.effect,
"fallback-placements": ["bottom", "top"],
"popper-options": _ctx.popperOptions,
"gpu-acceleration": false,
placement: _ctx.placement,
"popper-class": [_ctx.ns.e("popper"), _ctx.popperClass],
"popper-style": _ctx.popperStyle,
trigger: _ctx.trigger,
"trigger-keys": _ctx.triggerKeys,
"trigger-target-el": _ctx.contentRef,
"show-arrow": _ctx.showArrow,
"show-after": _ctx.trigger === "hover" ? _ctx.showTimeout : 0,
"hide-after": _ctx.trigger === "hover" ? _ctx.hideTimeout : 0,
"virtual-ref": (_a = _ctx.virtualRef) != null ? _a : _ctx.triggeringElementRef,
"virtual-triggering": _ctx.virtualTriggering || _ctx.splitButton,
disabled: _ctx.disabled,
transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
teleported: _ctx.teleported,
pure: "",
"focus-on-target": "",
persistent: _ctx.persistent,
onBeforeShow: _ctx.handleBeforeShowTooltip,
onShow: _ctx.handleShowTooltip,
onBeforeHide: _ctx.handleBeforeHideTooltip
}, createSlots({
content: withCtx(() => [
createVNode(_component_el_scrollbar, {
ref: "scrollbar",
"wrap-style": _ctx.wrapStyle,
tag: "div",
"view-class": _ctx.ns.e("list")
}, {
default: withCtx(() => [
createVNode(_component_el_roving_focus_group, {
loop: _ctx.loop,
"current-tab-id": _ctx.currentTabId,
orientation: "horizontal",
onCurrentTabIdChange: _ctx.handleCurrentTabIdChange
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "dropdown")
]),
_: 3
}, 8, ["loop", "current-tab-id", "onCurrentTabIdChange"])
]),
_: 3
}, 8, ["wrap-style", "view-class"])
]),
_: 2
}, [
!_ctx.splitButton ? {
name: "default",
fn: withCtx(() => [
createVNode(_component_el_only_child, {
id: _ctx.triggerId,
ref: "triggeringElementRef",
role: "button",
tabindex: _ctx.tabindex
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["id", "tabindex"])
])
} : void 0
]), 1032, ["role", "effect", "popper-options", "placement", "popper-class", "popper-style", "trigger", "trigger-keys", "trigger-target-el", "show-arrow", "show-after", "hide-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "persistent", "onBeforeShow", "onShow", "onBeforeHide"]),
_ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, {
default: withCtx(() => [
createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
size: _ctx.dropdownSize,
type: _ctx.type,
disabled: _ctx.disabled,
tabindex: _ctx.tabindex,
onClick: _ctx.handlerMainButtonClick
}), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["size", "type", "disabled", "tabindex", "onClick"]),
createVNode(_component_el_button, mergeProps({
id: _ctx.triggerId,
ref: "triggeringElementRef"
}, _ctx.buttonProps, {
role: "button",
size: _ctx.dropdownSize,
type: _ctx.type,
class: _ctx.ns.e("caret-button"),
disabled: _ctx.disabled,
tabindex: _ctx.tabindex,
"aria-label": _ctx.t("el.dropdown.toggleDropdown")
}), {
default: withCtx(() => [
createVNode(_component_el_icon, {
class: normalizeClass(_ctx.ns.e("icon"))
}, {
default: withCtx(() => [
createVNode(_component_arrow_down)
]),
_: 1
}, 8, ["class"])
]),
_: 1
}, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"])
]),
_: 3
})) : createCommentVNode("v-if", true)
], 2);
}
var Dropdown = _export_sfc(_sfc_main42, [["render", _sfc_render5], ["__file", "dropdown.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
var _sfc_main43 = defineComponent({
components: {
ElRovingFocusCollectionItem: ElCollectionItem
},
props: {
focusable: {
type: Boolean,
default: true
},
active: Boolean
},
emits: ["mousedown", "focus", "keydown"],
setup(props, { emit }) {
const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
const id = useId();
const rovingFocusGroupItemRef = ref();
const handleMousedown = composeEventHandlers((e) => {
emit("mousedown", e);
}, (e) => {
if (!props.focusable) {
e.preventDefault();
} else {
onItemFocus(unref(id));
}
});
const handleFocus = composeEventHandlers((e) => {
emit("focus", e);
}, () => {
onItemFocus(unref(id));
});
const handleKeydown = composeEventHandlers((e) => {
emit("keydown", e);
}, (e) => {
const { shiftKey, target: target2, currentTarget } = e;
const code = getEventCode(e);
if (code === EVENT_CODE.tab && shiftKey) {
onItemShiftTab();
return;
}
if (target2 !== currentTarget)
return;
onKeydown(e);
});
const isCurrentTab = computed(() => currentTabbedId.value === unref(id));
provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {
rovingFocusGroupItemRef,
tabIndex: computed(() => unref(isCurrentTab) ? 0 : -1),
handleMousedown,
handleFocus,
handleKeydown
});
return {
id,
handleKeydown,
handleFocus,
handleMousedown
};
}
});
function _sfc_render6(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item");
return openBlock(), createBlock(_component_el_roving_focus_collection_item, {
id: _ctx.id,
focusable: _ctx.focusable,
active: _ctx.active
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["id", "focusable", "active"]);
}
var ElRovingFocusItem = _export_sfc(_sfc_main43, [["render", _sfc_render6], ["__file", "roving-focus-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.mjs
var _sfc_main44 = defineComponent({
name: "DropdownItemImpl",
components: {
ElIcon
},
props: dropdownItemProps,
emits: ["pointermove", "pointerleave", "click", "clickimpl"],
setup(_2, { emit }) {
const ns = useNamespace("dropdown");
const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, void 0);
const { collectionItemRef: rovingFocusCollectionItemRef } = inject(COLLECTION_ITEM_INJECTION_KEY, void 0);
const {
rovingFocusGroupItemRef,
tabIndex,
handleFocus,
handleKeydown: handleItemKeydown,
handleMousedown
} = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, void 0);
const itemRef = composeRefs(rovingFocusCollectionItemRef, rovingFocusGroupItemRef);
const role = computed(() => {
if (menuRole.value === "menu") {
return "menuitem";
} else if (menuRole.value === "navigation") {
return "link";
}
return "button";
});
const handleKeydown = composeEventHandlers((e) => {
const code = getEventCode(e);
if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space].includes(code)) {
e.preventDefault();
e.stopImmediatePropagation();
emit("clickimpl", e);
return true;
}
}, handleItemKeydown);
return {
ns,
itemRef,
dataset: {
[COLLECTION_ITEM_SIGN]: ""
},
role,
tabIndex,
handleFocus,
handleKeydown,
handleMousedown
};
}
});
function _sfc_render7(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_icon = resolveComponent("el-icon");
return openBlock(), createElementBlock(Fragment, null, [
_ctx.divided ? (openBlock(), createElementBlock("li", {
key: 0,
role: "separator",
class: normalizeClass(_ctx.ns.bem("menu", "item", "divided"))
}, null, 2)) : createCommentVNode("v-if", true),
createBaseVNode("li", mergeProps({ ref: _ctx.itemRef }, { ..._ctx.dataset, ..._ctx.$attrs }, {
"aria-disabled": _ctx.disabled,
class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)],
tabindex: _ctx.tabIndex,
role: _ctx.role,
onClick: (e) => _ctx.$emit("clickimpl", e),
onFocus: _ctx.handleFocus,
onKeydown: withModifiers(_ctx.handleKeydown, ["self"]),
onMousedown: _ctx.handleMousedown,
onPointermove: (e) => _ctx.$emit("pointermove", e),
onPointerleave: (e) => _ctx.$emit("pointerleave", e)
}), [
_ctx.icon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
})) : createCommentVNode("v-if", true),
renderSlot(_ctx.$slots, "default")
], 16, ["aria-disabled", "tabindex", "role", "onClick", "onFocus", "onKeydown", "onMousedown", "onPointermove", "onPointerleave"])
], 64);
}
var ElDropdownItemImpl = _export_sfc(_sfc_main44, [["render", _sfc_render7], ["__file", "dropdown-item-impl.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/useDropdown.mjs
var useDropdown = () => {
const elDropdown = inject(DROPDOWN_INSTANCE_INJECTION_KEY, {});
const _elDropdownSize = computed(() => elDropdown == null ? void 0 : elDropdown.dropdownSize);
return {
elDropdown,
_elDropdownSize
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs
var _sfc_main45 = defineComponent({
name: "ElDropdownItem",
components: {
ElRovingFocusItem,
ElDropdownItemImpl
},
inheritAttrs: false,
props: dropdownItemProps,
emits: ["pointermove", "pointerleave", "click"],
setup(props, { emit, attrs }) {
const { elDropdown } = useDropdown();
const _instance = getCurrentInstance();
const { onItemEnter, onItemLeave } = inject(DROPDOWN_INJECTION_KEY, void 0);
const handlePointerMove = composeEventHandlers((e) => {
emit("pointermove", e);
return e.defaultPrevented;
}, whenMouse((e) => {
if (props.disabled) {
onItemLeave(e);
return;
}
const target2 = e.currentTarget;
if (target2 === document.activeElement || target2.contains(document.activeElement)) {
return;
}
onItemEnter(e);
if (!e.defaultPrevented) {
target2 == null ? void 0 : target2.focus({
preventScroll: true
});
}
}));
const handlePointerLeave = composeEventHandlers((e) => {
emit("pointerleave", e);
return e.defaultPrevented;
}, whenMouse(onItemLeave));
const handleClick = composeEventHandlers((e) => {
if (props.disabled) {
return;
}
emit("click", e);
return e.type !== "keydown" && e.defaultPrevented;
}, (e) => {
var _a, _b, _c;
if (props.disabled) {
e.stopImmediatePropagation();
return;
}
if ((_a = elDropdown == null ? void 0 : elDropdown.hideOnClick) == null ? void 0 : _a.value) {
(_b = elDropdown.handleClick) == null ? void 0 : _b.call(elDropdown);
}
(_c = elDropdown.commandHandler) == null ? void 0 : _c.call(elDropdown, props.command, _instance, e);
});
const propsAndAttrs = computed(() => ({ ...props, ...attrs }));
return {
handleClick,
handlePointerMove,
handlePointerLeave,
propsAndAttrs
};
}
});
function _sfc_render8(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_dropdown_item_impl = resolveComponent("el-dropdown-item-impl");
const _component_el_roving_focus_item = resolveComponent("el-roving-focus-item");
return openBlock(), createBlock(_component_el_roving_focus_item, {
focusable: !_ctx.disabled
}, {
default: withCtx(() => [
createVNode(_component_el_dropdown_item_impl, mergeProps(_ctx.propsAndAttrs, {
onPointerleave: _ctx.handlePointerLeave,
onPointermove: _ctx.handlePointerMove,
onClickimpl: _ctx.handleClick
}), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
]),
_: 3
}, 8, ["focusable"]);
}
var DropdownItem = _export_sfc(_sfc_main45, [["render", _sfc_render8], ["__file", "dropdown-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/src/dropdown-menu.mjs
var _sfc_main46 = defineComponent({
name: "ElDropdownMenu",
props: dropdownMenuProps,
setup(props) {
const ns = useNamespace("dropdown");
const { _elDropdownSize } = useDropdown();
const size = _elDropdownSize.value;
const { contentRef, role, triggerId, isUsingKeyboard, handleClose } = inject(DROPDOWN_INJECTION_KEY, void 0);
const {
rovingFocusGroupRef,
rovingFocusGroupRootStyle,
onBlur,
onFocus,
onKeydown,
onMousedown
} = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
const { collectionRef: rovingFocusGroupCollectionRef } = inject(COLLECTION_INJECTION_KEY, void 0);
const dropdownKls = computed(() => {
return [ns.b("menu"), ns.bm("menu", size == null ? void 0 : size.value)];
});
const dropdownListWrapperRef = composeRefs(contentRef, rovingFocusGroupRef, rovingFocusGroupCollectionRef);
const handleKeydown = composeEventHandlers((e) => {
var _a;
(_a = props.onKeydown) == null ? void 0 : _a.call(props, e);
}, (e) => {
const { currentTarget, target: target2 } = e;
const code = getEventCode(e);
currentTarget.contains(target2);
if (EVENT_CODE.tab === code) {
return handleClose();
}
onKeydown(e);
});
function handleFocus(e) {
isUsingKeyboard.value && onFocus(e);
}
return {
size,
rovingFocusGroupRootStyle,
dropdownKls,
role,
triggerId,
dropdownListWrapperRef,
handleKeydown,
onBlur,
handleFocus,
onMousedown
};
}
});
function _sfc_render9(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("ul", {
ref: _ctx.dropdownListWrapperRef,
class: normalizeClass(_ctx.dropdownKls),
style: normalizeStyle(_ctx.rovingFocusGroupRootStyle),
tabindex: -1,
role: _ctx.role,
"aria-labelledby": _ctx.triggerId,
onFocusin: _ctx.handleFocus,
onFocusout: _ctx.onBlur,
onKeydown: withModifiers(_ctx.handleKeydown, ["self"]),
onMousedown: withModifiers(_ctx.onMousedown, ["self"])
}, [
renderSlot(_ctx.$slots, "default")
], 46, ["role", "aria-labelledby", "onFocusin", "onFocusout", "onKeydown", "onMousedown"]);
}
var DropdownMenu = _export_sfc(_sfc_main46, [["render", _sfc_render9], ["__file", "dropdown-menu.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/dropdown/index.mjs
var ElDropdown = withInstall(Dropdown, {
DropdownItem,
DropdownMenu
});
var ElDropdownItem = withNoopInstall(DropdownItem);
var ElDropdownMenu = withNoopInstall(DropdownMenu);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/empty/src/img-empty.mjs
var __default__38 = defineComponent({
name: "ImgEmpty"
});
var _sfc_main47 = defineComponent({
...__default__38,
setup(__props) {
const ns = useNamespace("empty");
const id = useId();
return (_ctx, _cache) => {
return openBlock(), createElementBlock("svg", {
viewBox: "0 0 79 86",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink"
}, [
createBaseVNode("defs", null, [
createBaseVNode("linearGradient", {
id: `linearGradient-1-${unref(id)}`,
x1: "38.8503086%",
y1: "0%",
x2: "61.1496914%",
y2: "100%"
}, [
createBaseVNode("stop", {
"stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
offset: "0%"
}, null, 8, ["stop-color"]),
createBaseVNode("stop", {
"stop-color": `var(${unref(ns).cssVarBlockName("fill-color-4")})`,
offset: "100%"
}, null, 8, ["stop-color"])
], 8, ["id"]),
createBaseVNode("linearGradient", {
id: `linearGradient-2-${unref(id)}`,
x1: "0%",
y1: "9.5%",
x2: "100%",
y2: "90.5%"
}, [
createBaseVNode("stop", {
"stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
offset: "0%"
}, null, 8, ["stop-color"]),
createBaseVNode("stop", {
"stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`,
offset: "100%"
}, null, 8, ["stop-color"])
], 8, ["id"]),
createBaseVNode("rect", {
id: `path-3-${unref(id)}`,
x: "0",
y: "0",
width: "17",
height: "36"
}, null, 8, ["id"])
]),
createBaseVNode("g", {
stroke: "none",
"stroke-width": "1",
fill: "none",
"fill-rule": "evenodd"
}, [
createBaseVNode("g", { transform: "translate(-1268.000000, -535.000000)" }, [
createBaseVNode("g", { transform: "translate(1268.000000, 535.000000)" }, [
createBaseVNode("path", {
d: "M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",
fill: `var(${unref(ns).cssVarBlockName("fill-color-3")})`
}, null, 8, ["fill"]),
createBaseVNode("polygon", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
points: "13 58 53 58 42 45 2 45"
}, null, 8, ["fill"]),
createBaseVNode("g", { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" }, [
createBaseVNode("polygon", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
points: "2.84078316e-14 3 18 3 23 7 5 7"
}, null, 8, ["fill"]),
createBaseVNode("polygon", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-5")})`,
points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
}, null, 8, ["fill"]),
createBaseVNode("rect", {
fill: `url(#linearGradient-1-${unref(id)})`,
transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
x: "38",
y: "7",
width: "17",
height: "36"
}, null, 8, ["fill"]),
createBaseVNode("polygon", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
}, null, 8, ["fill"])
]),
createBaseVNode("rect", {
fill: `url(#linearGradient-2-${unref(id)})`,
x: "13",
y: "45",
width: "40",
height: "36"
}, null, 8, ["fill"]),
createBaseVNode("g", { transform: "translate(53.000000, 45.000000)" }, [
createBaseVNode("use", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-8")})`,
transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
"xlink:href": `#path-3-${unref(id)}`
}, null, 8, ["fill", "xlink:href"]),
createBaseVNode("polygon", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-9")})`,
mask: `url(#mask-4-${unref(id)})`,
transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
points: "7 0 24 0 20 18 7 16.5"
}, null, 8, ["fill", "mask"])
]),
createBaseVNode("polygon", {
fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
points: "62 45 79 45 70 58 53 58"
}, null, 8, ["fill"])
])
])
])
]);
};
}
});
var ImgEmpty = _export_sfc(_sfc_main47, [["__file", "img-empty.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/empty/src/empty.mjs
var emptyProps = buildProps({
image: {
type: String,
default: ""
},
imageSize: Number,
description: {
type: String,
default: ""
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/empty/src/empty2.mjs
var __default__39 = defineComponent({
name: "ElEmpty"
});
var _sfc_main48 = defineComponent({
...__default__39,
props: emptyProps,
setup(__props) {
const props = __props;
const { t } = useLocale();
const ns = useNamespace("empty");
const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
const imageStyle = computed(() => ({
width: addUnit(props.imageSize)
}));
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).b())
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("image")),
style: normalizeStyle(unref(imageStyle))
}, [
_ctx.image ? (openBlock(), createElementBlock("img", {
key: 0,
src: _ctx.image,
ondragstart: "return false"
}, null, 8, ["src"])) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
createVNode(ImgEmpty)
])
], 6),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("description"))
}, [
_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", { key: 1 }, toDisplayString(unref(emptyDescription)), 1))
], 2),
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("bottom"))
}, [
renderSlot(_ctx.$slots, "default")
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var Empty = _export_sfc(_sfc_main48, [["__file", "empty.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/empty/index.mjs
var ElEmpty = withInstall(Empty);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/form.mjs
init_shared_esm_bundler();
var formMetaProps = buildProps({
size: {
type: String,
values: componentSizes
},
disabled: Boolean
});
var formProps = buildProps({
...formMetaProps,
model: Object,
rules: {
type: definePropType(Object)
},
labelPosition: {
type: String,
values: ["left", "right", "top"],
default: "right"
},
requireAsteriskPosition: {
type: String,
values: ["left", "right"],
default: "left"
},
labelWidth: {
type: [String, Number],
default: ""
},
labelSuffix: {
type: String,
default: ""
},
inline: Boolean,
inlineMessage: Boolean,
statusIcon: Boolean,
showMessage: {
type: Boolean,
default: true
},
validateOnRuleChange: {
type: Boolean,
default: true
},
hideRequiredAsterisk: Boolean,
scrollToError: Boolean,
scrollIntoViewOptions: {
type: definePropType([Object, Boolean]),
default: true
}
});
var formEmits = {
validate: (prop, isValid, message2) => (isArray(prop) || isString(prop)) && isBoolean(isValid) && isString(message2)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/utils.mjs
init_shared_esm_bundler();
var SCOPE3 = "ElForm";
function useFormLabelWidth() {
const potentialLabelWidthArr = ref([]);
const autoLabelWidth = computed(() => {
if (!potentialLabelWidthArr.value.length)
return "0";
const max2 = Math.max(...potentialLabelWidthArr.value);
return max2 ? `${max2}px` : "";
});
function getLabelWidthIndex(width) {
const index = potentialLabelWidthArr.value.indexOf(width);
if (index === -1 && autoLabelWidth.value === "0") {
debugWarn(SCOPE3, `unexpected width ${width}`);
}
return index;
}
function registerLabelWidth(val, oldVal) {
if (val && oldVal) {
const index = getLabelWidthIndex(oldVal);
potentialLabelWidthArr.value.splice(index, 1, val);
} else if (val) {
potentialLabelWidthArr.value.push(val);
}
}
function deregisterLabelWidth(val) {
const index = getLabelWidthIndex(val);
if (index > -1) {
potentialLabelWidthArr.value.splice(index, 1);
}
}
return {
autoLabelWidth,
registerLabelWidth,
deregisterLabelWidth
};
}
var filterFields = (fields, props) => {
const normalized = castArray_default(props).map((prop) => isArray(prop) ? prop.join(".") : prop);
return normalized.length > 0 ? fields.filter((field) => field.propString && normalized.includes(field.propString)) : fields;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/form2.mjs
init_shared_esm_bundler();
var COMPONENT_NAME8 = "ElForm";
var __default__40 = defineComponent({
name: COMPONENT_NAME8
});
var _sfc_main49 = defineComponent({
...__default__40,
props: formProps,
emits: formEmits,
setup(__props, { expose, emit }) {
const props = __props;
const formRef = ref();
const fields = reactive([]);
const formSize = useFormSize();
const ns = useNamespace("form");
const formClasses = computed(() => {
const { labelPosition, inline } = props;
return [
ns.b(),
ns.m(formSize.value || "default"),
{
[ns.m(`label-${labelPosition}`)]: labelPosition,
[ns.m("inline")]: inline
}
];
});
const getField = (prop) => {
return filterFields(fields, [prop])[0];
};
const addField = (field) => {
fields.push(field);
};
const removeField = (field) => {
if (field.prop) {
fields.splice(fields.indexOf(field), 1);
}
};
const resetFields = (properties = []) => {
if (!props.model) {
debugWarn(COMPONENT_NAME8, "model is required for resetFields to work.");
return;
}
filterFields(fields, properties).forEach((field) => field.resetField());
};
const clearValidate = (props2 = []) => {
filterFields(fields, props2).forEach((field) => field.clearValidate());
};
const isValidatable = computed(() => {
const hasModel = !!props.model;
if (!hasModel) {
debugWarn(COMPONENT_NAME8, "model is required for validate to work.");
}
return hasModel;
});
const obtainValidateFields = (props2) => {
if (fields.length === 0)
return [];
const filteredFields = filterFields(fields, props2);
if (!filteredFields.length) {
debugWarn(COMPONENT_NAME8, "please pass correct props!");
return [];
}
return filteredFields;
};
const validate = async (callback) => validateField(void 0, callback);
const doValidateField = async (props2 = []) => {
if (!isValidatable.value)
return false;
const fields2 = obtainValidateFields(props2);
if (fields2.length === 0)
return true;
let validationErrors = {};
for (const field of fields2) {
try {
await field.validate("");
if (field.validateState === "error" && !field.error)
field.resetField();
} catch (fields3) {
validationErrors = {
...validationErrors,
...fields3
};
}
}
if (Object.keys(validationErrors).length === 0)
return true;
return Promise.reject(validationErrors);
};
const validateField = async (modelProps = [], callback) => {
let result = false;
const shouldThrow = !isFunction(callback);
try {
result = await doValidateField(modelProps);
if (result === true) {
await (callback == null ? void 0 : callback(result));
}
return result;
} catch (e) {
if (e instanceof Error)
throw e;
const invalidFields = e;
if (props.scrollToError) {
if (formRef.value) {
const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`);
formItem == null ? void 0 : formItem.scrollIntoView(props.scrollIntoViewOptions);
}
}
!result && await (callback == null ? void 0 : callback(false, invalidFields));
return shouldThrow && Promise.reject(invalidFields);
}
};
const scrollToField = (prop) => {
var _a;
const field = getField(prop);
if (field) {
(_a = field.$el) == null ? void 0 : _a.scrollIntoView(props.scrollIntoViewOptions);
}
};
watch(() => props.rules, () => {
if (props.validateOnRuleChange) {
validate().catch((err) => debugWarn(err));
}
}, { deep: true, flush: "post" });
provide(formContextKey, reactive({
...toRefs(props),
emit,
resetFields,
clearValidate,
validateField,
getField,
addField,
removeField,
...useFormLabelWidth()
}));
expose({
validate,
validateField,
resetFields,
clearValidate,
scrollToField,
getField,
fields
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("form", {
ref_key: "formRef",
ref: formRef,
class: normalizeClass(unref(formClasses))
}, [
renderSlot(_ctx.$slots, "default")
], 2);
};
}
});
var Form = _export_sfc(_sfc_main49, [["__file", "form.vue"]]);
// ../node_modules/.pnpm/async-validator@4.2.5/node_modules/async-validator/dist-web/index.js
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function(target2) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target2[key] = source[key];
}
}
}
return target2;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o2) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o3) {
return o3.__proto__ || Object.getPrototypeOf(o3);
};
return _getPrototypeOf(o2);
}
function _setPrototypeOf(o2, p2) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
o3.__proto__ = p3;
return o3;
};
return _setPrototypeOf(o2, p2);
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct.bind();
} else {
_construct = function _construct2(Parent2, args2, Class2) {
var a2 = [null];
a2.push.apply(a2, args2);
var Constructor = Function.bind.apply(Parent2, a2);
var instance = new Constructor();
if (Class2) _setPrototypeOf(instance, Class2.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
_wrapNativeSuper = function _wrapNativeSuper2(Class2) {
if (Class2 === null || !_isNativeFunction(Class2)) return Class2;
if (typeof Class2 !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class2)) return _cache.get(Class2);
_cache.set(Class2, Wrapper);
}
function Wrapper() {
return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class2.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return _setPrototypeOf(Wrapper, Class2);
};
return _wrapNativeSuper(Class);
}
var formatRegExp = /%[sdj%]/g;
var warning = function warning2() {
};
if (typeof process !== "undefined" && process.env && true && typeof window !== "undefined" && typeof document !== "undefined") {
warning = function warning3(type4, errors) {
if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
if (errors.every(function(e) {
return typeof e === "string";
})) {
console.warn(type4, errors);
}
}
};
}
function convertFieldsError(errors) {
if (!errors || !errors.length) return null;
var fields = {};
errors.forEach(function(error) {
var field = error.field;
fields[field] = fields[field] || [];
fields[field].push(error);
});
return fields;
}
function format(template) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var i = 0;
var len = args.length;
if (typeof template === "function") {
return template.apply(null, args);
}
if (typeof template === "string") {
var str = template.replace(formatRegExp, function(x2) {
if (x2 === "%%") {
return "%";
}
if (i >= len) {
return x2;
}
switch (x2) {
case "%s":
return String(args[i++]);
case "%d":
return Number(args[i++]);
case "%j":
try {
return JSON.stringify(args[i++]);
} catch (_2) {
return "[Circular]";
}
break;
default:
return x2;
}
});
return str;
}
return template;
}
function isNativeStringType(type4) {
return type4 === "string" || type4 === "url" || type4 === "hex" || type4 === "email" || type4 === "date" || type4 === "pattern";
}
function isEmptyValue(value, type4) {
if (value === void 0 || value === null) {
return true;
}
if (type4 === "array" && Array.isArray(value) && !value.length) {
return true;
}
if (isNativeStringType(type4) && typeof value === "string" && !value) {
return true;
}
return false;
}
function asyncParallelArray(arr, func, callback) {
var results = [];
var total = 0;
var arrLength = arr.length;
function count(errors) {
results.push.apply(results, errors || []);
total++;
if (total === arrLength) {
callback(results);
}
}
arr.forEach(function(a2) {
func(a2, count);
});
}
function asyncSerialArray(arr, func, callback) {
var index = 0;
var arrLength = arr.length;
function next(errors) {
if (errors && errors.length) {
callback(errors);
return;
}
var original = index;
index = index + 1;
if (original < arrLength) {
func(arr[original], next);
} else {
callback([]);
}
}
next([]);
}
function flattenObjArr(objArr) {
var ret = [];
Object.keys(objArr).forEach(function(k) {
ret.push.apply(ret, objArr[k] || []);
});
return ret;
}
var AsyncValidationError = function(_Error) {
_inheritsLoose(AsyncValidationError2, _Error);
function AsyncValidationError2(errors, fields) {
var _this;
_this = _Error.call(this, "Async Validation Error") || this;
_this.errors = errors;
_this.fields = fields;
return _this;
}
return AsyncValidationError2;
}(_wrapNativeSuper(Error));
function asyncMap(objArr, option, func, callback, source) {
if (option.first) {
var _pending = new Promise(function(resolve, reject) {
var next = function next2(errors) {
callback(errors);
return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
};
var flattenArr = flattenObjArr(objArr);
asyncSerialArray(flattenArr, func, next);
});
_pending["catch"](function(e) {
return e;
});
return _pending;
}
var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
var objArrKeys = Object.keys(objArr);
var objArrLength = objArrKeys.length;
var total = 0;
var results = [];
var pending = new Promise(function(resolve, reject) {
var next = function next2(errors) {
results.push.apply(results, errors);
total++;
if (total === objArrLength) {
callback(results);
return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
}
};
if (!objArrKeys.length) {
callback(results);
resolve(source);
}
objArrKeys.forEach(function(key) {
var arr = objArr[key];
if (firstFields.indexOf(key) !== -1) {
asyncSerialArray(arr, func, next);
} else {
asyncParallelArray(arr, func, next);
}
});
});
pending["catch"](function(e) {
return e;
});
return pending;
}
function isErrorObj(obj) {
return !!(obj && obj.message !== void 0);
}
function getValue(value, path) {
var v2 = value;
for (var i = 0; i < path.length; i++) {
if (v2 == void 0) {
return v2;
}
v2 = v2[path[i]];
}
return v2;
}
function complementError(rule, source) {
return function(oe) {
var fieldValue;
if (rule.fullFields) {
fieldValue = getValue(source, rule.fullFields);
} else {
fieldValue = source[oe.field || rule.fullField];
}
if (isErrorObj(oe)) {
oe.field = oe.field || rule.fullField;
oe.fieldValue = fieldValue;
return oe;
}
return {
message: typeof oe === "function" ? oe() : oe,
fieldValue,
field: oe.field || rule.fullField
};
};
}
function deepMerge(target2, source) {
if (source) {
for (var s2 in source) {
if (source.hasOwnProperty(s2)) {
var value = source[s2];
if (typeof value === "object" && typeof target2[s2] === "object") {
target2[s2] = _extends({}, target2[s2], value);
} else {
target2[s2] = value;
}
}
}
}
return target2;
}
var required$1 = function required(rule, value, source, errors, options, type4) {
if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type4 || rule.type))) {
errors.push(format(options.messages.required, rule.fullField));
}
};
var whitespace = function whitespace2(rule, value, source, errors, options) {
if (/^\s+$/.test(value) || value === "") {
errors.push(format(options.messages.whitespace, rule.fullField));
}
};
var urlReg;
var getUrlRegex = function() {
if (urlReg) {
return urlReg;
}
var word = "[a-fA-F\\d:]";
var b2 = function b3(options) {
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
};
var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
var v6seg = "[a-fA-F\\d]{1,4}";
var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
var v4exact = new RegExp("^" + v4 + "$");
var v6exact = new RegExp("^" + v6 + "$");
var ip = function ip2(options) {
return options && options.exact ? v46Exact : new RegExp("(?:" + b2(options) + v4 + b2(options) + ")|(?:" + b2(options) + v6 + b2(options) + ")", "g");
};
ip.v4 = function(options) {
return options && options.exact ? v4exact : new RegExp("" + b2(options) + v4 + b2(options), "g");
};
ip.v6 = function(options) {
return options && options.exact ? v6exact : new RegExp("" + b2(options) + v6 + b2(options), "g");
};
var protocol = "(?:(?:[a-z]+:)?//)";
var auth = "(?:\\S+(?::\\S*)?@)?";
var ipv4 = ip.v4().source;
var ipv6 = ip.v6().source;
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
var port = "(?::\\d{2,5})?";
var path = '(?:[/?#][^\\s"]*)?';
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
urlReg = new RegExp("(?:^" + regex + "$)", "i");
return urlReg;
};
var pattern$2 = {
// http://emailregex.com/
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
// url: new RegExp(
// '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
// 'i',
// ),
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
};
var types = {
integer: function integer(value) {
return types.number(value) && parseInt(value, 10) === value;
},
"float": function float(value) {
return types.number(value) && !types.integer(value);
},
array: function array(value) {
return Array.isArray(value);
},
regexp: function regexp(value) {
if (value instanceof RegExp) {
return true;
}
try {
return !!new RegExp(value);
} catch (e) {
return false;
}
},
date: function date(value) {
return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
},
number: function number(value) {
if (isNaN(value)) {
return false;
}
return typeof value === "number";
},
object: function object(value) {
return typeof value === "object" && !types.array(value);
},
method: function method(value) {
return typeof value === "function";
},
email: function email(value) {
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
},
url: function url(value) {
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
},
hex: function hex(value) {
return typeof value === "string" && !!value.match(pattern$2.hex);
}
};
var type$1 = function type(rule, value, source, errors, options) {
if (rule.required && value === void 0) {
required$1(rule, value, source, errors, options);
return;
}
var custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
var ruleType = rule.type;
if (custom.indexOf(ruleType) > -1) {
if (!types[ruleType](value)) {
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
}
} else if (ruleType && typeof value !== rule.type) {
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
}
};
var range = function range2(rule, value, source, errors, options) {
var len = typeof rule.len === "number";
var min2 = typeof rule.min === "number";
var max2 = typeof rule.max === "number";
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var val = value;
var key = null;
var num = typeof value === "number";
var str = typeof value === "string";
var arr = Array.isArray(value);
if (num) {
key = "number";
} else if (str) {
key = "string";
} else if (arr) {
key = "array";
}
if (!key) {
return false;
}
if (arr) {
val = value.length;
}
if (str) {
val = value.replace(spRegexp, "_").length;
}
if (len) {
if (val !== rule.len) {
errors.push(format(options.messages[key].len, rule.fullField, rule.len));
}
} else if (min2 && !max2 && val < rule.min) {
errors.push(format(options.messages[key].min, rule.fullField, rule.min));
} else if (max2 && !min2 && val > rule.max) {
errors.push(format(options.messages[key].max, rule.fullField, rule.max));
} else if (min2 && max2 && (val < rule.min || val > rule.max)) {
errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
}
};
var ENUM$1 = "enum";
var enumerable$1 = function enumerable(rule, value, source, errors, options) {
rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
if (rule[ENUM$1].indexOf(value) === -1) {
errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
}
};
var pattern$1 = function pattern(rule, value, source, errors, options) {
if (rule.pattern) {
if (rule.pattern instanceof RegExp) {
rule.pattern.lastIndex = 0;
if (!rule.pattern.test(value)) {
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
} else if (typeof rule.pattern === "string") {
var _pattern = new RegExp(rule.pattern);
if (!_pattern.test(value)) {
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
}
}
};
var rules = {
required: required$1,
whitespace,
type: type$1,
range,
"enum": enumerable$1,
pattern: pattern$1
};
var string = function string2(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, "string") && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options, "string");
if (!isEmptyValue(value, "string")) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
rules.pattern(rule, value, source, errors, options);
if (rule.whitespace === true) {
rules.whitespace(rule, value, source, errors, options);
}
}
}
callback(errors);
};
var method2 = function method3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
};
var number2 = function number3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (value === "") {
value = void 0;
}
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
};
var _boolean = function _boolean2(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
};
var regexp2 = function regexp3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (!isEmptyValue(value)) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
};
var integer2 = function integer3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
};
var floatFn = function floatFn2(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
};
var array2 = function array3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((value === void 0 || value === null) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options, "array");
if (value !== void 0 && value !== null) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
};
var object2 = function object3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
};
var ENUM = "enum";
var enumerable2 = function enumerable3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== void 0) {
rules[ENUM](rule, value, source, errors, options);
}
}
callback(errors);
};
var pattern2 = function pattern3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, "string") && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (!isEmptyValue(value, "string")) {
rules.pattern(rule, value, source, errors, options);
}
}
callback(errors);
};
var date2 = function date3(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, "date") && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (!isEmptyValue(value, "date")) {
var dateObject;
if (value instanceof Date) {
dateObject = value;
} else {
dateObject = new Date(value);
}
rules.type(rule, dateObject, source, errors, options);
if (dateObject) {
rules.range(rule, dateObject.getTime(), source, errors, options);
}
}
}
callback(errors);
};
var required2 = function required3(rule, value, callback, source, options) {
var errors = [];
var type4 = Array.isArray(value) ? "array" : typeof value;
rules.required(rule, value, source, errors, options, type4);
callback(errors);
};
var type2 = function type3(rule, value, callback, source, options) {
var ruleType = rule.type;
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, ruleType) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options, ruleType);
if (!isEmptyValue(value, ruleType)) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
};
var any = function any2(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
}
callback(errors);
};
var validators = {
string,
method: method2,
number: number2,
"boolean": _boolean,
regexp: regexp2,
integer: integer2,
"float": floatFn,
array: array2,
object: object2,
"enum": enumerable2,
pattern: pattern2,
date: date2,
url: type2,
hex: type2,
email: type2,
required: required2,
any
};
function newMessages() {
return {
"default": "Validation error on field %s",
required: "%s is required",
"enum": "%s must be one of %s",
whitespace: "%s cannot be empty",
date: {
format: "%s date %s is invalid for format %s",
parse: "%s date could not be parsed, %s is invalid ",
invalid: "%s date %s is invalid"
},
types: {
string: "%s is not a %s",
method: "%s is not a %s (function)",
array: "%s is not an %s",
object: "%s is not an %s",
number: "%s is not a %s",
date: "%s is not a %s",
"boolean": "%s is not a %s",
integer: "%s is not an %s",
"float": "%s is not a %s",
regexp: "%s is not a valid %s",
email: "%s is not a valid %s",
url: "%s is not a valid %s",
hex: "%s is not a valid %s"
},
string: {
len: "%s must be exactly %s characters",
min: "%s must be at least %s characters",
max: "%s cannot be longer than %s characters",
range: "%s must be between %s and %s characters"
},
number: {
len: "%s must equal %s",
min: "%s cannot be less than %s",
max: "%s cannot be greater than %s",
range: "%s must be between %s and %s"
},
array: {
len: "%s must be exactly %s in length",
min: "%s cannot be less than %s in length",
max: "%s cannot be greater than %s in length",
range: "%s must be between %s and %s in length"
},
pattern: {
mismatch: "%s value %s does not match pattern %s"
},
clone: function clone() {
var cloned = JSON.parse(JSON.stringify(this));
cloned.clone = this.clone;
return cloned;
}
};
}
var messages = newMessages();
var Schema = function() {
function Schema2(descriptor) {
this.rules = null;
this._messages = messages;
this.define(descriptor);
}
var _proto = Schema2.prototype;
_proto.define = function define(rules2) {
var _this = this;
if (!rules2) {
throw new Error("Cannot configure a schema with no rules");
}
if (typeof rules2 !== "object" || Array.isArray(rules2)) {
throw new Error("Rules must be an object");
}
this.rules = {};
Object.keys(rules2).forEach(function(name) {
var item = rules2[name];
_this.rules[name] = Array.isArray(item) ? item : [item];
});
};
_proto.messages = function messages2(_messages) {
if (_messages) {
this._messages = deepMerge(newMessages(), _messages);
}
return this._messages;
};
_proto.validate = function validate(source_, o2, oc) {
var _this2 = this;
if (o2 === void 0) {
o2 = {};
}
if (oc === void 0) {
oc = function oc2() {
};
}
var source = source_;
var options = o2;
var callback = oc;
if (typeof options === "function") {
callback = options;
options = {};
}
if (!this.rules || Object.keys(this.rules).length === 0) {
if (callback) {
callback(null, source);
}
return Promise.resolve(source);
}
function complete(results) {
var errors = [];
var fields = {};
function add(e) {
if (Array.isArray(e)) {
var _errors;
errors = (_errors = errors).concat.apply(_errors, e);
} else {
errors.push(e);
}
}
for (var i = 0; i < results.length; i++) {
add(results[i]);
}
if (!errors.length) {
callback(null, source);
} else {
fields = convertFieldsError(errors);
callback(errors, fields);
}
}
if (options.messages) {
var messages$1 = this.messages();
if (messages$1 === messages) {
messages$1 = newMessages();
}
deepMerge(messages$1, options.messages);
options.messages = messages$1;
} else {
options.messages = this.messages();
}
var series = {};
var keys = options.keys || Object.keys(this.rules);
keys.forEach(function(z) {
var arr = _this2.rules[z];
var value = source[z];
arr.forEach(function(r) {
var rule = r;
if (typeof rule.transform === "function") {
if (source === source_) {
source = _extends({}, source);
}
value = source[z] = rule.transform(value);
}
if (typeof rule === "function") {
rule = {
validator: rule
};
} else {
rule = _extends({}, rule);
}
rule.validator = _this2.getValidationMethod(rule);
if (!rule.validator) {
return;
}
rule.field = z;
rule.fullField = rule.fullField || z;
rule.type = _this2.getType(rule);
series[z] = series[z] || [];
series[z].push({
rule,
value,
source,
field: z
});
});
});
var errorFields = {};
return asyncMap(series, options, function(data, doIt) {
var rule = data.rule;
var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
deep = deep && (rule.required || !rule.required && data.value);
rule.field = data.field;
function addFullField(key, schema) {
return _extends({}, schema, {
fullField: rule.fullField + "." + key,
fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
});
}
function cb(e) {
if (e === void 0) {
e = [];
}
var errorList = Array.isArray(e) ? e : [e];
if (!options.suppressWarning && errorList.length) {
Schema2.warning("async-validator:", errorList);
}
if (errorList.length && rule.message !== void 0) {
errorList = [].concat(rule.message);
}
var filledErrors = errorList.map(complementError(rule, source));
if (options.first && filledErrors.length) {
errorFields[rule.field] = 1;
return doIt(filledErrors);
}
if (!deep) {
doIt(filledErrors);
} else {
if (rule.required && !data.value) {
if (rule.message !== void 0) {
filledErrors = [].concat(rule.message).map(complementError(rule, source));
} else if (options.error) {
filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
}
return doIt(filledErrors);
}
var fieldsSchema = {};
if (rule.defaultField) {
Object.keys(data.value).map(function(key) {
fieldsSchema[key] = rule.defaultField;
});
}
fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
var paredFieldsSchema = {};
Object.keys(fieldsSchema).forEach(function(field) {
var fieldSchema = fieldsSchema[field];
var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];
paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));
});
var schema = new Schema2(paredFieldsSchema);
schema.messages(options.messages);
if (data.rule.options) {
data.rule.options.messages = options.messages;
data.rule.options.error = options.error;
}
schema.validate(data.value, data.rule.options || options, function(errs) {
var finalErrors = [];
if (filledErrors && filledErrors.length) {
finalErrors.push.apply(finalErrors, filledErrors);
}
if (errs && errs.length) {
finalErrors.push.apply(finalErrors, errs);
}
doIt(finalErrors.length ? finalErrors : null);
});
}
}
var res;
if (rule.asyncValidator) {
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
} else if (rule.validator) {
try {
res = rule.validator(rule, data.value, cb, data.source, options);
} catch (error) {
console.error == null ? void 0 : console.error(error);
if (!options.suppressValidatorError) {
setTimeout(function() {
throw error;
}, 0);
}
cb(error.message);
}
if (res === true) {
cb();
} else if (res === false) {
cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
} else if (res instanceof Array) {
cb(res);
} else if (res instanceof Error) {
cb(res.message);
}
}
if (res && res.then) {
res.then(function() {
return cb();
}, function(e) {
return cb(e);
});
}
}, function(results) {
complete(results);
}, source);
};
_proto.getType = function getType(rule) {
if (rule.type === void 0 && rule.pattern instanceof RegExp) {
rule.type = "pattern";
}
if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
throw new Error(format("Unknown rule type %s", rule.type));
}
return rule.type || "string";
};
_proto.getValidationMethod = function getValidationMethod(rule) {
if (typeof rule.validator === "function") {
return rule.validator;
}
var keys = Object.keys(rule);
var messageIndex = keys.indexOf("message");
if (messageIndex !== -1) {
keys.splice(messageIndex, 1);
}
if (keys.length === 1 && keys[0] === "required") {
return validators.required;
}
return validators[this.getType(rule)] || void 0;
};
return Schema2;
}();
Schema.register = function register(type4, validator) {
if (typeof validator !== "function") {
throw new Error("Cannot register a validator by type, validator is not a function");
}
validators[type4] = validator;
};
Schema.warning = warning;
Schema.messages = messages;
Schema.validators = validators;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/form-item.mjs
var formItemValidateStates = [
"",
"error",
"validating",
"success"
];
var formItemProps = buildProps({
label: String,
labelWidth: {
type: [String, Number],
default: ""
},
labelPosition: {
type: String,
values: ["left", "right", "top", ""],
default: ""
},
prop: {
type: definePropType([String, Array])
},
required: {
type: Boolean,
default: void 0
},
rules: {
type: definePropType([Object, Array])
},
error: String,
validateStatus: {
type: String,
values: formItemValidateStates
},
for: String,
inlineMessage: {
type: Boolean,
default: void 0
},
showMessage: {
type: Boolean,
default: true
},
size: {
type: String,
values: componentSizes
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/form-label-wrap.mjs
var COMPONENT_NAME9 = "ElLabelWrap";
var FormLabelWrap = defineComponent({
name: COMPONENT_NAME9,
props: {
isAutoWidth: Boolean,
updateAll: Boolean
},
setup(props, {
slots
}) {
const formContext = inject(formContextKey, void 0);
const formItemContext = inject(formItemContextKey);
if (!formItemContext)
throwError(COMPONENT_NAME9, "usage: ");
const ns = useNamespace("form");
const el = ref();
const computedWidth = ref(0);
const getLabelWidth = () => {
var _a;
if ((_a = el.value) == null ? void 0 : _a.firstElementChild) {
const width = window.getComputedStyle(el.value.firstElementChild).width;
return Math.ceil(Number.parseFloat(width));
} else {
return 0;
}
};
const updateLabelWidth = (action = "update") => {
nextTick(() => {
if (slots.default && props.isAutoWidth) {
if (action === "update") {
computedWidth.value = getLabelWidth();
} else if (action === "remove") {
formContext == null ? void 0 : formContext.deregisterLabelWidth(computedWidth.value);
}
}
});
};
const updateLabelWidthFn = () => updateLabelWidth("update");
onMounted(() => {
updateLabelWidthFn();
});
onBeforeUnmount(() => {
updateLabelWidth("remove");
});
onUpdated(() => updateLabelWidthFn());
watch(computedWidth, (val, oldVal) => {
if (props.updateAll) {
formContext == null ? void 0 : formContext.registerLabelWidth(val, oldVal);
}
});
useResizeObserver(computed(() => {
var _a, _b;
return (_b = (_a = el.value) == null ? void 0 : _a.firstElementChild) != null ? _b : null;
}), updateLabelWidthFn);
return () => {
var _a, _b;
if (!slots)
return null;
const {
isAutoWidth
} = props;
if (isAutoWidth) {
const autoLabelWidth = formContext == null ? void 0 : formContext.autoLabelWidth;
const hasLabel = formItemContext == null ? void 0 : formItemContext.hasLabel;
const style = {};
if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") {
const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value);
const labelPosition = formItemContext.labelPosition || formContext.labelPosition;
const marginPosition = labelPosition === "left" ? "marginRight" : "marginLeft";
if (marginWidth) {
style[marginPosition] = `${marginWidth}px`;
}
}
return createVNode("div", {
"ref": el,
"class": [ns.be("item", "label-wrap")],
"style": style
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
} else {
return createVNode(Fragment, {
"ref": el
}, [(_b = slots.default) == null ? void 0 : _b.call(slots)]);
}
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/form-item2.mjs
init_shared_esm_bundler();
var __default__41 = defineComponent({
name: "ElFormItem"
});
var _sfc_main50 = defineComponent({
...__default__41,
props: formItemProps,
setup(__props, { expose }) {
const props = __props;
const slots = useSlots();
const formContext = inject(formContextKey, void 0);
const parentFormItemContext = inject(formItemContextKey, void 0);
const _size = useFormSize(void 0, { formItem: false });
const ns = useNamespace("form-item");
const labelId = useId().value;
const inputIds = ref([]);
const validateState = ref("");
const validateStateDebounced = refDebounced(validateState, 100);
const validateMessage = ref("");
const formItemRef = ref();
let initialValue = void 0;
let isResettingField = false;
const labelPosition = computed(() => props.labelPosition || (formContext == null ? void 0 : formContext.labelPosition));
const labelStyle = computed(() => {
if (labelPosition.value === "top") {
return {};
}
const labelWidth = addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
if (labelWidth)
return { width: labelWidth };
return {};
});
const contentStyle = computed(() => {
if (labelPosition.value === "top" || (formContext == null ? void 0 : formContext.inline)) {
return {};
}
if (!props.label && !props.labelWidth && isNested) {
return {};
}
const labelWidth = addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
if (!props.label && !slots.label) {
return { marginLeft: labelWidth };
}
return {};
});
const formItemClasses = computed(() => [
ns.b(),
ns.m(_size.value),
ns.is("error", validateState.value === "error"),
ns.is("validating", validateState.value === "validating"),
ns.is("success", validateState.value === "success"),
ns.is("required", isRequired.value || props.required),
ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
(formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
{
[ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon,
[ns.m(`label-${labelPosition.value}`)]: labelPosition.value
}
]);
const _inlineMessage = computed(() => isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
const validateClasses = computed(() => [
ns.e("error"),
{ [ns.em("error", "inline")]: _inlineMessage.value }
]);
const propString = computed(() => {
if (!props.prop)
return "";
return isArray(props.prop) ? props.prop.join(".") : props.prop;
});
const hasLabel = computed(() => {
return !!(props.label || slots.label);
});
const labelFor = computed(() => {
var _a;
return (_a = props.for) != null ? _a : inputIds.value.length === 1 ? inputIds.value[0] : void 0;
});
const isGroup = computed(() => {
return !labelFor.value && hasLabel.value;
});
const isNested = !!parentFormItemContext;
const fieldValue = computed(() => {
const model = formContext == null ? void 0 : formContext.model;
if (!model || !props.prop) {
return;
}
return getProp(model, props.prop).value;
});
const normalizedRules = computed(() => {
const { required: required4 } = props;
const rules2 = [];
if (props.rules) {
rules2.push(...castArray_default(props.rules));
}
const formRules = formContext == null ? void 0 : formContext.rules;
if (formRules && props.prop) {
const _rules = getProp(formRules, props.prop).value;
if (_rules) {
rules2.push(...castArray_default(_rules));
}
}
if (required4 !== void 0) {
const requiredRules = rules2.map((rule, i) => [rule, i]).filter(([rule]) => "required" in rule);
if (requiredRules.length > 0) {
for (const [rule, i] of requiredRules) {
if (rule.required === required4)
continue;
rules2[i] = { ...rule, required: required4 };
}
} else {
rules2.push({ required: required4 });
}
}
return rules2;
});
const validateEnabled = computed(() => normalizedRules.value.length > 0);
const getFilteredRule = (trigger) => {
const rules2 = normalizedRules.value;
return rules2.filter((rule) => {
if (!rule.trigger || !trigger)
return true;
if (isArray(rule.trigger)) {
return rule.trigger.includes(trigger);
} else {
return rule.trigger === trigger;
}
}).map(({ trigger: trigger2, ...rule }) => rule);
};
const isRequired = computed(() => normalizedRules.value.some((rule) => rule.required));
const shouldShowError = computed(() => {
var _a;
return validateStateDebounced.value === "error" && props.showMessage && ((_a = formContext == null ? void 0 : formContext.showMessage) != null ? _a : true);
});
const currentLabel = computed(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
const setValidationState = (state) => {
validateState.value = state;
};
const onValidationFailed = (error) => {
var _a, _b;
const { errors, fields } = error;
if (!errors || !fields) {
console.error(error);
}
setValidationState("error");
validateMessage.value = errors ? (_b = (_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) != null ? _b : `${props.prop} is required` : "";
formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
};
const onValidationSucceeded = () => {
setValidationState("success");
formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
};
const doValidate = async (rules2) => {
const modelName = propString.value;
const validator = new Schema({
[modelName]: rules2
});
return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
onValidationSucceeded();
return true;
}).catch((err) => {
onValidationFailed(err);
return Promise.reject(err);
});
};
const validate = async (trigger, callback) => {
if (isResettingField || !props.prop) {
return false;
}
const hasCallback = isFunction(callback);
if (!validateEnabled.value) {
callback == null ? void 0 : callback(false);
return false;
}
const rules2 = getFilteredRule(trigger);
if (rules2.length === 0) {
callback == null ? void 0 : callback(true);
return true;
}
setValidationState("validating");
return doValidate(rules2).then(() => {
callback == null ? void 0 : callback(true);
return true;
}).catch((err) => {
const { fields } = err;
callback == null ? void 0 : callback(false, fields);
return hasCallback ? false : Promise.reject(fields);
});
};
const clearValidate = () => {
setValidationState("");
validateMessage.value = "";
isResettingField = false;
};
const resetField = async () => {
const model = formContext == null ? void 0 : formContext.model;
if (!model || !props.prop)
return;
const computedValue = getProp(model, props.prop);
isResettingField = true;
computedValue.value = clone_default(initialValue);
await nextTick();
clearValidate();
isResettingField = false;
};
const addInputId = (id) => {
if (!inputIds.value.includes(id)) {
inputIds.value.push(id);
}
};
const removeInputId = (id) => {
inputIds.value = inputIds.value.filter((listId) => listId !== id);
};
watch(() => props.error, (val) => {
validateMessage.value = val || "";
setValidationState(val ? "error" : "");
}, { immediate: true });
watch(() => props.validateStatus, (val) => setValidationState(val || ""));
const context = reactive({
...toRefs(props),
$el: formItemRef,
size: _size,
validateMessage,
validateState,
labelId,
inputIds,
isGroup,
hasLabel,
fieldValue,
addInputId,
removeInputId,
resetField,
clearValidate,
validate,
propString
});
provide(formItemContextKey, context);
onMounted(() => {
if (props.prop) {
formContext == null ? void 0 : formContext.addField(context);
initialValue = clone_default(fieldValue.value);
}
});
onBeforeUnmount(() => {
formContext == null ? void 0 : formContext.removeField(context);
});
expose({
size: _size,
validateMessage,
validateState,
validate,
clearValidate,
resetField
});
return (_ctx, _cache) => {
var _a;
return openBlock(), createElementBlock("div", {
ref_key: "formItemRef",
ref: formItemRef,
class: normalizeClass(unref(formItemClasses)),
role: unref(isGroup) ? "group" : void 0,
"aria-labelledby": unref(isGroup) ? unref(labelId) : void 0
}, [
createVNode(unref(FormLabelWrap), {
"is-auto-width": unref(labelStyle).width === "auto",
"update-all": ((_a = unref(formContext)) == null ? void 0 : _a.labelWidth) === "auto"
}, {
default: withCtx(() => [
!!(_ctx.label || _ctx.$slots.label) ? (openBlock(), createBlock(resolveDynamicComponent(unref(labelFor) ? "label" : "div"), {
key: 0,
id: unref(labelId),
for: unref(labelFor),
class: normalizeClass(unref(ns).e("label")),
style: normalizeStyle(unref(labelStyle))
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "label", { label: unref(currentLabel) }, () => [
createTextVNode(toDisplayString(unref(currentLabel)), 1)
])
]),
_: 3
}, 8, ["id", "for", "class", "style"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["is-auto-width", "update-all"]),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("content")),
style: normalizeStyle(unref(contentStyle))
}, [
renderSlot(_ctx.$slots, "default"),
createVNode(TransitionGroup, {
name: `${unref(ns).namespace.value}-zoom-in-top`
}, {
default: withCtx(() => [
unref(shouldShowError) ? renderSlot(_ctx.$slots, "error", {
key: 0,
error: validateMessage.value
}, () => [
createBaseVNode("div", {
class: normalizeClass(unref(validateClasses))
}, toDisplayString(validateMessage.value), 3)
]) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"])
], 6)
], 10, ["role", "aria-labelledby"]);
};
}
});
var FormItem = _export_sfc(_sfc_main50, [["__file", "form-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/index.mjs
var ElForm = withInstall(Form, {
FormItem
});
var ElFormItem = withNoopInstall(FormItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/image-viewer/src/image-viewer.mjs
var imageViewerProps = buildProps({
urlList: {
type: definePropType(Array),
default: () => mutable([])
},
zIndex: {
type: Number
},
initialIndex: {
type: Number,
default: 0
},
infinite: {
type: Boolean,
default: true
},
hideOnClickModal: Boolean,
teleported: Boolean,
closeOnPressEscape: {
type: Boolean,
default: true
},
zoomRate: {
type: Number,
default: 1.2
},
scale: {
type: Number,
default: 1
},
minScale: {
type: Number,
default: 0.2
},
maxScale: {
type: Number,
default: 7
},
showProgress: Boolean,
crossorigin: {
type: definePropType(String)
}
});
var imageViewerEmits = {
close: () => true,
error: (evt) => evt instanceof Event,
switch: (index) => isNumber(index),
rotate: (deg) => isNumber(deg)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/image-viewer/src/image-viewer2.mjs
var __default__42 = defineComponent({
name: "ElImageViewer"
});
var _sfc_main51 = defineComponent({
...__default__42,
props: imageViewerProps,
emits: imageViewerEmits,
setup(__props, { expose, emit }) {
var _a;
const props = __props;
const modes = {
CONTAIN: {
name: "contain",
icon: markRaw(full_screen_default)
},
ORIGINAL: {
name: "original",
icon: markRaw(scale_to_original_default)
}
};
let stopWheelListener;
let prevOverflow = "";
const { t } = useLocale();
const ns = useNamespace("image-viewer");
const { nextZIndex } = useZIndex();
const wrapper = ref();
const imgRef = ref();
const scopeEventListener = effectScope();
const scaleClamped = computed(() => {
const { scale, minScale, maxScale } = props;
return clamp(scale, minScale, maxScale);
});
const loading = ref(true);
const loadError = ref(false);
const activeIndex = ref(props.initialIndex);
const mode = shallowRef(modes.CONTAIN);
const transform = ref({
scale: scaleClamped.value,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
});
const zIndex = ref((_a = props.zIndex) != null ? _a : nextZIndex());
const isSingle = computed(() => {
const { urlList } = props;
return urlList.length <= 1;
});
const isFirst = computed(() => activeIndex.value === 0);
const isLast = computed(() => activeIndex.value === props.urlList.length - 1);
const currentImg = computed(() => props.urlList[activeIndex.value]);
const arrowPrevKls = computed(() => [
ns.e("btn"),
ns.e("prev"),
ns.is("disabled", !props.infinite && isFirst.value)
]);
const arrowNextKls = computed(() => [
ns.e("btn"),
ns.e("next"),
ns.is("disabled", !props.infinite && isLast.value)
]);
const imgStyle = computed(() => {
const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
let translateX = offsetX / scale;
let translateY = offsetY / scale;
const radian = deg * Math.PI / 180;
const cosRadian = Math.cos(radian);
const sinRadian = Math.sin(radian);
translateX = translateX * cosRadian + translateY * sinRadian;
translateY = translateY * cosRadian - offsetX / scale * sinRadian;
const style = {
transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
transition: enableTransition ? "transform .3s" : ""
};
if (mode.value.name === modes.CONTAIN.name) {
style.maxWidth = style.maxHeight = "100%";
}
return style;
});
const progress = computed(() => `${activeIndex.value + 1} / ${props.urlList.length}`);
function hide() {
unregisterEventListener();
stopWheelListener == null ? void 0 : stopWheelListener();
document.body.style.overflow = prevOverflow;
emit("close");
}
function registerEventListener() {
const keydownHandler = throttle_default((e) => {
const code = getEventCode(e);
switch (code) {
case EVENT_CODE.esc:
props.closeOnPressEscape && hide();
break;
case EVENT_CODE.space:
toggleMode();
break;
case EVENT_CODE.left:
prev();
break;
case EVENT_CODE.up:
handleActions("zoomIn");
break;
case EVENT_CODE.right:
next();
break;
case EVENT_CODE.down:
handleActions("zoomOut");
break;
}
});
const mousewheelHandler = throttle_default((e) => {
const delta = e.deltaY || e.deltaX;
handleActions(delta < 0 ? "zoomIn" : "zoomOut", {
zoomRate: props.zoomRate,
enableTransition: false
});
});
scopeEventListener.run(() => {
useEventListener(document, "keydown", keydownHandler);
useEventListener(document, "wheel", mousewheelHandler);
});
}
function unregisterEventListener() {
scopeEventListener.stop();
}
function handleImgLoad() {
loading.value = false;
}
function handleImgError(e) {
loadError.value = true;
loading.value = false;
emit("error", e);
e.target.alt = t("el.image.error");
}
function handleMouseDown(e) {
if (loading.value || e.button !== 0 || !wrapper.value)
return;
transform.value.enableTransition = false;
const { offsetX, offsetY } = transform.value;
const startX = e.pageX;
const startY = e.pageY;
const dragHandler = throttle_default((ev) => {
transform.value = {
...transform.value,
offsetX: offsetX + ev.pageX - startX,
offsetY: offsetY + ev.pageY - startY
};
});
const removeMousemove = useEventListener(document, "mousemove", dragHandler);
useEventListener(document, "mouseup", () => {
removeMousemove();
});
e.preventDefault();
}
function reset() {
transform.value = {
scale: scaleClamped.value,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
};
}
function toggleMode() {
if (loading.value || loadError.value)
return;
const modeNames = keysOf(modes);
const modeValues = Object.values(modes);
const currentMode = mode.value.name;
const index = modeValues.findIndex((i) => i.name === currentMode);
const nextIndex = (index + 1) % modeNames.length;
mode.value = modes[modeNames[nextIndex]];
reset();
}
function setActiveItem(index) {
loadError.value = false;
const len = props.urlList.length;
activeIndex.value = (index + len) % len;
}
function prev() {
if (isFirst.value && !props.infinite)
return;
setActiveItem(activeIndex.value - 1);
}
function next() {
if (isLast.value && !props.infinite)
return;
setActiveItem(activeIndex.value + 1);
}
function handleActions(action, options = {}) {
if (loading.value || loadError.value)
return;
const { minScale, maxScale } = props;
const { zoomRate, rotateDeg, enableTransition } = {
zoomRate: props.zoomRate,
rotateDeg: 90,
enableTransition: true,
...options
};
switch (action) {
case "zoomOut":
if (transform.value.scale > minScale) {
transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
}
break;
case "zoomIn":
if (transform.value.scale < maxScale) {
transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
}
break;
case "clockwise":
transform.value.deg += rotateDeg;
emit("rotate", transform.value.deg);
break;
case "anticlockwise":
transform.value.deg -= rotateDeg;
emit("rotate", transform.value.deg);
break;
}
transform.value.enableTransition = enableTransition;
}
function onFocusoutPrevented(event) {
var _a2;
if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) === "pointer") {
event.preventDefault();
}
}
function onCloseRequested() {
if (props.closeOnPressEscape) {
hide();
}
}
function wheelHandler(e) {
if (!e.ctrlKey)
return;
if (e.deltaY < 0) {
e.preventDefault();
return false;
} else if (e.deltaY > 0) {
e.preventDefault();
return false;
}
}
watch(() => scaleClamped.value, (val) => {
transform.value.scale = val;
});
watch(currentImg, () => {
nextTick(() => {
const $img = imgRef.value;
if (!($img == null ? void 0 : $img.complete)) {
loading.value = true;
}
});
});
watch(activeIndex, (val) => {
reset();
emit("switch", val);
});
onMounted(() => {
registerEventListener();
stopWheelListener = useEventListener("wheel", wheelHandler, {
passive: false
});
prevOverflow = document.body.style.overflow;
document.body.style.overflow = "hidden";
});
expose({
setActiveItem
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTeleport), {
to: "body",
disabled: !_ctx.teleported
}, {
default: withCtx(() => [
createVNode(Transition, {
name: "viewer-fade",
appear: ""
}, {
default: withCtx(() => [
createBaseVNode("div", {
ref_key: "wrapper",
ref: wrapper,
tabindex: -1,
class: normalizeClass(unref(ns).e("wrapper")),
style: normalizeStyle({ zIndex: zIndex.value })
}, [
createVNode(unref(ElFocusTrap), {
loop: "",
trapped: "",
"focus-trap-el": wrapper.value,
"focus-start-el": "container",
onFocusoutPrevented,
onReleaseRequested: onCloseRequested
}, {
default: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("mask")),
onClick: withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"])
}, null, 10, ["onClick"]),
createCommentVNode(" CLOSE "),
createBaseVNode("span", {
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
onClick: hide
}, [
createVNode(unref(ElIcon), null, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
})
], 2),
createCommentVNode(" ARROW "),
!unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createBaseVNode("span", {
class: normalizeClass(unref(arrowPrevKls)),
onClick: prev
}, [
createVNode(unref(ElIcon), null, {
default: withCtx(() => [
createVNode(unref(arrow_left_default))
]),
_: 1
})
], 2),
createBaseVNode("span", {
class: normalizeClass(unref(arrowNextKls)),
onClick: next
}, [
createVNode(unref(ElIcon), null, {
default: withCtx(() => [
createVNode(unref(arrow_right_default))
]),
_: 1
})
], 2)
], 64)) : createCommentVNode("v-if", true),
_ctx.$slots.progress || _ctx.showProgress ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
}, [
renderSlot(_ctx.$slots, "progress", {
activeIndex: activeIndex.value,
total: _ctx.urlList.length
}, () => [
createTextVNode(toDisplayString(unref(progress)), 1)
])
], 2)) : createCommentVNode("v-if", true),
createCommentVNode(" ACTIONS "),
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")])
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("actions__inner"))
}, [
renderSlot(_ctx.$slots, "toolbar", {
actions: handleActions,
prev,
next,
reset: toggleMode,
activeIndex: activeIndex.value,
setActiveItem
}, () => [
createVNode(unref(ElIcon), {
onClick: ($event) => handleActions("zoomOut")
}, {
default: withCtx(() => [
createVNode(unref(zoom_out_default))
]),
_: 1
}, 8, ["onClick"]),
createVNode(unref(ElIcon), {
onClick: ($event) => handleActions("zoomIn")
}, {
default: withCtx(() => [
createVNode(unref(zoom_in_default))
]),
_: 1
}, 8, ["onClick"]),
createBaseVNode("i", {
class: normalizeClass(unref(ns).e("actions__divider"))
}, null, 2),
createVNode(unref(ElIcon), { onClick: toggleMode }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(mode).icon)))
]),
_: 1
}),
createBaseVNode("i", {
class: normalizeClass(unref(ns).e("actions__divider"))
}, null, 2),
createVNode(unref(ElIcon), {
onClick: ($event) => handleActions("anticlockwise")
}, {
default: withCtx(() => [
createVNode(unref(refresh_left_default))
]),
_: 1
}, 8, ["onClick"]),
createVNode(unref(ElIcon), {
onClick: ($event) => handleActions("clockwise")
}, {
default: withCtx(() => [
createVNode(unref(refresh_right_default))
]),
_: 1
}, 8, ["onClick"])
])
], 2)
], 2),
createCommentVNode(" CANVAS "),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("canvas"))
}, [
loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", {
key: 0,
activeIndex: activeIndex.value,
src: unref(currentImg)
}) : (openBlock(), createElementBlock("img", {
ref_key: "imgRef",
ref: imgRef,
key: unref(currentImg),
src: unref(currentImg),
style: normalizeStyle(unref(imgStyle)),
class: normalizeClass(unref(ns).e("img")),
crossorigin: _ctx.crossorigin,
onLoad: handleImgLoad,
onError: handleImgError,
onMousedown: handleMouseDown
}, null, 46, ["src", "crossorigin"]))
], 2),
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["focus-trap-el"])
], 6)
]),
_: 3
})
]),
_: 3
}, 8, ["disabled"]);
};
}
});
var ImageViewer = _export_sfc(_sfc_main51, [["__file", "image-viewer.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/image-viewer/index.mjs
var ElImageViewer = withInstall(ImageViewer);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/image/src/image2.mjs
var imageProps = buildProps({
hideOnClickModal: Boolean,
src: {
type: String,
default: ""
},
fit: {
type: String,
values: ["", "contain", "cover", "fill", "none", "scale-down"],
default: ""
},
loading: {
type: String,
values: ["eager", "lazy"]
},
lazy: Boolean,
scrollContainer: {
type: definePropType([String, Object])
},
previewSrcList: {
type: definePropType(Array),
default: () => mutable([])
},
previewTeleported: Boolean,
zIndex: {
type: Number
},
initialIndex: {
type: Number,
default: 0
},
infinite: {
type: Boolean,
default: true
},
closeOnPressEscape: {
type: Boolean,
default: true
},
zoomRate: {
type: Number,
default: 1.2
},
scale: {
type: Number,
default: 1
},
minScale: {
type: Number,
default: 0.2
},
maxScale: {
type: Number,
default: 7
},
showProgress: Boolean,
crossorigin: {
type: definePropType(String)
}
});
var imageEmits = {
load: (evt) => evt instanceof Event,
error: (evt) => evt instanceof Event,
switch: (val) => isNumber(val),
close: () => true,
show: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/image/src/image.mjs
init_shared_esm_bundler();
var __default__43 = defineComponent({
name: "ElImage",
inheritAttrs: false
});
var _sfc_main52 = defineComponent({
...__default__43,
props: imageProps,
emits: imageEmits,
setup(__props, { expose, emit }) {
const props = __props;
const { t } = useLocale();
const ns = useNamespace("image");
const rawAttrs = useAttrs();
const containerAttrs = computed(() => {
return fromPairs_default(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
});
const imgAttrs = useAttrs2({
excludeListeners: true,
excludeKeys: computed(() => {
return Object.keys(containerAttrs.value);
})
});
const imageSrc = ref();
const hasLoadError = ref(false);
const isLoading = ref(true);
const showViewer = ref(false);
const container = ref();
const _scrollContainer = ref();
const supportLoading = isClient && "loading" in HTMLImageElement.prototype;
let stopScrollListener;
const imageKls = computed(() => [
ns.e("inner"),
preview.value && ns.e("preview"),
isLoading.value && ns.is("loading")
]);
const imageStyle = computed(() => {
const { fit } = props;
if (isClient && fit) {
return { objectFit: fit };
}
return {};
});
const preview = computed(() => {
const { previewSrcList } = props;
return isArray(previewSrcList) && previewSrcList.length > 0;
});
const imageIndex = computed(() => {
const { previewSrcList, initialIndex } = props;
let previewIndex = initialIndex;
if (initialIndex > previewSrcList.length - 1) {
previewIndex = 0;
}
return previewIndex;
});
const isManual = computed(() => {
if (props.loading === "eager")
return false;
return !supportLoading && props.loading === "lazy" || props.lazy;
});
const loadImage = () => {
if (!isClient)
return;
isLoading.value = true;
hasLoadError.value = false;
imageSrc.value = props.src;
};
function handleLoad(event) {
isLoading.value = false;
hasLoadError.value = false;
emit("load", event);
}
function handleError(event) {
isLoading.value = false;
hasLoadError.value = true;
emit("error", event);
}
function handleLazyLoad(isIntersecting) {
if (isIntersecting) {
loadImage();
removeLazyLoadListener();
}
}
const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true);
async function addLazyLoadListener() {
var _a;
if (!isClient)
return;
await nextTick();
const { scrollContainer } = props;
if (isElement(scrollContainer)) {
_scrollContainer.value = scrollContainer;
} else if (isString(scrollContainer) && scrollContainer !== "") {
_scrollContainer.value = (_a = document.querySelector(scrollContainer)) != null ? _a : void 0;
} else if (container.value) {
const scrollContainer2 = getScrollContainer(container.value);
_scrollContainer.value = isWindow(scrollContainer2) ? void 0 : scrollContainer2;
}
const { stop } = useIntersectionObserver(container, ([entry]) => {
lazyLoadHandler(entry.isIntersecting);
}, { root: _scrollContainer });
stopScrollListener = stop;
}
function removeLazyLoadListener() {
if (!isClient || !lazyLoadHandler)
return;
stopScrollListener == null ? void 0 : stopScrollListener();
_scrollContainer.value = void 0;
stopScrollListener = void 0;
}
function clickHandler() {
if (!preview.value)
return;
showViewer.value = true;
emit("show");
}
function closeViewer() {
showViewer.value = false;
emit("close");
}
function switchViewer(val) {
emit("switch", val);
}
watch(() => props.src, () => {
if (isManual.value) {
isLoading.value = true;
hasLoadError.value = false;
removeLazyLoadListener();
addLazyLoadListener();
} else {
loadImage();
}
});
onMounted(() => {
if (isManual.value) {
addLazyLoadListener();
} else {
loadImage();
}
});
expose({
showPreview: clickHandler
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", mergeProps({
ref_key: "container",
ref: container
}, unref(containerAttrs), {
class: [unref(ns).b(), _ctx.$attrs.class]
}), [
hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("error"))
}, toDisplayString(unref(t)("el.image.error")), 3)
]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
src: imageSrc.value,
loading: _ctx.loading,
style: unref(imageStyle),
class: unref(imageKls),
crossorigin: _ctx.crossorigin,
onClick: clickHandler,
onLoad: handleLoad,
onError: handleError
}), null, 16, ["src", "loading", "crossorigin"])) : createCommentVNode("v-if", true),
isLoading.value ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("wrapper"))
}, [
renderSlot(_ctx.$slots, "placeholder", {}, () => [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("placeholder"))
}, null, 2)
])
], 2)) : createCommentVNode("v-if", true)
], 64)),
unref(preview) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
key: 0,
"z-index": _ctx.zIndex,
"initial-index": unref(imageIndex),
infinite: _ctx.infinite,
"zoom-rate": _ctx.zoomRate,
"min-scale": _ctx.minScale,
"max-scale": _ctx.maxScale,
"show-progress": _ctx.showProgress,
"url-list": _ctx.previewSrcList,
scale: _ctx.scale,
crossorigin: _ctx.crossorigin,
"hide-on-click-modal": _ctx.hideOnClickModal,
teleported: _ctx.previewTeleported,
"close-on-press-escape": _ctx.closeOnPressEscape,
onClose: closeViewer,
onSwitch: switchViewer
}, createSlots({
toolbar: withCtx((toolbar) => [
renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))
]),
default: withCtx(() => [
_ctx.$slots.viewer ? (openBlock(), createElementBlock("div", { key: 0 }, [
renderSlot(_ctx.$slots, "viewer")
])) : createCommentVNode("v-if", true)
]),
_: 2
}, [
_ctx.$slots.progress ? {
name: "progress",
fn: withCtx((progress) => [
renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))
])
} : void 0,
_ctx.$slots["viewer-error"] ? {
name: "viewer-error",
fn: withCtx((viewerError) => [
renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError)))
])
} : void 0
]), 1032, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "show-progress", "url-list", "scale", "crossorigin", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true)
], 64)) : createCommentVNode("v-if", true)
], 16);
};
}
});
var Image2 = _export_sfc(_sfc_main52, [["__file", "image.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/image/index.mjs
var ElImage = withInstall(Image2);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/src/input-tag2.mjs
init_shared_esm_bundler();
var inputTagProps = buildProps({
modelValue: {
type: definePropType(Array)
},
max: Number,
tagType: { ...tagProps.type, default: "info" },
tagEffect: tagProps.effect,
trigger: {
type: definePropType(String),
default: EVENT_CODE.enter
},
draggable: Boolean,
delimiter: {
type: [String, RegExp],
default: ""
},
size: useSizeProp,
clearable: Boolean,
clearIcon: {
type: iconPropType,
default: circle_close_default
},
disabled: {
type: Boolean,
default: void 0
},
validateEvent: {
type: Boolean,
default: true
},
readonly: Boolean,
autofocus: Boolean,
id: {
type: String,
default: void 0
},
tabindex: {
type: [String, Number],
default: 0
},
maxlength: {
type: [String, Number]
},
minlength: {
type: [String, Number]
},
placeholder: String,
autocomplete: {
type: definePropType(String),
default: "off"
},
saveOnBlur: {
type: Boolean,
default: true
},
collapseTags: Boolean,
collapseTagsTooltip: Boolean,
maxCollapseTags: {
type: Number,
default: 1
},
ariaLabel: String
});
var inputTagEmits = {
[UPDATE_MODEL_EVENT]: (value) => isArray(value) || isUndefined(value),
[CHANGE_EVENT]: (value) => isArray(value) || isUndefined(value),
[INPUT_EVENT]: (value) => isString(value),
"add-tag": (value) => isString(value) || isArray(value),
"remove-tag": (value, index) => isString(value) && isNumber(index),
"drag-tag": (oldIndex, newIndex, value) => isNumber(oldIndex) && isNumber(newIndex) && isString(value),
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent,
clear: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag.mjs
function useInputTag({ props, emit, formItem }) {
const disabled = useFormDisabled();
const size = useFormSize();
const inputRef = shallowRef();
const inputValue = ref();
const tagTooltipRef = ref();
const tagSize = computed(() => {
return ["small"].includes(size.value) ? "small" : "default";
});
const placeholder = computed(() => {
var _a;
return ((_a = props.modelValue) == null ? void 0 : _a.length) ? void 0 : props.placeholder;
});
const closable = computed(() => !(props.readonly || disabled.value));
const inputLimit = computed(() => {
var _a, _b;
return isUndefined(props.max) ? false : ((_b = (_a = props.modelValue) == null ? void 0 : _a.length) != null ? _b : 0) >= props.max;
});
const showTagList = computed(() => {
var _a;
return props.collapseTags ? (_a = props.modelValue) == null ? void 0 : _a.slice(0, props.maxCollapseTags) : props.modelValue;
});
const collapseTagList = computed(() => {
var _a;
return props.collapseTags ? (_a = props.modelValue) == null ? void 0 : _a.slice(props.maxCollapseTags) : [];
});
const addTagsEmit = (value) => {
var _a;
const list = [...(_a = props.modelValue) != null ? _a : [], ...castArray_default(value)];
emit(UPDATE_MODEL_EVENT, list);
emit(CHANGE_EVENT, list);
emit("add-tag", value);
inputValue.value = void 0;
};
const getDelimitedTags = (input) => {
var _a, _b;
const tags = input.split(props.delimiter).filter((val) => val && val !== input);
if (props.max) {
const maxInsert = props.max - ((_b = (_a = props.modelValue) == null ? void 0 : _a.length) != null ? _b : 0);
tags.splice(maxInsert);
}
return tags.length === 1 ? tags[0] : tags;
};
const handleInput = (event) => {
if (inputLimit.value) {
inputValue.value = void 0;
return;
}
if (isComposing.value)
return;
if (props.delimiter && inputValue.value) {
const tags = getDelimitedTags(inputValue.value);
if (tags.length) {
addTagsEmit(tags);
}
}
emit(INPUT_EVENT, event.target.value);
};
const handleKeydown = (event) => {
var _a;
if (isComposing.value)
return;
const code = getEventCode(event);
switch (code) {
case props.trigger:
event.preventDefault();
event.stopPropagation();
handleAddTag();
break;
case EVENT_CODE.numpadEnter:
if (props.trigger === EVENT_CODE.enter) {
event.preventDefault();
event.stopPropagation();
handleAddTag();
}
break;
case EVENT_CODE.backspace:
if (!inputValue.value && ((_a = props.modelValue) == null ? void 0 : _a.length)) {
event.preventDefault();
event.stopPropagation();
handleRemoveTag(props.modelValue.length - 1);
}
break;
}
};
const handleKeyup = (event) => {
if (isComposing.value || !isAndroid())
return;
const code = getEventCode(event);
switch (code) {
case EVENT_CODE.space:
if (props.trigger === EVENT_CODE.space) {
event.preventDefault();
event.stopPropagation();
handleAddTag();
}
break;
}
};
const handleAddTag = () => {
var _a;
const value = (_a = inputValue.value) == null ? void 0 : _a.trim();
if (!value || inputLimit.value)
return;
addTagsEmit(value);
};
const handleRemoveTag = (index) => {
var _a;
const value = ((_a = props.modelValue) != null ? _a : []).slice();
const [item] = value.splice(index, 1);
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value);
emit("remove-tag", item, index);
};
const handleClear = () => {
inputValue.value = void 0;
emit(UPDATE_MODEL_EVENT, void 0);
emit(CHANGE_EVENT, void 0);
emit("clear");
};
const handleDragged = (draggingIndex, dropIndex, type4) => {
var _a;
const value = ((_a = props.modelValue) != null ? _a : []).slice();
const [draggedItem] = value.splice(draggingIndex, 1);
const step = dropIndex > draggingIndex && type4 === "before" ? -1 : dropIndex < draggingIndex && type4 === "after" ? 1 : 0;
value.splice(dropIndex + step, 0, draggedItem);
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value);
emit("drag-tag", draggingIndex, dropIndex + step, draggedItem);
};
const focus = () => {
var _a;
(_a = inputRef.value) == null ? void 0 : _a.focus();
};
const blur = () => {
var _a;
(_a = inputRef.value) == null ? void 0 : _a.blur();
};
const { wrapperRef, isFocused } = useFocusController(inputRef, {
disabled,
beforeBlur(event) {
var _a;
return (_a = tagTooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event);
},
afterBlur() {
var _a;
if (props.saveOnBlur) {
handleAddTag();
} else {
inputValue.value = void 0;
}
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
}
}
});
const {
isComposing,
handleCompositionStart,
handleCompositionUpdate,
handleCompositionEnd
} = useComposition({ afterComposition: handleInput });
watch(() => props.modelValue, () => {
var _a;
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, CHANGE_EVENT).catch((err) => debugWarn(err));
}
});
return {
inputRef,
wrapperRef,
tagTooltipRef,
isFocused,
isComposing,
inputValue,
size,
tagSize,
placeholder,
closable,
disabled,
inputLimit,
showTagList,
collapseTagList,
handleDragged,
handleInput,
handleKeydown,
handleKeyup,
handleAddTag,
handleRemoveTag,
handleClear,
handleCompositionStart,
handleCompositionUpdate,
handleCompositionEnd,
focus,
blur
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/src/composables/use-hovering.mjs
function useHovering() {
const hovering = ref(false);
const handleMouseEnter = () => {
hovering.value = true;
};
const handleMouseLeave = () => {
hovering.value = false;
};
return {
hovering,
handleMouseEnter,
handleMouseLeave
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/src/composables/use-drag-tag.mjs
function useDragTag({
wrapperRef,
handleDragged,
afterDragged
}) {
const ns = useNamespace("input-tag");
const dropIndicatorRef = shallowRef();
const showDropIndicator = ref(false);
let draggingIndex;
let draggingTag;
let dropIndex;
let dropType;
function getTagClassName(index) {
return `.${ns.e("inner")} .${ns.namespace.value}-tag:nth-child(${index + 1})`;
}
function handleDragStart(event, index) {
draggingIndex = index;
draggingTag = wrapperRef.value.querySelector(getTagClassName(index));
if (draggingTag) {
draggingTag.style.opacity = "0.5";
}
event.dataTransfer.effectAllowed = "move";
}
function handleDragOver(event, index) {
dropIndex = index;
event.preventDefault();
event.dataTransfer.dropEffect = "move";
if (isUndefined(draggingIndex) || draggingIndex === index) {
showDropIndicator.value = false;
return;
}
const dropPosition = wrapperRef.value.querySelector(getTagClassName(index)).getBoundingClientRect();
const dropPrev = !(draggingIndex + 1 === index);
const dropNext = !(draggingIndex - 1 === index);
const distance = event.clientX - dropPosition.left;
const prevPercent = dropPrev ? dropNext ? 0.5 : 1 : -1;
const nextPercent = dropNext ? dropPrev ? 0.5 : 0 : 1;
if (distance <= dropPosition.width * prevPercent) {
dropType = "before";
} else if (distance > dropPosition.width * nextPercent) {
dropType = "after";
} else {
dropType = void 0;
}
const innerEl = wrapperRef.value.querySelector(`.${ns.e("inner")}`);
const innerPosition = innerEl.getBoundingClientRect();
const gap = Number.parseFloat(getStyle(innerEl, "gap")) / 2;
const indicatorTop = dropPosition.top - innerPosition.top;
let indicatorLeft = -9999;
if (dropType === "before") {
indicatorLeft = Math.max(dropPosition.left - innerPosition.left - gap, Math.floor(-gap / 2));
} else if (dropType === "after") {
const left = dropPosition.right - innerPosition.left;
indicatorLeft = left + (innerPosition.width === left ? Math.floor(gap / 2) : gap);
}
setStyle(dropIndicatorRef.value, {
top: `${indicatorTop}px`,
left: `${indicatorLeft}px`
});
showDropIndicator.value = !!dropType;
}
function handleDragEnd(event) {
event.preventDefault();
if (draggingTag) {
draggingTag.style.opacity = "";
}
if (dropType && !isUndefined(draggingIndex) && !isUndefined(dropIndex) && draggingIndex !== dropIndex) {
handleDragged(draggingIndex, dropIndex, dropType);
}
showDropIndicator.value = false;
draggingIndex = void 0;
draggingTag = null;
dropIndex = void 0;
dropType = void 0;
afterDragged == null ? void 0 : afterDragged();
}
return {
dropIndicatorRef,
showDropIndicator,
handleDragStart,
handleDragOver,
handleDragEnd
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag-dom.mjs
function useInputTagDom({
props,
isFocused,
hovering,
disabled,
inputValue,
size,
validateState,
validateIcon,
needStatusIcon
}) {
const attrs = useAttrs();
const slots = useSlots();
const ns = useNamespace("input-tag");
const nsInput = useNamespace("input");
const containerKls = computed(() => [
ns.b(),
ns.is("focused", isFocused.value),
ns.is("hovering", hovering.value),
ns.is("disabled", disabled.value),
ns.m(size.value),
ns.e("wrapper"),
attrs.class
]);
const containerStyle = computed(() => [attrs.style]);
const innerKls = computed(() => {
var _a, _b;
return [
ns.e("inner"),
ns.is("draggable", props.draggable),
ns.is("left-space", !((_a = props.modelValue) == null ? void 0 : _a.length) && !slots.prefix),
ns.is("right-space", !((_b = props.modelValue) == null ? void 0 : _b.length) && !showSuffix.value)
];
});
const showClear = computed(() => {
var _a;
return props.clearable && !disabled.value && !props.readonly && (((_a = props.modelValue) == null ? void 0 : _a.length) || inputValue.value) && (isFocused.value || hovering.value);
});
const showSuffix = computed(() => {
return slots.suffix || showClear.value || validateState.value && validateIcon.value && needStatusIcon.value;
});
return {
ns,
nsInput,
containerKls,
containerStyle,
innerKls,
showClear,
showSuffix
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/src/input-tag.mjs
init_shared_esm_bundler();
var __default__44 = defineComponent({
name: "ElInputTag",
inheritAttrs: false
});
var _sfc_main53 = defineComponent({
...__default__44,
props: inputTagProps,
emits: inputTagEmits,
setup(__props, { expose, emit }) {
const props = __props;
const attrs = useAttrs2();
const slots = useSlots();
const { form, formItem } = useFormItem();
const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
const needStatusIcon = computed(() => {
var _a;
return (_a = form == null ? void 0 : form.statusIcon) != null ? _a : false;
});
const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
const validateIcon = computed(() => {
return validateState.value && ValidateComponentsMap[validateState.value];
});
const {
inputRef,
wrapperRef,
tagTooltipRef,
isFocused,
inputValue,
size,
tagSize,
placeholder,
closable,
disabled,
showTagList,
collapseTagList,
handleDragged,
handleInput,
handleKeydown,
handleKeyup,
handleRemoveTag,
handleClear,
handleCompositionStart,
handleCompositionUpdate,
handleCompositionEnd,
focus,
blur
} = useInputTag({ props, emit, formItem });
const { hovering, handleMouseEnter, handleMouseLeave } = useHovering();
const { calculatorRef, inputStyle } = useCalcInputWidth();
const {
dropIndicatorRef,
showDropIndicator,
handleDragStart,
handleDragOver,
handleDragEnd
} = useDragTag({ wrapperRef, handleDragged, afterDragged: focus });
const {
ns,
nsInput,
containerKls,
containerStyle,
innerKls,
showClear,
showSuffix
} = useInputTagDom({
props,
hovering,
isFocused,
inputValue,
disabled,
size,
validateState,
validateIcon,
needStatusIcon
});
expose({
focus,
blur
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "wrapperRef",
ref: wrapperRef,
class: normalizeClass(unref(containerKls)),
style: normalizeStyle(unref(containerStyle)),
onMouseenter: unref(handleMouseEnter),
onMouseleave: unref(handleMouseLeave)
}, [
unref(slots).prefix ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("prefix"))
}, [
renderSlot(_ctx.$slots, "prefix")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(innerKls))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(showTagList), (item, index) => {
return openBlock(), createBlock(unref(ElTag), {
key: index,
size: unref(tagSize),
closable: unref(closable),
type: _ctx.tagType,
effect: _ctx.tagEffect,
draggable: unref(closable) && _ctx.draggable,
"disable-transitions": "",
onClose: ($event) => unref(handleRemoveTag)(index),
onDragstart: (event) => unref(handleDragStart)(event, index),
onDragover: (event) => unref(handleDragOver)(event, index),
onDragend: unref(handleDragEnd),
onDrop: withModifiers(() => {
}, ["stop"])
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "tag", {
value: item,
index
}, () => [
createTextVNode(toDisplayString(item), 1)
])
]),
_: 2
}, 1032, ["size", "closable", "type", "effect", "draggable", "onClose", "onDragstart", "onDragover", "onDragend", "onDrop"]);
}), 128)),
_ctx.collapseTags && _ctx.modelValue && _ctx.modelValue.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
key: 0,
ref_key: "tagTooltipRef",
ref: tagTooltipRef,
disabled: !_ctx.collapseTagsTooltip,
"fallback-placements": ["bottom", "top", "right", "left"],
effect: _ctx.tagEffect,
placement: "bottom"
}, {
default: withCtx(() => [
createVNode(unref(ElTag), {
closable: false,
size: unref(tagSize),
type: _ctx.tagType,
effect: _ctx.tagEffect,
"disable-transitions": ""
}, {
default: withCtx(() => [
createTextVNode(" + " + toDisplayString(_ctx.modelValue.length - _ctx.maxCollapseTags), 1)
]),
_: 1
}, 8, ["size", "type", "effect"])
]),
content: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("input-tag-list"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(collapseTagList), (item, index) => {
return openBlock(), createBlock(unref(ElTag), {
key: index,
size: unref(tagSize),
closable: unref(closable),
type: _ctx.tagType,
effect: _ctx.tagEffect,
"disable-transitions": "",
onClose: ($event) => unref(handleRemoveTag)(index + _ctx.maxCollapseTags)
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "tag", {
value: item,
index: index + _ctx.maxCollapseTags
}, () => [
createTextVNode(toDisplayString(item), 1)
])
]),
_: 2
}, 1032, ["size", "closable", "type", "effect", "onClose"]);
}), 128))
], 2)
]),
_: 3
}, 8, ["disabled", "effect"])) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("input-wrapper"))
}, [
withDirectives(createBaseVNode("input", mergeProps({
id: unref(inputId),
ref_key: "inputRef",
ref: inputRef,
"onUpdate:modelValue": ($event) => isRef(inputValue) ? inputValue.value = $event : null
}, unref(attrs), {
type: "text",
minlength: _ctx.minlength,
maxlength: _ctx.maxlength,
disabled: unref(disabled),
readonly: _ctx.readonly,
autocomplete: _ctx.autocomplete,
tabindex: _ctx.tabindex,
placeholder: unref(placeholder),
autofocus: _ctx.autofocus,
ariaLabel: _ctx.ariaLabel,
class: unref(ns).e("input"),
style: unref(inputStyle),
onCompositionstart: unref(handleCompositionStart),
onCompositionupdate: unref(handleCompositionUpdate),
onCompositionend: unref(handleCompositionEnd),
onInput: unref(handleInput),
onKeydown: unref(handleKeydown),
onKeyup: unref(handleKeyup)
}), null, 16, ["id", "onUpdate:modelValue", "minlength", "maxlength", "disabled", "readonly", "autocomplete", "tabindex", "placeholder", "autofocus", "ariaLabel", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onKeydown", "onKeyup"]), [
[vModelText, unref(inputValue)]
]),
createBaseVNode("span", {
ref_key: "calculatorRef",
ref: calculatorRef,
"aria-hidden": "true",
class: normalizeClass(unref(ns).e("input-calculator")),
textContent: toDisplayString(unref(inputValue))
}, null, 10, ["textContent"])
], 2),
withDirectives(createBaseVNode("div", {
ref_key: "dropIndicatorRef",
ref: dropIndicatorRef,
class: normalizeClass(unref(ns).e("drop-indicator"))
}, null, 2), [
[vShow, unref(showDropIndicator)]
])
], 2),
unref(showSuffix) ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("suffix"))
}, [
renderSlot(_ctx.$slots, "suffix"),
unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass([unref(ns).e("icon"), unref(ns).e("clear")]),
onMousedown: withModifiers(unref(NOOP), ["prevent"]),
onClick: unref(handleClear)
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
]),
_: 1
}, 8, ["class", "onMousedown", "onClick"])) : createCommentVNode("v-if", true),
unref(validateState) && unref(validateIcon) && unref(needStatusIcon) ? (openBlock(), createBlock(unref(ElIcon), {
key: 1,
class: normalizeClass([
unref(nsInput).e("icon"),
unref(nsInput).e("validateIcon"),
unref(nsInput).is("loading", unref(validateState) === "validating")
])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(validateIcon))))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)) : createCommentVNode("v-if", true)
], 46, ["onMouseenter", "onMouseleave"]);
};
}
});
var InputTag = _export_sfc(_sfc_main53, [["__file", "input-tag.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/input-tag/index.mjs
var ElInputTag = withInstall(InputTag);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/link/src/link2.mjs
var linkProps = buildProps({
type: {
type: String,
values: ["primary", "success", "warning", "info", "danger", "default"],
default: void 0
},
underline: {
type: [Boolean, String],
values: [true, false, "always", "never", "hover"],
default: void 0
},
disabled: Boolean,
href: { type: String, default: "" },
target: {
type: String,
default: "_self"
},
icon: {
type: iconPropType
}
});
var linkEmits = {
click: (evt) => evt instanceof MouseEvent
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/link/src/link.mjs
var __default__45 = defineComponent({
name: "ElLink"
});
var _sfc_main54 = defineComponent({
...__default__45,
props: linkProps,
emits: linkEmits,
setup(__props, { emit }) {
const props = __props;
const globalConfig = useGlobalConfig("link");
useDeprecated({
scope: "el-link",
from: "The underline option (boolean)",
replacement: "'always' | 'hover' | 'never'",
version: "3.0.0",
ref: "https://element-plus.org/en-US/component/link.html#underline"
}, computed(() => isBoolean(props.underline)));
const ns = useNamespace("link");
const linkKls = computed(() => {
var _a, _b, _c;
return [
ns.b(),
ns.m((_c = (_b = props.type) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.type) != null ? _c : "default"),
ns.is("disabled", props.disabled),
ns.is("underline", underline.value === "always"),
ns.is("hover-underline", underline.value === "hover" && !props.disabled)
];
});
const underline = computed(() => {
var _a, _b, _c;
if (isBoolean(props.underline)) {
return props.underline ? "hover" : "never";
} else
return (_c = (_b = props.underline) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.underline) != null ? _c : "hover";
});
function handleClick(event) {
if (!props.disabled)
emit("click", event);
}
return (_ctx, _cache) => {
return openBlock(), createElementBlock("a", {
class: normalizeClass(unref(linkKls)),
href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
target: _ctx.disabled || !_ctx.href ? void 0 : _ctx.target,
onClick: handleClick
}, [
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
})) : createCommentVNode("v-if", true),
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
key: 1,
class: normalizeClass(unref(ns).e("inner"))
}, [
renderSlot(_ctx.$slots, "default")
], 2)) : createCommentVNode("v-if", true),
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
], 10, ["href", "target"]);
};
}
});
var Link = _export_sfc(_sfc_main54, [["__file", "link.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/link/index.mjs
var ElLink = withInstall(Link);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/utils/submenu.mjs
var SubMenu = class {
constructor(parent, domNode) {
this.parent = parent;
this.domNode = domNode;
this.subIndex = 0;
this.subIndex = 0;
this.init();
}
init() {
this.subMenuItems = this.domNode.querySelectorAll("li");
this.addListeners();
}
gotoSubIndex(idx) {
if (idx === this.subMenuItems.length) {
idx = 0;
} else if (idx < 0) {
idx = this.subMenuItems.length - 1;
}
this.subMenuItems[idx].focus();
this.subIndex = idx;
}
addListeners() {
const parentNode = this.parent.domNode;
Array.prototype.forEach.call(this.subMenuItems, (el) => {
el.addEventListener("keydown", (event) => {
const code = getEventCode(event);
let prevDef = false;
switch (code) {
case EVENT_CODE.down: {
this.gotoSubIndex(this.subIndex + 1);
prevDef = true;
break;
}
case EVENT_CODE.up: {
this.gotoSubIndex(this.subIndex - 1);
prevDef = true;
break;
}
case EVENT_CODE.tab: {
triggerEvent(parentNode, "mouseleave");
break;
}
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
case EVENT_CODE.space: {
prevDef = true;
event.currentTarget.click();
break;
}
}
if (prevDef) {
event.preventDefault();
event.stopPropagation();
}
return false;
});
});
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/utils/menu-item.mjs
var MenuItem = class {
constructor(domNode, namespace) {
this.domNode = domNode;
this.submenu = null;
this.submenu = null;
this.init(namespace);
}
init(namespace) {
this.domNode.setAttribute("tabindex", "0");
const menuChild = this.domNode.querySelector(`.${namespace}-menu`);
if (menuChild) {
this.submenu = new SubMenu(this, menuChild);
}
this.addListeners();
}
addListeners() {
this.domNode.addEventListener("keydown", (event) => {
const code = getEventCode(event);
let prevDef = false;
switch (code) {
case EVENT_CODE.down: {
triggerEvent(event.currentTarget, "mouseenter");
this.submenu && this.submenu.gotoSubIndex(0);
prevDef = true;
break;
}
case EVENT_CODE.up: {
triggerEvent(event.currentTarget, "mouseenter");
this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);
prevDef = true;
break;
}
case EVENT_CODE.tab: {
triggerEvent(event.currentTarget, "mouseleave");
break;
}
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
case EVENT_CODE.space: {
prevDef = true;
event.currentTarget.click();
break;
}
}
if (prevDef) {
event.preventDefault();
}
});
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/utils/menu-bar.mjs
var Menu = class {
constructor(domNode, namespace) {
this.domNode = domNode;
this.init(namespace);
}
init(namespace) {
const menuChildren = this.domNode.childNodes;
Array.from(menuChildren).forEach((child) => {
if (child.nodeType === 1) {
new MenuItem(child, namespace);
}
});
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/menu-collapse-transition.mjs
var __default__46 = defineComponent({
name: "ElMenuCollapseTransition"
});
var _sfc_main55 = defineComponent({
...__default__46,
setup(__props) {
const ns = useNamespace("menu");
const listeners = {
onBeforeEnter: (el) => el.style.opacity = "0.2",
onEnter(el, done) {
addClass(el, `${ns.namespace.value}-opacity-transition`);
el.style.opacity = "1";
done();
},
onAfterEnter(el) {
removeClass(el, `${ns.namespace.value}-opacity-transition`);
el.style.opacity = "";
},
onBeforeLeave(el) {
if (!el.dataset)
el.dataset = {};
if (hasClass(el, ns.m("collapse"))) {
removeClass(el, ns.m("collapse"));
el.dataset.oldOverflow = el.style.overflow;
el.dataset.scrollWidth = el.clientWidth.toString();
addClass(el, ns.m("collapse"));
} else {
addClass(el, ns.m("collapse"));
el.dataset.oldOverflow = el.style.overflow;
el.dataset.scrollWidth = el.clientWidth.toString();
removeClass(el, ns.m("collapse"));
}
el.style.width = `${el.scrollWidth}px`;
el.style.overflow = "hidden";
},
onLeave(el) {
addClass(el, "horizontal-collapse-transition");
el.style.width = `${el.dataset.scrollWidth}px`;
}
};
return (_ctx, _cache) => {
return openBlock(), createBlock(Transition, mergeProps({ mode: "out-in" }, unref(listeners)), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16);
};
}
});
var ElMenuCollapseTransition = _export_sfc(_sfc_main55, [["__file", "menu-collapse-transition.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/use-menu.mjs
function useMenu(instance, currentIndex) {
const indexPath = computed(() => {
let parent = instance.parent;
const path = [currentIndex.value];
while (parent.type.name !== "ElMenu") {
if (parent.props.index) {
path.unshift(parent.props.index);
}
parent = parent.parent;
}
return path;
});
const parentMenu = computed(() => {
let parent = instance.parent;
while (parent && !["ElMenu", "ElSubMenu"].includes(parent.type.name)) {
parent = parent.parent;
}
return parent;
});
return {
parentMenu,
indexPath
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/use-menu-color.mjs
function useMenuColor(props) {
const menuBarColor = computed(() => {
const color = props.backgroundColor;
return color ? new TinyColor(color).shade(20).toString() : "";
});
return menuBarColor;
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/use-menu-css-var.mjs
var useMenuCssVar = (props, level) => {
const ns = useNamespace("menu");
return computed(() => ns.cssVarBlock({
"text-color": props.textColor || "",
"hover-text-color": props.textColor || "",
"bg-color": props.backgroundColor || "",
"hover-bg-color": useMenuColor(props).value || "",
"active-color": props.activeTextColor || "",
level: `${level}`
}));
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/tokens.mjs
var MENU_INJECTION_KEY = "rootMenu";
var SUB_MENU_INJECTION_KEY = "subMenu:";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/sub-menu.mjs
init_shared_esm_bundler();
var subMenuProps = buildProps({
index: {
type: String,
required: true
},
showTimeout: Number,
hideTimeout: Number,
popperClass: String,
popperStyle: {
type: definePropType([String, Object])
},
disabled: Boolean,
teleported: {
type: Boolean,
default: void 0
},
popperOffset: Number,
expandCloseIcon: {
type: iconPropType
},
expandOpenIcon: {
type: iconPropType
},
collapseCloseIcon: {
type: iconPropType
},
collapseOpenIcon: {
type: iconPropType
}
});
var COMPONENT_NAME10 = "ElSubMenu";
var SubMenu2 = defineComponent({
name: COMPONENT_NAME10,
props: subMenuProps,
setup(props, { slots, expose }) {
const instance = getCurrentInstance();
const { indexPath, parentMenu } = useMenu(instance, computed(() => props.index));
const nsMenu = useNamespace("menu");
const nsSubMenu = useNamespace("sub-menu");
const rootMenu = inject(MENU_INJECTION_KEY);
if (!rootMenu)
throwError(COMPONENT_NAME10, "can not inject root menu");
const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
if (!subMenu)
throwError(COMPONENT_NAME10, "can not inject sub menu");
const items = ref({});
const subMenus = ref({});
let timeout;
const mouseInChild = ref(false);
const verticalTitleRef = ref();
const vPopper = ref();
const isFirstLevel = computed(() => subMenu.level === 0);
const currentPlacement = computed(() => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start");
const subMenuTitleIcon = computed(() => {
const isExpandedMode = mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse;
if (isExpandedMode) {
if (props.expandCloseIcon && props.expandOpenIcon) {
return opened.value ? props.expandOpenIcon : props.expandCloseIcon;
}
return arrow_down_default;
} else {
if (props.collapseCloseIcon && props.collapseOpenIcon) {
return opened.value ? props.collapseOpenIcon : props.collapseCloseIcon;
}
return arrow_right_default;
}
});
const appendToBody = computed(() => {
const value = props.teleported;
return isUndefined(value) ? isFirstLevel.value : value;
});
const menuTransitionName = computed(() => rootMenu.props.collapse ? `${nsMenu.namespace.value}-zoom-in-left` : `${nsMenu.namespace.value}-zoom-in-top`);
const fallbackPlacements = computed(() => mode.value === "horizontal" && isFirstLevel.value ? [
"bottom-start",
"bottom-end",
"top-start",
"top-end",
"right-start",
"left-start"
] : [
"right-start",
"right",
"right-end",
"left-start",
"bottom-start",
"bottom-end",
"top-start",
"top-end"
]);
const opened = computed(() => rootMenu.openedMenus.includes(props.index));
const active = computed(() => [...Object.values(items.value), ...Object.values(subMenus.value)].some(({ active: active2 }) => active2));
const mode = computed(() => rootMenu.props.mode);
const persistent = computed(() => rootMenu.props.persistent);
const item = reactive({
index: props.index,
indexPath,
active
});
const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1);
const subMenuPopperOffset = computed(() => {
var _a;
return (_a = props.popperOffset) != null ? _a : rootMenu.props.popperOffset;
});
const subMenuPopperClass = computed(() => {
var _a;
return (_a = props.popperClass) != null ? _a : rootMenu.props.popperClass;
});
const subMenuPopperStyle = computed(() => {
var _a;
return (_a = props.popperStyle) != null ? _a : rootMenu.props.popperStyle;
});
const subMenuShowTimeout = computed(() => {
var _a;
return (_a = props.showTimeout) != null ? _a : rootMenu.props.showTimeout;
});
const subMenuHideTimeout = computed(() => {
var _a;
return (_a = props.hideTimeout) != null ? _a : rootMenu.props.hideTimeout;
});
const doDestroy = () => {
var _a, _b, _c;
return (_c = (_b = (_a = vPopper.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.popperInstanceRef) == null ? void 0 : _c.destroy();
};
const handleCollapseToggle = (value) => {
if (!value) {
doDestroy();
}
};
const handleClick = () => {
if (rootMenu.props.menuTrigger === "hover" && rootMenu.props.mode === "horizontal" || rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled)
return;
rootMenu.handleSubMenuClick({
index: props.index,
indexPath: indexPath.value,
active: active.value
});
};
const handleMouseenter = (event, showTimeout = subMenuShowTimeout.value) => {
var _a;
if (event.type === "focus")
return;
if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) {
subMenu.mouseInChild.value = true;
return;
}
subMenu.mouseInChild.value = true;
timeout == null ? void 0 : timeout();
({ stop: timeout } = useTimeoutFn(() => {
rootMenu.openMenu(props.index, indexPath.value);
}, showTimeout));
if (appendToBody.value) {
(_a = parentMenu.value.vnode.el) == null ? void 0 : _a.dispatchEvent(new MouseEvent("mouseenter"));
}
if (event.type === "mouseenter" && event.target) {
nextTick(() => {
focusElement(event.target, { preventScroll: true });
});
}
};
const handleMouseleave = (deepDispatch = false) => {
var _a;
if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical") {
subMenu.mouseInChild.value = false;
return;
}
timeout == null ? void 0 : timeout();
subMenu.mouseInChild.value = false;
({ stop: timeout } = useTimeoutFn(() => !mouseInChild.value && rootMenu.closeMenu(props.index, indexPath.value), subMenuHideTimeout.value));
if (appendToBody.value && deepDispatch) {
(_a = subMenu.handleMouseleave) == null ? void 0 : _a.call(subMenu, true);
}
};
watch(() => rootMenu.props.collapse, (value) => handleCollapseToggle(Boolean(value)));
{
const addSubMenu = (item2) => {
subMenus.value[item2.index] = item2;
};
const removeSubMenu = (item2) => {
delete subMenus.value[item2.index];
};
provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
addSubMenu,
removeSubMenu,
handleMouseleave,
mouseInChild,
level: subMenu.level + 1
});
}
expose({
opened
});
onMounted(() => {
rootMenu.addSubMenu(item);
subMenu.addSubMenu(item);
});
onBeforeUnmount(() => {
subMenu.removeSubMenu(item);
rootMenu.removeSubMenu(item);
});
return () => {
var _a;
const titleTag = [
(_a = slots.title) == null ? void 0 : _a.call(slots),
h(ElIcon, {
class: nsSubMenu.e("icon-arrow"),
style: {
transform: opened.value ? props.expandCloseIcon && props.expandOpenIcon || props.collapseCloseIcon && props.collapseOpenIcon && rootMenu.props.collapse ? "none" : "rotateZ(180deg)" : "none"
}
}, {
default: () => isString(subMenuTitleIcon.value) ? h(instance.appContext.components[subMenuTitleIcon.value]) : h(subMenuTitleIcon.value)
})
];
const child = rootMenu.isMenuPopup ? h(ElTooltip, {
ref: vPopper,
visible: opened.value,
effect: "light",
pure: true,
offset: subMenuPopperOffset.value,
showArrow: false,
persistent: persistent.value,
popperClass: subMenuPopperClass.value,
popperStyle: subMenuPopperStyle.value,
placement: currentPlacement.value,
teleported: appendToBody.value,
fallbackPlacements: fallbackPlacements.value,
transition: menuTransitionName.value,
gpuAcceleration: false
}, {
content: () => {
var _a2;
return h("div", {
class: [
nsMenu.m(mode.value),
nsMenu.m("popup-container"),
subMenuPopperClass.value
],
onMouseenter: (evt) => handleMouseenter(evt, 100),
onMouseleave: () => handleMouseleave(true),
onFocus: (evt) => handleMouseenter(evt, 100)
}, [
h("ul", {
class: [
nsMenu.b(),
nsMenu.m("popup"),
nsMenu.m(`popup-${currentPlacement.value}`)
],
style: ulStyle.value
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])
]);
},
default: () => h("div", {
class: nsSubMenu.e("title"),
onClick: handleClick
}, titleTag)
}) : h(Fragment, {}, [
h("div", {
class: nsSubMenu.e("title"),
ref: verticalTitleRef,
onClick: handleClick
}, titleTag),
h(ElCollapseTransition, {}, {
default: () => {
var _a2;
return withDirectives(h("ul", {
role: "menu",
class: [nsMenu.b(), nsMenu.m("inline")],
style: ulStyle.value
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]), [[vShow, opened.value]]);
}
})
]);
return h("li", {
class: [
nsSubMenu.b(),
nsSubMenu.is("active", active.value),
nsSubMenu.is("opened", opened.value),
nsSubMenu.is("disabled", props.disabled)
],
role: "menuitem",
ariaHaspopup: true,
ariaExpanded: opened.value,
onMouseenter: handleMouseenter,
onMouseleave: () => handleMouseleave(),
onFocus: handleMouseenter
}, [child]);
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/menu.mjs
init_shared_esm_bundler();
var menuProps = buildProps({
mode: {
type: String,
values: ["horizontal", "vertical"],
default: "vertical"
},
defaultActive: {
type: String,
default: ""
},
defaultOpeneds: {
type: definePropType(Array),
default: () => mutable([])
},
uniqueOpened: Boolean,
router: Boolean,
menuTrigger: {
type: String,
values: ["hover", "click"],
default: "hover"
},
collapse: Boolean,
backgroundColor: String,
textColor: String,
activeTextColor: String,
closeOnClickOutside: Boolean,
collapseTransition: {
type: Boolean,
default: true
},
ellipsis: {
type: Boolean,
default: true
},
popperOffset: {
type: Number,
default: 6
},
ellipsisIcon: {
type: iconPropType,
default: () => more_default
},
popperEffect: {
type: definePropType(String),
default: "dark"
},
popperClass: String,
popperStyle: {
type: definePropType([String, Object])
},
showTimeout: {
type: Number,
default: 300
},
hideTimeout: {
type: Number,
default: 300
},
persistent: {
type: Boolean,
default: true
}
});
var checkIndexPath = (indexPath) => isArray(indexPath) && indexPath.every((path) => isString(path));
var menuEmits = {
close: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
open: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
select: (index, indexPath, item, routerResult) => isString(index) && checkIndexPath(indexPath) && isObject(item) && (isUndefined(routerResult) || routerResult instanceof Promise)
};
var Menu2 = defineComponent({
name: "ElMenu",
props: menuProps,
emits: menuEmits,
setup(props, { emit, slots, expose }) {
const instance = getCurrentInstance();
const router = instance.appContext.config.globalProperties.$router;
const menu = ref();
const subMenu = ref();
const nsMenu = useNamespace("menu");
const nsSubMenu = useNamespace("sub-menu");
let moreItemWidth = 64;
const sliceIndex = ref(-1);
const openedMenus = ref(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
const activeIndex = ref(props.defaultActive);
const items = ref({});
const subMenus = ref({});
const isMenuPopup = computed(() => props.mode === "horizontal" || props.mode === "vertical" && props.collapse);
const initMenu = () => {
const activeItem = activeIndex.value && items.value[activeIndex.value];
if (!activeItem || props.mode === "horizontal" || props.collapse)
return;
const indexPath = activeItem.indexPath;
indexPath.forEach((index) => {
const subMenu2 = subMenus.value[index];
subMenu2 && openMenu(index, subMenu2.indexPath);
});
};
const openMenu = (index, indexPath) => {
if (openedMenus.value.includes(index))
return;
if (props.uniqueOpened) {
openedMenus.value = openedMenus.value.filter((index2) => indexPath.includes(index2));
}
openedMenus.value.push(index);
emit("open", index, indexPath);
};
const close2 = (index) => {
const i = openedMenus.value.indexOf(index);
if (i !== -1) {
openedMenus.value.splice(i, 1);
}
};
const closeMenu = (index, indexPath) => {
close2(index);
emit("close", index, indexPath);
};
const handleSubMenuClick = ({
index,
indexPath
}) => {
const isOpened = openedMenus.value.includes(index);
isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath);
};
const handleMenuItemClick = (menuItem) => {
if (props.mode === "horizontal" || props.collapse) {
openedMenus.value = [];
}
const { index, indexPath } = menuItem;
if (isNil_default(index) || isNil_default(indexPath))
return;
if (props.router && router) {
const route = menuItem.route || index;
const routerResult = router.push(route).then((res) => {
if (!res)
activeIndex.value = index;
return res;
});
emit("select", index, indexPath, { index, indexPath, route }, routerResult);
} else {
activeIndex.value = index;
emit("select", index, indexPath, { index, indexPath });
}
};
const updateActiveIndex = (val) => {
var _a;
const itemsInData = items.value;
const item = itemsInData[val] || activeIndex.value && itemsInData[activeIndex.value] || itemsInData[props.defaultActive];
activeIndex.value = (_a = item == null ? void 0 : item.index) != null ? _a : val;
};
const calcMenuItemWidth = (menuItem) => {
const computedStyle = getComputedStyle(menuItem);
const marginLeft = Number.parseInt(computedStyle.marginLeft, 10);
const marginRight = Number.parseInt(computedStyle.marginRight, 10);
return menuItem.offsetWidth + marginLeft + marginRight || 0;
};
const calcSliceIndex = () => {
var _a, _b;
if (!menu.value)
return -1;
const items2 = Array.from((_b = (_a = menu.value) == null ? void 0 : _a.childNodes) != null ? _b : []).filter((item) => item.nodeName !== "#comment" && (item.nodeName !== "#text" || item.nodeValue));
const computedMenuStyle = getComputedStyle(menu.value);
const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10);
const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10);
const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight;
let calcWidth = 0;
let sliceIndex2 = 0;
items2.forEach((item, index) => {
calcWidth += calcMenuItemWidth(item);
if (calcWidth <= menuWidth - moreItemWidth) {
sliceIndex2 = index + 1;
}
});
return sliceIndex2 === items2.length ? -1 : sliceIndex2;
};
const getIndexPath = (index) => subMenus.value[index].indexPath;
const debounce = (fn, wait = 33.34) => {
let timer;
return () => {
timer && clearTimeout(timer);
timer = setTimeout(() => {
fn();
}, wait);
};
};
let isFirstTimeRender = true;
const handleResize = () => {
const el = unrefElement(subMenu);
if (el)
moreItemWidth = calcMenuItemWidth(el) || 64;
if (sliceIndex.value === calcSliceIndex())
return;
const callback = () => {
sliceIndex.value = -1;
nextTick(() => {
sliceIndex.value = calcSliceIndex();
});
};
isFirstTimeRender ? callback() : debounce(callback)();
isFirstTimeRender = false;
};
watch(() => props.defaultActive, (currentActive) => {
if (!items.value[currentActive]) {
activeIndex.value = "";
}
updateActiveIndex(currentActive);
});
watch(() => props.collapse, (value) => {
if (value)
openedMenus.value = [];
});
watch(items.value, initMenu);
let resizeStopper;
watchEffect(() => {
if (props.mode === "horizontal" && props.ellipsis)
resizeStopper = useResizeObserver(menu, handleResize).stop;
else
resizeStopper == null ? void 0 : resizeStopper();
});
const mouseInChild = ref(false);
{
const addSubMenu = (item) => {
subMenus.value[item.index] = item;
};
const removeSubMenu = (item) => {
delete subMenus.value[item.index];
};
const addMenuItem = (item) => {
items.value[item.index] = item;
};
const removeMenuItem = (item) => {
delete items.value[item.index];
};
provide(MENU_INJECTION_KEY, reactive({
props,
openedMenus,
items,
subMenus,
activeIndex,
isMenuPopup,
addMenuItem,
removeMenuItem,
addSubMenu,
removeSubMenu,
openMenu,
closeMenu,
handleMenuItemClick,
handleSubMenuClick
}));
provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
addSubMenu,
removeSubMenu,
mouseInChild,
level: 0
});
}
onMounted(() => {
if (props.mode === "horizontal") {
new Menu(instance.vnode.el, nsMenu.namespace.value);
}
});
{
const open = (index) => {
const { indexPath } = subMenus.value[index];
indexPath.forEach((i) => openMenu(i, indexPath));
};
expose({
open,
close: close2,
updateActiveIndex,
handleResize
});
}
const ulStyle = useMenuCssVar(props, 0);
return () => {
var _a, _b;
let slot = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : [];
const vShowMore = [];
if (props.mode === "horizontal" && menu.value) {
const originalSlot = flattedChildren(slot).filter((vnode) => {
return (vnode == null ? void 0 : vnode.shapeFlag) !== 8;
});
const slotDefault = sliceIndex.value === -1 ? originalSlot : originalSlot.slice(0, sliceIndex.value);
const slotMore = sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value);
if ((slotMore == null ? void 0 : slotMore.length) && props.ellipsis) {
slot = slotDefault;
vShowMore.push(h(SubMenu2, {
ref: subMenu,
index: "sub-menu-more",
class: nsSubMenu.e("hide-arrow"),
popperOffset: props.popperOffset
}, {
title: () => h(ElIcon, {
class: nsSubMenu.e("icon-more")
}, {
default: () => h(props.ellipsisIcon)
}),
default: () => slotMore
}));
}
}
const directives = props.closeOnClickOutside ? [
[
ClickOutside,
() => {
if (!openedMenus.value.length)
return;
if (!mouseInChild.value) {
openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
openedMenus.value = [];
}
}
]
] : [];
const vMenu = withDirectives(h("ul", {
key: String(props.collapse),
role: "menubar",
ref: menu,
style: ulStyle.value,
class: {
[nsMenu.b()]: true,
[nsMenu.m(props.mode)]: true,
[nsMenu.m("collapse")]: props.collapse
}
}, [...slot, ...vShowMore]), directives);
if (props.collapseTransition && props.mode === "vertical") {
return h(ElMenuCollapseTransition, () => vMenu);
}
return vMenu;
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/menu-item.mjs
init_shared_esm_bundler();
var menuItemProps = buildProps({
index: {
type: definePropType([String, null]),
default: null
},
route: {
type: definePropType([String, Object])
},
disabled: Boolean
});
var menuItemEmits = {
click: (item) => isString(item.index) && isArray(item.indexPath)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/menu-item2.mjs
var COMPONENT_NAME11 = "ElMenuItem";
var __default__47 = defineComponent({
name: COMPONENT_NAME11
});
var _sfc_main56 = defineComponent({
...__default__47,
props: menuItemProps,
emits: menuItemEmits,
setup(__props, { expose, emit }) {
const props = __props;
isPropAbsent(props.index) && debugWarn(COMPONENT_NAME11, 'Missing required prop: "index"');
const instance = getCurrentInstance();
const rootMenu = inject(MENU_INJECTION_KEY);
const nsMenu = useNamespace("menu");
const nsMenuItem = useNamespace("menu-item");
if (!rootMenu)
throwError(COMPONENT_NAME11, "can not inject root menu");
const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
if (!subMenu)
throwError(COMPONENT_NAME11, "can not inject sub menu");
const active = computed(() => props.index === rootMenu.activeIndex);
const item = reactive({
index: props.index,
indexPath,
active
});
const handleClick = () => {
if (!props.disabled) {
rootMenu.handleMenuItemClick({
index: props.index,
indexPath: indexPath.value,
route: props.route
});
emit("click", item);
}
};
onMounted(() => {
subMenu.addSubMenu(item);
rootMenu.addMenuItem(item);
});
onBeforeUnmount(() => {
subMenu.removeSubMenu(item);
rootMenu.removeMenuItem(item);
});
expose({
parentMenu,
rootMenu,
active,
nsMenu,
nsMenuItem,
handleClick
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("li", {
class: normalizeClass([
unref(nsMenuItem).b(),
unref(nsMenuItem).is("active", unref(active)),
unref(nsMenuItem).is("disabled", _ctx.disabled)
]),
role: "menuitem",
tabindex: "-1",
onClick: handleClick
}, [
unref(parentMenu).type.name === "ElMenu" && unref(rootMenu).props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(unref(ElTooltip), {
key: 0,
effect: unref(rootMenu).props.popperEffect,
placement: "right",
"fallback-placements": ["left"],
persistent: unref(rootMenu).props.persistent,
"focus-on-target": ""
}, {
content: withCtx(() => [
renderSlot(_ctx.$slots, "title")
]),
default: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass(unref(nsMenu).be("tooltip", "trigger"))
}, [
renderSlot(_ctx.$slots, "default")
], 2)
]),
_: 3
}, 8, ["effect", "persistent"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
renderSlot(_ctx.$slots, "default"),
renderSlot(_ctx.$slots, "title")
], 64))
], 2);
};
}
});
var MenuItem2 = _export_sfc(_sfc_main56, [["__file", "menu-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/menu-item-group2.mjs
var menuItemGroupProps = {
title: String
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/src/menu-item-group.mjs
var __default__48 = defineComponent({
name: "ElMenuItemGroup"
});
var _sfc_main57 = defineComponent({
...__default__48,
props: menuItemGroupProps,
setup(__props) {
const ns = useNamespace("menu-item-group");
return (_ctx, _cache) => {
return openBlock(), createElementBlock("li", {
class: normalizeClass(unref(ns).b())
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("title"))
}, [
!_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createTextVNode(toDisplayString(_ctx.title), 1)
], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })
], 2),
createBaseVNode("ul", null, [
renderSlot(_ctx.$slots, "default")
])
], 2);
};
}
});
var MenuItemGroup = _export_sfc(_sfc_main57, [["__file", "menu-item-group.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/menu/index.mjs
var ElMenu = withInstall(Menu2, {
MenuItem: MenuItem2,
MenuItemGroup,
SubMenu: SubMenu2
});
var ElMenuItem = withNoopInstall(MenuItem2);
var ElMenuItemGroup = withNoopInstall(MenuItemGroup);
var ElSubMenu = withNoopInstall(SubMenu2);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/page-header/src/page-header.mjs
var pageHeaderProps = buildProps({
icon: {
type: iconPropType,
default: () => back_default
},
title: String,
content: {
type: String,
default: ""
}
});
var pageHeaderEmits = {
back: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/page-header/src/page-header2.mjs
var __default__49 = defineComponent({
name: "ElPageHeader"
});
var _sfc_main58 = defineComponent({
...__default__49,
props: pageHeaderProps,
emits: pageHeaderEmits,
setup(__props, { emit }) {
const { t } = useLocale();
const ns = useNamespace("page-header");
function handleClick() {
emit("back");
}
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([
unref(ns).b(),
unref(ns).is("contentful", !!_ctx.$slots.default),
{
[unref(ns).m("has-breadcrumb")]: !!_ctx.$slots.breadcrumb,
[unref(ns).m("has-extra")]: !!_ctx.$slots.extra
}
])
}, [
_ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("breadcrumb"))
}, [
renderSlot(_ctx.$slots, "breadcrumb")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("header"))
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("left"))
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("back")),
role: "button",
tabindex: "0",
onClick: handleClick
}, [
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
key: 0,
"aria-label": _ctx.title || unref(t)("el.pageHeader.title"),
class: normalizeClass(unref(ns).e("icon"))
}, [
renderSlot(_ctx.$slots, "icon", {}, () => [
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
})) : createCommentVNode("v-if", true)
])
], 10, ["aria-label"])) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("title"))
}, [
renderSlot(_ctx.$slots, "title", {}, () => [
createTextVNode(toDisplayString(_ctx.title || unref(t)("el.pageHeader.title")), 1)
])
], 2)
], 2),
createVNode(unref(ElDivider), { direction: "vertical" }),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("content"))
}, [
renderSlot(_ctx.$slots, "content", {}, () => [
createTextVNode(toDisplayString(_ctx.content), 1)
])
], 2)
], 2),
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("extra"))
}, [
renderSlot(_ctx.$slots, "extra")
], 2)) : createCommentVNode("v-if", true)
], 2),
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("main"))
}, [
renderSlot(_ctx.$slots, "default")
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var PageHeader = _export_sfc(_sfc_main58, [["__file", "page-header.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/page-header/index.mjs
var ElPageHeader = withInstall(PageHeader);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/constants.mjs
var elPaginationKey = Symbol("elPaginationKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/prev.mjs
var paginationPrevProps = buildProps({
disabled: Boolean,
currentPage: {
type: Number,
default: 1
},
prevText: {
type: String
},
prevIcon: {
type: iconPropType
}
});
var paginationPrevEmits = {
click: (evt) => evt instanceof MouseEvent
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/prev2.mjs
var __default__50 = defineComponent({
name: "ElPaginationPrev"
});
var _sfc_main59 = defineComponent({
...__default__50,
props: paginationPrevProps,
emits: paginationPrevEmits,
setup(__props) {
const props = __props;
const { t } = useLocale();
const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("button", {
type: "button",
class: "btn-prev",
disabled: unref(internalDisabled),
"aria-label": _ctx.prevText || unref(t)("el.pagination.prev"),
"aria-disabled": unref(internalDisabled),
onClick: ($event) => _ctx.$emit("click", $event)
}, [
_ctx.prevText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))
]),
_: 1
}))
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]);
};
}
});
var Prev = _export_sfc(_sfc_main59, [["__file", "prev.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/next.mjs
var paginationNextProps = buildProps({
disabled: Boolean,
currentPage: {
type: Number,
default: 1
},
pageCount: {
type: Number,
default: 50
},
nextText: {
type: String
},
nextIcon: {
type: iconPropType
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/next2.mjs
var __default__51 = defineComponent({
name: "ElPaginationNext"
});
var _sfc_main60 = defineComponent({
...__default__51,
props: paginationNextProps,
emits: ["click"],
setup(__props) {
const props = __props;
const { t } = useLocale();
const internalDisabled = computed(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("button", {
type: "button",
class: "btn-next",
disabled: unref(internalDisabled),
"aria-label": _ctx.nextText || unref(t)("el.pagination.next"),
"aria-disabled": unref(internalDisabled),
onClick: ($event) => _ctx.$emit("click", $event)
}, [
_ctx.nextText ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))
]),
_: 1
}))
], 8, ["disabled", "aria-label", "aria-disabled", "onClick"]);
};
}
});
var Next = _export_sfc(_sfc_main60, [["__file", "next.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/usePagination.mjs
var usePagination = () => inject(elPaginationKey, {});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/sizes.mjs
var paginationSizesProps = buildProps({
pageSize: {
type: Number,
required: true
},
pageSizes: {
type: definePropType(Array),
default: () => mutable([10, 20, 30, 40, 50, 100])
},
popperClass: {
type: String
},
popperStyle: {
type: definePropType([String, Object])
},
disabled: Boolean,
teleported: Boolean,
size: {
type: String,
values: componentSizes
},
appendSizeTo: String
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs
init_shared_esm_bundler();
var __default__52 = defineComponent({
name: "ElPaginationSizes"
});
var _sfc_main61 = defineComponent({
...__default__52,
props: paginationSizesProps,
emits: ["page-size-change"],
setup(__props, { emit }) {
const props = __props;
const { t } = useLocale();
const ns = useNamespace("pagination");
const pagination = usePagination();
const innerPageSize = ref(props.pageSize);
watch(() => props.pageSizes, (newVal, oldVal) => {
if (isEqual_default(newVal, oldVal))
return;
if (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 _a;
if (val !== innerPageSize.value) {
innerPageSize.value = val;
(_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val));
}
}
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", {
class: normalizeClass(unref(ns).e("sizes"))
}, [
createVNode(unref(ElSelect), {
"model-value": innerPageSize.value,
disabled: _ctx.disabled,
"popper-class": _ctx.popperClass,
"popper-style": _ctx.popperStyle,
size: _ctx.size,
teleported: _ctx.teleported,
"validate-event": false,
"append-to": _ctx.appendSizeTo,
onChange: handleChange
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(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", "popper-style", "size", "teleported", "append-to"])
], 2);
};
}
});
var Sizes = _export_sfc(_sfc_main61, [["__file", "sizes.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs
var __default__53 = defineComponent({
name: "ElPaginationJumper"
});
var _sfc_main62 = defineComponent({
...__default__53,
props: paginationJumperProps,
setup(__props) {
const { t } = useLocale();
const ns = useNamespace("pagination");
const { pageCount, disabled, currentPage, changeEvent } = usePagination();
const userInput = ref();
const innerValue = computed(() => {
var _a;
return (_a = userInput.value) != null ? _a : currentPage == null ? void 0 : currentPage.value;
});
function handleInput(val) {
userInput.value = val ? +val : "";
}
function handleChange(val) {
val = Math.trunc(+val);
changeEvent == null ? void 0 : changeEvent(val);
userInput.value = void 0;
}
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", {
class: normalizeClass(unref(ns).e("jump")),
disabled: unref(disabled)
}, [
createBaseVNode("span", {
class: normalizeClass([unref(ns).e("goto")])
}, toDisplayString(unref(t)("el.pagination.goto")), 3),
createVNode(unref(ElInput), {
size: _ctx.size,
class: normalizeClass([unref(ns).e("editor"), unref(ns).is("in-pagination")]),
min: 1,
max: unref(pageCount),
disabled: unref(disabled),
"model-value": unref(innerValue),
"validate-event": false,
"aria-label": unref(t)("el.pagination.page"),
type: "number",
"onUpdate:modelValue": handleInput,
onChange: handleChange
}, null, 8, ["size", "class", "max", "disabled", "model-value", "aria-label"]),
createBaseVNode("span", {
class: normalizeClass([unref(ns).e("classifier")])
}, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3)
], 10, ["disabled"]);
};
}
});
var Jumper = _export_sfc(_sfc_main62, [["__file", "jumper.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/total2.mjs
var __default__54 = defineComponent({
name: "ElPaginationTotal"
});
var _sfc_main63 = defineComponent({
...__default__54,
props: paginationTotalProps,
setup(__props) {
const { t } = useLocale();
const ns = useNamespace("pagination");
const { disabled } = usePagination();
return (_ctx, _cache) => {
return openBlock(), createElementBlock("span", {
class: normalizeClass(unref(ns).e("total")),
disabled: unref(disabled)
}, toDisplayString(unref(t)("el.pagination.total", {
total: _ctx.total
})), 11, ["disabled"]);
};
}
});
var Total = _export_sfc(_sfc_main63, [["__file", "total.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/components/pager2.mjs
var __default__55 = defineComponent({
name: "ElPaginationPager"
});
var _sfc_main64 = defineComponent({
...__default__55,
props: paginationPagerProps,
emits: [CHANGE_EVENT],
setup(__props, { emit }) {
const props = __props;
const nsPager = useNamespace("pager");
const nsIcon = useNamespace("icon");
const { t } = useLocale();
const showPrevMore = ref(false);
const showNextMore = ref(false);
const quickPrevHover = ref(false);
const quickNextHover = ref(false);
const quickPrevFocus = ref(false);
const quickNextFocus = ref(false);
const pagers = computed(() => {
const pagerCount = 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 prevMoreKls = computed(() => [
"more",
"btn-quickprev",
nsIcon.b(),
nsPager.is("disabled", props.disabled)
]);
const nextMoreKls = computed(() => [
"more",
"btn-quicknext",
nsIcon.b(),
nsPager.is("disabled", props.disabled)
]);
const tabindex = computed(() => props.disabled ? -1 : 0);
watch(() => [props.pageCount, props.pagerCount, props.currentPage], ([pageCount, pagerCount, currentPage]) => {
const halfPagerCount = (pagerCount - 1) / 2;
let showPrev = false;
let showNext = false;
if (pageCount > pagerCount) {
showPrev = currentPage > pagerCount - halfPagerCount;
showNext = currentPage < pageCount - halfPagerCount;
}
quickPrevHover.value && (quickPrevHover.value = showPrev);
quickNextHover.value && (quickNextHover.value = showNext);
showPrevMore.value = showPrev;
showNextMore.value = showNext;
}, { immediate: true });
function onMouseEnter(forward = false) {
if (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_EVENT, newPage);
}
} else if (target2.tagName.toLowerCase() === "li" && Array.from(target2.classList).includes("more")) {
onPagerClick(e);
}
}
function onPagerClick(event) {
const target2 = event.target;
if (target2.tagName.toLowerCase() === "ul" || 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_EVENT, newPage);
}
}
return (_ctx, _cache) => {
return openBlock(), createElementBlock("ul", {
class: normalizeClass(unref(nsPager).b()),
onClick: onPagerClick,
onKeyup: withKeys(onEnter, ["enter"])
}, [
_ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
key: 0,
class: normalizeClass([[
unref(nsPager).is("active", _ctx.currentPage === 1),
unref(nsPager).is("disabled", _ctx.disabled)
], "number"]),
"aria-current": _ctx.currentPage === 1,
"aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
tabindex: unref(tabindex)
}, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true),
showPrevMore.value ? (openBlock(), createElementBlock("li", {
key: 1,
class: normalizeClass(unref(prevMoreKls)),
tabindex: unref(tabindex),
"aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
onMouseenter: ($event) => onMouseEnter(true),
onMouseleave: ($event) => quickPrevHover.value = false,
onFocus: ($event) => onFocus(true),
onBlur: ($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, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : 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,
"aria-label": unref(t)("el.pagination.currentPage", { pager }),
tabindex: unref(tabindex)
}, toDisplayString(pager), 11, ["aria-current", "aria-label", "tabindex"]);
}), 128)),
showNextMore.value ? (openBlock(), createElementBlock("li", {
key: 2,
class: normalizeClass(unref(nextMoreKls)),
tabindex: unref(tabindex),
"aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
onMouseenter: ($event) => onMouseEnter(),
onMouseleave: ($event) => quickNextHover.value = false,
onFocus: ($event) => onFocus(),
onBlur: ($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, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
_ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
key: 3,
class: normalizeClass([[
unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount),
unref(nsPager).is("disabled", _ctx.disabled)
], "number"]),
"aria-current": _ctx.currentPage === _ctx.pageCount,
"aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
tabindex: unref(tabindex)
}, toDisplayString(_ctx.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true)
], 42, ["onKeyup"]);
};
}
});
var Pager = _export_sfc(_sfc_main64, [["__file", "pager.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/src/pagination.mjs
var isAbsent = (v2) => typeof v2 !== "number";
var paginationProps = buildProps({
pageSize: Number,
defaultPageSize: Number,
total: Number,
pageCount: Number,
pagerCount: {
type: Number,
validator: (value) => {
return isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
},
default: 7
},
currentPage: Number,
defaultCurrentPage: Number,
layout: {
type: String,
default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ")
},
pageSizes: {
type: definePropType(Array),
default: () => mutable([10, 20, 30, 40, 50, 100])
},
popperClass: {
type: String,
default: ""
},
popperStyle: {
type: definePropType([String, Object])
},
prevText: {
type: String,
default: ""
},
prevIcon: {
type: iconPropType,
default: () => arrow_left_default
},
nextText: {
type: String,
default: ""
},
nextIcon: {
type: iconPropType,
default: () => arrow_right_default
},
teleported: {
type: Boolean,
default: true
},
small: Boolean,
size: useSizeProp,
background: Boolean,
disabled: Boolean,
hideOnSinglePage: Boolean,
appendSizeTo: String
});
var paginationEmits = {
"update:current-page": (val) => isNumber(val),
"update:page-size": (val) => isNumber(val),
"size-change": (val) => isNumber(val),
change: (currentPage, pageSize) => isNumber(currentPage) && isNumber(pageSize),
"current-change": (val) => isNumber(val),
"prev-click": (val) => isNumber(val),
"next-click": (val) => isNumber(val)
};
var componentName = "ElPagination";
var Pagination = defineComponent({
name: componentName,
props: paginationProps,
emits: paginationEmits,
setup(props, { emit, slots }) {
const { t } = useLocale();
const ns = useNamespace("pagination");
const vnodeProps = getCurrentInstance().vnode.props || {};
const _globalSize = useGlobalSize();
const _size = computed(() => {
var _a;
return props.small ? "small" : (_a = props.size) != null ? _a : _globalSize.value;
});
useDeprecated({
from: "small",
replacement: "size",
version: "3.0.0",
scope: "el-pagination",
ref: "https://element-plus.org/zh-CN/component/pagination.html"
}, computed(() => !!props.small));
const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
const assertValidUsage = computed(() => {
if (isAbsent(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;
}
}
}
}
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;
});
watch([currentPageBridge, pageSizeBridge], (value) => {
emit(CHANGE_EVENT, ...value);
}, { flush: "post" });
function handleCurrentChange(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: handleCurrentChange,
handleSizeChange
});
return () => {
var _a, _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: ns.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: _size.value
}),
pager: h(Pager, {
currentPage: currentPageBridge.value,
pageCount: pageCountBridge.value,
pagerCount: props.pagerCount,
onChange: handleCurrentChange,
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,
popperStyle: props.popperStyle,
disabled: props.disabled,
teleported: props.teleported,
size: _size.value,
appendSizeTo: props.appendSizeTo
}),
slot: (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.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], ns.is("first"));
addClass2(rootChildren[rootChildren.length - 1], ns.is("last"));
if (haveRightWrapper && rightWrapperChildren.length > 0) {
addClass2(rightWrapperChildren[0], ns.is("first"));
addClass2(rightWrapperChildren[rightWrapperChildren.length - 1], ns.is("last"));
rootChildren.push(rightWrapperRoot);
}
return h("div", {
class: [
ns.b(),
ns.is("background", props.background),
ns.m(_size.value)
]
}, rootChildren);
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/pagination/index.mjs
var ElPagination = withInstall(Pagination);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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: Boolean,
hideAfter: {
type: Number,
default: 200
},
effect: {
...useTooltipContentProps.effect,
default: "light"
},
teleported: useTooltipContentProps.teleported,
persistent: useTooltipContentProps.persistent,
width: {
type: [String, Number],
default: 150
},
virtualTriggering: useTooltipTriggerProps.virtualTriggering,
virtualRef: useTooltipTriggerProps.virtualRef
});
var popconfirmEmits = {
confirm: (e) => e instanceof MouseEvent,
cancel: (e) => e instanceof MouseEvent
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs
var __default__56 = defineComponent({
name: "ElPopconfirm"
});
var _sfc_main65 = defineComponent({
...__default__56,
props: popconfirmProps,
emits: popconfirmEmits,
setup(__props, { expose, emit }) {
const props = __props;
const { t } = useLocale();
const ns = useNamespace("popconfirm");
const tooltipRef = ref();
const rootRef = ref();
const popperRef = computed(() => {
var _a;
return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef;
});
const showPopper = () => {
var _a, _b;
(_b = (_a = rootRef.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
};
const hidePopper = () => {
var _a, _b;
(_b = (_a = tooltipRef.value) == null ? void 0 : _a.onClose) == null ? void 0 : _b.call(_a);
};
const style = computed(() => {
return {
width: addUnit(props.width)
};
});
const confirm = (e) => {
emit("confirm", e);
hidePopper();
};
const cancel = (e) => {
emit("cancel", e);
hidePopper();
};
const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
expose({
popperRef,
hide: hidePopper
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
ref_key: "tooltipRef",
ref: tooltipRef,
trigger: "click",
effect: _ctx.effect
}, _ctx.$attrs, {
"popper-class": `${unref(ns).namespace.value}-popover`,
"popper-style": unref(style),
teleported: _ctx.teleported,
"fallback-placements": ["bottom", "top", "right", "left"],
"hide-after": _ctx.hideAfter,
persistent: _ctx.persistent,
loop: "",
onShow: showPopper
}), {
content: withCtx(() => [
createBaseVNode("div", {
ref_key: "rootRef",
ref: rootRef,
tabindex: "-1",
class: normalizeClass(unref(ns).b())
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("main"))
}, [
!_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(ns).e("icon")),
style: normalizeStyle({ color: _ctx.iconColor })
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
}, 8, ["class", "style"])) : createCommentVNode("v-if", true),
createTextVNode(" " + toDisplayString(_ctx.title), 1)
], 2),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("action"))
}, [
renderSlot(_ctx.$slots, "actions", {
confirm,
cancel
}, () => [
createVNode(unref(ElButton), {
size: "small",
type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
text: _ctx.cancelButtonType === "text",
onClick: cancel
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(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, ["effect", "popper-class", "popper-style", "teleported", "hide-after", "persistent"]);
};
}
});
var Popconfirm = _export_sfc(_sfc_main65, [["__file", "popconfirm.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/popconfirm/index.mjs
var ElPopconfirm = withInstall(Popconfirm);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/popover/src/popover2.mjs
var popoverProps = buildProps({
trigger: useTooltipTriggerProps.trigger,
triggerKeys: useTooltipTriggerProps.triggerKeys,
placement: dropdownProps.placement,
disabled: useTooltipTriggerProps.disabled,
visible: useTooltipContentProps.visible,
transition: useTooltipContentProps.transition,
popperOptions: dropdownProps.popperOptions,
tabindex: dropdownProps.tabindex,
content: useTooltipContentProps.content,
popperStyle: useTooltipContentProps.popperStyle,
popperClass: useTooltipContentProps.popperClass,
enterable: {
...useTooltipContentProps.enterable,
default: true
},
effect: {
...useTooltipContentProps.effect,
default: "light"
},
teleported: useTooltipContentProps.teleported,
appendTo: useTooltipContentProps.appendTo,
title: String,
width: {
type: [String, Number],
default: 150
},
offset: {
type: Number,
default: void 0
},
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
},
showArrow: {
type: Boolean,
default: true
},
persistent: {
type: Boolean,
default: true
},
"onUpdate:visible": {
type: Function
}
});
var popoverEmits = {
"update:visible": (value) => isBoolean(value),
"before-enter": () => true,
"before-leave": () => true,
"after-enter": () => true,
"after-leave": () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/popover/src/popover.mjs
var updateEventKeyRaw = `onUpdate:visible`;
var __default__57 = defineComponent({
name: "ElPopover"
});
var _sfc_main66 = defineComponent({
...__default__57,
props: popoverProps,
emits: popoverEmits,
setup(__props, { expose, emit }) {
const props = __props;
const onUpdateVisible = computed(() => {
return props[updateEventKeyRaw];
});
const ns = useNamespace("popover");
const tooltipRef = ref();
const popperRef = computed(() => {
var _a;
return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef;
});
const style = computed(() => {
return [
{
width: addUnit(props.width)
},
props.popperStyle
];
});
const kls = computed(() => {
return [ns.b(), props.popperClass, { [ns.m("plain")]: !!props.content }];
});
const gpuAcceleration = computed(() => {
return props.transition === `${ns.namespace.value}-fade-in-linear`;
});
const hide = () => {
var _a;
(_a = tooltipRef.value) == null ? void 0 : _a.hide();
};
const beforeEnter = () => {
emit("before-enter");
};
const beforeLeave = () => {
emit("before-leave");
};
const afterEnter = () => {
emit("after-enter");
};
const afterLeave = () => {
emit("update:visible", false);
emit("after-leave");
};
expose({
popperRef,
hide
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
ref_key: "tooltipRef",
ref: tooltipRef
}, _ctx.$attrs, {
trigger: _ctx.trigger,
"trigger-keys": _ctx.triggerKeys,
placement: _ctx.placement,
disabled: _ctx.disabled,
visible: _ctx.visible,
transition: _ctx.transition,
"popper-options": _ctx.popperOptions,
tabindex: _ctx.tabindex,
content: _ctx.content,
offset: _ctx.offset,
"show-after": _ctx.showAfter,
"hide-after": _ctx.hideAfter,
"auto-close": _ctx.autoClose,
"show-arrow": _ctx.showArrow,
"aria-label": _ctx.title,
effect: _ctx.effect,
enterable: _ctx.enterable,
"popper-class": unref(kls),
"popper-style": unref(style),
teleported: _ctx.teleported,
"append-to": _ctx.appendTo,
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(ns).e("title")),
role: "title"
}, toDisplayString(_ctx.title), 3)) : createCommentVNode("v-if", true),
renderSlot(_ctx.$slots, "default", {}, () => [
createTextVNode(toDisplayString(_ctx.content), 1)
])
]),
default: withCtx(() => [
_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 3
}, 16, ["trigger", "trigger-keys", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "append-to", "persistent", "gpu-acceleration", "onUpdate:visible"]);
};
}
});
var Popover = _export_sfc(_sfc_main66, [["__file", "popover.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/rate/src/rate2.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,
clearable: Boolean,
...useAriaProps(["ariaLabel"])
});
var rateEmits = {
[CHANGE_EVENT]: (value) => isNumber(value),
[UPDATE_MODEL_EVENT]: (value) => isNumber(value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/rate/src/rate.mjs
init_shared_esm_bundler();
var __default__58 = defineComponent({
name: "ElRate"
});
var _sfc_main67 = defineComponent({
...__default__58,
props: rateProps,
emits: rateEmits,
setup(__props, { expose, emit }) {
const props = __props;
function getValueFromMap(value, map) {
const isExcludedObject = (val) => isObject(val);
const matchedKeys = Object.keys(map).map((key) => +key).filter((key) => {
const val = map[key];
const excluded = isExcludedObject(val) ? val.excluded : false;
return excluded ? value < key : value <= key;
}).sort((a2, b2) => a2 - b2);
const matchedValue = map[matchedKeys[0]];
return isExcludedObject(matchedValue) && matchedValue.value || matchedValue;
}
const formContext = inject(formContextKey, void 0);
const formItemContext = inject(formItemContextKey, void 0);
const rateSize = useFormSize();
const ns = useNamespace("rate");
const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
formItemContext
});
const currentValue = ref(props.modelValue);
const hoverIndex = ref(-1);
const pointerAtLeftHalf = ref(true);
const iconRefs = ref([]);
const iconClientWidths = computed(() => iconRefs.value.map((icon) => icon.$el.clientWidth));
const rateClasses = computed(() => [ns.b(), ns.m(rateSize.value)]);
const rateDisabled = computed(() => props.disabled || (formContext == null ? void 0 : formContext.disabled));
const rateStyles = computed(() => {
return ns.cssVarBlock({
"void-color": props.voidColor,
"disabled-void-color": props.disabledVoidColor,
"fill-color": activeColor.value
});
});
const text = computed(() => {
let result = "";
if (props.showScore) {
result = props.scoreTemplate.replace(/\{\s*value\s*\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`);
} else if (props.showText) {
result = props.texts[Math.ceil(currentValue.value) - 1];
}
return result;
});
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_EVENT, 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;
}
const code = getEventCode(e);
const step = props.allowHalf ? 0.5 : 1;
let _currentValue = currentValue.value;
switch (code) {
case EVENT_CODE.up:
case EVENT_CODE.right:
_currentValue += step;
break;
case EVENT_CODE.left:
case EVENT_CODE.down:
_currentValue -= step;
break;
}
_currentValue = clamp_default(_currentValue, 0, props.max);
if (_currentValue === currentValue.value) {
return;
}
e.stopPropagation();
e.preventDefault();
emit(UPDATE_MODEL_EVENT, _currentValue);
emit(CHANGE_EVENT, _currentValue);
return _currentValue;
}
function setCurrentValue(value, event) {
if (rateDisabled.value) {
return;
}
if (props.allowHalf && event) {
pointerAtLeftHalf.value = event.offsetX * 2 <= iconClientWidths.value[value - 1];
currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value;
} else {
currentValue.value = value;
}
hoverIndex.value = value;
}
function resetCurrentValue() {
if (rateDisabled.value) {
return;
}
if (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 _a;
return openBlock(), createElementBlock("div", {
id: unref(inputId),
class: normalizeClass([unref(rateClasses), unref(ns).is("disabled", unref(rateDisabled))]),
role: "slider",
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "rating" : void 0,
"aria-labelledby": unref(isLabeledByFormItem) ? (_a = unref(formItemContext)) == null ? void 0 : _a.labelId : void 0,
"aria-valuenow": currentValue.value,
"aria-valuetext": 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(ns).e("item")),
onMousemove: ($event) => setCurrentValue(item, $event),
onMouseleave: resetCurrentValue,
onClick: ($event) => selectValue(item)
}, [
createVNode(unref(ElIcon), {
ref_for: true,
ref_key: "iconRefs",
ref: iconRefs,
class: normalizeClass([
unref(ns).e("icon"),
{ hover: hoverIndex.value === item },
unref(ns).is("active", item <= currentValue.value),
unref(ns).is("focus-visible", item === Math.ceil(currentValue.value || 1))
])
}, {
default: withCtx(() => [
withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(activeComponent)), null, null, 512)), [
[vShow, !showDecimalIcon(item) && item <= currentValue.value]
]),
withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(voidComponent)), null, null, 512)), [
[vShow, !showDecimalIcon(item) && item > currentValue.value]
]),
withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(voidComponent)), {
class: normalizeClass([unref(ns).em("decimal", "box")])
}, null, 8, ["class"])), [
[vShow, showDecimalIcon(item)]
]),
withDirectives(createVNode(unref(ElIcon), {
style: normalizeStyle(unref(decimalStyle)),
class: normalizeClass([unref(ns).e("icon"), unref(ns).e("decimal")])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(decimalIconComponent))))
]),
_: 2
}, 1032, ["style", "class"]), [
[vShow, showDecimalIcon(item)]
])
]),
_: 2
}, 1032, ["class"])
], 42, ["onMousemove", "onClick"]);
}), 128)),
_ctx.showText || _ctx.showScore ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(ns).e("text")),
style: normalizeStyle({ color: _ctx.textColor })
}, toDisplayString(unref(text)), 7)) : createCommentVNode("v-if", true)
], 46, ["id", "aria-label", "aria-labelledby", "aria-valuenow", "aria-valuetext", "aria-valuemax"]);
};
}
});
var Rate = _export_sfc(_sfc_main67, [["__file", "rate.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/rate/index.mjs
var ElRate = withInstall(Rate);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/result/src/result.mjs
var IconMap = {
primary: "icon-primary",
success: "icon-success",
warning: "icon-warning",
error: "icon-error",
info: "icon-info"
};
var IconComponentMap = {
[IconMap.primary]: info_filled_default,
[IconMap.success]: circle_check_filled_default,
[IconMap.warning]: warning_filled_default,
[IconMap.error]: circle_close_filled_default,
[IconMap.info]: info_filled_default
};
var resultProps = buildProps({
title: {
type: String,
default: ""
},
subTitle: {
type: String,
default: ""
},
icon: {
type: String,
values: ["primary", "success", "warning", "info", "error"],
default: "info"
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/result/src/result2.mjs
var __default__59 = defineComponent({
name: "ElResult"
});
var _sfc_main68 = defineComponent({
...__default__59,
props: resultProps,
setup(__props) {
const props = __props;
const ns = 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(ns).b())
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).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(ns).e("title"))
}, [
renderSlot(_ctx.$slots, "title", {}, () => [
createBaseVNode("p", null, toDisplayString(_ctx.title), 1)
])
], 2)) : createCommentVNode("v-if", true),
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("subtitle"))
}, [
renderSlot(_ctx.$slots, "sub-title", {}, () => [
createBaseVNode("p", null, toDisplayString(_ctx.subTitle), 1)
])
], 2)) : createCommentVNode("v-if", true),
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(unref(ns).e("extra"))
}, [
renderSlot(_ctx.$slots, "extra")
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var Result = _export_sfc(_sfc_main68, [["__file", "result.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/result/index.mjs
var ElResult = withInstall(Result);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/row/src/row.mjs
var RowJustify = [
"start",
"center",
"end",
"space-around",
"space-between",
"space-evenly"
];
var RowAlign = ["top", "middle", "bottom"];
var rowProps = buildProps({
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: RowJustify,
default: "start"
},
align: {
type: String,
values: RowAlign
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/row/src/row2.mjs
var __default__60 = defineComponent({
name: "ElRow"
});
var _sfc_main69 = defineComponent({
...__default__60,
props: rowProps,
setup(__props) {
const props = __props;
const ns = 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(() => [
ns.b(),
ns.is(`justify-${props.justify}`, props.justify !== "start"),
ns.is(`align-${props.align}`, !!props.align)
]);
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_main69, [["__file", "row.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/row/index.mjs
var ElRow = withInstall(Row);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/skeleton/src/skeleton.mjs
var skeletonProps = buildProps({
animated: Boolean,
count: {
type: Number,
default: 1
},
rows: {
type: Number,
default: 3
},
loading: {
type: Boolean,
default: true
},
throttle: {
type: definePropType([Number, Object])
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs
var __default__61 = defineComponent({
name: "ElSkeletonItem"
});
var _sfc_main70 = defineComponent({
...__default__61,
props: skeletonItemProps,
setup(__props) {
const ns = useNamespace("skeleton");
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([unref(ns).e("item"), unref(ns).e(_ctx.variant)])
}, [
_ctx.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true)
], 2);
};
}
});
var SkeletonItem = _export_sfc(_sfc_main70, [["__file", "skeleton-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-throttle-render/index.mjs
init_shared_esm_bundler();
var useThrottleRender = (loading, throttle = 0) => {
if (throttle === 0)
return loading;
const initVal = isObject(throttle) && Boolean(throttle.initVal);
const throttled = ref(initVal);
let timeoutHandle = null;
const dispatchThrottling = (timer) => {
if (isUndefined(timer)) {
throttled.value = loading.value;
return;
}
if (timeoutHandle) {
clearTimeout(timeoutHandle);
}
timeoutHandle = setTimeout(() => {
throttled.value = loading.value;
}, timer);
};
const dispatcher = (type4) => {
if (type4 === "leading") {
if (isNumber(throttle)) {
dispatchThrottling(throttle);
} else {
dispatchThrottling(throttle.leading);
}
} else {
if (isObject(throttle)) {
dispatchThrottling(throttle.trailing);
} else {
throttled.value = false;
}
}
};
onMounted(() => dispatcher("leading"));
watch(() => loading.value, (val) => {
dispatcher(val ? "leading" : "trailing");
});
return throttled;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/skeleton/src/skeleton2.mjs
var __default__62 = defineComponent({
name: "ElSkeleton"
});
var _sfc_main71 = defineComponent({
...__default__62,
props: skeletonProps,
setup(__props, { expose }) {
const props = __props;
const ns = 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(ns).b(), unref(ns).is("animated", _ctx.animated)]
}, _ctx.$attrs), [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (i) => {
return openBlock(), createElementBlock(Fragment, { key: i }, [
unref(uiLoading) ? renderSlot(_ctx.$slots, "template", { key: i }, () => [
createVNode(SkeletonItem, {
class: normalizeClass(unref(ns).is("first")),
variant: "p"
}, null, 8, ["class"]),
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (item) => {
return openBlock(), createBlock(SkeletonItem, {
key: item,
class: normalizeClass([
unref(ns).e("paragraph"),
unref(ns).is("last", item === _ctx.rows && _ctx.rows > 1)
]),
variant: "p"
}, null, 8, ["class"]);
}), 128))
]) : createCommentVNode("v-if", true)
], 64);
}), 128))
], 16)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)));
};
}
});
var Skeleton = _export_sfc(_sfc_main71, [["__file", "skeleton.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/skeleton/index.mjs
var ElSkeleton = withInstall(Skeleton, {
SkeletonItem
});
var ElSkeletonItem = withNoopInstall(SkeletonItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/constants.mjs
var sliderContextKey = Symbol("sliderContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/slider2.mjs
init_shared_esm_bundler();
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,
rangeStartLabel: {
type: String,
default: void 0
},
rangeEndLabel: {
type: String,
default: void 0
},
formatValueText: {
type: definePropType(Function),
default: void 0
},
tooltipClass: {
type: String,
default: void 0
},
placement: {
type: String,
values: Ee,
default: "top"
},
marks: {
type: definePropType(Object)
},
validateEvent: {
type: Boolean,
default: true
},
persistent: {
type: Boolean,
default: true
},
...useAriaProps(["ariaLabel"])
});
var isValidValue = (value) => isNumber(value) || isArray(value) && value.every(isNumber);
var sliderEmits = {
[UPDATE_MODEL_EVENT]: isValidValue,
[INPUT_EVENT]: isValidValue,
[CHANGE_EVENT]: isValidValue
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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) => isNumber(value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs
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: min2,
max: max2,
step,
showTooltip,
persistent,
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 - min2.value) / (max2.value - min2.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 / (max2.value - min2.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) => {
const code = getEventCode(event);
let isPreventDefault = true;
switch (code) {
case EVENT_CODE.left:
case EVENT_CODE.down:
onLeftKeyDown();
break;
case EVENT_CODE.right:
case EVENT_CODE.up:
onRightKeyDown();
break;
case EVENT_CODE.home:
onHomeKeyDown();
break;
case EVENT_CODE.end:
onEndKeyDown();
break;
case EVENT_CODE.pageDown:
onPageDownKeyDown();
break;
case EVENT_CODE.pageUp:
onPageUpKeyDown();
break;
default:
isPreventDefault = false;
break;
}
isPreventDefault && event.preventDefault();
};
const getClientXY2 = (event) => {
let clientX;
let clientY;
if (event.type.startsWith("touch")) {
clientY = event.touches[0].clientY;
clientX = event.touches[0].clientX;
} else {
clientY = event.clientY;
clientX = event.clientX;
}
return {
clientX,
clientY
};
};
const onDragStart = (event) => {
initData.dragging = true;
initData.isClick = true;
const { clientX, clientY } = getClientXY2(event);
if (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;
newPosition = clamp_default(newPosition, 0, 100);
const fullSteps = Math.floor((max2.value - min2.value) / step.value);
const fullRangePercentage = fullSteps * step.value / (max2.value - min2.value) * 100;
const threshold = fullRangePercentage + (100 - fullRangePercentage) / 2;
let value;
if (newPosition < fullRangePercentage) {
const valueBetween = fullRangePercentage / fullSteps;
const steps = Math.round(newPosition / valueBetween);
value = min2.value + steps * step.value;
} else if (newPosition < threshold) {
value = min2.value + fullSteps * step.value;
} else {
value = max2.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);
});
useEventListener(button, "touchstart", onButtonDown, { passive: false });
return {
disabled,
button,
tooltip,
tooltipVisible,
showTooltip,
persistent,
wrapperStyle,
formatValue,
handleMouseEnter,
handleMouseLeave,
onButtonDown,
onKeyDown,
setPosition
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/button2.mjs
var __default__63 = defineComponent({
name: "ElSliderButton"
});
var _sfc_main72 = defineComponent({
...__default__63,
props: sliderButtonProps,
emits: sliderButtonEmits,
setup(__props, { expose, emit }) {
const props = __props;
const ns = useNamespace("slider");
const initData = reactive({
hovering: false,
dragging: false,
isClick: false,
startX: 0,
currentX: 0,
startY: 0,
currentY: 0,
startPosition: 0,
newPosition: 0,
oldValue: props.modelValue
});
const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
const {
disabled,
button,
tooltip,
showTooltip,
persistent,
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(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
style: normalizeStyle(unref(wrapperStyle)),
tabindex: unref(disabled) ? void 0 : 0,
onMouseenter: unref(handleMouseEnter),
onMouseleave: unref(handleMouseLeave),
onMousedown: unref(onButtonDown),
onFocus: unref(handleMouseEnter),
onBlur: unref(handleMouseLeave),
onKeydown: unref(onKeyDown)
}, [
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: unref(tooltipPersistent)
}, {
content: withCtx(() => [
createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1)
]),
default: withCtx(() => [
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
}, null, 2)
]),
_: 1
}, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
};
}
});
var SliderButton = _export_sfc(_sfc_main72, [["__file", "button.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/marker.mjs
init_shared_esm_bundler();
var sliderMarkerProps = buildProps({
mark: {
type: definePropType([String, Object]),
default: void 0
}
});
var SliderMarker = defineComponent({
name: "ElSliderMarker",
props: sliderMarkerProps,
setup(props) {
const ns = 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: ns.e("marks-text"),
style: style.value
}, label.value);
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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 minValue3 = computed(() => {
return Math.min(initData.firstValue, initData.secondValue);
});
const maxValue3 = computed(() => {
return Math.max(initData.firstValue, initData.secondValue);
});
const barSize = computed(() => {
return props.range ? `${100 * (maxValue3.value - minValue3.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`;
});
const barStart = computed(() => {
return props.range ? `${100 * (minValue3.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) {
const rect = slider.value.getBoundingClientRect();
initData.sliderSize = rect[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(minValue3.value - targetValue) < Math.abs(maxValue3.value - targetValue)) {
buttonRefName = initData.firstValue < initData.secondValue ? "firstButton" : "secondButton";
} else {
buttonRefName = initData.firstValue > initData.secondValue ? "firstButton" : "secondButton";
}
return buttonRefs[buttonRefName];
};
const setPosition = (percent) => {
const buttonRef = getButtonRefByPercent(percent);
buttonRef.value.setPosition(percent);
return buttonRef;
};
const setFirstValue = (firstValue) => {
initData.firstValue = firstValue != null ? firstValue : props.min;
_emit(props.range ? [minValue3.value, maxValue3.value] : firstValue != null ? firstValue : props.min);
};
const setSecondValue = (secondValue) => {
initData.secondValue = secondValue;
if (props.range) {
_emit([minValue3.value, maxValue3.value]);
}
};
const _emit = (val) => {
emit(UPDATE_MODEL_EVENT, val);
emit(INPUT_EVENT, val);
};
const emitChange = async () => {
await nextTick();
emit(CHANGE_EVENT, props.range ? [minValue3.value, maxValue3.value] : props.modelValue);
};
const handleSliderPointerEvent = (event) => {
var _a, _b, _c, _d, _e, _f;
if (sliderDisabled.value || initData.dragging)
return;
resetSize();
let newPercent = 0;
if (props.vertical) {
const clientY = (_c = (_b = (_a = event.touches) == null ? void 0 : _a.item(0)) == null ? void 0 : _b.clientY) != null ? _c : event.clientY;
const sliderOffsetBottom = slider.value.getBoundingClientRect().bottom;
newPercent = (sliderOffsetBottom - clientY) / initData.sliderSize * 100;
} else {
const clientX = (_f = (_e = (_d = event.touches) == null ? void 0 : _d.item(0)) == null ? void 0 : _e.clientX) != null ? _f : event.clientX;
const sliderOffsetLeft = slider.value.getBoundingClientRect().left;
newPercent = (clientX - sliderOffsetLeft) / initData.sliderSize * 100;
}
if (newPercent < 0 || newPercent > 100)
return;
return setPosition(newPercent);
};
const onSliderWrapperPrevent = (event) => {
var _a, _b;
if (((_a = buttonRefs["firstButton"].value) == null ? void 0 : _a.dragging) || ((_b = buttonRefs["secondButton"].value) == null ? void 0 : _b.dragging)) {
event.preventDefault();
}
};
const onSliderDown = async (event) => {
const buttonRef = handleSliderPointerEvent(event);
if (buttonRef) {
await nextTick();
buttonRef.value.onButtonDown(event);
}
};
const onSliderClick = (event) => {
const buttonRef = handleSliderPointerEvent(event);
if (buttonRef) {
emitChange();
}
};
const onSliderMarkerDown = (position) => {
if (sliderDisabled.value || initData.dragging)
return;
const buttonRef = setPosition(position);
if (buttonRef) {
emitChange();
}
};
return {
elFormItem,
slider,
firstButton,
secondButton,
sliderDisabled,
minValue: minValue3,
maxValue: maxValue3,
runwayStyle,
barStyle,
resetSize,
setPosition,
emitChange,
onSliderWrapperPrevent,
onSliderClick,
onSliderDown,
onSliderMarkerDown,
setFirstValue,
setSecondValue
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs
var useStops = (props, initData, minValue3, maxValue3) => {
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 = Math.ceil((props.max - props.min) / props.step);
const stepWidth = 100 * props.step / (props.max - props.min);
const result = Array.from({ length: stopCount - 1 }).map((_2, index) => (index + 1) * stepWidth);
if (props.range) {
return result.filter((step) => {
return step < 100 * (minValue3.value - props.min) / (props.max - props.min) || step > 100 * (maxValue3.value - props.min) / (props.max - props.min);
});
} else {
return result.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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs
init_shared_esm_bundler();
var useWatch = (props, initData, minValue3, maxValue3, emit, elFormItem) => {
const _emit = (val) => {
emit(UPDATE_MODEL_EVENT, val);
emit(INPUT_EVENT, val);
};
const valueChanged = () => {
if (props.range) {
return ![minValue3.value, maxValue3.value].every((item, index) => item === initData.oldValue[index]);
} else {
return props.modelValue !== initData.oldValue;
}
};
const setValues = () => {
var _a, _b;
if (props.min > props.max) {
throwError("Slider", "min should not be greater than max.");
}
const val = props.modelValue;
if (props.range && 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) {
(_a = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a.call(elFormItem, "change").catch((err) => debugWarn(err));
}
initData.oldValue = val.slice();
}
}
} else if (!props.range && isNumber(val) && !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 || isArray(val) && 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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs
init_shared_esm_bundler();
var useLifecycle = (props, initData, resetSize) => {
const sliderWrapper = ref();
onMounted(async () => {
if (props.range) {
if (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 (!isNumber(props.modelValue) || 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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/src/slider.mjs
var __default__64 = defineComponent({
name: "ElSlider"
});
var _sfc_main73 = defineComponent({
...__default__64,
props: sliderProps,
emits: sliderEmits,
setup(__props, { expose, emit }) {
const props = __props;
const ns = useNamespace("slider");
const { t } = useLocale();
const initData = reactive({
firstValue: 0,
secondValue: 0,
oldValue: 0,
dragging: false,
sliderSize: 1
});
const {
elFormItem,
slider,
firstButton,
secondButton,
sliderDisabled,
minValue: minValue3,
maxValue: maxValue3,
runwayStyle,
barStyle,
resetSize,
emitChange,
onSliderWrapperPrevent,
onSliderClick,
onSliderDown,
onSliderMarkerDown,
setFirstValue,
setSecondValue
} = useSlide(props, initData, emit);
const { stops, getStopStyle } = useStops(props, initData, minValue3, maxValue3);
const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
formItemContext: elFormItem
});
const sliderWrapperSize = useFormSize();
const sliderInputSize = computed(() => props.inputSize || sliderWrapperSize.value);
const groupLabel = computed(() => {
return props.ariaLabel || 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(() => [
ns.b(),
ns.m(sliderWrapperSize.value),
ns.is("vertical", props.vertical),
{ [ns.m("with-input")]: props.showInput }
]);
const markList = useMarks(props);
useWatch(props, initData, minValue3, maxValue3, 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;
};
useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, {
passive: false
});
useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, {
passive: false
});
provide(sliderContextKey, {
...toRefs(props),
sliderSize,
disabled: sliderDisabled,
precision,
emitChange,
resetSize,
updateDragging
});
expose({
onSliderClick
});
return (_ctx, _cache) => {
var _a, _b;
return openBlock(), createElementBlock("div", {
id: _ctx.range ? unref(inputId) : void 0,
ref_key: "sliderWrapper",
ref: sliderWrapper,
class: normalizeClass(unref(sliderKls)),
role: _ctx.range ? "group" : void 0,
"aria-label": _ctx.range && !unref(isLabeledByFormItem) ? unref(groupLabel) : void 0,
"aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? (_a = unref(elFormItem)) == null ? void 0 : _a.labelId : void 0
}, [
createBaseVNode("div", {
ref_key: "slider",
ref: slider,
class: normalizeClass([
unref(ns).e("runway"),
{ "show-input": _ctx.showInput && !_ctx.range },
unref(ns).is("disabled", unref(sliderDisabled))
]),
style: normalizeStyle(unref(runwayStyle)),
onMousedown: unref(onSliderDown),
onTouchstartPassive: unref(onSliderDown)
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("bar")),
style: normalizeStyle(unref(barStyle))
}, null, 6),
createVNode(SliderButton, {
id: !_ctx.range ? unref(inputId) : void 0,
ref_key: "firstButton",
ref: firstButton,
"model-value": unref(firstValue),
vertical: _ctx.vertical,
"tooltip-class": _ctx.tooltipClass,
placement: _ctx.placement,
role: "slider",
"aria-label": _ctx.range || !unref(isLabeledByFormItem) ? 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", { key: 1 }, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => {
return openBlock(), createElementBlock("div", {
key,
class: normalizeClass(unref(ns).e("stop")),
style: normalizeStyle(unref(getStopStyle)(item))
}, null, 6);
}), 128))
])) : createCommentVNode("v-if", true),
unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
createBaseVNode("div", null, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
return openBlock(), createElementBlock("div", {
key,
style: normalizeStyle(unref(getStopStyle)(item.position)),
class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")])
}, null, 6);
}), 128))
]),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("marks"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
return openBlock(), createBlock(unref(SliderMarker), {
key,
mark: item.mark,
style: normalizeStyle(unref(getStopStyle)(item.position)),
onMousedown: withModifiers(($event) => unref(onSliderMarkerDown)(item.position), ["stop"])
}, null, 8, ["mark", "style", "onMousedown"]);
}), 128))
], 2)
], 64)) : createCommentVNode("v-if", true)
], 46, ["onMousedown", "onTouchstartPassive"]),
_ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), {
key: 0,
ref: "input",
"model-value": unref(firstValue),
class: normalizeClass(unref(ns).e("input")),
step: _ctx.step,
disabled: unref(sliderDisabled),
controls: _ctx.showInputControls,
min: _ctx.min,
max: _ctx.max,
precision: unref(precision),
size: unref(sliderInputSize),
"onUpdate:modelValue": unref(setFirstValue),
onChange: unref(emitChange)
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true)
], 10, ["id", "role", "aria-label", "aria-labelledby"]);
};
}
});
var Slider = _export_sfc(_sfc_main73, [["__file", "slider.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/slider/index.mjs
var ElSlider = withInstall(Slider);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/statistic/src/statistic2.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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/statistic/src/statistic.mjs
init_shared_esm_bundler();
var __default__65 = defineComponent({
name: "ElStatistic"
});
var _sfc_main74 = defineComponent({
...__default__65,
props: statisticProps,
setup(__props, { expose }) {
const props = __props;
const ns = useNamespace("statistic");
const displayValue = computed(() => {
const { value, formatter: formatter2, precision, decimalSeparator, groupSeparator } = props;
if (isFunction(formatter2))
return formatter2(value);
if (!isNumber(value) || Number.isNaN(value))
return value;
let [integer4, decimal = ""] = String(value).split(".");
decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
integer4 = integer4.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
return [integer4, decimal].join(decimal ? decimalSeparator : "");
});
expose({
displayValue
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).b())
}, [
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("head"))
}, [
renderSlot(_ctx.$slots, "title", {}, () => [
createTextVNode(toDisplayString(_ctx.title), 1)
])
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("content"))
}, [
_ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("prefix"))
}, [
renderSlot(_ctx.$slots, "prefix", {}, () => [
createBaseVNode("span", null, toDisplayString(_ctx.prefix), 1)
])
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("span", {
class: normalizeClass(unref(ns).e("number")),
style: normalizeStyle(_ctx.valueStyle)
}, toDisplayString(unref(displayValue)), 7),
_ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("suffix"))
}, [
renderSlot(_ctx.$slots, "suffix", {}, () => [
createBaseVNode("span", null, toDisplayString(_ctx.suffix), 1)
])
], 2)) : createCommentVNode("v-if", true)
], 2)
], 2);
};
}
});
var Statistic = _export_sfc(_sfc_main74, [["__file", "statistic.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/statistic/index.mjs
var ElStatistic = withInstall(Statistic);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/countdown/src/countdown2.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) => isNumber(value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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 isNumber(value) ? new Date(value).getTime() : value.valueOf();
};
var formatTime = (timestamp, format2) => {
let timeLeft = timestamp;
const escapeRegex = /\[([^\]]*)]/g;
const replacedText = timeUnits2.reduce((current, [name, unit]) => {
const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g");
if (replaceRegex.test(current)) {
const value = Math.floor(timeLeft / unit);
timeLeft -= value * unit;
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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/countdown/src/countdown.mjs
var __default__66 = defineComponent({
name: "ElCountdown"
});
var _sfc_main75 = defineComponent({
...__default__66,
props: countdownProps,
emits: countdownEmits,
setup(__props, { expose, emit }) {
const props = __props;
let timer;
const rawValue = ref(0);
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 timestamp = getTime(props.value);
const frameFunc = () => {
let diff = timestamp - Date.now();
emit(CHANGE_EVENT, diff);
if (diff <= 0) {
diff = 0;
stopTimer();
emit("finish");
} else {
timer = rAF(frameFunc);
}
rawValue.value = diff;
};
timer = rAF(frameFunc);
};
onMounted(() => {
rawValue.value = getTime(props.value) - Date.now();
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_main75, [["__file", "countdown.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/countdown/index.mjs
var ElCountdown = withInstall(Countdown);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/steps/src/steps2.mjs
var stepsProps = buildProps({
space: {
type: [Number, String],
default: ""
},
active: {
type: Number,
default: 0
},
direction: {
type: String,
default: "horizontal",
values: ["horizontal", "vertical"]
},
alignCenter: {
type: Boolean
},
simple: {
type: Boolean
},
finishStatus: {
type: String,
values: ["wait", "process", "finish", "error", "success"],
default: "finish"
},
processStatus: {
type: String,
values: ["wait", "process", "finish", "error", "success"],
default: "process"
}
});
var stepsEmits = {
[CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/steps/src/tokens.mjs
var STEPS_INJECTION_KEY = "ElSteps";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/steps/src/steps.mjs
var __default__67 = defineComponent({
name: "ElSteps"
});
var _sfc_main76 = defineComponent({
...__default__67,
props: stepsProps,
emits: stepsEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("steps");
const {
children: steps,
addChild: addStep,
removeChild: removeStep,
ChildrenSorter: StepsSorter
} = useOrderedChildren(getCurrentInstance(), "ElStep");
watch(steps, () => {
steps.value.forEach((instance, index) => {
instance.setIndex(index);
});
});
provide(STEPS_INJECTION_KEY, { props, steps, addStep, removeStep });
watch(() => props.active, (newVal, oldVal) => {
emit(CHANGE_EVENT, newVal, oldVal);
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.simple ? "simple" : _ctx.direction)])
}, [
renderSlot(_ctx.$slots, "default"),
createVNode(unref(StepsSorter))
], 2);
};
}
});
var Steps = _export_sfc(_sfc_main76, [["__file", "steps.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/steps/src/item2.mjs
var __default__68 = defineComponent({
name: "ElStep"
});
var _sfc_main77 = defineComponent({
...__default__68,
props: stepProps,
setup(__props) {
const props = __props;
const ns = useNamespace("step");
const index = ref(-1);
const lineStyle = ref({});
const internalStatus = ref("");
const parent = inject(STEPS_INJECTION_KEY);
const currentInstance = getCurrentInstance();
let stepDiff = 0;
let beforeActive = 0;
onMounted(() => {
watch([
() => parent.props.active,
() => parent.props.processStatus,
() => parent.props.finishStatus
], ([active], [oldActive]) => {
beforeActive = oldActive || 0;
stepDiff = active - beforeActive;
updateStatus(active);
}, { immediate: true });
});
const currentStatus = computed(() => {
return props.status || internalStatus.value;
});
const prevInternalStatus = computed(() => {
const prevStep = parent.steps.value[index.value - 1];
return prevStep ? prevStep.internalStatus.value : "wait";
});
const isCenter = computed(() => {
return parent.props.alignCenter;
});
const isVertical = computed(() => {
return parent.props.direction === "vertical";
});
const isSimple = computed(() => {
return parent.props.simple;
});
const stepsCount = computed(() => {
return parent.steps.value.length;
});
const isLast = computed(() => {
var _a;
return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === currentInstance.uid;
});
const space = computed(() => {
return isSimple.value ? "" : parent.props.space;
});
const containerKls = computed(() => {
return [
ns.b(),
ns.is(isSimple.value ? "simple" : parent.props.direction),
ns.is("flex", isLast.value && !space.value && !isCenter.value),
ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
];
});
const style = computed(() => {
const style2 = {
flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
};
if (isVertical.value)
return style2;
if (isLast.value) {
style2.maxWidth = `${100 / stepsCount.value}%`;
}
return style2;
});
const setIndex = (val) => {
index.value = val;
};
const calcProgress = (status) => {
const isWait = status === "wait";
const delayTimer = Math.abs(stepDiff) === 1 ? 0 : stepDiff > 0 ? (index.value + 1 - beforeActive) * 150 : -(index.value + 1 - parent.props.active) * 150;
const style2 = {
transitionDelay: `${delayTimer}ms`
};
const step = status === parent.props.processStatus || isWait ? 0 : 100;
style2.borderWidth = step && !isSimple.value ? "1px" : 0;
style2[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
lineStyle.value = style2;
};
const updateStatus = (activeIndex) => {
if (activeIndex > index.value) {
internalStatus.value = parent.props.finishStatus;
} else if (activeIndex === index.value && prevInternalStatus.value !== "error") {
internalStatus.value = parent.props.processStatus;
} else {
internalStatus.value = "wait";
}
const prevChild = parent.steps.value[index.value - 1];
if (prevChild)
prevChild.calcProgress(internalStatus.value);
};
const stepItemState = {
uid: currentInstance.uid,
getVnode: () => currentInstance.vnode,
currentStatus,
internalStatus,
setIndex,
calcProgress
};
parent.addStep(stepItemState);
onBeforeUnmount(() => {
parent.removeStep(stepItemState);
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
style: normalizeStyle(unref(style)),
class: normalizeClass(unref(containerKls))
}, [
createCommentVNode(" icon & line "),
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("head"), unref(ns).is(unref(currentStatus))])
}, [
!unref(isSimple) ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("line"))
}, [
createBaseVNode("i", {
class: normalizeClass(unref(ns).e("line-inner")),
style: normalizeStyle(lineStyle.value)
}, null, 6)
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
}, [
renderSlot(_ctx.$slots, "icon", {}, () => [
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(ns).e("icon-inner"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
}, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), {
key: 1,
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
}, {
default: withCtx(() => [
createVNode(unref(check_default))
]),
_: 1
}, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), {
key: 2,
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", {
key: 3,
class: normalizeClass(unref(ns).e("icon-inner"))
}, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)
])
], 2)
], 2),
createCommentVNode(" title & description "),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("main"))
}, [
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("title"), unref(ns).is(unref(currentStatus))])
}, [
renderSlot(_ctx.$slots, "title", {}, () => [
createTextVNode(toDisplayString(_ctx.title), 1)
])
], 2),
unref(isSimple) ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("arrow"))
}, null, 2)) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([unref(ns).e("description"), unref(ns).is(unref(currentStatus))])
}, [
renderSlot(_ctx.$slots, "description", {}, () => [
createTextVNode(toDisplayString(_ctx.description), 1)
])
], 2))
], 2)
], 6);
};
}
});
var Step = _export_sfc(_sfc_main77, [["__file", "item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/steps/index.mjs
var ElSteps = withInstall(Steps, {
Step
});
var ElStep = withNoopInstall(Step);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/util.mjs
init_shared_esm_bundler();
var getCell = function(event) {
var _a;
return (_a = event.target) == null ? void 0 : _a.closest("td");
};
var orderBy = function(array4, sortKey, reverse, sortMethod, sortBy) {
if (!sortKey && !sortMethod && (!sortBy || isArray(sortBy) && !sortBy.length)) {
return array4;
}
if (isString(reverse)) {
reverse = reverse === "descending" ? -1 : 1;
} else {
reverse = reverse && reverse < 0 ? -1 : 1;
}
const getKey = sortMethod ? null : function(value, index) {
if (sortBy) {
return flatMap_default(castArray_default(sortBy), (by) => {
if (isString(by)) {
return get_default(value, by);
} else {
return by(value, index, array4);
}
});
}
if (sortKey !== "$key") {
if (isObject(value) && "$value" in value)
value = value.$value;
}
return [
isObject(value) ? sortKey ? get_default(value, sortKey) : null : value
];
};
const compare = function(a2, b2) {
var _a, _b, _c, _d, _e, _f;
if (sortMethod) {
return sortMethod(a2.value, b2.value);
}
for (let i = 0, len = (_b = (_a = a2.key) == null ? void 0 : _a.length) != null ? _b : 0; i < len; i++) {
if (((_c = a2.key) == null ? void 0 : _c[i]) < ((_d = b2.key) == null ? void 0 : _d[i])) {
return -1;
}
if (((_e = a2.key) == null ? void 0 : _e[i]) > ((_f = b2.key) == null ? void 0 : _f[i])) {
return 1;
}
}
return 0;
};
return array4.map((value, index) => {
return {
value,
index,
key: getKey ? getKey(value, index) : null
};
}).sort((a2, b2) => {
let order = compare(a2, b2);
if (!order) {
order = a2.index - b2.index;
}
return order * +reverse;
}).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 matches = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm"));
if (matches) {
return getColumnById(table, matches[0]);
}
return null;
};
var getRowIdentity = (row, rowKey2) => {
if (!row)
throw new Error("Row is required when get row identity");
if (isString(rowKey2)) {
if (!rowKey2.includes(".")) {
return `${row[rowKey2]}`;
}
const key = rowKey2.split(".");
let current = row;
for (const element of key) {
current = current[element];
}
return `${current}`;
} else if (isFunction(rowKey2)) {
return rowKey2.call(null, row);
}
return "";
};
var getKeysMap = function(array4, rowKey2, flatten = false, childrenKey = "children") {
const data = array4 || [];
const arrayMap = {};
data.forEach((row, index) => {
arrayMap[getRowIdentity(row, rowKey2)] = { row, index };
if (flatten) {
const children = row[childrenKey];
if (isArray(children)) {
Object.assign(arrayMap, getKeysMap(children, rowKey2, true, childrenKey));
}
}
});
return arrayMap;
};
function mergeOptions(defaults, config) {
const options = {};
let key;
for (key in defaults) {
options[key] = defaults[key];
}
for (key in config) {
if (hasOwn(config, key)) {
const value = config[key];
if (!isUndefined(value)) {
options[key] = value;
}
}
}
return options;
}
function parseWidth(width) {
if (width === "")
return width;
if (!isUndefined(width)) {
width = Number.parseInt(width, 10);
if (Number.isNaN(width)) {
width = "";
}
}
return width;
}
function parseMinWidth(minWidth) {
if (minWidth === "")
return minWidth;
if (!isUndefined(minWidth)) {
minWidth = parseWidth(minWidth);
if (Number.isNaN(minWidth)) {
minWidth = 80;
}
}
return minWidth;
}
function parseHeight(height) {
if (isNumber(height)) {
return height;
}
if (isString(height)) {
if (/^\d+(?:px)?$/.test(height)) {
return Number.parseInt(height, 10);
} else {
return height;
}
}
return null;
}
function compose(...funcs) {
if (funcs.length === 0) {
return (arg) => arg;
}
if (funcs.length === 1) {
return funcs[0];
}
return funcs.reduce((a2, b2) => (...args) => a2(b2(...args)));
}
function toggleRowStatus(statusArr, row, newVal, tableTreeProps, selectable, rowIndex, rowKey2) {
let _rowIndex = rowIndex != null ? rowIndex : 0;
let changed = false;
const getIndex = () => {
if (!rowKey2) {
return statusArr.indexOf(row);
}
const id = getRowIdentity(row, rowKey2);
return statusArr.findIndex((item) => getRowIdentity(item, rowKey2) === id);
};
const index = getIndex();
const included = index !== -1;
const isRowSelectable = selectable == null ? void 0 : selectable.call(null, row, _rowIndex);
const toggleStatus = (type4) => {
if (type4 === "add") {
statusArr.push(row);
} else {
statusArr.splice(index, 1);
}
changed = true;
};
const getChildrenCount = (row2) => {
let count = 0;
const children = (tableTreeProps == null ? void 0 : tableTreeProps.children) && row2[tableTreeProps.children];
if (children && isArray(children)) {
count += children.length;
children.forEach((item) => {
count += getChildrenCount(item);
});
}
return count;
};
if (!selectable || isRowSelectable) {
if (isBoolean(newVal)) {
if (newVal && !included) {
toggleStatus("add");
} else if (!newVal && included) {
toggleStatus("remove");
}
} else {
included ? toggleStatus("remove") : toggleStatus("add");
}
}
if (!(tableTreeProps == null ? void 0 : tableTreeProps.checkStrictly) && (tableTreeProps == null ? void 0 : tableTreeProps.children) && isArray(row[tableTreeProps.children])) {
row[tableTreeProps.children].forEach((item) => {
const childChanged = toggleRowStatus(statusArr, item, newVal != null ? newVal : !included, tableTreeProps, selectable, _rowIndex + 1, rowKey2);
_rowIndex += getChildrenCount(item) + 1;
if (childChanged) {
changed = childChanged;
}
});
}
return changed;
}
function walkTreeNode(root, cb, childrenKey = "children", lazyKey = "hasChildren", lazy = false) {
const isNil = (array4) => !(isArray(array4) && array4.length);
function _walker(parent, children, level) {
cb(parent, children, level);
children.forEach((item) => {
if (item[lazyKey] && lazy) {
cb(item, null, level + 1);
return;
}
const children2 = item[childrenKey];
if (!isNil(children2)) {
_walker(item, children2, level + 1);
}
});
}
root.forEach((item) => {
if (item[lazyKey] && lazy) {
cb(item, null, 0);
return;
}
const children = item[childrenKey];
if (!isNil(children)) {
_walker(item, children, 0);
}
});
}
var getTableOverflowTooltipProps = (props, innerText, row, column2) => {
const popperOptions = {
strategy: "fixed",
...props.popperOptions
};
const tooltipFormatterContent = isFunction(column2 == null ? void 0 : column2.tooltipFormatter) ? column2.tooltipFormatter({
row,
column: column2,
cellValue: getProp(row, column2.property).value
}) : void 0;
if (isVNode(tooltipFormatterContent)) {
return {
slotContent: tooltipFormatterContent,
content: null,
...props,
popperOptions
};
}
return {
slotContent: null,
content: tooltipFormatterContent != null ? tooltipFormatterContent : innerText,
...props,
popperOptions
};
};
var removePopper = null;
function createTablePopper(props, popperContent, row, column2, trigger, table) {
var _a;
const tableOverflowTooltipProps = getTableOverflowTooltipProps(props, popperContent, row, column2);
const mergedProps = {
...tableOverflowTooltipProps,
slotContent: void 0
};
if ((removePopper == null ? void 0 : removePopper.trigger) === trigger) {
const comp = (_a = removePopper.vm) == null ? void 0 : _a.component;
merge_default(comp == null ? void 0 : comp.props, mergedProps);
if (comp && tableOverflowTooltipProps.slotContent) {
comp.slots.content = () => [tableOverflowTooltipProps.slotContent];
}
return;
}
removePopper == null ? void 0 : removePopper();
const parentNode = table == null ? void 0 : table.refs.tableWrapper;
const ns = parentNode == null ? void 0 : parentNode.dataset.prefix;
const vm = createVNode(ElTooltip, {
virtualTriggering: true,
virtualRef: trigger,
appendTo: parentNode,
placement: "top",
transition: "none",
offset: 0,
hideAfter: 0,
...mergedProps
}, tableOverflowTooltipProps.slotContent ? {
content: () => tableOverflowTooltipProps.slotContent
} : void 0);
vm.appContext = { ...table.appContext, ...table };
const container = document.createElement("div");
render(vm, container);
vm.component.exposed.onOpen();
const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns}-scrollbar__wrap`);
removePopper = () => {
var _a2, _b;
if ((_b = (_a2 = vm.component) == null ? void 0 : _a2.exposed) == null ? void 0 : _b.onClose) {
vm.component.exposed.onClose();
}
render(null, container);
const currentRemovePopper = removePopper;
scrollContainer == null ? void 0 : scrollContainer.removeEventListener("scroll", currentRemovePopper);
currentRemovePopper.trigger = void 0;
currentRemovePopper.vm = void 0;
removePopper = null;
};
removePopper.trigger = trigger != null ? trigger : void 0;
removePopper.vm = vm;
scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper);
}
function getCurrentColumns(column2) {
if (column2.children) {
return flatMap_default(column2.children, getCurrentColumns);
} else {
return [column2];
}
}
function getColSpan(colSpan, column2) {
return colSpan + column2.colSpan;
}
var isFixedColumn = (index, fixed, store, realColumns) => {
let start = 0;
let after = 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);
after = start + curColumns.reduce(getColSpan, 0) - 1;
} else {
start = index;
}
let fixedLayout;
switch (fixed) {
case "left":
if (after < store.states.fixedLeafColumnsLength.value) {
fixedLayout = "left";
}
break;
case "right":
if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) {
fixedLayout = "right";
}
break;
default:
if (after < store.states.fixedLeafColumnsLength.value) {
fixedLayout = "left";
} else if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) {
fixedLayout = "right";
}
}
return fixedLayout ? {
direction: fixedLayout,
start,
after
} : {};
};
var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset2 = 0) => {
const classes = [];
const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns);
if (direction) {
const isLeft = direction === "left";
classes.push(`${namespace}-fixed-column--${direction}`);
if (isLeft && after + 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 getOffset(offset2, column2) {
return offset2 + (isNull_default(column2.realWidth) || Number.isNaN(column2.realWidth) ? Number(column2.width) : column2.realWidth);
}
var getFixedColumnOffset = (index, fixed, store, realColumns) => {
const {
direction,
start = 0,
after = 0
} = isFixedColumn(index, fixed, store, realColumns);
if (!direction) {
return;
}
const styles = {};
const isLeft = direction === "left";
const columns2 = store.states.columns.value;
if (isLeft) {
styles.left = columns2.slice(0, start).reduce(getOffset, 0);
} else {
styles.right = columns2.slice(after + 1).reverse().reduce(getOffset, 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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/store/expand.mjs
function useExpand(watcherData) {
const instance = getCurrentInstance();
const defaultExpandAll = ref(false);
const expandRows = ref([]);
const updateExpandRows = () => {
const data = watcherData.data.value || [];
const rowKey2 = watcherData.rowKey.value;
if (defaultExpandAll.value) {
expandRows.value = data.slice();
} else if (rowKey2) {
const expandRowsMap = getKeysMap(expandRows.value, rowKey2);
expandRows.value = data.reduce((prev, row) => {
const rowId = getRowIdentity(row, rowKey2);
const rowInfo = expandRowsMap[rowId];
if (rowInfo) {
prev.push(row);
}
return prev;
}, []);
} else {
expandRows.value = [];
}
};
const toggleRowExpansion = (row, expanded) => {
const changed = toggleRowStatus(expandRows.value, row, expanded, void 0, void 0, void 0, watcherData.rowKey.value);
if (changed) {
instance.emit("expand-change", row, expandRows.value.slice());
}
};
const setExpandRowKeys = (rowKeys) => {
instance.store.assertRowKey();
const data = watcherData.data.value || [];
const rowKey2 = watcherData.rowKey.value;
const keysMap = getKeysMap(data, rowKey2);
expandRows.value = rowKeys.reduce((prev, cur) => {
const info = keysMap[cur];
if (info) {
prev.push(info.row);
}
return prev;
}, []);
};
const isRowExpanded = (row) => {
const rowKey2 = watcherData.rowKey.value;
if (rowKey2) {
const expandMap = getKeysMap(expandRows.value, rowKey2);
return !!expandMap[getRowIdentity(row, rowKey2)];
}
return expandRows.value.includes(row);
};
return {
updateExpandRows,
toggleRowExpansion,
setExpandRowKeys,
isRowExpanded,
states: {
expandRows,
defaultExpandAll
}
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/store/current.mjs
function useCurrent(watcherData) {
const instance = getCurrentInstance();
const _currentRowKey = ref(null);
const currentRow = ref(null);
const setCurrentRowKey = (key) => {
instance.store.assertRowKey();
_currentRowKey.value = key;
setCurrentRowByKey(key);
};
const restoreCurrentRowKey = () => {
_currentRowKey.value = null;
};
const setCurrentRowByKey = (key) => {
var _a;
const { data, rowKey: rowKey2 } = watcherData;
let _currentRow = null;
if (rowKey2.value) {
_currentRow = (_a = (unref(data) || []).find((item) => getRowIdentity(item, rowKey2.value) === key)) != null ? _a : null;
}
currentRow.value = _currentRow != null ? _currentRow : null;
instance.emit("current-change", currentRow.value, 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 (oldCurrentRow && !data.includes(oldCurrentRow)) {
if (rowKey2) {
const currentRowKey = getRowIdentity(oldCurrentRow, rowKey2);
setCurrentRowByKey(currentRowKey);
} else {
currentRow.value = null;
}
if (isNull_default(currentRow.value)) {
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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/store/tree.mjs
init_shared_esm_bundler();
function useTree(watcherData) {
const expandRowKeys = ref([]);
const treeData = ref({});
const indent = ref(16);
const lazy = ref(false);
const lazyTreeNodeMap = ref({});
const lazyColumnIdentifier = ref("hasChildren");
const childrenColumnName = ref("children");
const checkStrictly = ref(false);
const instance = getCurrentInstance();
const normalizedData = computed(() => {
if (!watcherData.rowKey.value)
return {};
const data = watcherData.data.value || [];
return normalize(data);
});
const normalizedLazyNode = computed(() => {
const rowKey2 = watcherData.rowKey.value;
const keys = Object.keys(lazyTreeNodeMap.value);
const res = {};
if (!keys.length)
return res;
keys.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, (parent, children, level) => {
const parentId = getRowIdentity(parent, rowKey2);
if (isArray(children)) {
res[parentId] = {
children: children.map((row) => getRowIdentity(row, rowKey2)),
level
};
} else if (lazy.value) {
res[parentId] = {
children: [],
lazy: true,
level
};
}
}, childrenColumnName.value, lazyColumnIdentifier.value, lazy.value);
return res;
};
const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll) => {
var _a, _b;
ifExpandAll || (ifExpandAll = (_a = instance.store) == null ? void 0 : _a.states.defaultExpandAll.value);
const nested = normalizedData.value;
const normalizedLazyNode_ = normalizedLazyNode.value;
const keys = Object.keys(nested);
const newTreeData = {};
if (keys.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);
}
};
keys.forEach((key) => {
const oldValue = oldTreeData[key];
const newValue = { ...nested[key] };
newValue.expanded = getExpanded(oldValue, key);
if (newValue.lazy) {
const { loaded = false, loading = false } = oldValue || {};
newValue.loaded = !!loaded;
newValue.loading = !!loading;
rootLazyRowKeys.push(key);
}
newTreeData[key] = newValue;
});
const lazyKeys = Object.keys(normalizedLazyNode_);
if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {
lazyKeys.forEach((key) => {
var _a2;
const oldValue = oldTreeData[key];
const lazyNodeChildren = normalizedLazyNode_[key].children;
if (rootLazyRowKeys.includes(key)) {
if (((_a2 = newTreeData[key].children) == null ? void 0 : _a2.length) !== 0) {
throw new Error("[ElTable]children must be an empty array.");
}
newTreeData[key].children = lazyNodeChildren;
} else {
const { loaded = false, loading = false } = oldValue || {};
newTreeData[key] = {
lazy: true,
loaded: !!loaded,
loading: !!loading,
expanded: getExpanded(oldValue, key),
children: lazyNodeChildren,
level: void 0
};
}
});
}
}
treeData.value = newTreeData;
(_b = instance.store) == null ? void 0 : _b.updateTableScrollY();
};
watch(() => expandRowKeys.value, () => {
updateTreeData(true);
});
watch(() => normalizedData.value, () => {
updateTreeData();
});
watch(() => normalizedLazyNode.value, () => {
updateTreeData();
});
const updateTreeExpandKeys = (value) => {
expandRowKeys.value = value;
updateTreeData();
};
const isUseLazy = (data) => {
return lazy.value && data && "loaded" in data && !data.loaded;
};
const toggleTreeExpansion = (row, expanded) => {
instance.store.assertRowKey();
const rowKey2 = watcherData.rowKey.value;
const id = getRowIdentity(row, rowKey2);
const data = id && treeData.value[id];
if (id && data && "expanded" in data) {
const oldExpanded = data.expanded;
expanded = isUndefined(expanded) ? !data.expanded : expanded;
treeData.value[id].expanded = expanded;
if (oldExpanded !== expanded) {
instance.emit("expand-change", row, expanded);
}
isUseLazy(data) && loadData(row, id, data);
instance.store.updateTableScrollY();
}
};
const loadOrToggle = (row) => {
instance.store.assertRowKey();
const rowKey2 = watcherData.rowKey.value;
const id = getRowIdentity(row, rowKey2);
const data = treeData.value[id];
if (isUseLazy(data)) {
loadData(row, id, data);
} else {
toggleTreeExpansion(row, void 0);
}
};
const loadData = (row, key, treeNode) => {
const { load } = instance.props;
if (load && !treeData.value[key].loaded) {
treeData.value[key].loading = true;
load(row, treeNode, (data) => {
if (!isArray(data)) {
throw new TypeError("[ElTable] data must be an array");
}
treeData.value[key].loading = false;
treeData.value[key].loaded = true;
treeData.value[key].expanded = true;
if (data.length) {
lazyTreeNodeMap.value[key] = data;
}
instance.emit("expand-change", row, true);
});
}
};
const updateKeyChildren = (key, data) => {
const { lazy: lazy2, rowKey: rowKey2 } = instance.props;
if (!lazy2)
return;
if (!rowKey2)
throw new Error("[Table] rowKey is required in updateKeyChild");
if (lazyTreeNodeMap.value[key]) {
lazyTreeNodeMap.value[key] = data;
}
};
return {
loadData,
loadOrToggle,
toggleTreeExpansion,
updateTreeExpandKeys,
updateTreeData,
updateKeyChildren,
normalize,
states: {
expandRowKeys,
treeData,
indent,
lazy,
lazyTreeNodeMap,
lazyColumnIdentifier,
childrenColumnName,
checkStrictly
}
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/store/watcher.mjs
init_shared_esm_bundler();
var sortData = (data, states) => {
const sortingColumn = states.sortingColumn;
if (!sortingColumn || isString(sortingColumn.sortable)) {
return data;
}
return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
};
var doFlattenColumns = (columns2) => {
const result = [];
columns2.forEach((column2) => {
if (column2.children && column2.children.length > 0) {
result.push.apply(result, doFlattenColumns(column2.children));
} else {
result.push(column2);
}
});
return result;
};
function useWatcher() {
var _a;
const instance = getCurrentInstance();
const { size: tableSize } = toRefs((_a = instance.proxy) == null ? void 0 : _a.$props);
const rowKey2 = ref(null);
const data = ref([]);
const _data = ref([]);
const isComplex = ref(false);
const _columns = ref([]);
const originColumns = ref([]);
const columns2 = ref([]);
const fixedColumns = ref([]);
const rightFixedColumns = ref([]);
const leafColumns = ref([]);
const fixedLeafColumns = ref([]);
const rightFixedLeafColumns = ref([]);
const updateOrderFns = [];
const leafColumnsLength = ref(0);
const fixedLeafColumnsLength = ref(0);
const rightFixedLeafColumnsLength = ref(0);
const isAllSelected = ref(false);
const selection = ref([]);
const reserveSelection = ref(false);
const selectOnIndeterminate = ref(false);
const selectable = ref(null);
const filters = ref({});
const filteredData = ref(null);
const sortingColumn = ref(null);
const sortProp = ref(null);
const sortOrder = ref(null);
const hoverRow = ref(null);
const selectedMap = computed(() => {
return rowKey2.value ? getKeysMap(selection.value, rowKey2.value) : void 0;
});
watch(data, () => {
var _a2;
if (instance.state) {
scheduleLayout(false);
const needUpdateFixed = instance.props.tableLayout === "auto";
if (needUpdateFixed) {
(_a2 = instance.refs.tableHeaderRef) == null ? void 0 : _a2.updateFixedColumnStyle();
}
}
}, {
deep: true
});
const assertRowKey = () => {
if (!rowKey2.value)
throw new Error("[ElTable] prop row-key is required");
};
const updateChildFixed = (column2) => {
var _a2;
(_a2 = column2.children) == null ? void 0 : _a2.forEach((childColumn) => {
childColumn.fixed = column2.fixed;
updateChildFixed(childColumn);
});
};
const updateColumns = () => {
_columns.value.forEach((column2) => {
updateChildFixed(column2);
});
fixedColumns.value = _columns.value.filter((column2) => [true, "left"].includes(column2.fixed));
const selectColumn = _columns.value.find((column2) => column2.type === "selection");
let selectColFixLeft;
if (selectColumn && selectColumn.fixed !== "right" && !fixedColumns.value.includes(selectColumn)) {
const selectColumnIndex = _columns.value.indexOf(selectColumn);
if (selectColumnIndex === 0 && fixedColumns.value.length) {
fixedColumns.value.unshift(selectColumn);
selectColFixLeft = true;
}
}
rightFixedColumns.value = _columns.value.filter((column2) => column2.fixed === "right");
const notFixedColumns = _columns.value.filter((column2) => (selectColFixLeft ? column2.type !== "selection" : true) && !column2.fixed);
originColumns.value = Array.from(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value);
const leafColumns2 = doFlattenColumns(notFixedColumns);
const fixedLeafColumns2 = doFlattenColumns(fixedColumns.value);
const rightFixedLeafColumns2 = doFlattenColumns(rightFixedColumns.value);
leafColumnsLength.value = leafColumns2.length;
fixedLeafColumnsLength.value = fixedLeafColumns2.length;
rightFixedLeafColumnsLength.value = rightFixedLeafColumns2.length;
columns2.value = Array.from(fixedLeafColumns2).concat(leafColumns2).concat(rightFixedLeafColumns2);
isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0;
};
const scheduleLayout = (needUpdateColumns, immediate = false) => {
if (needUpdateColumns) {
updateColumns();
}
if (immediate) {
instance.state.doLayout();
} else {
instance.state.debouncedUpdateLayout();
}
};
const isSelected = (row) => {
if (selectedMap.value) {
return !!selectedMap.value[getRowIdentity(row, rowKey2.value)];
} else {
return selection.value.includes(row);
}
};
const clearSelection = () => {
isAllSelected.value = false;
const oldSelection = selection.value;
selection.value = [];
if (oldSelection.length) {
instance.emit("selection-change", []);
}
};
const cleanSelection = () => {
var _a2, _b;
let deleted;
if (rowKey2.value) {
deleted = [];
const childrenKey = (_b = (_a2 = instance == null ? void 0 : instance.store) == null ? void 0 : _a2.states) == null ? void 0 : _b.childrenColumnName.value;
const dataMap = getKeysMap(data.value, rowKey2.value, true, childrenKey);
for (const key in selectedMap.value) {
if (hasOwn(selectedMap.value, key) && !dataMap[key]) {
deleted.push(selectedMap.value[key].row);
}
}
} else {
deleted = selection.value.filter((item) => !data.value.includes(item));
}
if (deleted.length) {
const newSelection = selection.value.filter((item) => !deleted.includes(item));
selection.value = newSelection;
instance.emit("selection-change", newSelection.slice());
}
};
const getSelectionRows = () => {
return (selection.value || []).slice();
};
const toggleRowSelection = (row, selected, emitChange = true, ignoreSelectable = false) => {
var _a2, _b, _c, _d;
const treeProps2 = {
children: (_b = (_a2 = instance == null ? void 0 : instance.store) == null ? void 0 : _a2.states) == null ? void 0 : _b.childrenColumnName.value,
checkStrictly: (_d = (_c = instance == null ? void 0 : instance.store) == null ? void 0 : _c.states) == null ? void 0 : _d.checkStrictly.value
};
const changed = toggleRowStatus(selection.value, row, selected, treeProps2, ignoreSelectable ? void 0 : selectable.value, data.value.indexOf(row), rowKey2.value);
if (changed) {
const newSelection = (selection.value || []).slice();
if (emitChange) {
instance.emit("select", newSelection, row);
}
instance.emit("selection-change", newSelection);
}
};
const _toggleAllSelection = () => {
var _a2, _b;
const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length);
isAllSelected.value = value;
let selectionChanged = false;
let childrenCount = 0;
const rowKey22 = (_b = (_a2 = instance == null ? void 0 : instance.store) == null ? void 0 : _a2.states) == null ? void 0 : _b.rowKey.value;
const { childrenColumnName } = instance.store.states;
const treeProps2 = {
children: childrenColumnName.value,
checkStrictly: false
};
data.value.forEach((row, index) => {
const rowIndex = index + childrenCount;
if (toggleRowStatus(selection.value, row, value, treeProps2, selectable.value, rowIndex, rowKey22)) {
selectionChanged = true;
}
childrenCount += getChildrenCount(getRowIdentity(row, rowKey22));
});
if (selectionChanged) {
instance.emit("selection-change", selection.value ? selection.value.slice() : []);
}
instance.emit("select-all", (selection.value || []).slice());
};
const updateAllSelected = () => {
var _a2;
if (((_a2 = data.value) == null ? void 0 : _a2.length) === 0) {
isAllSelected.value = false;
return;
}
const { childrenColumnName } = instance.store.states;
let rowIndex = 0;
let selectedCount = 0;
const checkSelectedStatus = (data2) => {
var _a3;
for (const row of data2) {
const isRowSelectable = selectable.value && selectable.value.call(null, row, rowIndex);
if (!isSelected(row)) {
if (!selectable.value || isRowSelectable) {
return false;
}
} else {
selectedCount++;
}
rowIndex++;
if (((_a3 = row[childrenColumnName.value]) == null ? void 0 : _a3.length) && !checkSelectedStatus(row[childrenColumnName.value])) {
return false;
}
}
return true;
};
const isAllSelected_ = checkSelectedStatus(data.value || []);
isAllSelected.value = selectedCount === 0 ? false : isAllSelected_;
};
const getChildrenCount = (rowKey22) => {
var _a2;
if (!instance || !instance.store)
return 0;
const { treeData } = instance.store.states;
let count = 0;
const children = (_a2 = treeData.value[rowKey22]) == null ? void 0 : _a2.children;
if (children) {
count += children.length;
children.forEach((childKey) => {
count += getChildrenCount(childKey);
});
}
return count;
};
const updateFilters = (column2, values) => {
const filters_ = {};
castArray_default(column2).forEach((col) => {
filters.value[col.id] = values;
filters_[col.columnKey || col.id] = values;
});
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 values = filters.value[columnId];
if (!values || values.length === 0)
return;
const column2 = getColumnById({
columns: columns2.value
}, columnId);
if (column2 && column2.filterMethod) {
sourceData = sourceData.filter((row) => {
return values.some((value) => column2.filterMethod.call(null, value, row, column2));
});
}
});
filteredData.value = sourceData;
};
const execSort = () => {
var _a2;
data.value = sortData((_a2 = filteredData.value) != null ? _a2 : [], {
sortingColumn: sortingColumn.value,
sortProp: sortProp.value,
sortOrder: sortOrder.value
});
};
const execQuery = (ignore = void 0) => {
if (!(ignore == null ? void 0 : ignore.filter)) {
execFilter();
}
execSort();
};
const clearFilter = (columnKeys) => {
const { tableHeaderRef } = instance.refs;
if (!tableHeaderRef)
return;
const panels = Object.assign({}, tableHeaderRef.filterPanels);
const keys = Object.keys(panels);
if (!keys.length)
return;
if (isString(columnKeys)) {
columnKeys = [columnKeys];
}
if (isArray(columnKeys)) {
const columns_ = columnKeys.map((key) => getColumnByKey({
columns: columns2.value
}, key));
keys.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 {
keys.forEach((key) => {
const column2 = columns2.value.find((col) => col.id === key);
if (column2) {
column2.filteredValue = [];
}
});
filters.value = {};
instance.store.commit("filterChange", {
column: {},
values: [],
silent: true
});
}
};
const clearSort = () => {
if (!sortingColumn.value)
return;
updateSort(null, null, null);
instance.store.commit("changeSortCondition", {
silent: true
});
};
const {
setExpandRowKeys,
toggleRowExpansion,
updateExpandRows,
states: expandStates,
isRowExpanded
} = useExpand({
data,
rowKey: rowKey2
});
const {
updateTreeExpandKeys,
toggleTreeExpansion,
updateTreeData,
updateKeyChildren,
loadOrToggle,
states: treeStates
} = useTree({
data,
rowKey: rowKey2
});
const {
updateCurrentRowData,
updateCurrentRow,
setCurrentRowKey,
states: currentData
} = useCurrent({
data,
rowKey: rowKey2
});
const setExpandRowKeysAdapter = (val) => {
setExpandRowKeys(val);
updateTreeExpandKeys(val);
};
const toggleRowExpansionAdapter = (row, expanded) => {
const hasExpandColumn = columns2.value.some(({ type: type4 }) => type4 === "expand");
if (hasExpandColumn) {
toggleRowExpansion(row, expanded);
} else {
toggleTreeExpansion(row, expanded);
}
};
return {
assertRowKey,
updateColumns,
scheduleLayout,
isSelected,
clearSelection,
cleanSelection,
getSelectionRows,
toggleRowSelection,
_toggleAllSelection,
toggleAllSelection: null,
updateAllSelected,
updateFilters,
updateCurrentRow,
updateSort,
execFilter,
execSort,
execQuery,
clearFilter,
clearSort,
toggleRowExpansion,
setExpandRowKeysAdapter,
setCurrentRowKey,
toggleRowExpansionAdapter,
isRowExpanded,
updateExpandRows,
updateCurrentRowData,
loadOrToggle,
updateTreeData,
updateKeyChildren,
states: {
tableSize,
rowKey: rowKey2,
data,
_data,
isComplex,
_columns,
originColumns,
columns: columns2,
fixedColumns,
rightFixedColumns,
leafColumns,
fixedLeafColumns,
rightFixedLeafColumns,
updateOrderFns,
leafColumnsLength,
fixedLeafColumnsLength,
rightFixedLeafColumnsLength,
isAllSelected,
selection,
reserveSelection,
selectOnIndeterminate,
selectable,
filters,
filteredData,
sortingColumn,
sortProp,
sortOrder,
hoverRow,
...expandStates,
...treeStates,
...currentData
}
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/store/index.mjs
function replaceColumn(array4, column2) {
return array4.map((item) => {
var _a;
if (item.id === column2.id) {
return column2;
} else if ((_a = item.children) == null ? void 0 : _a.length) {
item.children = replaceColumn(item.children, column2);
}
return item;
});
}
function sortColumn(array4) {
array4.forEach((item) => {
var _a, _b;
item.no = (_a = item.getColumnIndex) == null ? void 0 : _a.call(item);
if ((_b = item.children) == null ? void 0 : _b.length) {
sortColumn(item.children);
}
});
array4.sort((cur, pre) => cur.no - pre.no);
}
function useStore() {
const instance = getCurrentInstance();
const watcher = useWatcher();
const ns = useNamespace("table");
const mutations = {
setData(states, data) {
const dataInstanceChanged = unref(states._data) !== data;
states.data.value = data;
states._data.value = data;
instance.store.execQuery();
instance.store.updateCurrentRowData();
instance.store.updateExpandRows();
instance.store.updateTreeData(instance.store.states.defaultExpandAll.value);
if (unref(states.reserveSelection)) {
instance.store.assertRowKey();
} else {
if (dataInstanceChanged) {
instance.store.clearSelection();
} else {
instance.store.cleanSelection();
}
}
instance.store.updateAllSelected();
if (instance.$ready) {
instance.store.scheduleLayout();
}
},
insertColumn(states, column2, parent, updateColumnOrder) {
var _a;
const array4 = unref(states._columns);
let newColumns = [];
if (!parent) {
array4.push(column2);
newColumns = array4;
} else {
if (parent && !parent.children) {
parent.children = [];
}
(_a = parent.children) == null ? void 0 : _a.push(column2);
newColumns = replaceColumn(array4, parent);
}
sortColumn(newColumns);
states._columns.value = newColumns;
states.updateOrderFns.push(updateColumnOrder);
if (column2.type === "selection") {
states.selectable.value = column2.selectable;
states.reserveSelection.value = column2.reserveSelection;
}
if (instance.$ready) {
instance.store.updateColumns();
instance.store.scheduleLayout();
}
},
updateColumnOrder(states, column2) {
var _a;
const newColumnIndex = (_a = column2.getColumnIndex) == null ? void 0 : _a.call(column2);
if (newColumnIndex === column2.no)
return;
sortColumn(states._columns.value);
if (instance.$ready) {
instance.store.updateColumns();
}
},
removeColumn(states, column2, parent, updateColumnOrder) {
var _a;
const array4 = unref(states._columns) || [];
if (parent) {
(_a = parent.children) == null ? void 0 : _a.splice(parent.children.findIndex((item) => item.id === column2.id), 1);
nextTick(() => {
var _a2;
if (((_a2 = parent.children) == null ? void 0 : _a2.length) === 0) {
delete parent.children;
}
});
states._columns.value = replaceColumn(array4, parent);
} else {
const index = array4.indexOf(column2);
if (index > -1) {
array4.splice(index, 1);
states._columns.value = array4;
}
}
const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder);
updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1);
if (instance.$ready) {
instance.store.updateColumns();
instance.store.scheduleLayout();
}
},
sort(states, options) {
const { prop, order, init } = options;
if (prop) {
const column2 = unref(states.columns).find((column22) => column22.property === prop);
if (column2) {
column2.order = order;
instance.store.updateSort(column2, prop, order);
instance.store.commit("changeSortCondition", { init });
}
}
},
changeSortCondition(states, options) {
const { sortingColumn, sortProp, sortOrder } = states;
const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder);
if (isNull_default(orderValue)) {
states.sortingColumn.value = null;
states.sortProp.value = null;
}
const ignore = { filter: true };
instance.store.execQuery(ignore);
if (!options || !(options.silent || options.init)) {
instance.emit("sort-change", {
column: columnValue,
prop: propValue,
order: orderValue
});
}
instance.store.updateTableScrollY();
},
filterChange(_states, options) {
const { column: column2, values, silent } = options;
const newFilters = instance.store.updateFilters(column2, values);
instance.store.execQuery();
if (!silent) {
instance.emit("filter-change", newFilters);
}
instance.store.updateTableScrollY();
},
toggleAllSelection() {
var _a, _b;
(_b = (_a = instance.store).toggleAllSelection) == null ? void 0 : _b.call(_a);
},
rowSelectedChanged(_states, row) {
instance.store.toggleRowSelection(row);
instance.store.updateAllSelected();
},
setHoverRow(states, row) {
states.hoverRow.value = row;
},
setCurrentRow(_states, row) {
instance.store.updateCurrentRow(row);
}
};
const commit = function(name, ...args) {
const mutations2 = instance.store.mutations;
if (mutations2[name]) {
mutations2[name].apply(instance, [
instance.store.states,
...args
]);
} else {
throw new Error(`Action not found: ${name}`);
}
};
const updateTableScrollY = function() {
nextTick(() => instance.layout.updateScrollY.apply(instance.layout));
};
return {
ns,
...watcher,
mutations,
commit,
updateTableScrollY
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/store/helper.mjs
init_shared_esm_bundler();
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"
},
["treeProps.checkStrictly"]: {
key: "checkStrictly",
default: false
}
};
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 (isObject(storeKey)) {
newVal = newVal || storeKey.default;
storeKey = storeKey.key;
}
store.states[storeKey].value = newVal;
}
function getArrKeysValue(props, key) {
if (key.includes(".")) {
const keyList = key.split(".");
let value = props;
keyList.forEach((k) => {
value = value[k];
});
return value;
} else {
return props[key];
}
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-layout.mjs
init_shared_esm_bundler();
var TableLayout = class {
constructor(options) {
this.observers = [];
this.table = null;
this.store = null;
this.columns = [];
this.fit = true;
this.showHeader = true;
this.height = ref(null);
this.scrollX = ref(false);
this.scrollY = ref(false);
this.bodyWidth = ref(null);
this.fixedWidth = ref(null);
this.rightFixedWidth = ref(null);
this.gutterWidth = 0;
for (const name in options) {
if (hasOwn(options, name)) {
if (isRef(this[name])) {
this[name].value = options[name];
} else {
this[name] = options[name];
}
}
}
if (!this.table) {
throw new Error("Table is required for Table Layout");
}
if (!this.store) {
throw new Error("Store is required for Table Layout");
}
}
updateScrollY() {
const height = this.height.value;
if (isNull_default(height))
return false;
const scrollBarRef = this.table.refs.scrollBarRef;
if (this.table.vnode.el && (scrollBarRef == null ? void 0 : scrollBarRef.wrapRef)) {
let scrollY = true;
const prevScrollY = this.scrollY.value;
scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight;
this.scrollY.value = scrollY;
return prevScrollY !== scrollY;
}
return false;
}
setHeight(value, prop = "height") {
if (!isClient)
return;
const el = this.table.vnode.el;
value = parseHeight(value);
this.height.value = Number(value);
if (!el && (value || value === 0)) {
nextTick(() => this.setHeight(value, prop));
return;
}
if (el && isNumber(value)) {
el.style[prop] = `${value}px`;
this.updateElsHeight();
} else if (el && isString(value)) {
el.style[prop] = value;
this.updateElsHeight();
}
}
setMaxHeight(value) {
this.setHeight(value, "max-height");
}
getFlattenColumns() {
const flattenColumns = [];
const columns2 = this.table.store.states.columns.value;
columns2.forEach((column2) => {
if (column2.isColumnGroup) {
flattenColumns.push.apply(flattenColumns, column2.columns);
} else {
flattenColumns.push(column2);
}
});
return flattenColumns;
}
updateElsHeight() {
this.updateScrollY();
this.notifyObservers("scrollable");
}
headerDisplayNone(elm) {
if (!elm)
return true;
let headerChild = elm;
while (headerChild.tagName !== "DIV") {
if (getComputedStyle(headerChild).display === "none") {
return true;
}
headerChild = headerChild.parentElement;
}
return false;
}
updateColumnsWidth() {
var _a;
if (!isClient)
return;
const fit = this.fit;
const bodyWidth = (_a = this.table.vnode.el) == null ? void 0 : _a.clientWidth;
let bodyMinWidth = 0;
const flattenColumns = this.getFlattenColumns();
const flexColumns = flattenColumns.filter((column2) => !isNumber(column2.width));
flattenColumns.forEach((column2) => {
if (isNumber(column2.width) && column2.realWidth)
column2.realWidth = null;
});
if (flexColumns.length > 0 && fit) {
flattenColumns.forEach((column2) => {
bodyMinWidth += Number(column2.width || column2.minWidth || 80);
});
if (bodyMinWidth <= bodyWidth) {
this.scrollX.value = false;
const totalFlexWidth = bodyWidth - bodyMinWidth;
if (flexColumns.length === 1) {
flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth;
} else {
const allColumnsWidth = flexColumns.reduce((prev, column2) => prev + Number(column2.minWidth || 80), 0);
const flexWidthPerPixel = totalFlexWidth / allColumnsWidth;
let noneFirstWidth = 0;
flexColumns.forEach((column2, index) => {
if (index === 0)
return;
const flexWidth = Math.floor(Number(column2.minWidth || 80) * flexWidthPerPixel);
noneFirstWidth += flexWidth;
column2.realWidth = Number(column2.minWidth || 80) + flexWidth;
});
flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
}
} else {
this.scrollX.value = true;
flexColumns.forEach((column2) => {
column2.realWidth = Number(column2.minWidth);
});
}
this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth);
this.table.state.resizeState.value.width = this.bodyWidth.value;
} else {
flattenColumns.forEach((column2) => {
if (!column2.width && !column2.minWidth) {
column2.realWidth = 80;
} else {
column2.realWidth = Number(column2.width || column2.minWidth);
}
bodyMinWidth += column2.realWidth;
});
this.scrollX.value = bodyMinWidth > bodyWidth;
this.bodyWidth.value = bodyMinWidth;
}
const fixedColumns = this.store.states.fixedColumns.value;
if (fixedColumns.length > 0) {
let fixedWidth = 0;
fixedColumns.forEach((column2) => {
fixedWidth += Number(column2.realWidth || column2.width);
});
this.fixedWidth.value = fixedWidth;
}
const rightFixedColumns = this.store.states.rightFixedColumns.value;
if (rightFixedColumns.length > 0) {
let rightFixedWidth = 0;
rightFixedColumns.forEach((column2) => {
rightFixedWidth += Number(column2.realWidth || column2.width);
});
this.rightFixedWidth.value = rightFixedWidth;
}
this.notifyObservers("columns");
}
addObserver(observer) {
this.observers.push(observer);
}
removeObserver(observer) {
const index = this.observers.indexOf(observer);
if (index !== -1) {
this.observers.splice(index, 1);
}
}
notifyObservers(event) {
const observers = this.observers;
observers.forEach((observer) => {
var _a, _b;
switch (event) {
case "columns":
(_a = observer.state) == null ? void 0 : _a.onColumnsChange(this);
break;
case "scrollable":
(_b = observer.state) == null ? void 0 : _b.onScrollableChange(this);
break;
default:
throw new Error(`Table Layout don't have event ${event}.`);
}
});
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/filter-panel.mjs
var { CheckboxGroup: ElCheckboxGroup2 } = ElCheckbox;
var _sfc_main78 = 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
},
appendTo: useTooltipContentProps.appendTo
},
setup(props) {
const instance = getCurrentInstance();
const { t } = useLocale();
const ns = useNamespace("table-filter");
const parent = instance == null ? void 0 : instance.parent;
if (props.column && !parent.filterPanels.value[props.column.id]) {
parent.filterPanels.value[props.column.id] = instance;
}
const tooltipVisible = ref(false);
const tooltip = ref(null);
const filters = computed(() => {
return props.column && props.column.filters;
});
const filterClassName = computed(() => {
if (props.column && props.column.filterClassName) {
return `${ns.b()} ${props.column.filterClassName}`;
}
return ns.b();
});
const filterValue = computed({
get: () => {
var _a;
return (((_a = props.column) == null ? void 0 : _a.filteredValue) || [])[0];
},
set: (value) => {
if (filteredValue.value) {
if (!isPropAbsent(value)) {
filteredValue.value.splice(0, 1, value);
} else {
filteredValue.value.splice(0, 1);
}
}
}
});
const filteredValue = computed({
get() {
if (props.column) {
return props.column.filteredValue || [];
}
return [];
},
set(value) {
var _a;
if (props.column) {
(_a = props.upDataColumn) == null ? void 0 : _a.call(props, "filteredValue", value);
}
}
});
const multiple = computed(() => {
if (props.column) {
return props.column.filterMultiple;
}
return true;
});
const isActive = (filter) => {
return filter.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 (!isPropAbsent(_filterValue)) {
confirmFilter(filteredValue.value);
} else {
confirmFilter([]);
}
hidden();
};
const confirmFilter = (filteredValue2) => {
var _a, _b;
(_a = props.store) == null ? void 0 : _a.commit("filterChange", {
column: props.column,
values: filteredValue2
});
(_b = props.store) == null ? void 0 : _b.updateAllSelected();
};
watch(tooltipVisible, (value) => {
var _a;
if (props.column) {
(_a = props.upDataColumn) == null ? void 0 : _a.call(props, "filterOpened", value);
}
}, {
immediate: true
});
const popperPaneRef = computed(() => {
var _a, _b;
return (_b = (_a = tooltip.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
});
return {
tooltipVisible,
multiple,
filterClassName,
filteredValue,
filterValue,
filters,
handleConfirm,
handleReset,
handleSelect,
isPropAbsent,
isActive,
t,
ns,
showFilterPanel,
hideFilterPanel,
popperPaneRef,
tooltip
};
}
});
function _sfc_render10(_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.filterClassName,
persistent: "",
"append-to": _ctx.appendTo
}, {
content: withCtx(() => [
_ctx.multiple ? (openBlock(), createElementBlock("div", { key: 0 }, [
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": ($event) => _ctx.filteredValue = $event,
class: normalizeClass(_ctx.ns.e("checkbox-group"))
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter) => {
return openBlock(), createBlock(_component_el_checkbox, {
key: filter.value,
value: filter.value
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(filter.text), 1)
]),
_: 2
}, 1032, ["value"]);
}), 128))
]),
_: 1
}, 8, ["modelValue", "onUpdate: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: _ctx.handleConfirm
}, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, ["disabled", "onClick"]),
createBaseVNode("button", {
type: "button",
onClick: _ctx.handleReset
}, toDisplayString(_ctx.t("el.table.resetFilter")), 9, ["onClick"])
], 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.isPropAbsent(_ctx.filterValue))
]),
onClick: ($event) => _ctx.handleSelect(null)
}, toDisplayString(_ctx.t("el.table.clearFilter")), 11, ["onClick"]),
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter) => {
return openBlock(), createElementBlock("li", {
key: filter.value,
class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter))]),
label: filter.value,
onClick: ($event) => _ctx.handleSelect(filter.value)
}, toDisplayString(filter.text), 11, ["label", "onClick"]);
}), 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: _ctx.showFilterPanel
}, [
createVNode(_component_el_icon, null, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "filter-icon", {}, () => {
var _a;
return [
((_a = _ctx.column) == null ? void 0 : _a.filterOpened) ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 }))
];
})
]),
_: 3
})
], 10, ["onClick"])), [
[_directive_click_outside, _ctx.hideFilterPanel, _ctx.popperPaneRef]
])
]),
_: 3
}, 8, ["visible", "placement", "popper-class", "append-to"]);
}
var FilterPanel = _export_sfc(_sfc_main78, [["render", _sfc_render10], ["__file", "filter-panel.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/layout-observer.mjs
function useLayoutObserver(root) {
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 layout = root.layout;
if (!layout) {
throw new Error("Can not find table layout.");
}
return layout;
});
const onColumnsChange = (layout) => {
var _a;
const cols = ((_a = root.vnode.el) == null ? void 0 : _a.querySelectorAll("colgroup > col")) || [];
if (!cols.length)
return;
const flattenColumns = layout.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 = (layout) => {
var _a, _b;
const cols = ((_a = root.vnode.el) == null ? void 0 : _a.querySelectorAll("colgroup > col[name=gutter]")) || [];
for (let i = 0, j = cols.length; i < j; i++) {
const col = cols[i];
col.setAttribute("width", layout.scrollY.value ? layout.gutterWidth : "0");
}
const ths = ((_b = root.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 = layout.scrollY.value ? `${layout.gutterWidth}px` : "0";
th.style.display = layout.scrollY.value ? "" : "none";
}
};
return {
tableLayout: tableLayout.value,
onColumnsChange,
onScrollableChange
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/tokens.mjs
var TABLE_INJECTION_KEY = Symbol("ElTable");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs
function useEvent(props, emit) {
const instance = getCurrentInstance();
const parent = 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);
}
parent == null ? void 0 : parent.emit("header-click", column2, event);
};
const handleHeaderContextMenu = (event, column2) => {
parent == null ? void 0 : parent.emit("header-contextmenu", column2, event);
};
const draggingColumn = ref(null);
const dragging = ref(false);
const dragState = ref();
const handleMouseDown = (event, column2) => {
var _a, _b;
if (!isClient)
return;
if (column2.children && column2.children.length > 0)
return;
if (draggingColumn.value && props.border) {
dragging.value = true;
const table = parent;
emit("set-drag-visible", true);
const tableEl = table == null ? void 0 : table.vnode.el;
const tableLeft = tableEl == null ? void 0 : tableEl.getBoundingClientRect().left;
const columnEl = (_b = (_a = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a.el) == null ? void 0 : _b.querySelector(`th.${column2.id}`);
const columnRect = columnEl.getBoundingClientRect();
const minLeft = columnRect.left - tableLeft + 30;
addClass(columnEl, "noclick");
dragState.value = {
startMouseLeft: event.clientX,
startLeft: columnRect.right - tableLeft,
startColumnLeft: columnRect.left - tableLeft,
tableLeft
};
const resizeProxy = table == null ? void 0 : table.refs.resizeProxy;
resizeProxy.style.left = `${dragState.value.startLeft}px`;
document.onselectstart = function() {
return false;
};
document.ondragstart = function() {
return false;
};
const handleMouseMove2 = (event2) => {
const deltaLeft = event2.clientX - dragState.value.startMouseLeft;
const proxyLeft = dragState.value.startLeft + deltaLeft;
resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`;
};
const handleMouseUp = () => {
if (dragging.value) {
const { startColumnLeft, startLeft } = dragState.value;
const finalLeft = Number.parseInt(resizeProxy.style.left, 10);
const columnWidth = finalLeft - startColumnLeft;
column2.width = column2.realWidth = columnWidth;
table == null ? void 0 : table.emit("header-dragend", column2.width, startLeft - startColumnLeft, column2, event);
requestAnimationFrame(() => {
props.store.scheduleLayout(false, true);
});
document.body.style.cursor = "";
dragging.value = false;
draggingColumn.value = null;
dragState.value = void 0;
emit("set-drag-visible", false);
}
document.removeEventListener("mousemove", handleMouseMove2);
document.removeEventListener("mouseup", handleMouseUp);
document.onselectstart = null;
document.ondragstart = null;
setTimeout(() => {
removeClass(columnEl, "noclick");
}, 0);
};
document.addEventListener("mousemove", handleMouseMove2);
document.addEventListener("mouseup", handleMouseUp);
}
};
const handleMouseMove = (event, column2) => {
var _a;
if (column2.children && column2.children.length > 0)
return;
const el = event.target;
if (!isElement(el)) {
return;
}
const target2 = el == null ? void 0 : el.closest("th");
if (!column2 || !column2.resizable || !target2)
return;
if (!dragging.value && props.border) {
const rect = target2.getBoundingClientRect();
const bodyStyle = document.body.style;
const isLastTh = ((_a = target2.parentNode) == null ? void 0 : _a.lastElementChild) === target2;
const allowDarg = props.allowDragLastColumn || !isLastTh;
if (rect.width > 12 && rect.right - event.clientX < 8 && allowDarg) {
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 _a;
event.stopPropagation();
const order = column2.order === givenOrder ? null : givenOrder || toggleOrder(column2);
const target2 = (_a = event.target) == null ? void 0 : _a.closest("th");
if (target2) {
if (hasClass(target2, "noclick")) {
removeClass(target2, "noclick");
return;
}
}
if (!column2.sortable)
return;
const clickTarget = event.currentTarget;
if (["ascending", "descending"].some((str) => hasClass(clickTarget, str) && !column2.sortOrders.includes(str))) {
return;
}
const states = props.store.states;
let sortProp = states.sortProp.value;
let sortOrder;
const sortingColumn = states.sortingColumn.value;
if (sortingColumn !== column2 || sortingColumn === column2 && isNull_default(sortingColumn.order)) {
if (sortingColumn) {
sortingColumn.order = null;
}
states.sortingColumn.value = column2;
sortProp = column2.property;
}
if (!order) {
sortOrder = column2.order = null;
} else {
sortOrder = column2.order = order;
}
states.sortProp.value = sortProp;
states.sortOrder.value = sortOrder;
parent == null ? void 0 : parent.store.commit("changeSortCondition");
};
return {
handleHeaderClick,
handleHeaderContextMenu,
handleMouseDown,
handleMouseMove,
handleMouseOut,
handleSortClick,
handleFilterClick
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs
init_shared_esm_bundler();
function useStyle(props) {
const parent = inject(TABLE_INJECTION_KEY);
const ns = useNamespace("table");
const getHeaderRowStyle = (rowIndex) => {
const headerRowStyle = parent == null ? void 0 : parent.props.headerRowStyle;
if (isFunction(headerRowStyle)) {
return headerRowStyle.call(null, { rowIndex });
}
return headerRowStyle;
};
const getHeaderRowClass = (rowIndex) => {
const classes = [];
const headerRowClassName = parent == null ? void 0 : parent.props.headerRowClassName;
if (isString(headerRowClassName)) {
classes.push(headerRowClassName);
} else if (isFunction(headerRowClassName)) {
classes.push(headerRowClassName.call(null, { rowIndex }));
}
return classes.join(" ");
};
const getHeaderCellStyle = (rowIndex, columnIndex, row, column2) => {
var _a;
let headerCellStyles = (_a = parent == null ? void 0 : parent.props.headerCellStyle) != null ? _a : {};
if (isFunction(headerCellStyles)) {
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(ns.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 = parent == null ? void 0 : parent.props.headerCellClassName;
if (isString(headerCellClassName)) {
classes.push(headerCellClassName);
} else if (isFunction(headerCellClassName)) {
classes.push(headerCellClassName.call(null, {
rowIndex,
columnIndex,
row,
column: column2
}));
}
classes.push(ns.e("cell"));
return classes.filter((className) => Boolean(className)).join(" ");
};
return {
getHeaderRowStyle,
getHeaderRowClass,
getHeaderCellStyle,
getHeaderCellClass
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs
var getAllColumns = (columns2) => {
const result = [];
columns2.forEach((column2) => {
if (column2.children) {
result.push(column2);
result.push.apply(result, getAllColumns(column2.children));
} else {
result.push(column2);
}
});
return result;
};
var convertToRows = (originColumns) => {
let maxLevel = 1;
const traverse = (column2, parent) => {
if (parent) {
column2.level = parent.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 parent = inject(TABLE_INJECTION_KEY);
const columnRows = computed(() => {
return convertToRows(props.store.states.originColumns.value);
});
const isGroup = computed(() => {
const result = columnRows.value.length > 1;
if (result && parent) {
parent.state.isGroup.value = true;
}
return result;
});
const toggleAllSelection = (event) => {
event.stopPropagation();
parent == null ? void 0 : parent.store.commit("toggleAllSelection");
};
return {
isGroup,
toggleAllSelection,
columnRows
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-header/index.mjs
var TableHeader = defineComponent({
name: "ElTableHeader",
components: {
ElCheckbox
},
props: {
fixed: {
type: String,
default: ""
},
store: {
required: true,
type: Object
},
border: Boolean,
defaultSort: {
type: Object,
default: () => {
return {
prop: "",
order: ""
};
}
},
appendFilterPanelTo: {
type: String
},
allowDragLastColumn: {
type: Boolean
}
},
setup(props, { emit }) {
const instance = getCurrentInstance();
const parent = inject(TABLE_INJECTION_KEY);
const ns = useNamespace("table");
const filterPanels = ref({});
const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
const isTableLayoutAuto = (parent == null ? void 0 : parent.props.tableLayout) === "auto";
const saveIndexSelection = reactive(/* @__PURE__ */ new Map());
const theadRef = ref();
let delayId;
const updateFixedColumnStyle = () => {
delayId = setTimeout(() => {
if (saveIndexSelection.size > 0) {
saveIndexSelection.forEach((column2, key) => {
const el = theadRef.value.querySelector(`.${key.replace(/\s/g, ".")}`);
if (el) {
const width = el.getBoundingClientRect().width;
column2.width = width || column2.width;
}
});
saveIndexSelection.clear();
}
});
};
watch(saveIndexSelection, updateFixedColumnStyle);
onBeforeUnmount(() => {
if (delayId) {
clearTimeout(delayId);
delayId = void 0;
}
});
onMounted(async () => {
await nextTick();
await nextTick();
const { prop, order } = props.defaultSort;
parent == null ? void 0 : parent.store.commit("sort", { prop, order, init: true });
updateFixedColumnStyle();
});
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,
filterPanels,
onColumnsChange,
onScrollableChange,
columnRows,
getHeaderRowClass,
getHeaderRowStyle,
getHeaderCellClass,
getHeaderCellStyle,
handleHeaderClick,
handleHeaderContextMenu,
handleMouseDown,
handleMouseMove,
handleMouseOut,
handleSortClick,
handleFilterClick,
isGroup,
toggleAllSelection,
saveIndexSelection,
isTableLayoutAuto,
theadRef,
updateFixedColumnStyle
};
},
render() {
const {
ns,
isGroup,
columnRows,
getHeaderCellStyle,
getHeaderCellClass,
getHeaderRowClass,
getHeaderRowStyle,
handleHeaderClick,
handleHeaderContextMenu,
handleMouseDown,
handleMouseMove,
handleSortClick,
handleMouseOut,
store,
$parent,
saveIndexSelection,
isTableLayoutAuto
} = this;
let rowSpan = 1;
return h("thead", {
ref: "theadRef",
class: ns.is("group", isGroup)
}, columnRows.map((subColumns, rowIndex) => h("tr", {
class: getHeaderRowClass(rowIndex),
key: rowIndex,
style: getHeaderRowStyle(rowIndex)
}, subColumns.map((column2, cellIndex) => {
if (column2.rowSpan > rowSpan) {
rowSpan = column2.rowSpan;
}
const _class = getHeaderCellClass(rowIndex, cellIndex, subColumns, column2);
if (isTableLayoutAuto && column2.fixed) {
saveIndexSelection.set(_class, column2);
}
return h("th", {
class: _class,
colspan: column2.colSpan,
key: `${column2.id}-thead`,
rowspan: column2.rowSpan,
style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column2),
onClick: ($event) => {
var _a;
if ((_a = $event.currentTarget) == null ? void 0 : _a.classList.contains("noclick")) {
return;
}
handleHeaderClick($event, column2);
},
onContextmenu: ($event) => handleHeaderContextMenu($event, column2),
onMousedown: ($event) => handleMouseDown($event, column2),
onMousemove: ($event) => handleMouseMove($event, column2),
onMouseout: handleMouseOut
}, [
h("div", {
class: [
"cell",
column2.filteredValue && column2.filteredValue.length > 0 ? "highlight" : ""
]
}, [
column2.renderHeader ? column2.renderHeader({
column: column2,
$index: cellIndex,
store,
_self: $parent
}) : column2.label,
column2.sortable && h("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",
appendTo: $parent == null ? void 0 : $parent.appendFilterPanelTo,
column: column2,
upDataColumn: (key, value) => {
column2[key] = value;
}
}, {
"filter-icon": () => column2.renderFilterIcon ? column2.renderFilterIcon({
filterOpened: column2.filterOpened
}) : null
})
])
]);
}))));
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs
function isGreaterThan(a2, b2, epsilon = 0.03) {
return a2 - b2 > epsilon;
}
function useEvents(props) {
const parent = inject(TABLE_INJECTION_KEY);
const tooltipContent = ref("");
const tooltipTrigger = ref(h("div"));
const handleEvent = (event, row, name) => {
var _a, _b, _c;
const table = parent;
const cell = getCell(event);
let column2 = null;
const namespace = (_a = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a.dataset.prefix;
if (cell) {
column2 = getColumnByCell({
columns: (_c = (_b = props.store) == null ? void 0 : _b.states.columns.value) != null ? _c : []
}, cell, namespace);
if (column2) {
table == null ? void 0 : table.emit(`cell-${name}`, row, column2, cell, event);
}
}
table == null ? void 0 : table.emit(`row-${name}`, row, column2, event);
};
const handleDoubleClick = (event, row) => {
handleEvent(event, row, "dblclick");
};
const handleClick = (event, row) => {
var _a;
(_a = props.store) == null ? void 0 : _a.commit("setCurrentRow", row);
handleEvent(event, row, "click");
};
const handleContextMenu = (event, row) => {
handleEvent(event, row, "contextmenu");
};
const handleMouseEnter = debounce_default((index) => {
var _a;
(_a = props.store) == null ? void 0 : _a.commit("setHoverRow", index);
}, 30);
const handleMouseLeave = debounce_default(() => {
var _a;
(_a = props.store) == null ? void 0 : _a.commit("setHoverRow", null);
}, 30);
const getPadding = (el) => {
const style = window.getComputedStyle(el, null);
const paddingLeft = Number.parseInt(style.paddingLeft, 10) || 0;
const paddingRight = Number.parseInt(style.paddingRight, 10) || 0;
const paddingTop = Number.parseInt(style.paddingTop, 10) || 0;
const paddingBottom = Number.parseInt(style.paddingBottom, 10) || 0;
return {
left: paddingLeft,
right: paddingRight,
top: paddingTop,
bottom: paddingBottom
};
};
const toggleRowClassByCell = (rowSpan, event, toggle) => {
var _a;
let node = (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.parentNode;
while (rowSpan > 1) {
node = node == null ? void 0 : node.nextSibling;
if (!node || node.nodeName !== "TR")
break;
toggle(node, "hover-row hover-fixed-row");
rowSpan--;
}
};
const handleCellMouseEnter = (event, row, tooltipOptions) => {
var _a, _b, _c, _d, _e, _f, _g, _h;
if (!parent)
return;
const table = parent;
const cell = getCell(event);
const namespace = (_a = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a.dataset.prefix;
let column2 = null;
if (cell) {
column2 = getColumnByCell({
columns: (_c = (_b = props.store) == null ? void 0 : _b.states.columns.value) != null ? _c : []
}, cell, namespace);
if (!column2) {
return;
}
if (cell.rowSpan > 1) {
toggleRowClassByCell(cell.rowSpan, event, addClass);
}
const hoverState = table.hoverState = {
cell,
column: column2,
row
};
table == null ? void 0 : table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event);
}
if (!tooltipOptions) {
if (((_d = removePopper) == null ? void 0 : _d.trigger) === cell) {
(_e = removePopper) == null ? void 0 : _e();
}
return;
}
const cellChild = event.target.querySelector(".cell");
if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length)) {
return;
}
const range3 = document.createRange();
range3.setStart(cellChild, 0);
range3.setEnd(cellChild, cellChild.childNodes.length);
const { width: rangeWidth, height: rangeHeight } = range3.getBoundingClientRect();
const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
const { top, left, right, bottom } = getPadding(cellChild);
const horizontalPadding = left + right;
const verticalPadding = top + bottom;
if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) {
createTablePopper(tooltipOptions, (_f = (cell == null ? void 0 : cell.innerText) || (cell == null ? void 0 : cell.textContent)) != null ? _f : "", row, column2, cell, table);
} else if (((_g = removePopper) == null ? void 0 : _g.trigger) === cell) {
(_h = removePopper) == null ? void 0 : _h();
}
};
const handleCellMouseLeave = (event) => {
const cell = getCell(event);
if (!cell)
return;
if (cell.rowSpan > 1) {
toggleRowClassByCell(cell.rowSpan, event, removeClass);
}
const oldHoverState = parent == null ? void 0 : parent.hoverState;
parent == null ? void 0 : parent.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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs
init_shared_esm_bundler();
function useStyles(props) {
const parent = inject(TABLE_INJECTION_KEY);
const ns = useNamespace("table");
const getRowStyle = (row, rowIndex) => {
const rowStyle = parent == null ? void 0 : parent.props.rowStyle;
if (isFunction(rowStyle)) {
return rowStyle.call(null, {
row,
rowIndex
});
}
return rowStyle || null;
};
const getRowClass = (row, rowIndex, displayIndex) => {
var _a;
const classes = [ns.e("row")];
if ((parent == null ? void 0 : parent.props.highlightCurrentRow) && row === ((_a = props.store) == null ? void 0 : _a.states.currentRow.value)) {
classes.push("current-row");
}
if (props.stripe && displayIndex % 2 === 1) {
classes.push(ns.em("row", "striped"));
}
const rowClassName = parent == null ? void 0 : parent.props.rowClassName;
if (isString(rowClassName)) {
classes.push(rowClassName);
} else if (isFunction(rowClassName)) {
classes.push(rowClassName.call(null, {
row,
rowIndex
}));
}
return classes;
};
const getCellStyle = (rowIndex, columnIndex, row, column2) => {
const cellStyle = parent == null ? void 0 : parent.props.cellStyle;
let cellStyles = cellStyle != null ? cellStyle : {};
if (isFunction(cellStyle)) {
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(ns.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset2);
const classes = [column2.id, column2.align, column2.className, ...fixedClasses];
const cellClassName = parent == null ? void 0 : parent.props.cellClassName;
if (isString(cellClassName)) {
classes.push(cellClassName);
} else if (isFunction(cellClassName)) {
classes.push(cellClassName.call(null, {
rowIndex,
columnIndex,
row,
column: column2
}));
}
classes.push(ns.e("cell"));
return classes.filter((className) => Boolean(className)).join(" ");
};
const getSpan = (row, column2, rowIndex, columnIndex) => {
let rowspan = 1;
let colspan = 1;
const fn = parent == null ? void 0 : parent.props.spanMethod;
if (isFunction(fn)) {
const result = fn({
row,
column: column2,
rowIndex,
columnIndex
});
if (isArray(result)) {
rowspan = result[0];
colspan = result[1];
} else if (isObject(result)) {
rowspan = result.rowspan;
colspan = result.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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-body/td-wrapper.mjs
var __default__69 = defineComponent({
name: "TableTdWrapper"
});
var _sfc_main79 = defineComponent({
...__default__69,
props: {
colspan: {
type: Number,
default: 1
},
rowspan: {
type: Number,
default: 1
}
},
setup(__props) {
return (_ctx, _cache) => {
return openBlock(), createElementBlock("td", {
colspan: __props.colspan,
rowspan: __props.rowspan
}, [
renderSlot(_ctx.$slots, "default")
], 8, ["colspan", "rowspan"]);
};
}
});
var TdWrapper = _export_sfc(_sfc_main79, [["__file", "td-wrapper.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs
function useRender(props) {
const parent = inject(TABLE_INJECTION_KEY);
const ns = useNamespace("table");
const {
handleDoubleClick,
handleClick,
handleContextMenu,
handleMouseEnter,
handleMouseLeave,
handleCellMouseEnter,
handleCellMouseLeave,
tooltipContent,
tooltipTrigger
} = useEvents(props);
const {
getRowStyle,
getRowClass,
getCellStyle,
getCellClass,
getSpan,
getColspanRealWidth
} = useStyles(props);
let displayIndex = -1;
const firstDefaultColumnIndex = computed(() => {
var _a;
return (_a = props.store) == null ? void 0 : _a.states.columns.value.findIndex(({ type: type4 }) => type4 === "default");
});
const getKeyOfRow = (row, index) => {
var _a;
const rowKey2 = (_a = parent == null ? void 0 : parent.props) == null ? void 0 : _a.rowKey;
if (rowKey2) {
return getRowIdentity(row, rowKey2);
}
return index;
};
const rowRender = (row, $index, treeRowData, expanded = false) => {
const { tooltipEffect, tooltipOptions, store } = props;
const { indent, columns: columns2 } = store.states;
const rowClasses = [];
let display = true;
if (treeRowData) {
rowClasses.push(ns.em("row", `level-${treeRowData.level}`));
display = !!treeRowData.display;
}
if ($index === 0) {
displayIndex = -1;
}
if (props.stripe && display) {
displayIndex++;
}
rowClasses.push(...getRowClass(row, $index, displayIndex));
const displayStyle = display ? null : { display: "none" };
return h("tr", {
style: [displayStyle, getRowStyle(row, $index)],
class: rowClasses,
key: getKeyOfRow(row, $index),
onDblclick: ($event) => handleDoubleClick($event, row),
onClick: ($event) => handleClick($event, row),
onContextmenu: ($event) => handleContextMenu($event, row),
onMouseenter: () => handleMouseEnter($index),
onMouseleave: handleMouseLeave
}, columns2.value.map((column2, cellIndex) => {
const { rowspan, colspan } = getSpan(row, column2, $index, cellIndex);
if (!rowspan || !colspan) {
return null;
}
const columnData = Object.assign({}, column2);
columnData.realWidth = getColspanRealWidth(columns2.value, colspan, cellIndex);
const data = {
store,
_self: props.context || parent,
column: columnData,
row,
$index,
cellIndex,
expanded
};
if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {
data.treeNode = {
indent: treeRowData.level && treeRowData.level * indent.value,
level: treeRowData.level
};
if (isBoolean(treeRowData.expanded)) {
data.treeNode.expanded = treeRowData.expanded;
if ("loading" in treeRowData) {
data.treeNode.loading = treeRowData.loading;
}
if ("noLazyChildren" in treeRowData) {
data.treeNode.noLazyChildren = treeRowData.noLazyChildren;
}
}
}
const baseKey = `${getKeyOfRow(row, $index)},${cellIndex}`;
const patchKey = columnData.columnKey || columnData.rawColumnKey || "";
const mergedTooltipOptions = column2.showOverflowTooltip && merge_default({
effect: tooltipEffect
}, tooltipOptions, column2.showOverflowTooltip);
return h(TdWrapper, {
style: getCellStyle($index, cellIndex, row, column2),
class: getCellClass($index, cellIndex, row, column2, colspan - 1),
key: `${patchKey}${baseKey}`,
rowspan,
colspan,
onMouseenter: ($event) => handleCellMouseEnter($event, row, mergedTooltipOptions),
onMouseleave: handleCellMouseLeave
}, {
default: () => cellChildren(cellIndex, column2, data)
});
}));
};
const cellChildren = (_cellIndex, column2, data) => {
return column2.renderCell(data);
};
const wrappedRowRender = (row, $index) => {
const store = 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 = parent == null ? void 0 : parent.renderExpanded;
if (!renderExpanded) {
console.error("[Element Error]renderExpanded is required.");
return tr;
}
const rows = [[tr]];
if (parent.props.preserveExpandedContent || expanded) {
rows[0].push(h("tr", {
key: `expanded-row__${tr.key}`,
style: { display: expanded ? "" : "none" }
}, [
h("td", {
colspan: columns2.length,
class: `${ns.e("cell")} ${ns.e("expanded-cell")}`
}, [renderExpanded({ row, $index, store, expanded })])
]));
}
return rows;
} else if (Object.keys(treeData.value).length) {
assertRowKey();
const key = getRowIdentity(row, rowKey2.value);
let cur = treeData.value[key];
let treeRowData = null;
if (cur) {
treeRowData = {
expanded: cur.expanded,
level: cur.level,
display: true,
noLazyChildren: void 0,
loading: void 0
};
if (isBoolean(cur.lazy)) {
if (treeRowData && isBoolean(cur.loaded) && cur.loaded) {
treeRowData.noLazyChildren = !(cur.children && cur.children.length);
}
treeRowData.loading = cur.loading;
}
}
const tmp = [rowRender(row, $index, treeRowData != null ? treeRowData : void 0)];
if (cur) {
let i = 0;
const traverse = (children, parent2) => {
if (!(children && children.length && parent2))
return;
children.forEach((node) => {
const innerTreeRowData = {
display: parent2.display && parent2.expanded,
level: parent2.level + 1,
expanded: false,
noLazyChildren: false,
loading: false
};
const childKey = getRowIdentity(node, rowKey2.value);
if (isPropAbsent(childKey)) {
throw new Error("For nested data item, row-key is required.");
}
cur = { ...treeData.value[childKey] };
if (cur) {
innerTreeRowData.expanded = cur.expanded;
cur.level = cur.level || innerTreeRowData.level;
cur.display = !!(cur.expanded && innerTreeRowData.display);
if (isBoolean(cur.lazy)) {
if (isBoolean(cur.loaded) && cur.loaded) {
innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);
}
innerTreeRowData.loading = cur.loading;
}
}
i++;
tmp.push(rowRender(node, $index + i, innerTreeRowData));
if (cur) {
const nodes2 = lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value];
traverse(nodes2, cur);
}
});
};
cur.display = true;
const nodes = lazyTreeNodeMap.value[key] || row[childrenColumnName.value];
traverse(nodes, cur);
}
return tmp;
} else {
return rowRender(row, $index, void 0);
}
};
return {
wrappedRowRender,
tooltipContent,
tooltipTrigger
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-body/index.mjs
var TableBody = defineComponent({
name: "ElTableBody",
props: defaultProps,
setup(props) {
var _a;
const instance = getCurrentInstance();
const parent = inject(TABLE_INJECTION_KEY);
const ns = useNamespace("table");
const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender(props);
const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
const hoveredCellList = [];
watch((_a = props.store) == null ? void 0 : _a.states.hoverRow, (newVal, oldVal) => {
var _a2, _b;
const el = instance == null ? void 0 : instance.vnode.el;
const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns.e("row")}`));
let rowNum = newVal;
const childNodes = (_a2 = rows[rowNum]) == null ? void 0 : _a2.childNodes;
if (childNodes == null ? void 0 : childNodes.length) {
let control = 0;
const indexes = Array.from(childNodes).reduce((acc, item, index) => {
var _a3, _b2;
if (((_a3 = childNodes[index]) == null ? void 0 : _a3.colSpan) > 1) {
control = (_b2 = childNodes[index]) == null ? void 0 : _b2.colSpan;
}
if (item.nodeName !== "TD" && control === 0) {
acc.push(index);
}
control > 0 && control--;
return acc;
}, []);
indexes.forEach((rowIndex) => {
var _a3;
rowNum = newVal;
while (rowNum > 0) {
const preChildNodes = (_a3 = rows[rowNum - 1]) == null ? void 0 : _a3.childNodes;
if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) {
addClass(preChildNodes[rowIndex], "hover-cell");
hoveredCellList.push(preChildNodes[rowIndex]);
break;
}
rowNum--;
}
});
} else {
hoveredCellList.forEach((item) => removeClass(item, "hover-cell"));
hoveredCellList.length = 0;
}
if (!((_b = props.store) == null ? void 0 : _b.states.isComplex.value) || !isClient)
return;
rAF(() => {
const oldRow = rows[oldVal];
const newRow = rows[newVal];
if (oldRow && !oldRow.classList.contains("hover-fixed-row")) {
removeClass(oldRow, "hover-row");
}
if (newRow) {
addClass(newRow, "hover-row");
}
});
});
onUnmounted(() => {
var _a2;
(_a2 = removePopper) == null ? void 0 : _a2();
});
return {
ns,
onColumnsChange,
onScrollableChange,
wrappedRowRender,
tooltipContent,
tooltipTrigger
};
},
render() {
const { wrappedRowRender, store } = this;
const data = (store == null ? void 0 : store.states.data.value) || [];
return h("tbody", { tabIndex: -1 }, [
data.reduce((acc, row) => {
return acc.concat(wrappedRowRender(row, acc.length));
}, [])
]);
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs
function useMapState() {
const table = inject(TABLE_INJECTION_KEY);
const store = table == null ? void 0 : table.store;
const leftFixedLeafCount = computed(() => {
var _a;
return (_a = store == null ? void 0 : store.states.fixedLeafColumnsLength.value) != null ? _a : 0;
});
const rightFixedLeafCount = computed(() => {
var _a;
return (_a = store == null ? void 0 : store.states.rightFixedColumns.value.length) != null ? _a : 0;
});
const columnsCount = computed(() => {
var _a;
return (_a = store == null ? void 0 : store.states.columns.value.length) != null ? _a : 0;
});
const leftFixedCount = computed(() => {
var _a;
return (_a = store == null ? void 0 : store.states.fixedColumns.value.length) != null ? _a : 0;
});
const rightFixedCount = computed(() => {
var _a;
return (_a = store == null ? void 0 : store.states.rightFixedColumns.value.length) != null ? _a : 0;
});
return {
leftFixedLeafCount,
rightFixedLeafCount,
columnsCount,
leftFixedCount,
rightFixedCount,
columns: computed(() => {
var _a;
return (_a = store == null ? void 0 : store.states.columns.value) != null ? _a : [];
})
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs
function useStyle2(props) {
const { columns: columns2 } = useMapState();
const ns = useNamespace("table");
const getCellClasses = (columns22, cellIndex) => {
const column2 = columns22[cellIndex];
const classes = [
ns.e("cell"),
column2.id,
column2.align,
column2.labelClassName,
...getFixedColumnsClass(ns.b(), cellIndex, column2.fixed, props.store)
];
if (column2.className) {
classes.push(column2.className);
}
if (!column2.children) {
classes.push(ns.is("leaf"));
}
return classes;
};
const getCellStyles = (column2, cellIndex) => {
const fixedStyle = getFixedColumnOffset(cellIndex, column2.fixed, props.store);
ensurePosition(fixedStyle, "left");
ensurePosition(fixedStyle, "right");
return fixedStyle;
};
return {
getCellClasses,
getCellStyles,
columns: columns2
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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 parent = inject(TABLE_INJECTION_KEY);
const ns = useNamespace("table");
const { getCellClasses, getCellStyles, columns: columns2 } = useStyle2(props);
const { onScrollableChange, onColumnsChange } = useLayoutObserver(parent);
return {
ns,
onScrollableChange,
onColumnsChange,
getCellClasses,
getCellStyles,
columns: columns2
};
},
render() {
const { columns: columns2, getCellStyles, getCellClasses, summaryMethod, sumText } = this;
const data = this.store.states.data.value;
let sums = [];
if (summaryMethod) {
sums = summaryMethod({
columns: columns2,
data
});
} else {
columns2.forEach((column2, index) => {
if (index === 0) {
sums[index] = sumText;
return;
}
const values = data.map((item) => Number(item[column2.property]));
const precisions = [];
let notNumber = true;
values.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] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!Number.isNaN(+value)) {
return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
} else {
return prev;
}
}, 0);
} else {
sums[index] = "";
}
});
}
return h(h("tfoot", [
h("tr", {}, [
...columns2.map((column2, cellIndex) => h("td", {
key: cellIndex,
colspan: column2.colSpan,
rowspan: column2.rowSpan,
class: getCellClasses(columns2, cellIndex),
style: getCellStyles(column2, cellIndex)
}, [
h("div", {
class: ["cell", column2.labelClassName]
}, [sums[cellIndex]])
]))
])
]));
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table/utils-helper.mjs
function useUtils2(store) {
const setCurrentRow = (row) => {
store.commit("setCurrentRow", row);
};
const getSelectionRows = () => {
return store.getSelectionRows();
};
const toggleRowSelection = (row, selected, ignoreSelectable = true) => {
store.toggleRowSelection(row, selected, false, ignoreSelectable);
store.updateAllSelected();
};
const clearSelection = () => {
store.clearSelection();
};
const clearFilter = (columnKeys) => {
store.clearFilter(columnKeys);
};
const toggleAllSelection = () => {
store.commit("toggleAllSelection");
};
const toggleRowExpansion = (row, expanded) => {
store.toggleRowExpansionAdapter(row, expanded);
};
const clearSort = () => {
store.clearSort();
};
const sort = (prop, order) => {
store.commit("sort", { prop, order });
};
const updateKeyChildren = (key, data) => {
store.updateKeyChildren(key, data);
};
return {
setCurrentRow,
getSelectionRows,
toggleRowSelection,
clearSelection,
clearFilter,
toggleAllSelection,
toggleRowExpansion,
clearSort,
sort,
updateKeyChildren
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table/style-helper.mjs
function useStyle3(props, layout, store, table) {
const isHidden = ref(false);
const renderExpanded = ref(null);
const resizeProxyVisible = ref(false);
const setDragVisible = (visible) => {
resizeProxyVisible.value = visible;
};
const resizeState = ref({
width: null,
height: null,
headerHeight: null
});
const isGroup = ref(false);
const scrollbarViewStyle = {
display: "inline-block",
verticalAlign: "middle"
};
const tableWidth = ref();
const tableScrollHeight = ref(0);
const bodyScrollHeight = ref(0);
const headerScrollHeight = ref(0);
const footerScrollHeight = ref(0);
const appendScrollHeight = ref(0);
watchEffect(() => {
var _a;
layout.setHeight((_a = props.height) != null ? _a : null);
});
watchEffect(() => {
var _a;
layout.setMaxHeight((_a = props.maxHeight) != null ? _a : null);
});
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: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : ""
};
});
const doLayout = () => {
if (shouldUpdateHeight.value) {
layout.updateElsHeight();
}
layout.updateColumnsWidth();
if (typeof window === "undefined")
return;
requestAnimationFrame(syncPosition);
};
onMounted(async () => {
await nextTick();
store.updateColumns();
bindEvents();
requestAnimationFrame(doLayout);
const el = table.vnode.el;
const tableHeader = table.refs.headerWrapper;
if (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(layout.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 (!layout.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 _a, _b;
resizeListener();
(_b = (_a = table.refs) == null ? void 0 : _a.scrollBarRef) == null ? void 0 : _b.update();
});
};
const resizeListener = () => {
var _a, _b, _c, _d;
const el = table.vnode.el;
if (!table.$ready || !el)
return;
let shouldUpdateLayout = false;
const {
width: oldWidth,
height: oldHeight,
headerHeight: oldHeaderHeight
} = resizeState.value;
const width = tableWidth.value = el.offsetWidth;
if (oldWidth !== width) {
shouldUpdateLayout = true;
}
const height = el.offsetHeight;
if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {
shouldUpdateLayout = true;
}
const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : (_a = table.refs.tableHeaderRef) == null ? void 0 : _a.$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;
appendScrollHeight.value = ((_d = table.refs.appendWrapper) == null ? void 0 : _d.offsetHeight) || 0;
bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value;
if (shouldUpdateLayout) {
resizeState.value = {
width,
height,
headerHeight: props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) || 0
};
doLayout();
}
};
const tableSize = useFormSize();
const bodyWidth = computed(() => {
const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout;
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;
let height = "100%";
if (props.height && bodyScrollHeight.value) {
height = `${bodyScrollHeight.value}px`;
}
const width = tableWidth.value;
return {
width: width ? `${width}px` : "",
height
};
});
const scrollbarStyle = computed(() => {
if (props.height) {
return {
height: "100%"
};
}
if (props.maxHeight) {
if (!Number.isNaN(Number(props.maxHeight))) {
return {
maxHeight: `${+props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px`
};
} else {
return {
maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)`
};
}
}
return {};
});
return {
isHidden,
renderExpanded,
setDragVisible,
isGroup,
handleMouseLeave,
handleHeaderFooterMousewheel,
tableSize,
emptyBlockStyle,
resizeProxyVisible,
bodyWidth,
resizeState,
doLayout,
tableBodyStyles,
tableLayout,
scrollbarViewStyle,
scrollbarStyle
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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((fn) => fn());
});
observer.value.observe(columnsWrapper, config);
};
onMounted(() => {
initWatchDom();
});
onUnmounted(() => {
var _a;
(_a = observer.value) == null ? void 0 : _a.disconnect();
});
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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",
checkStrictly: false
};
}
},
lazy: Boolean,
load: Function,
style: {
type: Object,
default: () => ({})
},
className: {
type: String,
default: ""
},
tableLayout: {
type: String,
default: "fixed"
},
scrollbarAlwaysOn: Boolean,
flexible: Boolean,
showOverflowTooltip: [Boolean, Object],
tooltipFormatter: Function,
appendFilterPanelTo: String,
scrollbarTabindex: {
type: [Number, String],
default: void 0
},
allowDragLastColumn: {
type: Boolean,
default: true
},
preserveExpandedContent: Boolean,
nativeScrollbar: Boolean
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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(({ width }) => isUndefined(width))) {
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.11.7_vue@3.5.24_typescript@5.9.3_/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 && isNumber(offset2) && ["Top", "Left"].includes(position)) {
scrollbar[`setScroll${position}`](offset2);
}
};
const setScrollTop = (top) => setScrollPosition("Top", top);
const setScrollLeft = (left) => setScrollPosition("Left", left);
return {
scrollBarRef,
scrollTo,
setScrollTop,
setScrollLeft
};
};
// ../node_modules/.pnpm/normalize-wheel-es@1.2.0/node_modules/normalize-wheel-es/dist/index.mjs
var v = false;
var o;
var f;
var s;
var u;
var d;
var N;
var l;
var p;
var m;
var w;
var D;
var x;
var E;
var M;
var F;
function a() {
if (!v) {
v = true;
var e = navigator.userAgent, n = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), i = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
if (x = /\b(iPhone|iP[ao]d)/.exec(e), E = /\b(iP[ao]d)/.exec(e), w = /Android/i.exec(e), M = /FBAN\/\w+;/i.exec(e), F = /Mobile/i.exec(e), D = !!/Win64/.exec(e), n) {
o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode);
var r = /(?:Trident\/(\d+.\d+))/.exec(e);
N = r ? parseFloat(r[1]) + 4 : o, f = n[2] ? parseFloat(n[2]) : NaN, s = n[3] ? parseFloat(n[3]) : NaN, u = n[4] ? parseFloat(n[4]) : NaN, u ? (n = /(?:Chrome\/(\d+\.\d+))/.exec(e), d = n && n[1] ? parseFloat(n[1]) : NaN) : d = NaN;
} else o = f = s = d = u = NaN;
if (i) {
if (i[1]) {
var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
l = t ? parseFloat(t[1].replace("_", ".")) : true;
} else l = false;
p = !!i[2], m = !!i[3];
} else l = p = m = false;
}
}
var _ = { ie: function() {
return a() || o;
}, ieCompatibilityMode: function() {
return a() || N > o;
}, ie64: function() {
return _.ie() && D;
}, firefox: function() {
return a() || f;
}, opera: function() {
return a() || s;
}, webkit: function() {
return a() || u;
}, safari: function() {
return _.webkit();
}, chrome: function() {
return a() || d;
}, windows: function() {
return a() || p;
}, osx: function() {
return a() || l;
}, linux: function() {
return a() || m;
}, iphone: function() {
return a() || x;
}, mobile: function() {
return a() || x || E || w || F;
}, nativeApp: function() {
return a() || M;
}, android: function() {
return a() || w;
}, ipad: function() {
return a() || E;
} };
var A = _;
var c = !!(typeof window < "u" && window.document && window.document.createElement);
var U = { canUseDOM: c, canUseWorkers: typeof Worker < "u", canUseEventListeners: c && !!(window.addEventListener || window.attachEvent), canUseViewport: c && !!window.screen, isInWorker: !c };
var h2 = U;
var X;
h2.canUseDOM && (X = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== true);
function S(e, n) {
if (!h2.canUseDOM || n && !("addEventListener" in document)) return false;
var i = "on" + e, r = i in document;
if (!r) {
var t = document.createElement("div");
t.setAttribute(i, "return;"), r = typeof t[i] == "function";
}
return !r && X && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r;
}
var b = S;
var O = 10;
var I = 40;
var P = 800;
function T(e) {
var n = 0, i = 0, r = 0, t = 0;
return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (n = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (n = i, i = 0), r = n * O, t = i * O, "deltaY" in e && (t = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || t) && e.deltaMode && (e.deltaMode == 1 ? (r *= I, t *= I) : (r *= P, t *= P)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), { spinX: n, spinY: i, pixelX: r, pixelY: t };
}
T.getEventType = function() {
return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel";
};
var Y = T;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/directives/mousewheel/index.mjs
var SCOPE4 = "_Mousewheel";
var mousewheel = function(element, callback) {
if (element && element.addEventListener) {
removeWheelHandler(element);
const fn = function(event) {
const normalized = Y(event);
callback && Reflect.apply(callback, this, [event, normalized]);
};
element[SCOPE4] = { wheelHandler: fn };
element.addEventListener("wheel", fn, { passive: true });
}
};
var removeWheelHandler = (element) => {
var _a;
if ((_a = element[SCOPE4]) == null ? void 0 : _a.wheelHandler) {
element.removeEventListener("wheel", element[SCOPE4].wheelHandler);
element[SCOPE4] = null;
}
};
var Mousewheel = {
beforeMount(el, binding) {
mousewheel(el, binding.value);
},
unmounted(el) {
removeWheelHandler(el);
},
updated(el, binding) {
if (binding.value !== binding.oldValue) {
mousewheel(el, binding.value);
}
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table.mjs
var tableIdSeed = 1;
var _sfc_main80 = 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",
"scroll"
],
setup(props) {
const { t } = useLocale();
const ns = useNamespace("table");
const table = getCurrentInstance();
provide(TABLE_INJECTION_KEY, table);
const store = createStore(table, props);
table.store = store;
const layout = new TableLayout({
store: table.store,
table,
fit: props.fit,
showHeader: props.showHeader
});
table.layout = layout;
const isEmpty2 = computed(() => (store.states.data.value || []).length === 0);
const {
setCurrentRow,
getSelectionRows,
toggleRowSelection,
clearSelection,
clearFilter,
toggleAllSelection,
toggleRowExpansion,
clearSort,
sort,
updateKeyChildren
} = useUtils2(store);
const {
isHidden,
renderExpanded,
setDragVisible,
isGroup,
handleMouseLeave,
handleHeaderFooterMousewheel,
tableSize,
emptyBlockStyle,
resizeProxyVisible,
bodyWidth,
resizeState,
doLayout,
tableBodyStyles,
tableLayout,
scrollbarViewStyle,
scrollbarStyle
} = useStyle3(props, layout, store, table);
const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar();
const debouncedUpdateLayout = debounce_default(doLayout, 50);
const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`;
table.tableId = tableId;
table.state = {
isGroup,
resizeState,
doLayout,
debouncedUpdateLayout
};
const computedSumText = computed(() => {
var _a;
return (_a = props.sumText) != null ? _a : t("el.table.sumText");
});
const computedEmptyText = computed(() => {
var _a;
return (_a = props.emptyText) != null ? _a : t("el.table.emptyText");
});
const columns2 = computed(() => {
return convertToRows(store.states.originColumns.value)[0];
});
useKeyRender(table);
onBeforeUnmount(() => {
debouncedUpdateLayout.cancel();
});
return {
ns,
layout,
store,
columns: columns2,
handleHeaderFooterMousewheel,
handleMouseLeave,
tableId,
tableSize,
isHidden,
isEmpty: isEmpty2,
renderExpanded,
resizeProxyVisible,
resizeState,
isGroup,
bodyWidth,
tableBodyStyles,
emptyBlockStyle,
debouncedUpdateLayout,
setCurrentRow,
getSelectionRows,
toggleRowSelection,
clearSelection,
clearFilter,
toggleAllSelection,
toggleRowExpansion,
clearSort,
doLayout,
sort,
updateKeyChildren,
t,
setDragVisible,
context: table,
computedSumText,
computedEmptyText,
tableLayout,
scrollbarViewStyle,
scrollbarStyle,
scrollBarRef,
scrollTo,
setScrollLeft,
setScrollTop,
allowDragLastColumn: props.allowDragLastColumn
};
}
});
function _sfc_render11(_ctx, _cache, $props, $setup, $data, $options) {
const _component_hColgroup = resolveComponent("hColgroup");
const _component_table_header = resolveComponent("table-header");
const _component_table_body = resolveComponent("table-body");
const _component_table_footer = resolveComponent("table-footer");
const _component_el_scrollbar = resolveComponent("el-scrollbar");
const _directive_mousewheel = resolveDirective("mousewheel");
return openBlock(), createElementBlock("div", {
ref: "tableWrapper",
class: normalizeClass([
{
[_ctx.ns.m("fit")]: _ctx.fit,
[_ctx.ns.m("striped")]: _ctx.stripe,
[_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup,
[_ctx.ns.m("hidden")]: _ctx.isHidden,
[_ctx.ns.m("group")]: _ctx.isGroup,
[_ctx.ns.m("fluid-height")]: _ctx.maxHeight,
[_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value,
[_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value,
[_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value,
[_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100,
"has-footer": _ctx.showSummary
},
_ctx.ns.m(_ctx.tableSize),
_ctx.className,
_ctx.ns.b(),
_ctx.ns.m(`layout-${_ctx.tableLayout}`)
]),
style: normalizeStyle(_ctx.style),
"data-prefix": _ctx.ns.namespace.value,
onMouseleave: _ctx.handleMouseLeave
}, [
createBaseVNode("div", {
class: normalizeClass(_ctx.ns.e("inner-wrapper"))
}, [
createBaseVNode("div", {
ref: "hiddenColumns",
class: "hidden-columns"
}, [
renderSlot(_ctx.$slots, "default")
], 512),
_ctx.showHeader && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
key: 0,
ref: "headerWrapper",
class: normalizeClass(_ctx.ns.e("header-wrapper"))
}, [
createBaseVNode("table", {
ref: "tableHeader",
class: normalizeClass(_ctx.ns.e("header")),
style: normalizeStyle(_ctx.tableBodyStyles),
border: "0",
cellpadding: "0",
cellspacing: "0"
}, [
createVNode(_component_hColgroup, {
columns: _ctx.store.states.columns.value,
"table-layout": _ctx.tableLayout
}, null, 8, ["columns", "table-layout"]),
createVNode(_component_table_header, {
ref: "tableHeaderRef",
border: _ctx.border,
"default-sort": _ctx.defaultSort,
store: _ctx.store,
"append-filter-panel-to": _ctx.appendFilterPanelTo,
"allow-drag-last-column": _ctx.allowDragLastColumn,
onSetDragVisible: _ctx.setDragVisible
}, null, 8, ["border", "default-sort", "store", "append-filter-panel-to", "allow-drag-last-column", "onSetDragVisible"])
], 6)
], 2)), [
[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
]) : createCommentVNode("v-if", true),
createBaseVNode("div", {
ref: "bodyWrapper",
class: normalizeClass(_ctx.ns.e("body-wrapper"))
}, [
createVNode(_component_el_scrollbar, {
ref: "scrollBarRef",
"view-style": _ctx.scrollbarViewStyle,
"wrap-style": _ctx.scrollbarStyle,
always: _ctx.scrollbarAlwaysOn,
tabindex: _ctx.scrollbarTabindex,
native: _ctx.nativeScrollbar,
onScroll: ($event) => _ctx.$emit("scroll", $event)
}, {
default: withCtx(() => [
createBaseVNode("table", {
ref: "tableBody",
class: normalizeClass(_ctx.ns.e("body")),
cellspacing: "0",
cellpadding: "0",
border: "0",
style: normalizeStyle({
width: _ctx.bodyWidth,
tableLayout: _ctx.tableLayout
})
}, [
createVNode(_component_hColgroup, {
columns: _ctx.store.states.columns.value,
"table-layout": _ctx.tableLayout
}, null, 8, ["columns", "table-layout"]),
_ctx.showHeader && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_header, {
key: 0,
ref: "tableHeaderRef",
class: normalizeClass(_ctx.ns.e("body-header")),
border: _ctx.border,
"default-sort": _ctx.defaultSort,
store: _ctx.store,
"append-filter-panel-to": _ctx.appendFilterPanelTo,
onSetDragVisible: _ctx.setDragVisible
}, null, 8, ["class", "border", "default-sort", "store", "append-filter-panel-to", "onSetDragVisible"])) : createCommentVNode("v-if", true),
createVNode(_component_table_body, {
context: _ctx.context,
highlight: _ctx.highlightCurrentRow,
"row-class-name": _ctx.rowClassName,
"tooltip-effect": _ctx.tooltipEffect,
"tooltip-options": _ctx.tooltipOptions,
"row-style": _ctx.rowStyle,
store: _ctx.store,
stripe: _ctx.stripe
}, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"]),
_ctx.showSummary && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_footer, {
key: 1,
class: normalizeClass(_ctx.ns.e("body-footer")),
border: _ctx.border,
"default-sort": _ctx.defaultSort,
store: _ctx.store,
"sum-text": _ctx.computedSumText,
"summary-method": _ctx.summaryMethod
}, null, 8, ["class", "border", "default-sort", "store", "sum-text", "summary-method"])) : createCommentVNode("v-if", true)
], 6),
_ctx.isEmpty ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "emptyBlock",
style: normalizeStyle(_ctx.emptyBlockStyle),
class: normalizeClass(_ctx.ns.e("empty-block"))
}, [
createBaseVNode("span", {
class: normalizeClass(_ctx.ns.e("empty-text"))
}, [
renderSlot(_ctx.$slots, "empty", {}, () => [
createTextVNode(toDisplayString(_ctx.computedEmptyText), 1)
])
], 2)
], 6)) : createCommentVNode("v-if", true),
_ctx.$slots.append ? (openBlock(), createElementBlock("div", {
key: 1,
ref: "appendWrapper",
class: normalizeClass(_ctx.ns.e("append-wrapper"))
}, [
renderSlot(_ctx.$slots, "append")
], 2)) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["view-style", "wrap-style", "always", "tabindex", "native", "onScroll"])
], 2),
_ctx.showSummary && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
key: 1,
ref: "footerWrapper",
class: normalizeClass(_ctx.ns.e("footer-wrapper"))
}, [
createBaseVNode("table", {
class: normalizeClass(_ctx.ns.e("footer")),
cellspacing: "0",
cellpadding: "0",
border: "0",
style: normalizeStyle(_ctx.tableBodyStyles)
}, [
createVNode(_component_hColgroup, {
columns: _ctx.store.states.columns.value,
"table-layout": _ctx.tableLayout
}, null, 8, ["columns", "table-layout"]),
createVNode(_component_table_footer, {
border: _ctx.border,
"default-sort": _ctx.defaultSort,
store: _ctx.store,
"sum-text": _ctx.computedSumText,
"summary-method": _ctx.summaryMethod
}, null, 8, ["border", "default-sort", "store", "sum-text", "summary-method"])
], 6)
], 2)), [
[vShow, !_ctx.isEmpty],
[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
]) : createCommentVNode("v-if", true),
_ctx.border || _ctx.isGroup ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(_ctx.ns.e("border-left-patch"))
}, null, 2)) : createCommentVNode("v-if", true)
], 2),
withDirectives(createBaseVNode("div", {
ref: "resizeProxy",
class: normalizeClass(_ctx.ns.e("column-resize-proxy"))
}, null, 2), [
[vShow, _ctx.resizeProxyVisible]
])
], 46, ["data-prefix", "onMouseleave"]);
}
var Table = _export_sfc(_sfc_main80, [["render", _sfc_render11], ["__file", "table.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/config.mjs
init_shared_esm_bundler();
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,
column: column2
}) {
var _a;
function isDisabled() {
return store.states.data.value && store.states.data.value.length === 0;
}
return h(ElCheckbox, {
disabled: isDisabled(),
size: store.states.tableSize.value,
indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
"onUpdate:modelValue": (_a = store.toggleAllSelection) != null ? _a : void 0,
modelValue: store.states.isAllSelected.value,
ariaLabel: column2.label
});
},
renderCell({
row,
column: column2,
store,
$index
}) {
return h(ElCheckbox, {
disabled: column2.selectable ? !column2.selectable.call(null, row, $index) : false,
size: store.states.tableSize.value,
onChange: () => {
store.commit("rowSelectedChanged", row);
},
onClick: (event) => event.stopPropagation(),
modelValue: store.isSelected(row),
ariaLabel: column2.label
});
},
sortable: false,
resizable: false
},
index: {
renderHeader({
column: column2
}) {
return column2.label || "#";
},
renderCell({
column: column2,
$index
}) {
let i = $index + 1;
const index = column2.index;
if (isNumber(index)) {
i = $index + index;
} else if (isFunction(index)) {
i = index($index);
}
return h("div", {}, [i]);
},
sortable: false
},
expand: {
renderHeader({
column: column2
}) {
return column2.label || "";
},
renderCell({
column: column2,
row,
store,
expanded
}) {
const { ns } = store;
const classes = [ns.e("expand-icon")];
if (!column2.renderExpand && expanded) {
classes.push(ns.em("expand-icon", "expanded"));
}
const callback = function(e) {
e.stopPropagation();
store.toggleRowExpansion(row);
};
return h("div", {
class: classes,
onClick: callback
}, {
default: () => {
if (column2.renderExpand) {
return [
column2.renderExpand({
expanded
})
];
}
return [
h(ElIcon, null, {
default: () => {
return [h(arrow_right_default)];
}
})
];
}
});
},
sortable: false,
resizable: false
}
};
function defaultRenderCell({
row,
column: column2,
$index
}) {
var _a;
const property = column2.property;
const value = property && getProp(row, property).value;
if (column2 && column2.formatter) {
return column2.formatter(row, column2, value, $index);
}
return ((_a = value == null ? void 0 : value.toString) == null ? void 0 : _a.call(value)) || "";
}
function treeCellPrefix({
row,
treeNode,
store
}, createPlaceholder = false) {
const { ns } = store;
if (!treeNode) {
if (createPlaceholder) {
return [
h("span", {
class: ns.e("placeholder")
})
];
}
return null;
}
const ele = [];
const callback = function(e) {
e.stopPropagation();
if (treeNode.loading) {
return;
}
store.loadOrToggle(row);
};
if (treeNode.indent) {
ele.push(h("span", {
class: ns.e("indent"),
style: { "padding-left": `${treeNode.indent}px` }
}));
}
if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) {
const expandClasses = [
ns.e("expand-icon"),
treeNode.expanded ? ns.em("expand-icon", "expanded") : ""
];
let icon = arrow_right_default;
if (treeNode.loading) {
icon = loading_default;
}
ele.push(h("div", {
class: expandClasses,
onClick: callback
}, {
default: () => {
return [
h(ElIcon, { class: ns.is("loading", treeNode.loading) }, {
default: () => [h(icon)]
})
];
}
}));
} else {
ele.push(h("span", {
class: ns.e("placeholder")
}));
}
return ele;
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs
init_shared_esm_bundler();
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",
"filteredValue",
"sortable",
"index",
"formatter",
"className",
"labelClassName",
"filterClassName",
"showOverflowTooltip",
"tooltipFormatter",
"resizable"
];
const parentProps = ["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;
});
}
});
parentProps.forEach((key) => {
if (hasOwn(owner.value.props, key)) {
watch(() => owner.value.props[key], (newVal) => {
instance.columnConfig.value[key] = newVal;
});
}
});
};
return {
registerComplexWatchers,
registerNormalWatchers
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs
init_shared_esm_bundler();
function useRender2(props, slots, owner) {
const instance = getCurrentInstance();
const columnId = ref("");
const isSubColumn = ref(false);
const realAlign = ref();
const realHeaderAlign = ref();
const ns = useNamespace("table");
watchEffect(() => {
realAlign.value = props.align ? `is-${props.align}` : null;
realAlign.value;
});
watchEffect(() => {
realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value;
realHeaderAlign.value;
});
const columnOrTableParent = computed(() => {
let parent = instance.vnode.vParent || instance.parent;
while (parent && !parent.tableId && !parent.columnId) {
parent = parent.vnode.vParent || parent.parent;
}
return parent;
});
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(isUndefined(column2.width) ? column2.minWidth : column2.width);
return column2;
};
const setColumnForcedProps = (column2) => {
const type4 = column2.type;
const source = cellForced[type4] || {};
Object.keys(source).forEach((prop) => {
const value = source[prop];
if (prop !== "className" && !isUndefined(value)) {
column2[prop] = value;
}
});
const className = getDefaultClassName(type4);
if (className) {
const forceClass = `${unref(ns.namespace)}-${className}`;
column2.className = column2.className ? `${column2.className} ${forceClass}` : forceClass;
}
return column2;
};
const checkSubColumn = (children) => {
if (isArray(children)) {
children.forEach((child) => check(child));
} else {
check(children);
}
function check(item) {
var _a;
if (((_a = item == null ? void 0 : item.type) == null ? void 0 : _a.name) === "ElTableColumn") {
item.vParent = instance;
}
}
};
const setColumnRenders = (column2) => {
if (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"];
return renderSlot(slots, "header", scope, () => [column2.label]);
};
}
if (slots["filter-icon"]) {
column2.renderFilterIcon = (scope) => {
return renderSlot(slots, "filter-icon", scope);
};
}
if (slots.expand) {
column2.renderExpand = (scope) => {
return renderSlot(slots, "expand", scope);
};
}
let originRenderCell = column2.renderCell;
if (column2.type === "expand") {
column2.renderCell = (data) => h("div", {
class: "cell"
}, [originRenderCell(data)]);
owner.value.renderExpanded = (row) => {
return slots.default ? slots.default(row) : slots.default;
};
} else {
originRenderCell = originRenderCell || defaultRenderCell;
column2.renderCell = (data) => {
let children = null;
if (slots.default) {
const vnodes = slots.default(data);
children = vnodes.some((v2) => v2.type !== Comment) ? vnodes : originRenderCell(data);
} else {
children = originRenderCell(data);
}
const { columns: columns2 } = owner.value.store.states;
const firstUserColumnIndex = columns2.value.findIndex((item) => item.type === "default");
const shouldCreatePlaceholder = hasTreeColumn.value && data.cellIndex === firstUserColumnIndex;
const prefix = treeCellPrefix(data, shouldCreatePlaceholder);
const props2 = {
class: "cell",
style: {}
};
if (column2.showOverflowTooltip) {
props2.class = `${props2.class} ${unref(ns.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 (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.11.7_vue@3.5.24_typescript@5.9.3_/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: {
type: [Boolean, Object],
default: void 0
},
tooltipFormatter: Function,
fixed: [Boolean, String],
formatter: Function,
selectable: Function,
reserveSelection: Boolean,
filterMethod: Function,
filteredValue: Array,
filters: Array,
filterPlacement: String,
filterMultiple: {
type: Boolean,
default: true
},
filterClassName: String,
index: [Number, Function],
sortOrders: {
type: Array,
default: () => {
return ["ascending", "descending", null];
},
validator: (val) => {
return val.every((order) => ["ascending", "descending", null].includes(order));
}
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table/src/table-column/index.mjs
init_shared_esm_bundler();
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 parent2 = instance.parent;
while (parent2 && !parent2.tableId) {
parent2 = parent2.parent;
}
return parent2;
});
const { registerNormalWatchers, registerComplexWatchers } = useWatcher2(owner, props);
const {
columnId,
isSubColumn,
realHeaderAlign,
columnOrTableParent,
setColumnWidth,
setColumnForcedProps,
setColumnRenders,
getPropsData,
getColumnElIndex,
realAlign,
updateColumnOrder
} = useRender2(props, slots, owner);
const parent = columnOrTableParent.value;
columnId.value = `${"tableId" in parent && parent.tableId || "columnId" in parent && parent.columnId}_column_${columnIdSeed++}`;
onBeforeMount(() => {
isSubColumn.value = owner.value !== parent;
const type4 = props.type || "default";
const sortable = props.sortable === "" ? true : props.sortable;
const showOverflowTooltip = type4 === "selection" ? false : isUndefined(props.showOverflowTooltip) ? parent.props.showOverflowTooltip : props.showOverflowTooltip;
const tooltipFormatter = isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter : props.tooltipFormatter;
const defaults = {
...cellStarts[type4],
id: columnId.value,
type: type4,
property: props.prop || props.property,
align: realAlign,
headerAlign: realHeaderAlign,
showOverflowTooltip,
tooltipFormatter,
filterable: props.filters || props.filterMethod,
filteredValue: [],
filterPlacement: "",
filterClassName: "",
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 selectProps2 = ["selectable", "reserveSelection"];
const filterProps = [
"filterMethod",
"filters",
"filterMultiple",
"filterOpened",
"filteredValue",
"filterPlacement",
"filterClassName"
];
let column2 = getPropsData(basicProps, sortProps, selectProps2, filterProps);
column2 = mergeOptions(defaults, column2);
const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps);
column2 = chains(column2);
columnConfig.value = column2;
registerNormalWatchers();
registerComplexWatchers();
});
onMounted(() => {
var _a, _b;
const parent2 = columnOrTableParent.value;
const children = isSubColumn.value ? (_a = parent2.vnode.el) == null ? void 0 : _a.children : (_b = parent2.refs.hiddenColumns) == null ? void 0 : _b.children;
const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);
columnConfig.value.getColumnIndex = getColumnIndex;
const columnIndex = getColumnIndex();
columnIndex > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent2 && parent2.columnConfig.value : null, updateColumnOrder);
});
onBeforeUnmount(() => {
const getColumnIndex = columnConfig.value.getColumnIndex;
const columnIndex = getColumnIndex ? getColumnIndex() : -1;
columnIndex > -1 && owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
});
instance.columnId = columnId.value;
instance.columnConfig = columnConfig;
return;
},
render() {
var _a, _b, _c;
try {
const renderDefault = (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a, {
row: {},
column: {},
$index: -1
});
const children = [];
if (isArray(renderDefault)) {
for (const childNode of renderDefault) {
if (((_c = childNode.type) == null ? void 0 : _c.name) === "ElTableColumn" || childNode.shapeFlag & 2) {
children.push(childNode);
} else if (childNode.type === Fragment && isArray(childNode.children)) {
childNode.children.forEach((vnode2) => {
if ((vnode2 == null ? void 0 : vnode2.patchFlag) !== 1024 && !isString(vnode2 == null ? void 0 : vnode2.children)) {
children.push(vnode2);
}
});
}
}
}
const vnode = h("div", children);
return vnode;
} catch (e) {
return h("div", []);
}
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/constants.mjs
var SortOrder = ((SortOrder2) => {
SortOrder2["ASC"] = "asc";
SortOrder2["DESC"] = "desc";
return SortOrder2;
})(SortOrder || {});
var Alignment = ((Alignment2) => {
Alignment2["LEFT"] = "left";
Alignment2["CENTER"] = "center";
Alignment2["RIGHT"] = "right";
return Alignment2;
})(Alignment || {});
var FixedDir = ((FixedDir2) => {
FixedDir2["LEFT"] = "left";
FixedDir2["RIGHT"] = "right";
return FixedDir2;
})(FixedDir || {});
var oppositeOrderMap = {
[
"asc"
/* ASC */
]: "desc",
[
"desc"
/* DESC */
]: "asc"
/* ASC */
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/private.mjs
var placeholderSign = Symbol("placeholder");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs
var calcColumnStyle = (column2, fixedColumn, fixed) => {
var _a;
const flex = {
flexGrow: 0,
flexShrink: 0,
...fixed ? {} : {
flexGrow: column2.flexGrow || 0,
flexShrink: column2.flexShrink || 1
}
};
if (!fixed) {
flex.flexShrink = 1;
}
const style = {
...(_a = column2.style) != null ? _a : {},
...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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs
init_shared_esm_bundler();
function useColumns(props, columns2, fixed) {
const _columns = computed(() => unref(columns2).map((column2, index) => {
var _a, _b;
return {
...column2,
key: (_b = (_a = column2.key) != null ? _a : column2.dataKey) != null ? _b : index
};
}));
const visibleColumns = computed(() => {
return unref(_columns).filter((column2) => !column2.hidden);
});
const fixedColumnsOnLeft = computed(() => unref(visibleColumns).filter((column2) => column2.fixed === "left" || column2.fixed === true));
const fixedColumnsOnRight = computed(() => unref(visibleColumns).filter((column2) => column2.fixed === "right"));
const normalColumns = computed(() => unref(visibleColumns).filter((column2) => !column2.fixed));
const mainColumns = computed(() => {
const ret = [];
unref(fixedColumnsOnLeft).forEach((column2) => {
ret.push({
...column2,
placeholderSign
});
});
unref(normalColumns).forEach((column2) => {
ret.push(column2);
});
unref(fixedColumnsOnRight).forEach((column2) => {
ret.push({
...column2,
placeholderSign
});
});
return ret;
});
const hasFixedColumns = computed(() => {
return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length;
});
const columnsStyles = computed(() => {
return unref(_columns).reduce((style, column2) => {
style[column2.key] = calcColumnStyle(column2, unref(fixed), props.fixed);
return style;
}, {});
});
const columnsTotalWidth = computed(() => {
return unref(visibleColumns).reduce((width, column2) => width + column2.width, 0);
});
const getColumn = (key) => {
return unref(_columns).find((column2) => column2.key === key);
};
const getColumnStyle = (key) => {
return unref(columnsStyles)[key];
};
const updateColumnWidth = (column2, width) => {
column2.width = width;
};
function onColumnSorted(e) {
var _a;
const { key } = e.currentTarget.dataset;
if (!key)
return;
const { sortState, sortBy } = props;
let order = SortOrder.ASC;
if (isObject(sortState)) {
order = oppositeOrderMap[sortState[key]];
} else {
order = oppositeOrderMap[sortBy.order];
}
(_a = props.onColumnSort) == null ? void 0 : _a.call(props, { column: getColumn(key), key, order });
}
return {
columns: _columns,
columnsStyles,
columnsTotalWidth,
fixedColumnsOnLeft,
fixedColumnsOnRight,
hasFixedColumns,
mainColumns,
normalColumns,
visibleColumns,
getColumn,
getColumnStyle,
updateColumnWidth,
onColumnSorted
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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 _a, _b, _c;
const { scrollTop } = params;
(_a = mainTableRef.value) == null ? void 0 : _a.scrollTo(params);
(_b = leftTableRef.value) == null ? void 0 : _b.scrollToTop(scrollTop);
(_c = rightTableRef.value) == null ? void 0 : _c.scrollToTop(scrollTop);
}
function scrollTo(params) {
scrollPos.value = params;
doScroll(params);
}
function scrollToTop(scrollTop) {
scrollPos.value.scrollTop = scrollTop;
doScroll(unref(scrollPos));
}
function scrollToLeft(scrollLeft) {
var _a, _b;
scrollPos.value.scrollLeft = scrollLeft;
(_b = (_a = mainTableRef.value) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, unref(scrollPos));
}
function onScroll(params) {
var _a;
scrollTo(params);
(_a = props.onScroll) == null ? void 0 : _a.call(props, params);
}
function onVerticalScroll({ scrollTop }) {
const { scrollTop: currentScrollTop } = unref(scrollPos);
if (scrollTop !== currentScrollTop)
scrollToTop(scrollTop);
}
function scrollToRow(row, strategy = "auto") {
var _a;
(_a = mainTableRef.value) == null ? void 0 : _a.scrollToRow(row, strategy);
}
watch(() => unref(scrollPos).scrollTop, (cur, prev) => {
if (cur > prev)
onMaybeEndReached();
});
return {
scrollPos,
scrollTo,
scrollToLeft,
scrollToTop,
scrollToRow,
onScroll,
onVerticalScroll
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs
var useRow = (props, {
mainTableRef,
leftTableRef,
rightTableRef,
tableInstance,
ns,
isScrolling
}) => {
const vm = getCurrentInstance();
const { emit } = vm;
const isResetting = shallowRef(false);
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(() => isNumber(props.estimatedRowHeight));
function onRowsRendered(params) {
var _a;
(_a = props.onRowsRendered) == null ? void 0 : _a.call(props, params);
if (params.rowCacheEnd > unref(lastRenderedRowIndex)) {
lastRenderedRowIndex.value = params.rowCacheEnd;
}
}
function onRowHovered({ hovered, rowKey: rowKey2 }) {
if (isScrolling.value) {
return;
}
const tableRoot = tableInstance.vnode.el;
const rows = tableRoot.querySelectorAll(`[rowkey="${String(rowKey2)}"]`);
rows.forEach((row) => {
if (hovered) {
row.classList.add(ns.is("hovered"));
} else {
row.classList.remove(ns.is("hovered"));
}
});
}
function onRowExpanded({
expanded,
rowData,
rowIndex,
rowKey: rowKey2
}) {
var _a, _b;
const _expandedRowKeys = [...unref(expandedRowKeys)];
const currentKeyIndex = _expandedRowKeys.indexOf(rowKey2);
if (expanded) {
if (currentKeyIndex === -1)
_expandedRowKeys.push(rowKey2);
} else {
if (currentKeyIndex > -1)
_expandedRowKeys.splice(currentKeyIndex, 1);
}
expandedRowKeys.value = _expandedRowKeys;
emit("update:expandedRowKeys", _expandedRowKeys);
(_a = props.onRowExpand) == null ? void 0 : _a.call(props, {
expanded,
rowData,
rowIndex,
rowKey: rowKey2
});
(_b = props.onExpandedRowsChange) == null ? void 0 : _b.call(props, _expandedRowKeys);
const tableRoot = tableInstance.vnode.el;
const hoverRow = tableRoot.querySelector(`.${ns.is("hovered")}[rowkey="${String(rowKey2)}"]`);
if (hoverRow) {
nextTick(() => onRowHovered({ hovered: true, rowKey: rowKey2 }));
}
}
const flushingRowHeights = debounce_default(() => {
var _a, _b, _c, _d;
isResetting.value = true;
rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) };
resetAfterIndex(unref(resetIndex), false);
pendingRowHeights.value = {};
resetIndex.value = null;
(_a = mainTableRef.value) == null ? void 0 : _a.forceUpdate();
(_b = leftTableRef.value) == null ? void 0 : _b.forceUpdate();
(_c = rightTableRef.value) == null ? void 0 : _c.forceUpdate();
(_d = vm.proxy) == null ? void 0 : _d.$forceUpdate();
isResetting.value = false;
}, 0);
function resetAfterIndex(index, forceUpdate = false) {
if (!unref(isDynamic))
return;
[mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => {
const table = unref(tableRef);
if (table)
table.resetAfterRowIndex(index, forceUpdate);
});
}
function resetHeights(rowKey2, height, rowIdx) {
const resetIdx = unref(resetIndex);
if (resetIdx === null) {
resetIndex.value = rowIdx;
} else {
if (resetIdx > rowIdx) {
resetIndex.value = rowIdx;
}
}
pendingRowHeights.value[rowKey2] = height;
}
function onRowHeightChange({ rowKey: rowKey2, height, rowIndex }, fixedDir) {
if (!fixedDir) {
mainTableHeights.value[rowKey2] = height;
} else {
if (fixedDir === FixedDir.RIGHT) {
rightTableHeights.value[rowKey2] = height;
} else {
leftTableHeights.value[rowKey2] = height;
}
}
const maximumHeight = Math.max(...[leftTableHeights, rightTableHeights, mainTableHeights].map((records) => records.value[rowKey2] || 0));
if (unref(rowHeights)[rowKey2] !== maximumHeight) {
resetHeights(rowKey2, maximumHeight, rowIndex);
flushingRowHeights();
}
}
return {
expandedRowKeys,
lastRenderedRowIndex,
isDynamic,
isResetting,
rowHeights,
resetAfterIndex,
onRowExpanded,
onRowHovered,
onRowsRendered,
onRowHeightChange
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs
init_shared_esm_bundler();
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]) && 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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/utils.mjs
init_shared_esm_bundler();
var sumReducer = (sum2, num) => sum2 + num;
var sum = (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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs
var useStyles2 = (props, {
columnsTotalWidth,
rowsHeight,
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 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 total = _headerHeight + _fixedRowsHeight + _rowsHeight + hScrollbarSize;
return Math.min(total, maxHeight - footerHeight2);
}
return height - footerHeight2;
});
const fixedTableHeight = computed(() => {
const { maxHeight } = props;
const tableHeight = unref(mainTableHeight);
if (isNumber(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(() => sum(unref(fixedColumnsOnLeft).map(mapColumn)));
const rightTableWidth = computed(() => sum(unref(fixedColumnsOnRight).map(mapColumn)));
const headerHeight = computed(() => sum(props.headerHeight));
const fixedRowsHeight = computed(() => {
var _a;
return (((_a = props.fixedData) == null ? void 0 : _a.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,
windowHeight,
footerHeight,
emptyStyle,
rootStyle,
headerHeight
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/use-table.mjs
init_shared_esm_bundler();
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 ns = useNamespace("table-v2");
const instance = getCurrentInstance();
const isScrolling = shallowRef(false);
const {
expandedRowKeys,
lastRenderedRowIndex,
isDynamic,
isResetting,
rowHeights,
resetAfterIndex,
onRowExpanded,
onRowHeightChange,
onRowHovered,
onRowsRendered
} = useRow(props, {
mainTableRef,
leftTableRef,
rightTableRef,
tableInstance: instance,
ns,
isScrolling
});
const { data, depthMap } = useData(props, {
expandedRowKeys,
lastRenderedRowIndex,
resetAfterIndex
});
const rowsHeight = computed(() => {
const { estimatedRowHeight, rowHeight } = props;
const _data = unref(data);
if (isNumber(estimatedRowHeight)) {
return Object.values(unref(rowHeights)).reduce((acc, curr) => acc + curr, 0);
}
return _data.length * rowHeight;
});
const {
bodyWidth,
fixedTableHeight,
mainTableHeight,
leftTableWidth,
rightTableWidth,
windowHeight,
footerHeight,
emptyStyle,
rootStyle,
headerHeight
} = useStyles2(props, {
columnsTotalWidth,
fixedColumnsOnLeft,
fixedColumnsOnRight,
rowsHeight
});
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;
}
const isEndReached = ref(false);
function onMaybeEndReached() {
const { onEndReached } = props;
if (!onEndReached)
return;
const { scrollTop } = unref(scrollPos);
const _totalHeight = unref(rowsHeight);
const clientHeight = unref(windowHeight);
const remainDistance = _totalHeight - (scrollTop + clientHeight) + props.hScrollbarSize;
if (!isEndReached.value && unref(lastRenderedRowIndex) >= 0 && _totalHeight <= scrollTop + unref(mainTableHeight) - unref(headerHeight)) {
isEndReached.value = true;
onEndReached(remainDistance);
} else {
isEndReached.value = false;
}
}
watch(() => unref(rowsHeight), () => isEndReached.value = false);
watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, {
deep: true
});
return {
columns: columns2,
containerRef,
mainTableRef,
leftTableRef,
rightTableRef,
isDynamic,
isResetting,
isScrolling,
hasFixedColumns,
columnsStyles,
columnsTotalWidth,
data,
expandedRowKeys,
depthMap,
fixedColumnsOnLeft,
fixedColumnsOnRight,
mainColumns,
bodyWidth,
emptyStyle,
rootStyle,
footerHeight,
mainTableHeight,
fixedTableHeight,
leftTableWidth,
rightTableWidth,
showEmpty,
getRowHeight,
onColumnSorted,
onRowHovered,
onRowExpanded,
onRowsRendered,
onRowHeightChange,
scrollTo,
scrollToLeft,
scrollToTop,
scrollToRow,
onScroll,
onVerticalScroll
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/tokens.mjs
var TableV2InjectionKey = Symbol("tableV2");
var TABLE_V2_GRID_INJECTION_KEY = "tableV2GridScrollLeft";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/header.mjs
var COMPONENT_NAME12 = "ElTableV2Header";
var TableV2Header = defineComponent({
name: COMPONENT_NAME12,
props: tableV2HeaderProps,
setup(props, {
slots,
expose
}) {
const ns = useNamespace("table-v2");
const scrollLeftInfo = inject(TABLE_V2_GRID_INJECTION_KEY);
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 = (left) => {
const headerEl = unref(headerRef);
nextTick(() => {
(headerEl == null ? void 0 : headerEl.scroll) && headerEl.scroll({
left
});
});
};
const renderFixedRows = () => {
const fixedRowClassName = ns.e("fixed-header-row");
const {
columns: columns2,
fixedHeaderData,
rowHeight
} = props;
return fixedHeaderData == null ? void 0 : fixedHeaderData.map((fixedRowData, fixedRowIndex) => {
var _a;
const style = enforceUnit({
height: rowHeight,
width: "100%"
});
return (_a = slots.fixed) == null ? void 0 : _a.call(slots, {
class: fixedRowClassName,
columns: columns2,
rowData: fixedRowData,
rowIndex: -(fixedRowIndex + 1),
style
});
});
};
const renderDynamicRows = () => {
const dynamicRowClassName = ns.e("dynamic-header-row");
const {
columns: columns2
} = props;
return unref(headerHeights).map((rowHeight, rowIndex) => {
var _a;
const style = enforceUnit({
width: "100%",
height: rowHeight
});
return (_a = slots.dynamic) == null ? void 0 : _a.call(slots, {
class: dynamicRowClassName,
columns: columns2,
headerIndex: rowIndex,
style
});
});
};
onUpdated(() => {
if (scrollLeftInfo == null ? void 0 : scrollLeftInfo.value) {
scrollToLeft(scrollLeftInfo.value);
}
});
expose({
scrollToLeft
});
return () => {
if (props.height <= 0)
return;
return createVNode("div", {
"ref": headerRef,
"class": props.class,
"style": unref(headerStyle),
"role": "rowgroup"
}, [createVNode("div", {
"style": unref(rowStyle),
"class": ns.e("header")
}, [renderDynamicRows(), renderFixedRows()])]);
};
}
});
var Header2 = TableV2Header;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/virtual-list/src/builders/build-grid.mjs
init_shared_esm_bundler();
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 ns = useNamespace("vl");
validateProps(props);
const instance = getCurrentInstance();
const cache = ref(initCache(props, instance));
injectToInstance == null ? void 0 : injectToInstance(instance, cache);
const windowRef = ref();
const hScrollbar = ref();
const vScrollbar = ref();
const innerRef = ref(null);
const states = ref({
isScrolling: false,
scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,
scrollTop: isNumber(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(cache));
const stopIndex = getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, unref(cache));
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(cache));
const stopIndex = getRowStopIndexForStartIndex(props, startIndex, scrollTop, unref(cache));
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(cache)));
const estimatedTotalWidth = computed(() => getEstimatedTotalWidth2(props, unref(cache)));
const windowStyle = computed(() => {
var _a;
return [
{
position: "relative",
overflow: "hidden",
WebkitOverflowScrolling: "touch",
willChange: "transform"
},
{
direction: props.direction,
height: isNumber(props.height) ? `${props.height}px` : props.height,
width: isNumber(props.width) ? `${props.width}px` : props.width
},
(_a = props.style) != null ? _a : {}
];
});
const innerStyle = computed(() => {
const width = `${unref(estimatedTotalWidth)}px`;
const height = `${unref(estimatedTotalHeight)}px`;
return {
height,
pointerEvents: unref(states).isScrolling ? "none" : void 0,
width
};
});
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 _a, _b, _c, _d;
(_b = (_a = hScrollbar.value) == null ? void 0 : _a.onMouseUp) == null ? void 0 : _b.call(_a);
(_d = (_c = vScrollbar.value) == null ? void 0 : _c.onMouseUp) == null ? void 0 : _d.call(_c);
const width = unref(parsedWidth);
const height = unref(parsedHeight);
scrollTo({
scrollLeft: Math.min(states.value.scrollLeft + x2, estimatedTotalWidth.value - width),
scrollTop: Math.min(states.value.scrollTop + y, estimatedTotalHeight.value - height)
});
});
useEventListener(windowRef, "wheel", onWheel, {
passive: false
});
const 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 scrollBarWidth = getScrollBarWidth(ns.namespace.value);
const _cache = unref(cache);
const estimatedHeight = getEstimatedTotalHeight2(props, _cache);
const estimatedWidth = getEstimatedTotalWidth2(props, _cache);
scrollTo({
scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth : 0),
scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth : 0)
});
};
const getItemStyle = (rowIndex, columnIndex) => {
const { columnWidth, direction, rowHeight } = props;
const itemStyleCache = getItemStyleCache.value(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction);
const key = `${rowIndex},${columnIndex}`;
if (hasOwn(itemStyleCache, key)) {
return itemStyleCache[key];
} else {
const [, left] = getColumnPosition(props, columnIndex, unref(cache));
const _cache = unref(cache);
const rtl = isRTL(direction);
const [height, top] = getRowPosition(props, rowIndex, _cache);
const [width] = getColumnPosition(props, columnIndex, _cache);
itemStyleCache[key] = {
position: "absolute",
left: rtl ? void 0 : `${left}px`,
right: rtl ? `${left}px` : void 0,
top: `${top}px`,
height: `${height}px`,
width: `${width}px`
};
return itemStyleCache[key];
}
};
const resetIsScrolling = () => {
states.value.isScrolling = false;
nextTick(() => {
getItemStyleCache.value(-1, null, null);
});
};
onMounted(() => {
if (!isClient)
return;
const { initScrollLeft, initScrollTop } = props;
const windowElement = unref(windowRef);
if (windowElement) {
if (isNumber(initScrollLeft)) {
windowElement.scrollLeft = initScrollLeft;
}
if (isNumber(initScrollTop)) {
windowElement.scrollTop = initScrollTop;
}
}
emitEvents();
});
const onUpdated2 = () => {
const { direction } = props;
const { scrollLeft, scrollTop, updateRequested } = unref(states);
const windowElement = unref(windowRef);
if (updateRequested && windowElement) {
if (direction === 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: ns.e("horizontal"),
clientSize: width,
layout: "horizontal",
onScroll: onHorizontalScroll,
ratio: width * 100 / estimatedWidth,
scrollFrom: scrollLeft / (estimatedWidth - width),
total: totalRow,
visible: true
});
const verticalScrollbar = h(ScrollBar, {
ref: vScrollbar,
alwaysOn: scrollbarAlwaysOn,
startGap: scrollbarStartGap,
endGap: scrollbarEndGap,
class: ns.e("vertical"),
clientSize: height,
layout: "vertical",
onScroll: onVerticalScroll,
ratio: height * 100 / estimatedHeight,
scrollFrom: scrollTop / (estimatedHeight - height),
total: totalColumn,
visible: true
});
return {
horizontalScrollbar,
verticalScrollbar
};
};
const renderItems = () => {
var _a;
const [columnStart, columnEnd] = unref(columnsToRender);
const [rowStart, rowEnd] = unref(rowsToRender);
const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props;
const children = [];
if (totalRow > 0 && totalColumn > 0) {
for (let row = rowStart; row <= rowEnd; row++) {
for (let column2 = columnStart; column2 <= columnEnd; column2++) {
const key = itemKey({ columnIndex: column2, data, rowIndex: row });
children.push(h(Fragment, { key }, (_a = slots.default) == null ? void 0 : _a.call(slots, {
columnIndex: column2,
data,
isScrolling: useIsScrolling ? unref(states).isScrolling : void 0,
style: getItemStyle(row, column2),
rowIndex: row
})));
}
}
}
return children;
};
const renderInner = () => {
const Inner = resolveDynamicComponent(props.innerElement);
const children = renderItems();
return [
h(Inner, mergeProps(props.innerProps, {
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: ns.e("wrapper"),
role: props.role
}, [
h(Container2, {
class: props.className,
style: unref(windowStyle),
onScroll,
ref: windowRef
}, !isString(Container2) ? { default: () => Inner } : Inner),
horizontalScrollbar,
verticalScrollbar
]);
};
return renderWindow;
}
});
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs
var { max, min, floor } = Math;
var ACCESS_SIZER_KEY_MAP = {
column: "columnWidth",
row: "rowHeight"
};
var ACCESS_LAST_VISITED_KEY_MAP = {
column: "lastVisitedColumnIndex",
row: "lastVisitedRowIndex"
};
var getItemFromCache = (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 size = sizer(i);
cachedItems[i] = {
offset: offset2,
size
};
offset2 += size;
}
gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] = index;
}
return cachedItems[index];
};
var bs = (props, gridCache, low, high, offset2, type4) => {
while (low <= high) {
const mid = low + floor((high - low) / 2);
const currentOffset = getItemFromCache(props, mid, gridCache, type4).offset;
if (currentOffset === offset2) {
return mid;
} else if (currentOffset < offset2) {
low = mid + 1;
} else {
high = mid - 1;
}
}
return max(0, low - 1);
};
var es = (props, gridCache, idx, offset2, type4) => {
const total = type4 === "column" ? props.totalColumn : props.totalRow;
let exponent = 1;
while (idx < total && getItemFromCache(props, idx, gridCache, type4).offset < offset2) {
idx += exponent;
exponent *= 2;
}
return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset2, type4);
};
var findItem = (props, gridCache, offset2, type4) => {
const [cache, lastVisitedIndex] = [
gridCache[type4],
gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]]
];
const lastVisitedItemOffset = lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0;
if (lastVisitedItemOffset >= offset2) {
return bs(props, gridCache, 0, lastVisitedIndex, offset2, type4);
}
return es(props, gridCache, max(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 getOffset2 = (props, index, alignment, scrollOffset, cache, type4, scrollBarWidth) => {
const [size, estimatedSizeAssociates] = [
type4 === "row" ? props.height : props.width,
ACCESS_ESTIMATED_SIZE_KEY_MAP[type4]
];
const item = getItemFromCache(props, index, cache, type4);
const estimatedSize = estimatedSizeAssociates(props, cache);
const maxOffset = max(0, min(estimatedSize - size, item.offset));
const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);
if (alignment === SMART_ALIGNMENT) {
if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {
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, cache) => {
const item = getItemFromCache(props, idx, cache, "column");
return [item.size, item.offset];
},
getRowPosition: (props, idx, cache) => {
const item = getItemFromCache(props, idx, cache, "row");
return [item.size, item.offset];
},
getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset2(props, columnIndex, alignment, scrollLeft, cache, "column", scrollBarWidth),
getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset2(props, rowIndex, alignment, scrollTop, cache, "row", scrollBarWidth),
getColumnStartIndexForOffset: (props, scrollLeft, cache) => findItem(props, cache, scrollLeft, "column"),
getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {
const item = getItemFromCache(props, startIndex, cache, "column");
const maxOffset = scrollLeft + props.width;
let offset2 = item.offset + item.size;
let stopIndex = startIndex;
while (stopIndex < props.totalColumn - 1 && offset2 < maxOffset) {
stopIndex++;
offset2 += getItemFromCache(props, startIndex, cache, "column").size;
}
return stopIndex;
},
getEstimatedTotalHeight,
getEstimatedTotalWidth,
getRowStartIndexForOffset: (props, scrollTop, cache) => findItem(props, cache, scrollTop, "row"),
getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {
const { totalRow, height } = props;
const item = getItemFromCache(props, startIndex, cache, "row");
const maxOffset = scrollTop + height;
let offset2 = item.size + item.offset;
let stopIndex = startIndex;
while (stopIndex < totalRow - 1 && offset2 < maxOffset) {
stopIndex++;
offset2 += getItemFromCache(props, stopIndex, cache, "row").size;
}
return stopIndex;
},
injectToInstance: (instance, cache) => {
const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => {
var _a, _b;
forceUpdate = isUndefined(forceUpdate) ? true : forceUpdate;
if (isNumber(columnIndex)) {
cache.value.lastVisitedColumnIndex = Math.min(cache.value.lastVisitedColumnIndex, columnIndex - 1);
}
if (isNumber(rowIndex)) {
cache.value.lastVisitedRowIndex = Math.min(cache.value.lastVisitedRowIndex, rowIndex - 1);
}
(_a = instance.exposed) == null ? void 0 : _a.getItemStyleCache.value(-1, null, null);
if (forceUpdate)
(_b = instance.proxy) == null ? void 0 : _b.$forceUpdate();
};
const resetAfterColumnIndex = (columnIndex, forceUpdate) => {
resetAfter({
columnIndex
}, forceUpdate);
};
const resetAfterRowIndex = (rowIndex, forceUpdate) => {
resetAfter({
rowIndex
}, forceUpdate);
};
Object.assign(instance.proxy, {
resetAfterColumnIndex,
resetAfterRowIndex,
resetAfter
});
},
initCache: ({
estimatedColumnWidth = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,
estimatedRowHeight = DEFAULT_DYNAMIC_LIST_ITEM_SIZE
}) => {
const cache = {
column: {},
estimatedColumnWidth,
estimatedRowHeight,
lastVisitedColumnIndex: -1,
lastVisitedRowIndex: -1,
row: {}
};
return cache;
},
clearCache: false,
validateProps: ({ columnWidth, rowHeight }) => {
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs
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, scrollBarWidth) => {
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 + scrollBarWidth + 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, scrollBarWidth) => {
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 + scrollBarWidth + rowHeight);
if (align === SMART_ALIGNMENT) {
if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {
align = AUTO_ALIGNMENT;
} else {
align = CENTERED_ALIGNMENT;
}
}
switch (align) {
case START_ALIGNMENT:
return maxOffset;
case END_ALIGNMENT:
return minOffset;
case CENTERED_ALIGNMENT: {
const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
if (middleOffset < Math.ceil(height / 2)) {
return 0;
} else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {
return lastRowOffset;
} else {
return middleOffset;
}
}
case AUTO_ALIGNMENT:
default:
if (scrollTop >= minOffset && scrollTop <= maxOffset) {
return scrollTop;
} else if (minOffset > maxOffset) {
return minOffset;
} else if (scrollTop < minOffset) {
return minOffset;
} else {
return maxOffset;
}
}
},
getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max(0, Math.min(totalColumn - 1, Math.floor(scrollLeft / columnWidth))),
getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => {
const left = startIndex * columnWidth;
const visibleColumnsCount = Math.ceil((width + scrollLeft - left) / columnWidth);
return Math.max(0, Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1));
},
getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max(0, Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight))),
getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => {
const top = startIndex * rowHeight;
const numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);
return Math.max(0, Math.min(totalRow - 1, startIndex + numVisibleRows - 1));
},
initCache: () => void 0,
clearCache: true,
validateProps: ({ columnWidth, rowHeight }) => {
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/table-grid.mjs
init_shared_esm_bundler();
var COMPONENT_NAME13 = "ElTableV2Grid";
var useTableGrid = (props) => {
const headerRef = ref();
const bodyRef = ref();
const scrollLeft = ref(0);
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(() => sum(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 _a;
(_a = props.onRowsRendered) == null ? void 0 : _a.call(props, {
rowCacheStart,
rowCacheEnd,
rowVisibleStart,
rowVisibleEnd
});
}
function resetAfterRowIndex(index, forceUpdate2) {
var _a;
(_a = bodyRef.value) == null ? void 0 : _a.resetAfterRowIndex(index, forceUpdate2);
}
function scrollTo(leftOrOptions, top) {
const header$ = unref(headerRef);
const body$ = unref(bodyRef);
if (isObject(leftOrOptions)) {
header$ == null ? void 0 : header$.scrollToLeft(leftOrOptions.scrollLeft);
scrollLeft.value = leftOrOptions.scrollLeft;
body$ == null ? void 0 : body$.scrollTo(leftOrOptions);
} else {
header$ == null ? void 0 : header$.scrollToLeft(leftOrOptions);
scrollLeft.value = leftOrOptions;
body$ == null ? void 0 : body$.scrollTo({
scrollLeft: leftOrOptions,
scrollTop: top
});
}
}
function scrollToTop(scrollTop) {
var _a;
(_a = unref(bodyRef)) == null ? void 0 : _a.scrollTo({
scrollTop
});
}
function scrollToRow(row, strategy) {
var _a;
(_a = unref(bodyRef)) == null ? void 0 : _a.scrollToItem(row, 1, strategy);
}
function forceUpdate() {
var _a, _b;
(_a = unref(bodyRef)) == null ? void 0 : _a.$forceUpdate();
(_b = unref(headerRef)) == null ? void 0 : _b.$forceUpdate();
}
watch(() => props.bodyWidth, () => {
var _a;
if (isNumber(props.estimatedRowHeight))
(_a = bodyRef.value) == null ? void 0 : _a.resetAfter({
columnIndex: 0
}, false);
});
return {
bodyRef,
forceUpdate,
fixedRowHeight,
gridHeight,
hasHeader,
headerHeight,
headerRef,
totalHeight,
itemKey,
onItemRendered,
resetAfterRowIndex,
scrollTo,
scrollToTop,
scrollToRow,
scrollLeft
};
};
var TableGrid = defineComponent({
name: COMPONENT_NAME13,
props: tableV2GridProps,
setup(props, {
slots,
expose
}) {
const {
ns
} = inject(TableV2InjectionKey);
const {
bodyRef,
fixedRowHeight,
gridHeight,
hasHeader,
headerRef,
headerHeight,
totalHeight,
forceUpdate,
itemKey,
onItemRendered,
resetAfterRowIndex,
scrollTo,
scrollToTop,
scrollToRow,
scrollLeft
} = useTableGrid(props);
provide(TABLE_V2_GRID_INJECTION_KEY, scrollLeft);
onActivated(async () => {
var _a;
await nextTick();
const scrollTop = (_a = bodyRef.value) == null ? void 0 : _a.states.scrollTop;
scrollTop && scrollToTop(Math.round(scrollTop) + 1);
});
expose({
forceUpdate,
totalHeight,
scrollTo,
scrollToTop,
scrollToRow,
resetAfterRowIndex
});
const getColumnWidth = () => props.bodyWidth;
return () => {
const {
cache,
columns: columns2,
data,
fixedData,
useIsScrolling,
scrollbarAlwaysOn,
scrollbarEndGap,
scrollbarStartGap,
style,
rowHeight,
bodyWidth,
estimatedRowHeight,
headerWidth,
height,
width,
getRowHeight,
onScroll
} = props;
const isDynamicRowEnabled = isNumber(estimatedRowHeight);
const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid;
const _headerHeight = unref(headerHeight);
return createVNode("div", {
"role": "table",
"class": [ns.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": cache,
"rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight,
"width": width,
"height": unref(gridHeight),
"class": ns.e("body"),
"role": "rowgroup",
"scrollbarStartGap": scrollbarStartGap,
"scrollbarEndGap": scrollbarEndGap,
"scrollbarAlwaysOn": scrollbarAlwaysOn,
"onScroll": onScroll,
"onItemRendered": onItemRendered,
"perfMode": false
}, {
default: (params) => {
var _a;
const rowData = data[params.rowIndex];
return (_a = slots.row) == null ? void 0 : _a.call(slots, {
...params,
columns: columns2,
rowData
});
}
}), unref(hasHeader) && createVNode(Header2, {
"ref": headerRef,
"class": ns.e("header-wrapper"),
"columns": columns2,
"headerData": data,
"headerHeight": props.headerHeight,
"fixedHeaderData": fixedData,
"rowWidth": headerWidth,
"rowHeight": rowHeight,
"width": width,
"height": Math.min(_headerHeight + unref(fixedRowHeight), height)
}, {
dynamic: slots.header,
fixed: slots.row
})]);
};
}
});
var Table2 = TableGrid;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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,
...rest
} = props;
return createVNode(Table2, mergeProps({
"ref": mainTableRef
}, rest), _isSlot(slots) ? slots : {
default: () => [slots]
});
};
var MainTable$1 = MainTable;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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,
...rest
} = props;
return createVNode(Table2, mergeProps({
"ref": leftTableRef
}, rest), _isSlot2(slots) ? slots : {
default: () => [slots]
});
};
var LeftTable$1 = LeftTable;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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 RightTable = (props, {
slots
}) => {
if (!props.columns.length)
return;
const {
rightTableRef,
...rest
} = props;
return createVNode(Table2, mergeProps({
"ref": rightTableRef
}, rest), _isSlot3(slots) ? slots : {
default: () => [slots]
});
};
var RightTable$1 = RightTable;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/row.mjs
init_shared_esm_bundler();
var useTableRow = (props) => {
const {
isScrolling
} = inject(TableV2InjectionKey);
const measured = ref(false);
const rowRef = ref();
const measurable = computed(() => {
return isNumber(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 handlers = props.rowEventHandlers || {};
const eventHandlers2 = {};
Object.entries(handlers).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_NAME14 = "ElTableV2TableRow";
var TableV2Row = defineComponent({
name: COMPONENT_NAME14,
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,
"role": "row"
}, attrs, unref(eventHandlers)), [ColumnCells]);
}
return createVNode("div", mergeProps(attrs, {
"ref": rowRef,
"class": props.class,
"style": style,
"role": "row"
}, unref(eventHandlers)), [ColumnCells]);
};
}
});
var Row2 = TableV2Row;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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,
rowData,
rowIndex,
style,
isScrolling,
rowProps: rowProps2,
rowClass,
rowKey: rowKey2,
rowEventHandlers,
ns,
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 = [ns.e("row"), rowKls, ns.is("expanded", canExpand && expandedRowKeys.includes(_rowKey)), ns.is("fixed", !depth && isFixedRow), ns.is("customized", Boolean(slots.row)), {
[ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0
}];
const onRowHover = hasFixedColumns ? onRowHovered : void 0;
const _rowProps = {
...additionalProps,
columns: columns2,
columnsStyles,
class: kls,
depth,
expandColumnKey: expandColumnKey2,
estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight,
isScrolling,
rowIndex,
rowData,
rowKey: _rowKey,
rowEventHandlers,
style
};
const handlerMouseEnter = (e) => {
onRowHover == null ? void 0 : onRowHover({
hovered: true,
rowKey: _rowKey,
event: e,
rowData,
rowIndex
});
};
const handlerMouseLeave = (e) => {
onRowHover == null ? void 0 : onRowHover({
hovered: false,
rowKey: _rowKey,
event: e,
rowData,
rowIndex
});
};
return createVNode(Row2, mergeProps(_rowProps, {
"onRowExpand": onRowExpanded,
"onMouseenter": handlerMouseEnter,
"onMouseleave": handlerMouseLeave,
"rowkey": _rowKey
}), _isSlot4(slots) ? slots : {
default: () => [slots]
});
};
var Row3 = RowRenderer;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/cell.mjs
var TableV2Cell = (props, {
slots
}) => {
var _a;
const {
cellData,
style
} = props;
const displayText = ((_a = cellData == null ? void 0 : cellData.toString) == null ? void 0 : _a.call(cellData)) || "";
const defaultSlot = renderSlot(slots, "default", props, () => [displayText]);
return createVNode("div", {
"class": props.class,
"title": displayText,
"style": style
}, [defaultSlot]);
};
TableV2Cell.displayName = "ElTableV2Cell";
TableV2Cell.inheritAttrs = false;
var TableCell = TableV2Cell;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs
var ExpandIcon = (props) => {
const {
expanded,
expandable,
onExpand,
style,
size
} = props;
const expandIconProps = {
onClick: expandable ? () => onExpand(!expanded) : void 0,
class: props.class
};
return createVNode(ElIcon, mergeProps(expandIconProps, {
"size": size,
"style": style
}), {
default: () => [createVNode(arrow_right_default, null, null)]
});
};
var ExpandIcon$1 = ExpandIcon;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs
init_shared_esm_bundler();
var CellRenderer = ({
columns: columns2,
column: column2,
columnIndex,
depth,
expandIconProps,
isScrolling,
rowData,
rowIndex,
style,
expandedRowKeys,
ns,
cellProps: _cellProps,
expandColumnKey: expandColumnKey2,
indentSize,
iconSize,
rowKey: rowKey2
}, {
slots
}) => {
const cellStyle = enforceUnit(style);
if (column2.placeholderSign === placeholderSign) {
return createVNode("div", {
"class": ns.em("row-cell", "placeholder"),
"style": cellStyle
}, null);
}
const {
cellRenderer,
dataKey,
dataGetter
} = column2;
const cellData = isFunction(dataGetter) ? dataGetter({
columns: columns2,
column: column2,
columnIndex,
rowData,
rowIndex
}) : get_default(rowData, dataKey != null ? dataKey : "");
const extraCellProps = tryCall(_cellProps, {
cellData,
columns: columns2,
column: column2,
columnIndex,
rowIndex,
rowData
});
const cellProps = {
class: ns.e("cell-text"),
columns: columns2,
column: column2,
columnIndex,
cellData,
isScrolling,
rowData,
rowIndex
};
const columnCellRenderer = componentToSlot(cellRenderer);
const Cell2 = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(TableCell, cellProps, null)]);
const kls = [ns.e("row-cell"), column2.class, column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right")];
const expandable = rowIndex >= 0 && expandColumnKey2 && column2.key === expandColumnKey2;
const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey2]);
let IconOrPlaceholder;
const iconStyle = `margin-inline-start: ${depth * indentSize}px;`;
if (expandable) {
if (isObject(expandIconProps)) {
IconOrPlaceholder = createVNode(ExpandIcon$1, mergeProps(expandIconProps, {
"class": [ns.e("expand-icon"), ns.is("expanded", expanded)],
"size": iconSize,
"expanded": expanded,
"style": iconStyle,
"expandable": true
}), null);
} else {
IconOrPlaceholder = createVNode("div", {
"style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ")
}, null);
}
}
return createVNode("div", mergeProps({
"class": kls,
"style": cellStyle
}, extraCellProps, {
"role": "cell"
}), [IconOrPlaceholder, Cell2]);
};
CellRenderer.inheritAttrs = false;
var Cell = CellRenderer;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs
init_shared_esm_bundler();
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,
"role": "row"
}, [Cells]);
};
}
});
var HeaderRow = TableV2HeaderRow;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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
}, {
slots
}) => {
const param = {
columns: columns2,
headerIndex
};
const kls = [ns.e("header-row"), tryCall(headerClass, param, ""), ns.is("customized", Boolean(slots.header))];
const extraProps = {
...tryCall(headerProps, param),
columnsStyles,
class: kls,
columns: columns2,
headerIndex,
style
};
return createVNode(HeaderRow, extraProps, _isSlot5(slots) ? slots : {
default: () => [slots]
});
};
var Header3 = HeaderRenderer;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs
var HeaderCell = (props, {
slots
}) => renderSlot(slots, "default", props, () => {
var _a, _b;
return [createVNode("div", {
"class": props.class,
"title": (_a = props.column) == null ? void 0 : _a.title
}, [(_b = props.column) == null ? void 0 : _b.title])];
});
HeaderCell.displayName = "ElTableV2HeaderCell";
HeaderCell.inheritAttrs = false;
var HeaderCell$1 = HeaderCell;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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)]
});
};
var SortIcon$1 = SortIcon;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs
var HeaderCellRenderer = (props, {
slots
}) => {
const {
column: column2,
ns,
style,
onColumnSorted
} = props;
const cellStyle = enforceUnit(style);
if (column2.placeholderSign === placeholderSign) {
return createVNode("div", {
"class": ns.em("header-row-cell", "placeholder"),
"style": cellStyle
}, null);
}
const {
headerCellRenderer,
headerClass,
sortable
} = column2;
const cellProps = {
...props,
class: ns.e("header-cell-text")
};
const columnCellRenderer = componentToSlot(headerCellRenderer);
const Cell2 = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(HeaderCell$1, cellProps, null)]);
const {
sortBy,
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 === sortBy.key;
sortOrder = sorting ? sortBy.order : SortOrder.ASC;
}
const cellKls = [ns.e("header-cell"), tryCall(headerClass, props, ""), column2.align === Alignment.CENTER && ns.is("align-center"), column2.align === Alignment.RIGHT && ns.is("align-right"), sortable && ns.is("sortable")];
const cellWrapperProps = {
...tryCall(headerCellProps, props),
onClick: column2.sortable ? onColumnSorted : void 0,
class: cellKls,
style: cellStyle,
["data-key"]: column2.key
};
return createVNode("div", mergeProps(cellWrapperProps, {
"role": "columnheader"
}), [Cell2, sortable && createVNode(SortIcon$1, {
"class": [ns.e("sort-icon"), sorting && ns.is("sorting")],
"sortOrder": sortOrder
}, null)]);
};
var HeaderCell2 = HeaderCellRenderer;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs
var Footer2 = (props, {
slots
}) => {
var _a;
return createVNode("div", {
"class": props.class,
"style": props.style
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
};
Footer2.displayName = "ElTableV2Footer";
var Footer$1 = Footer2;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs
var Footer3 = (props, {
slots
}) => {
const defaultSlot = renderSlot(slots, "default", {}, () => [createVNode(ElEmpty, null, null)]);
return createVNode("div", {
"class": props.class,
"style": props.style
}, [defaultSlot]);
};
Footer3.displayName = "ElTableV2Empty";
var Empty2 = Footer3;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs
var Overlay2 = (props, {
slots
}) => {
var _a;
return createVNode("div", {
"class": props.class,
"style": props.style
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
};
Overlay2.displayName = "ElTableV2Overlay";
var Overlay$1 = Overlay2;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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_NAME15 = "ElTableV2";
var TableV2 = defineComponent({
name: COMPONENT_NAME15,
props: tableV2Props,
setup(props, {
slots,
expose
}) {
const ns = useNamespace("table-v2");
const {
columnsStyles,
fixedColumnsOnLeft,
fixedColumnsOnRight,
mainColumns,
mainTableHeight,
fixedTableHeight,
leftTableWidth,
rightTableWidth,
data,
depthMap,
expandedRowKeys,
hasFixedColumns,
mainTableRef,
leftTableRef,
rightTableRef,
isDynamic,
isResetting,
isScrolling,
bodyWidth,
emptyStyle,
rootStyle,
footerHeight,
showEmpty,
scrollTo,
scrollToLeft,
scrollToTop,
scrollToRow,
getRowHeight,
onColumnSorted,
onRowHeightChange,
onRowHovered,
onRowExpanded,
onRowsRendered,
onScroll,
onVerticalScroll
} = useTable(props);
expose({
scrollTo,
scrollToLeft,
scrollToTop,
scrollToRow
});
provide(TableV2InjectionKey, {
ns,
isResetting,
isScrolling
});
return () => {
const {
cache,
cellProps,
estimatedRowHeight,
expandColumnKey: expandColumnKey2,
fixedData,
headerHeight,
headerClass,
headerProps,
headerCellProps,
sortBy,
sortState,
rowHeight,
rowClass,
rowEventHandlers,
rowKey: rowKey2,
rowProps: rowProps2,
scrollbarAlwaysOn,
indentSize,
iconSize,
useIsScrolling,
vScrollbarSize,
width
} = props;
const _data = unref(data);
const mainTableProps = {
cache,
class: ns.e("main"),
columns: unref(mainColumns),
data: _data,
fixedData,
estimatedRowHeight,
bodyWidth: unref(bodyWidth),
headerHeight,
headerWidth: unref(bodyWidth),
height: unref(mainTableHeight),
mainTableRef,
rowKey: rowKey2,
rowHeight,
scrollbarAlwaysOn,
scrollbarStartGap: 2,
scrollbarEndGap: vScrollbarSize,
useIsScrolling,
width,
getRowHeight,
onRowsRendered,
onScroll
};
const leftColumnsWidth = unref(leftTableWidth);
const _fixedTableHeight = unref(fixedTableHeight);
const leftTableProps = {
cache,
class: ns.e("left"),
columns: unref(fixedColumnsOnLeft),
data: _data,
fixedData,
estimatedRowHeight,
leftTableRef,
rowHeight,
bodyWidth: leftColumnsWidth,
headerWidth: leftColumnsWidth,
headerHeight,
height: _fixedTableHeight,
rowKey: rowKey2,
scrollbarAlwaysOn,
scrollbarStartGap: 2,
scrollbarEndGap: vScrollbarSize,
useIsScrolling,
width: leftColumnsWidth,
getRowHeight,
onScroll: onVerticalScroll
};
const rightColumnsWidth = unref(rightTableWidth);
const rightTableProps = {
cache,
class: ns.e("right"),
columns: unref(fixedColumnsOnRight),
data: _data,
fixedData,
estimatedRowHeight,
rightTableRef,
rowHeight,
bodyWidth: rightColumnsWidth,
headerWidth: rightColumnsWidth,
headerHeight,
height: _fixedTableHeight,
rowKey: rowKey2,
scrollbarAlwaysOn,
scrollbarStartGap: 2,
scrollbarEndGap: vScrollbarSize,
width: rightColumnsWidth,
style: `${ns.cssVarName("table-scrollbar-size")}: ${vScrollbarSize}px`,
useIsScrolling,
getRowHeight,
onScroll: onVerticalScroll
};
const _columnsStyles = unref(columnsStyles);
const tableRowProps = {
ns,
depthMap: unref(depthMap),
columnsStyles: _columnsStyles,
expandColumnKey: expandColumnKey2,
expandedRowKeys: unref(expandedRowKeys),
estimatedRowHeight,
hasFixedColumns: unref(hasFixedColumns),
rowProps: rowProps2,
rowClass,
rowKey: rowKey2,
rowEventHandlers,
onRowHovered,
onRowExpanded,
onRowHeightChange
};
const tableCellProps = {
cellProps,
expandColumnKey: expandColumnKey2,
indentSize,
iconSize,
rowKey: rowKey2,
expandedRowKeys: unref(expandedRowKeys),
ns
};
const tableHeaderProps = {
ns,
headerClass,
headerProps,
columnsStyles: _columnsStyles
};
const tableHeaderCellProps = {
ns,
sortBy,
sortState,
headerCellProps,
onColumnSorted
};
const tableSlots = {
row: (props2) => createVNode(Row3, mergeProps(props2, tableRowProps), {
row: slots.row,
cell: (props3) => {
let _slot;
return slots.cell ? createVNode(Cell, mergeProps(props3, tableCellProps, {
"style": _columnsStyles[props3.column.key]
}), _isSlot6(_slot = slots.cell(props3)) ? _slot : {
default: () => [_slot]
}) : createVNode(Cell, mergeProps(props3, tableCellProps, {
"style": _columnsStyles[props3.column.key]
}), null);
}
}),
header: (props2) => createVNode(Header3, mergeProps(props2, tableHeaderProps), {
header: slots.header,
cell: (props3) => {
let _slot2;
return slots["header-cell"] ? createVNode(HeaderCell2, mergeProps(props3, tableHeaderCellProps, {
"style": _columnsStyles[props3.column.key]
}), _isSlot6(_slot2 = slots["header-cell"](props3)) ? _slot2 : {
default: () => [_slot2]
}) : createVNode(HeaderCell2, mergeProps(props3, tableHeaderCellProps, {
"style": _columnsStyles[props3.column.key]
}), null);
}
})
};
const rootKls = [props.class, ns.b(), ns.e("root"), ns.is("dynamic", unref(isDynamic))];
const footerProps = {
class: ns.e("footer"),
style: unref(footerHeight)
};
return createVNode("div", {
"class": rootKls,
"style": unref(rootStyle)
}, [createVNode(MainTable$1, mainTableProps, _isSlot6(tableSlots) ? tableSlots : {
default: () => [tableSlots]
}), createVNode(LeftTable$1, leftTableProps, _isSlot6(tableSlots) ? tableSlots : {
default: () => [tableSlots]
}), createVNode(RightTable$1, rightTableProps, _isSlot6(tableSlots) ? tableSlots : {
default: () => [tableSlots]
}), slots.footer && createVNode(Footer$1, footerProps, {
default: slots.footer
}), unref(showEmpty) && createVNode(Empty2, {
"class": ns.e("empty"),
"style": unref(emptyStyle)
}, {
default: slots.empty
}), slots.overlay && createVNode(Overlay$1, {
"class": ns.e("overlay")
}, {
default: slots.overlay
})]);
};
}
});
var TableV2$1 = TableV2;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/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 left = Number.parseInt(paddingLeft) || 0;
const right = Number.parseInt(paddingRight) || 0;
const top = Number.parseInt(paddingTop) || 0;
const bottom = Number.parseInt(paddingBottom) || 0;
width$.value = width - left - right;
height$.value = height - top - bottom;
}).stop;
});
onBeforeUnmount(() => {
resizerStopper == null ? void 0 : resizerStopper();
});
watch([width$, height$], ([width, height]) => {
var _a;
(_a = props.onResize) == null ? void 0 : _a.call(props, {
width,
height
});
});
return {
sizer,
width: width$,
height: height$
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs
var AutoResizer = defineComponent({
name: "ElAutoResizer",
props: autoResizerProps,
setup(props, {
slots
}) {
const ns = useNamespace("auto-resizer");
const {
height,
width,
sizer
} = useAutoResize(props);
const style = {
width: "100%",
height: "100%"
};
return () => {
var _a;
return createVNode("div", {
"ref": sizer,
"class": ns.b(),
"style": style
}, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
height: height.value,
width: width.value
})]);
};
}
});
var AutoResizer$1 = AutoResizer;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/table-v2/index.mjs
var ElTableV2 = withInstall(TableV2$1);
var ElAutoResizer = withInstall(AutoResizer$1);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/constants.mjs
var tabsRootContextKey = Symbol("tabsRootContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/tab-bar.mjs
var tabBarProps = buildProps({
tabs: {
type: definePropType(Array),
default: () => mutable([])
},
tabRefs: {
type: definePropType(Object),
default: () => mutable({})
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs
var COMPONENT_NAME16 = "ElTabBar";
var __default__70 = defineComponent({
name: COMPONENT_NAME16
});
var _sfc_main81 = defineComponent({
...__default__70,
props: tabBarProps,
setup(__props, { expose }) {
const props = __props;
const rootTabs = inject(tabsRootContextKey);
if (!rootTabs)
throwError(COMPONENT_NAME16, "");
const ns = 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) => {
if (isUndefined(tab.paneName))
return false;
const $el = props.tabRefs[tab.paneName];
if (!$el)
return false;
if (!tab.active) {
return true;
}
offset2 = $el[`offset${capitalize(position)}`];
tabSize = $el[`client${capitalize(sizeName)}`];
const tabStyles = window.getComputedStyle($el);
if (sizeName === "width") {
tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
offset2 += Number.parseFloat(tabStyles.paddingLeft);
}
return false;
});
return {
[sizeName]: `${tabSize}px`,
transform: `translate${capitalize(sizeDir)}(${offset2}px)`
};
};
const update = () => barStyle.value = getBarStyle();
const tabObservers = [];
const observerTabs = () => {
tabObservers.forEach((observer) => observer.stop());
tabObservers.length = 0;
Object.values(props.tabRefs).forEach((tab) => {
tabObservers.push(useResizeObserver(tab, update));
});
};
watch(() => props.tabs, async () => {
await nextTick();
update();
observerTabs();
}, { immediate: true });
const barObserver = useResizeObserver(barRef, () => update());
onBeforeUnmount(() => {
tabObservers.forEach((observer) => observer.stop());
tabObservers.length = 0;
barObserver.stop();
});
expose({
ref: barRef,
update
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "barRef",
ref: barRef,
class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
style: normalizeStyle(barStyle.value)
}, null, 6);
};
}
});
var TabBar = _export_sfc(_sfc_main81, [["__file", "tab-bar.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/tab-nav.mjs
var tabNavProps = buildProps({
panes: {
type: definePropType(Array),
default: () => mutable([])
},
currentName: {
type: [String, Number],
default: ""
},
editable: Boolean,
type: {
type: String,
values: ["card", "border-card", ""],
default: ""
},
stretch: Boolean,
tabindex: {
type: [String, Number],
default: void 0
}
});
var tabNavEmits = {
tabClick: (tab, tabName, ev) => ev instanceof Event,
tabRemove: (tab, ev) => ev instanceof Event
};
var COMPONENT_NAME17 = "ElTabNav";
var TabNav = defineComponent({
name: COMPONENT_NAME17,
props: tabNavProps,
emits: tabNavEmits,
setup(props, {
expose,
emit
}) {
const rootTabs = inject(tabsRootContextKey);
if (!rootTabs)
throwError(COMPONENT_NAME17, ``);
const ns = useNamespace("tabs");
const visibility = useDocumentVisibility();
const focused = useWindowFocus();
const navScroll$ = ref();
const nav$ = ref();
const el$ = ref();
const tabRefsMap = ref({});
const tabBarRef = ref();
const scrollable = ref(false);
const navOffset = ref(0);
const isFocus = ref(false);
const focusable = ref(true);
const tracker = shallowRef();
const isHorizontal = computed(() => ["top", "bottom"].includes(rootTabs.props.tabPosition));
const sizeName = computed(() => isHorizontal.value ? "width" : "height");
const navStyle = computed(() => {
const dir = sizeName.value === "width" ? "X" : "Y";
return {
transform: `translate${dir}(-${navOffset.value}px)`
};
});
const {
width: navContainerWidth,
height: navContainerHeight
} = useElementSize(navScroll$);
const {
width: navWidth,
height: navHeight
} = useElementSize(nav$, {
width: 0,
height: 0
}, {
box: "border-box"
});
const navContainerSize = computed(() => isHorizontal.value ? navContainerWidth.value : navContainerHeight.value);
const navSize = computed(() => isHorizontal.value ? navWidth.value : navHeight.value);
const {
onWheel
} = useWheel({
atStartEdge: computed(() => navOffset.value <= 0),
atEndEdge: computed(() => navSize.value - navOffset.value <= navContainerSize.value),
layout: computed(() => isHorizontal.value ? "horizontal" : "vertical")
}, (offset2) => {
navOffset.value = clamp_default(navOffset.value + offset2, 0, navSize.value - navContainerSize.value);
});
const scrollPrev = () => {
if (!navScroll$.value)
return;
const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
const currentOffset = navOffset.value;
if (!currentOffset)
return;
const newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0;
navOffset.value = newOffset;
};
const scrollNext = () => {
if (!navScroll$.value || !nav$.value)
return;
const navSize2 = nav$.value[`offset${capitalize(sizeName.value)}`];
const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
const currentOffset = navOffset.value;
if (navSize2 - currentOffset <= containerSize)
return;
const newOffset = navSize2 - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize2 - containerSize;
navOffset.value = newOffset;
};
const scrollToActiveTab = async () => {
const nav = nav$.value;
if (!scrollable.value || !el$.value || !navScroll$.value || !nav)
return;
await nextTick();
const activeTab = tabRefsMap.value[props.currentName];
if (!activeTab)
return;
const navScroll = navScroll$.value;
const activeTabBounding = activeTab.getBoundingClientRect();
const navScrollBounding = navScroll.getBoundingClientRect();
const maxOffset = isHorizontal.value ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
const currentOffset = navOffset.value;
let newOffset = currentOffset;
if (isHorizontal.value) {
if (activeTabBounding.left < navScrollBounding.left) {
newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
}
if (activeTabBounding.right > navScrollBounding.right) {
newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
}
} else {
if (activeTabBounding.top < navScrollBounding.top) {
newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
}
if (activeTabBounding.bottom > navScrollBounding.bottom) {
newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
}
}
newOffset = Math.max(newOffset, 0);
navOffset.value = Math.min(newOffset, maxOffset);
};
const update = () => {
var _a;
if (!nav$.value || !navScroll$.value)
return;
props.stretch && ((_a = tabBarRef.value) == null ? void 0 : _a.update());
const navSize2 = nav$.value[`offset${capitalize(sizeName.value)}`];
const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
const currentOffset = navOffset.value;
if (containerSize < navSize2) {
scrollable.value = scrollable.value || {};
scrollable.value.prev = currentOffset;
scrollable.value.next = currentOffset + containerSize < navSize2;
if (navSize2 - currentOffset < containerSize) {
navOffset.value = navSize2 - containerSize;
}
} else {
scrollable.value = false;
if (currentOffset > 0) {
navOffset.value = 0;
}
}
};
const changeTab = (event) => {
const code = getEventCode(event);
let step = 0;
switch (code) {
case EVENT_CODE.left:
case EVENT_CODE.up:
step = -1;
break;
case EVENT_CODE.right:
case EVENT_CODE.down:
step = 1;
break;
default:
return;
}
const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
const currentIndex = tabList.indexOf(event.target);
let nextIndex = currentIndex + step;
if (nextIndex < 0) {
nextIndex = tabList.length - 1;
} else if (nextIndex >= tabList.length) {
nextIndex = 0;
}
tabList[nextIndex].focus({
preventScroll: true
});
tabList[nextIndex].click();
setFocus();
};
const setFocus = () => {
if (focusable.value)
isFocus.value = true;
};
const removeFocus = () => isFocus.value = false;
const setRefs = (el, key) => {
tabRefsMap.value[key] = el;
};
const focusActiveTab = async () => {
await nextTick();
const activeTab = tabRefsMap.value[props.currentName];
activeTab == null ? void 0 : activeTab.focus({
preventScroll: true
});
};
watch(visibility, (visibility2) => {
if (visibility2 === "hidden") {
focusable.value = false;
} else if (visibility2 === "visible") {
setTimeout(() => focusable.value = true, 50);
}
});
watch(focused, (focused2) => {
if (focused2) {
setTimeout(() => focusable.value = true, 50);
} else {
focusable.value = false;
}
});
useResizeObserver(el$, update);
onMounted(() => setTimeout(() => scrollToActiveTab(), 0));
onUpdated(() => update());
expose({
scrollToActiveTab,
removeFocus,
focusActiveTab,
tabListRef: nav$,
tabBarRef,
scheduleRender: () => triggerRef(tracker)
});
return () => {
const scrollBtn = scrollable.value ? [createVNode("span", {
"class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)],
"onClick": scrollPrev
}, [createVNode(ElIcon, null, {
default: () => [createVNode(arrow_left_default, null, null)]
})]), createVNode("span", {
"class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)],
"onClick": scrollNext
}, [createVNode(ElIcon, null, {
default: () => [createVNode(arrow_right_default, null, null)]
})])] : null;
const tabs = props.panes.map((pane, index) => {
var _a, _b, _c, _d, _e;
const uid2 = pane.uid;
const disabled = pane.props.disabled;
const tabName = (_b = (_a = pane.props.name) != null ? _a : pane.index) != null ? _b : `${index}`;
const closable = !disabled && (pane.isClosable || pane.props.closable !== false && 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 ? (_e = props.tabindex) != null ? _e : rootTabs.props.tabindex : -1;
return createVNode("div", {
"ref": (el) => setRefs(el, tabName),
"class": [ns.e("item"), ns.is(rootTabs.props.tabPosition), ns.is("active", pane.active), ns.is("disabled", disabled), ns.is("closable", closable), ns.is("focus", isFocus.value)],
"id": `tab-${tabName}`,
"key": `tab-${uid2}`,
"aria-controls": `pane-${tabName}`,
"role": "tab",
"aria-selected": pane.active,
"tabindex": tabindex,
"onFocus": () => setFocus(),
"onBlur": () => removeFocus(),
"onClick": (ev) => {
removeFocus();
emit("tabClick", pane, tabName, ev);
},
"onKeydown": (ev) => {
const code = getEventCode(ev);
if (closable && (code === EVENT_CODE.delete || code === EVENT_CODE.backspace)) {
emit("tabRemove", pane, ev);
}
}
}, [...[tabLabelContent, btnClose]]);
});
tracker.value;
return createVNode("div", {
"ref": el$,
"class": [ns.e("nav-wrap"), ns.is("scrollable", !!scrollable.value), ns.is(rootTabs.props.tabPosition)]
}, [scrollBtn, createVNode("div", {
"class": ns.e("nav-scroll"),
"ref": navScroll$
}, [props.panes.length > 0 ? createVNode("div", {
"class": [ns.e("nav"), ns.is(rootTabs.props.tabPosition), ns.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))],
"ref": nav$,
"style": navStyle.value,
"role": "tablist",
"onKeydown": changeTab,
"onWheel": onWheel
}, [...[!props.type ? createVNode(TabBar, {
"ref": tabBarRef,
"tabs": [...props.panes],
"tabRefs": tabRefsMap.value
}, null) : null, tabs]]) : null])]);
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/tabs.mjs
init_shared_esm_bundler();
var tabsProps = buildProps({
type: {
type: String,
values: ["card", "border-card", ""],
default: ""
},
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,
tabindex: {
type: [String, Number],
default: 0
}
});
var isPaneName = (value) => isString(value) || isNumber(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 _a;
const ns = useNamespace("tabs");
const isVertical = computed(() => ["left", "right"].includes(props.tabPosition));
const {
children: panes,
addChild: registerPane,
removeChild: unregisterPane,
ChildrenSorter: PanesSorter
} = useOrderedChildren(getCurrentInstance(), "ElTabPane");
const nav$ = ref();
const currentName = ref((_a = props.modelValue) != null ? _a : "0");
const setCurrentName = async (value, trigger = false) => {
var _a2, _b, _c, _d;
if (currentName.value === value || isUndefined(value))
return;
try {
let canLeave;
if (props.beforeLeave) {
const result = props.beforeLeave(value, currentName.value);
canLeave = result instanceof Promise ? await result : result;
} else {
canLeave = true;
}
if (canLeave !== false) {
const isFocusInsidePane = (_a2 = panes.value.find((item) => item.paneName === currentName.value)) == null ? void 0 : _a2.isFocusInsidePane();
currentName.value = value;
if (trigger) {
emit(UPDATE_MODEL_EVENT, value);
emit("tabChange", value);
}
(_c = (_b = nav$.value) == null ? void 0 : _b.removeFocus) == null ? void 0 : _c.call(_b);
if (isFocusInsidePane) {
(_d = nav$.value) == null ? void 0 : _d.focusActiveTab();
}
}
} catch (e) {
}
};
const handleTabClick = (tab, tabName, event) => {
if (tab.props.disabled)
return;
emit("tabClick", tab, event);
setCurrentName(tabName, true);
};
const handleTabRemove = (pane, ev) => {
if (pane.props.disabled || isUndefined(pane.props.name))
return;
ev.stopPropagation();
emit("edit", pane.props.name, "remove");
emit("tabRemove", pane.props.name);
};
const handleTabAdd = () => {
emit("edit", void 0, "add");
emit("tabAdd");
};
const handleKeydown = (event) => {
const code = getEventCode(event);
if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter].includes(code))
handleTabAdd();
};
const swapChildren = (vnode) => {
const actualFirstChild = vnode.el.firstChild;
const firstChild = ["bottom", "right"].includes(props.tabPosition) ? vnode.children[0].el : vnode.children[1].el;
if (actualFirstChild !== firstChild) {
actualFirstChild.before(firstChild);
}
};
watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue));
watch(currentName, async () => {
var _a2;
await nextTick();
(_a2 = nav$.value) == null ? void 0 : _a2.scrollToActiveTab();
});
provide(tabsRootContextKey, {
props,
currentName,
registerPane,
unregisterPane,
nav$
});
expose({
currentName,
get tabNavRef() {
return omit_default(nav$.value, ["scheduleRender"]);
}
});
return () => {
const addSlot = slots["add-icon"];
const newButton = props.editable || props.addable ? createVNode("div", {
"class": [ns.e("new-tab"), isVertical.value && ns.e("new-tab-vertical")],
"tabindex": props.tabindex,
"onClick": handleTabAdd,
"onKeydown": handleKeydown
}, [addSlot ? renderSlot(slots, "add-icon") : createVNode(ElIcon, {
"class": ns.is("icon-plus")
}, {
default: () => [createVNode(plus_default, null, null)]
})]) : null;
const tabNav = () => createVNode(TabNav, {
"ref": nav$,
"currentName": currentName.value,
"editable": props.editable,
"type": props.type,
"panes": panes.value,
"stretch": props.stretch,
"onTabClick": handleTabClick,
"onTabRemove": handleTabRemove
}, null);
const header = createVNode("div", {
"class": [ns.e("header"), isVertical.value && ns.e("header-vertical"), ns.is(props.tabPosition)]
}, [createVNode(PanesSorter, null, {
default: tabNav,
$stable: true
}), newButton]);
const panels = createVNode("div", {
"class": ns.e("content")
}, [renderSlot(slots, "default")]);
return createVNode("div", {
"class": [ns.b(), ns.m(props.tabPosition), {
[ns.m("card")]: props.type === "card",
[ns.m("border-card")]: props.type === "border-card"
}],
"onVnodeMounted": swapChildren,
"onVnodeUpdated": swapChildren
}, [panels, header]);
};
}
});
var Tabs$1 = Tabs;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs
var tabPaneProps = buildProps({
label: {
type: String,
default: ""
},
name: {
type: [String, Number]
},
closable: {
type: Boolean,
default: void 0
},
disabled: Boolean,
lazy: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/src/tab-pane.mjs
var COMPONENT_NAME18 = "ElTabPane";
var __default__71 = defineComponent({
name: COMPONENT_NAME18
});
var _sfc_main82 = defineComponent({
...__default__71,
props: tabPaneProps,
setup(__props) {
const props = __props;
const instance = getCurrentInstance();
const slots = useSlots();
const tabsRoot = inject(tabsRootContextKey);
if (!tabsRoot)
throwError(COMPONENT_NAME18, "usage: ");
const ns = useNamespace("tab-pane");
const paneRef = ref();
const index = ref();
const isClosable = computed(() => {
var _a;
return (_a = props.closable) != null ? _a : tabsRoot.props.closable;
});
const active = computedEager(() => {
var _a;
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
});
const loaded = ref(active.value);
const paneName = computed(() => {
var _a;
return (_a = props.name) != null ? _a : index.value;
});
const shouldBeRender = computedEager(() => !props.lazy || loaded.value || active.value);
const isFocusInsidePane = () => {
var _a;
return (_a = paneRef.value) == null ? void 0 : _a.contains(document.activeElement);
};
watch(active, (val) => {
if (val)
loaded.value = true;
});
const pane = reactive({
uid: instance.uid,
getVnode: () => instance.vnode,
slots,
props,
paneName,
active,
index,
isClosable,
isFocusInsidePane
});
tabsRoot.registerPane(pane);
onBeforeUnmount(() => {
tabsRoot.unregisterPane(pane);
});
onBeforeUpdate(() => {
var _a;
if (slots.label)
(_a = tabsRoot.nav$.value) == null ? void 0 : _a.scheduleRender();
});
return (_ctx, _cache) => {
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
key: 0,
id: `pane-${unref(paneName)}`,
ref_key: "paneRef",
ref: paneRef,
class: normalizeClass(unref(ns).b()),
role: "tabpanel",
"aria-hidden": !unref(active),
"aria-labelledby": `tab-${unref(paneName)}`
}, [
renderSlot(_ctx.$slots, "default")
], 10, ["id", "aria-hidden", "aria-labelledby"])), [
[vShow, unref(active)]
]) : createCommentVNode("v-if", true);
};
}
});
var TabPane = _export_sfc(_sfc_main82, [["__file", "tab-pane.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tabs/index.mjs
var ElTabs = withInstall(Tabs$1, {
TabPane
});
var ElTabPane = withNoopInstall(TabPane);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/time-select/src/time-select.mjs
var import_dayjs3 = __toESM(require_dayjs_min(), 1);
var import_customParseFormat = __toESM(require_customParseFormat(), 1);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/time-select/src/time-select2.mjs
var timeSelectProps = buildProps({
format: {
type: String,
default: "HH:mm"
},
modelValue: {
type: definePropType(String)
},
disabled: Boolean,
editable: {
type: Boolean,
default: true
},
effect: {
type: definePropType(String),
default: "light"
},
clearable: {
type: Boolean,
default: true
},
size: useSizeProp,
placeholder: String,
start: {
type: String,
default: "09:00"
},
end: {
type: String,
default: "18:00"
},
step: {
type: String,
default: "00:30"
},
minTime: {
type: definePropType(String)
},
maxTime: {
type: definePropType(String)
},
includeEndTime: Boolean,
name: String,
prefixIcon: {
type: definePropType([String, Object]),
default: () => clock_default
},
clearIcon: {
type: definePropType([String, Object]),
default: () => circle_close_default
},
popperClass: {
type: String,
default: ""
},
popperStyle: {
type: definePropType([String, Object])
},
...useEmptyValuesProps
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/time-select/src/utils.mjs
var parseTime = (time) => {
const values = (time || "").split(":");
if (values.length >= 2) {
let hours = Number.parseInt(values[0], 10);
const minutes = Number.parseInt(values[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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/time-select/src/time-select.mjs
var __default__72 = defineComponent({
name: "ElTimeSelect"
});
var _sfc_main83 = defineComponent({
...__default__72,
props: timeSelectProps,
emits: [CHANGE_EVENT, "blur", "focus", "clear", UPDATE_MODEL_EVENT],
setup(__props, { expose }) {
const props = __props;
import_dayjs3.default.extend(import_customParseFormat.default);
const { Option: ElOption2 } = ElSelect;
const nsInput = useNamespace("input");
const select = ref();
const _disabled = useFormDisabled();
const { lang } = useLocale();
const value = computed(() => props.modelValue);
const start = computed(() => {
const time = parseTime(props.start);
return time ? formatTime2(time) : null;
});
const end = 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(() => {
var _a;
const result = [];
const push = (formattedValue, rawValue) => {
result.push({
value: formattedValue,
disabled: compareTime(rawValue, minTime.value || "-1:-1") <= 0 || compareTime(rawValue, maxTime.value || "100:100") >= 0
});
};
if (props.start && props.end && props.step) {
let current = start.value;
let currentTime;
while (current && end.value && compareTime(current, end.value) <= 0) {
currentTime = (0, import_dayjs3.default)(current, "HH:mm").locale(lang.value).format(props.format);
push(currentTime, current);
current = nextTime(current, step.value);
}
if (props.includeEndTime && end.value && ((_a = result[result.length - 1]) == null ? void 0 : _a.value) !== end.value) {
const formattedValue = (0, import_dayjs3.default)(end.value, "HH:mm").locale(lang.value).format(props.format);
push(formattedValue, end.value);
}
}
return result;
});
const blur = () => {
var _a, _b;
(_b = (_a = select.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
};
const focus = () => {
var _a, _b;
(_b = (_a = select.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
};
expose({
blur,
focus
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ElSelect), {
ref_key: "select",
ref: select,
"model-value": 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,
"empty-values": _ctx.emptyValues,
"value-on-clear": _ctx.valueOnClear,
"popper-class": _ctx.popperClass,
"popper-style": _ctx.popperStyle,
"onUpdate:modelValue": (event) => _ctx.$emit(unref(UPDATE_MODEL_EVENT), event),
onChange: (event) => _ctx.$emit(unref(CHANGE_EVENT), event),
onBlur: (event) => _ctx.$emit("blur", event),
onFocus: (event) => _ctx.$emit("focus", event),
onClear: () => _ctx.$emit("clear")
}, {
prefix: withCtx(() => [
_ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(nsInput).e("prefix-icon"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
]),
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(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", "empty-values", "value-on-clear", "popper-class", "popper-style", "onUpdate:modelValue", "onChange", "onBlur", "onFocus", "onClear"]);
};
}
});
var TimeSelect = _export_sfc(_sfc_main83, [["__file", "time-select.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/time-select/index.mjs
var ElTimeSelect = withInstall(TimeSelect);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/timeline/src/tokens.mjs
var TIMELINE_INJECTION_KEY = "timeline";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/timeline/src/timeline.mjs
var Timeline = defineComponent({
name: "ElTimeline",
setup(_2, { slots }) {
const ns = useNamespace("timeline");
provide(TIMELINE_INJECTION_KEY, slots);
return () => {
return h("ul", { class: [ns.b()] }, [renderSlot(slots, "default")]);
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/timeline/src/timeline-item.mjs
var timelineItemProps = buildProps({
timestamp: {
type: String,
default: ""
},
hideTimestamp: Boolean,
center: Boolean,
placement: {
type: String,
values: ["top", "bottom"],
default: "bottom"
},
type: {
type: String,
values: ["primary", "success", "warning", "danger", "info"],
default: ""
},
color: {
type: String,
default: ""
},
size: {
type: String,
values: ["normal", "large"],
default: "normal"
},
icon: {
type: iconPropType
},
hollow: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs
var __default__73 = defineComponent({
name: "ElTimelineItem"
});
var _sfc_main84 = defineComponent({
...__default__73,
props: timelineItemProps,
setup(__props) {
const props = __props;
const ns = useNamespace("timeline-item");
const defaultNodeKls = computed(() => [
ns.e("node"),
ns.em("node", props.size || ""),
ns.em("node", props.type || ""),
ns.is("hollow", props.hollow)
]);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("li", {
class: normalizeClass([unref(ns).b(), { [unref(ns).e("center")]: _ctx.center }])
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("tail"))
}, null, 2),
!_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(defaultNodeKls)),
style: normalizeStyle({
backgroundColor: _ctx.color
})
}, [
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(ns).e("icon"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 6)) : createCommentVNode("v-if", true),
_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("dot"))
}, [
renderSlot(_ctx.$slots, "dot")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("wrapper"))
}, [
!_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")])
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("content"))
}, [
renderSlot(_ctx.$slots, "default")
], 2),
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")])
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true)
], 2)
], 2);
};
}
});
var TimelineItem = _export_sfc(_sfc_main84, [["__file", "timeline-item.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/timeline/index.mjs
var ElTimeline = withInstall(Timeline, {
TimelineItem
});
var ElTimelineItem = withNoopInstall(TimelineItem);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/src/transfer.mjs
init_shared_esm_bundler();
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, direction, movedKeys) => [value, movedKeys].every(isArray) && ["left", "right"].includes(direction),
[UPDATE_MODEL_EVENT]: (value) => isArray(value),
[LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
[RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/src/transfer-panel2.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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs
init_shared_esm_bundler();
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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs
var __default__74 = defineComponent({
name: "ElTransferPanel"
});
var _sfc_main85 = defineComponent({
...__default__74,
props: transferPanelProps,
emits: transferPanelEmits,
setup(__props, { expose, emit }) {
const props = __props;
const slots = useSlots();
const OptionContent = ({ option }) => option;
const { t } = useLocale();
const ns = useNamespace("transfer");
const panelState = reactive({
checked: [],
allChecked: false,
query: "",
checkChangeByUser: true
});
const propsAlias = usePropsAlias(props);
const {
filteredData,
checkedSummary,
isIndeterminate,
handleAllCheckedChange
} = useCheck(props, panelState, emit);
const hasNoMatch = computed(() => !isEmpty(panelState.query) && isEmpty(filteredData.value));
const hasFooter = computed(() => !isEmpty(slots.default()[0].children));
const { checked, allChecked, query } = toRefs(panelState);
expose({
query
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).b("panel"))
}, [
createBaseVNode("p", {
class: normalizeClass(unref(ns).be("panel", "header"))
}, [
createVNode(unref(ElCheckbox), {
modelValue: unref(allChecked),
"onUpdate:modelValue": ($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", "onUpdate:modelValue", "indeterminate", "onChange"])
], 2),
createBaseVNode("div", {
class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", unref(hasFooter))])
}, [
_ctx.filterable ? (openBlock(), createBlock(unref(ElInput), {
key: 0,
modelValue: unref(query),
"onUpdate:modelValue": ($event) => isRef(query) ? query.value = $event : null,
class: normalizeClass(unref(ns).be("panel", "filter")),
size: "default",
placeholder: _ctx.placeholder,
"prefix-icon": unref(search_default),
clearable: "",
"validate-event": false
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder", "prefix-icon"])) : createCommentVNode("v-if", true),
withDirectives(createVNode(unref(ElCheckboxGroup), {
modelValue: unref(checked),
"onUpdate:modelValue": ($event) => isRef(checked) ? checked.value = $event : null,
"validate-event": false,
class: normalizeClass([unref(ns).is("filterable", _ctx.filterable), unref(ns).be("panel", "list")])
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => {
return openBlock(), createBlock(unref(ElCheckbox), {
key: item[unref(propsAlias).key],
class: normalizeClass(unref(ns).be("panel", "item")),
value: item[unref(propsAlias).key],
disabled: item[unref(propsAlias).disabled],
"validate-event": false
}, {
default: withCtx(() => {
var _a;
return [
createVNode(OptionContent, {
option: (_a = _ctx.optionRender) == null ? void 0 : _a.call(_ctx, item)
}, null, 8, ["option"])
];
}),
_: 2
}, 1032, ["class", "value", "disabled"]);
}), 128))
]),
_: 1
}, 8, ["modelValue", "onUpdate:modelValue", "class"]), [
[vShow, !unref(hasNoMatch) && !unref(isEmpty)(_ctx.data)]
]),
withDirectives(createBaseVNode("div", {
class: normalizeClass(unref(ns).be("panel", "empty"))
}, [
renderSlot(_ctx.$slots, "empty", {}, () => [
createTextVNode(toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 1)
])
], 2), [
[vShow, unref(hasNoMatch) || unref(isEmpty)(_ctx.data)]
])
], 2),
unref(hasFooter) ? (openBlock(), createElementBlock("p", {
key: 0,
class: normalizeClass(unref(ns).be("panel", "footer"))
}, [
renderSlot(_ctx.$slots, "default")
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var TransferPanel = _export_sfc(_sfc_main85, [["__file", "transfer-panel.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs
var useMove = (props, checkedState, emit) => {
const propsAlias = usePropsAlias(props);
const _emit = (value, direction, movedKeys) => {
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value, direction, 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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/src/transfer2.mjs
var __default__75 = defineComponent({
name: "ElTransfer"
});
var _sfc_main86 = defineComponent({
...__default__75,
props: transferProps,
emits: transferEmits,
setup(__props, { expose, emit }) {
const props = __props;
const slots = useSlots();
const { t } = useLocale();
const ns = 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 _a;
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
}
});
const optionRender = computed(() => (option) => {
var _a;
if (props.renderContent)
return props.renderContent(h, option);
const defaultSlotVNodes = (((_a = slots.default) == null ? void 0 : _a.call(slots, { option })) || []).filter((node) => node.type !== Comment);
if (defaultSlotVNodes.length) {
return defaultSlotVNodes;
}
return h("span", option[propsAlias.value.label] || option[propsAlias.value.key]);
});
expose({
clearQuery,
leftPanel,
rightPanel
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).b())
}, [
createVNode(TransferPanel, {
ref_key: "leftPanel",
ref: leftPanel,
data: unref(sourceData),
"option-render": 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)
}, {
empty: withCtx(() => [
renderSlot(_ctx.$slots, "left-empty")
]),
default: withCtx(() => [
renderSlot(_ctx.$slots, "left-footer")
]),
_: 3
}, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "onCheckedChange"]),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("buttons"))
}, [
createVNode(unref(ElButton), {
type: "primary",
class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", unref(hasButtonTexts))]),
disabled: unref(isEmpty)(checkedState.rightChecked),
onClick: unref(addToLeft)
}, {
default: withCtx(() => [
createVNode(unref(ElIcon), null, {
default: withCtx(() => [
createVNode(unref(arrow_left_default))
]),
_: 1
}),
!unref(isUndefined)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock("span", { key: 0 }, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true)
]),
_: 1
}, 8, ["class", "disabled", "onClick"]),
createVNode(unref(ElButton), {
type: "primary",
class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", unref(hasButtonTexts))]),
disabled: unref(isEmpty)(checkedState.leftChecked),
onClick: unref(addToRight)
}, {
default: withCtx(() => [
!unref(isUndefined)(_ctx.buttonTexts[1]) ? (openBlock(), createElementBlock("span", { key: 0 }, 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)
}, {
empty: withCtx(() => [
renderSlot(_ctx.$slots, "right-empty")
]),
default: withCtx(() => [
renderSlot(_ctx.$slots, "right-footer")
]),
_: 3
}, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "onCheckedChange"])
], 2);
};
}
});
var Transfer = _export_sfc(_sfc_main86, [["__file", "transfer.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/transfer/index.mjs
var ElTransfer = withInstall(Transfer);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs
var ROOT_TREE_INJECTION_KEY2 = Symbol();
var EMPTY_NODE = {
key: -1,
level: -1,
data: {}
};
var TreeOptionsEnum = ((TreeOptionsEnum2) => {
TreeOptionsEnum2["KEY"] = "id";
TreeOptionsEnum2["LABEL"] = "label";
TreeOptionsEnum2["CHILDREN"] = "children";
TreeOptionsEnum2["DISABLED"] = "disabled";
TreeOptionsEnum2["CLASS"] = "";
return TreeOptionsEnum2;
})(TreeOptionsEnum || {});
var SetOperationEnum = ((SetOperationEnum2) => {
SetOperationEnum2["ADD"] = "add";
SetOperationEnum2["DELETE"] = "delete";
return SetOperationEnum2;
})(SetOperationEnum || {});
var itemSize = {
type: Number,
default: 26
};
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",
class: ""
/* CLASS */
})
},
highlightCurrent: Boolean,
showCheckbox: Boolean,
defaultCheckedKeys: {
type: definePropType(Array),
default: () => mutable([])
},
checkStrictly: Boolean,
defaultExpandedKeys: {
type: definePropType(Array),
default: () => mutable([])
},
indent: {
type: Number,
default: 16
},
itemSize,
icon: {
type: iconPropType
},
expandOnClickNode: {
type: Boolean,
default: true
},
checkOnClickNode: Boolean,
checkOnClickLeaf: {
type: Boolean,
default: true
},
currentNodeKey: {
type: definePropType([String, Number])
},
accordion: Boolean,
filterMethod: {
type: definePropType(Function)
},
perfMode: {
type: Boolean,
default: true
},
scrollbarAlwaysOn: Boolean
});
var treeNodeProps = buildProps({
node: {
type: definePropType(Object),
default: () => mutable(EMPTY_NODE)
},
expanded: Boolean,
checked: Boolean,
indeterminate: Boolean,
showCheckbox: Boolean,
disabled: Boolean,
current: Boolean,
hiddenExpandIcon: Boolean,
itemSize
});
var treeNodeContentProps = buildProps({
node: {
type: definePropType(Object),
required: true
}
});
var NODE_CLICK = "node-click";
var NODE_DROP = "node-drop";
var NODE_EXPAND = "node-expand";
var NODE_COLLAPSE = "node-collapse";
var CURRENT_CHANGE = "current-change";
var NODE_CHECK = "check";
var NODE_CHECK_CHANGE = "check-change";
var NODE_CONTEXTMENU = "node-contextmenu";
var treeEmits2 = {
[NODE_CLICK]: (data, node, e) => data && node && e,
[NODE_DROP]: (data, node, e) => data && node && e,
[NODE_EXPAND]: (data, node) => data && node,
[NODE_COLLAPSE]: (data, node) => data && node,
[CURRENT_CHANGE]: (data, node) => data && node,
[NODE_CHECK]: (data, checkedInfo) => data && checkedInfo,
[NODE_CHECK_CHANGE]: (data, checked) => data && isBoolean(checked),
[NODE_CONTEXTMENU]: (evt, data, node) => evt && data && node
};
var treeNodeEmits = {
click: (node, e) => !!(node && e),
drop: (node, e) => !!(node && e),
toggle: (node) => !!node,
check: (node, checked) => node && isBoolean(checked)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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, immediateUpdate = 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);
if (immediateUpdate) {
updateCheckedKeys();
}
if (nodeClick) {
afterNodeCheck(node, isChecked2);
}
};
const afterNodeCheck = (node, checked) => {
const { checkedNodes, checkedKeys: checkedKeys2 } = getChecked();
const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked();
emit(NODE_CHECK, node.data, {
checkedKeys: checkedKeys2,
checkedNodes,
halfCheckedKeys,
halfCheckedNodes
});
emit(NODE_CHECK_CHANGE, node.data, checked);
};
function getCheckedKeys(leafOnly = false) {
return getChecked(leafOnly).checkedKeys;
}
function getCheckedNodes(leafOnly = false) {
return getChecked(leafOnly).checkedNodes;
}
function getHalfCheckedKeys() {
return getHalfChecked().halfCheckedKeys;
}
function getHalfCheckedNodes() {
return getHalfChecked().halfCheckedNodes;
}
function getChecked(leafOnly = false) {
const checkedNodes = [];
const keys = [];
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)) {
keys.push(key);
checkedNodes.push(node.data);
}
});
}
return {
checkedKeys: keys,
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(keys) {
checkedKeys.value.clear();
indeterminateKeys.value.clear();
nextTick(() => {
_setCheckedKeys(keys);
});
}
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(keys) {
if (tree == null ? void 0 : tree.value) {
const { treeNodeMap } = tree.value;
if (props.showCheckbox && treeNodeMap && (keys == null ? void 0 : keys.length) > 0) {
for (const key of keys) {
const node = treeNodeMap.get(key);
if (node && !isChecked(node)) {
toggleCheckbox(node, true, false, false);
}
}
updateCheckedKeys();
}
}
}
return {
updateCheckedKeys,
toggleCheckbox,
isChecked,
isIndeterminate,
getCheckedKeys,
getCheckedNodes,
getHalfCheckedKeys,
getHalfCheckedNodes,
setChecked,
setCheckedKeys
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs
init_shared_esm_bundler();
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 _a;
if (!filterable.value) {
return;
}
const expandKeySet = /* @__PURE__ */ new Set();
const hiddenExpandIconKeys = hiddenExpandIconKeySet.value;
const hiddenKeys = hiddenNodeKeySet.value;
const family = [];
const nodes = ((_a = tree.value) == null ? void 0 : _a.treeNodes) || [];
const filter = props.filterMethod;
hiddenKeys.clear();
function traverse(nodes2) {
nodes2.forEach((node) => {
family.push(node);
if (filter == null ? void 0 : filter(query, node.data, node)) {
family.forEach((member) => {
expandKeySet.add(member.key);
member.expanded = true;
});
} else {
node.expanded = false;
if (node.isLeaf) {
hiddenKeys.add(node.key);
}
}
const children = node.children;
if (children) {
traverse(children);
}
if (!node.isLeaf) {
if (!expandKeySet.has(node.key)) {
hiddenKeys.add(node.key);
} else if (children) {
let allHidden = true;
for (const childNode of children) {
if (!hiddenKeys.has(childNode.key)) {
allHidden = false;
break;
}
}
if (allHidden) {
hiddenExpandIconKeys.add(node.key);
} else {
hiddenExpandIconKeys.delete(node.key);
}
}
}
family.pop();
});
}
traverse(nodes);
return expandKeySet;
}
function isForceHiddenExpandIcon(node) {
return hiddenExpandIconKeySet.value.has(node.key);
}
return {
hiddenExpandIconKeySet,
hiddenNodeKeySet,
doFilter,
isForceHiddenExpandIcon
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs
init_shared_esm_bundler();
function useTree2(props, emit) {
const expandedKeySet = ref(/* @__PURE__ */ new Set());
const currentKey = ref();
const tree = shallowRef();
const listRef = ref();
const {
isIndeterminate,
isChecked,
toggleCheckbox,
getCheckedKeys,
getCheckedNodes,
getHalfCheckedKeys,
getHalfCheckedNodes,
setChecked,
setCheckedKeys
} = useCheck2(props, tree);
const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree);
const valueKey = computed(() => {
var _a;
return ((_a = props.props) == null ? void 0 : _a.value) || TreeOptionsEnum.KEY;
});
const childrenKey = computed(() => {
var _a;
return ((_a = props.props) == null ? void 0 : _a.children) || TreeOptionsEnum.CHILDREN;
});
const disabledKey = computed(() => {
var _a;
return ((_a = props.props) == null ? void 0 : _a.disabled) || TreeOptionsEnum.DISABLED;
});
const labelKey = computed(() => {
var _a;
return ((_a = props.props) == null ? void 0 : _a.label) || TreeOptionsEnum.LABEL;
});
const flattenTree = computed(() => {
var _a;
const expandedKeys = expandedKeySet.value;
const hiddenKeys = hiddenNodeKeySet.value;
const flattenNodes = [];
const nodes = ((_a = tree.value) == null ? void 0 : _a.treeNodes) || [];
const stack = [];
for (let i = nodes.length - 1; i >= 0; --i) {
stack.push(nodes[i]);
}
while (stack.length) {
const node = stack.pop();
if (hiddenKeys.has(node.key))
continue;
flattenNodes.push(node);
if (node.children && expandedKeys.has(node.key)) {
for (let i = node.children.length - 1; i >= 0; --i) {
stack.push(node.children[i]);
}
}
}
return flattenNodes;
});
const isNotEmpty = computed(() => {
return flattenTree.value.length > 0;
});
function createTree(data) {
const treeNodeMap = /* @__PURE__ */ new Map();
const levelTreeNodeMap = /* @__PURE__ */ new Map();
let maxLevel = 1;
function traverse(nodes, level = 1, parent = void 0) {
var _a;
const siblings = [];
for (const rawNode of nodes) {
const value = getKey(rawNode);
const node = {
level,
key: value,
data: rawNode
};
node.label = getLabel(rawNode);
node.parent = parent;
const children = getChildren(rawNode);
node.disabled = getDisabled(rawNode);
node.isLeaf = !children || children.length === 0;
node.expanded = expandedKeySet.value.has(value);
if (children && children.length) {
node.children = traverse(children, level + 1, node);
}
siblings.push(node);
treeNodeMap.set(value, node);
if (!levelTreeNodeMap.has(level)) {
levelTreeNodeMap.set(level, []);
}
(_a = levelTreeNodeMap.get(level)) == null ? void 0 : _a.push(node);
}
if (level > maxLevel) {
maxLevel = level;
}
return siblings;
}
const treeNodes = traverse(data);
return {
treeNodeMap,
levelTreeNodeMap,
maxLevel,
treeNodes
};
}
function filter(query) {
const keys = doFilter(query);
if (keys) {
expandedKeySet.value = keys;
}
}
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(keys) {
const expandedKeys = /* @__PURE__ */ new Set();
const nodeMap = tree.value.treeNodeMap;
expandedKeySet.value.forEach((key) => {
const node = nodeMap.get(key);
expandedKeySet.value.delete(node.key);
node.expanded = false;
});
keys.forEach((k) => {
let node = nodeMap.get(k);
while (node && !expandedKeys.has(node.key)) {
expandedKeys.add(node.key);
node.expanded = true;
node = node.parent;
}
});
expandedKeySet.value = expandedKeys;
}
function handleNodeClick(node, e) {
emit(NODE_CLICK, node.data, node, e);
handleCurrentChange(node);
if (props.expandOnClickNode) {
toggleExpand(node);
}
if (props.showCheckbox && (props.checkOnClickNode || node.isLeaf && props.checkOnClickLeaf) && !node.disabled) {
toggleCheckbox(node, !isChecked(node), true);
}
}
function handleNodeDrop(node, e) {
emit(NODE_DROP, node.data, node, e);
}
function handleCurrentChange(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);
treeNode.expanded = false;
}
});
}
keySet.add(node.key);
const _node = getNode(node.key);
if (_node) {
_node.expanded = true;
emit(NODE_EXPAND, _node.data, _node);
}
}
function collapseNode(node) {
expandedKeySet.value.delete(node.key);
const _node = getNode(node.key);
if (_node) {
_node.expanded = false;
emit(NODE_COLLAPSE, _node.data, _node);
}
}
function isDisabled(node) {
return !!node.disabled;
}
function isCurrent(node) {
const current = currentKey.value;
return current !== void 0 && current === node.key;
}
function getCurrentNode() {
var _a, _b;
if (!currentKey.value)
return void 0;
return (_b = (_a = tree.value) == null ? void 0 : _a.treeNodeMap.get(currentKey.value)) == null ? void 0 : _b.data;
}
function getCurrentKey() {
return currentKey.value;
}
function setCurrentKey(key) {
currentKey.value = key;
}
function setData(data) {
tree.value = createTree(data);
}
function getNode(data) {
var _a;
const key = isObject(data) ? getKey(data) : data;
return (_a = tree.value) == null ? void 0 : _a.treeNodeMap.get(key);
}
function scrollToNode(key, strategy = "auto") {
const node = getNode(key);
if (node && listRef.value) {
listRef.value.scrollToItem(flattenTree.value.indexOf(node), strategy);
}
}
function scrollTo(offset2) {
var _a;
(_a = listRef.value) == null ? void 0 : _a.scrollTo(offset2);
}
watch(() => props.currentNodeKey, (key) => {
currentKey.value = key;
}, {
immediate: true
});
watch(() => props.defaultExpandedKeys, (key) => {
expandedKeySet.value = new Set(key);
}, {
immediate: true
});
watch(() => props.data, (data) => {
setData(data);
}, {
immediate: true
});
return {
tree,
flattenTree,
isNotEmpty,
listRef,
getKey,
getChildren,
toggleExpand,
toggleCheckbox,
isChecked,
isIndeterminate,
isDisabled,
isCurrent,
isForceHiddenExpandIcon,
handleNodeClick,
handleNodeDrop,
handleNodeCheck,
getCurrentNode,
getCurrentKey,
setCurrentKey,
getCheckedKeys,
getCheckedNodes,
getHalfCheckedKeys,
getHalfCheckedNodes,
setChecked,
setCheckedKeys,
filter,
setData,
getNode,
expandNode,
collapseNode,
setExpandedKeys,
scrollToNode,
scrollTo
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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_KEY2);
const ns = 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(ElText, { tag: "span", truncated: true, class: ns.be("node", "label") }, () => [node == null ? void 0 : node.label]);
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs
init_shared_esm_bundler();
var __default__76 = defineComponent({
name: "ElTreeNode"
});
var _sfc_main87 = defineComponent({
...__default__76,
props: treeNodeProps,
emits: treeNodeEmits,
setup(__props, { emit }) {
const props = __props;
const tree = inject(ROOT_TREE_INJECTION_KEY2);
const ns = useNamespace("tree");
const indent = computed(() => {
var _a;
return (_a = tree == null ? void 0 : tree.props.indent) != null ? _a : 16;
});
const icon = computed(() => {
var _a;
return (_a = tree == null ? void 0 : tree.props.icon) != null ? _a : caret_right_default;
});
const getNodeClass = (node) => {
const nodeClassFunc = tree == null ? void 0 : tree.props.props.class;
if (!nodeClassFunc)
return {};
let className;
if (isFunction(nodeClassFunc)) {
const { data } = node;
className = nodeClassFunc(data, node);
} else {
className = nodeClassFunc;
}
return isString(className) ? { [className]: true } : className;
};
const handleClick = (e) => {
emit("click", props.node, e);
};
const handleDrop = (e) => {
emit("drop", props.node, e);
};
const handleExpandIconClick = () => {
emit("toggle", props.node);
};
const handleCheckChange = (value) => {
emit("check", props.node, value);
};
const handleContextMenu = (event) => {
var _a, _b, _c, _d;
if ((_c = (_b = (_a = tree == null ? void 0 : tree.instance) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props) == null ? void 0 : _c["onNodeContextmenu"]) {
event.stopPropagation();
event.preventDefault();
}
tree == null ? void 0 : tree.ctx.emit(NODE_CONTEXTMENU, event, (_d = props.node) == null ? void 0 : _d.data, props.node);
};
return (_ctx, _cache) => {
var _a, _b, _c;
return openBlock(), createElementBlock("div", {
ref: "node$",
class: normalizeClass([
unref(ns).b("node"),
unref(ns).is("expanded", _ctx.expanded),
unref(ns).is("current", _ctx.current),
unref(ns).is("focusable", !_ctx.disabled),
unref(ns).is("checked", !_ctx.disabled && _ctx.checked),
getNodeClass(_ctx.node)
]),
role: "treeitem",
tabindex: "-1",
"aria-expanded": _ctx.expanded,
"aria-disabled": _ctx.disabled,
"aria-checked": _ctx.checked,
"data-key": (_a = _ctx.node) == null ? void 0 : _a.key,
onClick: withModifiers(handleClick, ["stop"]),
onContextmenu: handleContextMenu,
onDragover: withModifiers(() => {
}, ["prevent"]),
onDragenter: withModifiers(() => {
}, ["prevent"]),
onDrop: withModifiers(handleDrop, ["stop"])
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).be("node", "content")),
style: normalizeStyle({
paddingLeft: `${(_ctx.node.level - 1) * unref(indent)}px`,
height: _ctx.itemSize + "px"
})
}, [
unref(icon) ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass([
unref(ns).is("leaf", !!((_b = _ctx.node) == null ? void 0 : _b.isLeaf)),
unref(ns).is("hidden", _ctx.hiddenExpandIcon),
{
expanded: !((_c = _ctx.node) == null ? void 0 : _c.isLeaf) && _ctx.expanded
},
unref(ns).be("node", "expand-icon")
]),
onClick: withModifiers(handleExpandIconClick, ["stop"])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(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: withModifiers(() => {
}, ["stop"])
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : createCommentVNode("v-if", true),
createVNode(unref(ElNodeContent), {
node: { ..._ctx.node, expanded: _ctx.expanded }
}, null, 8, ["node"])
], 6)
], 42, ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick", "onDragover", "onDragenter", "onDrop"]);
};
}
});
var ElTreeNode = _export_sfc(_sfc_main87, [["__file", "tree-node.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tree-v2/src/tree.mjs
var __default__77 = defineComponent({
name: "ElTreeV2"
});
var _sfc_main88 = defineComponent({
...__default__77,
props: treeProps,
emits: treeEmits2,
setup(__props, { expose, emit }) {
const props = __props;
const slots = useSlots();
const treeNodeSize = computed(() => props.itemSize);
provide(ROOT_TREE_INJECTION_KEY2, {
ctx: {
emit,
slots
},
props,
instance: getCurrentInstance()
});
provide(formItemContextKey, void 0);
const { t } = useLocale();
const ns = useNamespace("tree");
const {
flattenTree,
isNotEmpty,
listRef,
toggleExpand,
isIndeterminate,
isChecked,
isDisabled,
isCurrent,
isForceHiddenExpandIcon,
handleNodeClick,
handleNodeDrop,
handleNodeCheck,
toggleCheckbox,
getCurrentNode,
getCurrentKey,
setCurrentKey,
getCheckedKeys,
getCheckedNodes,
getHalfCheckedKeys,
getHalfCheckedNodes,
setChecked,
setCheckedKeys,
filter,
setData,
getNode,
expandNode,
collapseNode,
setExpandedKeys,
scrollToNode,
scrollTo
} = useTree2(props, emit);
expose({
toggleCheckbox,
getCurrentNode,
getCurrentKey,
setCurrentKey,
getCheckedKeys,
getCheckedNodes,
getHalfCheckedKeys,
getHalfCheckedNodes,
setChecked,
setCheckedKeys,
filter,
setData,
getNode,
expandNode,
collapseNode,
setExpandedKeys,
scrollToNode,
scrollTo
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: _ctx.highlightCurrent }]),
role: "tree"
}, [
unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), {
key: 0,
ref_key: "listRef",
ref: listRef,
"class-name": unref(ns).b("virtual-list"),
data: unref(flattenTree),
total: unref(flattenTree).length,
height: _ctx.height,
"item-size": unref(treeNodeSize),
"perf-mode": _ctx.perfMode,
"scrollbar-always-on": _ctx.scrollbarAlwaysOn
}, {
default: withCtx(({ data, index, style }) => [
(openBlock(), createBlock(ElTreeNode, {
key: data[index].key,
style: normalizeStyle(style),
node: data[index],
expanded: data[index].expanded,
"show-checkbox": _ctx.showCheckbox,
checked: unref(isChecked)(data[index]),
indeterminate: unref(isIndeterminate)(data[index]),
"item-size": unref(treeNodeSize),
disabled: unref(isDisabled)(data[index]),
current: unref(isCurrent)(data[index]),
"hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]),
onClick: unref(handleNodeClick),
onToggle: unref(toggleExpand),
onCheck: unref(handleNodeCheck),
onDrop: unref(handleNodeDrop)
}, null, 8, ["style", "node", "expanded", "show-checkbox", "checked", "indeterminate", "item-size", "disabled", "current", "hidden-expand-icon", "onClick", "onToggle", "onCheck", "onDrop"]))
]),
_: 1
}, 8, ["class-name", "data", "total", "height", "item-size", "perf-mode", "scrollbar-always-on"])) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).e("empty-block"))
}, [
renderSlot(_ctx.$slots, "empty", {}, () => {
var _a;
return [
createBaseVNode("span", {
class: normalizeClass(unref(ns).e("empty-text"))
}, toDisplayString((_a = _ctx.emptyText) != null ? _a : unref(t)("el.tree.emptyText")), 3)
];
})
], 2))
], 2);
};
}
});
var TreeV2 = _export_sfc(_sfc_main88, [["__file", "tree.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tree-v2/index.mjs
var ElTreeV2 = withInstall(TreeV2);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/src/watermark.mjs
var watermarkProps = buildProps({
zIndex: {
type: Number,
default: 9
},
rotate: {
type: Number,
default: -22
},
width: Number,
height: Number,
image: String,
content: {
type: definePropType([String, Array]),
default: "Element Plus"
},
font: {
type: definePropType(Object)
},
gap: {
type: definePropType(Array),
default: () => [100, 100]
},
offset: {
type: definePropType(Array)
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/src/utils.mjs
function toLowercaseSeparator(key) {
return key.replace(/([A-Z])/g, "-$1").toLowerCase();
}
function getStyleStr(style) {
return Object.keys(style).map((key) => `${toLowercaseSeparator(key)}: ${style[key]};`).join(" ");
}
function getPixelRatio() {
return window.devicePixelRatio || 1;
}
var reRendering = (mutation, watermarkElement) => {
let flag = false;
if (mutation.removedNodes.length && watermarkElement) {
flag = Array.from(mutation.removedNodes).includes(watermarkElement);
}
if (mutation.type === "attributes" && mutation.target === watermarkElement) {
flag = true;
}
return flag;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/src/useClips.mjs
init_shared_esm_bundler();
var TEXT_ALIGN_RATIO_MAP = {
left: [0, 0.5],
start: [0, 0.5],
center: [0.5, 0],
right: [1, -0.5],
end: [1, -0.5]
};
function prepareCanvas(width, height, ratio = 1) {
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
const realWidth = width * ratio;
const realHeight = height * ratio;
canvas.setAttribute("width", `${realWidth}px`);
canvas.setAttribute("height", `${realHeight}px`);
ctx.save();
return [ctx, canvas, realWidth, realHeight];
}
function useClips() {
function getClips(content, rotate, ratio, width, height, font, gapX, gapY, space) {
const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
if (content instanceof HTMLImageElement) {
ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
} else {
const {
color,
fontSize,
fontStyle,
fontWeight,
fontFamily,
textAlign,
textBaseline
} = font;
const mergedFontSize = Number(fontSize) * ratio;
ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
ctx.fillStyle = color;
ctx.textAlign = textAlign;
ctx.textBaseline = textBaseline;
const contents = isArray(content) ? content : [content];
contents == null ? void 0 : contents.forEach((item, index) => {
const [alignRatio, spaceRatio] = TEXT_ALIGN_RATIO_MAP[textAlign];
ctx.fillText(item != null ? item : "", contentWidth * alignRatio + space * spaceRatio, index * (mergedFontSize + font.fontGap * ratio));
});
}
const angle = Math.PI / 180 * Number(rotate);
const maxSize = Math.max(width, height);
const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
rCtx.translate(realMaxSize / 2, realMaxSize / 2);
rCtx.rotate(angle);
if (contentWidth > 0 && contentHeight > 0) {
rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
}
function getRotatePos(x2, y) {
const targetX = x2 * Math.cos(angle) - y * Math.sin(angle);
const targetY = x2 * Math.sin(angle) + y * Math.cos(angle);
return [targetX, targetY];
}
let left = 0;
let right = 0;
let top = 0;
let bottom = 0;
const halfWidth = contentWidth / 2;
const halfHeight = contentHeight / 2;
const points = [
[0 - halfWidth, 0 - halfHeight],
[0 + halfWidth, 0 - halfHeight],
[0 + halfWidth, 0 + halfHeight],
[0 - halfWidth, 0 + halfHeight]
];
points.forEach(([x2, y]) => {
const [targetX, targetY] = getRotatePos(x2, y);
left = Math.min(left, targetX);
right = Math.max(right, targetX);
top = Math.min(top, targetY);
bottom = Math.max(bottom, targetY);
});
const cutLeft = left + realMaxSize / 2;
const cutTop = top + realMaxSize / 2;
const cutWidth = right - left;
const cutHeight = bottom - top;
const realGapX = gapX * ratio;
const realGapY = gapY * ratio;
const filledWidth = (cutWidth + realGapX) * 2;
const filledHeight = cutHeight + realGapY;
const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
function drawImg(targetX = 0, targetY = 0) {
fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY, cutWidth, cutHeight);
}
drawImg();
drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio];
}
return getClips;
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/src/watermark2.mjs
init_shared_esm_bundler();
var __default__78 = defineComponent({
name: "ElWatermark"
});
var _sfc_main89 = defineComponent({
...__default__78,
props: watermarkProps,
setup(__props) {
const props = __props;
const style = {
position: "relative"
};
const fontGap = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.fontGap) != null ? _b : 3;
});
const color = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.color) != null ? _b : "rgba(0,0,0,.15)";
});
const fontSize = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.fontSize) != null ? _b : 16;
});
const fontWeight = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.fontWeight) != null ? _b : "normal";
});
const fontStyle = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal";
});
const fontFamily = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif";
});
const textAlign = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.textAlign) != null ? _b : "center";
});
const textBaseline = computed(() => {
var _a, _b;
return (_b = (_a = props.font) == null ? void 0 : _a.textBaseline) != null ? _b : "hanging";
});
const gapX = computed(() => props.gap[0]);
const gapY = computed(() => props.gap[1]);
const gapXCenter = computed(() => gapX.value / 2);
const gapYCenter = computed(() => gapY.value / 2);
const offsetLeft = computed(() => {
var _a, _b;
return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;
});
const offsetTop = computed(() => {
var _a, _b;
return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;
});
const getMarkStyle = () => {
const markStyle = {
zIndex: props.zIndex,
position: "absolute",
left: 0,
top: 0,
width: "100%",
height: "100%",
pointerEvents: "none",
backgroundRepeat: "repeat"
};
let positionLeft = offsetLeft.value - gapXCenter.value;
let positionTop = offsetTop.value - gapYCenter.value;
if (positionLeft > 0) {
markStyle.left = `${positionLeft}px`;
markStyle.width = `calc(100% - ${positionLeft}px)`;
positionLeft = 0;
}
if (positionTop > 0) {
markStyle.top = `${positionTop}px`;
markStyle.height = `calc(100% - ${positionTop}px)`;
positionTop = 0;
}
markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
return markStyle;
};
const containerRef = shallowRef(null);
const watermarkRef = shallowRef();
const stopObservation = ref(false);
const destroyWatermark = () => {
if (watermarkRef.value) {
watermarkRef.value.remove();
watermarkRef.value = void 0;
}
};
const appendWatermark = (base64Url, markWidth) => {
var _a;
if (containerRef.value && watermarkRef.value) {
stopObservation.value = true;
watermarkRef.value.setAttribute("style", getStyleStr({
...getMarkStyle(),
backgroundImage: `url('${base64Url}')`,
backgroundSize: `${Math.floor(markWidth)}px`
}));
(_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);
setTimeout(() => {
stopObservation.value = false;
});
}
};
const getMarkSize = (ctx) => {
let defaultWidth = 120;
let defaultHeight = 64;
let space = 0;
const { image, content, width, height, rotate } = props;
if (!image && ctx.measureText) {
ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
const contents = isArray(content) ? content : [content];
let maxWidth = 0;
let maxHeight = 0;
contents.forEach((item) => {
const {
width: width2,
fontBoundingBoxAscent,
fontBoundingBoxDescent,
actualBoundingBoxAscent,
actualBoundingBoxDescent
} = ctx.measureText(item);
const height2 = isUndefined(fontBoundingBoxAscent) ? actualBoundingBoxAscent + actualBoundingBoxDescent : fontBoundingBoxAscent + fontBoundingBoxDescent;
if (width2 > maxWidth)
maxWidth = Math.ceil(width2);
if (height2 > maxHeight)
maxHeight = Math.ceil(height2);
});
defaultWidth = maxWidth;
defaultHeight = maxHeight * contents.length + (contents.length - 1) * fontGap.value;
const angle = Math.PI / 180 * Number(rotate);
space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2);
defaultWidth += space;
}
return [width != null ? width : defaultWidth, height != null ? height : defaultHeight, space];
};
const getClips = useClips();
const renderWatermark = () => {
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
const image = props.image;
const content = props.content;
const rotate = props.rotate;
if (ctx) {
if (!watermarkRef.value) {
watermarkRef.value = document.createElement("div");
}
const ratio = getPixelRatio();
const [markWidth, markHeight, space] = getMarkSize(ctx);
const drawCanvas = (drawContent) => {
const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
color: color.value,
fontSize: fontSize.value,
fontStyle: fontStyle.value,
fontWeight: fontWeight.value,
fontFamily: fontFamily.value,
fontGap: fontGap.value,
textAlign: textAlign.value,
textBaseline: textBaseline.value
}, gapX.value, gapY.value, space);
appendWatermark(textClips, clipWidth);
};
if (image) {
const img = new Image();
img.onload = () => {
drawCanvas(img);
};
img.onerror = () => {
drawCanvas(content);
};
img.crossOrigin = "anonymous";
img.referrerPolicy = "no-referrer";
img.src = image;
} else {
drawCanvas(content);
}
}
};
onMounted(() => {
renderWatermark();
});
watch(() => props, () => {
renderWatermark();
}, {
deep: true,
flush: "post"
});
onBeforeUnmount(() => {
destroyWatermark();
});
const onMutate = (mutations) => {
if (stopObservation.value) {
return;
}
mutations.forEach((mutation) => {
if (reRendering(mutation, watermarkRef.value)) {
destroyWatermark();
renderWatermark();
}
});
};
useMutationObserver(containerRef, onMutate, {
attributes: true,
subtree: true,
childList: true
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "containerRef",
ref: containerRef,
style: normalizeStyle([style])
}, [
renderSlot(_ctx.$slots, "default")
], 4);
};
}
});
var Watermark = _export_sfc(_sfc_main89, [["__file", "watermark.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/watermark/index.mjs
var ElWatermark = withInstall(Watermark);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/mask.mjs
var maskProps = buildProps({
zIndex: {
type: Number,
default: 1001
},
visible: Boolean,
fill: {
type: String,
default: "rgba(0,0,0,0.5)"
},
pos: {
type: definePropType(Object)
},
targetAreaClickable: {
type: Boolean,
default: true
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/helper.mjs
init_shared_esm_bundler();
var useTarget = (target2, open, gap, mergedMask, scrollIntoViewOptions) => {
const posInfo = ref(null);
const getTargetEl = () => {
let targetEl;
if (isString(target2.value)) {
targetEl = document.querySelector(target2.value);
} else if (isFunction(target2.value)) {
targetEl = target2.value();
} else {
targetEl = target2.value;
}
return targetEl;
};
const updatePosInfo = () => {
const targetEl = getTargetEl();
if (!targetEl || !open.value) {
posInfo.value = null;
return;
}
if (!isInViewPort(targetEl)) {
targetEl.scrollIntoView(scrollIntoViewOptions.value);
}
const { left, top, width, height } = targetEl.getBoundingClientRect();
posInfo.value = {
left,
top,
width,
height,
radius: 0
};
};
onMounted(() => {
watch([open, target2], () => {
updatePosInfo();
}, {
immediate: true
});
window.addEventListener("resize", updatePosInfo);
});
onBeforeUnmount(() => {
window.removeEventListener("resize", updatePosInfo);
});
const getGapOffset = (index) => {
var _a;
return (_a = isArray(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) != null ? _a : 6;
};
const mergedPosInfo = computed(() => {
var _a;
if (!posInfo.value)
return posInfo.value;
const gapOffsetX = getGapOffset(0);
const gapOffsetY = getGapOffset(1);
const gapRadius = ((_a = gap.value) == null ? void 0 : _a.radius) || 2;
return {
left: posInfo.value.left - gapOffsetX,
top: posInfo.value.top - gapOffsetY,
width: posInfo.value.width + gapOffsetX * 2,
height: posInfo.value.height + gapOffsetY * 2,
radius: gapRadius
};
});
const triggerTarget = computed(() => {
const targetEl = getTargetEl();
if (!mergedMask.value || !targetEl || !window.DOMRect) {
return targetEl || void 0;
}
return {
getBoundingClientRect() {
var _a, _b, _c, _d;
return window.DOMRect.fromRect({
width: ((_a = mergedPosInfo.value) == null ? void 0 : _a.width) || 0,
height: ((_b = mergedPosInfo.value) == null ? void 0 : _b.height) || 0,
x: ((_c = mergedPosInfo.value) == null ? void 0 : _c.left) || 0,
y: ((_d = mergedPosInfo.value) == null ? void 0 : _d.top) || 0
});
}
};
});
return {
mergedPosInfo,
triggerTarget
};
};
var tourKey = Symbol("ElTour");
function isInViewPort(element) {
const viewWidth = window.innerWidth || document.documentElement.clientWidth;
const viewHeight = window.innerHeight || document.documentElement.clientHeight;
const { top, right, bottom, left } = element.getBoundingClientRect();
return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
}
var useFloating = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex, showArrow) => {
const x2 = ref();
const y = ref();
const middlewareData = ref({});
const states = {
x: x2,
y,
placement,
strategy,
middlewareData
};
const middleware = computed(() => {
const _middleware = [
offset(unref(offset$1)),
flip(),
shift(),
overflowMiddleware()
];
if (unref(showArrow) && unref(arrowRef)) {
_middleware.push(arrow({
element: unref(arrowRef)
}));
}
return _middleware;
});
const update = async () => {
if (!isClient)
return;
const referenceEl = unref(referenceRef);
const contentEl = unref(contentRef);
if (!referenceEl || !contentEl)
return;
const data = await computePosition(referenceEl, contentEl, {
placement: unref(placement),
strategy: unref(strategy),
middleware: unref(middleware)
});
keysOf(states).forEach((key) => {
states[key].value = data[key];
});
};
const contentStyle = computed(() => {
if (!unref(referenceRef)) {
return {
position: "fixed",
top: "50%",
left: "50%",
transform: "translate3d(-50%, -50%, 0)",
maxWidth: "100vw",
zIndex: unref(zIndex)
};
}
const { overflow } = unref(middlewareData);
return {
position: unref(strategy),
zIndex: unref(zIndex),
top: unref(y) != null ? `${unref(y)}px` : "",
left: unref(x2) != null ? `${unref(x2)}px` : "",
maxWidth: (overflow == null ? void 0 : overflow.maxWidth) ? `${overflow == null ? void 0 : overflow.maxWidth}px` : ""
};
});
const arrowStyle = computed(() => {
if (!unref(showArrow))
return {};
const { arrow: arrow2 } = unref(middlewareData);
return {
left: (arrow2 == null ? void 0 : arrow2.x) != null ? `${arrow2 == null ? void 0 : arrow2.x}px` : "",
top: (arrow2 == null ? void 0 : arrow2.y) != null ? `${arrow2 == null ? void 0 : arrow2.y}px` : ""
};
});
let cleanup;
onMounted(() => {
const referenceEl = unref(referenceRef);
const contentEl = unref(contentRef);
if (referenceEl && contentEl) {
cleanup = autoUpdate(referenceEl, contentEl, update);
}
watchEffect(() => {
update();
});
});
onBeforeUnmount(() => {
cleanup && cleanup();
});
return {
update,
contentStyle,
arrowStyle
};
};
var overflowMiddleware = () => {
return {
name: "overflow",
async fn(state) {
const overflow = await detectOverflow(state);
let overWidth = 0;
if (overflow.left > 0)
overWidth = overflow.left;
if (overflow.right > 0)
overWidth = overflow.right;
const floatingWidth = state.rects.floating.width;
return {
data: {
maxWidth: floatingWidth - overWidth
}
};
}
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/mask2.mjs
var __default__79 = defineComponent({
name: "ElTourMask",
inheritAttrs: false
});
var _sfc_main90 = defineComponent({
...__default__79,
props: maskProps,
setup(__props) {
const props = __props;
const { ns } = inject(tourKey);
const radius = computed(() => {
var _a, _b;
return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
});
const roundInfo = computed(() => {
const v2 = radius.value;
const baseInfo = `a${v2},${v2} 0 0 1`;
return {
topRight: `${baseInfo} ${v2},${v2}`,
bottomRight: `${baseInfo} ${-v2},${v2}`,
bottomLeft: `${baseInfo} ${-v2},${-v2}`,
topLeft: `${baseInfo} ${v2},${-v2}`
};
});
const { width: windowWidth, height: windowHeight } = useWindowSize();
const path = computed(() => {
const width = windowWidth.value;
const height = windowHeight.value;
const info = roundInfo.value;
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
const _radius = radius.value;
return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
});
const maskStyle = computed(() => ({
position: "fixed",
left: 0,
right: 0,
top: 0,
bottom: 0,
zIndex: props.zIndex,
pointerEvents: props.pos && props.targetAreaClickable ? "none" : "auto"
}));
const pathStyle = computed(() => ({
fill: props.fill,
pointerEvents: "auto",
cursor: "auto"
}));
useLockscreen(toRef(props, "visible"), {
ns
});
return (_ctx, _cache) => {
return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
key: 0,
class: unref(ns).e("mask"),
style: unref(maskStyle)
}, _ctx.$attrs), [
(openBlock(), createElementBlock("svg", { style: {
width: "100%",
height: "100%"
} }, [
createBaseVNode("path", {
class: normalizeClass(unref(ns).e("hollow")),
style: normalizeStyle(unref(pathStyle)),
d: unref(path)
}, null, 14, ["d"])
]))
], 16)) : createCommentVNode("v-if", true);
};
}
});
var ElTourMask = _export_sfc(_sfc_main90, [["__file", "mask.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/content2.mjs
var tourStrategies = ["absolute", "fixed"];
var tourPlacements = [
"top-start",
"top-end",
"top",
"bottom-start",
"bottom-end",
"bottom",
"left-start",
"left-end",
"left",
"right-start",
"right-end",
"right"
];
var tourContentProps = buildProps({
placement: {
type: definePropType(String),
values: tourPlacements,
default: "bottom"
},
reference: {
type: definePropType(Object),
default: null
},
strategy: {
type: definePropType(String),
values: tourStrategies,
default: "absolute"
},
offset: {
type: Number,
default: 10
},
showArrow: Boolean,
zIndex: {
type: Number,
default: 2001
}
});
var tourContentEmits = {
close: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/content.mjs
var __default__80 = defineComponent({
name: "ElTourContent"
});
var _sfc_main91 = defineComponent({
...__default__80,
props: tourContentProps,
emits: tourContentEmits,
setup(__props, { emit }) {
const props = __props;
const placement = ref(props.placement);
const strategy = ref(props.strategy);
const contentRef = ref(null);
const arrowRef = ref(null);
watch(() => props.placement, () => {
placement.value = props.placement;
});
const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
const side = computed(() => {
return placement.value.split("-")[0];
});
const { ns } = inject(tourKey);
const onCloseRequested = () => {
emit("close");
};
const onFocusoutPrevented = (event) => {
if (event.detail.focusReason === "pointer") {
event.preventDefault();
}
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "contentRef",
ref: contentRef,
style: normalizeStyle(unref(contentStyle)),
class: normalizeClass(unref(ns).e("content")),
"data-side": unref(side),
tabindex: "-1"
}, [
createVNode(unref(ElFocusTrap), {
loop: "",
trapped: "",
"focus-start-el": "container",
"focus-trap-el": contentRef.value || void 0,
onReleaseRequested: onCloseRequested,
onFocusoutPrevented
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["focus-trap-el"]),
_ctx.showArrow ? (openBlock(), createElementBlock("span", {
key: 0,
ref_key: "arrowRef",
ref: arrowRef,
style: normalizeStyle(unref(arrowStyle)),
class: normalizeClass(unref(ns).e("arrow"))
}, null, 6)) : createCommentVNode("v-if", true)
], 14, ["data-side"]);
};
}
});
var ElTourContent = _export_sfc(_sfc_main91, [["__file", "content.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/steps.mjs
init_shared_esm_bundler();
var ElTourSteps = defineComponent({
name: "ElTourSteps",
props: {
current: {
type: Number,
default: 0
}
},
emits: ["update-total"],
setup(props, { slots, emit }) {
let cacheTotal = 0;
return () => {
var _a, _b;
const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
const result = [];
let total = 0;
function filterSteps(children2) {
if (!isArray(children2))
return;
children2.forEach((item) => {
var _a2;
const name = (_a2 = (item == null ? void 0 : item.type) || {}) == null ? void 0 : _a2.name;
if (name === "ElTourStep") {
result.push(item);
total += 1;
}
});
}
if (children.length) {
filterSteps(flattedChildren((_b = children[0]) == null ? void 0 : _b.children));
}
if (cacheTotal !== total) {
cacheTotal = total;
emit("update-total", total);
}
if (result.length) {
return result[props.current];
}
return null;
};
}
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/tour.mjs
var tourProps = buildProps({
modelValue: Boolean,
current: {
type: Number,
default: 0
},
showArrow: {
type: Boolean,
default: true
},
showClose: {
type: Boolean,
default: true
},
closeIcon: {
type: iconPropType
},
placement: tourContentProps.placement,
contentStyle: {
type: definePropType([Object])
},
mask: {
type: definePropType([Boolean, Object]),
default: true
},
gap: {
type: definePropType(Object),
default: () => ({
offset: 6,
radius: 2
})
},
zIndex: {
type: Number
},
scrollIntoViewOptions: {
type: definePropType([Boolean, Object]),
default: () => ({
block: "center"
})
},
type: {
type: definePropType(String)
},
appendTo: {
type: teleportProps.to.type,
default: "body"
},
closeOnPressEscape: {
type: Boolean,
default: true
},
targetAreaClickable: {
type: Boolean,
default: true
}
});
var tourEmits = {
[UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
["update:current"]: (current) => isNumber(current),
close: (current) => isNumber(current),
finish: () => true,
change: (current) => isNumber(current)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/tour2.mjs
var __default__81 = defineComponent({
name: "ElTour"
});
var _sfc_main92 = defineComponent({
...__default__81,
props: tourProps,
emits: tourEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("tour");
const total = ref(0);
const currentStep = ref();
const current = useVModel(props, "current", emit, {
passive: true
});
const currentTarget = computed(() => {
var _a;
return (_a = currentStep.value) == null ? void 0 : _a.target;
});
const kls = computed(() => [
ns.b(),
mergedType.value === "primary" ? ns.m("primary") : ""
]);
const mergedPlacement = computed(() => {
var _a;
return ((_a = currentStep.value) == null ? void 0 : _a.placement) || props.placement;
});
const mergedContentStyle = computed(() => {
var _a, _b;
return (_b = (_a = currentStep.value) == null ? void 0 : _a.contentStyle) != null ? _b : props.contentStyle;
});
const mergedMask = computed(() => {
var _a, _b;
return (_b = (_a = currentStep.value) == null ? void 0 : _a.mask) != null ? _b : props.mask;
});
const mergedShowMask = computed(() => !!mergedMask.value && props.modelValue);
const mergedMaskStyle = computed(() => isBoolean(mergedMask.value) ? void 0 : mergedMask.value);
const mergedShowArrow = computed(() => {
var _a, _b;
return !!currentTarget.value && ((_b = (_a = currentStep.value) == null ? void 0 : _a.showArrow) != null ? _b : props.showArrow);
});
const mergedScrollIntoViewOptions = computed(() => {
var _a, _b;
return (_b = (_a = currentStep.value) == null ? void 0 : _a.scrollIntoViewOptions) != null ? _b : props.scrollIntoViewOptions;
});
const mergedType = computed(() => {
var _a, _b;
return (_b = (_a = currentStep.value) == null ? void 0 : _a.type) != null ? _b : props.type;
});
const { nextZIndex } = useZIndex();
const nowZIndex = nextZIndex();
const mergedZIndex = computed(() => {
var _a;
return (_a = props.zIndex) != null ? _a : nowZIndex;
});
const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
watch(() => props.modelValue, (val) => {
if (!val) {
current.value = 0;
}
});
const onEscClose = () => {
if (props.closeOnPressEscape) {
emit(UPDATE_MODEL_EVENT, false);
emit("close", current.value);
}
};
const onUpdateTotal = (val) => {
total.value = val;
};
const slots = useSlots();
provide(tourKey, {
currentStep,
current,
total,
showClose: toRef(props, "showClose"),
closeIcon: toRef(props, "closeIcon"),
mergedType,
ns,
slots,
updateModelValue(modelValue) {
emit(UPDATE_MODEL_EVENT, modelValue);
},
onClose() {
emit("close", current.value);
},
onFinish() {
emit("finish");
},
onChange() {
emit(CHANGE_EVENT, current.value);
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock(Fragment, null, [
createVNode(unref(ElTeleport), { to: _ctx.appendTo }, {
default: withCtx(() => {
var _a, _b;
return [
createBaseVNode("div", mergeProps({ class: unref(kls) }, _ctx.$attrs), [
createVNode(ElTourMask, {
visible: unref(mergedShowMask),
fill: (_a = unref(mergedMaskStyle)) == null ? void 0 : _a.color,
style: normalizeStyle((_b = unref(mergedMaskStyle)) == null ? void 0 : _b.style),
pos: unref(pos),
"z-index": unref(mergedZIndex),
"target-area-clickable": _ctx.targetAreaClickable
}, null, 8, ["visible", "fill", "style", "pos", "z-index", "target-area-clickable"]),
_ctx.modelValue ? (openBlock(), createBlock(ElTourContent, {
key: unref(current),
reference: unref(triggerTarget),
placement: unref(mergedPlacement),
"show-arrow": unref(mergedShowArrow),
"z-index": unref(mergedZIndex),
style: normalizeStyle(unref(mergedContentStyle)),
onClose: onEscClose
}, {
default: withCtx(() => [
createVNode(unref(ElTourSteps), {
current: unref(current),
onUpdateTotal
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["current"])
]),
_: 3
}, 8, ["reference", "placement", "show-arrow", "z-index", "style"])) : createCommentVNode("v-if", true)
], 16)
];
}),
_: 3
}, 8, ["to"]),
createCommentVNode(" just for IDE "),
createCommentVNode("v-if", true)
], 64);
};
}
});
var Tour = _export_sfc(_sfc_main92, [["__file", "tour.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/step.mjs
var tourStepProps = buildProps({
target: {
type: definePropType([String, Object, Function])
},
title: String,
description: String,
showClose: {
type: Boolean,
default: void 0
},
closeIcon: {
type: iconPropType
},
showArrow: {
type: Boolean,
default: void 0
},
placement: tourContentProps.placement,
mask: {
type: definePropType([Boolean, Object]),
default: void 0
},
contentStyle: {
type: definePropType([Object])
},
prevButtonProps: {
type: definePropType(Object)
},
nextButtonProps: {
type: definePropType(Object)
},
scrollIntoViewOptions: {
type: definePropType([Boolean, Object]),
default: void 0
},
type: {
type: definePropType(String)
}
});
var tourStepEmits = {
close: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/src/step2.mjs
var __default__82 = defineComponent({
name: "ElTourStep"
});
var _sfc_main93 = defineComponent({
...__default__82,
props: tourStepProps,
emits: tourStepEmits,
setup(__props, { emit }) {
const props = __props;
const { Close } = CloseComponents;
const { t } = useLocale();
const {
currentStep,
current,
total,
showClose,
closeIcon,
mergedType,
ns,
slots: tourSlots,
updateModelValue,
onClose: tourOnClose,
onFinish: tourOnFinish,
onChange
} = inject(tourKey);
watch(props, (val) => {
currentStep.value = val;
}, {
immediate: true
});
const mergedShowClose = computed(() => {
var _a;
return (_a = props.showClose) != null ? _a : showClose.value;
});
const mergedCloseIcon = computed(() => {
var _a, _b;
return (_b = (_a = props.closeIcon) != null ? _a : closeIcon.value) != null ? _b : Close;
});
const filterButtonProps = (btnProps) => {
if (!btnProps)
return;
return omit_default(btnProps, ["children", "onClick"]);
};
const onPrev = () => {
var _a, _b;
current.value -= 1;
if ((_a = props.prevButtonProps) == null ? void 0 : _a.onClick) {
(_b = props.prevButtonProps) == null ? void 0 : _b.onClick();
}
onChange();
};
const onNext = () => {
var _a;
if (current.value >= total.value - 1) {
onFinish();
} else {
current.value += 1;
}
if ((_a = props.nextButtonProps) == null ? void 0 : _a.onClick) {
props.nextButtonProps.onClick();
}
onChange();
};
const onFinish = () => {
onClose();
tourOnFinish();
};
const onClose = () => {
updateModelValue(false);
tourOnClose();
emit("close");
};
const handleKeydown = (e) => {
const target2 = e.target;
if (target2 == null ? void 0 : target2.isContentEditable)
return;
const code = getEventCode(e);
switch (code) {
case EVENT_CODE.left:
e.preventDefault();
current.value > 0 && onPrev();
break;
case EVENT_CODE.right:
e.preventDefault();
onNext();
break;
}
};
onMounted(() => {
window.addEventListener("keydown", handleKeydown);
});
onBeforeUnmount(() => {
window.removeEventListener("keydown", handleKeydown);
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock(Fragment, null, [
unref(mergedShowClose) ? (openBlock(), createElementBlock("button", {
key: 0,
"aria-label": unref(t)("el.tour.close"),
class: normalizeClass(unref(ns).e("closebtn")),
type: "button",
onClick: onClose
}, [
createVNode(unref(ElIcon), {
class: normalizeClass(unref(ns).e("close"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(mergedCloseIcon))))
]),
_: 1
}, 8, ["class"])
], 10, ["aria-label"])) : createCommentVNode("v-if", true),
createBaseVNode("header", {
class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }])
}, [
renderSlot(_ctx.$slots, "header", {}, () => [
createBaseVNode("span", {
role: "heading",
class: normalizeClass(unref(ns).e("title"))
}, toDisplayString(_ctx.title), 3)
])
], 2),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("body"))
}, [
renderSlot(_ctx.$slots, "default", {}, () => [
createBaseVNode("span", null, toDisplayString(_ctx.description), 1)
])
], 2),
createBaseVNode("footer", {
class: normalizeClass(unref(ns).e("footer"))
}, [
createBaseVNode("div", {
class: normalizeClass(unref(ns).b("indicators"))
}, [
unref(tourSlots).indicators ? (openBlock(), createBlock(resolveDynamicComponent(unref(tourSlots).indicators), {
key: 0,
current: unref(current),
total: unref(total)
}, null, 8, ["current", "total"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(total), (item, index) => {
return openBlock(), createElementBlock("span", {
key: item,
class: normalizeClass([unref(ns).b("indicator"), unref(ns).is("active", index === unref(current))])
}, null, 2);
}), 128))
], 2),
createBaseVNode("div", {
class: normalizeClass(unref(ns).b("buttons"))
}, [
unref(current) > 0 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
key: 0,
size: "small",
type: unref(mergedType)
}, filterButtonProps(_ctx.prevButtonProps), { onClick: onPrev }), {
default: withCtx(() => {
var _a, _b;
return [
createTextVNode(toDisplayString((_b = (_a = _ctx.prevButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(t)("el.tour.previous")), 1)
];
}),
_: 1
}, 16, ["type"])) : createCommentVNode("v-if", true),
unref(current) <= unref(total) - 1 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
key: 1,
size: "small",
type: unref(mergedType) === "primary" ? "default" : "primary"
}, filterButtonProps(_ctx.nextButtonProps), { onClick: onNext }), {
default: withCtx(() => {
var _a, _b;
return [
createTextVNode(toDisplayString((_b = (_a = _ctx.nextButtonProps) == null ? void 0 : _a.children) != null ? _b : unref(current) === unref(total) - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next")), 1)
];
}),
_: 1
}, 16, ["type"])) : createCommentVNode("v-if", true)
], 2)
], 2)
], 64);
};
}
});
var TourStep = _export_sfc(_sfc_main93, [["__file", "step.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/tour/index.mjs
var ElTour = withInstall(Tour, {
TourStep
});
var ElTourStep = withNoopInstall(TourStep);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor.mjs
init_shared_esm_bundler();
var anchorProps = buildProps({
container: {
type: definePropType([
String,
Object
])
},
offset: {
type: Number,
default: 0
},
bound: {
type: Number,
default: 15
},
duration: {
type: Number,
default: 300
},
marker: {
type: Boolean,
default: true
},
type: {
type: definePropType(String),
default: "default"
},
direction: {
type: definePropType(String),
default: "vertical"
},
selectScrollTop: Boolean
});
var anchorEmits = {
change: (href) => isString(href),
click: (e, href) => e instanceof MouseEvent && (isString(href) || isUndefined(href))
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/constants.mjs
var anchorKey = Symbol("anchor");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/utils/dom/element.mjs
init_shared_esm_bundler();
var getElement = (target2) => {
if (!isClient || target2 === "")
return null;
if (isString(target2)) {
try {
return document.querySelector(target2);
} catch (e) {
return null;
}
}
return target2;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/utils/throttleByRaf.mjs
function throttleByRaf(cb) {
let timer = 0;
const throttle = (...args) => {
if (timer) {
cAF(timer);
}
timer = rAF(() => {
cb(...args);
timer = 0;
});
};
throttle.cancel = () => {
cAF(timer);
timer = 0;
};
return throttle;
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor2.mjs
var __default__83 = defineComponent({
name: "ElAnchor"
});
var _sfc_main94 = defineComponent({
...__default__83,
props: anchorProps,
emits: anchorEmits,
setup(__props, { expose, emit }) {
const props = __props;
const slots = useSlots();
const currentAnchor = ref("");
const markerStyle = ref({});
const anchorRef = ref(null);
const markerRef = ref(null);
const containerEl = ref();
const links = {};
let isScrolling = false;
let currentScrollTop = 0;
const ns = useNamespace("anchor");
const cls = computed(() => [
ns.b(),
props.type === "underline" ? ns.m("underline") : "",
ns.m(props.direction)
]);
const addLink = (state) => {
links[state.href] = state.el;
};
const removeLink = (href) => {
delete links[href];
};
const setCurrentAnchor = (href) => {
const activeHref = currentAnchor.value;
if (activeHref !== href) {
currentAnchor.value = href;
emit(CHANGE_EVENT, href);
}
};
let clearAnimate = null;
const scrollToAnchor = (href) => {
if (!containerEl.value)
return;
const target2 = getElement(href);
if (!target2)
return;
if (clearAnimate)
clearAnimate();
isScrolling = true;
const scrollEle = getScrollElement(target2, containerEl.value);
const distance = getOffsetTopDistance(target2, scrollEle);
const max2 = scrollEle.scrollHeight - scrollEle.clientHeight;
const to = Math.min(distance - props.offset, max2);
clearAnimate = animateScrollTo(containerEl.value, currentScrollTop, to, props.duration, () => {
setTimeout(() => {
isScrolling = false;
}, 20);
});
};
const scrollTo = (href) => {
if (href) {
setCurrentAnchor(href);
scrollToAnchor(href);
}
};
const handleClick = (e, href) => {
emit("click", e, href);
scrollTo(href);
};
const handleScroll2 = throttleByRaf(() => {
if (containerEl.value) {
currentScrollTop = getScrollTop(containerEl.value);
}
const currentHref = getCurrentHref();
if (isScrolling || isUndefined(currentHref))
return;
setCurrentAnchor(currentHref);
});
const getCurrentHref = () => {
if (!containerEl.value)
return;
const scrollTop = getScrollTop(containerEl.value);
const anchorTopList = [];
for (const href of Object.keys(links)) {
const target2 = getElement(href);
if (!target2)
continue;
const scrollEle = getScrollElement(target2, containerEl.value);
const distance = getOffsetTopDistance(target2, scrollEle);
anchorTopList.push({
top: distance - props.offset - props.bound,
href
});
}
anchorTopList.sort((prev, next) => prev.top - next.top);
for (let i = 0; i < anchorTopList.length; i++) {
const item = anchorTopList[i];
const next = anchorTopList[i + 1];
if (i === 0 && scrollTop === 0) {
return props.selectScrollTop ? item.href : "";
}
if (item.top <= scrollTop && (!next || next.top > scrollTop)) {
return item.href;
}
}
};
const getContainer = () => {
const el = getElement(props.container);
if (!el || isWindow(el)) {
containerEl.value = window;
} else {
containerEl.value = el;
}
};
useEventListener(containerEl, "scroll", handleScroll2);
const updateMarkerStyle = () => {
nextTick(() => {
if (!anchorRef.value || !markerRef.value || !currentAnchor.value) {
markerStyle.value = {};
return;
}
const currentLinkEl = links[currentAnchor.value];
if (!currentLinkEl) {
markerStyle.value = {};
return;
}
const anchorRect = anchorRef.value.getBoundingClientRect();
const markerRect = markerRef.value.getBoundingClientRect();
const linkRect = currentLinkEl.getBoundingClientRect();
if (props.direction === "horizontal") {
const left = linkRect.left - anchorRect.left;
markerStyle.value = {
left: `${left}px`,
width: `${linkRect.width}px`,
opacity: 1
};
} else {
const top = linkRect.top - anchorRect.top + (linkRect.height - markerRect.height) / 2;
markerStyle.value = {
top: `${top}px`,
opacity: 1
};
}
});
};
watch(currentAnchor, updateMarkerStyle);
watch(() => {
var _a;
return (_a = slots.default) == null ? void 0 : _a.call(slots);
}, updateMarkerStyle);
onMounted(() => {
getContainer();
const hash = decodeURIComponent(window.location.hash);
const target2 = getElement(hash);
if (target2) {
scrollTo(hash);
} else {
handleScroll2();
}
});
watch(() => props.container, () => {
getContainer();
});
provide(anchorKey, {
ns,
direction: props.direction,
currentAnchor,
addLink,
removeLink,
handleClick
});
expose({
scrollTo
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "anchorRef",
ref: anchorRef,
class: normalizeClass(unref(cls))
}, [
_ctx.marker ? (openBlock(), createElementBlock("div", {
key: 0,
ref_key: "markerRef",
ref: markerRef,
class: normalizeClass(unref(ns).e("marker")),
style: normalizeStyle(markerStyle.value)
}, null, 6)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("list"))
}, [
renderSlot(_ctx.$slots, "default")
], 2)
], 2);
};
}
});
var Anchor = _export_sfc(_sfc_main94, [["__file", "anchor.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor-link.mjs
var anchorLinkProps = buildProps({
title: String,
href: String
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor-link2.mjs
var __default__84 = defineComponent({
name: "ElAnchorLink"
});
var _sfc_main95 = defineComponent({
...__default__84,
props: anchorLinkProps,
setup(__props) {
const props = __props;
const linkRef = ref(null);
const {
ns,
direction,
currentAnchor,
addLink,
removeLink,
handleClick: contextHandleClick
} = inject(anchorKey);
const cls = computed(() => [
ns.e("link"),
ns.is("active", currentAnchor.value === props.href)
]);
const handleClick = (e) => {
contextHandleClick(e, props.href);
};
watch(() => props.href, (val, oldVal) => {
nextTick(() => {
if (oldVal)
removeLink(oldVal);
if (val) {
addLink({
href: val,
el: linkRef.value
});
}
});
});
onMounted(() => {
const { href } = props;
if (href) {
addLink({
href,
el: linkRef.value
});
}
});
onBeforeUnmount(() => {
const { href } = props;
if (href) {
removeLink(href);
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass(unref(ns).e("item"))
}, [
createBaseVNode("a", {
ref_key: "linkRef",
ref: linkRef,
class: normalizeClass(unref(cls)),
href: _ctx.href,
onClick: handleClick
}, [
renderSlot(_ctx.$slots, "default", {}, () => [
createTextVNode(toDisplayString(_ctx.title), 1)
])
], 10, ["href"]),
_ctx.$slots["sub-link"] && unref(direction) === "vertical" ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).e("list"))
}, [
renderSlot(_ctx.$slots, "sub-link")
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var AnchorLink = _export_sfc(_sfc_main95, [["__file", "anchor-link.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/index.mjs
var ElAnchor = withInstall(Anchor, {
AnchorLink
});
var ElAnchorLink = withNoopInstall(AnchorLink);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/segmented/src/segmented.mjs
init_shared_esm_bundler();
var defaultProps4 = {
label: "label",
value: "value",
disabled: "disabled"
};
var segmentedProps = buildProps({
direction: {
type: definePropType(String),
default: "horizontal"
},
options: {
type: definePropType(Array),
default: () => []
},
modelValue: {
type: [String, Number, Boolean],
default: void 0
},
props: {
type: definePropType(Object),
default: () => defaultProps4
},
block: Boolean,
size: useSizeProp,
disabled: Boolean,
validateEvent: {
type: Boolean,
default: true
},
id: String,
name: String,
...useAriaProps(["ariaLabel"])
});
var segmentedEmits = {
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/segmented/src/segmented2.mjs
init_shared_esm_bundler();
var __default__85 = defineComponent({
name: "ElSegmented"
});
var _sfc_main96 = defineComponent({
...__default__85,
props: segmentedProps,
emits: segmentedEmits,
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("segmented");
const segmentedId = useId();
const segmentedSize = useFormSize();
const _disabled = useFormDisabled();
const { formItem } = useFormItem();
const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
formItemContext: formItem
});
const segmentedRef = ref(null);
const activeElement = useActiveElement();
const state = reactive({
isInit: false,
width: 0,
height: 0,
translateX: 0,
translateY: 0,
focusVisible: false
});
const handleChange = (item) => {
const value = getValue2(item);
emit(UPDATE_MODEL_EVENT, value);
emit(CHANGE_EVENT, value);
};
const aliasProps = computed(() => ({ ...defaultProps4, ...props.props }));
const intoAny = (item) => item;
const getValue2 = (item) => {
return isObject(item) ? item[aliasProps.value.value] : item;
};
const getLabel = (item) => {
return isObject(item) ? item[aliasProps.value.label] : item;
};
const getDisabled = (item) => {
return !!(_disabled.value || (isObject(item) ? item[aliasProps.value.disabled] : false));
};
const getSelected = (item) => {
return props.modelValue === getValue2(item);
};
const getOption = (value) => {
return props.options.find((item) => getValue2(item) === value);
};
const getItemCls = (item) => {
return [
ns.e("item"),
ns.is("selected", getSelected(item)),
ns.is("disabled", getDisabled(item))
];
};
const updateSelect = () => {
if (!segmentedRef.value)
return;
const selectedItem = segmentedRef.value.querySelector(".is-selected");
const selectedItemInput = segmentedRef.value.querySelector(".is-selected input");
if (!selectedItem || !selectedItemInput) {
state.width = 0;
state.height = 0;
state.translateX = 0;
state.translateY = 0;
state.focusVisible = false;
return;
}
state.isInit = true;
if (props.direction === "vertical") {
state.height = selectedItem.offsetHeight;
state.translateY = selectedItem.offsetTop;
} else {
state.width = selectedItem.offsetWidth;
state.translateX = selectedItem.offsetLeft;
}
try {
state.focusVisible = selectedItemInput.matches(":focus-visible");
} catch (e) {
}
};
const segmentedCls = computed(() => [
ns.b(),
ns.m(segmentedSize.value),
ns.is("block", props.block)
]);
const selectedStyle = computed(() => ({
width: props.direction === "vertical" ? "100%" : `${state.width}px`,
height: props.direction === "vertical" ? `${state.height}px` : "100%",
transform: props.direction === "vertical" ? `translateY(${state.translateY}px)` : `translateX(${state.translateX}px)`,
display: state.isInit ? "block" : "none"
}));
const selectedCls = computed(() => [
ns.e("item-selected"),
ns.is("disabled", getDisabled(getOption(props.modelValue))),
ns.is("focus-visible", state.focusVisible)
]);
const name = computed(() => {
return props.name || segmentedId.value;
});
useResizeObserver(segmentedRef, updateSelect);
watch(activeElement, updateSelect);
watch(() => props.modelValue, () => {
var _a;
updateSelect();
if (props.validateEvent) {
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
}
}, {
flush: "post"
});
return (_ctx, _cache) => {
return _ctx.options.length ? (openBlock(), createElementBlock("div", {
key: 0,
id: unref(inputId),
ref_key: "segmentedRef",
ref: segmentedRef,
class: normalizeClass(unref(segmentedCls)),
role: "radiogroup",
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "segmented" : void 0,
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
}, [
createBaseVNode("div", {
class: normalizeClass([unref(ns).e("group"), unref(ns).m(_ctx.direction)])
}, [
createBaseVNode("div", {
style: normalizeStyle(unref(selectedStyle)),
class: normalizeClass(unref(selectedCls))
}, null, 6),
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
return openBlock(), createElementBlock("label", {
key: index,
class: normalizeClass(getItemCls(item))
}, [
createBaseVNode("input", {
class: normalizeClass(unref(ns).e("item-input")),
type: "radio",
name: unref(name),
disabled: getDisabled(item),
checked: getSelected(item),
onChange: ($event) => handleChange(item)
}, null, 42, ["name", "disabled", "checked", "onChange"]),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("item-label"))
}, [
renderSlot(_ctx.$slots, "default", {
item: intoAny(item)
}, () => [
createTextVNode(toDisplayString(getLabel(item)), 1)
])
], 2)
], 2);
}), 128))
], 2)
], 10, ["id", "aria-label", "aria-labelledby"])) : createCommentVNode("v-if", true);
};
}
});
var Segmented = _export_sfc(_sfc_main96, [["__file", "segmented.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/segmented/index.mjs
var ElSegmented = withInstall(Segmented);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/mention/src/helper.mjs
var filterOption = (pattern4, option) => {
const lowerCase = pattern4.toLowerCase();
const label = option.label || option.value || "";
return label.toLowerCase().includes(lowerCase);
};
var getMentionCtx = (inputEl, prefix, split) => {
const { selectionEnd } = inputEl;
if (selectionEnd === null)
return;
const inputValue = inputEl.value;
const prefixArray = castArray_default(prefix);
let splitIndex = -1;
let mentionCtx;
for (let i = selectionEnd - 1; i >= 0; --i) {
const char = inputValue[i];
if (char === split || char === "\n" || char === "\r") {
splitIndex = i;
continue;
}
if (prefixArray.includes(char)) {
const end = splitIndex === -1 ? selectionEnd : splitIndex;
const pattern4 = inputValue.slice(i + 1, end);
mentionCtx = {
pattern: pattern4,
start: i + 1,
end,
prefix: char,
prefixIndex: i,
splitIndex,
selectionEnd
};
break;
}
}
return mentionCtx;
};
var getCursorPosition = (element, options = {
debug: false,
useSelectionEnd: false
}) => {
const selectionStart = element.selectionStart !== null ? element.selectionStart : 0;
const selectionEnd = element.selectionEnd !== null ? element.selectionEnd : 0;
const position = options.useSelectionEnd ? selectionEnd : selectionStart;
const properties = [
"direction",
"boxSizing",
"width",
"height",
"overflowX",
"overflowY",
"borderTopWidth",
"borderRightWidth",
"borderBottomWidth",
"borderLeftWidth",
"borderStyle",
"paddingTop",
"paddingRight",
"paddingBottom",
"paddingLeft",
"fontStyle",
"fontVariant",
"fontWeight",
"fontStretch",
"fontSize",
"fontSizeAdjust",
"lineHeight",
"fontFamily",
"textAlign",
"textTransform",
"textIndent",
"textDecoration",
"letterSpacing",
"wordSpacing",
"tabSize",
"MozTabSize"
];
if (options.debug) {
const el = document.querySelector("#input-textarea-caret-position-mirror-div");
if (el == null ? void 0 : el.parentNode)
el.parentNode.removeChild(el);
}
const div = document.createElement("div");
div.id = "input-textarea-caret-position-mirror-div";
document.body.appendChild(div);
const style = div.style;
const computed2 = window.getComputedStyle(element);
const isInput = element.nodeName === "INPUT";
style.whiteSpace = isInput ? "nowrap" : "pre-wrap";
if (!isInput)
style.wordWrap = "break-word";
style.position = "absolute";
if (!options.debug)
style.visibility = "hidden";
properties.forEach((prop) => {
if (isInput && prop === "lineHeight") {
if (computed2.boxSizing === "border-box") {
const height = Number.parseInt(computed2.height);
const outerHeight = Number.parseInt(computed2.paddingTop) + Number.parseInt(computed2.paddingBottom) + Number.parseInt(computed2.borderTopWidth) + Number.parseInt(computed2.borderBottomWidth);
const targetHeight = outerHeight + Number.parseInt(computed2.lineHeight);
if (height > targetHeight) {
style.lineHeight = `${height - outerHeight}px`;
} else if (height === targetHeight) {
style.lineHeight = computed2.lineHeight;
} else {
style.lineHeight = "0";
}
} else {
style.lineHeight = computed2.height;
}
} else {
style[prop] = computed2[prop];
}
});
if (isFirefox()) {
if (element.scrollHeight > Number.parseInt(computed2.height)) {
style.overflowY = "scroll";
}
} else {
style.overflow = "hidden";
}
div.textContent = element.value.slice(0, Math.max(0, position));
if (isInput && div.textContent) {
div.textContent = div.textContent.replace(/\s/g, "Â ");
}
const span = document.createElement("span");
span.textContent = element.value.slice(Math.max(0, position)) || ".";
span.style.position = "relative";
span.style.left = `${-element.scrollLeft}px`;
span.style.top = `${-element.scrollTop}px`;
div.appendChild(span);
const relativePosition = {
top: span.offsetTop + Number.parseInt(computed2.borderTopWidth),
left: span.offsetLeft + Number.parseInt(computed2.borderLeftWidth),
height: Number.parseInt(computed2.fontSize) * 1.5
};
if (options.debug) {
span.style.backgroundColor = "#aaa";
} else {
document.body.removeChild(div);
}
if (relativePosition.left >= element.clientWidth) {
relativePosition.left = element.clientWidth;
}
return relativePosition;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/mention/src/mention.mjs
init_shared_esm_bundler();
var mentionProps = buildProps({
...inputProps,
options: {
type: definePropType(Array),
default: () => []
},
prefix: {
type: definePropType([String, Array]),
default: "@",
validator: (val) => {
if (isString(val))
return val.length === 1;
return val.every((v2) => isString(v2) && v2.length === 1);
}
},
split: {
type: String,
default: " ",
validator: (val) => val.length === 1
},
filterOption: {
type: definePropType([Boolean, Function]),
default: () => filterOption,
validator: (val) => {
if (val === false)
return true;
return isFunction(val);
}
},
placement: {
type: definePropType(String),
default: "bottom"
},
showArrow: Boolean,
offset: {
type: Number,
default: 0
},
whole: Boolean,
checkIsWhole: {
type: definePropType(Function)
},
modelValue: String,
loading: Boolean,
popperClass: useTooltipContentProps.popperClass,
popperStyle: useTooltipContentProps.popperStyle,
popperOptions: {
type: definePropType(Object),
default: () => ({})
},
props: {
type: definePropType(Object),
default: () => mentionDefaultProps
}
});
var mentionEmits = {
[UPDATE_MODEL_EVENT]: (value) => isString(value),
"whole-remove": (pattern4, prefix) => isString(pattern4) && isString(prefix),
input: (value) => isString(value),
search: (pattern4, prefix) => isString(pattern4) && isString(prefix),
select: (option, prefix) => isObject(option) && isString(prefix),
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent
};
var mentionDefaultProps = {
value: "value",
label: "label",
disabled: "disabled"
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/mention/src/mention-dropdown.mjs
init_shared_esm_bundler();
var mentionDropdownProps = buildProps({
options: {
type: definePropType(Array),
default: () => []
},
loading: Boolean,
disabled: Boolean,
contentId: String,
ariaLabel: String
});
var mentionDropdownEmits = {
select: (option) => isString(option.value)
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/mention/src/mention-dropdown2.mjs
var __default__86 = defineComponent({
name: "ElMentionDropdown"
});
var _sfc_main97 = defineComponent({
...__default__86,
props: mentionDropdownProps,
emits: mentionDropdownEmits,
setup(__props, { expose, emit }) {
const props = __props;
const ns = useNamespace("mention");
const { t } = useLocale();
const hoveringIndex = ref(-1);
const scrollbarRef = ref();
const optionRefs = ref();
const dropdownRef = ref();
const optionkls = (item, index) => [
ns.be("dropdown", "item"),
ns.is("hovering", hoveringIndex.value === index),
ns.is("disabled", item.disabled || props.disabled)
];
const handleSelect = (item) => {
if (item.disabled || props.disabled)
return;
emit("select", item);
};
const handleMouseEnter = (index) => {
hoveringIndex.value = index;
};
const filteredAllDisabled = computed(() => props.disabled || props.options.every((item) => item.disabled));
const hoverOption = computed(() => props.options[hoveringIndex.value]);
const selectHoverOption = () => {
if (!hoverOption.value)
return;
emit("select", hoverOption.value);
};
const navigateOptions = (direction) => {
const { options } = props;
if (options.length === 0 || filteredAllDisabled.value)
return;
if (direction === "next") {
hoveringIndex.value++;
if (hoveringIndex.value === options.length) {
hoveringIndex.value = 0;
}
} else if (direction === "prev") {
hoveringIndex.value--;
if (hoveringIndex.value < 0) {
hoveringIndex.value = options.length - 1;
}
}
const option = options[hoveringIndex.value];
if (option.disabled) {
navigateOptions(direction);
return;
}
nextTick(() => scrollToOption(option));
};
const scrollToOption = (option) => {
var _a, _b, _c, _d;
const { options } = props;
const index = options.findIndex((item) => item.value === option.value);
const target2 = (_a = optionRefs.value) == null ? void 0 : _a[index];
if (target2) {
const menu = (_c = (_b = dropdownRef.value) == null ? void 0 : _b.querySelector) == null ? void 0 : _c.call(_b, `.${ns.be("dropdown", "wrap")}`);
if (menu) {
scrollIntoView(menu, target2);
}
}
(_d = scrollbarRef.value) == null ? void 0 : _d.handleScroll();
};
const resetHoveringIndex = () => {
if (filteredAllDisabled.value || props.options.length === 0) {
hoveringIndex.value = -1;
} else {
hoveringIndex.value = 0;
}
};
watch(() => props.options, resetHoveringIndex, {
immediate: true
});
expose({
hoveringIndex,
navigateOptions,
selectHoverOption,
hoverOption
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "dropdownRef",
ref: dropdownRef,
class: normalizeClass(unref(ns).b("dropdown"))
}, [
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(ns).be("dropdown", "header"))
}, [
renderSlot(_ctx.$slots, "header")
], 2)) : createCommentVNode("v-if", true),
withDirectives(createVNode(unref(ElScrollbar), {
id: _ctx.contentId,
ref_key: "scrollbarRef",
ref: scrollbarRef,
tag: "ul",
"wrap-class": unref(ns).be("dropdown", "wrap"),
"view-class": unref(ns).be("dropdown", "list"),
role: "listbox",
"aria-label": _ctx.ariaLabel,
"aria-orientation": "vertical"
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
return openBlock(), createElementBlock("li", {
id: `${_ctx.contentId}-${index}`,
ref_for: true,
ref_key: "optionRefs",
ref: optionRefs,
key: index,
class: normalizeClass(optionkls(item, index)),
role: "option",
"aria-disabled": item.disabled || _ctx.disabled || void 0,
"aria-selected": hoveringIndex.value === index,
onMousemove: ($event) => handleMouseEnter(index),
onClick: withModifiers(($event) => handleSelect(item), ["stop"])
}, [
renderSlot(_ctx.$slots, "label", {
item,
index
}, () => {
var _a;
return [
createBaseVNode("span", null, toDisplayString((_a = item.label) != null ? _a : item.value), 1)
];
})
], 42, ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"]);
}), 128))
]),
_: 3
}, 8, ["id", "wrap-class", "view-class", "aria-label"]), [
[vShow, _ctx.options.length > 0 && !_ctx.loading]
]),
_ctx.loading ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(unref(ns).be("dropdown", "loading"))
}, [
renderSlot(_ctx.$slots, "loading", {}, () => [
createTextVNode(toDisplayString(unref(t)("el.mention.loading")), 1)
])
], 2)) : createCommentVNode("v-if", true),
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(unref(ns).be("dropdown", "footer"))
}, [
renderSlot(_ctx.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var ElMentionDropdown = _export_sfc(_sfc_main97, [["__file", "mention-dropdown.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/mention/src/mention2.mjs
init_shared_esm_bundler();
var __default__87 = defineComponent({
name: "ElMention",
inheritAttrs: false
});
var _sfc_main98 = defineComponent({
...__default__87,
props: mentionProps,
emits: mentionEmits,
setup(__props, { expose, emit }) {
const props = __props;
const passInputProps = computed(() => pick_default(props, Object.keys(inputProps)));
const ns = useNamespace("mention");
const disabled = useFormDisabled();
const contentId = useId();
const elInputRef = ref();
const tooltipRef = ref();
const dropdownRef = ref();
const visible = ref(false);
const cursorStyle = ref();
const mentionCtx = ref();
const computedPlacement = computed(() => props.showArrow ? props.placement : `${props.placement}-start`);
const computedFallbackPlacements = computed(() => props.showArrow ? ["bottom", "top"] : ["bottom-start", "top-start"]);
const aliasProps = computed(() => ({
...mentionDefaultProps,
...props.props
}));
const mapOption = (option) => {
const base = {
label: option[aliasProps.value.label],
value: option[aliasProps.value.value],
disabled: option[aliasProps.value.disabled]
};
return { ...option, ...base };
};
const options = computed(() => props.options.map(mapOption));
const filteredOptions = computed(() => {
const { filterOption: filterOption2 } = props;
if (!mentionCtx.value || !filterOption2)
return options.value;
return options.value.filter((option) => filterOption2(mentionCtx.value.pattern, option));
});
const dropdownVisible = computed(() => {
return visible.value && (!!filteredOptions.value.length || props.loading);
});
const hoveringId = computed(() => {
var _a;
return `${contentId.value}-${(_a = dropdownRef.value) == null ? void 0 : _a.hoveringIndex}`;
});
const handleInputChange = (value) => {
emit(UPDATE_MODEL_EVENT, value);
emit(INPUT_EVENT, value);
syncAfterCursorMove();
};
const handleInputKeyDown = (event) => {
var _a, _b, _c, _d;
if ((_a = elInputRef.value) == null ? void 0 : _a.isComposing)
return;
const code = getEventCode(event);
switch (code) {
case EVENT_CODE.left:
case EVENT_CODE.right:
syncAfterCursorMove();
break;
case EVENT_CODE.up:
case EVENT_CODE.down:
if (!visible.value)
return;
event.preventDefault();
(_b = dropdownRef.value) == null ? void 0 : _b.navigateOptions(code === EVENT_CODE.up ? "prev" : "next");
break;
case EVENT_CODE.enter:
case EVENT_CODE.numpadEnter:
if (!visible.value) {
props.type !== "textarea" && syncAfterCursorMove();
return;
}
event.preventDefault();
if ((_c = dropdownRef.value) == null ? void 0 : _c.hoverOption) {
(_d = dropdownRef.value) == null ? void 0 : _d.selectHoverOption();
} else {
visible.value = false;
}
break;
case EVENT_CODE.esc:
if (!visible.value)
return;
event.preventDefault();
visible.value = false;
break;
case EVENT_CODE.backspace:
if (props.whole && mentionCtx.value) {
const { splitIndex, selectionEnd, pattern: pattern4, prefixIndex, prefix } = mentionCtx.value;
const inputEl = getInputEl();
if (!inputEl)
return;
const inputValue = inputEl.value;
const matchOption = options.value.find((item) => item.value === pattern4);
const isWhole = isFunction(props.checkIsWhole) ? props.checkIsWhole(pattern4, prefix) : matchOption;
if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {
event.preventDefault();
const newValue = inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1);
emit(UPDATE_MODEL_EVENT, newValue);
emit(INPUT_EVENT, newValue);
emit("whole-remove", pattern4, prefix);
const newSelectionEnd = prefixIndex;
nextTick(() => {
inputEl.selectionStart = newSelectionEnd;
inputEl.selectionEnd = newSelectionEnd;
syncDropdownVisible();
});
}
}
}
};
const { wrapperRef } = useFocusController(elInputRef, {
disabled,
afterFocus() {
syncAfterCursorMove();
},
beforeBlur(event) {
var _a;
return (_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event);
},
afterBlur() {
visible.value = false;
}
});
const handleInputMouseDown = () => {
syncAfterCursorMove();
};
const getOriginalOption = (mentionOption) => {
return props.options.find((option) => {
return mentionOption.value === option[aliasProps.value.value];
});
};
const handleSelect = (item) => {
if (!mentionCtx.value)
return;
const inputEl = getInputEl();
if (!inputEl)
return;
const inputValue = inputEl.value;
const { split } = props;
const newEndPart = inputValue.slice(mentionCtx.value.end);
const alreadySeparated = newEndPart.startsWith(split);
const newMiddlePart = `${item.value}${alreadySeparated ? "" : split}`;
const newValue = inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart;
emit(UPDATE_MODEL_EVENT, newValue);
emit(INPUT_EVENT, newValue);
emit("select", getOriginalOption(item), mentionCtx.value.prefix);
const newSelectionEnd = mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0);
nextTick(() => {
inputEl.selectionStart = newSelectionEnd;
inputEl.selectionEnd = newSelectionEnd;
inputEl.focus();
syncDropdownVisible();
});
};
const getInputEl = () => {
var _a, _b;
return props.type === "textarea" ? (_a = elInputRef.value) == null ? void 0 : _a.textarea : (_b = elInputRef.value) == null ? void 0 : _b.input;
};
const syncAfterCursorMove = () => {
setTimeout(() => {
syncCursor();
syncDropdownVisible();
nextTick(() => {
var _a;
return (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
});
}, 0);
};
const syncCursor = () => {
const inputEl = getInputEl();
if (!inputEl)
return;
const caretPosition = getCursorPosition(inputEl);
const inputRect = inputEl.getBoundingClientRect();
const wrapperRect = wrapperRef.value.getBoundingClientRect();
cursorStyle.value = {
position: "absolute",
width: 0,
height: `${caretPosition.height}px`,
left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,
top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`
};
};
const syncDropdownVisible = () => {
const inputEl = getInputEl();
if (document.activeElement !== inputEl) {
visible.value = false;
return;
}
const { prefix, split } = props;
mentionCtx.value = getMentionCtx(inputEl, prefix, split);
if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {
visible.value = true;
emit("search", mentionCtx.value.pattern, mentionCtx.value.prefix);
return;
}
visible.value = false;
};
expose({
input: elInputRef,
tooltip: tooltipRef,
dropdownVisible
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "wrapperRef",
ref: wrapperRef,
class: normalizeClass(unref(ns).b())
}, [
createVNode(unref(ElInput), mergeProps(mergeProps(unref(passInputProps), _ctx.$attrs), {
ref_key: "elInputRef",
ref: elInputRef,
"model-value": _ctx.modelValue,
disabled: unref(disabled),
role: unref(dropdownVisible) ? "combobox" : void 0,
"aria-activedescendant": unref(dropdownVisible) ? unref(hoveringId) || "" : void 0,
"aria-controls": unref(dropdownVisible) ? unref(contentId) : void 0,
"aria-expanded": unref(dropdownVisible) || void 0,
"aria-label": _ctx.ariaLabel,
"aria-autocomplete": unref(dropdownVisible) ? "none" : void 0,
"aria-haspopup": unref(dropdownVisible) ? "listbox" : void 0,
onInput: handleInputChange,
onKeydown: handleInputKeyDown,
onMousedown: handleInputMouseDown
}), createSlots({
_: 2
}, [
renderList(_ctx.$slots, (_2, name) => {
return {
name,
fn: withCtx((slotProps) => [
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
])
};
})
]), 1040, ["model-value", "disabled", "role", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "aria-autocomplete", "aria-haspopup"]),
createVNode(unref(ElTooltip), {
ref_key: "tooltipRef",
ref: tooltipRef,
visible: unref(dropdownVisible),
"popper-class": [unref(ns).e("popper"), _ctx.popperClass],
"popper-style": _ctx.popperStyle,
"popper-options": _ctx.popperOptions,
placement: unref(computedPlacement),
"fallback-placements": unref(computedFallbackPlacements),
effect: "light",
pure: "",
offset: _ctx.offset,
"show-arrow": _ctx.showArrow
}, {
default: withCtx(() => [
createBaseVNode("div", {
style: normalizeStyle(cursorStyle.value)
}, null, 4)
]),
content: withCtx(() => {
var _a;
return [
createVNode(ElMentionDropdown, {
ref_key: "dropdownRef",
ref: dropdownRef,
options: unref(filteredOptions),
disabled: unref(disabled),
loading: _ctx.loading,
"content-id": unref(contentId),
"aria-label": _ctx.ariaLabel,
onSelect: handleSelect,
onClick: withModifiers((_a = elInputRef.value) == null ? void 0 : _a.focus, ["stop"])
}, createSlots({
_: 2
}, [
renderList(_ctx.$slots, (_2, name) => {
return {
name,
fn: withCtx((slotProps) => [
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
])
};
})
]), 1032, ["options", "disabled", "loading", "content-id", "aria-label", "onClick"])
];
}),
_: 3
}, 8, ["visible", "popper-class", "popper-style", "popper-options", "placement", "fallback-placements", "offset", "show-arrow"])
], 2);
};
}
});
var Mention = _export_sfc(_sfc_main98, [["__file", "mention.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/mention/index.mjs
var ElMention = withInstall(Mention);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/splitter.mjs
var splitterProps = buildProps({
layout: {
type: String,
default: "horizontal",
values: ["horizontal", "vertical"]
},
lazy: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/type.mjs
var splitterRootContextKey = Symbol("splitterRootContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs
function useContainer(layout) {
const containerEl = ref();
const { width, height } = useElementSize(containerEl);
const containerSize = computed(() => {
return layout.value === "horizontal" ? width.value : height.value;
});
return { containerEl, containerSize };
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs
init_shared_esm_bundler();
function getPct(str) {
return Number(str.slice(0, -1)) / 100;
}
function getPx(str) {
return Number(str.slice(0, -2));
}
function isPct(itemSize2) {
return isString(itemSize2) && itemSize2.endsWith("%");
}
function isPx(itemSize2) {
return isString(itemSize2) && itemSize2.endsWith("px");
}
function useSize2(panels, containerSize) {
const propSizes = computed(() => panels.value.map((i) => i.size));
const panelCounts = computed(() => panels.value.length);
const percentSizes = ref([]);
watch([propSizes, panelCounts, containerSize], () => {
var _a;
let ptgList = [];
let emptyCount = 0;
for (let i = 0; i < panelCounts.value; i += 1) {
const itemSize2 = (_a = panels.value[i]) == null ? void 0 : _a.size;
if (isPct(itemSize2)) {
ptgList[i] = getPct(itemSize2);
} else if (isPx(itemSize2)) {
ptgList[i] = getPx(itemSize2) / containerSize.value;
} else if (itemSize2 || itemSize2 === 0) {
const num = Number(itemSize2);
if (!Number.isNaN(num)) {
ptgList[i] = num / containerSize.value;
}
} else {
emptyCount += 1;
ptgList[i] = void 0;
}
}
const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);
if (totalPtg > 1 || !emptyCount) {
const scale = 1 / totalPtg;
ptgList = ptgList.map((ptg) => ptg === void 0 ? 0 : ptg * scale);
} else {
const avgRest = (1 - totalPtg) / emptyCount;
ptgList = ptgList.map((ptg) => ptg === void 0 ? avgRest : ptg);
}
percentSizes.value = ptgList;
});
const ptg2px = (ptg) => ptg * containerSize.value;
const pxSizes = computed(() => percentSizes.value.map(ptg2px));
return { percentSizes, pxSizes };
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs
init_shared_esm_bundler();
function useResize(panels, containerSize, pxSizes, lazy) {
const ptg2px = (ptg) => ptg * containerSize.value || 0;
function getLimitSize(str, defaultLimit) {
if (isPct(str)) {
return ptg2px(getPct(str));
} else if (isPx(str)) {
return getPx(str);
}
return str != null ? str : defaultLimit;
}
const lazyOffset = ref(0);
const movingIndex = ref(null);
let cachePxSizes = [];
let updatePanelSizes = NOOP;
const limitSizes = computed(() => panels.value.map((item) => [item.min, item.max]));
watch(lazy, () => {
if (lazyOffset.value) {
const mouseup = new MouseEvent("mouseup", { bubbles: true });
window.dispatchEvent(mouseup);
}
});
const onMoveStart = (index) => {
lazyOffset.value = 0;
movingIndex.value = { index, confirmed: false };
cachePxSizes = pxSizes.value;
};
const onMoving = (index, offset2) => {
var _a, _b;
let confirmedIndex = null;
if ((!movingIndex.value || !movingIndex.value.confirmed) && offset2 !== 0) {
if (offset2 > 0) {
confirmedIndex = index;
movingIndex.value = { index, confirmed: true };
} else {
for (let i = index; i >= 0; i -= 1) {
if (cachePxSizes[i] > 0) {
confirmedIndex = i;
movingIndex.value = { index: i, confirmed: true };
break;
}
}
}
}
const mergedIndex = (_b = confirmedIndex != null ? confirmedIndex : (_a = movingIndex.value) == null ? void 0 : _a.index) != null ? _b : index;
const numSizes = [...cachePxSizes];
const nextIndex = mergedIndex + 1;
const startMinSize = getLimitSize(limitSizes.value[mergedIndex][0], 0);
const endMinSize = getLimitSize(limitSizes.value[nextIndex][0], 0);
const startMaxSize = getLimitSize(limitSizes.value[mergedIndex][1], containerSize.value || 0);
const endMaxSize = getLimitSize(limitSizes.value[nextIndex][1], containerSize.value || 0);
let mergedOffset = offset2;
if (numSizes[mergedIndex] + mergedOffset < startMinSize) {
mergedOffset = startMinSize - numSizes[mergedIndex];
}
if (numSizes[nextIndex] - mergedOffset < endMinSize) {
mergedOffset = numSizes[nextIndex] - endMinSize;
}
if (numSizes[mergedIndex] + mergedOffset > startMaxSize) {
mergedOffset = startMaxSize - numSizes[mergedIndex];
}
if (numSizes[nextIndex] - mergedOffset > endMaxSize) {
mergedOffset = numSizes[nextIndex] - endMaxSize;
}
numSizes[mergedIndex] += mergedOffset;
numSizes[nextIndex] -= mergedOffset;
lazyOffset.value = mergedOffset;
updatePanelSizes = () => {
panels.value.forEach((panel, index2) => {
panel.size = numSizes[index2];
});
updatePanelSizes = NOOP;
};
if (!lazy.value) {
updatePanelSizes();
}
};
const onMoveEnd = () => {
if (lazy.value) {
updatePanelSizes();
}
lazyOffset.value = 0;
movingIndex.value = null;
cachePxSizes = [];
};
const cacheCollapsedSize = [];
const onCollapse = (index, type4) => {
if (!cacheCollapsedSize.length) {
cacheCollapsedSize.push(...pxSizes.value);
}
const currentSizes = pxSizes.value;
const currentIndex = type4 === "start" ? index : index + 1;
const targetIndex = type4 === "start" ? index + 1 : index;
const currentSize = currentSizes[currentIndex];
const targetSize = currentSizes[targetIndex];
if (currentSize !== 0 && targetSize !== 0) {
currentSizes[currentIndex] = 0;
currentSizes[targetIndex] += currentSize;
cacheCollapsedSize[index] = currentSize;
} else {
const totalSize = currentSize + targetSize;
const targetCacheCollapsedSize = cacheCollapsedSize[index];
const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
currentSizes[targetIndex] = targetCacheCollapsedSize;
currentSizes[currentIndex] = currentCacheCollapsedSize;
}
panels.value.forEach((panel, index2) => {
panel.size = currentSizes[index2];
});
};
return {
lazyOffset,
onMoveStart,
onMoving,
onMoveEnd,
movingIndex,
onCollapse
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/splitter2.mjs
var __default__88 = defineComponent({
name: "ElSplitter"
});
var _sfc_main99 = defineComponent({
...__default__88,
props: splitterProps,
emits: ["resizeStart", "resize", "resizeEnd", "collapse"],
setup(__props, { emit: emits }) {
const props = __props;
const ns = useNamespace("splitter");
const layout = toRef(props, "layout");
const lazy = toRef(props, "lazy");
const { containerEl, containerSize } = useContainer(layout);
const {
removeChild: unregisterPanel,
children: panels,
addChild: registerPanel,
ChildrenSorter: PanelsSorter
} = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel");
watch(panels, () => {
panels.value.forEach((instance, index) => {
instance.setIndex(index);
});
});
const { percentSizes, pxSizes } = useSize2(panels, containerSize);
const {
lazyOffset,
movingIndex,
onMoveStart,
onMoving,
onMoveEnd,
onCollapse
} = useResize(panels, containerSize, pxSizes, lazy);
const splitterStyles = computed(() => {
return {
[ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0
};
});
const onResizeStart = (index) => {
onMoveStart(index);
emits("resizeStart", index, pxSizes.value);
};
const onResize = (index, offset2) => {
onMoving(index, offset2);
if (!lazy.value) {
emits("resize", index, pxSizes.value);
}
};
const onResizeEnd = async (index) => {
onMoveEnd();
await nextTick();
emits("resizeEnd", index, pxSizes.value);
};
const onCollapsible = (index, type4) => {
onCollapse(index, type4);
emits("collapse", index, type4, pxSizes.value);
};
provide(splitterRootContextKey, reactive({
panels,
percentSizes,
pxSizes,
layout,
lazy,
movingIndex,
containerSize,
onMoveStart: onResizeStart,
onMoving: onResize,
onMoveEnd: onResizeEnd,
onCollapse: onCollapsible,
registerPanel,
unregisterPanel
}));
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
ref_key: "containerEl",
ref: containerEl,
class: normalizeClass([unref(ns).b(), unref(ns).e(unref(layout))]),
style: normalizeStyle(unref(splitterStyles))
}, [
renderSlot(_ctx.$slots, "default"),
createVNode(unref(PanelsSorter)),
createCommentVNode(" Prevent iframe touch events from breaking "),
unref(movingIndex) ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${unref(layout)}`)])
}, null, 2)) : createCommentVNode("v-if", true)
], 6);
};
}
});
var Splitter = _export_sfc(_sfc_main99, [["__file", "splitter.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs
init_shared_esm_bundler();
function getCollapsible(collapsible) {
if (collapsible && isObject(collapsible)) {
return collapsible;
}
return {
start: !!collapsible,
end: !!collapsible
};
}
function isCollapsible(panel, size, nextPanel, nextSize) {
if ((panel == null ? void 0 : panel.collapsible.end) && size > 0) {
return true;
}
if ((nextPanel == null ? void 0 : nextPanel.collapsible.start) && nextSize === 0 && size > 0) {
return true;
}
return false;
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/split-bar.mjs
var __default__89 = defineComponent({
name: "ElSplitterBar"
});
var _sfc_main100 = defineComponent({
...__default__89,
props: {
index: {
type: Number,
required: true
},
layout: {
type: String,
values: ["horizontal", "vertical"],
default: "horizontal"
},
resizable: {
type: Boolean,
default: true
},
lazy: Boolean,
startCollapsible: Boolean,
endCollapsible: Boolean
},
emits: ["moveStart", "moving", "moveEnd", "collapse"],
setup(__props, { emit }) {
const props = __props;
const ns = useNamespace("splitter-bar");
const isHorizontal = computed(() => props.layout === "horizontal");
const barWrapStyles = computed(() => {
if (isHorizontal.value) {
return { width: 0 };
}
return { height: 0 };
});
const draggerStyles = computed(() => {
return {
width: isHorizontal.value ? "16px" : "100%",
height: isHorizontal.value ? "100%" : "16px",
cursor: !props.resizable ? "auto" : isHorizontal.value ? "ew-resize" : "ns-resize",
touchAction: "none"
};
});
const draggerPseudoClass = computed(() => {
const prefix = ns.e("dragger");
return {
[`${prefix}-horizontal`]: isHorizontal.value,
[`${prefix}-vertical`]: !isHorizontal.value,
[`${prefix}-active`]: !!startPos.value
};
});
const startPos = ref(null);
const onMousedown = (e) => {
if (!props.resizable)
return;
startPos.value = [e.pageX, e.pageY];
emit("moveStart", props.index);
window.addEventListener("mouseup", onMouseUp);
window.addEventListener("mousemove", onMouseMove);
};
const onTouchStart = (e) => {
if (props.resizable && e.touches.length === 1) {
e.preventDefault();
const touch = e.touches[0];
startPos.value = [touch.pageX, touch.pageY];
emit("moveStart", props.index);
window.addEventListener("touchend", onTouchEnd);
window.addEventListener("touchmove", onTouchMove);
}
};
const onMouseMove = (e) => {
const { pageX, pageY } = e;
const offsetX = pageX - startPos.value[0];
const offsetY = pageY - startPos.value[1];
const offset2 = isHorizontal.value ? offsetX : offsetY;
emit("moving", props.index, offset2);
};
const onTouchMove = (e) => {
if (e.touches.length === 1) {
e.preventDefault();
const touch = e.touches[0];
const offsetX = touch.pageX - startPos.value[0];
const offsetY = touch.pageY - startPos.value[1];
const offset2 = isHorizontal.value ? offsetX : offsetY;
emit("moving", props.index, offset2);
}
};
const onMouseUp = () => {
startPos.value = null;
window.removeEventListener("mouseup", onMouseUp);
window.removeEventListener("mousemove", onMouseMove);
emit("moveEnd", props.index);
};
const onTouchEnd = () => {
startPos.value = null;
window.removeEventListener("touchend", onTouchEnd);
window.removeEventListener("touchmove", onTouchMove);
emit("moveEnd", props.index);
};
const StartIcon = computed(() => isHorizontal.value ? arrow_left_default : arrow_up_default);
const EndIcon = computed(() => isHorizontal.value ? arrow_right_default : arrow_down_default);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([unref(ns).b()]),
style: normalizeStyle(unref(barWrapStyles))
}, [
__props.startCollapsible ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-start`)]),
onClick: ($event) => emit("collapse", __props.index, "start")
}, [
renderSlot(_ctx.$slots, "start-collapsible", {}, () => [
(openBlock(), createBlock(resolveDynamicComponent(unref(StartIcon)), { style: { "width": "12px", "height": "12px" } }))
])
], 10, ["onClick"])) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass([
unref(ns).e("dragger"),
unref(draggerPseudoClass),
unref(ns).is("disabled", !__props.resizable),
unref(ns).is("lazy", __props.resizable && __props.lazy)
]),
style: normalizeStyle(unref(draggerStyles)),
onMousedown,
onTouchstart: onTouchStart
}, null, 38),
__props.endCollapsible ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-end`)]),
onClick: ($event) => emit("collapse", __props.index, "end")
}, [
renderSlot(_ctx.$slots, "end-collapsible", {}, () => [
(openBlock(), createBlock(resolveDynamicComponent(unref(EndIcon)), { style: { "width": "12px", "height": "12px" } }))
])
], 10, ["onClick"])) : createCommentVNode("v-if", true)
], 6);
};
}
});
var SplitBar = _export_sfc(_sfc_main100, [["__file", "split-bar.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/split-panel.mjs
var splitterPanelProps = buildProps({
min: {
type: [String, Number]
},
max: {
type: [String, Number]
},
size: {
type: [String, Number]
},
resizable: {
type: Boolean,
default: true
},
collapsible: Boolean
});
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/src/split-panel2.mjs
var COMPONENT_NAME19 = "ElSplitterPanel";
var __default__90 = defineComponent({
name: COMPONENT_NAME19
});
var _sfc_main101 = defineComponent({
...__default__90,
props: splitterPanelProps,
emits: ["update:size"],
setup(__props, { emit: emits }) {
const props = __props;
const ns = useNamespace("splitter-panel");
const splitterContext = inject(splitterRootContextKey);
if (!splitterContext)
throwError(COMPONENT_NAME19, "usage: ");
const { panels, layout, lazy, containerSize, pxSizes } = toRefs(splitterContext);
const {
registerPanel,
unregisterPanel,
onCollapse,
onMoveEnd,
onMoveStart,
onMoving
} = splitterContext;
const panelEl = ref();
const instance = getCurrentInstance();
const uid2 = instance.uid;
const index = ref(0);
const panel = computed(() => panels.value[index.value]);
const setIndex = (val) => {
index.value = val;
};
const panelSize = computed(() => {
var _a;
if (!panel.value)
return 0;
return (_a = pxSizes.value[index.value]) != null ? _a : 0;
});
const nextSize = computed(() => {
var _a;
if (!panel.value)
return 0;
return (_a = pxSizes.value[index.value + 1]) != null ? _a : 0;
});
const nextPanel = computed(() => {
if (panel.value) {
return panels.value[index.value + 1];
}
return null;
});
const isResizable = computed(() => {
var _a;
if (!nextPanel.value)
return false;
return props.resizable && ((_a = nextPanel.value) == null ? void 0 : _a.resizable) && (panelSize.value !== 0 || !props.min) && (nextSize.value !== 0 || !nextPanel.value.min);
});
const isShowBar = computed(() => {
if (!panel.value)
return false;
return index.value !== panels.value.length - 1;
});
const startCollapsible = computed(() => isCollapsible(panel.value, panelSize.value, nextPanel.value, nextSize.value));
const endCollapsible = computed(() => isCollapsible(nextPanel.value, nextSize.value, panel.value, panelSize.value));
function sizeToPx(str) {
if (isPct(str)) {
return getPct(str) * containerSize.value || 0;
} else if (isPx(str)) {
return getPx(str);
}
return str != null ? str : 0;
}
let isSizeUpdating = false;
watch(() => props.size, () => {
if (!isSizeUpdating && panel.value) {
if (!containerSize.value) {
panel.value.size = props.size;
return;
}
const size = sizeToPx(props.size);
const maxSize = sizeToPx(props.max);
const minSize = sizeToPx(props.min);
const finalSize = Math.min(Math.max(size, minSize || 0), maxSize || size);
if (finalSize !== size) {
emits("update:size", finalSize);
}
panel.value.size = finalSize;
}
});
watch(() => {
var _a;
return (_a = panel.value) == null ? void 0 : _a.size;
}, (val) => {
if (val !== props.size) {
isSizeUpdating = true;
emits("update:size", val);
nextTick(() => isSizeUpdating = false);
}
});
watch(() => props.resizable, (val) => {
if (panel.value) {
panel.value.resizable = val;
}
});
const _panel = reactive({
el: panelEl.value,
uid: uid2,
getVnode: () => instance.vnode,
setIndex,
...props,
collapsible: computed(() => getCollapsible(props.collapsible))
});
registerPanel(_panel);
onBeforeUnmount(() => unregisterPanel(_panel));
return (_ctx, _cache) => {
return openBlock(), createElementBlock(Fragment, null, [
createBaseVNode("div", mergeProps({
ref_key: "panelEl",
ref: panelEl,
class: [unref(ns).b()],
style: { flexBasis: `${unref(panelSize)}px` }
}, _ctx.$attrs), [
renderSlot(_ctx.$slots, "default")
], 16),
unref(isShowBar) ? (openBlock(), createBlock(SplitBar, {
key: 0,
index: index.value,
layout: unref(layout),
lazy: unref(lazy),
resizable: unref(isResizable),
"start-collapsible": unref(startCollapsible),
"end-collapsible": unref(endCollapsible),
onMoveStart: unref(onMoveStart),
onMoving: unref(onMoving),
onMoveEnd: unref(onMoveEnd),
onCollapse: unref(onCollapse)
}, {
"start-collapsible": withCtx(() => [
renderSlot(_ctx.$slots, "start-collapsible")
]),
"end-collapsible": withCtx(() => [
renderSlot(_ctx.$slots, "end-collapsible")
]),
_: 3
}, 8, ["index", "layout", "lazy", "resizable", "start-collapsible", "end-collapsible", "onMoveStart", "onMoving", "onMoveEnd", "onCollapse"])) : createCommentVNode("v-if", true)
], 64);
};
}
});
var SplitPanel = _export_sfc(_sfc_main101, [["__file", "split-panel.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/splitter/index.mjs
var ElSplitter = withInstall(Splitter, {
SplitPanel
});
var ElSplitterPanel = withNoopInstall(SplitPanel);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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,
ElColorPickerPanel,
ElColorPicker,
ElConfigProvider,
ElContainer,
ElAside,
ElFooter,
ElHeader,
ElMain,
ElDatePicker,
ElDatePickerPanel,
ElDescriptions,
ElDescriptionsItem,
ElDialog,
ElDivider,
ElDrawer,
ElDropdown,
ElDropdownItem,
ElDropdownMenu,
ElEmpty,
ElForm,
ElFormItem,
ElIcon,
ElImage,
ElImageViewer,
ElInput,
ElInputNumber,
ElInputTag,
ElLink,
ElMenu,
ElMenuItem,
ElMenuItemGroup,
ElSubMenu,
ElPageHeader,
ElPagination,
ElPopconfirm,
ElPopover,
ElPopper,
ElProgress,
ElRadio,
ElRadioButton,
ElRadioGroup,
ElRate,
ElResult,
ElRow,
ElScrollbar,
ElSelect,
ElOption,
ElOptionGroup,
ElSelectV2,
ElSkeleton,
ElSkeletonItem,
ElSlider,
ElSpace,
ElStatistic,
ElCountdown,
ElSteps,
ElStep,
ElSwitch,
ElTable,
ElTableColumn2,
ElTableV2,
ElTabs,
ElTabPane,
ElTag,
ElText,
ElTimePicker,
ElTimeSelect,
ElTimeline,
ElTimelineItem,
ElTooltip,
ElTransfer,
ElTree,
ElTreeSelect,
ElTreeV2,
ElUpload,
ElWatermark,
ElTour,
ElTourStep,
ElAnchor,
ElAnchorLink,
ElSegmented,
ElMention,
ElSplitter,
ElSplitterPanel
];
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/infinite-scroll/src/index.mjs
init_shared_esm_bundler();
var SCOPE5 = "ElInfiniteScroll";
var CHECK_INTERVAL = 50;
var DEFAULT_DELAY = 200;
var DEFAULT_DISTANCE = 0;
var attributes = {
delay: {
type: Number,
default: DEFAULT_DELAY
},
distance: {
type: Number,
default: DEFAULT_DISTANCE
},
disabled: {
type: Boolean,
default: false
},
immediate: {
type: Boolean,
default: true
}
};
var getScrollOptions = (el, instance) => {
return Object.entries(attributes).reduce((acm, [name, option]) => {
var _a, _b;
const { type: type4, default: defaultValue } = option;
const attrVal = el.getAttribute(`infinite-scroll-${name}`);
let value = (_b = (_a = instance[attrVal]) != null ? _a : attrVal) != null ? _b : defaultValue;
value = value === "false" ? false : value;
value = type4(value);
acm[name] = Number.isNaN(value) ? defaultValue : value;
return acm;
}, {});
};
var destroyObserver = (el) => {
const { observer } = el[SCOPE5];
if (observer) {
observer.disconnect();
delete el[SCOPE5].observer;
}
};
var handleScroll = (el, cb) => {
const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE5];
const { disabled, distance } = getScrollOptions(el, instance);
const { clientHeight, scrollHeight, scrollTop } = containerEl;
const delta = scrollTop - lastScrollTop;
el[SCOPE5].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[SCOPE5];
const { disabled } = getScrollOptions(el, instance);
if (disabled || containerEl.clientHeight === 0)
return;
if (containerEl.scrollHeight <= containerEl.clientHeight) {
cb.call(instance);
} else {
destroyObserver(el);
}
}
var InfiniteScroll = {
async mounted(el, binding) {
const { instance, value: cb } = binding;
useDeprecated({
scope: SCOPE5,
from: "the directive v-infinite-scroll",
replacement: "the el-scrollbar infinite scroll",
version: "3.0.0",
ref: "https://element-plus.org/en-US/component/scrollbar#infinite-scroll"
}, true);
if (!isFunction(cb)) {
throwError(SCOPE5, "'v-infinite-scroll' binding value must be a function");
}
await nextTick();
const { delay, 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), delay);
if (!container)
return;
el[SCOPE5] = {
instance,
container,
containerEl,
delay,
cb,
onScroll,
lastScrollTop: containerEl.scrollTop
};
if (immediate) {
const observer = new MutationObserver(throttle_default(checkFull.bind(null, el, cb), CHECK_INTERVAL));
el[SCOPE5].observer = observer;
observer.observe(el, { childList: true, subtree: true });
checkFull(el, cb);
}
container.addEventListener("scroll", onScroll);
},
unmounted(el) {
if (!el[SCOPE5])
return;
const { container, onScroll } = el[SCOPE5];
container == null ? void 0 : container.removeEventListener("scroll", onScroll);
destroyObserver(el);
},
async updated(el) {
if (!el[SCOPE5]) {
await nextTick();
} else {
const { containerEl, cb, observer } = el[SCOPE5];
if (containerEl.clientHeight && observer) {
checkFull(el, cb);
}
}
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/loading/src/loading.mjs
function createLoadingComponent(options, appContext) {
let afterLeaveTimer;
const afterLeaveFlag = ref(false);
const data = reactive({
...options,
originalPosition: "",
originalOverflow: "",
visible: false
});
function setText(text) {
data.text = text;
}
function destroySelf() {
const target2 = data.parent;
const ns = vm.ns;
if (!target2.vLoadingAddClassList) {
let loadingNumber = target2.getAttribute("loading-number");
loadingNumber = Number.parseInt(loadingNumber) - 1;
if (!loadingNumber) {
removeClass(target2, ns.bm("parent", "relative"));
target2.removeAttribute("loading-number");
} else {
target2.setAttribute("loading-number", loadingNumber.toString());
}
removeClass(target2, ns.bm("parent", "hidden"));
}
removeElLoadingChild();
loadingInstance.unmount();
}
function removeElLoadingChild() {
var _a, _b;
(_b = (_a = vm.$el) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.removeChild(vm.$el);
}
function close2() {
var _a;
if (options.beforeClose && !options.beforeClose())
return;
afterLeaveFlag.value = true;
clearTimeout(afterLeaveTimer);
afterLeaveTimer = setTimeout(handleAfterLeave, 400);
data.visible = false;
(_a = options.closed) == null ? void 0 : _a.call(options);
}
function handleAfterLeave() {
if (!afterLeaveFlag.value)
return;
const target2 = data.parent;
afterLeaveFlag.value = false;
target2.vLoadingAddClassList = void 0;
destroySelf();
}
const elLoadingComponent = defineComponent({
name: "ElLoading",
setup(_2, { expose }) {
const { ns, zIndex } = useGlobalComponentSettings("loading");
expose({
ns,
zIndex
});
return () => {
const svg = data.spinner || data.svg;
const spinner = h("svg", {
class: "circular",
viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50",
...svg ? { innerHTML: svg } : {}
}, [
h("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]);
const spinnerText = data.text ? h("p", { class: ns.b("text") }, [data.text]) : void 0;
return h(Transition, {
name: ns.b("fade"),
onAfterLeave: handleAfterLeave
}, {
default: withCtx(() => [
withDirectives(createVNode("div", {
style: {
backgroundColor: data.background || ""
},
class: [
ns.b("mask"),
data.customClass,
ns.is("fullscreen", data.fullscreen)
]
}, [
h("div", {
class: ns.b("spinner")
}, [spinner, spinnerText])
]), [[vShow, data.visible]])
])
});
};
}
});
const loadingInstance = createApp(elLoadingComponent);
Object.assign(loadingInstance._context, appContext != null ? appContext : {});
const vm = loadingInstance.mount(document.createElement("div"));
return {
...toRefs(data),
setText,
removeElLoadingChild,
close: close2,
handleAfterLeave,
vm,
get $el() {
return vm.$el;
}
};
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/loading/src/service.mjs
init_shared_esm_bundler();
var fullscreenInstance = void 0;
var Loading = function(options = {}, context) {
if (!isClient)
return void 0;
const resolved = resolveOptions(options);
if (resolved.fullscreen && fullscreenInstance) {
return fullscreenInstance;
}
const instance = createLoadingComponent({
...resolved,
closed: () => {
var _a;
(_a = resolved.closed) == null ? void 0 : _a.call(resolved);
if (resolved.fullscreen)
fullscreenInstance = void 0;
}
}, context != null ? context : Loading._context);
addStyle(resolved, resolved.parent, instance);
addClassList(resolved, resolved.parent, instance);
resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
let loadingNumber = resolved.parent.getAttribute("loading-number");
if (!loadingNumber) {
loadingNumber = "1";
} else {
loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
}
resolved.parent.setAttribute("loading-number", loadingNumber);
resolved.parent.appendChild(instance.$el);
nextTick(() => instance.visible.value = resolved.visible);
if (resolved.fullscreen) {
fullscreenInstance = instance;
}
return instance;
};
var resolveOptions = (options) => {
var _a, _b, _c, _d;
let target2;
if (isString(options.target)) {
target2 = (_a = document.querySelector(options.target)) != null ? _a : document.body;
} else {
target2 = options.target || document.body;
}
return {
parent: target2 === document.body || options.body ? document.body : target2,
background: options.background || "",
svg: options.svg || "",
svgViewBox: options.svgViewBox || "",
spinner: options.spinner || false,
text: options.text || "",
fullscreen: target2 === document.body && ((_b = options.fullscreen) != null ? _b : true),
lock: (_c = options.lock) != null ? _c : false,
customClass: options.customClass || "",
visible: (_d = options.visible) != null ? _d : true,
beforeClose: options.beforeClose,
closed: options.closed,
target: target2
};
};
var addStyle = async (options, parent, instance) => {
const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex;
const maskStyle = {};
if (options.fullscreen) {
instance.originalPosition.value = getStyle(document.body, "position");
instance.originalOverflow.value = getStyle(document.body, "overflow");
maskStyle.zIndex = nextZIndex();
} else if (options.parent === document.body) {
instance.originalPosition.value = getStyle(document.body, "position");
await nextTick();
for (const property of ["top", "left"]) {
const scroll = property === "top" ? "scrollTop" : "scrollLeft";
maskStyle[property] = `${options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property}`), 10)}px`;
}
for (const property of ["height", "width"]) {
maskStyle[property] = `${options.target.getBoundingClientRect()[property]}px`;
}
} else {
instance.originalPosition.value = getStyle(parent, "position");
}
for (const [key, value] of Object.entries(maskStyle)) {
instance.$el.style[key] = value;
}
};
var addClassList = (options, parent, instance) => {
const ns = instance.vm.ns || instance.vm._.exposed.ns;
if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) {
addClass(parent, ns.bm("parent", "relative"));
} else {
removeClass(parent, ns.bm("parent", "relative"));
}
if (options.fullscreen && options.lock) {
addClass(parent, ns.bm("parent", "hidden"));
} else {
removeClass(parent, ns.bm("parent", "hidden"));
}
};
Loading._context = null;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/loading/src/directive.mjs
init_shared_esm_bundler();
var INSTANCE_KEY = Symbol("ElLoading");
var getAttributeName = (name) => {
return `element-loading-${hyphenate(name)}`;
};
var createInstance = (el, binding) => {
var _a, _b, _c, _d;
const vm = binding.instance;
const getBindingProp = (key) => isObject(binding.value) ? binding.value[key] : void 0;
const resolveExpression = (key) => {
const data = isString(key) && (vm == null ? void 0 : vm[key]) || key;
return ref(data);
};
const getProp2 = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(getAttributeName(name)));
const fullscreen = (_a = getBindingProp("fullscreen")) != null ? _a : binding.modifiers.fullscreen;
const options = {
text: getProp2("text"),
svg: getProp2("svg"),
svgViewBox: getProp2("svgViewBox"),
spinner: getProp2("spinner"),
background: getProp2("background"),
customClass: getProp2("customClass"),
fullscreen,
target: (_b = getBindingProp("target")) != null ? _b : fullscreen ? void 0 : el,
body: (_c = getBindingProp("body")) != null ? _c : binding.modifiers.body,
lock: (_d = getBindingProp("lock")) != null ? _d : binding.modifiers.lock
};
const instance = Loading(options);
instance._context = vLoading._context;
el[INSTANCE_KEY] = {
options,
instance
};
};
var updateOptions = (originalOptions, newOptions) => {
for (const key of Object.keys(originalOptions)) {
if (isRef(originalOptions[key]))
originalOptions[key].value = newOptions[key];
}
};
var vLoading = {
mounted(el, binding) {
if (binding.value) {
createInstance(el, binding);
}
},
updated(el, binding) {
const instance = el[INSTANCE_KEY];
if (!binding.value) {
instance == null ? void 0 : instance.instance.close();
el[INSTANCE_KEY] = null;
return;
}
if (!instance)
createInstance(el, binding);
else {
updateOptions(instance.options, isObject(binding.value) ? binding.value : {
text: el.getAttribute(getAttributeName("text")),
svg: el.getAttribute(getAttributeName("svg")),
svgViewBox: el.getAttribute(getAttributeName("svgViewBox")),
spinner: el.getAttribute(getAttributeName("spinner")),
background: el.getAttribute(getAttributeName("background")),
customClass: el.getAttribute(getAttributeName("customClass"))
});
}
},
unmounted(el) {
var _a;
(_a = el[INSTANCE_KEY]) == null ? void 0 : _a.instance.close();
el[INSTANCE_KEY] = null;
}
};
vLoading._context = null;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/loading/index.mjs
var ElLoading = {
install(app) {
Loading._context = app._context;
vLoading._context = app._context;
app.directive("loading", vLoading);
app.config.globalProperties.$loading = Loading;
},
directive: vLoading,
service: Loading
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message/src/message.mjs
var messageTypes = [
"primary",
"success",
"info",
"warning",
"error"
];
var messagePlacement = [
"top",
"top-left",
"top-right",
"bottom",
"bottom-left",
"bottom-right"
];
var MESSAGE_DEFAULT_PLACEMENT = "top";
var messageDefaults = mutable({
customClass: "",
dangerouslyUseHTMLString: false,
duration: 3e3,
icon: void 0,
id: "",
message: "",
onClose: void 0,
showClose: false,
type: "info",
plain: false,
offset: 16,
placement: void 0,
zIndex: 0,
grouping: false,
repeatNum: 1,
appendTo: isClient ? document.body : void 0
});
var messageProps = buildProps({
customClass: {
type: String,
default: messageDefaults.customClass
},
dangerouslyUseHTMLString: {
type: Boolean,
default: messageDefaults.dangerouslyUseHTMLString
},
duration: {
type: Number,
default: messageDefaults.duration
},
icon: {
type: iconPropType,
default: messageDefaults.icon
},
id: {
type: String,
default: messageDefaults.id
},
message: {
type: definePropType([
String,
Object,
Function
]),
default: messageDefaults.message
},
onClose: {
type: definePropType(Function),
default: messageDefaults.onClose
},
showClose: {
type: Boolean,
default: messageDefaults.showClose
},
type: {
type: String,
values: messageTypes,
default: messageDefaults.type
},
plain: {
type: Boolean,
default: messageDefaults.plain
},
offset: {
type: Number,
default: messageDefaults.offset
},
placement: {
type: String,
values: messagePlacement,
default: messageDefaults.placement
},
zIndex: {
type: Number,
default: messageDefaults.zIndex
},
grouping: {
type: Boolean,
default: messageDefaults.grouping
},
repeatNum: {
type: Number,
default: messageDefaults.repeatNum
}
});
var messageEmits = {
destroy: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message/src/instance.mjs
var placementInstances = shallowReactive({});
var getOrCreatePlacementInstances = (placement) => {
if (!placementInstances[placement]) {
placementInstances[placement] = shallowReactive([]);
}
return placementInstances[placement];
};
var getInstance = (id, placement) => {
const instances = placementInstances[placement] || [];
const idx = instances.findIndex((instance) => instance.id === id);
const current = instances[idx];
let prev;
if (idx > 0) {
prev = instances[idx - 1];
}
return { current, prev };
};
var getLastOffset = (id, placement) => {
const { prev } = getInstance(id, placement);
if (!prev)
return 0;
return prev.vm.exposed.bottom.value;
};
var getOffsetOrSpace = (id, offset2, placement) => {
const instances = placementInstances[placement] || [];
const idx = instances.findIndex((instance) => instance.id === id);
return idx > 0 ? 16 : offset2;
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message/src/message2.mjs
var __default__91 = defineComponent({
name: "ElMessage"
});
var _sfc_main102 = defineComponent({
...__default__91,
props: messageProps,
emits: messageEmits,
setup(__props, { expose, emit }) {
const props = __props;
const { Close } = TypeComponents;
const isStartTransition = ref(false);
const { ns, zIndex } = useGlobalComponentSettings("message");
const { currentZIndex, nextZIndex } = zIndex;
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 { [ns.bm("icon", type4)]: type4 && TypeComponentsMap[type4] };
});
const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || "");
const placement = computed(() => props.placement || MESSAGE_DEFAULT_PLACEMENT);
const lastOffset = computed(() => getLastOffset(props.id, placement.value));
const offset2 = computed(() => {
return getOffsetOrSpace(props.id, props.offset, placement.value) + lastOffset.value;
});
const bottom = computed(() => height.value + offset2.value);
const horizontalClass = computed(() => {
if (placement.value.includes("left"))
return ns.is("left");
if (placement.value.includes("right"))
return ns.is("right");
return ns.is("center");
});
const verticalProperty = computed(() => placement.value.startsWith("top") ? "top" : "bottom");
const customStyle = computed(() => ({
[verticalProperty.value]: `${offset2.value}px`,
zIndex: currentZIndex.value
}));
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;
nextTick(() => {
var _a;
if (!isStartTransition.value) {
(_a = props.onClose) == null ? void 0 : _a.call(props);
emit("destroy");
}
});
}
function keydown(event) {
const code = getEventCode(event);
if (code === EVENT_CODE.esc) {
close2();
}
}
onMounted(() => {
startTimer();
nextZIndex();
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(ns).b("fade"),
onBeforeEnter: ($event) => isStartTransition.value = true,
onBeforeLeave: _ctx.onClose,
onAfterLeave: ($event) => _ctx.$emit("destroy"),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
id: _ctx.id,
ref_key: "messageRef",
ref: messageRef,
class: normalizeClass([
unref(ns).b(),
{ [unref(ns).m(_ctx.type)]: _ctx.type },
unref(ns).is("closable", _ctx.showClose),
unref(ns).is("plain", _ctx.plain),
unref(ns).is("bottom", unref(verticalProperty) === "bottom"),
unref(horizontalClass),
_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(ns).e("badge"))
}, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true),
unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
key: 1,
class: normalizeClass([unref(ns).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(ns).e("content"))
}, toDisplayString(_ctx.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
createBaseVNode("p", {
class: normalizeClass(unref(ns).e("content")),
innerHTML: _ctx.message
}, null, 10, ["innerHTML"])
], 2112))
]),
_ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
key: 2,
class: normalizeClass(unref(ns).e("closeBtn")),
onClick: withModifiers(close2, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(Close))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 46, ["id"]), [
[vShow, visible.value]
])
]),
_: 3
}, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]);
};
}
});
var MessageConstructor = _export_sfc(_sfc_main102, [["__file", "message.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message/src/method.mjs
init_shared_esm_bundler();
var seed = 1;
var normalizeAppendTo = (normalized) => {
const appendTo = normalized.appendTo;
if (!appendTo) {
normalized.appendTo = document.body;
} else if (isString(normalized.appendTo)) {
let appendTo2 = document.querySelector(normalized.appendTo);
if (!isElement(appendTo2)) {
debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body.");
appendTo2 = document.body;
}
normalized.appendTo = appendTo2;
}
};
var normalizePlacement = (normalized) => {
if (!normalized.placement && isString(messageConfig.placement) && messageConfig.placement) {
normalized.placement = messageConfig.placement;
}
if (!normalized.placement) {
normalized.placement = MESSAGE_DEFAULT_PLACEMENT;
}
if (!messagePlacement.includes(normalized.placement)) {
debugWarn("ElMessage", `Invalid placement: ${normalized.placement}. Falling back to '${MESSAGE_DEFAULT_PLACEMENT}'.`);
normalized.placement = MESSAGE_DEFAULT_PLACEMENT;
}
};
var normalizeOptions = (params) => {
const options = !params || isString(params) || isVNode(params) || isFunction(params) ? { message: params } : params;
const normalized = {
...messageDefaults,
...options
};
normalizeAppendTo(normalized);
normalizePlacement(normalized);
if (isBoolean(messageConfig.grouping) && !normalized.grouping) {
normalized.grouping = messageConfig.grouping;
}
if (isNumber(messageConfig.duration) && normalized.duration === 3e3) {
normalized.duration = messageConfig.duration;
}
if (isNumber(messageConfig.offset) && normalized.offset === 16) {
normalized.offset = messageConfig.offset;
}
if (isBoolean(messageConfig.showClose) && !normalized.showClose) {
normalized.showClose = messageConfig.showClose;
}
if (isBoolean(messageConfig.plain) && !normalized.plain) {
normalized.plain = messageConfig.plain;
}
return normalized;
};
var closeMessage = (instance) => {
const placement = instance.props.placement || MESSAGE_DEFAULT_PLACEMENT;
const instances = placementInstances[placement];
const idx = instances.indexOf(instance);
if (idx === -1)
return;
instances.splice(idx, 1);
const { handler } = instance;
handler.close();
};
var createMessage = ({ appendTo, ...options }, context) => {
const id = `message_${seed++}`;
const userOnClose = options.onClose;
const container = document.createElement("div");
const props = {
...options,
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.close();
}
};
const instance = {
id,
vnode,
vm,
handler,
props: vnode.component.props
};
return instance;
};
var message = (options = {}, context) => {
if (!isClient)
return { close: () => void 0 };
const normalized = normalizeOptions(options);
const instances = getOrCreatePlacementInstances(normalized.placement || MESSAGE_DEFAULT_PLACEMENT);
if (normalized.grouping && instances.length) {
const instance2 = instances.find(({ vnode: vm }) => {
var _a;
return ((_a = vm.props) == null ? void 0 : _a.message) === normalized.message;
});
if (instance2) {
instance2.props.repeatNum += 1;
instance2.props.type = normalized.type;
return instance2.handler;
}
}
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
return { close: () => void 0 };
}
const instance = createMessage(normalized, context);
instances.push(instance);
return instance.handler;
};
messageTypes.forEach((type4) => {
message[type4] = (options = {}, appContext) => {
const normalized = normalizeOptions(options);
return message({ ...normalized, type: type4 }, appContext);
};
});
function closeAll(type4) {
for (const placement in placementInstances) {
if (hasOwn(placementInstances, placement)) {
const instances = [...placementInstances[placement]];
for (const instance of instances) {
if (!type4 || type4 === instance.props.type) {
instance.handler.close();
}
}
}
}
}
function closeAllByPlacement(placement) {
if (!placementInstances[placement])
return;
const instances = [...placementInstances[placement]];
instances.forEach((instance) => instance.handler.close());
}
message.closeAll = closeAll;
message.closeAllByPlacement = closeAllByPlacement;
message._context = null;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message/index.mjs
var ElMessage = withInstallFunction(message, "$message");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/directives/trap-focus/index.mjs
var FOCUSABLE_CHILDREN = "_trap-focus-children";
var FOCUS_STACK = [];
var FOCUS_HANDLER = (e) => {
if (FOCUS_STACK.length === 0)
return;
const code = getEventCode(e);
const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];
if (focusableElement.length > 0 && code === EVENT_CODE.tab) {
if (focusableElement.length === 1) {
e.preventDefault();
if (document.activeElement !== focusableElement[0]) {
focusableElement[0].focus();
}
return;
}
const goingBackward = e.shiftKey;
const isFirst = e.target === focusableElement[0];
const isLast = e.target === focusableElement[focusableElement.length - 1];
if (isFirst && goingBackward) {
e.preventDefault();
focusableElement[focusableElement.length - 1].focus();
}
if (isLast && !goingBackward) {
e.preventDefault();
focusableElement[0].focus();
}
}
};
var TrapFocus = {
beforeMount(el) {
el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);
FOCUS_STACK.push(el);
if (FOCUS_STACK.length <= 1) {
document.addEventListener("keydown", FOCUS_HANDLER);
}
},
updated(el) {
nextTick(() => {
el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);
});
},
unmounted() {
FOCUS_STACK.shift();
if (FOCUS_STACK.length === 0) {
document.removeEventListener("keydown", FOCUS_HANDLER);
}
}
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message-box/src/index.mjs
init_shared_esm_bundler();
var _sfc_main103 = defineComponent({
name: "ElMessageBox",
directives: {
TrapFocus
},
components: {
ElButton,
ElFocusTrap,
ElInput,
ElOverlay,
ElIcon,
...TypeComponents
},
inheritAttrs: false,
props: {
buttonSize: {
type: String,
validator: isValidComponentSize
},
modal: {
type: Boolean,
default: true
},
lockScroll: {
type: Boolean,
default: true
},
showClose: {
type: Boolean,
default: true
},
closeOnClickModal: {
type: Boolean,
default: true
},
closeOnPressEscape: {
type: Boolean,
default: true
},
closeOnHashChange: {
type: Boolean,
default: true
},
center: Boolean,
draggable: Boolean,
overflow: Boolean,
roundButton: Boolean,
container: {
type: String,
default: "body"
},
boxType: {
type: String,
default: ""
}
},
emits: ["vanish", "action"],
setup(props, { emit }) {
const {
locale,
zIndex,
ns,
size: btnSize
} = useGlobalComponentSettings("message-box", computed(() => props.buttonSize));
const { t } = locale;
const { nextZIndex } = zIndex;
const visible = ref(false);
const state = reactive({
autofocus: true,
beforeClose: null,
callback: null,
cancelButtonText: "",
cancelButtonClass: "",
confirmButtonText: "",
confirmButtonClass: "",
customClass: "",
customStyle: {},
dangerouslyUseHTMLString: false,
distinguishCancelAndClose: false,
icon: "",
closeIcon: "",
inputPattern: null,
inputPlaceholder: "",
inputType: "text",
inputValue: "",
inputValidator: void 0,
inputErrorMessage: "",
message: "",
modalFade: true,
modalClass: "",
showCancelButton: false,
showConfirmButton: true,
type: "",
title: void 0,
showInput: false,
action: "",
confirmButtonLoading: false,
cancelButtonLoading: false,
confirmButtonLoadingIcon: markRaw(loading_default),
cancelButtonLoadingIcon: markRaw(loading_default),
confirmButtonDisabled: false,
editorErrorMessage: "",
validateError: false,
zIndex: nextZIndex()
});
const typeClass = computed(() => {
const type4 = state.type;
return { [ns.bm("icon", type4)]: type4 && TypeComponentsMap[type4] };
});
const contentId = useId();
const inputId = useId();
const iconComponent = computed(() => {
const type4 = state.type;
return state.icon || type4 && TypeComponentsMap[type4] || "";
});
const hasMessage = computed(() => !!state.message);
const rootRef = ref();
const headerRef = ref();
const focusStartRef = ref();
const inputRef = ref();
const confirmRef = ref();
const confirmButtonClasses = computed(() => state.confirmButtonClass);
watch(() => state.inputValue, async (val) => {
await nextTick();
if (props.boxType === "prompt" && val) {
validate();
}
}, { immediate: true });
watch(() => visible.value, (val) => {
var _a, _b;
if (val) {
if (props.boxType !== "prompt") {
if (state.autofocus) {
focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;
} else {
focusStartRef.value = rootRef.value;
}
}
state.zIndex = nextZIndex();
}
if (props.boxType !== "prompt")
return;
if (val) {
nextTick().then(() => {
var _a2;
if (inputRef.value && inputRef.value.$el) {
if (state.autofocus) {
focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value;
} else {
focusStartRef.value = rootRef.value;
}
}
});
} else {
state.editorErrorMessage = "";
state.validateError = false;
}
});
const draggable2 = computed(() => props.draggable);
const overflow = computed(() => props.overflow);
const { isDragging: isDragging2 } = useDraggable(rootRef, headerRef, draggable2, overflow);
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 _a;
if (props.boxType === "prompt" && action === "confirm" && !validate()) {
return;
}
state.action = action;
if (state.beforeClose) {
(_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);
} else {
doClose();
}
};
const validate = () => {
if (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 (isFunction(inputValidator)) {
const validateResult = inputValidator(state.inputValue);
if (validateResult === false) {
state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
state.validateError = true;
return false;
}
if (isString(validateResult)) {
state.editorErrorMessage = validateResult;
state.validateError = true;
return false;
}
}
}
state.editorErrorMessage = "";
state.validateError = false;
return true;
};
const getInputElement = () => {
var _a, _b;
const inputRefs = (_a = inputRef.value) == null ? void 0 : _a.$refs;
return (_b = inputRefs == null ? void 0 : inputRefs.input) != null ? _b : inputRefs == null ? void 0 : inputRefs.textarea;
};
const handleClose = () => {
handleAction("close");
};
const onCloseRequested = () => {
if (props.closeOnPressEscape) {
handleClose();
}
};
if (props.lockScroll) {
useLockscreen(visible, { ns });
}
return {
...toRefs(state),
ns,
overlayEvent,
visible,
hasMessage,
typeClass,
contentId,
inputId,
btnSize,
iconComponent,
confirmButtonClasses,
rootRef,
focusStartRef,
headerRef,
inputRef,
isDragging: isDragging2,
confirmRef,
doClose,
handleClose,
onCloseRequested,
handleWrapperClick,
handleInputEnter,
handleAction,
t
};
}
});
function _sfc_render12(_ctx, _cache, $props, $setup, $data, $options) {
const _component_el_icon = resolveComponent("el-icon");
const _component_el_input = resolveComponent("el-input");
const _component_el_button = resolveComponent("el-button");
const _component_el_focus_trap = resolveComponent("el-focus-trap");
const _component_el_overlay = resolveComponent("el-overlay");
return openBlock(), createBlock(Transition, {
name: "fade-in-linear",
onAfterLeave: ($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: _ctx.overlayEvent.onClick,
onMousedown: _ctx.overlayEvent.onMousedown,
onMouseup: _ctx.overlayEvent.onMouseup
}, [
createVNode(_component_el_focus_trap, {
loop: "",
trapped: _ctx.visible,
"focus-trap-el": _ctx.rootRef,
"focus-start-el": _ctx.focusStartRef,
onReleaseRequested: _ctx.onCloseRequested
}, {
default: withCtx(() => [
createBaseVNode("div", {
ref: "rootRef",
class: normalizeClass([
_ctx.ns.b(),
_ctx.customClass,
_ctx.ns.is("draggable", _ctx.draggable),
_ctx.ns.is("dragging", _ctx.isDragging),
{ [_ctx.ns.m("center")]: _ctx.center }
]),
style: normalizeStyle(_ctx.customStyle),
tabindex: "-1",
onClick: withModifiers(() => {
}, ["stop"])
}, [
_ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "headerRef",
class: normalizeClass([_ctx.ns.e("header"), { "show-close": _ctx.showClose }])
}, [
createBaseVNode("div", {
class: normalizeClass(_ctx.ns.e("title"))
}, [
_ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
key: 0,
class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
createBaseVNode("span", null, toDisplayString(_ctx.title), 1)
], 2),
_ctx.showClose ? (openBlock(), createElementBlock("button", {
key: 0,
type: "button",
class: normalizeClass(_ctx.ns.e("headerbtn")),
"aria-label": _ctx.t("el.messagebox.close"),
onClick: ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"),
onKeydown: withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])
}, [
createVNode(_component_el_icon, {
class: normalizeClass(_ctx.ns.e("close"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || "close")))
]),
_: 1
}, 8, ["class"])
], 42, ["aria-label", "onClick", "onKeydown"])) : createCommentVNode("v-if", true)
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
id: _ctx.contentId,
class: normalizeClass(_ctx.ns.e("content"))
}, [
createBaseVNode("div", {
class: normalizeClass(_ctx.ns.e("container"))
}, [
_ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
key: 0,
class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
_ctx.hasMessage ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(_ctx.ns.e("message"))
}, [
renderSlot(_ctx.$slots, "default", {}, () => [
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
key: 0,
for: _ctx.showInput ? _ctx.inputId : void 0,
textContent: toDisplayString(_ctx.message)
}, null, 8, ["for", "textContent"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
key: 1,
for: _ctx.showInput ? _ctx.inputId : void 0,
innerHTML: _ctx.message
}, null, 8, ["for", "innerHTML"]))
])
], 2)) : createCommentVNode("v-if", true)
], 2),
withDirectives(createBaseVNode("div", {
class: normalizeClass(_ctx.ns.e("input"))
}, [
createVNode(_component_el_input, {
id: _ctx.inputId,
ref: "inputRef",
modelValue: _ctx.inputValue,
"onUpdate:modelValue": ($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", "onUpdate: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, ["id"]),
createBaseVNode("div", {
class: normalizeClass(_ctx.ns.e("btns"))
}, [
_ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
key: 0,
loading: _ctx.cancelButtonLoading,
"loading-icon": _ctx.cancelButtonLoadingIcon,
class: normalizeClass([_ctx.cancelButtonClass]),
round: _ctx.roundButton,
size: _ctx.btnSize,
onClick: ($event) => _ctx.handleAction("cancel"),
onKeydown: withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"])
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
]),
_: 1
}, 8, ["loading", "loading-icon", "class", "round", "size", "onClick", "onKeydown"])) : createCommentVNode("v-if", true),
withDirectives(createVNode(_component_el_button, {
ref: "confirmRef",
type: "primary",
loading: _ctx.confirmButtonLoading,
"loading-icon": _ctx.confirmButtonLoadingIcon,
class: normalizeClass([_ctx.confirmButtonClasses]),
round: _ctx.roundButton,
disabled: _ctx.confirmButtonDisabled,
size: _ctx.btnSize,
onClick: ($event) => _ctx.handleAction("confirm"),
onKeydown: withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"])
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
]),
_: 1
}, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
[vShow, _ctx.showConfirmButton]
])
], 2)
], 14, ["onClick"])
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
], 42, ["aria-label", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
]),
_: 3
}, 8, ["z-index", "overlay-class", "mask"]), [
[vShow, _ctx.visible]
])
]),
_: 3
}, 8, ["onAfterLeave"]);
}
var MessageBoxConstructor = _export_sfc(_sfc_main103, [["render", _sfc_render12], ["__file", "index.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/message-box/src/messageBox.mjs
init_shared_esm_bundler();
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 (isElement(props.appendTo)) {
appendTo = props.appendTo;
}
if (!isElement(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)) {
if (prop === "closeIcon" && isObject(options[prop])) {
vm[prop] = markRaw(options[prop]);
} else {
vm[prop] = options[prop];
}
}
}
vm.visible = true;
return vm;
};
function MessageBox(options, appContext = null) {
if (!isClient)
return Promise.reject();
let callback;
if (isString(options) || isVNode(options)) {
options = {
message: options
};
} else {
callback = options.callback;
}
return new Promise((resolve, reject) => {
const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);
messageInstance.set(vm, {
options,
callback,
resolve,
reject
});
});
}
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 (isUndefined(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.11.7_vue@3.5.24_typescript@5.9.3_/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.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/notification/src/notification.mjs
var notificationTypes = [
"primary",
"success",
"info",
"warning",
"error"
];
var notificationProps = buildProps({
customClass: {
type: String,
default: ""
},
dangerouslyUseHTMLString: Boolean,
duration: {
type: Number,
default: 4500
},
icon: {
type: iconPropType
},
id: {
type: String,
default: ""
},
message: {
type: definePropType([
String,
Object,
Function
]),
default: ""
},
offset: {
type: Number,
default: 0
},
onClick: {
type: definePropType(Function),
default: () => void 0
},
onClose: {
type: definePropType(Function),
required: true
},
position: {
type: String,
values: ["top-right", "top-left", "bottom-right", "bottom-left"],
default: "top-right"
},
showClose: {
type: Boolean,
default: true
},
title: {
type: String,
default: ""
},
type: {
type: String,
values: [...notificationTypes, ""],
default: ""
},
zIndex: Number,
closeIcon: {
type: iconPropType,
default: close_default
}
});
var notificationEmits = {
destroy: () => true
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/notification/src/notification2.mjs
var __default__92 = defineComponent({
name: "ElNotification"
});
var _sfc_main104 = defineComponent({
...__default__92,
props: notificationProps,
emits: notificationEmits,
setup(__props, { expose }) {
const props = __props;
const { ns, zIndex } = useGlobalComponentSettings("notification");
const { nextZIndex, currentZIndex } = zIndex;
const visible = ref(false);
let timer = void 0;
const typeClass = computed(() => {
const type4 = props.type;
return type4 && TypeComponentsMap[props.type] ? ns.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(() => {
var _a;
return {
[verticalProperty.value]: `${props.offset}px`,
zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
};
});
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(event) {
const code = getEventCode(event);
switch (code) {
case EVENT_CODE.delete:
case EVENT_CODE.backspace:
clearTimer();
break;
case EVENT_CODE.esc:
if (visible.value) {
close2();
}
break;
default:
startTimer();
break;
}
}
onMounted(() => {
startTimer();
nextZIndex();
visible.value = true;
});
useEventListener(document, "keydown", onKeydown);
expose({
visible,
close: close2
});
return (_ctx, _cache) => {
return openBlock(), createBlock(Transition, {
name: unref(ns).b("fade"),
onBeforeLeave: _ctx.onClose,
onAfterLeave: ($event) => _ctx.$emit("destroy"),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
id: _ctx.id,
class: normalizeClass([unref(ns).b(), _ctx.customClass, unref(horizontalClass)]),
style: normalizeStyle(unref(positionStyle)),
role: "alert",
onMouseenter: clearTimer,
onMouseleave: startTimer,
onClick: _ctx.onClick
}, [
unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass([unref(ns).e("icon"), unref(typeClass)])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
createBaseVNode("div", {
class: normalizeClass(unref(ns).e("group"))
}, [
createBaseVNode("h2", {
class: normalizeClass(unref(ns).e("title")),
textContent: toDisplayString(_ctx.title)
}, null, 10, ["textContent"]),
withDirectives(createBaseVNode("div", {
class: normalizeClass(unref(ns).e("content")),
style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
}, [
renderSlot(_ctx.$slots, "default", {}, () => [
!_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", { key: 0 }, 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, ["innerHTML"])
], 2112))
])
], 6), [
[vShow, _ctx.message]
]),
_ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
key: 0,
class: normalizeClass(unref(ns).e("closeBtn")),
onClick: withModifiers(close2, ["stop"])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 2)
], 46, ["id", "onClick"]), [
[vShow, visible.value]
])
]),
_: 3
}, 8, ["name", "onBeforeLeave", "onAfterLeave"]);
};
}
});
var NotificationConstructor = _export_sfc(_sfc_main104, [["__file", "notification.vue"]]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/notification/src/notify.mjs
init_shared_esm_bundler();
var notifications = {
"top-left": [],
"top-right": [],
"bottom-left": [],
"bottom-right": []
};
var GAP_SIZE = 16;
var seed2 = 1;
var notify = function(options = {}, context) {
if (!isClient)
return { close: () => void 0 };
if (isString(options) || isVNode(options)) {
options = { message: options };
}
const position = options.position || "top-right";
let verticalOffset = options.offset || 0;
notifications[position].forEach(({ vm: vm2 }) => {
var _a;
verticalOffset += (((_a = vm2.el) == null ? void 0 : _a.offsetHeight) || 0) + GAP_SIZE;
});
verticalOffset += GAP_SIZE;
const id = `notification_${seed2++}`;
const userOnClose = options.onClose;
const props = {
...options,
offset: verticalOffset,
id,
onClose: () => {
close(id, position, userOnClose);
}
};
let appendTo = document.body;
if (isElement(options.appendTo)) {
appendTo = options.appendTo;
} else if (isString(options.appendTo)) {
appendTo = document.querySelector(options.appendTo);
}
if (!isElement(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, isFunction(props.message) ? props.message : isVNode(props.message) ? () => props.message : null);
vm.appContext = isUndefined(context) ? notify._context : context;
vm.props.onDestroy = () => {
render(null, container);
};
render(vm, container);
notifications[position].push({ vm });
appendTo.appendChild(container.firstElementChild);
return {
close: () => {
vm.component.exposed.visible.value = false;
}
};
};
notificationTypes.forEach((type4) => {
notify[type4] = (options = {}, appContext) => {
if (isString(options) || isVNode(options)) {
options = {
message: options
};
}
return notify({ ...options, type: type4 }, appContext);
};
});
function close(id, position, userOnClose) {
const orientedNotifications = notifications[position];
const idx = orientedNotifications.findIndex(({ vm: vm2 }) => {
var _a;
return ((_a = vm2.component) == null ? void 0 : _a.props.id) === id;
});
if (idx === -1)
return;
const { vm } = orientedNotifications[idx];
if (!vm)
return;
userOnClose == null ? void 0 : userOnClose(vm);
const removedHeight = vm.el.offsetHeight;
const verticalPos = position.split("-")[0];
orientedNotifications.splice(idx, 1);
const len = orientedNotifications.length;
if (len < 1)
return;
for (let i = idx; i < len; i++) {
const { el, component } = orientedNotifications[i].vm;
const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE;
component.props.offset = pos;
}
}
function closeAll2() {
for (const orientedNotifications of Object.values(notifications)) {
orientedNotifications.forEach(({ vm }) => {
vm.component.exposed.visible.value = false;
});
}
}
function updateOffsets(position = "top-right") {
var _a, _b, _c, _d;
let verticalOffset = ((_c = (_b = (_a = notifications[position][0]) == null ? void 0 : _a.vm.component) == null ? void 0 : _b.props) == null ? void 0 : _c.offset) || 0;
for (const { vm } of notifications[position]) {
vm.component.props.offset = verticalOffset;
verticalOffset += (((_d = vm.el) == null ? void 0 : _d.offsetHeight) || 0) + GAP_SIZE;
}
}
notify.closeAll = closeAll2;
notify.updateOffsets = updateOffsets;
notify._context = null;
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/notification/index.mjs
var ElNotification = withInstallFunction(notify, "$notify");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/plugin.mjs
var Plugins = [
ElInfiniteScroll,
ElLoading,
ElMessage,
ElMessageBox,
ElNotification,
ElPopoverDirective
];
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/defaults.mjs
var installer = makeInstaller([...Components, ...Plugins]);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/index.mjs
var import_dayjs4 = __toESM(require_dayjs_min(), 1);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-focus/index.mjs
var useFocus = (el) => {
return {
focus: () => {
var _a, _b;
(_b = (_a = el.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
}
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-modal/index.mjs
var modalStack = [];
var closeModal = (e) => {
if (modalStack.length === 0)
return;
const code = getEventCode(e);
if (code === EVENT_CODE.esc) {
e.stopPropagation();
const topModal = modalStack[modalStack.length - 1];
topModal.handleClose();
}
};
var useModal = (instance, visibleRef) => {
watch(visibleRef, (val) => {
if (val) {
modalStack.push(instance);
} else {
modalStack.splice(modalStack.indexOf(instance), 1);
}
});
};
if (isClient)
useEventListener(document, "keydown", closeModal);
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-prevent-global/index.mjs
var usePreventGlobal = (indicator, evt, cb) => {
const prevent = (e) => {
if (cb(e))
e.stopImmediatePropagation();
};
let stop = void 0;
watch(() => indicator.value, (val) => {
if (val) {
stop = useEventListener(document, evt, prevent, true);
} else {
stop == null ? void 0 : stop();
}
}, { immediate: true });
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/global-node.mjs
var globalNodes = [];
var target = !isClient ? void 0 : document.body;
function createGlobalNode(id) {
const el = document.createElement("div");
if (id !== void 0) {
el.setAttribute("id", id);
}
if (target) {
target.appendChild(el);
globalNodes.push(el);
}
return el;
}
function removeGlobalNode(el) {
globalNodes.splice(globalNodes.indexOf(el), 1);
el.remove();
}
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-teleport/index.mjs
init_shared_esm_bundler();
var useTeleport = (contentRenderer, appendToBody) => {
const isTeleportVisible = ref(false);
if (!isClient) {
return {
isTeleportVisible,
showTeleport: NOOP,
hideTeleport: NOOP,
renderTeleport: NOOP
};
}
let $el = null;
const showTeleport = () => {
isTeleportVisible.value = true;
if ($el !== null)
return;
$el = createGlobalNode();
};
const hideTeleport = () => {
isTeleportVisible.value = false;
if ($el !== null) {
removeGlobalNode($el);
$el = null;
}
};
const renderTeleport = () => {
return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [h(Teleport, { to: $el }, contentRenderer())] : void 0;
};
onUnmounted(hideTeleport);
return {
isTeleportVisible,
showTeleport,
hideTeleport,
renderTeleport
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-transition-fallthrough/index.mjs
var AFTER_APPEAR = "after-appear";
var AFTER_ENTER = "after-enter";
var AFTER_LEAVE = "after-leave";
var APPEAR = "appear";
var APPEAR_CANCELLED = "appear-cancelled";
var BEFORE_ENTER = "before-enter";
var BEFORE_LEAVE = "before-leave";
var ENTER = "enter";
var ENTER_CANCELLED = "enter-cancelled";
var LEAVE = "leave";
var LEAVE_CANCELLED = "leave-cancelled";
var useTransitionFallthroughEmits = [
AFTER_APPEAR,
AFTER_ENTER,
AFTER_LEAVE,
APPEAR,
APPEAR_CANCELLED,
BEFORE_ENTER,
BEFORE_LEAVE,
ENTER,
ENTER_CANCELLED,
LEAVE,
LEAVE_CANCELLED
];
var useTransitionFallthrough = () => {
const { emit } = getCurrentInstance();
return {
onAfterAppear: () => {
emit(AFTER_APPEAR);
},
onAfterEnter: () => {
emit(AFTER_ENTER);
},
onAfterLeave: () => {
emit(AFTER_LEAVE);
},
onAppearCancelled: () => {
emit(APPEAR_CANCELLED);
},
onBeforeEnter: () => {
emit(BEFORE_ENTER);
},
onBeforeLeave: () => {
emit(BEFORE_LEAVE);
},
onEnter: () => {
emit(ENTER);
},
onEnterCancelled: () => {
emit(ENTER_CANCELLED);
},
onLeave: () => {
emit(LEAVE);
},
onLeaveCancelled: () => {
emit(LEAVE_CANCELLED);
}
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-intermediate-render/index.mjs
var useDelayedRender = ({
indicator,
intermediateIndicator,
shouldSetIntermediate = () => true,
beforeShow,
afterShow,
afterHide,
beforeHide
}) => {
watch(() => unref(indicator), (val) => {
if (val) {
beforeShow == null ? void 0 : beforeShow();
nextTick(() => {
if (!unref(indicator))
return;
if (shouldSetIntermediate("show")) {
intermediateIndicator.value = true;
}
});
} else {
beforeHide == null ? void 0 : beforeHide();
nextTick(() => {
if (unref(indicator))
return;
if (shouldSetIntermediate("hide")) {
intermediateIndicator.value = false;
}
});
}
});
watch(() => intermediateIndicator.value, (val) => {
if (val) {
afterShow == null ? void 0 : afterShow();
} else {
afterHide == null ? void 0 : afterHide();
}
});
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-floating/index.mjs
var useFloatingProps = buildProps({});
var unrefReference = (elRef) => {
if (!isClient)
return;
if (!elRef)
return elRef;
const unrefEl = unrefElement(elRef);
if (unrefEl)
return unrefEl;
return isRef(elRef) ? unrefEl : elRef;
};
var getPositionDataWithUnit = (record, key) => {
const value = record == null ? void 0 : record[key];
return isNil_default(value) ? "" : `${value}px`;
};
var useFloating2 = ({
middleware,
placement,
strategy
}) => {
const referenceRef = ref();
const contentRef = ref();
const x2 = ref();
const y = ref();
const middlewareData = ref({});
const states = {
x: x2,
y,
placement,
strategy,
middlewareData
};
const update = async () => {
if (!isClient)
return;
const referenceEl = unrefReference(referenceRef);
const contentEl = unrefElement(contentRef);
if (!referenceEl || !contentEl)
return;
const data = await computePosition(referenceEl, contentEl, {
placement: unref(placement),
strategy: unref(strategy),
middleware: unref(middleware)
});
keysOf(states).forEach((key) => {
states[key].value = data[key];
});
};
onMounted(() => {
watchEffect(() => {
update();
});
});
return {
...states,
update,
referenceRef,
contentRef
};
};
var arrowMiddleware = ({
arrowRef,
padding
}) => {
return {
name: "arrow",
options: {
element: arrowRef,
padding
},
fn(args) {
const arrowEl = unref(arrowRef);
if (!arrowEl)
return {};
return arrow({
element: arrowEl,
padding
}).fn(args);
}
};
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/index.mjs
var install = installer.install;
var version2 = installer.version;
var export_dayjs = import_dayjs4.default;
export {
BAR_MAP,
BORDER_HORIZONTAL_WIDTH,
CAROUSEL_ITEM_NAME,
CASCADER_PANEL_INJECTION_KEY,
CHANGE_EVENT,
ClickOutside,
CommonPicker,
CommonProps,
DEFAULT_DIALOG_TRANSITION,
DEFAULT_EMPTY_VALUES,
DEFAULT_FORMATS_DATE,
DEFAULT_FORMATS_DATEPICKER,
DEFAULT_FORMATS_TIME,
DEFAULT_VALUE_ON_CLEAR,
DROPDOWN_INJECTION_KEY,
DROPDOWN_INSTANCE_INJECTION_KEY,
DefaultProps,
DynamicSizeGrid,
DynamicSizeList,
EVENT_CODE,
Effect,
ElAffix,
ElAlert,
ElAnchor,
ElAnchorLink,
ElAside,
ElAutoResizer,
ElAutocomplete,
ElAvatar,
ElBacktop,
ElBadge,
ElBreadcrumb,
ElBreadcrumbItem,
ElButton,
ElButtonGroup,
ElCalendar,
ElCard,
ElCarousel,
ElCarouselItem,
ElCascader,
ElCascaderPanel,
ElCheckTag,
ElCheckbox,
ElCheckboxButton,
ElCheckboxGroup,
ElCol,
ElCollapse,
ElCollapseItem,
ElCollapseTransition,
ElColorPicker,
ElColorPickerPanel,
ElConfigProvider,
ElContainer,
ElCountdown,
ElDatePicker,
ElDatePickerPanel,
ElDescriptions,
ElDescriptionsItem,
ElDialog,
ElDivider,
ElDrawer,
ElDropdown,
ElDropdownItem,
ElDropdownMenu,
ElEmpty,
ElFooter,
ElForm,
ElFormItem,
ElHeader,
ElIcon,
ElImage,
ElImageViewer,
ElInfiniteScroll,
ElInput,
ElInputNumber,
ElInputTag,
ElLink,
ElLoading,
vLoading as ElLoadingDirective,
Loading as ElLoadingService,
ElMain,
ElMention,
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,
ElSegmented,
ElSelect,
ElSelectV2,
ElSkeleton,
ElSkeletonItem,
ElSlider,
ElSpace,
ElSplitter,
ElSplitterPanel,
ElStatistic,
ElStep,
ElSteps,
ElSubMenu,
ElSwitch,
ElTabPane,
ElTable,
ElTableColumn2 as ElTableColumn,
ElTableV2,
ElTabs,
ElTag,
ElText,
ElTimePicker,
ElTimeSelect,
ElTimeline,
ElTimelineItem,
ElTooltip,
ElTour,
ElTourStep,
ElTransfer,
ElTree,
ElTreeSelect,
ElTreeV2,
ElUpload,
ElWatermark,
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,
MENU_INJECTION_KEY,
MESSAGE_DEFAULT_PLACEMENT,
MINIMUM_INPUT_WIDTH,
Mousewheel,
NODE_INSTANCE_INJECTION_KEY,
PICKER_BASE_INJECTION_KEY,
PICKER_POPPER_OPTIONS_INJECTION_KEY,
POPPER_CONTENT_INJECTION_KEY,
POPPER_INJECTION_KEY,
RIGHT_CHECK_CHANGE_EVENT,
ROOT_COMMON_COLOR_INJECTION_KEY,
ROOT_COMMON_PICKER_INJECTION_KEY,
ROOT_PICKER_INJECTION_KEY,
ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY,
ROOT_TREE_INJECTION_KEY,
RowAlign,
RowJustify,
SCOPE,
SIZE_INJECTION_KEY,
STEPS_INJECTION_KEY,
SUB_MENU_INJECTION_KEY,
TIMELINE_INJECTION_KEY,
TOOLTIP_INJECTION_KEY,
TREE_NODE_MAP_INJECTION_KEY,
TableV2$1 as TableV2,
Alignment as TableV2Alignment,
FixedDir as TableV2FixedDir,
placeholderSign as TableV2Placeholder,
SortOrder as TableV2SortOrder,
TimePickPanel,
TrapFocus,
UPDATE_MODEL_EVENT,
WEEK_DAYS,
ZINDEX_INJECTION_KEY,
affixEmits,
affixProps,
alertEffects,
alertEmits,
alertProps,
anchorEmits,
anchorProps,
ariaProps,
arrowMiddleware,
autoResizerProps,
autocompleteEmits,
autocompleteProps,
avatarEmits,
avatarProps,
backtopEmits,
backtopProps,
badgeProps,
breadcrumbItemProps,
breadcrumbKey,
breadcrumbProps,
buildLocaleContext,
buildTimeList,
buildTranslator,
buttonEmits,
buttonGroupContextKey,
buttonNativeTypes,
buttonProps,
buttonTypes,
calendarEmits,
calendarProps,
cardContextKey,
cardProps,
carouselContextKey,
carouselEmits,
carouselItemProps,
carouselProps,
cascaderEmits,
cascaderPanelEmits,
cascaderPanelProps,
cascaderProps,
checkTagEmits,
checkTagProps,
checkboxDefaultProps,
checkboxEmits,
checkboxGroupContextKey,
checkboxGroupEmits,
checkboxGroupProps,
checkboxProps,
colProps,
collapseContextKey,
collapseEmits,
collapseItemProps,
collapseProps,
colorPickerEmits,
colorPickerPanelContextKey,
colorPickerPanelEmits,
colorPickerPanelProps,
colorPickerProps,
columnAlignment,
componentSizeMap,
componentSizes,
configProviderContextKey,
configProviderProps,
countdownEmits,
countdownProps,
createModelToggleComposable,
dateEquals,
datePickTypes,
datePickerPanelProps,
datePickerProps,
dayOrDaysToDate,
export_dayjs as dayjs,
installer as default,
defaultInitialZIndex,
defaultNamespace,
defaultProps4 as defaultProps,
descriptionItemProps,
descriptionProps,
dialogContextKey,
dialogEmits,
dialogInjectionKey,
dialogProps,
dividerProps,
drawerEmits,
drawerProps,
dropdownItemProps,
dropdownMenuProps,
dropdownProps,
elPaginationKey,
emitChangeFn3 as emitChangeFn,
emptyProps,
emptyValuesContextKey,
extractDateFormat,
extractTimeFormat,
formContextKey,
formEmits,
formItemContextKey,
formItemProps,
formItemValidateStates,
formMetaProps,
formProps,
formatter,
genFileId,
getPositionDataWithUnit,
iconProps,
imageEmits,
imageProps,
imageViewerEmits,
imageViewerProps,
inputEmits,
inputNumberEmits,
inputNumberProps,
inputProps,
inputTagEmits,
inputTagProps,
install,
linkEmits,
linkProps,
localeContextKey,
makeInstaller,
makeList,
mentionDefaultProps,
mentionEmits,
mentionProps,
menuEmits,
menuItemEmits,
menuItemGroupProps,
menuItemProps,
menuProps,
messageConfig,
messageDefaults,
messageEmits,
messagePlacement,
messageProps,
messageTypes,
namespaceContextKey,
notificationEmits,
notificationProps,
notificationTypes,
overlayEmits,
overlayProps,
pageHeaderEmits,
pageHeaderProps,
paginationEmits,
paginationProps,
parseDate,
popconfirmEmits,
popconfirmProps,
popoverEmits,
popoverProps,
popperArrowProps,
popperContentEmits,
popperContentProps,
popperCoreConfigProps,
popperProps,
popperTriggerProps,
progressProps,
provideGlobalConfig,
radioButtonProps,
radioDefaultProps,
radioEmits,
radioGroupEmits,
radioGroupKey,
radioGroupProps,
radioProps,
radioPropsBase,
rangeArr,
rateEmits,
rateProps,
renderThumbStyle,
resultProps,
roleTypes,
rowContextKey,
rowProps,
scrollbarContextKey,
scrollbarEmits,
scrollbarProps,
segmentedEmits,
segmentedProps,
selectEmits,
selectGroupKey,
selectKey,
selectProps,
selectV2InjectionKey,
skeletonItemProps,
skeletonProps,
sliderContextKey,
sliderEmits,
sliderProps,
spaceItemProps,
spaceProps,
splitterPanelProps,
splitterProps,
statisticProps,
stepProps,
stepsEmits,
stepsProps,
subMenuProps,
switchEmits,
switchProps,
tabBarProps,
tabNavEmits,
tabNavProps,
tabPaneProps,
tableV2Props,
tableV2RowProps,
tabsEmits,
tabsProps,
tabsRootContextKey,
tagEmits,
tagProps,
textProps,
thumbProps,
timePickerDefaultProps,
timePickerRangeTriggerProps,
timePickerRngeTriggerProps,
timeSelectProps,
timeUnits,
timelineItemProps,
tooltipEmits,
tourContentEmits,
tourContentProps,
tourEmits,
tourPlacements,
tourProps,
tourStepEmits,
tourStepProps,
tourStrategies,
transferCheckedChangeFn,
transferEmits,
transferProps,
translate,
treeEmits,
uploadBaseProps,
uploadContentProps,
uploadContextKey,
uploadDraggerEmits,
uploadDraggerProps,
uploadListEmits,
uploadListProps,
uploadListTypes,
uploadProps,
useAriaProps,
useAttrs2 as useAttrs,
useCalcInputWidth,
useCascaderConfig,
useComposition,
useCursor,
useDelayedRender,
useDelayedToggle,
useDelayedToggleProps,
useDeprecated,
useDialog,
useDisabled,
useDraggable,
useEmptyValues,
useEmptyValuesProps,
useEscapeKeydown,
useFloating2 as useFloating,
useFloatingProps,
useFocus,
useFocusController,
useFormDisabled,
useFormItem,
useFormItemInputId,
useFormSize,
useForwardRef,
useForwardRefDirective,
useGetDerivedNamespace,
useGlobalComponentSettings,
useGlobalConfig,
useGlobalSize,
useId,
useIdInjection,
useLocale,
useLockscreen,
useModal,
useModelToggle,
useModelToggleEmits,
useModelToggleProps,
useNamespace,
useOrderedChildren,
usePopper,
usePopperArrowProps,
usePopperContainer,
usePopperContainerId,
usePopperContentEmits,
usePopperContentProps,
usePopperCoreConfigProps,
usePopperProps,
usePopperTriggerProps,
usePreventGlobal,
useProp,
useSameTarget,
useSize,
useSizeProp,
useSizeProps,
useSpace,
useTeleport,
useThrottleRender,
useTimeout,
useTooltipContentProps,
useTooltipModelToggle,
useTooltipModelToggleEmits,
useTooltipModelToggleProps,
useTooltipProps,
useTooltipTriggerProps,
useTransitionFallthrough,
useTransitionFallthroughEmits,
useZIndex,
vLoading,
vRepeatClick,
valueEquals,
version2 as version,
virtualizedGridProps,
virtualizedListProps,
virtualizedProps,
virtualizedScrollbarProps,
watermarkProps,
zIndexContextKey
};
//# sourceMappingURL=element-plus.js.map