sourcesContent:
import { withInstall } from '@element-plus/utils'

import Icon from './src/icon.vue'
import type { SFCWithInstall } from '@element-plus/utils'

export const ElIcon: SFCWithInstall<typeof Icon> = withInstall(Icon)
export default ElIcon

export * from './src/icon'


code:
import type { ExtractPropTypes } from 'vue';
import type Icon from './icon.vue';
export declare const iconProps: {
    readonly size: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly color: {
        readonly type: import("vue").PropType<string>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
};
export declare type IconProps = ExtractPropTypes<typeof iconProps>;
export declare type IconInstance = InstanceType<typeof Icon>;

license: mit


code:
import '../../../utils/index.mjs';
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';

const iconProps = buildProps({
  size: {
    type: definePropType([Number, String])
  },
  color: {
    type: String
  }
});

export { iconProps };
//# sourceMappingURL=icon.mjs.map


sourcesContent:
import { buildProps, definePropType } from '@element-plus/utils'
import type { ExtractPropTypes } from 'vue'
import type Icon from './icon.vue'

export const iconProps = buildProps({
  /**
   * @description SVG icon size, size x size
   */
  size: {
    type: definePropType<number | string>([Number, String]),
  },
  /**
   * @description SVG tag's fill attribute
   */
  color: {
    type: String,
  },
} as const)
export type IconProps = ExtractPropTypes<typeof iconProps>
export type IconInstance = InstanceType<typeof Icon>


code:
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
    readonly size: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly color: {
        readonly type: import("vue").PropType<string>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
    readonly size: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly color: {
        readonly type: import("vue").PropType<string>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
}>>, {}>, {
    default?(_: {}): any;
}>;
export default _default;
declare type __VLS_WithTemplateSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};


code:
import { defineComponent, computed, openBlock, createElementBlock, mergeProps, unref, renderSlot } from 'vue';
import '../../../utils/index.mjs';
import '../../../hooks/index.mjs';
import { iconProps } from './icon.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
import { isUndefined } from '../../../utils/types.mjs';
import { addUnit } from '../../../utils/dom/style.mjs';

const __default__ = defineComponent({
  name: "ElIcon",
  inheritAttrs: false
});
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: iconProps,
  setup(__props) {
    const props = __props;
    const ns = useNamespace("icon");
    const style = computed(() => {
      const { size, color } = props;
      if (!size && !color)
        return {};
      return {
        fontSize: isUndefined(size) ? void 0 : addUnit(size),
        "--color": color
      };
    });
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("i", mergeProps({
        class: unref(ns).b(),
        style: unref(style)
      }, _ctx.$attrs), [
        renderSlot(_ctx.$slots, "default")
      ], 16);
    };
  }
});
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "icon.vue"]]);

export { Icon as default };
//# sourceMappingURL=icon2.mjs.map


code:
import '../../base/style/css.mjs';
//# sourceMappingURL=css.mjs.map


code:
import '../../base/style/index.mjs';
//# sourceMappingURL=index.mjs.map


code:
import ImageViewer from './src/image-viewer.vue';
import type { SFCWithInstall } from 'element-plus/es/utils';
export declare const ElImageViewer: SFCWithInstall<typeof ImageViewer>;
export default ElImageViewer;
export * from './src/image-viewer';


code:
import '../../utils/index.mjs';
import ImageViewer from './src/image-viewer2.mjs';
export { imageViewerEmits, imageViewerProps } from './src/image-viewer.mjs';
import { withInstall } from '../../utils/vue/install.mjs';

const ElImageViewer = withInstall(ImageViewer);

export { ElImageViewer, ElImageViewer as default };
//# sourceMappingURL=index.mjs.map


sourcesContent:
import { withInstall } from '@element-plus/utils'

import ImageViewer from './src/image-viewer.vue'
import type { SFCWithInstall } from '@element-plus/utils'

export const ElImageViewer: SFCWithInstall<typeof ImageViewer> =
  withInstall(ImageViewer)
export default ElImageViewer

export * from './src/image-viewer'


code:
import type { Component, ExtractPropTypes } from 'vue';
import type ImageViewer from './image-viewer.vue';
export declare type ImageViewerAction = 'zoomIn' | 'zoomOut' | 'clockwise' | 'anticlockwise';
export declare const imageViewerProps: {
    readonly urlList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
    readonly zIndex: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly initialIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
    readonly infinite: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly hideOnClickModal: BooleanConstructor;
    readonly teleported: BooleanConstructor;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly zoomRate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
    readonly minScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
    readonly maxScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
    readonly crossorigin: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
};
export declare type ImageViewerProps = ExtractPropTypes<typeof imageViewerProps>;
export declare const imageViewerEmits: {
    close: () => boolean;
    switch: (index: number) => boolean;
    rotate: (deg: number) => boolean;
};
export declare type ImageViewerEmits = typeof imageViewerEmits;
export interface ImageViewerMode {
    name: string;
    icon: Component;
}
export declare type ImageViewerInstance = InstanceType<typeof ImageViewer>;


code:
import '../../../utils/index.mjs';
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
import { mutable } from '../../../utils/typescript.mjs';
import { isNumber } from '../../../utils/types.mjs';

const 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
  },
  minScale: {
    type: Number,
    default: 0.2
  },
  maxScale: {
    type: Number,
    default: 7
  },
  crossorigin: {
    type: definePropType(String)
  }
});
const imageViewerEmits = {
  close: () => true,
  switch: (index) => isNumber(index),
  rotate: (deg) => isNumber(deg)
};

export { imageViewerEmits, imageViewerProps };
//# sourceMappingURL=image-viewer.mjs.map


code:
declare function setActiveItem(index: number): void;
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
    readonly urlList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
    readonly zIndex: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly initialIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
    readonly infinite: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly hideOnClickModal: BooleanConstructor;
    readonly teleported: BooleanConstructor;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly zoomRate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
    readonly minScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
    readonly maxScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
    readonly crossorigin: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
}, {
    /**
     * @description manually switch image
     */
    setActiveItem: typeof setActiveItem;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
    switch: (index: number) => void;
    rotate: (deg: number) => void;
    close: () => void;
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
    readonly urlList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
    readonly zIndex: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly initialIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
    readonly infinite: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly hideOnClickModal: BooleanConstructor;
    readonly teleported: BooleanConstructor;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly zoomRate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
    readonly minScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
    readonly maxScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
    readonly crossorigin: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
}>> & {
    onClose?: (() => any) | undefined;
    onSwitch?: ((index: number) => any) | undefined;
    onRotate?: ((deg: number) => any) | undefined;
}, {
    readonly infinite: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
    readonly teleported: boolean;
    readonly initialIndex: number;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
    readonly urlList: string[];
    readonly zoomRate: number;
    readonly minScale: number;
    readonly maxScale: number;
    readonly hideOnClickModal: boolean;
}>, {
    default?(_: {}): any;
}>;
export default _default;
declare type __VLS_WithTemplateSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};


