import {
  T as ye,
  P as h,
  _ as i,
  b as $,
  F as be,
  e as U,
  E as Ae,
  M as Le,
  g as Re,
  m as De,
  j as Ee,
  r as We,
  a4 as je,
  aa as le,
  a as _e,
  v as Ve,
  C as Ge,
  W as Y,
  o as K,
  ac as Ke,
  a7 as Xe,
  ag as Ue,
  ak as ke,
  al as Qe,
  am as Ye,
  an as Ze,
  ao as qe,
  ab as Je
} from '../main.491ba5c0.js'
import {
  d as O,
  r as X,
  e as Z,
  c as a,
  a0 as xe,
  a5 as $e,
  a2 as Se,
  n as eo,
  s as T,
  j as q,
  l as oo,
  k as no,
  F as to,
  B as se,
  u as lo,
  $ as ao
} from './vendor.84fc1123.js'
import {
  av as io,
  o as he,
  aw as ro,
  K as ce,
  ax as so,
  p as co,
  ay as uo,
  F as fo,
  B as de,
  x as mo,
  az as go
} from './VendorStore.d737faa9.js'
import { i as J } from './initDefaultProps.71991ecc.js'
import { A as ue } from './ActionButton.265b9cc4.js'
const po = new ye('antFadeIn', {
    '0%': { opacity: 0 },
    '100%': { opacity: 1 }
  }),
  Co = new ye('antFadeOut', { '0%': { opacity: 1 }, '100%': { opacity: 0 } }),
  vo = function(e) {
    let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1
    const { antCls: n } = e,
      t = `${n}-fade`,
      l = o ? '&' : ''
    return [
      io(t, po, Co, e.motionDurationMid, o),
      {
        [`
        ${l}${t}-enter,
        ${l}${t}-appear
      `]: { opacity: 0, animationTimingFunction: 'linear' },
        [`${l}${t}-leave`]: { animationTimingFunction: 'linear' }
      }
    ]
  }
