import { defineComponent as w, computed as N, resolveComponent as x, openBlock as I, createElementBlock as A, normalizeClass as Z, createVNode as f, withCtx as S, renderSlot as Q, Fragment as ie, renderList as fe, createBlock as k, normalizeProps as be, mergeProps as X, createSlots as Ee, ref as j, reactive as ye, unref as c, toRefs as $e, createElementVNode as z, createTextVNode as J, toDisplayString as B, createCommentVNode as q, watch as he, watchEffect as ve, isVNode as Qt, getCurrentInstance as Qe, inject as Ft, onUnmounted as Mt, h as He, provide as ft, onMounted as Fe, nextTick as U, onBeforeUnmount as Bt, normalizeStyle as pe, resolveDynamicComponent as Ut, readonly as Rt, resolveDirective as Ht, withDirectives as Wt, useSlots as Zt, toRef as Gt, guardReactiveProps as We, render as pt } from "vue";
import { Image as Ze, Modal as K, Tooltip as _e, Button as yt, Avatar as Xt, notification as mt, message as Vt } from "ant-design-vue";
import { mergeWith as Jt, intersectionWith as qt, isEqual as Ge, unionWith as Kt, omit as xe } from "lodash-es";
import "dayjs";
import { FileUnknownOutlined as en, FullscreenExitOutlined as tn, FullscreenOutlined as nn, CloseOutlined as Lt, InfoCircleOutlined as on, MailOutlined as ln, LeftOutlined as rn, RightOutlined as an, InfoCircleFilled as Xe, CheckCircleFilled as sn, CloseCircleFilled as cn } from "@ant-design/icons-vue";
import Oe from "msgreader";
import { tryOnUnmounted as It, useDebounceFn as un, tryOnMounted as dn, useMutationObserver as gn } from "@vueuse/core";
import Mn from "resize-observer-polyfill";
import fn from "@purge-icons/generated";
const Ve = "g";
function Ie(e, t, i) {
  let o = e;
  return t && (o += `__${t}`), i && (o += `--${i}`), o;
}
function ce(e, t = !1) {
  const i = t ? `.${Ve}-${e}` : `${Ve}-${e}`;
  return {
    b: () => Ie(i),
    e: (a) => a ? Ie(i, a) : "",
    m: (a) => a ? Ie(i, "", a) : "",
    em: (a, s) => a && s ? Ie(i, a, s) : ""
  };
}
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function Je(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function pn(e) {
  var t, i;
  return Je(e) === !1 ? !1 : (t = e.constructor, t === void 0 ? !0 : (i = t.prototype, !(Je(i) === !1 || i.hasOwnProperty("isPrototypeOf") === !1)));
}
function de() {
  return de = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var i = arguments[t];
      for (var o in i)
        Object.prototype.hasOwnProperty.call(i, o) && (e[o] = i[o]);
    }
    return e;
  }, de.apply(this, arguments);
}
function Nt(e, t) {
  if (e == null)
    return {};
  var i, o, n = {}, l = Object.keys(e);
  for (o = 0; o < l.length; o++)
    t.indexOf(i = l[o]) >= 0 || (n[i] = e[i]);
  return n;
}
const ke = { silent: !1, logLevel: "warn" }, yn = ["validator"], jt = Object.prototype, Tt = jt.toString, mn = jt.hasOwnProperty, ht = /^\s*function (\w+)/;
function qe(e) {
  var t;
  const i = (t = e == null ? void 0 : e.type) !== null && t !== void 0 ? t : e;
  if (i) {
    const o = i.toString().match(ht);
    return o ? o[1] : "";
  }
  return "";
}
const ee = pn, vt = (e) => e;
let O = vt;
process.env.NODE_ENV !== "production" && (O = typeof console < "u" ? function(t, i = ke.logLevel) {
  ke.silent === !1 && console[i](`[VueTypes warn]: ${t}`);
} : vt);
const le = (e, t) => mn.call(e, t), Ln = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, re = Array.isArray || function(e) {
  return Tt.call(e) === "[object Array]";
}, ae = (e) => Tt.call(e) === "[object Function]", Te = (e) => ee(e) && le(e, "_vueTypes_name"), Dt = (e) => ee(e) && (le(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t) => le(e, t)));
function Be(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function te(e, t, i = !1) {
  let o, n = !0, l = "";
  o = ee(e) ? e : { type: e };
  const r = Te(o) ? o._vueTypes_name + " - " : "";
  if (Dt(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0)
      return n;
    re(o.type) ? (n = o.type.some((a) => te(a, t, !0) === !0), l = o.type.map((a) => qe(a)).join(" or ")) : (l = qe(o), n = l === "Array" ? re(t) : l === "Object" ? ee(t) : l === "String" || l === "Number" || l === "Boolean" || l === "Function" ? function(a) {
      if (a == null)
        return "";
      const s = a.constructor.toString().match(ht);
      return s ? s[1] : "";
    }(t) === l : t instanceof o.type);
  }
  if (!n) {
    const a = `${r}value "${t}" should be of type "${l}"`;
    return i === !1 ? (O(a), !1) : a;
  }
  if (le(o, "validator") && ae(o.validator)) {
    const a = O, s = [];
    if (O = (u) => {
      s.push(u);
    }, n = o.validator(t), O = a, !n) {
      const u = (s.length > 1 ? "* " : "") + s.join(`
* `);
      return s.length = 0, i === !1 ? (O(u), n) : u;
    }
  }
  return n;
}
function _(e, t) {
  const i = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get() {
    return this.required = !0, this;
  } }, def: { value(n) {
    return n === void 0 ? (le(this, "default") && delete this.default, this) : ae(n) || te(this, n, !0) === !0 ? (this.default = re(n) ? () => [...n] : ee(n) ? () => Object.assign({}, n) : n, this) : (O(`${this._vueTypes_name} - invalid default value: "${n}"`), this);
  } } }), { validator: o } = i;
  return ae(o) && (i.validator = Be(o, i)), i;
}
function R(e, t) {
  const i = _(e, t);
  return Object.defineProperty(i, "validate", { value(o) {
    return ae(this.validator) && O(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`), this.validator = Be(o, this), this;
  } });
}
function Ke(e, t, i) {
  const o = function(s) {
    const u = {};
    return Object.getOwnPropertyNames(s).forEach((M) => {
      u[M] = Object.getOwnPropertyDescriptor(s, M);
    }), Object.defineProperties({}, u);
  }(t);
  if (o._vueTypes_name = e, !ee(i))
    return o;
  const { validator: n } = i, l = Nt(i, yn);
  if (ae(n)) {
    let { validator: s } = o;
    s && (s = (a = (r = s).__original) !== null && a !== void 0 ? a : r), o.validator = Be(s ? function(u) {
      return s.call(this, u) && n.call(this, u);
    } : n, o);
  }
  var r, a;
  return Object.assign(o, l);
}
function De(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
const In = () => R("any", {}), Nn = () => R("function", { type: Function }), jn = () => R("boolean", { type: Boolean }), Tn = () => R("string", { type: String }), hn = () => R("number", { type: Number }), vn = () => R("array", { type: Array }), Dn = () => R("object", { type: Object }), Sn = () => _("integer", { type: Number, validator: (e) => Ln(e) }), zn = () => _("symbol", { validator: (e) => typeof e == "symbol" });
function Cn(e, t = "custom validation failed") {
  if (typeof e != "function")
    throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return _(e.name || "<<anonymous function>>", { type: null, validator(i) {
    const o = e(i);
    return o || O(`${this._vueTypes_name} - ${t}`), o;
  } });
}
function An(e) {
  if (!re(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  const t = `oneOf - value should be one of "${e.join('", "')}".`, i = e.reduce((o, n) => {
    if (n != null) {
      const l = n.constructor;
      o.indexOf(l) === -1 && o.push(l);
    }
    return o;
  }, []);
  return _("oneOf", { type: i.length > 0 ? i : void 0, validator(o) {
    const n = e.indexOf(o) !== -1;
    return n || O(t), n;
  } });
}
function xn(e) {
  if (!re(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument");
  let t = !1, i = [];
  for (let n = 0; n < e.length; n += 1) {
    const l = e[n];
    if (Dt(l)) {
      if (Te(l) && l._vueTypes_name === "oneOf" && l.type) {
        i = i.concat(l.type);
        continue;
      }
      if (ae(l.validator) && (t = !0), l.type === !0 || !l.type) {
        O('oneOfType - invalid usage of "true" or "null" as types.');
        continue;
      }
      i = i.concat(l.type);
    } else
      i.push(l);
  }
  i = i.filter((n, l) => i.indexOf(n) === l);
  const o = i.length > 0 ? i : null;
  return _("oneOfType", t ? { type: o, validator(n) {
    const l = [], r = e.some((a) => {
      const s = te(Te(a) && a._vueTypes_name === "oneOf" ? a.type || null : a, n, !0);
      return typeof s == "string" && l.push(s), s === !0;
    });
    return r || O(`oneOfType - provided value does not match any of the ${l.length} passed-in validators:
${De(l.join(`
`))}`), r;
  } } : { type: o });
}
function On(e) {
  return _("arrayOf", { type: Array, validator(t) {
    let i = "";
    const o = t.every((n) => (i = te(e, n, !0), i === !0));
    return o || O(`arrayOf - value validation error:
${De(i)}`), o;
  } });
}
function wn(e) {
  return _("instanceOf", { type: e });
}
function bn(e) {
  return _("objectOf", { type: Object, validator(t) {
    let i = "";
    const o = Object.keys(t).every((n) => (i = te(e, t[n], !0), i === !0));
    return o || O(`objectOf - value validation error:
${De(i)}`), o;
  } });
}
function En(e) {
  const t = Object.keys(e), i = t.filter((n) => {
    var l;
    return !((l = e[n]) === null || l === void 0 || !l.required);
  }), o = _("shape", { type: Object, validator(n) {
    if (!ee(n))
      return !1;
    const l = Object.keys(n);
    if (i.length > 0 && i.some((r) => l.indexOf(r) === -1)) {
      const r = i.filter((a) => l.indexOf(a) === -1);
      return O(r.length === 1 ? `shape - required property "${r[0]}" is not defined.` : `shape - required properties "${r.join('", "')}" are not defined.`), !1;
    }
    return l.every((r) => {
      if (t.indexOf(r) === -1)
        return this._vueTypes_isLoose === !0 || (O(`shape - shape definition does not include a "${r}" property. Allowed keys: "${t.join('", "')}".`), !1);
      const a = te(e[r], n[r], !0);
      return typeof a == "string" && O(`shape - "${r}" property validation error:
 ${De(a)}`), a === !0;
    });
  } });
  return Object.defineProperty(o, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(o, "loose", { get() {
    return this._vueTypes_isLoose = !0, this;
  } }), o;
}
const _n = ["name", "validate", "getter"], kn = /* @__PURE__ */ (() => {
  var e;
  return (e = class {
    static get any() {
      return In();
    }
    static get func() {
      return Nn().def(this.defaults.func);
    }
    static get bool() {
      return jn().def(this.defaults.bool);
    }
    static get string() {
      return Tn().def(this.defaults.string);
    }
    static get number() {
      return hn().def(this.defaults.number);
    }
    static get array() {
      return vn().def(this.defaults.array);
    }
    static get object() {
      return Dn().def(this.defaults.object);
    }
    static get integer() {
      return Sn().def(this.defaults.integer);
    }
    static get symbol() {
      return zn();
    }
    static get nullable() {
      return { type: null };
    }
    static extend(t) {
      if (re(t))
        return t.forEach((s) => this.extend(s)), this;
      const { name: i, validate: o = !1, getter: n = !1 } = t, l = Nt(t, _n);
      if (le(this, i))
        throw new TypeError(`[VueTypes error]: Type "${i}" already defined`);
      const { type: r } = l;
      if (Te(r))
        return delete l.type, Object.defineProperty(this, i, n ? { get: () => Ke(i, r, l) } : { value(...s) {
          const u = Ke(i, r, l);
          return u.validator && (u.validator = u.validator.bind(u, ...s)), u;
        } });
      let a;
      return a = n ? { get() {
        const s = Object.assign({}, l);
        return o ? R(i, s) : _(i, s);
      }, enumerable: !0 } : { value(...s) {
        const u = Object.assign({}, l);
        let M;
        return M = o ? R(i, u) : _(i, u), u.validator && (M.validator = u.validator.bind(M, ...s)), M;
      }, enumerable: !0 }, Object.defineProperty(this, i, a);
    }
  }).defaults = {}, e.sensibleDefaults = void 0, e.config = ke, e.custom = Cn, e.oneOf = An, e.instanceOf = wn, e.oneOfType = xn, e.arrayOf = On, e.objectOf = bn, e.shape = En, e.utils = { validate: (t, i) => te(i, t, !0) === !0, toType: (t, i, o = !1) => o ? R(t, i) : _(t, i) }, e;
})();
function St(e = { func: () => {
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
  var t;
  return (t = class extends kn {
    static get sensibleDefaults() {
      return de({}, this.defaults);
    }
    static set sensibleDefaults(i) {
      this.defaults = i !== !1 ? de({}, i !== !0 ? i : e) : {};
    }
  }).defaults = de({}, e), t;
}
class Xi extends St() {
}
const zt = St({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  object: void 0,
  integer: void 0
});
zt.extend([
  {
    name: "style",
    getter: !0,
    type: [String, Object],
    default: void 0
  },
  {
    name: "VNodeChild",
    getter: !0,
    type: void 0
  }
]);
const Se = "G", Yn = Object.prototype.toString;
function Ct(e, t) {
  return Yn.call(e) === `[object ${t}]`;
}
function se(e) {
  return Ct(e, "String");
}
function Ye(e) {
  return e && Array.isArray(e);
}
function et(e) {
  return e !== null && Ct(e, "Object");
}
function ze(e) {
  return typeof e == "function";
}
function Pn(e) {
  return typeof e < "u";
}
function $n(e) {
  return !Pn(e);
}
const Qn = typeof window > "u", At = !Qn;
function xt(e, t, i = "replace") {
  return t ? e ? Jt({}, e, t, (o, n) => {
    if (Ye(n) && Ye(o))
      switch (i) {
        case "union":
          return Kt(o, n, Ge);
        case "intersection":
          return qt(o, n, Ge);
        case "concat":
          return o.concat(n);
        case "replace":
          return n;
        default:
          throw new Error(
            `Unknown merge array strategy: ${i}`
          );
      }
    if (et(n) && et(o))
      return xt(o, n, i);
  }) : t : e;
}
function Ot(e, t = "default", i, o) {
  if (!e || !Reflect.has(e, t))
    return null;
  if (!ze(e[t]))
    return console.error(`${t} is not a function!`), null;
  const n = e[t];
  if (!n)
    return null;
  const l = {
    ...i,
    ...o
  };
  return n(l);
}
function Fn(e, t = []) {
  const i = Object.keys(e), o = {};
  return i.map((n) => {
    if (t.includes(n))
      return null;
    o[n] = (l) => Ot(e, n, l);
  }), o;
}
function tt(e, t, i) {
  e && t && i && e.addEventListener(t, i, !1);
}
function nt(e, t, i) {
  e && t && i && e.removeEventListener(t, i, !1);
}
for (let e = 0; e <= 15; e++)
  e.toString(16);
const Pe = "-internal", ot = (e) => (e == null ? void 0 : e.startsWith("http")) && (e == null ? void 0 : e.includes(Pe)), Bn = (e) => {
  if (se(e))
    return ot(e) && (e = e == null ? void 0 : e.replace(Pe, "")), e;
  let t = e == null ? void 0 : e.fileUrl;
  return se(t) && ot(t) && (t = t == null ? void 0 : t.replace(Pe, "")), t;
}, Un = w({
  name: "ImagePreview",
  components: {
    Image: Ze,
    PreviewGroup: Ze.PreviewGroup
  },
  props: {
    functional: zt.bool,
    imageList: {
      type: Array
    }
  },
  setup(e) {
    const t = ce("image-preview"), i = N(() => {
      const { imageList: o } = e;
      return o ? o.map((n) => se(n) ? {
        src: n,
        placeholder: !1
      } : n) : [];
    });
    return {
      prefixCls: t,
      getImageList: i
    };
  }
});
const F = (e, t) => {
  const i = e.__vccOpts || e;
  for (const [o, n] of t)
    i[o] = n;
  return i;
};
function Rn(e, t, i, o, n, l) {
  const r = x("Image"), a = x("PreviewGroup");
  return I(), A("div", {
    class: Z(e.prefixCls)
  }, [
    f(a, null, {
      default: S(() => [
        !e.imageList || e.$slots.default ? Q(e.$slots, "default", { key: 0 }) : (I(!0), A(ie, { key: 1 }, fe(e.getImageList, (s) => (I(), k(r, be(X({
          key: s.src
        }, s)), Ee({ _: 2 }, [
          s.placeholder ? {
            name: "placeholder",
            fn: S(() => [
              f(r, X(s, {
                src: s.placeholder,
                preview: !1
              }), null, 16, ["src"])
            ]),
            key: "0"
          } : void 0
        ]), 1040))), 128))
      ]),
      _: 3
    })
  ], 2);
}
const ge = /* @__PURE__ */ F(Un, [["render", Rn]]), Hn = {
  pagination: {
    totalItemText: "Total",
    goToText: "Go to"
  },
  accordion: {
    loading: "loading",
    noData: "No Data"
  },
  autoCompleteDropdown: {
    latestInput: "Latest input"
  },
  cascaderList: {
    noData: "No data"
  },
  colorPicker: {
    foundationPanel: "Foundation panel",
    advancedPanel: "Advanced panel"
  },
  datePickerPro: {
    ok: "OK",
    placeholder: "select date",
    month1: "Jan",
    month2: "Feb",
    month3: "Mar",
    month4: "Apr",
    month5: "May",
    month6: "June",
    month7: "July",
    month8: "Aug",
    month9: "Sep",
    month10: "Oct",
    month11: "Nov",
    month12: "Dec",
    year: "年",
    startPlaceholder: "select start date",
    endPlaceholder: "select end date",
    getWeekDays() {
      return ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
    },
    getTimeArr() {
      return ["Hr", "Min", "Sec"];
    },
    getYearMonthStr(e, t) {
      return `${e} - ${t}`;
    }
  },
  editableSelect: {
    noRelatedRecords: "No related records found",
    noData: "No data"
  },
  input: {
    placeholder: "Please enter"
  },
  splitterBar: {
    collapse: "Collapse",
    expand: "Expand"
  },
  stepsGuide: {
    previous: "Previous",
    continue: "Continue",
    ok: "OK"
  },
  table: {
    selectAll: "Select all",
    ok: "OK"
  },
  timePopup: {
    ok: "OK"
  },
  transfer: {
    unit: "",
    panelUnit: "",
    headerUnit: "",
    noData: "No Data",
    placeholder: "Please enter keywords"
  },
  tree: {
    loading: "Loading",
    newNode: "New node",
    selectPlaceholder: "Please select"
  },
  upload: {
    save: "Save",
    upload: "Upload",
    imgUpload: "ImageUpload",
    uploaded: "Uploaded",
    operating: "Operating",
    del: "Delete",
    download: "download",
    saveWarn: "Please wait for the file to upload and save!",
    saveError: "There is no file successfully uploaded and cannot be saved!",
    preview: "Preview",
    choose: "Select the file",
    accept: "Support {0} format",
    acceptUpload: "Only upload files in {0} format",
    maxSize: "A single file does not exceed {0}MB ",
    maxSizeMultiple: "Only upload files up to {0}MB!",
    maxNumber: "Only upload up to {0} files",
    legend: "Legend",
    fileName: "File name",
    fileSize: "File size",
    fileStatue: "File status",
    startUpload: "Start upload",
    uploadSuccess: "Upload successfully",
    uploadError: "Upload failed",
    uploading: "Uploading",
    uploadWait: "Please wait for the file upload to finish",
    reUploadFailed: "Re-upload failed files",
    noFile: "The file does not exist!"
  },
  search: {
    placeholder: "Enter a keyword"
  },
  select: {
    placeholder: "Please select",
    noDataText: "No data",
    noMatchText: "No related records found",
    loadingText: "Loading..."
  },
  tagInput: {
    maxTagsText: "Maximum number reached: "
  },
  timeSelect: {
    placeholder: "Please select time"
  },
  modal: {
    cancelText: "Close",
    okText: "Confirm",
    close: "Close",
    maximize: "Maximize",
    restore: "Restore"
  },
  excel: {
    exportModalTitle: "Export data",
    fileType: "File type",
    fileName: "File name"
  },
  form: {
    putAway: "Put away",
    unfold: "Unfold",
    maxTip: "The number of characters should be less than {0}",
    apiSelectNotFound: "Wait for data loading to complete..."
  },
  previewFile: {
    notSupport: "The file does not support preview",
    download: "download"
  },
  signature: {
    deleteSelectedSignature: "Delete selected signature",
    deleteAllSignature: "Delete all signatures",
    page: "page",
    jumpTo: "jump to",
    dragTip: "Please select the following signature and drag it to the left file",
    selectTip: "Please select the signature",
    smallTip: "The signature can't be any smaller",
    deleteTip: "Please select the signature you want to delete",
    addSignature: "Add Signature"
  },
  common: {
    preview: "Preview",
    download: "Download",
    okText: "OK",
    closeText: "Close",
    cancelText: "Cancel",
    loadingText: "Loading...",
    saveText: "Save",
    submitText: "Submit",
    delText: "Delete",
    resetText: "Reset",
    searchText: "Search",
    queryText: "Search",
    inputText: "Please enter",
    chooseText: "Please choose",
    redo: "Refresh",
    back: "Back",
    light: "Light",
    dark: "Dark",
    zoomIn: "Zoom In",
    zoomOut: "Zoom Out",
    reset: "reset",
    enterFullScreen: "Full Screen",
    exitFullScreen: "Exit Full Screen"
  }
}, Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Hn
}, Symbol.toStringTag, { value: "Module" })), Zn = {
  pagination: {
    totalItemText: "所有条目",
    goToText: "跳至",
    perPage: "条/页"
  },
  accordion: {
    loading: "加载中",
    noData: "没有数据"
  },
  autoCompleteDropdown: {
    latestInput: "最近输入"
  },
  cascaderList: {
    noData: "没有数据"
  },
  colorPicker: {
    foundationPanel: "基础面板",
    advancedPanel: "高级面板"
  },
  datePickerPro: {
    ok: "确定",
    placeholder: "请选择日期",
    month1: "1月",
    month2: "2月",
    month3: "3月",
    month4: "4月",
    month5: "5月",
    month6: "6月",
    month7: "7月",
    month8: "8月",
    month9: "9月",
    month10: "10月",
    month11: "11月",
    month12: "12月",
    year: "年",
    startPlaceholder: "请选择开始日期",
    endPlaceholder: "请选择结束日期",
    getWeekDays() {
      return ["日", "一", "二", "三", "四", "五", "六"];
    },
    getTimeArr() {
      return ["时", "分", "秒"];
    },
    getYearMonthStr(e, t) {
      return `${e}年${t}月`;
    }
  },
  editableSelect: {
    noRelatedRecords: "找不到相关记录",
    noData: "没有数据"
  },
  input: {
    placeholder: "请输入"
  },
  splitterBar: {
    collapse: "收起",
    expand: "展开"
  },
  stepsGuide: {
    previous: "上一步",
    continue: "我知道啦，继续",
    ok: "我知道啦"
  },
  table: {
    selectAll: "全选",
    ok: "确定"
  },
  timePopup: {
    ok: "确定"
  },
  transfer: {
    unit: "项",
    panelUnit: "项",
    headerUnit: "项",
    noData: "暂无数据",
    placeholder: "请输入关键词搜索"
  },
  tree: {
    loading: "加载中",
    newNode: "新节点",
    selectPlaceholder: "请选择"
  },
  upload: {
    save: "保存",
    upload: "上传",
    imgUpload: "图片上传",
    uploaded: "已上传",
    operating: "操作",
    del: "删除",
    download: "下载",
    saveWarn: "请等待文件上传后，保存!",
    saveError: "没有上传成功的文件，无法保存!",
    preview: "预览",
    choose: "选择文件",
    accept: "支持{0}格式",
    acceptUpload: "只能上传{0}格式文件",
    maxSize: "单个文件不超过{0}MB",
    maxSizeMultiple: "只能上传不超过{0}MB的文件!",
    maxNumber: "最多只能上传{0}个文件",
    legend: "略缩图",
    fileName: "文件名",
    fileSize: "文件大小",
    fileStatue: "状态",
    startUpload: "开始上传",
    uploadSuccess: "上传成功",
    uploadError: "上传失败",
    uploading: "上传中",
    uploadWait: "请等待文件上传结束后操作",
    reUploadFailed: "重新上传失败文件",
    import: "导入",
    startImport: "开始导入",
    importing: "导入中",
    reImportFailed: "重新导入失败文件",
    noFile: "文件不存在！"
  },
  search: {
    placeholder: "请输入关键字"
  },
  select: {
    placeholder: "请选择",
    noDataText: "无数据",
    noMatchText: "找不到相关记录",
    loadingText: "加载中..."
  },
  tagInput: {
    maxTagsText: "已达到最大个数："
  },
  timeSelect: {
    placeholder: "请选择时间"
  },
  modal: {
    cancelText: "关闭",
    okText: "确认",
    close: "关闭",
    maximize: "最大化",
    restore: "还原"
  },
  excel: {
    exportModalTitle: "导出数据",
    fileType: "文件类型",
    fileName: "文件名"
  },
  form: {
    putAway: "收起",
    unfold: "展开",
    maxTip: "字符数应小于{0}位",
    apiSelectNotFound: "请等待数据加载完成..."
  },
  previewFile: {
    notSupport: "该文件不支持预览",
    download: "下载"
  },
  signature: {
    deleteSelectedSignature: "删除选中签名",
    deleteAllSignature: "删除全部签名",
    page: "页",
    jumpTo: "跳至",
    dragTip: "请选择以下签名并将其拖到左侧文件",
    selectTip: "请选择签名",
    smallTip: "已经最小了",
    deleteTip: "请选中你要删除的签名",
    addSignature: "新建电子签章"
  },
  common: {
    preview: "预览",
    download: "下载",
    okText: "确认",
    closeText: "关闭",
    cancelText: "取消",
    loadingText: "加载中...",
    saveText: "保存",
    submitText: "提交",
    delText: "删除",
    resetText: "重置",
    searchText: "搜索",
    queryText: "查询",
    inputText: "请输入",
    chooseText: "请选择",
    redo: "刷新",
    back: "返回",
    light: "亮色主题",
    dark: "黑暗主题",
    zoomIn: "放大",
    zoomOut: "缩小",
    reset: "还原",
    enterFullScreen: "全屏",
    exitFullScreen: "退出全屏"
  }
}, Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Zn
}, Symbol.toStringTag, { value: "Module" })), it = /* @__PURE__ */ Object.assign({ "./lang/en.ts": Wn, "./lang/zh_cn.ts": Gn }), wt = {};
Object.keys(it).forEach((e) => {
  const t = it[e].default || {};
  wt[e] = t;
});
const lt = j("zh_cn"), bt = () => {
  const e = ye({
    langMessages: wt
  }), t = () => lt.value.toLocaleLowerCase();
  return {
    getLang: t,
    setLang: (n) => {
      lt.value = n;
    },
    getMessages: () => {
      const n = `./lang/${t()}.ts`;
      return e.langMessages[n];
    }
  };
};
var dt, gt;
const Xn = ((gt = (dt = import.meta) == null ? void 0 : dt.env) == null ? void 0 : gt.VITE_PUBLIC_PATH) || "/", Vn = Xn + "preview.html", Et = [
  "csv",
  "djvu",
  "doc",
  "docm",
  "docx",
  "docxf",
  "dot",
  "dotm",
  "dotx",
  "epub",
  "fb2",
  "fodp",
  "fods",
  "fodt",
  "htm",
  "html",
  "mht",
  "odp",
  "ods",
  "odt",
  "oform",
  "otp",
  "ots",
  "ott",
  "oxps",
  "pdf",
  "pot",
  "potm",
  "potx",
  "pps",
  "ppsm",
  "ppsx",
  "ppt",
  "pptm",
  "pptx",
  "rtf",
  "txt",
  "xls",
  "xlsb",
  "xlsm",
  "xlsx",
  "xlt",
  "xltm",
  "xltx",
  "xml",
  "xps"
], _t = ["jpg", "jpeg", "png", "gif", "bmp", "webp"], Jn = ["msg"], qn = [...Et, ..._t, ...Jn];
function kt(e) {
  const { url: t, fileName: i, ...o } = e, n = N(() => {
    const g = c(i);
    if (g)
      return g;
    if (!c(t))
      return "";
    const h = c(t).split("/"), D = h.length, p = h[D - 1].split("?");
    return decodeURIComponent(p[0]);
  }), l = N(() => {
    const g = c(n);
    if (!g)
      return "";
    const L = g.split(".").pop();
    return (L == null ? void 0 : L.toLowerCase()) || "";
  }), r = N(() => {
    const g = c(l);
    return g ? qn.includes(g) : !1;
  }), a = N(() => {
    const g = c(l);
    return g ? Et.includes(g) : !1;
  }), s = N(() => {
    const g = c(l);
    return g ? _t.includes(g) : !1;
  }), u = N(() => c(l) === "pdf"), M = N(() => {
    const g = c(l);
    return g ? g === "msg" : !1;
  }), m = N(() => {
    const g = Bn(c(t)), L = c(u), h = c(a), { getLang: D } = bt(), p = D() === "en" ? "en" : "zh_CN", v = c(e == null ? void 0 : e.mode) || "view";
    if (L && v === "view")
      return g;
    if (h) {
      let T = `${Vn}?url=${encodeURIComponent(
        g
      )}&fileName=${encodeURIComponent(c(n))}&fileType=${c(
        l
      )}&lang=${p}`;
      for (const b in o)
        if (Object.prototype.hasOwnProperty.call(o, b)) {
          const Y = c(o[b]);
          T += `&${b}=${encodeURIComponent(Y)}`;
        }
      return T;
    }
    return g;
  });
  return {
    getFileName: n,
    getFileExt: l,
    getIsSupportPreview: r,
    getIsOfficeFile: a,
    getIsImageFile: s,
    getIsPdfFile: u,
    getPreviewSrc: m,
    getIsMsgFile: M
  };
}
function Kn(e, t) {
  const i = t.split(".");
  let o = e;
  return i.forEach((n) => {
    o = o[n] ?? "";
  }), o;
}
function me() {
  return (e) => {
    const t = bt().getMessages();
    return Kn(t, e);
  };
}
const eo = ["src"], to = ["src"], no = {
  key: 2,
  class: "empty"
}, oo = { class: "description" }, io = ["href"], lo = /* @__PURE__ */ w({
  __name: "DocViewer",
  props: {
    url: {
      type: String,
      required: !0
    },
    fileName: {
      type: String
    }
  },
  setup(e) {
    const t = e, i = me(), { url: o, fileName: n } = $e(t), { getPreviewSrc: l, getIsImageFile: r, getIsSupportPreview: a } = kt({
      url: o,
      fileName: n
    });
    return (s, u) => c(r) ? (I(), A("img", {
      key: 0,
      src: c(l)
    }, null, 8, eo)) : c(a) ? (I(), A("iframe", {
      key: 1,
      src: c(l),
      width: "100%",
      height: "100%"
    }, null, 8, to)) : c(o) ? (I(), A("div", no, [
      f(c(en), { class: "icon" }),
      z("div", oo, [
        J(B(c(i)("previewFile.notSupport")) + ", ", 1),
        z("a", {
          href: c(o),
          target: "_blank"
        }, B(c(i)("previewFile.download")), 9, io)
      ])
    ])) : q("", !0);
  }
});
const Me = /* @__PURE__ */ F(lo, [["__scopeId", "data-v-b5917ee6"]]), rt = me(), ro = {
  visible: { type: Boolean },
  scrollTop: { type: Boolean, default: !0 },
  height: { type: Number },
  minHeight: { type: Number },
  // open drag
  draggable: { type: Boolean, default: !0 },
  centered: { type: Boolean },
  cancelText: { type: String, default: rt("modal.cancelText") },
  okText: { type: String, default: rt("modal.okText") },
  closeFunc: Function
}, Ue = Object.assign({}, ro, {
  defaultFullscreen: { type: Boolean },
  // Can it be full screen
  canFullscreen: { type: Boolean, default: !0 },
  // After enabling the wrapper, the bottom can be increased in height
  wrapperFooterOffset: { type: Number, default: 0 },
  // Warm reminder message
  helpMessage: [String, Array],
  // Whether to setting wrapper
  useWrapper: { type: Boolean, default: !0 },
  loading: { type: Boolean },
  loadingTip: { type: String },
  /**
   * @description: Show close button
   */
  showCancelBtn: { type: Boolean, default: !0 },
  /**
   * @description: Show confirmation button
   */
  showOkBtn: { type: Boolean, default: !0 },
  wrapperProps: Object,
  afterClose: Function,
  bodyStyle: Object,
  closable: { type: Boolean, default: !0 },
  closeIcon: Object,
  confirmLoading: { type: Boolean },
  destroyOnClose: { type: Boolean, default: !0 },
  footer: Object,
  getContainer: Function,
  mask: { type: Boolean, default: !0 },
  maskClosable: { type: Boolean, default: !0 },
  keyboard: { type: Boolean, default: !0 },
  maskStyle: Object,
  okType: { type: String, default: "primary" },
  okButtonProps: Object,
  cancelButtonProps: Object,
  title: { type: String },
  visible: { type: Boolean },
  width: [String, Number],
  wrapClassName: { type: String },
  zIndex: { type: Number }
});
function ao(e) {
  const t = j(!1);
  let i;
  function o() {
    t.value = !1, i && window.clearTimeout(i);
  }
  function n() {
    o(), i = setTimeout(() => {
      t.value = !0;
    }, e);
  }
  return n(), It(o), { readyRef: t, stop: o, start: n };
}
function so(e, t, i = !1) {
  if (!ze(e))
    throw new Error("handle is not Function!");
  const { readyRef: o, stop: n, start: l } = ao(t);
  return i ? e() : he(
    o,
    (r) => {
      r && e();
    },
    { immediate: !1 }
  ), { readyRef: o, stop: n, start: l };
}
function co(e) {
  const t = (n, l) => getComputedStyle(n)[l], i = (n) => {
    if (!n)
      return;
    n.setAttribute("data-drag", c(e.draggable));
    const l = n.querySelector(".ant-modal-header"), r = n.querySelector(".ant-modal");
    !l || !r || !c(e.draggable) || (l.style.cursor = "move", l.onmousedown = (a) => {
      if (!a)
        return;
      const s = a.clientX, u = a.clientY, M = document.body.clientWidth, m = document.documentElement.clientHeight, g = r.offsetWidth, L = r.offsetHeight, h = r.offsetLeft, D = M - r.offsetLeft - g, p = r.offsetTop, v = m - r.offsetTop - L, T = t(r, "left"), b = t(r, "top");
      let Y = +T, H = +b;
      T.includes("%") ? (Y = +document.body.clientWidth * (+T.replace(/%/g, "") / 100), H = +document.body.clientHeight * (+b.replace(/%/g, "") / 100)) : (Y = +T.replace(/px/g, ""), H = +b.replace(/px/g, "")), document.onmousemove = function(G) {
        let y = G.clientX - s, P = G.clientY - u;
        -y > h ? y = -h : y > D && (y = D), -P > p ? P = -p : P > v && (P = v), r.style.cssText += `;left:${y + Y}px;top:${P + H}px;`;
      }, document.onmouseup = () => {
        document.onmousemove = null, document.onmouseup = null;
      };
    });
  }, o = () => {
    const n = document.querySelectorAll(".ant-modal-wrap");
    for (const l of Array.from(n)) {
      if (!l)
        continue;
      const r = t(l, "display"), a = l.getAttribute("data-drag");
      r !== "none" && (a === null || c(e.destroyOnClose)) && i(l);
    }
  };
  ve(() => {
    !c(e.visible) || !c(e.draggable) || so(() => {
      o();
    }, 30);
  });
}
function uo(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Qt(e);
}
const go = /* @__PURE__ */ w({
  name: "Modal",
  inheritAttrs: !1,
  components: {
    Modal: K
  },
  props: Ue,
  emits: ["cancel"],
  setup(e, {
    slots: t,
    emit: i,
    attrs: o
  }) {
    const {
      visible: n,
      draggable: l,
      destroyOnClose: r
    } = $e(e);
    co({
      visible: n,
      destroyOnClose: r,
      draggable: l
    });
    const a = (s) => {
      i("cancel", s);
    };
    return () => {
      let s;
      const u = {
        ...c(o),
        ...e,
        onCancel: a
      };
      return f(K, u, uo(s = Fn(t)) ? s : {
        default: () => [s]
      });
    };
  }
});
function Mo(e, t = 150, i) {
  let o = () => {
    e();
  };
  o = un(o, t);
  const l = () => {
    i && i.immediate && o(), window.addEventListener("resize", o);
  }, r = () => {
    window.removeEventListener("resize", o);
  };
  return dn(() => {
    l();
  }), It(() => {
    r();
  }), [l, r];
}
const fo = typeof window > "u";
function po(e) {
  for (const t of e) {
    const i = t.target.__resizeListeners__ || [];
    i.length && i.forEach((o) => {
      o();
    });
  }
}
function at(e, t) {
  fo || (e.__resizeListeners__ || (e.__resizeListeners__ = [], e.__ro__ = new Mn(po), e.__ro__.observe(e)), e.__resizeListeners__.push(t));
}
function st(e, t) {
  !e || !e.__resizeListeners__ || (e.__resizeListeners__.splice(
    e.__resizeListeners__.indexOf(t),
    1
  ), e.__resizeListeners__.length || e.__ro__.disconnect());
}
const yo = {
  vertical: {
    offset: "offsetHeight",
    scroll: "scrollTop",
    scrollSize: "scrollHeight",
    size: "height",
    key: "vertical",
    axis: "Y",
    client: "clientY",
    direction: "top"
  },
  horizontal: {
    offset: "offsetWidth",
    scroll: "scrollLeft",
    scrollSize: "scrollWidth",
    size: "width",
    key: "horizontal",
    axis: "X",
    client: "clientX",
    direction: "left"
  }
};
function mo({ move: e, size: t, bar: i }) {
  const o = {}, n = `translate${i.axis}(${e}%)`;
  return o[i.size] = t, o.transform = n, o.msTransform = n, o.webkitTransform = n, o;
}
function Lo(e, t) {
  return Object.assign(e, t);
}
function Io(e) {
  const t = {};
  for (let i = 0; i < e.length; i++)
    e[i] && Lo(t, e[i]);
  return t;
}
const No = w({
  name: "Bar",
  props: {
    vertical: Boolean,
    size: String,
    move: Number
  },
  setup(e) {
    const t = Qe(), i = j(), o = Ft(
      "scroll-bar-wrap",
      {}
    ), n = N(() => yo[e.vertical ? "vertical" : "horizontal"]), l = j({}), r = j(), a = (g) => {
      var v, T;
      if (r.value === !1)
        return;
      const L = l.value[n.value.axis];
      if (!L)
        return;
      const h = (((v = t == null ? void 0 : t.vnode.el) == null ? void 0 : v.getBoundingClientRect()[n.value.direction]) - g[n.value.client]) * -1, D = i.value[n.value.offset] - L, p = (h - D) * 100 / ((T = t == null ? void 0 : t.vnode.el) == null ? void 0 : T[n.value.offset]);
      o.value[n.value.scroll] = p * o.value[n.value.scrollSize] / 100;
    };
    function s() {
      r.value = !1, l.value[n.value.axis] = 0, nt(document, "mousemove", a), document.onselectstart = null;
    }
    const u = (g) => {
      g.stopImmediatePropagation(), r.value = !0, tt(document, "mousemove", a), tt(document, "mouseup", s), document.onselectstart = () => !1;
    }, M = (g) => {
      var L;
      g.ctrlKey || g.button === 2 || ((L = window.getSelection()) == null || L.removeAllRanges(), u(g), l.value[n.value.axis] = g.currentTarget[n.value.offset] - (g[n.value.client] - g.currentTarget.getBoundingClientRect()[n.value.direction]));
    }, m = (g) => {
      var p;
      const L = Math.abs(
        g.target.getBoundingClientRect()[n.value.direction] - g[n.value.client]
      ), h = i.value[n.value.offset] / 2, D = (L - h) * 100 / ((p = t == null ? void 0 : t.vnode.el) == null ? void 0 : p[n.value.offset]);
      o.value[n.value.scroll] = D * o.value[n.value.scrollSize] / 100;
    };
    return Mt(() => {
      nt(document, "mouseup", s);
    }), () => He(
      "div",
      {
        class: ["scrollbar__bar", "is-" + n.value.key],
        onMousedown: m
      },
      He("div", {
        ref: i,
        class: "scrollbar__thumb",
        onMousedown: M,
        style: mo({
          size: e.size,
          move: e.move,
          bar: n.value
        })
      })
    );
  }
}), jo = w({
  name: "Scrollbar",
  // inheritAttrs: false,
  components: { Bar: No },
  props: {
    native: {
      type: Boolean,
      default: !1
    },
    wrapStyle: {
      type: [String, Array],
      default: ""
    },
    wrapClass: {
      type: [String, Array],
      default: ""
    },
    viewClass: {
      type: [String, Array],
      default: ""
    },
    viewStyle: {
      type: [String, Array],
      default: ""
    },
    noresize: Boolean,
    // 如果 container 尺寸不会发生变化，最好设置它可以优化性能
    tag: {
      type: String,
      default: "div"
    }
  },
  setup(e) {
    const t = j("0"), i = j("0"), o = j(0), n = j(0), l = j(), r = j();
    ft("scroll-bar-wrap", l);
    const a = N(() => Array.isArray(e.wrapStyle) ? Io(e.wrapStyle) : e.wrapStyle), s = () => {
      e.native || (n.value = c(l).scrollTop * 100 / c(l).clientHeight, o.value = c(l).scrollLeft * 100 / c(l).clientWidth);
    }, u = () => {
      if (!c(l))
        return;
      const M = c(l).clientHeight * 100 / c(l).scrollHeight, m = c(l).clientWidth * 100 / c(l).scrollWidth;
      i.value = M < 100 ? M + "%" : "", t.value = m < 100 ? m + "%" : "";
    };
    return Fe(() => {
      e.native || (U(u), e.noresize || (at(c(r), u), at(c(l), u), addEventListener("resize", u)));
    }), Bt(() => {
      e.native || e.noresize || (st(c(r), u), st(c(l), u), removeEventListener("resize", u));
    }), {
      moveX: o,
      moveY: n,
      sizeWidth: t,
      sizeHeight: i,
      style: a,
      wrap: l,
      resize: r,
      update: u,
      handleScroll: s
    };
  }
});
const To = { class: "scrollbar" };
function ho(e, t, i, o, n, l) {
  const r = x("bar");
  return I(), A("div", To, [
    z("div", {
      ref: "wrap",
      class: Z([
        e.wrapClass,
        "scrollbar__wrap",
        e.native ? "" : "scrollbar__wrap--hidden-default"
      ]),
      style: pe(e.style),
      onScroll: t[0] || (t[0] = (...a) => e.handleScroll && e.handleScroll(...a))
    }, [
      (I(), k(Ut(e.tag), {
        ref: "resize",
        class: Z(["scrollbar__view", e.viewClass]),
        style: pe(e.viewStyle)
      }, {
        default: S(() => [
          Q(e.$slots, "default")
        ]),
        _: 3
      }, 8, ["class", "style"]))
    ], 38),
    e.native ? q("", !0) : (I(), A(ie, { key: 0 }, [
      f(r, {
        move: e.moveX,
        size: e.sizeWidth
      }, null, 8, ["move", "size"]),
      f(r, {
        vertical: "",
        move: e.moveY,
        size: e.sizeHeight
      }, null, 8, ["move", "size"])
    ], 64))
  ]);
}
const vo = /* @__PURE__ */ F(jo, [["render", ho]]), Do = (e, t, i, o) => (e /= o / 2, e < 1 ? i / 2 * e * e + t : (e--, -i / 2 * (e * (e - 2) - 1) + t)), So = (e, t) => {
  e.scrollTop = t;
}, zo = (e) => e.scrollTop;
function ct({
  el: e,
  to: t,
  duration: i = 500,
  callback: o
}) {
  const n = j(!1), l = zo(e), r = t - l, a = 20;
  let s = 0;
  i = $n(i) ? 500 : i;
  const u = function() {
    if (!c(n))
      return;
    s += a;
    const g = Do(s, l, r, i);
    So(e, g), s < i && c(n) ? requestAnimationFrame(u) : o && ze(o) && o();
  };
  return { start: () => {
    n.value = !0, u();
  }, stop: () => {
    n.value = !1;
  } };
}
const Co = w({
  name: `${Se}ScrollContainer`,
  components: { Scrollbar: vo },
  setup() {
    const e = j(null);
    function t(n, l = 500) {
      const r = c(e);
      r && U(() => {
        const a = c(r.wrap);
        if (!a)
          return;
        const { start: s } = ct({
          el: a,
          to: n,
          duration: l
        });
        s();
      });
    }
    function i() {
      const n = c(e);
      return n ? n.wrap : null;
    }
    function o() {
      const n = c(e);
      n && U(() => {
        const l = c(n.wrap);
        if (!l)
          return;
        const r = l.scrollHeight, { start: a } = ct({
          el: l,
          to: r
        });
        a();
      });
    }
    return {
      scrollbarRef: e,
      scrollTo: t,
      scrollBottom: o,
      getScrollWrap: i
    };
  }
});
function Ao(e, t, i, o, n, l) {
  const r = x("Scrollbar");
  return I(), k(r, X({
    ref: "scrollbarRef",
    class: "scroll-container"
  }, e.$attrs), {
    default: S(() => [
      Q(e.$slots, "default")
    ]),
    _: 3
  }, 16);
}
const Ne = /* @__PURE__ */ F(Co, [["render", Ao]]);
Ne.install = function(e, t) {
  e.component(t || Ne.name, Ne);
};
function xo(e, t = Symbol(), i = {}) {
  const { readonly: o = !0, createProvider: n = !1, native: l = !1 } = i, r = ye(e), a = o ? Rt(r) : r;
  return !n && ft(t, l ? e : a), {
    state: r
  };
}
const Oo = Symbol();
function wo(e) {
  return xo(e, Oo);
}
const bo = {
  loading: { type: Boolean },
  useWrapper: { type: Boolean, default: !0 },
  modalHeaderHeight: { type: Number, default: 57 },
  modalFooterHeight: { type: Number, default: 74 },
  minHeight: { type: Number, default: 200 },
  height: { type: Number },
  footerOffset: { type: Number, default: 0 },
  visible: { type: Boolean },
  fullScreen: { type: Boolean },
  loadingTip: { type: String }
}, Eo = w({
  name: "ModalWrapper",
  components: { ScrollContainer: Ne },
  inheritAttrs: !1,
  props: bo,
  emits: ["height-change", "ext-height"],
  setup(e, { emit: t }) {
    const i = j(null), o = j(null), n = j(0), l = j(0);
    let r = 0;
    Mo(u.bind(null, !1)), gn(
      o,
      () => {
        u();
      },
      {
        attributes: !0,
        subtree: !0
      }
    ), wo({
      redoModalHeight: u
    });
    const a = N(() => ({
      minHeight: `${e.minHeight}px`,
      [e.fullScreen ? "height" : "maxHeight"]: `${c(n)}px`
    }));
    ve(() => {
      e.useWrapper && u();
    }), he(
      () => e.fullScreen,
      (M) => {
        u(), M ? l.value = n.value : n.value = l.value;
      }
    ), Fe(() => {
      const { modalHeaderHeight: M, modalFooterHeight: m } = e;
      t("ext-height", M + m);
    }), Mt(() => {
    });
    async function s() {
      U(() => {
        var m;
        const M = c(i);
        M && ((m = M == null ? void 0 : M.scrollTo) == null || m.call(M, 0));
      });
    }
    async function u() {
      if (!e.visible)
        return;
      const M = c(i);
      if (!M)
        return;
      const m = M.$el.parentElement;
      if (m) {
        m.style.padding = "0", await U();
        try {
          const g = m.parentElement && m.parentElement.parentElement;
          if (!g)
            return;
          const L = getComputedStyle(g).top, h = Number.parseInt(L);
          let D = window.innerHeight - h * 2 + (e.footerOffset || 0) - e.modalFooterHeight - e.modalHeaderHeight;
          h < 40 && (D -= 26), await U();
          const p = c(o);
          if (!p)
            return;
          await U(), r = p.scrollHeight, e.fullScreen ? n.value = window.innerHeight - e.modalFooterHeight - e.modalHeaderHeight - 28 : n.value = e.height ? e.height : r > D ? D : r, t("height-change", c(n));
        } catch (g) {
          console.log(g);
        }
      }
    }
    return { wrapperRef: i, spinRef: o, spinStyle: a, scrollTop: s, setModalHeight: u };
  }
}), _o = ["loading-tip"];
function ko(e, t, i, o, n, l) {
  const r = x("ScrollContainer"), a = Ht("loading");
  return I(), k(r, { ref: "wrapperRef" }, {
    default: S(() => [
      Wt((I(), A("div", {
        ref: "spinRef",
        style: pe(e.spinStyle),
        "loading-tip": e.loadingTip
      }, [
        Q(e.$slots, "default")
      ], 12, _o)), [
        [a, e.loading]
      ])
    ]),
    _: 3
  }, 512);
}
const Yo = /* @__PURE__ */ F(Eo, [["render", ko]]), Po = w({
  name: "ModalClose",
  components: {
    Tooltip: _e,
    FullscreenExitOutlined: tn,
    FullscreenOutlined: nn,
    CloseOutlined: Lt
  },
  props: {
    canFullscreen: { type: Boolean, default: !0 },
    fullScreen: { type: Boolean }
  },
  emits: ["cancel", "fullscreen"],
  setup(e, { emit: t }) {
    const o = ce("basic-modal-close").b();
    Qe();
    const n = me(), l = N(() => [
      o,
      `${o}--custom`,
      {
        [`${o}--can-full`]: e.canFullscreen
      }
    ]);
    function r(s) {
      t("cancel", s);
    }
    function a(s) {
      s == null || s.stopPropagation(), s == null || s.preventDefault(), t("fullscreen");
    }
    return {
      t: n,
      getClass: l,
      prefixCls: o,
      handleCancel: r,
      handleFullScreen: a
    };
  }
});
function $o(e, t, i, o, n, l) {
  const r = x("FullscreenExitOutlined"), a = x("Tooltip"), s = x("FullscreenOutlined"), u = x("CloseOutlined");
  return I(), A("div", {
    class: Z(e.getClass)
  }, [
    e.canFullscreen ? (I(), A(ie, { key: 0 }, [
      e.fullScreen ? (I(), k(a, {
        key: 0,
        title: e.t("modal.restore"),
        placement: "bottom"
      }, {
        default: S(() => [
          f(r, {
            role: "full",
            onClick: e.handleFullScreen
          }, null, 8, ["onClick"])
        ]),
        _: 1
      }, 8, ["title"])) : (I(), k(a, {
        key: 1,
        title: e.t("modal.maximize"),
        placement: "bottom"
      }, {
        default: S(() => [
          f(s, {
            role: "close",
            onClick: e.handleFullScreen
          }, null, 8, ["onClick"])
        ]),
        _: 1
      }, 8, ["title"]))
    ], 64)) : q("", !0),
    f(a, {
      title: e.t("modal.close"),
      placement: "bottom"
    }, {
      default: S(() => [
        f(u, { onClick: e.handleCancel }, null, 8, ["onClick"])
      ]),
      _: 1
    }, 8, ["title"])
  ], 2);
}
const Qo = /* @__PURE__ */ F(Po, [["render", $o]]), Fo = w({
  name: "BasicModalFooter",
  props: Ue,
  components: {
    Button: yt
  },
  emits: ["ok", "cancel"],
  setup(e, { emit: t }) {
    function i(n) {
      t("ok", n);
    }
    function o(n) {
      t("cancel", n);
    }
    return { handleOk: i, handleCancel: o };
  }
});
function Bo(e, t, i, o, n, l) {
  const r = x("Button");
  return I(), A("div", null, [
    Q(e.$slots, "insertFooter"),
    e.showCancelBtn ? (I(), k(r, X({ key: 0 }, e.cancelButtonProps, { onClick: e.handleCancel }), {
      default: S(() => [
        J(B(e.cancelText), 1)
      ]),
      _: 1
    }, 16, ["onClick"])) : q("", !0),
    Q(e.$slots, "centerFooter"),
    e.showOkBtn ? (I(), k(r, X({
      key: 1,
      type: e.okType,
      onClick: e.handleOk,
      loading: e.confirmLoading
    }, e.okButtonProps), {
      default: S(() => [
        J(B(e.okText), 1)
      ]),
      _: 1
    }, 16, ["type", "onClick", "loading"])) : q("", !0),
    Q(e.$slots, "appendFooter")
  ]);
}
const Uo = /* @__PURE__ */ F(Fo, [["render", Bo]]), Ro = w({
  name: `${Se}SvgIcon`,
  props: {
    prefix: {
      type: String,
      default: "icon"
    },
    name: {
      type: String,
      required: !0
    },
    size: {
      type: [Number, String],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const i = ce("svg-icon").b(), o = N(() => `#${e.prefix}-${e.name}`), n = N(() => {
      const { size: l } = e;
      let r = `${l}`;
      return r = `${r.replace("px", "")}px`, {
        width: r,
        height: r
      };
    });
    return { symbolId: o, prefixCls: i, getStyle: n };
  }
});
const Ho = ["xlink:href"];
function Wo(e, t, i, o, n, l) {
  return I(), A("svg", {
    class: Z([e.prefixCls, e.$attrs.class, e.spin && "svg-icon-spin"]),
    style: pe(e.getStyle),
    "aria-hidden": "true"
  }, [
    z("use", { "xlink:href": e.symbolId }, null, 8, Ho)
  ], 6);
}
const Zo = /* @__PURE__ */ F(Ro, [["render", Wo]]), ut = "|svg", Go = w({
  name: `${Se}Icon`,
  components: { SvgIcon: Zo },
  props: {
    // icon name
    icon: String,
    // icon color
    color: String,
    // icon size
    size: {
      type: [String, Number],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    },
    prefix: {
      type: String,
      default: ""
    }
  },
  setup(e) {
    const t = j(null), i = N(() => {
      var a;
      return (a = e.icon) == null ? void 0 : a.endsWith(ut);
    }), o = N(
      () => e.icon.replace(ut, "")
    ), n = N(
      () => `${e.prefix ? e.prefix + ":" : ""}${e.icon}`
    ), l = async () => {
      if (c(i))
        return;
      const a = c(t);
      if (!a)
        return;
      await U();
      const s = c(n);
      if (!s)
        return;
      const u = fn.renderSVG(s, {});
      if (u)
        a.textContent = "", a.appendChild(u);
      else {
        const M = document.createElement("span");
        M.className = "iconify", M.dataset.icon = s, a.textContent = "", a.appendChild(M);
      }
    }, r = N(() => {
      const { size: a, color: s } = e;
      let u = a;
      return se(a) && (u = parseInt(a, 10)), {
        fontSize: `${u}px`,
        color: s,
        display: "inline-flex"
      };
    });
    return he(() => e.icon, l, { flush: "post" }), Fe(l), { elRef: t, getWrapStyle: r, isSvgIcon: i, getSvgIcon: o };
  }
});
function Xo(e, t, i, o, n, l) {
  const r = x("SvgIcon");
  return e.isSvgIcon ? (I(), k(r, {
    key: 0,
    size: e.size,
    name: e.getSvgIcon,
    class: Z([e.$attrs.class, "anticon"]),
    spin: e.spin
  }, null, 8, ["size", "name", "class", "spin"])) : (I(), A("span", {
    key: 1,
    ref: "elRef",
    class: Z([e.$attrs.class, "app-iconify anticon", e.spin && "app-iconify-spin"]),
    style: pe(e.getWrapStyle)
  }, null, 6));
}
const we = /* @__PURE__ */ F(Go, [["render", Xo]]);
we.install = function(e, t) {
  e.component(t || we.name, we);
};
const Vo = {
  /**
   * Help text max-width
   * @default: 600px
   */
  maxWidth: {
    type: String,
    default: "600px"
  },
  /**
   * Whether to display the serial number
   * @default: false
   */
  showIndex: {
    type: Boolean
  },
  /**
   * Help text font color
   * @default: #ffffff
   */
  color: {
    type: String,
    default: "#ffffff"
  },
  /**
   * Help text font size
   * @default: 14px
   */
  fontSize: {
    type: String,
    default: "14px"
  },
  /**
   * Help text list
   */
  placement: {
    type: String,
    default: "right"
  },
  /**
   * Help text list
   */
  text: {
    type: [Array, String]
  }
}, Jo = /* @__PURE__ */ w({
  name: "BasicHelp",
  components: {
    Tooltip: _e
  },
  props: Vo,
  setup(e, {
    slots: t
  }) {
    const o = ce("basic-help").b(), n = N(() => ({
      color: e.color,
      fontSize: e.fontSize
    })), l = N(() => ({
      maxWidth: e.maxWidth
    }));
    function r() {
      const s = e.text;
      return se(s) ? f("p", null, [s]) : Ye(s) ? s.map((u, M) => f("p", {
        key: u
      }, [f(ie, null, [e.showIndex ? `${M + 1}. ` : "", u])])) : null;
    }
    function a(s) {
      return (s == null ? void 0 : s.parentNode) ?? document.body;
    }
    return () => f(_e, {
      overlayClassName: `${o}__wrap`,
      title: f("div", {
        style: c(n)
      }, [r()]),
      autoAdjustOverflow: !0,
      overlayStyle: c(l),
      placement: e.placement,
      getPopupContainer: () => a()
    }, {
      default: () => [f("span", {
        class: o
      }, [Ot(t) || f(on, null, null)])]
    });
  }
});
const qo = /* @__PURE__ */ w({
  __name: "BasicTitle",
  props: {
    /**
     * Help text list or string
     * @default: ''
     */
    helpMessage: {
      type: [String, Array],
      default: ""
    },
    /**
     * Whether the color block on the left side of the title
     * @default: false
     */
    span: { type: Boolean },
    /**
     * Whether to default the text, that is, not bold
     * @default: false
     */
    normal: { type: Boolean }
  },
  setup(e) {
    const t = ce("basic-title"), i = e, o = t.b(), n = Zt(), l = N(() => [
      o,
      { [`${o}-show-span`]: i.span && n.default },
      { [`${o}-normal`]: i.normal }
    ]);
    return (r, a) => (I(), A("span", {
      class: Z(l.value)
    }, [
      Q(r.$slots, "default"),
      e.helpMessage ? (I(), k(Jo, {
        key: 0,
        class: Z(`${c(o)}-help`),
        text: e.helpMessage
      }, null, 8, ["class", "text"])) : q("", !0)
    ], 2));
  }
});
const Ko = w({
  name: "BasicModalHeader",
  components: { BasicTitle: qo },
  props: {
    helpMessage: {
      type: [String, Array]
    },
    title: { type: String }
  },
  emits: ["dblclick"]
});
function ei(e, t, i, o, n, l) {
  const r = x("BasicTitle");
  return I(), k(r, { helpMessage: e.helpMessage }, {
    default: S(() => [
      J(B(e.title), 1)
    ]),
    _: 1
  }, 8, ["helpMessage"]);
}
const ti = /* @__PURE__ */ F(Ko, [["render", ei]]);
function ni(e) {
  const t = j(!1), i = N(() => {
    const n = c(e.wrapClassName) || "";
    return c(t) ? `fullscreen-modal ${n} ` : c(n);
  });
  function o(n) {
    n && n.stopPropagation(), t.value = !c(t);
  }
  return { getWrapClassName: i, handleFullScreen: o, fullScreenRef: t };
}
const oi = w({
  name: `${Se}BasicModal`,
  components: { Modal: go, ModalWrapper: Yo, ModalClose: Qo, ModalFooter: Uo, ModalHeader: ti },
  inheritAttrs: !1,
  props: Ue,
  emits: [
    "visible-change",
    "height-change",
    "cancel",
    "ok",
    "register",
    "update:visible"
  ],
  setup(e, { emit: t, attrs: i }) {
    const o = j(!1), n = j(null), l = j(null), r = ce("basic-modal"), a = j(0), s = {
      setModalProps: T,
      emitVisible: void 0,
      redoModalHeight: () => {
        U(() => {
          c(l) && c(l).setModalHeight();
        });
      }
    }, u = Qe();
    u && t("register", s, u.uid);
    const M = N(() => ({
      ...e,
      ...c(n)
    })), { handleFullScreen: m, getWrapClassName: g, fullScreenRef: L } = ni(
      {
        modalWrapperRef: l,
        extHeightRef: a,
        wrapClassName: Gt(M.value, "wrapClassName")
      }
    ), h = N(() => ({
      ...{
        ...c(M),
        visible: c(o),
        okButtonProps: void 0,
        cancelButtonProps: void 0,
        title: void 0
      },
      wrapClassName: c(g)
    })), D = N(() => {
      const y = {
        ...i,
        ...c(M),
        visible: c(o),
        wrapClassName: c(g)
      };
      return c(L) ? xe(y, ["height", "title"]) : xe(y, "title");
    }), p = N(() => {
      if (!c(L))
        return c(h).height;
    });
    ve(() => {
      o.value = !!e.visible, L.value = !!e.defaultFullscreen;
    }), he(
      () => c(o),
      (y) => {
        t("visible-change", y), t("update:visible", y), U(() => {
          e.scrollTop && y && c(l) && c(l).scrollTop();
        });
      },
      {
        immediate: !1
      }
    );
    async function v(y) {
      var P, Le;
      if (y == null || y.stopPropagation(), !((Le = (P = y.target) == null ? void 0 : P.classList) != null && Le.contains(
        r.b() + "-close--custom"
      ))) {
        if (e.closeFunc && ze(e.closeFunc)) {
          const Ae = await e.closeFunc();
          o.value = !Ae;
          return;
        }
        o.value = !1, t("cancel", y);
      }
    }
    function T(y) {
      n.value = xt(c(n) || {}, y), Reflect.has(y, "visible") && (o.value = !!y.visible), Reflect.has(y, "defaultFullscreen") && (L.value = !!y.defaultFullscreen);
    }
    function b(y) {
      t("ok", y);
    }
    function Y(y) {
      t("height-change", y);
    }
    function H(y) {
      a.value = y;
    }
    function G(y) {
      e.canFullscreen && (y.stopPropagation(), m(y));
    }
    return {
      handleCancel: v,
      getBindValue: D,
      getProps: h,
      handleFullScreen: m,
      fullScreenRef: L,
      getMergeProps: M,
      handleOk: b,
      visibleRef: o,
      omit: xe,
      modalWrapperRef: l,
      handleExtHeight: H,
      handleHeightChange: Y,
      handleTitleDbClick: G,
      getWrapperHeight: p
    };
  }
});
function ii(e, t, i, o, n, l) {
  const r = x("ModalClose"), a = x("ModalHeader"), s = x("ModalFooter"), u = x("ModalWrapper"), M = x("Modal", !0);
  return I(), k(M, X(e.getBindValue, { onCancel: e.handleCancel }), Ee({
    default: S(() => [
      f(u, X(
        {
          useWrapper: e.getProps.useWrapper,
          footerOffset: e.wrapperFooterOffset,
          fullScreen: e.fullScreenRef,
          ref: "modalWrapperRef",
          loading: e.getProps.loading,
          "loading-tip": e.getProps.loadingTip,
          minHeight: e.getProps.minHeight,
          height: e.getWrapperHeight,
          visible: e.visibleRef,
          modalFooterHeight: e.footer !== void 0 && !e.footer ? 0 : void 0
        },
        e.omit(e.getProps.wrapperProps, "visible", "height", "modalFooterHeight"),
        {
          onExtHeight: e.handleExtHeight,
          onHeightChange: e.handleHeightChange
        }
      ), {
        default: S(() => [
          Q(e.$slots, "default")
        ]),
        _: 3
      }, 16, ["useWrapper", "footerOffset", "fullScreen", "loading", "loading-tip", "minHeight", "height", "visible", "modalFooterHeight", "onExtHeight", "onHeightChange"])
    ]),
    _: 2
  }, [
    e.$slots.closeIcon ? void 0 : {
      name: "closeIcon",
      fn: S(() => [
        f(r, {
          canFullscreen: e.getProps.canFullscreen,
          fullScreen: e.fullScreenRef,
          onCancel: e.handleCancel,
          onFullscreen: e.handleFullScreen
        }, null, 8, ["canFullscreen", "fullScreen", "onCancel", "onFullscreen"])
      ]),
      key: "0"
    },
    e.$slots.title ? void 0 : {
      name: "title",
      fn: S(() => [
        f(a, {
          helpMessage: e.getProps.helpMessage,
          title: e.getMergeProps.title,
          onDblclick: e.handleTitleDbClick
        }, null, 8, ["helpMessage", "title", "onDblclick"])
      ]),
      key: "1"
    },
    e.$slots.footer ? void 0 : {
      name: "footer",
      fn: S(() => [
        f(s, X(e.getBindValue, {
          onOk: e.handleOk,
          onCancel: e.handleCancel
        }), Ee({ _: 2 }, [
          fe(Object.keys(e.$slots), (m) => ({
            name: m,
            fn: S((g) => [
              Q(e.$slots, m, be(We(g || {})))
            ])
          }))
        ]), 1040, ["onOk", "onCancel"])
      ]),
      key: "2"
    },
    fe(Object.keys(e.omit(e.$slots, "default")), (m) => ({
      name: m,
      fn: S((g) => [
        Q(e.$slots, m, be(We(g || {})))
      ])
    }))
  ]), 1040, ["onCancel"]);
}
const je = /* @__PURE__ */ F(oi, [["render", ii]]);
ye({});
ye({});
je.install = function(e, t) {
  e.component(t || je.name, je);
};
const li = (e) => {
  const t = e == null ? void 0 : e.split(".").pop().toLowerCase();
  return ["doc", "docx"].includes(t) ? "application/msword" : ["docx"].includes(t) ? "application/vnd.openxmlformats-officedocument.wordprocessingml.document" : ["xls"].includes(t) ? "application/vnd.ms-excel" : ["xlsx"].includes(t) ? "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : ["ppt"].includes(t) ? "application/vnd.ms-powerpoint" : ["pptx"].includes(t) ? "application/vnd.openxmlformats-officedocument.presentationml.presentation" : ["pdf"].includes(t) ? "application/pdf" : ["png", "jpg", "jpeg", "gif", "bmp", "svg", "webp"].includes(t) ? `image/${t}` : ["zip"].includes(t) ? "application/zip" : "";
}, ri = { class: "content" }, ai = { class: "subject" }, si = { class: "sender" }, ci = { style: { width: "50px" } }, ui = { class: "person" }, di = { class: "sender-t" }, gi = /* @__PURE__ */ z("b", null, "发件人: ", -1), Mi = ["title"], fi = /* @__PURE__ */ z("b", null, "收件人: ", -1), pi = ["title"], yi = { class: "body" }, mi = ["innerHTML"], Li = {
  key: 0,
  class: "file"
}, Ii = /* @__PURE__ */ z("h1", null, "附件", -1), Ni = ["href", "download"], ji = {
  name: "GMsgUrlReader"
}, ne = /* @__PURE__ */ w({
  ...ji,
  props: {
    url: {
      type: String,
      default: ""
    },
    fileName: {
      type: String,
      default: ""
    },
    msgApi: {
      type: Function,
      default: () => {
      },
      required: !1
    }
  },
  setup(e) {
    const t = e, i = j(!1), o = j({});
    j(t.url).value ? r() : console.error("msg url or msg api is empty");
    const l = (a) => {
      const s = a.body, u = /<(https?:\/\/[^>]+)>/g;
      return s.replace(
        u,
        (m, g) => `<a href="${g}" target="_blank">${g}</a>`
      ).replace(/\r\n/g, "<br/>");
    };
    async function r() {
      try {
        const a = t == null ? void 0 : t.fileName, s = t == null ? void 0 : t.url, M = await (t == null ? void 0 : t.msgApi)({ fileName: a, fileUrl: s }), m = M == null ? void 0 : M.data, g = new Blob([new Uint8Array(m)], {
          type: "application/octet-stream"
        }), L = new FileReader();
        L.onload = (h) => {
          var D;
          try {
            const p = (D = h == null ? void 0 : h.target) == null ? void 0 : D.result;
            let v;
            typeof Oe == "function" ? v = new Oe(p) : v = new Oe.default(p);
            const T = v.getFileData();
            console.log("Parsed MSG Data:", T);
            const b = ((T == null ? void 0 : T.attachments) || []).map((Y, H) => {
              const G = v == null ? void 0 : v.getAttachment(H), y = li(Y.fileName), P = new Blob([new Uint8Array(G.content)], {
                type: y || "application/octet-stream"
              });
              return {
                ...Y,
                url: URL.createObjectURL(P)
              };
            });
            o.value = {
              subject: T.subject,
              senderEmail: T.senderEmail,
              senderName: T.senderName,
              recipients: T == null ? void 0 : T.recipients,
              body: l(T),
              attachments: b
            }, i.value = !0;
          } catch (p) {
            console.error("文件解析失败:", p);
          }
        }, L.readAsArrayBuffer(g);
      } catch (a) {
        console.error("解析 .msg 文件失败:", a);
      }
    }
    return (a, s) => (I(), k(c(je), {
      width: "800px",
      minHeight: "300",
      wrapClassName: "g-msgFile-model-wrapper",
      showOkBtn: !1,
      maskClosable: !1,
      visible: i.value,
      "onUpdate:visible": s[1] || (s[1] = (u) => i.value = u),
      onCancel: s[2] || (s[2] = (u) => i.value = !1)
    }, {
      title: S(() => [
        f(c(ln))
      ]),
      footer: S(() => [
        f(c(yt), {
          onClick: s[0] || (s[0] = (u) => i.value = !1)
        }, {
          default: S(() => [
            J("cancle")
          ]),
          _: 1
        })
      ]),
      default: S(() => {
        var u, M, m, g, L, h, D;
        return [
          z("div", ri, [
            z("h1", ai, B((u = o.value) == null ? void 0 : u.subject), 1),
            z("div", si, [
              z("div", ci, [
                f(c(Xt), { style: { "background-color": "#0084f4", opacity: "0.8" } }, {
                  default: S(() => {
                    var p, v;
                    return [
                      J(B((v = (p = o.value) == null ? void 0 : p.senderName) == null ? void 0 : v.slice(0, 1)), 1)
                    ];
                  }),
                  _: 1
                })
              ]),
              z("div", ui, [
                z("div", di, [
                  gi,
                  z("span", {
                    title: (M = o.value) == null ? void 0 : M.senderEmail
                  }, B((m = o.value) == null ? void 0 : m.senderName), 9, Mi)
                ]),
                z("div", null, [
                  fi,
                  (I(!0), A(ie, null, fe((g = o.value) == null ? void 0 : g.recipients, (p, v) => (I(), A("span", { key: v }, [
                    z("span", {
                      style: { "margin-right": "3px" },
                      title: p == null ? void 0 : p.email
                    }, B(p == null ? void 0 : p.name) + ";", 9, pi)
                  ]))), 128))
                ])
              ])
            ]),
            z("div", yi, [
              z("p", {
                innerHTML: (L = o.value) == null ? void 0 : L.body
              }, null, 8, mi)
            ]),
            (D = (h = o.value) == null ? void 0 : h.attachments) != null && D.length ? (I(), A("div", Li, [
              Ii,
              z("ul", null, [
                (I(!0), A(ie, null, fe(o.value.attachments, (p, v) => (I(), A("li", { key: v }, [
                  z("a", {
                    href: p == null ? void 0 : p.url,
                    download: p == null ? void 0 : p.fileName
                  }, B(p == null ? void 0 : p.fileName), 9, Ni)
                ]))), 128))
              ])
            ])) : q("", !0)
          ])
        ];
      }),
      _: 1
    }, 8, ["visible"]));
  }
});
const Ti = "data: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PjwvcGF0aD48L3N2Zz4K";
var V;
(function(e) {
  e[e.LOADING = 0] = "LOADING", e[e.DONE = 1] = "DONE", e[e.FAIL = 2] = "FAIL";
})(V || (V = {}));
const zi = {
  show: {
    type: Boolean,
    default: !1
  },
  imageList: {
    type: [Array],
    default: null
  },
  index: {
    type: Number,
    default: 0
  },
  scaleStep: {
    type: Number
  },
  defaultWidth: {
    type: Number
  },
  maskClosable: {
    type: Boolean
  },
  rememberState: {
    type: Boolean
  }
}, E = "img-preview", Ci = /* @__PURE__ */ w({
  name: "ImagePreview",
  props: zi,
  emits: ["img-load", "img-error"],
  setup(e, {
    expose: t,
    emit: i
  }) {
    const o = /* @__PURE__ */ new Map(), n = ye({
      currentUrl: "",
      imgScale: 1,
      imgRotate: 0,
      imgTop: 0,
      imgLeft: 0,
      status: V.LOADING,
      currentIndex: 0,
      moveX: 0,
      moveY: 0,
      show: e.show
    }), l = j(null), r = j(null);
    function a() {
      u();
      const {
        index: d,
        imageList: C
      } = e;
      if (!C || !C.length)
        throw new Error("imageList is undefined");
      n.currentIndex = d, D(C[d]);
    }
    function s() {
      n.imgScale = 1, n.imgRotate = 0, n.imgTop = 0, n.imgLeft = 0;
    }
    function u() {
      const d = c(l);
      d && (d.onmousewheel = m, document.body.addEventListener("DOMMouseScroll", m), document.ondragstart = function() {
        return !1;
      });
    }
    const M = N(() => {
      const d = (e == null ? void 0 : e.scaleStep) ?? 0;
      return d ?? 0 > 0 ? d / 100 : n.imgScale / 10;
    });
    function m(d) {
      d = d || window.event, d.delta = d.wheelDelta || -d.detail, d.preventDefault(), d.delta > 0 && g(M.value), d.delta < 0 && g(-M.value);
    }
    function g(d) {
      n.imgScale <= 0.2 && d < 0 || (n.imgScale += d);
    }
    function L(d) {
      n.imgRotate += d;
    }
    function h() {
      const d = c(r);
      d && (d.onmousemove = null);
    }
    function D(d) {
      n.status = V.LOADING;
      const C = new Image();
      C.src = d, C.onload = ($) => {
        if (n.currentUrl !== d) {
          const W = $.composedPath();
          if (e.rememberState) {
            o.set(n.currentUrl, {
              scale: n.imgScale,
              top: n.imgTop,
              left: n.imgLeft,
              rotate: n.imgRotate
            });
            const ue = o.get(d);
            ue ? (n.imgScale = ue.scale, n.imgTop = ue.top, n.imgRotate = ue.rotate, n.imgLeft = ue.left) : (s(), e.defaultWidth && (n.imgScale = e.defaultWidth / W[0].naturalWidth));
          } else
            e.defaultWidth && (n.imgScale = e.defaultWidth / W[0].naturalWidth);
          W && i("img-load", {
            index: n.currentIndex,
            dom: W[0],
            url: d
          });
        }
        n.currentUrl = d, n.status = V.DONE;
      }, C.onerror = ($) => {
        const W = $.composedPath();
        W && i("img-error", {
          index: n.currentIndex,
          dom: W[0],
          url: d
        }), n.status = V.FAIL;
      };
    }
    function p(d) {
      d && d.stopPropagation(), v();
    }
    function v() {
      n.show = !1, document.body.removeEventListener("DOMMouseScroll", m), document.ondragstart = null;
    }
    function T() {
      s();
    }
    t({
      resume: T,
      close: v,
      prev: b.bind(null, "left"),
      next: b.bind(null, "right"),
      setScale: (d) => {
        d > 0 && d <= 10 && (n.imgScale = d);
      },
      setRotate: (d) => {
        n.imgRotate = d;
      }
    });
    function b(d) {
      const {
        currentIndex: C
      } = n, {
        imageList: $
      } = e;
      d === "left" && (n.currentIndex--, C <= 0 && (n.currentIndex = $.length - 1)), d === "right" && (n.currentIndex++, C >= $.length - 1 && (n.currentIndex = 0)), D($[n.currentIndex]);
    }
    function Y(d) {
      d = d || window.event, n.moveX = d.clientX, n.moveY = d.clientY;
      const C = c(r);
      C && (C.onmousemove = H);
    }
    function H(d) {
      d = d || window.event, d.preventDefault();
      const C = d.clientX - n.moveX, $ = d.clientY - n.moveY;
      n.imgLeft += C, n.imgTop += $, n.moveX = d.clientX, n.moveY = d.clientY;
    }
    const G = N(() => {
      const {
        imgScale: d,
        imgRotate: C,
        imgTop: $,
        imgLeft: W
      } = n;
      return {
        transform: `scale(${d}) rotate(${C}deg)`,
        marginTop: `${$}px`,
        marginLeft: `${W}px`,
        maxWidth: e.defaultWidth ? "unset" : "100%"
      };
    }), y = N(() => {
      const {
        imageList: d
      } = e;
      return d.length > 1;
    });
    ve(() => {
      e.show && a(), e.imageList && s();
    });
    const P = (d) => {
      e.maskClosable && d.target && d.target.classList.contains(`${E}-content`) && p(d);
    }, Le = () => f("div", {
      class: `${E}__close`,
      onClick: p
    }, [f(Lt, {
      class: `${E}__close-icon`
    }, null)]), Ae = () => {
      if (!c(y))
        return null;
      const {
        currentIndex: d
      } = n, {
        imageList: C
      } = e;
      return f("div", {
        class: `${E}__index`
      }, [d + 1, J(" / "), C.length]);
    }, $t = () => f("div", {
      class: `${E}__controller`
    }, [f("div", {
      class: `${E}__controller-item`,
      onClick: () => g(-M.value)
    }, [f("img", {
      src: Di
    }, null)]), f("div", {
      class: `${E}__controller-item`,
      onClick: () => g(M.value)
    }, [f("img", {
      src: vi
    }, null)]), f("div", {
      class: `${E}__controller-item`,
      onClick: T
    }, [f("img", {
      src: Ti
    }, null)]), f("div", {
      class: `${E}__controller-item`,
      onClick: () => L(-90)
    }, [f("img", {
      src: Si
    }, null)]), f("div", {
      class: `${E}__controller-item`,
      onClick: () => L(90)
    }, [f("img", {
      src: hi
    }, null)])]), Re = (d) => c(y) ? f("div", {
      class: [`${E}__arrow`, d],
      onClick: () => b(d)
    }, [d === "left" ? f(rn, null, null) : f(an, null, null)]) : null;
    return () => n.show && f("div", {
      class: E,
      ref: l,
      onMouseup: h,
      onClick: P
    }, [f("div", {
      class: `${E}-content`
    }, [f("img", {
      style: c(G),
      class: [`${E}-image`, n.status === V.DONE ? "" : "hidden"],
      ref: r,
      src: n.currentUrl,
      onMousedown: Y
    }, null), Le(), Ae(), $t(), Re("left"), Re("right")])]);
  }
});
function Yt(e) {
  return e === "warning" ? f(Xe, {
    class: "modal-icon-warning"
  }, null) : e === "success" ? f(sn, {
    class: "modal-icon-success"
  }, null) : e === "info" ? f(Xe, {
    class: "modal-icon-info"
  }, null) : f(cn, {
    class: "modal-icon-error"
  }, null);
}
function Pt({
  content: e
}) {
  return se(e) ? f("div", {
    innerHTML: `<div>${e}</div>`
  }, null) : e;
}
function Ai(e) {
  const t = e.iconType || "warning";
  Reflect.deleteProperty(e, "iconType");
  const i = {
    centered: !0,
    icon: Yt(t),
    ...e,
    content: Pt(e)
  };
  return K.confirm(i);
}
const xi = () => ({
  okText: me()("common.okText"),
  centered: !0
});
function Ce(e, t) {
  return {
    ...xi(),
    ...e,
    content: Pt(e),
    icon: Yt(t)
  };
}
function Oi(e) {
  return K.success(Ce(e, "success"));
}
function wi(e) {
  return K.error(Ce(e, "close"));
}
function bi(e) {
  return K.info(Ce(e, "info"));
}
function Ei(e) {
  return K.warning(Ce(e, "warning"));
}
mt.config({
  placement: "topRight",
  duration: 3
});
function _i() {
  return {
    createMessage: Vt,
    notification: mt,
    createConfirm: Ai,
    createSuccessModal: Oi,
    createErrorModal: wi,
    createInfoModal: bi,
    createWarningModal: Ei
  };
}
const { createMessage: ki } = _i(), Yi = me();
let oe = null;
function Pi(e) {
  var o;
  if (!At)
    return;
  const t = {}, i = document.createElement("div");
  return Object.assign(t, { show: !0, index: 0, scaleStep: 10 }, e), oe = f(Ci, t), pt(oe, i), document.body.appendChild(i), (o = oe.component) == null ? void 0 : o.exposed;
}
function $i(e) {
  var o;
  if (!At)
    return;
  const t = {}, i = document.createElement("div");
  return Object.assign(t, e), oe = f(ne, t), pt(oe, i), document.body.appendChild(i), (o = oe.component) == null ? void 0 : o.exposed;
}
function Vi(e) {
  const { getPreviewSrc: t, getIsSupportPreview: i, getIsImageFile: o, getIsMsgFile: n } = kt($e(e)), l = i.value, r = o.value, a = n.value, s = t.value;
  if (!l) {
    ki.warning(Yi("previewFile.notSupport"));
    return;
  }
  if (a) {
    $i({ ...e });
    return;
  }
  r ? Pi({ imageList: [s] }) : window.open(s);
}
ge.install = function(e, t) {
  e.component(ge.name || t, ge);
};
Me.install = function(e, t) {
  e.component(Me.name || t, Me);
};
ne.install = function(e, t) {
  e.component(ne.name || t, ne);
};
const Ji = {
  title: "PreviewFile 文件预览",
  parts: "UI组件",
  category: "高级组件",
  status: "100%",
  install(e) {
    e.component(ge.name, ge), e.component(Me.name, Me), e.component(ne.name, ne);
  }
};
export {
  Vi as createDocPreview,
  Pi as createImgPreview,
  $i as createMsgUrlReader,
  Ji as default
};