code:
import { defineComponent, markRaw, ref, effectScope, shallowRef, computed, watch, nextTick, onMounted, openBlock, createBlock, unref, withCtx, createVNode, Transition, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createCommentVNode, createElementBlock, Fragment, resolveDynamicComponent, renderList, withDirectives, vShow, renderSlot } from 'vue';
import { useEventListener } from '@vueuse/core';
import { throttle } from 'lodash-unified';
import '../../../hooks/index.mjs';
import '../../../constants/index.mjs';
import '../../../utils/index.mjs';
import { ElTeleport } from '../../teleport/index.mjs';
import { ElIcon } from '../../icon/index.mjs';
import { FullScreen, ScaleToOriginal, Close, ArrowLeft, ArrowRight, ZoomOut, ZoomIn, RefreshLeft, RefreshRight } from '@element-plus/icons-vue';
import { imageViewerProps, imageViewerEmits } from './image-viewer.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useLocale } from '../../../hooks/use-locale/index.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
import { EVENT_CODE } from '../../../constants/aria.mjs';
import { keysOf } from '../../../utils/objects.mjs';

const __default__ = defineComponent({
  name: "ElImageViewer"
});
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: imageViewerProps,
  emits: imageViewerEmits,
  setup(__props, { expose, emit }) {
    var _a;
    const props = __props;
    const modes = {
      CONTAIN: {
        name: "contain",
        icon: markRaw(FullScreen)
      },
      ORIGINAL: {
        name: "original",
        icon: markRaw(ScaleToOriginal)
      }
    };
    const { t } = useLocale();
    const ns = useNamespace("image-viewer");
    const { nextZIndex } = useZIndex();
    const wrapper = ref();
    const imgRefs = ref([]);
    const scopeEventListener = effectScope();
    const loading = ref(true);
    const activeIndex = ref(props.initialIndex);
    const mode = shallowRef(modes.CONTAIN);
    const transform = ref({
      scale: 1,
      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(() => {
      return activeIndex.value === 0;
    });
    const isLast = computed(() => {
      return activeIndex.value === props.urlList.length - 1;
    });
    const currentImg = computed(() => {
      return 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;
    });
    function hide() {
      unregisterEventListener();
      emit("close");
    }
    function registerEventListener() {
      const keydownHandler = throttle((e) => {
        switch (e.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((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) {
      loading.value = false;
      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((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: 1,
        deg: 0,
        offsetX: 0,
        offsetY: 0,
        enableTransition: false
      };
    }
    function toggleMode() {
      if (loading.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) {
      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)
        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;
    }
    watch(currentImg, () => {
      nextTick(() => {
        const $img = imgRefs.value[0];
        if (!($img == null ? void 0 : $img.complete)) {
          loading.value = true;
        }
      });
    });
    watch(activeIndex, (val) => {
      reset();
      emit("switch", val);
    });
    onMounted(() => {
      var _a2, _b;
      registerEventListener();
      (_b = (_a2 = wrapper.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
    });
    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(() => [
              createElementVNode("div", {
                ref_key: "wrapper",
                ref: wrapper,
                tabindex: -1,
                class: normalizeClass(unref(ns).e("wrapper")),
                style: normalizeStyle({ zIndex: zIndex.value })
              }, [
                createElementVNode("div", {
                  class: normalizeClass(unref(ns).e("mask")),
                  onClick: withModifiers(($event) => _ctx.hideOnClickModal && hide(), ["self"])
                }, null, 10, ["onClick"]),
                createCommentVNode(" CLOSE "),
                createElementVNode("span", {
                  class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
                  onClick: hide
                }, [
                  createVNode(unref(ElIcon), null, {
                    default: withCtx(() => [
                      createVNode(unref(Close))
                    ]),
                    _: 1
                  })
                ], 2),
                createCommentVNode(" ARROW "),
                !unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
                  createElementVNode("span", {
                    class: normalizeClass(unref(arrowPrevKls)),
                    onClick: prev
                  }, [
                    createVNode(unref(ElIcon), null, {
                      default: withCtx(() => [
                        createVNode(unref(ArrowLeft))
                      ]),
                      _: 1
                    })
                  ], 2),
                  createElementVNode("span", {
                    class: normalizeClass(unref(arrowNextKls)),
                    onClick: next
                  }, [
                    createVNode(unref(ElIcon), null, {
                      default: withCtx(() => [
                        createVNode(unref(ArrowRight))
                      ]),
                      _: 1
                    })
                  ], 2)
                ], 64)) : createCommentVNode("v-if", true),
                createCommentVNode(" ACTIONS "),
                createElementVNode("div", {
                  class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")])
                }, [
                  createElementVNode("div", {
                    class: normalizeClass(unref(ns).e("actions__inner"))
                  }, [
                    createVNode(unref(ElIcon), {
                      onClick: ($event) => handleActions("zoomOut")
                    }, {
                      default: withCtx(() => [
                        createVNode(unref(ZoomOut))
                      ]),
                      _: 1
                    }, 8, ["onClick"]),
                    createVNode(unref(ElIcon), {
                      onClick: ($event) => handleActions("zoomIn")
                    }, {
                      default: withCtx(() => [
                        createVNode(unref(ZoomIn))
                      ]),
                      _: 1
                    }, 8, ["onClick"]),
                    createElementVNode("i", {
                      class: normalizeClass(unref(ns).e("actions__divider"))
                    }, null, 2),
                    createVNode(unref(ElIcon), { onClick: toggleMode }, {
                      default: withCtx(() => [
                        (openBlock(), createBlock(resolveDynamicComponent(unref(mode).icon)))
                      ]),
                      _: 1
                    }),
                    createElementVNode("i", {
                      class: normalizeClass(unref(ns).e("actions__divider"))
                    }, null, 2),
                    createVNode(unref(ElIcon), {
                      onClick: ($event) => handleActions("anticlockwise")
                    }, {
                      default: withCtx(() => [
                        createVNode(unref(RefreshLeft))
                      ]),
                      _: 1
                    }, 8, ["onClick"]),
                    createVNode(unref(ElIcon), {
                      onClick: ($event) => handleActions("clockwise")
                    }, {
                      default: withCtx(() => [
                        createVNode(unref(RefreshRight))
                      ]),
                      _: 1
                    }, 8, ["onClick"])
                  ], 2)
                ], 2),
                createCommentVNode(" CANVAS "),
                createElementVNode("div", {
                  class: normalizeClass(unref(ns).e("canvas"))
                }, [
                  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.urlList, (url, i) => {
                    return withDirectives((openBlock(), createElementBlock("img", {
                      ref_for: true,
                      ref: (el) => imgRefs.value[i] = el,
                      key: url,
                      src: url,
                      style: normalizeStyle(unref(imgStyle)),
                      class: normalizeClass(unref(ns).e("img")),
                      crossorigin: _ctx.crossorigin,
                      onLoad: handleImgLoad,
                      onError: handleImgError,
                      onMousedown: handleMouseDown
                    }, null, 46, ["src", "crossorigin"])), [
                      [vShow, i === activeIndex.value]
                    ]);
                  }), 128))
                ], 2),
                renderSlot(_ctx.$slots, "default")
              ], 6)
            ]),
            _: 3
          })
        ]),
        _: 3
      }, 8, ["disabled"]);
    };
  }
});
var ImageViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "image-viewer.vue"]]);