function ae() {
  return {
    keyboard: { type: Boolean, default: void 0 },
    mask: { type: Boolean, default: void 0 },
    afterClose: Function,
    closable: { type: Boolean, default: void 0 },
    maskClosable: { type: Boolean, default: void 0 },
    visible: { type: Boolean, default: void 0 },
    destroyOnClose: { type: Boolean, default: void 0 },
    mousePosition: h.shape({ x: Number, y: Number }).loose,
    title: h.any,
    footer: h.any,
    transitionName: String,
    maskTransitionName: String,
    animation: h.any,
    maskAnimation: h.any,
    wrapStyle: { type: Object, default: void 0 },
    bodyStyle: { type: Object, default: void 0 },
    maskStyle: { type: Object, default: void 0 },
    prefixCls: String,
    wrapClassName: String,
    rootClassName: String,
    width: [String, Number],
    height: [String, Number],
    zIndex: Number,
    bodyProps: h.any,
    maskProps: h.any,
    wrapProps: h.any,
    getContainer: h.any,
    dialogStyle: { type: Object, default: void 0 },
    dialogClass: String,
    closeIcon: h.any,
    forceRender: { type: Boolean, default: void 0 },
    getOpenCount: Function,
    focusTriggerAfterClose: { type: Boolean, default: void 0 },
    onClose: Function,
    modalRender: Function
  }
}
function fe(e, o, n) {
  let t = o
  return !t && n && (t = `${e}-${n}`), t
}
let me = -1
function yo() {
  return (me += 1), me
}
function ge(e, o) {
  let n = e[`page${o ? 'Y' : 'X'}Offset`]
  const t = `scroll${o ? 'Top' : 'Left'}`
  if (typeof n != 'number') {
    const l = e.document
    ;(n = l.documentElement[t]), typeof n != 'number' && (n = l.body[t])
  }
  return n
}
function bo(e) {
  const o = e.getBoundingClientRect(),
    n = { left: o.left, top: o.top },
    t = e.ownerDocument,
    l = t.defaultView || t.parentWindow
  return (n.left += ge(l)), (n.top += ge(l, !0)), n
}
const xo = { width: 0, height: 0, overflow: 'hidden', outline: 'none' },
  $o = { outline: 'none' },
  So = O({
    compatConfig: { MODE: 3 },
    name: 'DialogContent',
    inheritAttrs: !1,
    props: i(i({}, ae()), {
      motionName: String,
      ariaId: String,
      onVisibleChanged: Function,
      onMousedown: Function,
      onMouseup: Function
    }),
    setup(e, o) {
      let { expose: n, slots: t, attrs: l } = o
      const s = X(),
        g = X(),
        p = X()
      n({
        focus: () => {
          var c
          ;(c = s.value) === null ||
            c === void 0 ||
            c.focus({ preventScroll: !0 })
        },
        changeActive: c => {
          const { activeElement: r } = document
          c && r === g.value
            ? s.value.focus({ preventScroll: !0 })
            : !c && r === s.value && g.value.focus({ preventScroll: !0 })
        }
      })
      const S = X(),
        m = Z(() => {
          const { width: c, height: r } = e,
            v = {}
          return (
            c !== void 0 && (v.width = typeof c == 'number' ? `${c}px` : c),
            r !== void 0 && (v.height = typeof r == 'number' ? `${r}px` : r),
            S.value && (v.transformOrigin = S.value),
            v
          )
        }),
        u = () => {
          eo(() => {
            if (p.value) {
              const c = bo(p.value)
              S.value = e.mousePosition
                ? `${e.mousePosition.x - c.left}px ${e.mousePosition.y -
                    c.top}px`
                : ''
            }
          })
        },
        d = c => {
          e.onVisibleChanged(c)
        }
      return () => {
        var c, r, v, y
        const {
          prefixCls: x,
          footer: f = (c = t.footer) === null || c === void 0
            ? void 0
            : c.call(t),
          title: b = (r = t.title) === null || r === void 0
            ? void 0
            : r.call(t),
          ariaId: C,
          closable: w,
          closeIcon: B = (v = t.closeIcon) === null || v === void 0
            ? void 0
            : v.call(t),
          onClose: F,
          bodyStyle: I,
          bodyProps: M,
          onMousedown: H,
          onMouseup: A,
          visible: D,
          modalRender: E = t.modalRender,
          destroyOnClose: V,
          motionName: N
        } = e
        let W
        f && (W = a('div', { class: `${x}-footer` }, [f]))
        let j
        b &&
          (j = a('div', { class: `${x}-header` }, [
            a('div', { class: `${x}-title`, id: C }, [b])
          ]))
        let L
        w &&
          (L = a(
            'button',
            {
              type: 'button',
              onClick: F,
              'aria-label': 'Close',
              class: `${x}-close`
            },
            [B || a('span', { class: `${x}-close-x` }, null)]
          ))
        const z = a('div', { class: `${x}-content` }, [
            L,
            j,
            a('div', $({ class: `${x}-body`, style: I }, M), [
              (y = t.default) === null || y === void 0 ? void 0 : y.call(t)
            ]),
            W
          ]),
          ee = be(N)
        return a(
          Se,
          $(
            $({}, ee),
            {},
            {
              onBeforeEnter: u,
              onAfterEnter: () => d(!0),
              onAfterLeave: () => d(!1)
            }
          ),
          {
            default: () => [
              D || !V
                ? xe(
                    a(
                      'div',
                      $(
                        $({}, l),
                        {},
                        {
                          ref: p,
                          key: 'dialog-element',
                          role: 'document',
                          style: [m.value, l.style],
                          class: [x, l.class],
                          onMousedown: H,
                          onMouseup: A
                        }
                      ),
                      [
                        a('div', { tabindex: 0, ref: s, style: $o }, [
                          E ? E({ originVNode: z }) : z
                        ]),
                        a('div', { tabindex: 0, ref: g, style: xo }, null)
                      ]
                    ),
                    [[$e, D]]
                  )
                : null
            ]
          }
        )
      }
    }
  }),
  ho = O({
    compatConfig: { MODE: 3 },
    name: 'DialogMask',
    props: {
      prefixCls: String,
      visible: Boolean,
      motionName: String,
      maskProps: Object
    },
    setup(e, o) {
      return () => {
        const { prefixCls: n, visible: t, maskProps: l, motionName: s } = e,
          g = be(s)
        return a(Se, g, {
          default: () => [
            xe(a('div', $({ class: `${n}-mask` }, l), null), [[$e, t]])
          ]
        })
      }
    }
  }),
  pe = O({
    compatConfig: { MODE: 3 },
    name: 'VcDialog',
    inheritAttrs: !1,
    props: J(i(i({}, ae()), { getOpenCount: Function, scrollLocker: Object }), {
      mask: !0,
      visible: !1,
      keyboard: !0,
      closable: !0,
      maskClosable: !0,
      destroyOnClose: !1,
      prefixCls: 'rc-dialog',
      getOpenCount: () => null,
      focusTriggerAfterClose: !0
    }),
    setup(e, o) {
      let { attrs: n, slots: t } = o
      const l = T(),
        s = T(),
        g = T(),
        p = T(e.visible),
        S = T(`vcDialogTitle${yo()}`),
        m = f => {
          var b, C
          if (f)
            Ae(s.value, document.activeElement) ||
              ((l.value = document.activeElement),
              (b = g.value) === null || b === void 0 || b.focus())
          else {
            const w = p.value
            if (
              ((p.value = !1), e.mask && l.value && e.focusTriggerAfterClose)
            ) {
              try {
                l.value.focus({ preventScroll: !0 })
              } catch {}
              l.value = null
            }
            w && ((C = e.afterClose) === null || C === void 0 || C.call(e))
          }
        },
        u = f => {
          var b
          ;(b = e.onClose) === null || b === void 0 || b.call(e, f)
        },
        d = T(!1),
        c = T(),
        r = () => {
          clearTimeout(c.value), (d.value = !0)
        },
        v = () => {
          c.value = setTimeout(() => {
            d.value = !1
          })
        },
        y = f => {
          if (!e.maskClosable) return null
          d.value ? (d.value = !1) : s.value === f.target && u(f)
        },
        x = f => {
          if (e.keyboard && f.keyCode === ce.ESC) {
            f.stopPropagation(), u(f)
            return
          }
          e.visible && f.keyCode === ce.TAB && g.value.changeActive(!f.shiftKey)
        }
      return (
        q(
          () => e.visible,
          () => {
            e.visible && (p.value = !0)
          },
          { flush: 'post' }
        ),
        oo(() => {
          var f
          clearTimeout(c.value),
            (f = e.scrollLocker) === null || f === void 0 || f.unLock()
        }),
        no(() => {
          var f, b
          ;(f = e.scrollLocker) === null || f === void 0 || f.unLock(),
            p.value &&
              ((b = e.scrollLocker) === null || b === void 0 || b.lock())
        }),
        () => {
          const {
              prefixCls: f,
              mask: b,
              visible: C,
              maskTransitionName: w,
              maskAnimation: B,
              zIndex: F,
              wrapClassName: I,
              rootClassName: M,
              wrapStyle: H,
              closable: A,
              maskProps: D,
              maskStyle: E,
              transitionName: V,
              animation: N,
              wrapProps: W,
              title: j = t.title
            } = e,
            { style: L, class: z } = n
          return a('div', $({ class: [`${f}-root`, M] }, ro(e, { data: !0 })), [
            a(
              ho,
              {
                prefixCls: f,
                visible: b && C,
                motionName: fe(f, w, B),
                style: i({ zIndex: F }, E),
                maskProps: D
              },
              null
            ),
            a(
              'div',
              $(
                {
                  tabIndex: -1,
                  onKeydown: x,
                  class: U(`${f}-wrap`, I),
                  ref: s,
                  onClick: y,
                  role: 'dialog',
                  'aria-labelledby': j ? S.value : null,
                  style: i(i({ zIndex: F }, H), {
                    display: p.value ? null : 'none'
                  })
                },
                W
              ),
              [
                a(
                  So,
                  $(
                    $({}, he(e, ['scrollLocker'])),
                    {},
                    {
                      style: L,
                      class: z,
                      onMousedown: r,
                      onMouseup: v,
                      ref: g,
                      closable: A,
                      ariaId: S.value,
                      prefixCls: f,
                      visible: C,
                      onClose: u,
                      onVisibleChanged: m,
                      motionName: fe(f, V, N)
                    }
                  ),
                  t
                )
              ]
            )
          ])
        }
      )
    }
  }),
  wo = ae(),
  To = O({
    compatConfig: { MODE: 3 },
    name: 'DialogWrap',
    inheritAttrs: !1,
    props: J(wo, { visible: !1 }),
    setup(e, o) {
      let { attrs: n, slots: t } = o
      const l = X(e.visible)
      return (
        Le({}, { inTriggerContext: !1 }),
        q(
          () => e.visible,
          () => {
            e.visible && (l.value = !0)
          },
          { flush: 'post' }
        ),
        () => {
          const {
            visible: s,
            getContainer: g,
            forceRender: p,
            destroyOnClose: S = !1,
            afterClose: m
          } = e
          let u = i(i(i({}, e), n), { ref: '_component', key: 'dialog' })
          return g === !1
            ? a(pe, $($({}, u), {}, { getOpenCount: () => 2 }), t)
            : !p && S && !l.value
            ? null
            : a(
                so,
                { autoLock: !0, visible: s, forceRender: p, getContainer: g },
                {
                  default: d => (
                    (u = i(i(i({}, u), d), {
                      afterClose: () => {
                        m == null || m(), (l.value = !1)
                      }
                    })),
                    a(pe, u, t)
                  )
                }
              )
        }
      )
    }
  }),
  Bo = To