export { ImageViewer as default };
//# sourceMappingURL=image-viewer2.mjs.map


code:
import 'element-plus/es/components/base/style/css';
import 'element-plus/theme-chalk/el-image-viewer.css';


code:
import '../../base/style/css.mjs';
import 'element-plus/theme-chalk/el-image-viewer.css';
//# sourceMappingURL=css.mjs.map


code:
import 'element-plus/es/components/base/style';
import 'element-plus/theme-chalk/src/image-viewer.scss';


code:
import '../../base/style/index.mjs';
import 'element-plus/theme-chalk/src/image-viewer.scss';
//# sourceMappingURL=index.mjs.map


code:
import Image from './src/image.vue';
import type { SFCWithInstall } from 'element-plus/es/utils';
export declare const ElImage: SFCWithInstall<typeof Image>;
export default ElImage;
export * from './src/image';


code:
import '../../utils/index.mjs';
import Image from './src/image.mjs';
export { imageEmits, imageProps } from './src/image2.mjs';
import { withInstall } from '../../utils/vue/install.mjs';

const ElImage = withInstall(Image);

export { ElImage, ElImage as default };
//# sourceMappingURL=index.mjs.map


sourcesContent:
import { withInstall } from '@element-plus/utils'

import Image from './src/image.vue'
import type { SFCWithInstall } from '@element-plus/utils'

export const ElImage: SFCWithInstall<typeof Image> = withInstall(Image)
export default ElImage

export * from './src/image'


code:
import type { ExtractPropTypes } from 'vue';
export declare const imageProps: {
    readonly hideOnClickModal: BooleanConstructor;
    readonly src: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
    readonly fit: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "contain" | "fill" | "none" | "cover" | "scale-down", unknown, "", boolean>;
    readonly loading: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "lazy" | "eager", unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly lazy: BooleanConstructor;
    readonly scrollContainer: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | HTMLElement | undefined) & {}) | (() => string | HTMLElement | undefined) | ((new (...args: any[]) => (string | HTMLElement | undefined) & {}) | (() => string | HTMLElement | undefined))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly previewSrcList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
    readonly previewTeleported: BooleanConstructor;
    readonly zIndex: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly initialIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
    readonly infinite: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly zoomRate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
    readonly minScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
    readonly maxScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
    readonly crossorigin: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
};
export declare type ImageProps = ExtractPropTypes<typeof imageProps>;
export declare const imageEmits: {
    load: (evt: Event) => boolean;
    error: (evt: Event) => boolean;
    switch: (val: number) => boolean;
    close: () => boolean;
    show: () => boolean;
};
export declare type ImageEmits = typeof imageEmits;


code:
import { defineComponent, useAttrs, computed, ref, nextTick, watch, onMounted, openBlock, createElementBlock, mergeProps, unref, renderSlot, createElementVNode, normalizeClass, toDisplayString, Fragment, createCommentVNode, createBlock, withCtx } from 'vue';
import { isClient, useThrottleFn, useEventListener } from '@vueuse/core';
import { fromPairs } from 'lodash-unified';
import '../../../hooks/index.mjs';
import { ElImageViewer } from '../../image-viewer/index.mjs';
import '../../../utils/index.mjs';
import { imageProps, imageEmits } from './image2.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useLocale } from '../../../hooks/use-locale/index.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
import { useAttrs as useAttrs$1 } from '../../../hooks/use-attrs/index.mjs';
import { isInContainer } from '../../../utils/dom/position.mjs';
import { isElement } from '../../../utils/types.mjs';
import { isString } from '@vue/shared';
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';

const __default__ = defineComponent({
  name: "ElImage",
  inheritAttrs: false
});
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: imageProps,
  emits: imageEmits,
  setup(__props, { emit }) {
    const props = __props;
    let prevOverflow = "";
    const { t } = useLocale();
    const ns = useNamespace("image");
    const rawAttrs = useAttrs();
    const containerAttrs = computed(() => {
      return fromPairs(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
    });
    const imgAttrs = useAttrs$1({
      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;
    let stopWheelListener;
    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 Array.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() {
      if (isInContainer(container.value, _scrollContainer.value)) {
        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) {
        _scrollContainer.value = getScrollContainer(container.value);
      }
      if (_scrollContainer.value) {
        stopScrollListener = useEventListener(_scrollContainer, "scroll", lazyLoadHandler);
        setTimeout(() => handleLazyLoad(), 100);
      }
    }
    function removeLazyLoadListener() {
      if (!isClient || !_scrollContainer.value || !lazyLoadHandler)
        return;
      stopScrollListener == null ? void 0 : stopScrollListener();
      _scrollContainer.value = void 0;
    }
    function wheelHandler(e) {
      if (!e.ctrlKey)
        return;
      if (e.deltaY < 0) {
        e.preventDefault();
        return false;
      } else if (e.deltaY > 0) {
        e.preventDefault();
        return false;
      }
    }
    function clickHandler() {
      if (!preview.value)
        return;
      stopWheelListener = useEventListener("wheel", wheelHandler, {
        passive: false
      });
      prevOverflow = document.body.style.overflow;
      document.body.style.overflow = "hidden";
      showViewer.value = true;
      emit("show");
    }
    function closeViewer() {
      stopWheelListener == null ? void 0 : stopWheelListener();
      document.body.style.overflow = prevOverflow;
      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();
      }
    });
    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 }, () => [
          createElementVNode("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", {}, () => [
              createElementVNode("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,
            "url-list": _ctx.previewSrcList,
            crossorigin: _ctx.crossorigin,
            "hide-on-click-modal": _ctx.hideOnClickModal,
            teleported: _ctx.previewTeleported,
            "close-on-press-escape": _ctx.closeOnPressEscape,
            onClose: closeViewer,
            onSwitch: switchViewer
          }, {
            default: withCtx(() => [
              _ctx.$slots.viewer ? (openBlock(), createElementBlock("div", { key: 0 }, [
                renderSlot(_ctx.$slots, "viewer")
              ])) : createCommentVNode("v-if", true)
            ]),
            _: 3
          }, 8, ["z-index", "initial-index", "infinite", "zoom-rate", "min-scale", "max-scale", "url-list", "crossorigin", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true)
        ], 64)) : createCommentVNode("v-if", true)
      ], 16);
    };
  }
});
var Image = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "image.vue"]]);

export { Image as default };
//# sourceMappingURL=image.mjs.map


code:
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
    readonly hideOnClickModal: BooleanConstructor;
    readonly src: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
    readonly fit: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "contain" | "fill" | "none" | "cover" | "scale-down", unknown, "", boolean>;
    readonly loading: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "lazy" | "eager", unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly lazy: BooleanConstructor;
    readonly scrollContainer: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | HTMLElement | undefined) & {}) | (() => string | HTMLElement | undefined) | ((new (...args: any[]) => (string | HTMLElement | undefined) & {}) | (() => string | HTMLElement | undefined))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly previewSrcList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
    readonly previewTeleported: BooleanConstructor;
    readonly zIndex: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly initialIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
    readonly infinite: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly zoomRate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
    readonly minScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
    readonly maxScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
    readonly crossorigin: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
    switch: (val: number) => void;
    show: () => void;
    close: () => void;
    error: (evt: Event) => void;
    load: (evt: Event) => void;
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
    readonly hideOnClickModal: BooleanConstructor;
    readonly src: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
    readonly fit: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "contain" | "fill" | "none" | "cover" | "scale-down", unknown, "", boolean>;
    readonly loading: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "lazy" | "eager", unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly lazy: BooleanConstructor;
    readonly scrollContainer: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | HTMLElement | undefined) & {}) | (() => string | HTMLElement | undefined) | ((new (...args: any[]) => (string | HTMLElement | undefined) & {}) | (() => string | HTMLElement | undefined))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly previewSrcList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => [], boolean>;
    readonly previewTeleported: BooleanConstructor;
    readonly zIndex: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly initialIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
    readonly infinite: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly zoomRate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1.2, boolean>;
    readonly minScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0.2, boolean>;
    readonly maxScale: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
    readonly crossorigin: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials") | ((new (...args: any[]) => ("" | "anonymous" | "use-credentials") & {}) | (() => "" | "anonymous" | "use-credentials"))[], unknown, unknown>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
}>> & {
    onShow?: (() => any) | undefined;
    onLoad?: ((evt: Event) => any) | undefined;
    onError?: ((evt: Event) => any) | undefined;
    onClose?: (() => any) | undefined;
    onSwitch?: ((val: number) => any) | undefined;
}, {
    readonly infinite: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
    readonly src: string;
    readonly fit: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "contain" | "fill" | "none" | "cover" | "scale-down", unknown>;
    readonly initialIndex: number;
    readonly lazy: boolean;
    readonly closeOnPressEscape: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
    readonly zoomRate: number;
    readonly minScale: number;
    readonly maxScale: number;
    readonly hideOnClickModal: boolean;
    readonly previewSrcList: string[];
    readonly previewTeleported: boolean;
}>, {
    error?(_: {}): any;
    placeholder?(_: {}): any;
    viewer?(_: {}): any;
}>;
export default _default;
declare type __VLS_WithTemplateSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};


code:
import '../../../utils/index.mjs';
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
import { mutable } from '../../../utils/typescript.mjs';
import { isNumber } from '../../../utils/types.mjs';

const 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
  },
  minScale: {
    type: Number,
    default: 0.2
  },
  maxScale: {
    type: Number,
    default: 7
  },
  crossorigin: {
    type: definePropType(String)
  }
});
const imageEmits = {
  load: (evt) => evt instanceof Event,
  error: (evt) => evt instanceof Event,
  switch: (val) => isNumber(val),
  close: () => true,
  show: () => true
};

export { imageEmits, imageProps };
//# sourceMappingURL=image2.mjs.map


code:
import 'element-plus/es/components/base/style/css';
import 'element-plus/theme-chalk/el-image.css';
import 'element-plus/es/components/image-viewer/style/css';


code:
import '../../base/style/css.mjs';
import 'element-plus/theme-chalk/el-image.css';
import '../../image-viewer/style/css.mjs';
//# sourceMappingURL=css.mjs.map


code:
import 'element-plus/es/components/base/style';
import 'element-plus/theme-chalk/src/image.scss';
import 'element-plus/es/components/image-viewer/style';


code:
import '../../base/style/index.mjs';
import 'element-plus/theme-chalk/src/image.scss';
import '../../image-viewer/style/index.mjs';
//# sourceMappingURL=index.mjs.map


code:
export * from './affix';
export * from './alert';
export * from './autocomplete';
export * from './avatar';
export * from './backtop';
export * from './badge';
export * from './breadcrumb';
export * from './button';
export * from './calendar';
export * from './card';
export * from './carousel';
export * from './cascader';
export * from './cascader-panel';
export * from './check-tag';
export * from './checkbox';
export * from './col';
export * from './collapse';
export * from './collapse-transition';
export * from './color-picker';
export * from './config-provider';
export * from './container';
export * from './countdown';
export * from './date-picker';
export * from './descriptions';
export * from './dialog';
export * from './divider';
export * from './drawer';
export * from './dropdown';
export * from './empty';
export * from './form';
export * from './icon';
export * from './image';
export * from './image-viewer';
export * from './input';
export * from './input-number';
export * from './link';
export * from './menu';
export * from './overlay';
export * from './page-header';
export * from './pagination';
export * from './popconfirm';
export * from './popper';
export * from './progress';
export * from './radio';
export * from './rate';
export * from './result';
export * from './row';
export * from './scrollbar';
export * from './select';
export * from './select-v2';
export * from './skeleton';
export * from './slider';
export * from './space';
export * from './statistic';
export * from './steps';
export * from './switch';
export * from './table';
export * from './table-v2';
export * from './tabs';
export * from './tag';
export * from './text';
export * from './time-picker';
export * from './time-select';
export * from './timeline';
export * from './tooltip';
export * from './transfer';
export * from './tree';
export * from './tree-select';
export * from './tree-v2';
export * from './upload';
export * from './virtual-list';
export * from './watermark';
export * from './tour';
export * from './anchor';
export * from './segmented';
export * from './mention';
export * from './infinite-scroll';
export * from './loading';
export * from './message';
export * from './message-box';
export * from './notification';
export * from './popover';