function Ce(e) {
  return {
    position: e,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  }
}
const Po = e => {
    const { componentCls: o } = e
    return [
      {
        [`${o}-root`]: {
          [`${o}${e.antCls}-zoom-enter, ${o}${e.antCls}-zoom-appear`]: {
            transform: 'none',
            opacity: 0,
            animationDuration: e.motionDurationSlow,
            userSelect: 'none'
          },
          [`${o}${e.antCls}-zoom-leave ${o}-content`]: {
            pointerEvents: 'none'
          },
          [`${o}-mask`]: i(i({}, Ce('fixed')), {
            zIndex: e.zIndexPopupBase,
            height: '100%',
            backgroundColor: e.colorBgMask,
            [`${o}-hidden`]: { display: 'none' }
          }),
          [`${o}-wrap`]: i(i({}, Ce('fixed')), {
            overflow: 'auto',
            outline: 0,
            WebkitOverflowScrolling: 'touch'
          })
        }
      },
      { [`${o}-root`]: vo(e) }
    ]
  },
  Fo = e => {
    const { componentCls: o } = e
    return [
      {
        [`${o}-root`]: {
          [`${o}-wrap`]: {
            zIndex: e.zIndexPopupBase,
            position: 'fixed',
            inset: 0,
            overflow: 'auto',
            outline: 0,
            WebkitOverflowScrolling: 'touch'
          },
          [`${o}-wrap-rtl`]: { direction: 'rtl' },
          [`${o}-centered`]: {
            textAlign: 'center',
            '&::before': {
              display: 'inline-block',
              width: 0,
              height: '100%',
              verticalAlign: 'middle',
              content: '""'
            },
            [o]: {
              top: 0,
              display: 'inline-block',
              paddingBottom: 0,
              textAlign: 'start',
              verticalAlign: 'middle'
            }
          },
          [`@media (max-width: ${e.screenSMMax})`]: {
            [o]: {
              maxWidth: 'calc(100vw - 16px)',
              margin: `${e.marginXS} auto`
            },
            [`${o}-centered`]: { [o]: { flex: 1 } }
          }
        }
      },
      {
        [o]: i(i({}, We(e)), {
          pointerEvents: 'none',
          position: 'relative',
          top: 100,
          width: 'auto',
          maxWidth: `calc(100vw - ${e.margin * 2}px)`,
          margin: '0 auto',
          paddingBottom: e.paddingLG,
          [`${o}-title`]: {
            margin: 0,
            color: e.modalHeadingColor,
            fontWeight: e.fontWeightStrong,
            fontSize: e.modalHeaderTitleFontSize,
            lineHeight: e.modalHeaderTitleLineHeight,
            wordWrap: 'break-word'
          },
          [`${o}-content`]: {
            position: 'relative',
            backgroundColor: e.modalContentBg,
            backgroundClip: 'padding-box',
            border: 0,
            borderRadius: e.borderRadiusLG,
            boxShadow: e.boxShadowSecondary,
            pointerEvents: 'auto',
            padding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
          },
          [`${o}-close`]: i(
            {
              position: 'absolute',
              top: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
              insetInlineEnd:
                (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
              zIndex: e.zIndexPopupBase + 10,
              padding: 0,
              color: e.modalCloseColor,
              fontWeight: e.fontWeightStrong,
              lineHeight: 1,
              textDecoration: 'none',
              background: 'transparent',
              borderRadius: e.borderRadiusSM,
              width: e.modalConfirmIconSize,
              height: e.modalConfirmIconSize,
              border: 0,
              outline: 0,
              cursor: 'pointer',
              transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
              '&-x': {
                display: 'block',
                fontSize: e.fontSizeLG,
                fontStyle: 'normal',
                lineHeight: `${e.modalCloseBtnSize}px`,
                textAlign: 'center',
                textTransform: 'none',
                textRendering: 'auto'
              },
              '&:hover': {
                color: e.modalIconHoverColor,
                backgroundColor: e.wireframe
                  ? 'transparent'
                  : e.colorFillContent,
                textDecoration: 'none'
              },
              '&:active': {
                backgroundColor: e.wireframe
                  ? 'transparent'
                  : e.colorFillContentHover
              }
            },
            Ee(e)
          ),
          [`${o}-header`]: {
            color: e.colorText,
            background: e.modalHeaderBg,
            borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
            marginBottom: e.marginXS
          },
          [`${o}-body`]: {
            fontSize: e.fontSize,
            lineHeight: e.lineHeight,
            wordWrap: 'break-word'
          },
          [`${o}-footer`]: {
            textAlign: 'end',
            background: e.modalFooterBg,
            marginTop: e.marginSM,
            [`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]: {
              marginBottom: 0,
              marginInlineStart: e.marginXS
            }
          },
          [`${o}-open`]: { overflow: 'hidden' }
        })
      },
      {
        [`${o}-pure-panel`]: {
          top: 'auto',
          padding: 0,
          display: 'flex',
          flexDirection: 'column',
          [`${o}-content,
          ${o}-body,
          ${o}-confirm-body-wrapper`]: {
            display: 'flex',
            flexDirection: 'column',
            flex: 'auto'
          },
          [`${o}-confirm-body`]: { marginBottom: 'auto' }
        }
      }
    ]
  },
  Io = e => {
    const { componentCls: o } = e,
      n = `${o}-confirm`
    return {
      [n]: {
        '&-rtl': { direction: 'rtl' },
        [`${e.antCls}-modal-header`]: { display: 'none' },
        [`${n}-body-wrapper`]: i({}, je()),
        [`${n}-body`]: {
          display: 'flex',
          flexWrap: 'wrap',
          alignItems: 'center',
          [`${n}-title`]: {
            flex: '0 0 100%',
            display: 'block',
            overflow: 'hidden',
            color: e.colorTextHeading,
            fontWeight: e.fontWeightStrong,
            fontSize: e.modalHeaderTitleFontSize,
            lineHeight: e.modalHeaderTitleLineHeight,
            [`+ ${n}-content`]: {
              marginBlockStart: e.marginXS,
              flexBasis: '100%',
              maxWidth: `calc(100% - ${e.modalConfirmIconSize + e.marginSM}px)`
            }
          },
          [`${n}-content`]: { color: e.colorText, fontSize: e.fontSize },
          [`> ${e.iconCls}`]: {
            flex: 'none',
            marginInlineEnd: e.marginSM,
            fontSize: e.modalConfirmIconSize,
            [`+ ${n}-title`]: { flex: 1 },
            [`+ ${n}-title + ${n}-content`]: {
              marginInlineStart: e.modalConfirmIconSize + e.marginSM
            }
          }
        },
        [`${n}-btns`]: {
          textAlign: 'end',
          marginTop: e.marginSM,
          [`${e.antCls}-btn + ${e.antCls}-btn`]: {
            marginBottom: 0,
            marginInlineStart: e.marginXS
          }
        }
      },
      [`${n}-error ${n}-body > ${e.iconCls}`]: { color: e.colorError },
      [`${n}-warning ${n}-body > ${e.iconCls},
        ${n}-confirm ${n}-body > ${e.iconCls}`]: { color: e.colorWarning },
      [`${n}-info ${n}-body > ${e.iconCls}`]: { color: e.colorInfo },
      [`${n}-success ${n}-body > ${e.iconCls}`]: { color: e.colorSuccess },
      [`${o}-zoom-leave ${o}-btns`]: { pointerEvents: 'none' }
    }
  },
  zo = e => {
    const { componentCls: o } = e
    return {
      [`${o}-root`]: {
        [`${o}-wrap-rtl`]: {
          direction: 'rtl',
          [`${o}-confirm-body`]: { direction: 'rtl' }
        }
      }
    }
  },
  Mo = e => {
    const { componentCls: o, antCls: n } = e,
      t = `${o}-confirm`
    return {
      [o]: {
        [`${o}-content`]: { padding: 0 },
        [`${o}-header`]: {
          padding: e.modalHeaderPadding,
          borderBottom: `${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,
          marginBottom: 0
        },
        [`${o}-body`]: { padding: e.modalBodyPadding },
        [`${o}-footer`]: {
          padding: `${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,
          borderTop: `${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,
          borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,
          marginTop: 0
        }
      },
      [t]: {
        [`${n}-modal-body`]: {
          padding: `${e.padding * 2}px ${e.padding * 2}px ${e.paddingLG}px`
        },
        [`${t}-body`]: {
          [`> ${e.iconCls}`]: {
            marginInlineEnd: e.margin,
            [`+ ${t}-title + ${t}-content`]: {
              marginInlineStart: e.modalConfirmIconSize + e.margin
            }
          }
        },
        [`${t}-btns`]: { marginTop: e.marginLG }
      }
    }
  },
  Ho = Re('Modal', e => {
    const o = e.padding,
      n = e.fontSizeHeading5,
      t = e.lineHeightHeading5,
      l = De(e, {
        modalBodyPadding: e.paddingLG,
        modalHeaderBg: e.colorBgElevated,
        modalHeaderPadding: `${o}px ${e.paddingLG}px`,
        modalHeaderBorderWidth: e.lineWidth,
        modalHeaderBorderStyle: e.lineType,
        modalHeaderTitleLineHeight: t,
        modalHeaderTitleFontSize: n,
        modalHeaderBorderColorSplit: e.colorSplit,
        modalHeaderCloseSize: t * n + o * 2,
        modalContentBg: e.colorBgElevated,
        modalHeadingColor: e.colorTextHeading,
        modalCloseColor: e.colorTextDescription,
        modalFooterBg: 'transparent',
        modalFooterBorderColorSplit: e.colorSplit,
        modalFooterBorderStyle: e.lineType,
        modalFooterPaddingVertical: e.paddingXS,
        modalFooterPaddingHorizontal: e.padding,
        modalFooterBorderWidth: e.lineWidth,
        modalConfirmTitleFontSize: e.fontSizeLG,
        modalIconHoverColor: e.colorIconHover,
        modalConfirmIconSize: e.fontSize * e.lineHeight,
        modalCloseBtnSize: e.controlHeightLG * 0.55
      })
    return [Fo(l), Io(l), zo(l), Po(l), e.wireframe && Mo(l), co(l, 'zoom')]
  })
var No =
  (globalThis && globalThis.__rest) ||
  function(e, o) {
    var n = {}
    for (var t in e)
      Object.prototype.hasOwnProperty.call(e, t) &&
        o.indexOf(t) < 0 &&
        (n[t] = e[t])
    if (e != null && typeof Object.getOwnPropertySymbols == 'function')
      for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
        o.indexOf(t[l]) < 0 &&
          Object.prototype.propertyIsEnumerable.call(e, t[l]) &&
          (n[t[l]] = e[t[l]])
    return n
  }
let te
const Oo = e => {
  ;(te = { x: e.pageX, y: e.pageY }), setTimeout(() => (te = null), 100)
}
uo() && fo(document.documentElement, 'click', Oo, !0)
const Ao = () => ({
    prefixCls: String,
    visible: { type: Boolean, default: void 0 },
    open: { type: Boolean, default: void 0 },
    confirmLoading: { type: Boolean, default: void 0 },
    title: h.any,
    closable: { type: Boolean, default: void 0 },
    closeIcon: h.any,
    onOk: Function,
    onCancel: Function,
    'onUpdate:visible': Function,
    'onUpdate:open': Function,
    onChange: Function,
    afterClose: Function,
    centered: { type: Boolean, default: void 0 },
    width: [String, Number],
    footer: h.any,
    okText: h.any,
    okType: String,
    cancelText: h.any,
    icon: h.any,
    maskClosable: { type: Boolean, default: void 0 },
    forceRender: { type: Boolean, default: void 0 },
    okButtonProps: K(),
    cancelButtonProps: K(),
    destroyOnClose: { type: Boolean, default: void 0 },
    wrapClassName: String,
    maskTransitionName: String,
    transitionName: String,
    getContainer: {
      type: [String, Function, Boolean, Object],
      default: void 0
    },
    zIndex: Number,
    bodyStyle: K(),
    maskStyle: K(),
    mask: { type: Boolean, default: void 0 },
    keyboard: { type: Boolean, default: void 0 },
    wrapProps: Object,
    focusTriggerAfterClose: { type: Boolean, default: void 0 },
    modalRender: Function,
    mousePosition: K()
  }),
  P = O({
    compatConfig: { MODE: 3 },
    name: 'AModal',
    inheritAttrs: !1,
    props: J(Ao(), { width: 520, confirmLoading: !1, okType: 'primary' }),
    setup(e, o) {
      let { emit: n, slots: t, attrs: l } = o
      const [s] = le('Modal'),
        {
          prefixCls: g,
          rootPrefixCls: p,
          direction: S,
          getPopupContainer: m
        } = _e('modal', e),
        [u, d] = Ho(g)
      Ve(e.visible === void 0)
      const c = y => {
          n('update:visible', !1),
            n('update:open', !1),
            n('cancel', y),
            n('change', !1)
        },
        r = y => {
          n('ok', y)
        },
        v = () => {
          var y, x
          const {
            okText: f = (y = t.okText) === null || y === void 0
              ? void 0
              : y.call(t),
            okType: b,
            cancelText: C = (x = t.cancelText) === null || x === void 0
              ? void 0
              : x.call(t),
            confirmLoading: w
          } = e
          return a(to, null, [
            a(de, $({ onClick: c }, e.cancelButtonProps), {
              default: () => [C || s.value.cancelText]
            }),
            a(
              de,
              $($({}, mo(b)), {}, { loading: w, onClick: r }, e.okButtonProps),
              { default: () => [f || s.value.okText] }
            )
          ])
        }
      return () => {
        var y, x
        const {
            prefixCls: f,
            visible: b,
            open: C,
            wrapClassName: w,
            centered: B,
            getContainer: F,
            closeIcon: I = (y = t.closeIcon) === null || y === void 0
              ? void 0
              : y.call(t),
            focusTriggerAfterClose: M = !0
          } = e,
          H = No(e, [
            'prefixCls',
            'visible',
            'open',
            'wrapClassName',
            'centered',
            'getContainer',
            'closeIcon',
            'focusTriggerAfterClose'
          ]),
          A = U(w, {
            [`${g.value}-centered`]: !!B,
            [`${g.value}-wrap-rtl`]: S.value === 'rtl'
          })
        return u(
          a(
            Bo,
            $(
              $($({}, H), l),
              {},
              {
                rootClassName: d.value,
                class: U(d.value, l.class),
                getContainer: F || (m == null ? void 0 : m.value),
                prefixCls: g.value,
                wrapClassName: A,
                visible: C ?? b,
                onClose: c,
                focusTriggerAfterClose: M,
                transitionName: Y(p.value, 'zoom', e.transitionName),
                maskTransitionName: Y(p.value, 'fade', e.maskTransitionName),
                mousePosition:
                  (x = H.mousePosition) !== null && x !== void 0 ? x : te
              }
            ),
            i(i({}, t), {
              footer: t.footer || v,
              closeIcon: () =>
                a('span', { class: `${g.value}-close-x` }, [
                  I || a(Ge, { class: `${g.value}-close-icon` }, null)
                ])
            })
          )
        )
      }
    }
  })
function _(e) {
  return typeof e == 'function' ? e() : e
}
const we = O({
    name: 'ConfirmDialog',
    inheritAttrs: !1,
    props: [
      'icon',
      'onCancel',
      'onOk',
      'close',
      'closable',
      'zIndex',
      'afterClose',
      'visible',
      'open',
      'keyboard',
      'centered',
      'getContainer',
      'maskStyle',
      'okButtonProps',
      'cancelButtonProps',
      'okType',
      'prefixCls',
      'okCancel',
      'width',
      'mask',
      'maskClosable',
      'okText',
      'cancelText',
      'autoFocusButton',
      'transitionName',
      'maskTransitionName',
      'type',
      'title',
      'content',
      'direction',
      'rootPrefixCls',
      'bodyStyle',
      'closeIcon',
      'modalRender',
      'focusTriggerAfterClose',
      'wrapClassName',
      'confirmPrefixCls',
      'footer'
    ],
    setup(e, o) {
      let { attrs: n } = o
      const [t] = le('Modal')
      return () => {
        const {
          icon: l,
          onCancel: s,
          onOk: g,
          close: p,
          okText: S,
          closable: m = !1,
          zIndex: u,
          afterClose: d,
          keyboard: c,
          centered: r,
          getContainer: v,
          maskStyle: y,
          okButtonProps: x,
          cancelButtonProps: f,
          okCancel: b,
          width: C = 416,
          mask: w = !0,
          maskClosable: B = !1,
          type: F,
          open: I,
          title: M,
          content: H,
          direction: A,
          closeIcon: D,
          modalRender: E,
          focusTriggerAfterClose: V,
          rootPrefixCls: N,
          bodyStyle: W,
          wrapClassName: j,
          footer: L
        } = e
        let z = l
        if (!l && l !== null)
          switch (F) {
            case 'info':
              z = a(ke, null, null)
              break
            case 'success':
              z = a(Ue, null, null)
              break
            case 'error':
              z = a(Xe, null, null)
              break
            default:
              z = a(Ke, null, null)
          }
        const ee = e.okType || 'primary',
          oe = e.prefixCls || 'ant-modal',
          G = `${oe}-confirm`,
          Me = n.style || {},
          ie = b ?? F === 'confirm',
          re = e.autoFocusButton === null ? !1 : e.autoFocusButton || 'ok',
          Q = `${oe}-confirm`,
          He = U(Q, `${Q}-${e.type}`, { [`${Q}-rtl`]: A === 'rtl' }, n.class),
          ne = t.value,
          Ne =
            ie &&
            a(
              ue,
              {
                actionFn: s,
                close: p,
                autofocus: re === 'cancel',
                buttonProps: f,
                prefixCls: `${N}-btn`
              },
              { default: () => [_(e.cancelText) || ne.cancelText] }
            )
        return a(
          P,
          {
            prefixCls: oe,
            class: He,
            wrapClassName: U({ [`${Q}-centered`]: !!r }, j),
            onCancel: Oe => (p == null ? void 0 : p({ triggerCancel: !0 }, Oe)),
            open: I,
            title: '',
            footer: '',
            transitionName: Y(N, 'zoom', e.transitionName),
            maskTransitionName: Y(N, 'fade', e.maskTransitionName),
            mask: w,
            maskClosable: B,
            maskStyle: y,
            style: Me,
            bodyStyle: W,
            width: C,
            zIndex: u,
            afterClose: d,
            keyboard: c,
            centered: r,
            getContainer: v,
            closable: m,
            closeIcon: D,
            modalRender: E,
            focusTriggerAfterClose: V
          },
          {
            default: () => [
              a('div', { class: `${G}-body-wrapper` }, [
                a('div', { class: `${G}-body` }, [
                  _(z),
                  M === void 0
                    ? null
                    : a('span', { class: `${G}-title` }, [_(M)]),
                  a('div', { class: `${G}-content` }, [_(H)])
                ]),
                L !== void 0
                  ? _(L)
                  : a('div', { class: `${G}-btns` }, [
                      Ne,
                      a(
                        ue,
                        {
                          type: ee,
                          actionFn: g,
                          close: p,
                          autofocus: re === 'ok',
                          buttonProps: x,
                          prefixCls: `${N}-btn`
                        },
                        {
                          default: () => [
                            _(S) || (ie ? ne.okText : ne.justOkText)
                          ]
                        }
                      )
                    ])
              ])
            ]
          }
        )
      }
    }
  }),
  Lo = [],
  R = Lo,
  Ro = e => {
    const o = document.createDocumentFragment()
    let n = i(i({}, he(e, ['parentContext', 'appContext'])), {
        close: s,
        open: !0
      }),
      t = null
    function l() {
      t && (se(null, o), (t = null))
      for (var m = arguments.length, u = new Array(m), d = 0; d < m; d++)
        u[d] = arguments[d]
      const c = u.some(r => r && r.triggerCancel)
      e.onCancel && c && e.onCancel(() => {}, ...u.slice(1))
      for (let r = 0; r < R.length; r++)
        if (R[r] === s) {
          R.splice(r, 1)
          break
        }
    }
    function s() {
      for (var m = arguments.length, u = new Array(m), d = 0; d < m; d++)
        u[d] = arguments[d]
      ;(n = i(i({}, n), {
        open: !1,
        afterClose: () => {
          typeof e.afterClose == 'function' && e.afterClose(), l.apply(this, u)
        }
      })),
        n.visible && delete n.visible,
        g(n)
    }
    function g(m) {
      typeof m == 'function' ? (n = m(n)) : (n = i(i({}, n), m)),
        t && go(t, n, o)
    }
    const p = m => {
      const u = Ze,
        d = u.prefixCls,
        c = m.prefixCls || `${d}-modal`,
        r = u.iconPrefixCls,
        v = Qe()
      return a(Ye, $($({}, u), {}, { prefixCls: d }), {
        default: () => [
          a(
            we,
            $(
              $({}, m),
              {},
              {
                rootPrefixCls: d,
                prefixCls: c,
                iconPrefixCls: r,
                locale: v,
                cancelText: m.cancelText || v.cancelText
              }
            ),
            null
          )
        ]
      })
    }
    function S(m) {
      const u = a(p, i({}, m))
      return (
        (u.appContext = e.parentContext || e.appContext || u.appContext),
        se(u, o),
        u
      )
    }
    return (t = S(n)), R.push(s), { destroy: s, update: g }
  },
  k = Ro
function Te(e) {
  return i(i({}, e), { type: 'warning' })
}
function Be(e) {
  return i(i({}, e), { type: 'info' })
}
function Pe(e) {
  return i(i({}, e), { type: 'success' })
}
function Fe(e) {
  return i(i({}, e), { type: 'error' })
}
function Ie(e) {
  return i(i({}, e), { type: 'confirm' })
}
const Do = () => ({
    config: Object,
    afterClose: Function,
    destroyAction: Function,
    open: Boolean
  }),
  Eo = O({
    name: 'HookModal',
    inheritAttrs: !1,
    props: J(Do(), { config: { width: 520, okType: 'primary' } }),
    setup(e, o) {
      let { expose: n } = o
      var t
      const l = Z(() => e.open),
        s = Z(() => e.config),
        { direction: g, getPrefixCls: p } = qe(),
        S = p('modal'),
        m = p(),
        u = () => {
          var v, y
          e == null || e.afterClose(),
            (y = (v = s.value).afterClose) === null || y === void 0 || y.call(v)
        },
        d = function() {
          e.destroyAction(...arguments)
        }
      n({ destroy: d })
      const c =
          (t = s.value.okCancel) !== null && t !== void 0
            ? t
            : s.value.type === 'confirm',
        [r] = le('Modal', Je.Modal)
      return () =>
        a(
          we,
          $(
            $({ prefixCls: S, rootPrefixCls: m }, s.value),
            {},
            {
              close: d,
              open: l.value,
              afterClose: u,
              okText:
                s.value.okText ||
                (c
                  ? r == null
                    ? void 0
                    : r.value.okText
                  : r == null
                  ? void 0
                  : r.value.justOkText),
              direction: s.value.direction || g.value,
              cancelText:
                s.value.cancelText || (r == null ? void 0 : r.value.cancelText)
            }
          ),
          null
        )
    }
  })
let ve = 0
const Wo = O({
  name: 'ElementsHolder',
  inheritAttrs: !1,
  setup(e, o) {
    let { expose: n } = o
    const t = T([])
    return (
      n({
        addModal: s => (
          t.value.push(s),
          (t.value = t.value.slice()),
          () => {
            t.value = t.value.filter(g => g !== s)
          }
        )
      }),
      () => t.value.map(s => s())
    )
  }
})
function jo() {
  const e = T(null),
    o = T([])
  q(
    o,
    () => {
      o.value.length &&
        ([...o.value].forEach(g => {
          g()
        }),
        (o.value = []))
    },
    { immediate: !0 }
  )
  const n = s =>
      function(p) {
        var S
        ve += 1
        const m = T(!0),
          u = T(null),
          d = T(lo(p)),
          c = T({})
        q(
          () => p,
          C => {
            x(i(i({}, ao(C) ? C.value : C), c.value))
          }
        )
        const r = function() {
          m.value = !1
          for (var C = arguments.length, w = new Array(C), B = 0; B < C; B++)
            w[B] = arguments[B]
          const F = w.some(I => I && I.triggerCancel)
          d.value.onCancel && F && d.value.onCancel(() => {}, ...w.slice(1))
        }
        let v
        const y = () =>
          a(
            Eo,
            {
              key: `modal-${ve}`,
              config: s(d.value),
              ref: u,
              open: m.value,
              destroyAction: r,
              afterClose: () => {
                v == null || v()
              }
            },
            null
          )
        ;(v = (S = e.value) === null || S === void 0 ? void 0 : S.addModal(y)),
          v && R.push(v)
        const x = C => {
          d.value = i(i({}, d.value), C)
        }
        return {
          destroy: () => {
            u.value ? r() : (o.value = [...o.value, r])
          },
          update: C => {
            ;(c.value = C),
              u.value ? x(C) : (o.value = [...o.value, () => x(C)])
          }
        }
      },
    t = Z(() => ({
      info: n(Be),
      success: n(Pe),
      error: n(Fe),
      warning: n(Te),
      confirm: n(Ie)
    })),
    l = Symbol('modalHolderKey')
  return [t.value, () => a(Wo, { key: l, ref: e }, null)]
}
function ze(e) {
  return k(Te(e))
}
P.useModal = jo
P.info = function(o) {
  return k(Be(o))
}
P.success = function(o) {
  return k(Pe(o))
}
P.error = function(o) {
  return k(Fe(o))
}
P.warning = ze
P.warn = ze
P.confirm = function(o) {
  return k(Ie(o))
}
P.destroyAll = function() {
  for (; R.length; ) {
    const o = R.pop()
    o && o()
  }
}
P.install = function(e) {
  return e.component(P.name, P), e
}
export { Bo as D, P as M, ae as d, Po as g, vo as i }