code:
export { ElAffix } from './affix/index.mjs';
export { ElAlert } from './alert/index.mjs';
export { ElAutocomplete } from './autocomplete/index.mjs';
export { ElAvatar } from './avatar/index.mjs';
export { ElBacktop } from './backtop/index.mjs';
export { ElBadge } from './badge/index.mjs';
export { ElBreadcrumb, ElBreadcrumbItem } from './breadcrumb/index.mjs';
export { ElButton, ElButtonGroup } from './button/index.mjs';
export { ElCalendar } from './calendar/index.mjs';
export { ElCard } from './card/index.mjs';
export { ElCarousel, ElCarouselItem } from './carousel/index.mjs';
export { ElCascader } from './cascader/index.mjs';
export { ElCascaderPanel } from './cascader-panel/index.mjs';
export { ElCheckTag } from './check-tag/index.mjs';
export { ElCheckbox, ElCheckboxButton, ElCheckboxGroup } from './checkbox/index.mjs';
export { ElCol } from './col/index.mjs';
export { ElCollapse, ElCollapseItem } from './collapse/index.mjs';
export { ElCollapseTransition } from './collapse-transition/index.mjs';
export { ElColorPicker } from './color-picker/index.mjs';
export { ElConfigProvider } from './config-provider/index.mjs';
export { ElAside, ElContainer, ElFooter, ElHeader, ElMain } from './container/index.mjs';
export { ElCountdown } from './countdown/index.mjs';
export { ElDatePicker } from './date-picker/index.mjs';
export { ElDescriptions, ElDescriptionsItem } from './descriptions/index.mjs';
export { ElDialog } from './dialog/index.mjs';
export { ElDivider } from './divider/index.mjs';
export { ElDrawer } from './drawer/index.mjs';
export { ElDropdown, ElDropdownItem, ElDropdownMenu } from './dropdown/index.mjs';
export { ElEmpty } from './empty/index.mjs';
export { ElForm, ElFormItem } from './form/index.mjs';
export { ElIcon } from './icon/index.mjs';
export { ElImage } from './image/index.mjs';
export { ElImageViewer } from './image-viewer/index.mjs';
export { ElInput } from './input/index.mjs';
export { ElInputNumber } from './input-number/index.mjs';
export { ElLink } from './link/index.mjs';
export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './menu/index.mjs';
export { ElOverlay } from './overlay/index.mjs';
export { ElPageHeader } from './page-header/index.mjs';
export { ElPagination } from './pagination/index.mjs';
export { ElPopconfirm } from './popconfirm/index.mjs';
export { ElPopper } from './popper/index.mjs';
export { ElProgress } from './progress/index.mjs';
export { ElRadio, ElRadioButton, ElRadioGroup } from './radio/index.mjs';
export { ElRate } from './rate/index.mjs';
export { ElResult } from './result/index.mjs';
export { ElRow } from './row/index.mjs';
export { ElScrollbar } from './scrollbar/index.mjs';
export { ElOption, ElOptionGroup, ElSelect } from './select/index.mjs';
export { ElSelectV2 } from './select-v2/index.mjs';
export { ElSkeleton, ElSkeletonItem } from './skeleton/index.mjs';
export { ElSlider } from './slider/index.mjs';
export { ElSpace } from './space/index.mjs';
export { ElStatistic } from './statistic/index.mjs';
export { ElStep, ElSteps } from './steps/index.mjs';
export { ElSwitch } from './switch/index.mjs';
export { ElTable, ElTableColumn } from './table/index.mjs';
export { ElAutoResizer, ElTableV2 } from './table-v2/index.mjs';
export { ElTabPane, ElTabs } from './tabs/index.mjs';
export { ElTag } from './tag/index.mjs';
export { ElText } from './text/index.mjs';
export { ElTimePicker } from './time-picker/index.mjs';
export { ElTimeSelect } from './time-select/index.mjs';
export { ElTimeline, ElTimelineItem } from './timeline/index.mjs';
export { ElTooltip } from './tooltip/index.mjs';
export { ElTransfer } from './transfer/index.mjs';
export { ElTree } from './tree/index.mjs';
export { ElTreeSelect } from './tree-select/index.mjs';
export { ElTreeV2 } from './tree-v2/index.mjs';
export { ElUpload } from './upload/index.mjs';
import './virtual-list/index.mjs';
export { ElWatermark } from './watermark/index.mjs';
export { ElTour, ElTourStep } from './tour/index.mjs';
export { ElAnchor, ElAnchorLink } from './anchor/index.mjs';
export { ElSegmented } from './segmented/index.mjs';
export { ElMention } from './mention/index.mjs';
export { ElInfiniteScroll } from './infinite-scroll/index.mjs';
export { ElLoading } from './loading/index.mjs';
export { ElMessage } from './message/index.mjs';
export { ElMessageBox } from './message-box/index.mjs';
export { ElNotification } from './notification/index.mjs';
export { ElPopover, ElPopoverDirective } from './popover/index.mjs';
export { affixEmits, affixProps } from './affix/src/affix.mjs';
export { alertEffects, alertEmits, alertProps } from './alert/src/alert.mjs';
export { autocompleteEmits, autocompleteProps } from './autocomplete/src/autocomplete.mjs';
export { avatarEmits, avatarProps } from './avatar/src/avatar.mjs';
export { backtopEmits, backtopProps } from './backtop/src/backtop2.mjs';
export { badgeProps } from './badge/src/badge.mjs';
export { breadcrumbProps } from './breadcrumb/src/breadcrumb.mjs';
export { breadcrumbItemProps } from './breadcrumb/src/breadcrumb-item.mjs';
export { breadcrumbKey } from './breadcrumb/src/constants.mjs';
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './button/src/button.mjs';
export { buttonGroupContextKey } from './button/src/constants.mjs';
export { calendarEmits, calendarProps } from './calendar/src/calendar.mjs';
export { cardProps } from './card/src/card.mjs';
export { carouselEmits, carouselProps } from './carousel/src/carousel.mjs';
export { carouselItemProps } from './carousel/src/carousel-item.mjs';
export { CAROUSEL_ITEM_NAME, carouselContextKey } from './carousel/src/constants.mjs';
export { cascaderEmits, cascaderProps } from './cascader/src/cascader.mjs';
export { CASCADER_PANEL_INJECTION_KEY } from './cascader-panel/src/types.mjs';
export { CommonProps, DefaultProps, useCascaderConfig } from './cascader-panel/src/config.mjs';
export { checkTagEmits, checkTagProps } from './check-tag/src/check-tag.mjs';
export { checkboxGroupEmits, checkboxGroupProps } from './checkbox/src/checkbox-group.mjs';
export { checkboxEmits, checkboxProps } from './checkbox/src/checkbox.mjs';
export { checkboxGroupContextKey } from './checkbox/src/constants.mjs';
export { colProps } from './col/src/col.mjs';
export { collapseEmits, collapseProps, emitChangeFn } from './collapse/src/collapse.mjs';
export { collapseItemProps } from './collapse/src/collapse-item.mjs';
export { collapseContextKey } from './collapse/src/constants.mjs';
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './color-picker/src/color-picker.mjs';
export { messageConfig } from './config-provider/src/config-provider.mjs';
export { configProviderProps } from './config-provider/src/config-provider-props.mjs';
export { configProviderContextKey } from './config-provider/src/constants.mjs';
export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './config-provider/src/hooks/use-global-config.mjs';
export { countdownEmits, countdownProps } from './countdown/src/countdown.mjs';
export { ROOT_PICKER_INJECTION_KEY } from './date-picker/src/constants.mjs';
export { datePickerProps } from './date-picker/src/props/date-picker.mjs';
export { descriptionProps } from './descriptions/src/description.mjs';
export { descriptionItemProps } from './descriptions/src/description-item.mjs';
export { useDialog } from './dialog/src/use-dialog.mjs';
export { dialogEmits, dialogProps } from './dialog/src/dialog.mjs';
export { dialogInjectionKey } from './dialog/src/constants.mjs';
export { dividerProps } from './divider/src/divider.mjs';
export { drawerEmits, drawerProps } from './drawer/src/drawer.mjs';
export { DROPDOWN_COLLECTION_INJECTION_KEY, DROPDOWN_COLLECTION_ITEM_INJECTION_KEY, ElCollection, ElCollectionItem, FIRST_KEYS, FIRST_LAST_KEYS, LAST_KEYS, dropdownItemProps, dropdownMenuProps, dropdownProps } from './dropdown/src/dropdown.mjs';
export { DROPDOWN_INJECTION_KEY } from './dropdown/src/tokens.mjs';
export { emptyProps } from './empty/src/empty.mjs';
export { formEmits, formMetaProps, formProps } from './form/src/form.mjs';
export { formItemProps, formItemValidateStates } from './form/src/form-item.mjs';
export { formContextKey, formItemContextKey } from './form/src/constants.mjs';
export { useDisabled, useFormDisabled, useFormSize, useSize } from './form/src/hooks/use-form-common-props.mjs';
export { useFormItem, useFormItemInputId } from './form/src/hooks/use-form-item.mjs';
export { iconProps } from './icon/src/icon.mjs';
export { imageEmits, imageProps } from './image/src/image2.mjs';
export { imageViewerEmits, imageViewerProps } from './image-viewer/src/image-viewer.mjs';
export { inputEmits, inputProps } from './input/src/input.mjs';
export { inputNumberEmits, inputNumberProps } from './input-number/src/input-number.mjs';
export { linkEmits, linkProps } from './link/src/link.mjs';
export { menuEmits, menuProps } from './menu/src/menu.mjs';
export { menuItemEmits, menuItemProps } from './menu/src/menu-item.mjs';
export { menuItemGroupProps } from './menu/src/menu-item-group.mjs';
export { subMenuProps } from './menu/src/sub-menu.mjs';
export { overlayEmits, overlayProps } from './overlay/src/overlay.mjs';
export { pageHeaderEmits, pageHeaderProps } from './page-header/src/page-header.mjs';
export { paginationEmits, paginationProps } from './pagination/src/pagination.mjs';
export { elPaginationKey } from './pagination/src/constants.mjs';
export { popconfirmEmits, popconfirmProps } from './popconfirm/src/popconfirm.mjs';
export { Effect, popperProps, roleTypes, usePopperProps } from './popper/src/popper.mjs';
export { popperTriggerProps, usePopperTriggerProps } from './popper/src/trigger.mjs';
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './popper/src/content.mjs';
export { popperArrowProps, usePopperArrowProps } from './popper/src/arrow.mjs';
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './popper/src/constants.mjs';
export { default as ElPopperArrow } from './popper/src/arrow2.mjs';
export { default as ElPopperTrigger } from './popper/src/trigger2.mjs';
export { default as ElPopperContent } from './popper/src/content2.mjs';
export { progressProps } from './progress/src/progress.mjs';
export { radioEmits, radioProps, radioPropsBase } from './radio/src/radio.mjs';
export { radioGroupEmits, radioGroupProps } from './radio/src/radio-group.mjs';
export { radioButtonProps } from './radio/src/radio-button.mjs';
export { radioGroupKey } from './radio/src/constants.mjs';
export { rateEmits, rateProps } from './rate/src/rate.mjs';
export { IconComponentMap, IconMap, resultProps } from './result/src/result.mjs';
export { RowAlign, RowJustify, rowProps } from './row/src/row.mjs';
export { rowContextKey } from './row/src/constants.mjs';
export { BAR_MAP, GAP, renderThumbStyle } from './scrollbar/src/util.mjs';
export { scrollbarEmits, scrollbarProps } from './scrollbar/src/scrollbar.mjs';
export { thumbProps } from './scrollbar/src/thumb.mjs';
export { scrollbarContextKey } from './scrollbar/src/constants.mjs';
export { selectGroupKey, selectKey } from './select/src/token.mjs';
export { selectV2InjectionKey } from './select-v2/src/token.mjs';
export { skeletonProps } from './skeleton/src/skeleton.mjs';
export { skeletonItemProps } from './skeleton/src/skeleton-item.mjs';
export { sliderEmits, sliderProps } from './slider/src/slider.mjs';
export { sliderContextKey } from './slider/src/constants.mjs';
export { spaceProps } from './space/src/space.mjs';
export { spaceItemProps } from './space/src/item.mjs';
export { useSpace } from './space/src/use-space.mjs';
export { statisticProps } from './statistic/src/statistic.mjs';
export { stepProps } from './steps/src/item.mjs';
export { stepsEmits, stepsProps } from './steps/src/steps.mjs';
export { switchEmits, switchProps } from './switch/src/switch.mjs';
export { Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, SortOrder as TableV2SortOrder } from './table-v2/src/constants.mjs';
export { default as TableV2 } from './table-v2/src/table-v2.mjs';
export { placeholderSign as TableV2Placeholder } from './table-v2/src/private.mjs';
export { autoResizerProps } from './table-v2/src/auto-resizer.mjs';
export { tableV2Props } from './table-v2/src/table.mjs';
export { tableV2RowProps } from './table-v2/src/row.mjs';
export { tabsEmits, tabsProps } from './tabs/src/tabs.mjs';
export { tabBarProps } from './tabs/src/tab-bar.mjs';
export { tabNavEmits, tabNavProps } from './tabs/src/tab-nav.mjs';
export { tabPaneProps } from './tabs/src/tab-pane.mjs';
export { tabsRootContextKey } from './tabs/src/constants.mjs';
export { tagEmits, tagProps } from './tag/src/tag.mjs';
export { textProps } from './text/src/text.mjs';
export { buildTimeList, dateEquals, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './time-picker/src/utils.mjs';
export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, timeUnits } from './time-picker/src/constants.mjs';
export { timePickerDefaultProps } from './time-picker/src/common/props.mjs';
export { default as CommonPicker } from './time-picker/src/common/picker.mjs';
export { default as TimePickPanel } from './time-picker/src/time-picker-com/panel-time-pick.mjs';
export { timeSelectProps } from './time-select/src/time-select.mjs';
export { timelineItemProps } from './timeline/src/timeline-item.mjs';
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './tooltip/src/tooltip.mjs';
export { useTooltipTriggerProps } from './tooltip/src/trigger.mjs';
export { useTooltipContentProps } from './tooltip/src/content.mjs';
export { TOOLTIP_INJECTION_KEY } from './tooltip/src/constants.mjs';
export { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT, transferCheckedChangeFn, transferEmits, transferProps } from './transfer/src/transfer2.mjs';
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './upload/src/upload.mjs';
export { uploadContentProps } from './upload/src/upload-content2.mjs';
export { uploadListEmits, uploadListProps } from './upload/src/upload-list.mjs';
export { uploadDraggerEmits, uploadDraggerProps } from './upload/src/upload-dragger.mjs';
export { uploadContextKey } from './upload/src/constants.mjs';
export { default as FixedSizeList } from './virtual-list/src/components/fixed-size-list.mjs';
export { default as DynamicSizeList } from './virtual-list/src/components/dynamic-size-list.mjs';
export { default as FixedSizeGrid } from './virtual-list/src/components/fixed-size-grid.mjs';
export { default as DynamicSizeGrid } from './virtual-list/src/components/dynamic-size-grid.mjs';
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './virtual-list/src/props.mjs';
export { watermarkProps } from './watermark/src/watermark.mjs';
export { tourEmits, tourProps } from './tour/src/tour.mjs';
export { tourStepEmits, tourStepProps } from './tour/src/step.mjs';
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './tour/src/content.mjs';
export { anchorEmits, anchorProps } from './anchor/src/anchor.mjs';
export { segmentedEmits, segmentedProps } from './segmented/src/segmented.mjs';
export { mentionEmits, mentionProps } from './mention/src/mention.mjs';
export { vLoading as ElLoadingDirective, vLoading } from './loading/src/directive.mjs';
export { Loading as ElLoadingService } from './loading/src/service.mjs';
export { messageDefaults, messageEmits, messageProps, messageTypes } from './message/src/message.mjs';
export { notificationEmits, notificationProps, notificationTypes } from './notification/src/notification.mjs';
export { popoverEmits, popoverProps } from './popover/src/popover.mjs';
//# sourceMappingURL=index.mjs.map


code:
import type { SFCWithInstall } from 'element-plus/es/utils';
declare const _InfiniteScroll: SFCWithInstall<import("vue").ObjectDirective<HTMLElement & {
    ElInfiniteScroll: {
        container: HTMLElement | Window;
        containerEl: HTMLElement;
        instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
        delay: number;
        lastScrollTop: number;
        cb: () => void;
        onScroll: () => void;
        observer?: MutationObserver | undefined;
    };
}, () => void>>;
export default _InfiniteScroll;
export declare const ElInfiniteScroll: SFCWithInstall<import("vue").ObjectDirective<HTMLElement & {
    ElInfiniteScroll: {
        container: HTMLElement | Window;
        containerEl: HTMLElement;
        instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
        delay: number;
        lastScrollTop: number;
        cb: () => void;
        onScroll: () => void;
        observer?: MutationObserver | undefined;
    };
}, () => void>>;


code:
import InfiniteScroll from './src/index.mjs';

const _InfiniteScroll = InfiniteScroll;
_InfiniteScroll.install = (app) => {
  app.directive("InfiniteScroll", _InfiniteScroll);
};
const ElInfiniteScroll = _InfiniteScroll;

export { ElInfiniteScroll, _InfiniteScroll as default };
//# sourceMappingURL=index.mjs.map


sourcesContent:
import InfiniteScroll from './src'

import type { App } from 'vue'
import type { SFCWithInstall } from '@element-plus/utils'

const _InfiniteScroll = InfiniteScroll as SFCWithInstall<typeof InfiniteScroll>

_InfiniteScroll.install = (app: App) => {
  app.directive('InfiniteScroll', _InfiniteScroll)
}

export default _InfiniteScroll
export const ElInfiniteScroll = _InfiniteScroll


code:
import type { ComponentPublicInstance, ObjectDirective } from 'vue';
export declare const SCOPE = "ElInfiniteScroll";
export declare const CHECK_INTERVAL = 50;
export declare const DEFAULT_DELAY = 200;
export declare const DEFAULT_DISTANCE = 0;
declare type InfiniteScrollCallback = () => void;
declare type InfiniteScrollEl = HTMLElement & {
    [SCOPE]: {
        container: HTMLElement | Window;
        containerEl: HTMLElement;
        instance: ComponentPublicInstance;
        delay: number;
        lastScrollTop: number;
        cb: InfiniteScrollCallback;
        onScroll: () => void;
        observer?: MutationObserver;
    };
};
declare const InfiniteScroll: ObjectDirective<InfiniteScrollEl, InfiniteScrollCallback>;
export default InfiniteScroll;


code:
import { nextTick } from 'vue';
import { throttle } from 'lodash-unified';
import '../../../utils/index.mjs';
import { getOffsetTopDistance } from '../../../utils/dom/position.mjs';
import { isFunction } from '@vue/shared';
import { throwError } from '../../../utils/error.mjs';
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';

const SCOPE = "ElInfiniteScroll";
const CHECK_INTERVAL = 50;
const DEFAULT_DELAY = 200;
const DEFAULT_DISTANCE = 0;
const attributes = {
  delay: {
    type: Number,
    default: DEFAULT_DELAY
  },
  distance: {
    type: Number,
    default: DEFAULT_DISTANCE
  },
  disabled: {
    type: Boolean,
    default: false
  },
  immediate: {
    type: Boolean,
    default: true
  }
};
const getScrollOptions = (el, instance) => {
  return Object.entries(attributes).reduce((acm, [name, option]) => {
    var _a, _b;
    const { type, 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 = type(value);
    acm[name] = Number.isNaN(value) ? defaultValue : value;
    return acm;
  }, {});
};
const destroyObserver = (el) => {
  const { observer } = el[SCOPE];
  if (observer) {
    observer.disconnect();
    delete el[SCOPE].observer;
  }
};
const handleScroll = (el, cb) => {
  const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE];
  const { disabled, distance } = getScrollOptions(el, instance);
  const { clientHeight, scrollHeight, scrollTop } = containerEl;
  const delta = scrollTop - lastScrollTop;
  el[SCOPE].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[SCOPE];
  const { disabled } = getScrollOptions(el, instance);
  if (disabled || containerEl.clientHeight === 0)
    return;
  if (containerEl.scrollHeight <= containerEl.clientHeight) {
    cb.call(instance);
  } else {
    destroyObserver(el);
  }
}
const InfiniteScroll = {
  async mounted(el, binding) {
    const { instance, value: cb } = binding;
    if (!isFunction(cb)) {
      throwError(SCOPE, "'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(handleScroll.bind(null, el, cb), delay);
    if (!container)
      return;
    el[SCOPE] = {
      instance,
      container,
      containerEl,
      delay,
      cb,
      onScroll,
      lastScrollTop: containerEl.scrollTop
    };
    if (immediate) {
      const observer = new MutationObserver(throttle(checkFull.bind(null, el, cb), CHECK_INTERVAL));
      el[SCOPE].observer = observer;
      observer.observe(el, { childList: true, subtree: true });
      checkFull(el, cb);
    }
    container.addEventListener("scroll", onScroll);
  },
  unmounted(el) {
    if (!el[SCOPE])
      return;
    const { container, onScroll } = el[SCOPE];
    container == null ? void 0 : container.removeEventListener("scroll", onScroll);
    destroyObserver(el);
  },
  async updated(el) {
    if (!el[SCOPE]) {
      await nextTick();
    } else {
      const { containerEl, cb, observer } = el[SCOPE];
      if (containerEl.clientHeight && observer) {
        checkFull(el, cb);
      }
    }
  }
};

export { CHECK_INTERVAL, DEFAULT_DELAY, DEFAULT_DISTANCE, SCOPE, InfiniteScroll as default };
//# sourceMappingURL=index.mjs.map


code:
import 'element-plus/es/components/base/style/css';
import 'element-plus/theme-chalk/el-infinite-scroll.css';


code:
import '../../base/style/css.mjs';
import 'element-plus/theme-chalk/el-infinite-scroll.css';
//# sourceMappingURL=css.mjs.map


code:
import 'element-plus/es/components/base/style';
import 'element-plus/theme-chalk/src/infinite-scroll.scss';


code:
import '../../base/style/index.mjs';
import 'element-plus/theme-chalk/src/infinite-scroll.scss';
//# sourceMappingURL=index.mjs.map


code:
import InputNumber from './src/input-number.vue';
import type { SFCWithInstall } from 'element-plus/es/utils';
export declare const ElInputNumber: SFCWithInstall<typeof InputNumber>;
export default ElInputNumber;
export * from './src/input-number';


code:
import '../../utils/index.mjs';
import InputNumber from './src/input-number2.mjs';
export { inputNumberEmits, inputNumberProps } from './src/input-number.mjs';
import { withInstall } from '../../utils/vue/install.mjs';

const ElInputNumber = withInstall(InputNumber);

export { ElInputNumber, ElInputNumber as default };
//# sourceMappingURL=index.mjs.map


sourcesContent:
import { withInstall } from '@element-plus/utils'
import InputNumber from './src/input-number.vue'
import type { SFCWithInstall } from '@element-plus/utils'

export const ElInputNumber: SFCWithInstall<typeof InputNumber> =
  withInstall(InputNumber)

export default ElInputNumber
export * from './src/input-number'


code:
import type { ExtractPropTypes } from 'vue';
import type InputNumber from './input-number.vue';
export declare const inputNumberProps: {
    readonly ariaLabel: StringConstructor;
    readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
    readonly step: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
    readonly stepStrictly: BooleanConstructor;
    readonly max: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
    readonly min: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
    readonly modelValue: NumberConstructor;
    readonly readonly: BooleanConstructor;
    readonly disabled: BooleanConstructor;
    readonly size: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly controls: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly controlsPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "right", unknown, "", boolean>;
    readonly valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, null], unknown, unknown, null, boolean>;
    readonly name: StringConstructor;
    readonly placeholder: StringConstructor;
    readonly precision: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
};
export declare type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>;
export declare const inputNumberEmits: {
    change: (cur: number | undefined, prev: number | undefined) => boolean;
    blur: (e: FocusEvent) => boolean;
    focus: (e: FocusEvent) => boolean;
    input: (val: number | null | undefined) => boolean;
    "update:modelValue": (val: number | undefined) => boolean;
};
export declare type InputNumberEmits = typeof inputNumberEmits;
export declare type InputNumberInstance = InstanceType<typeof InputNumber>;


code:
import { isNil } from 'lodash-unified';
import '../../../hooks/index.mjs';
import '../../../utils/index.mjs';
import '../../../constants/index.mjs';
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
import { isNumber } from '../../../utils/types.mjs';
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
import { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';

const inputNumberProps = buildProps({
  id: {
    type: String,
    default: void 0
  },
  step: {
    type: Number,
    default: 1
  },
  stepStrictly: Boolean,
  max: {
    type: Number,
    default: Number.POSITIVE_INFINITY
  },
  min: {
    type: Number,
    default: Number.NEGATIVE_INFINITY
  },
  modelValue: Number,
  readonly: Boolean,
  disabled: Boolean,
  size: useSizeProp,
  controls: {
    type: Boolean,
    default: true
  },
  controlsPosition: {
    type: String,
    default: "",
    values: ["", "right"]
  },
  valueOnClear: {
    type: [String, Number, null],
    validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val),
    default: null
  },
  name: String,
  placeholder: String,
  precision: {
    type: Number,
    validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
  },
  validateEvent: {
    type: Boolean,
    default: true
  },
  ...useAriaProps(["ariaLabel"])
});
const inputNumberEmits = {
  [CHANGE_EVENT]: (cur, prev) => prev !== cur,
  blur: (e) => e instanceof FocusEvent,
  focus: (e) => e instanceof FocusEvent,
  [INPUT_EVENT]: (val) => isNumber(val) || isNil(val),
  [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
};

export { inputNumberEmits, inputNumberProps };
//# sourceMappingURL=input-number.mjs.map


code:
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
    readonly ariaLabel: StringConstructor;
    readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
    readonly step: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
    readonly stepStrictly: BooleanConstructor;
    readonly max: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
    readonly min: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
    readonly modelValue: NumberConstructor;
    readonly readonly: BooleanConstructor;
    readonly disabled: BooleanConstructor;
    readonly size: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly controls: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly controlsPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "right", unknown, "", boolean>;
    readonly valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, null], unknown, unknown, null, boolean>;
    readonly name: StringConstructor;
    readonly placeholder: StringConstructor;
    readonly precision: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
}, {
    /** @description get focus the input component */
    focus: () => void;
    /** @description remove focus the input component */
    blur: () => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
    input: (val: number | null | undefined) => void;
    "update:modelValue": (val: number | undefined) => void;
    change: (cur: number | undefined, prev: number | undefined) => void;
    blur: (e: FocusEvent) => void;
    focus: (e: FocusEvent) => void;
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
    readonly ariaLabel: StringConstructor;
    readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
    readonly step: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
    readonly stepStrictly: BooleanConstructor;
    readonly max: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
    readonly min: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
    readonly modelValue: NumberConstructor;
    readonly readonly: BooleanConstructor;
    readonly disabled: BooleanConstructor;
    readonly size: {
        readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly controls: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
    readonly controlsPosition: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "right", unknown, "", boolean>;
    readonly valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, null], unknown, unknown, null, boolean>;
    readonly name: StringConstructor;
    readonly placeholder: StringConstructor;
    readonly precision: {
        readonly type: import("vue").PropType<number>;
        readonly required: false;
        readonly validator: ((val: unknown) => boolean) | undefined;
        __epPropKey: true;
    };
    readonly validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
}>> & {
    "onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined;
    onChange?: ((cur: number | undefined, prev: number | undefined) => any) | undefined;
    onFocus?: ((e: FocusEvent) => any) | undefined;
    onBlur?: ((e: FocusEvent) => any) | undefined;
    onInput?: ((val: number | null | undefined) => any) | undefined;
}, {
    readonly disabled: boolean;
    readonly id: string;
    readonly valueOnClear: any;
    readonly min: number;
    readonly max: number;
    readonly validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
    readonly readonly: boolean;
    readonly step: number;
    readonly controls: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
    readonly controlsPosition: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "right", unknown>;
    readonly stepStrictly: boolean;
}>, {
    "decrease-icon"?(_: {}): any;
    "increase-icon"?(_: {}): any;
    prefix?(_: {}): any;
    suffix?(_: {}): any;
}>;
export default _default;
declare type __VLS_WithTemplateSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};