var Oe = Object.defineProperty;
var Ce = (e, t, n) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var ae = (e, t, n) => (Ce(e, typeof t != "symbol" ? t + "" : t, n), n);
import { ref as R, reactive as q, defineComponent as Z, inject as G, watch as D, computed as se, onMounted as ge, withDirectives as je, createVNode as w, provide as le, resolveComponent as _e, onUpdated as $e } from "vue";
import { Tooltip as W } from "ant-design-vue";
import "lodash-es";
import "dayjs";
import { useResizeObserver as Be } from "@vueuse/core";
function M(e, t) {
  const n = {}, o = Object.keys(t);
  return o.forEach((i) => {
    n[i] = e.style[i];
  }), o.forEach((i) => {
    e.style[i] = t[i];
  }), n;
}
function Q(e, t) {
  return e.classList ? e.classList.contains(t) : ` ${e.className} `.indexOf(` ${t} `) > -1;
}
function U(e, t) {
  e.classList ? e.classList.add(t) : Q(e, t) || (e.className = `${e.className} ${t}`);
}
function k(e, t) {
  if (e.classList)
    e.classList.remove(t);
  else if (Q(e, t)) {
    const n = e.className;
    e.className = ` ${n} `.replace(` ${t} `, " ");
  }
}
function V(e) {
  return {
    pageX: e.pageX,
    pageY: e.pageY,
    clientX: e.clientX,
    clientY: e.clientY,
    offsetX: e.offsetX,
    offsetY: e.offsetY,
    type: e.type,
    originalEvent: e
  };
}
function H(e, t, n) {
  e.addEventListener && e.addEventListener(t, n);
}
function K(e, t, n) {
  e.removeEventListener && e.removeEventListener(t, n);
}
function he(e) {
  var i;
  const t = (i = e == null ? void 0 : e.target) == null ? void 0 : i.resizeProps;
  if (!t)
    return;
  function n(r) {
    t.onDragEvent(V(r));
  }
  function o(r) {
    K(document, "mousemove", n), K(document, "mouseup", o), t.onReleaseEvent(V(r));
  }
  H(document, "mousemove", n), H(document, "mouseup", o), t.onPressEvent(V(e));
}
function Ne(e) {
  H(e, "mousedown", he);
}
const ke = {
  mounted(e, { value: t }) {
    e.resizeProps = t, t.enableResize && Ne(e);
  },
  unmounted(e, { value: t }) {
    t.enableResize && K(e, "mousedown", he);
  }
}, De = {
  /**
   * 当前 pane 的索引
   */
  index: {
    type: Number
  },
  /**
   * 必选，指定 SplitterBar 的方向
   */
  orientation: {
    type: String,
    required: !0
  },
  /**
   * 分隔条大小
   */
  splitBarSize: {
    type: String,
    required: !0
  },
  /**
   * 可选，pane 设置不可调整宽度时生效
   */
  disabledBarSize: {
    type: String,
    default: "1px"
  },
  /**
   * 是否显示展开/收缩按钮
   */
  showCollapseButton: {
    type: Boolean
  }
}, ce = "g";
function A(e, t, n) {
  let o = e;
  return t && (o += `__${t}`), n && (o += `--${n}`), o;
}
function ee(e, t = !1) {
  const n = t ? `.${ce}-${e}` : `${ce}-${e}`;
  return {
    b: () => A(n),
    e: (a) => a ? A(n, a) : "",
    m: (a) => a ? A(n, "", a) : "",
    em: (a, c) => a && c ? A(n, a, c) : ""
  };
}
const Me = typeof window < "u", te = "G", ye = (e) => Me && "HTMLElement" in window && e instanceof HTMLElement;
for (let e = 0; e <= 15; e++)
  e.toString(16);
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function ue(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function Fe(e) {
  var t, n;
  return ue(e) === !1 ? !1 : (t = e.constructor, t === void 0 ? !0 : (n = t.prototype, !(ue(n) === !1 || n.hasOwnProperty("isPrototypeOf") === !1)));
}
function F() {
  return F = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n)
        Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, F.apply(this, arguments);
}
function ve(e, t) {
  if (e == null)
    return {};
  var n, o, i = {}, r = Object.keys(e);
  for (o = 0; o < r.length; o++)
    t.indexOf(n = r[o]) >= 0 || (i[n] = e[n]);
  return i;
}
const J = { silent: !1, logLevel: "warn" }, Le = ["validator"], xe = Object.prototype, Se = xe.toString, Ee = xe.hasOwnProperty, be = /^\s*function (\w+)/;
function de(e) {
  var t;
  const n = (t = e == null ? void 0 : e.type) !== null && t !== void 0 ? t : e;
  if (n) {
    const o = n.toString().match(be);
    return o ? o[1] : "";
  }
  return "";
}
const C = Fe, Pe = (e) => e;
let h = Pe;
process.env.NODE_ENV !== "production" && (h = typeof console < "u" ? function(t, n = J.logLevel) {
  J.silent === !1 && console[n](`[VueTypes warn]: ${t}`);
} : Pe);
const _ = (e, t) => Ee.call(e, t), Re = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, $ = Array.isArray || function(e) {
  return Se.call(e) === "[object Array]";
}, B = (e) => Se.call(e) === "[object Function]", X = (e) => C(e) && _(e, "_vueTypes_name"), Te = (e) => C(e) && (_(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t) => _(e, t)));
function ne(e, t) {
  return Object.defineProperty(e.bind(t), "__original", { value: e });
}
function j(e, t, n = !1) {
  let o, i = !0, r = "";
  o = C(e) ? e : { type: e };
  const l = X(o) ? o._vueTypes_name + " - " : "";
  if (Te(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && t === void 0)
      return i;
    $(o.type) ? (i = o.type.some((a) => j(a, t, !0) === !0), r = o.type.map((a) => de(a)).join(" or ")) : (r = de(o), i = r === "Array" ? $(t) : r === "Object" ? C(t) : r === "String" || r === "Number" || r === "Boolean" || r === "Function" ? function(a) {
      if (a == null)
        return "";
      const c = a.constructor.toString().match(be);
      return c ? c[1] : "";
    }(t) === r : t instanceof o.type);
  }
  if (!i) {
    const a = `${l}value "${t}" should be of type "${r}"`;
    return n === !1 ? (h(a), !1) : a;
  }
  if (_(o, "validator") && B(o.validator)) {
    const a = h, c = [];
    if (h = (u) => {
      c.push(u);
    }, i = o.validator(t), h = a, !i) {
      const u = (c.length > 1 ? "* " : "") + c.join(`
* `);
      return c.length = 0, n === !1 ? (h(u), i) : u;
    }
  }
  return i;
}
function x(e, t) {
  const n = Object.defineProperties(t, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get() {
    return this.required = !0, this;
  } }, def: { value(i) {
    return i === void 0 ? (_(this, "default") && delete this.default, this) : B(i) || j(this, i, !0) === !0 ? (this.default = $(i) ? () => [...i] : C(i) ? () => Object.assign({}, i) : i, this) : (h(`${this._vueTypes_name} - invalid default value: "${i}"`), this);
  } } }), { validator: o } = n;
  return B(o) && (n.validator = ne(o, n)), n;
}
function P(e, t) {
  const n = x(e, t);
  return Object.defineProperty(n, "validate", { value(o) {
    return B(this.validator) && h(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`), this.validator = ne(o, this), this;
  } });
}
function pe(e, t, n) {
  const o = function(c) {
    const u = {};
    return Object.getOwnPropertyNames(c).forEach((g) => {
      u[g] = Object.getOwnPropertyDescriptor(c, g);
    }), Object.defineProperties({}, u);
  }(t);
  if (o._vueTypes_name = e, !C(n))
    return o;
  const { validator: i } = n, r = ve(n, Le);
  if (B(i)) {
    let { validator: c } = o;
    c && (c = (a = (l = c).__original) !== null && a !== void 0 ? a : l), o.validator = ne(c ? function(u) {
      return c.call(this, u) && i.call(this, u);
    } : i, o);
  }
  var l, a;
  return Object.assign(o, r);
}
function I(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
const Ye = () => P("any", {}), Ae = () => P("function", { type: Function }), Ue = () => P("boolean", { type: Boolean }), Xe = () => P("string", { type: String }), qe = () => P("number", { type: Number }), Ie = () => P("array", { type: Array }), We = () => P("object", { type: Object }), Ve = () => x("integer", { type: Number, validator: (e) => Re(e) }), Ge = () => x("symbol", { validator: (e) => typeof e == "symbol" });
function He(e, t = "custom validation failed") {
  if (typeof e != "function")
    throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return x(e.name || "<<anonymous function>>", { type: null, validator(n) {
    const o = e(n);
    return o || h(`${this._vueTypes_name} - ${t}`), o;
  } });
}
function Ke(e) {
  if (!$(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  const t = `oneOf - value should be one of "${e.join('", "')}".`, n = e.reduce((o, i) => {
    if (i != null) {
      const r = i.constructor;
      o.indexOf(r) === -1 && o.push(r);
    }
    return o;
  }, []);
  return x("oneOf", { type: n.length > 0 ? n : void 0, validator(o) {
    const i = e.indexOf(o) !== -1;
    return i || h(t), i;
  } });
}
function Je(e) {
  if (!$(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument");
  let t = !1, n = [];
  for (let i = 0; i < e.length; i += 1) {
    const r = e[i];
    if (Te(r)) {
      if (X(r) && r._vueTypes_name === "oneOf" && r.type) {
        n = n.concat(r.type);
        continue;
      }
      if (B(r.validator) && (t = !0), r.type === !0 || !r.type) {
        h('oneOfType - invalid usage of "true" or "null" as types.');
        continue;
      }
      n = n.concat(r.type);
    } else
      n.push(r);
  }
  n = n.filter((i, r) => n.indexOf(i) === r);
  const o = n.length > 0 ? n : null;
  return x("oneOfType", t ? { type: o, validator(i) {
    const r = [], l = e.some((a) => {
      const c = j(X(a) && a._vueTypes_name === "oneOf" ? a.type || null : a, i, !0);
      return typeof c == "string" && r.push(c), c === !0;
    });
    return l || h(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:
${I(r.join(`
`))}`), l;
  } } : { type: o });
}
function Ze(e) {
  return x("arrayOf", { type: Array, validator(t) {
    let n = "";
    const o = t.every((i) => (n = j(e, i, !0), n === !0));
    return o || h(`arrayOf - value validation error:
${I(n)}`), o;
  } });
}
function Qe(e) {
  return x("instanceOf", { type: e });
}
function et(e) {
  return x("objectOf", { type: Object, validator(t) {
    let n = "";
    const o = Object.keys(t).every((i) => (n = j(e, t[i], !0), n === !0));
    return o || h(`objectOf - value validation error:
${I(n)}`), o;
  } });
}
function tt(e) {
  const t = Object.keys(e), n = t.filter((i) => {
    var r;
    return !((r = e[i]) === null || r === void 0 || !r.required);
  }), o = x("shape", { type: Object, validator(i) {
    if (!C(i))
      return !1;
    const r = Object.keys(i);
    if (n.length > 0 && n.some((l) => r.indexOf(l) === -1)) {
      const l = n.filter((a) => r.indexOf(a) === -1);
      return h(l.length === 1 ? `shape - required property "${l[0]}" is not defined.` : `shape - required properties "${l.join('", "')}" are not defined.`), !1;
    }
    return r.every((l) => {
      if (t.indexOf(l) === -1)
        return this._vueTypes_isLoose === !0 || (h(`shape - shape definition does not include a "${l}" property. Allowed keys: "${t.join('", "')}".`), !1);
      const a = j(e[l], i[l], !0);
      return typeof a == "string" && h(`shape - "${l}" property validation error:
 ${I(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 nt = ["name", "validate", "getter"], ot = /* @__PURE__ */ (() => {
  var e;
  return (e = class {
    static get any() {
      return Ye();
    }
    static get func() {
      return Ae().def(this.defaults.func);
    }
    static get bool() {
      return Ue().def(this.defaults.bool);
    }
    static get string() {
      return Xe().def(this.defaults.string);
    }
    static get number() {
      return qe().def(this.defaults.number);
    }
    static get array() {
      return Ie().def(this.defaults.array);
    }
    static get object() {
      return We().def(this.defaults.object);
    }
    static get integer() {
      return Ve().def(this.defaults.integer);
    }
    static get symbol() {
      return Ge();
    }
    static get nullable() {
      return { type: null };
    }
    static extend(t) {
      if ($(t))
        return t.forEach((c) => this.extend(c)), this;
      const { name: n, validate: o = !1, getter: i = !1 } = t, r = ve(t, nt);
      if (_(this, n))
        throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);
      const { type: l } = r;
      if (X(l))
        return delete r.type, Object.defineProperty(this, n, i ? { get: () => pe(n, l, r) } : { value(...c) {
          const u = pe(n, l, r);
          return u.validator && (u.validator = u.validator.bind(u, ...c)), u;
        } });
      let a;
      return a = i ? { get() {
        const c = Object.assign({}, r);
        return o ? P(n, c) : x(n, c);
      }, enumerable: !0 } : { value(...c) {
        const u = Object.assign({}, r);
        let g;
        return g = o ? P(n, u) : x(n, u), u.validator && (g.validator = u.validator.bind(g, ...c)), g;
      }, enumerable: !0 }, Object.defineProperty(this, n, a);
    }
  }).defaults = {}, e.sensibleDefaults = void 0, e.config = J, e.custom = He, e.oneOf = Ke, e.instanceOf = Qe, e.oneOfType = Je, e.arrayOf = Ze, e.objectOf = et, e.shape = tt, e.utils = { validate: (t, n) => j(n, t, !0) === !0, toType: (t, n, o = !1) => o ? P(t, n) : x(t, n) }, e;
})();
function ze(e = { func: () => {
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
  var t;
  return (t = class extends ot {
    static get sensibleDefaults() {
      return F({}, this.defaults);
    }
    static set sensibleDefaults(n) {
      this.defaults = n !== !1 ? F({}, n !== !0 ? n : e) : {};
    }
  }).defaults = F({}, e), t;
}
class Pt extends ze() {
}
const it = ze({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  object: void 0,
  integer: void 0
});
it.extend([
  {
    name: "style",
    getter: !0,
    type: [String, Object],
    default: void 0
  },
  {
    name: "VNodeChild",
    getter: !0,
    type: void 0
  }
]);
const rt = {
  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"
  }
}, at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: rt
}, Symbol.toStringTag, { value: "Module" })), st = {
  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: "退出全屏"
  }
}, lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: st
}, Symbol.toStringTag, { value: "Module" })), fe = /* @__PURE__ */ Object.assign({ "./lang/en.ts": at, "./lang/zh_cn.ts": lt }), we = {};
Object.keys(fe).forEach((e) => {
  const t = fe[e].default || {};
  we[e] = t;
});
const me = R("zh_cn"), ct = () => {
  const e = q({
    langMessages: we
  }), t = () => me.value.toLocaleLowerCase();
  return {
    getLang: t,
    setLang: (i) => {
      me.value = i;
    },
    getMessages: () => {
      const i = `./lang/${t()}.ts`;
      return e.langMessages[i];
    }
  };
};
function ut(e, t) {
  const n = t.split(".");
  let o = e;
  return n.forEach((i) => {
    o = o[i] ?? "";
  }), o;
}
function dt() {
  return (e) => {
    const t = ct().getMessages();
    return ut(t, e);
  };
}
const pt = /* @__PURE__ */ Z({
  name: `${te}SplitterBar`,
  components: {
    Tooltip: W
  },
  props: De,
  setup(e) {
    const t = dt(), n = ee("splitter"), o = G("splitterStore"), i = q({
      wrapperClass: `${n.e("bar")} ${n.em("bar", e.orientation)} `
    }), r = R();
    D([() => e.splitBarSize, r], ([s, m]) => {
      ye(m) && M(m, {
        flexBasis: s
      });
    }, {
      immediate: !0
    }), D([() => o == null ? void 0 : o.state.panes, r], ([, s]) => {
      !o || !e || e.index === void 0 || (o.isStaticBar(e.index) ? s && M(s, {
        flexBasis: e.disabledBarSize
      }) : i.wrapperClass += " resizable");
    }, {
      deep: !0
    });
    const l = (s, m) => {
      if (!o)
        return {};
      const b = o.getPane(s), y = o.getPane(m);
      return {
        pane: b,
        nearPane: y
      };
    }, a = (s, m, b) => {
      var z, oe, ie, re;
      const y = ((oe = (z = s == null ? void 0 : s.component) == null ? void 0 : z.props) == null ? void 0 : oe.collapsible) && b, v = (re = (ie = s == null ? void 0 : s.component) == null ? void 0 : ie.props) == null ? void 0 : re.collapsed, O = m == null ? void 0 : m.collapsed;
      return {
        [n.e("collapse")]: y,
        collapsed: v,
        hidden: O
      };
    }, c = se(() => {
      var y, v;
      if (!e || e.index === void 0)
        return {};
      const {
        pane: s,
        nearPane: m
      } = l(e.index, e.index + 1), b = ((v = (y = s == null ? void 0 : s.component) == null ? void 0 : y.props) == null ? void 0 : v.collapseDirection) !== "after" || e.index === 0;
      return a(s, m, b);
    }), u = se(() => {
      var y, v;
      if (!o || !e || e.index === void 0)
        return {};
      const {
        pane: s,
        nearPane: m
      } = l(e.index + 1, e.index), b = ((v = (y = s == null ? void 0 : s.component) == null ? void 0 : y.props) == null ? void 0 : v.collapseDirection) !== "before" || e.index + 1 === o.state.paneCount - 1;
      return a(s, m, b);
    }), g = () => {
      var y, v, O, z;
      if (!r.value || !e || e.index === void 0)
        return;
      const {
        pane: s,
        nearPane: m
      } = l(e.index, e.index + 1);
      ((v = (y = s == null ? void 0 : s.component) == null ? void 0 : y.props) == null ? void 0 : v.collapsed) || ((z = (O = m == null ? void 0 : m.component) == null ? void 0 : O.props) == null ? void 0 : z.collapsed) ? U(r.value, "none-resizable") : k(r.value, "none-resizable");
    }, S = (s) => {
      !o || !e || e.index === void 0 || (o.tooglePane(e.index, e.index + 1, s), g());
    }, p = (s) => {
      !o || !e || e.index === void 0 || (o.tooglePane(e.index + 1, e.index, s), g());
    }, f = () => {
      S(!0), p(!0);
    }, d = {
      pageX: 0,
      pageY: 0,
      originalX: 0,
      originalY: 0
    };
    let T;
    const Y = {
      enableResize: !0,
      onPressEvent: function({
        originalEvent: s
      }) {
        s.stopPropagation(), !(!o || !e || e.index === void 0) && o.isResizable(e.index) && (T = o.dragState(e.index), d.originalX = s.pageX, d.originalY = s.pageY);
      },
      onDragEvent: function({
        originalEvent: s
      }) {
        if (s.stopPropagation(), !o || !e || e.index === void 0 || !o.isResizable(e.index))
          return;
        d.pageX = s.pageX, d.pageY = s.pageY;
        let m;
        e.orientation === "vertical" ? m = d.pageY - d.originalY : m = d.pageX - d.originalX, o.setSize(T, m);
      },
      onReleaseEvent: function({
        originalEvent: s
      }) {
        if (s.stopPropagation(), !o || !e || e.index === void 0 || !o.isResizable(e.index))
          return;
        d.pageX = s.pageX, d.pageY = s.pageY;
        let m;
        e.orientation === "vertical" ? m = d.pageY - d.originalY : m = d.pageX - d.originalX, o.setSize(T, m);
      }
    };
    ge(() => {
      f();
    });
    const N = () => {
      var y, v, O, z;
      if (!e || e.index === void 0)
        return t("splitterBar.collapse");
      const {
        pane: s,
        nearPane: m
      } = l(e.index, e.index + 1), b = ((v = (y = s == null ? void 0 : s.component) == null ? void 0 : y.props) == null ? void 0 : v.collapsed) || ((z = (O = m == null ? void 0 : m.component) == null ? void 0 : O.props) == null ? void 0 : z.collapsed);
      return t(b ? "splitterBar.expand" : "splitterBar.collapse");
    };
    return () => je(w("div", {
      class: i.wrapperClass,
      ref: r
    }, [e.showCollapseButton && w(W, {
      title: N()
    }, {
      default: () => [w("div", {
        class: ["prev", c.value],
        onClick: () => {
          S();
        }
      }, null)]
    }), e.showCollapseButton && w(W, {
      title: N()
    }, {
      default: () => [w("div", {
        class: ["next", u.value],
        onClick: () => p()
      }, null)]
    })]), [[ke, Y]]);
  }
});
class ft {
  constructor() {
    ae(this, "state");
    this.state = q({
      panes: [],
      splitterContainerSize: 0,
      paneCount: 0
    });
  }
  // 配置 pane 信息，panes 列表，方便后续计算使用
  setPanes({ panes: t }) {
    this.state.panes = t.map((n, o) => {
      var i;
      return n.component && (n.component.exposed.order.value = o * 2), n.getPaneSize = (i = n == null ? void 0 : n.component) == null ? void 0 : i.exposed.getPaneSize, n;
    }), this.state.paneCount = t.length;
  }
  setSplitter({ containerSize: t }) {
    this.state.splitterContainerSize = t;
  }
  //  获取 pane，防止没有初始化的时候调用内部方法取值
  getPane(t) {
    if (!this.state.panes || t < 0 || t >= this.state.panes.length)
      throw new Error("no pane can return.");
    return this.state.panes[t];
  }
  // 按下的时候计算 pane 的 size 信息
  dragState(t) {
    const n = this.getPane(t), o = this.getPane(t + 1), i = n.getPaneSize() + o.getPaneSize();
    return {
      prev: {
        index: t,
        initialSize: n.getPaneSize(),
        // 设置有最小值，直接取值，如果没有设置就用两个 pane 总和减去相邻 pane 的最大值，都没设置（NaN）再取0
        minSize: this.toPixels(n.component.props.minSize) || i - this.toPixels(o.component.props.maxSize) || 0,
        // 设置最大值，直接取值，如果没有设置就用两个 pane 总和减去相邻 pane 的最小值，都没设置（NaN）再取两个 pane 总和
        maxSize: this.toPixels(n.component.props.maxSize) || i - this.toPixels(o.component.props.minSize) || i
      },
      next: {
        index: t + 1,
        initialSize: o.getPaneSize(),
        minSize: this.toPixels(o.component.props.minSize) || i - this.toPixels(n.component.props.maxSize) || 0,
        maxSize: this.toPixels(o.component.props.maxSize) || i - this.toPixels(n.component.props.minSize) || i
      }
    };
  }
  // 大小限制函数，（max）小于最小值时取最小值，（min）大于最大值时取最大值
  clamp(t, n, o) {
    return Math.min(n, Math.max(t, o));
  }
  // resize pane的大小
  resize(t, n) {
    const o = this.getPane(t.index), i = this.state.splitterContainerSize, r = this.clamp(
      t.minSize,
      t.maxSize,
      t.initialSize + n
    );
    let l = "";
    this.isPercent(o.component.props.size) ? l = r / i * 100 + "%" : l = r + "px", o.component.props.size = l, o.component.emit("sizeChange", l);
  }
  // 判断 pane 是否可以调整大小，只要有一边设置了不可调整或者收起，相邻 pane 调整就失效
  isResizable(t) {
    var r, l, a, c, u, g, S, p;
    const n = this.getPane(t), o = this.getPane(t + 1), i = ((l = (r = n == null ? void 0 : n.component) == null ? void 0 : r.props) == null ? void 0 : l.collapsed) || ((c = (a = o == null ? void 0 : o.component) == null ? void 0 : a.props) == null ? void 0 : c.collapsed);
    return ((g = (u = n == null ? void 0 : n.component) == null ? void 0 : u.props) == null ? void 0 : g.resizable) && ((p = (S = o == null ? void 0 : o.component) == null ? void 0 : S.props) == null ? void 0 : p.resizable) && !i;
  }
  // 判断分割条是否是固定的，只要有一边不能调整, 就是禁用状态固定 bar
  isStaticBar(t) {
    var i, r, l, a;
    const n = this.getPane(t), o = this.getPane(t + 1);
    return !((r = (i = n == null ? void 0 : n.component) == null ? void 0 : i.props) != null && r.resizable && ((a = (l = o == null ? void 0 : o.component) == null ? void 0 : l.props) != null && a.resizable));
  }
  // 判断是不是百分比设置宽度
  isPercent(t) {
    return /%$/.test(t);
  }
  // 计算时把百分比转换为像素
  toPixels(t) {
    let n = parseFloat(t);
    return this.isPercent(t) && (n = this.state.splitterContainerSize * n / 100), n;
  }
  // 切换 pane 展开，收起
  tooglePane(t, n, o) {
    var l, a, c, u, g, S, p, f, d, T, Y, N, s;
    const i = this.getPane(t), r = this.getPane(n);
    (a = (l = i == null ? void 0 : i.component) == null ? void 0 : l.props) != null && a.collapsible && (i.component.props.collapsed = o ? (u = (c = i == null ? void 0 : i.component) == null ? void 0 : c.props) == null ? void 0 : u.collapsed : !((S = (g = i == null ? void 0 : i.component) == null ? void 0 : g.props) != null && S.collapsed), (T = (p = r == null ? void 0 : r.component) == null ? void 0 : p.exposed) == null || T.toggleNearPaneFlexGrow(
      (d = (f = i == null ? void 0 : i.component) == null ? void 0 : f.props) == null ? void 0 : d.collapsed
    ), (s = i == null ? void 0 : i.component) == null || s.emit(
      "collapsedChange",
      (N = (Y = i == null ? void 0 : i.component) == null ? void 0 : Y.props) == null ? void 0 : N.collapsed
    ));
  }
  // 设置 pane 大小
  setSize(t, n) {
    const o = this.getPane(t.prev.index), i = this.getPane(t.next.index);
    o.component.props.size && i.component.props.size ? (this.resize(t.prev, n), this.resize(t.next, -n)) : i.component.props.size ? this.resize(t.next, -n) : this.resize(t.prev, n);
  }
}
const mt = {
  /**
   * 可选，指定 Splitter 分割方向,可选值'vertical'|'horizontal'
   */
  orientation: {
    type: String,
    default: "horizontal"
  },
  /**
   * 可选，分隔条大小，默认 2px
   */
  splitBarSize: {
    type: String,
    default: "2px"
  },
  /**
   * 可选，pane 设置不可调整宽度时生效
   */
  disabledBarSize: {
    type: String,
    default: "1px"
  },
  /**
   * 是否显示展开/收缩按钮
   */
  showCollapseButton: {
    type: Boolean,
    default: !0
  }
};
const L = /* @__PURE__ */ Z({
  name: `${te}Splitter`,
  components: {
    GSplitterBar: pt
  },
  props: mt,
  emits: [],
  setup(e, t) {
    var a, c;
    const n = new ft(), o = q({
      panes: []
      // 内嵌面板
    }), i = ee("splitter");
    o.panes = ((c = (a = t.slots).DSplitterPane) == null ? void 0 : c.call(a)) || [], n.setPanes({
      panes: o.panes
    }), le("orientation", e.orientation), le("splitterStore", n);
    const r = R();
    return Be(r, () => {
      if (!r.value)
        return;
      let u = 0;
      e.orientation === "vertical" ? u = r.value.clientHeight : u = r.value.clientWidth, n.setSplitter({
        containerSize: u
      });
    }), () => {
      const {
        splitBarSize: u,
        orientation: g,
        showCollapseButton: S
      } = e, p = [i.b(), i.m(g)];
      return w("div", {
        class: p,
        ref: r
      }, [o.panes, o.panes.filter((f, d, T) => d !== T.length - 1).map((f, d) => w(_e("g-splitter-bar"), {
        key: d,
        style: `order: ${d * 2 + 1}`,
        splitBarSize: u,
        orientation: g,
        index: d,
        showCollapseButton: S
      }, null))]);
    };
  }
}), gt = {
  /**
   * 可选，指定 pane 宽度，设置像素值或者百分比
   * pane初始化大小
   */
  size: {
    type: String
  },
  /**
   * 可选，指定 pane 最小宽度，设置像素值或者百分比
   */
  minSize: {
    type: String
  },
  /**
   * 可选，指定 pane 最大宽度，设置像素值或者百分比
   */
  maxSize: {
    type: String
  },
  /**
   * 可选，指定 pane 是否可调整大小，会影响相邻 pane
   */
  resizable: {
    type: Boolean,
    default: !0
  },
  /**
   * 可选，指定 pane 是否可折叠收起
   */
  collapsible: {
    type: Boolean,
    default: !1
  },
  /**
   * 可选，指定 pane 初始化是否收起，配合 collapsible 使用
   */
  collapsed: {
    type: Boolean,
    default: !1
  },
  /**
   * 非边缘面板折叠方向，before 只生成向前折叠的按钮，after 生成向后折叠按钮，both 生成两个
   */
  collapseDirection: {
    type: String,
    default: "both"
  },
  /**
   * 可选，是否在 pane 进行折叠后收缩 pane 宽度而非收起
   */
  shrink: {
    type: Boolean,
    default: !1
  },
  /**
   * 可选，折叠后收缩的 pane 宽度 （单位：px）
   */
  shrinkWidth: {
    type: Number,
    default: 36
  }
};
const E = /* @__PURE__ */ Z({
  name: `${te}SplitterPane`,
  props: gt,
  emits: ["sizeChange", "collapsedChange"],
  setup(e, {
    slots: t,
    expose: n
  }) {
    const o = G("splitterStore"), i = R(), r = R(), l = ee("splitter");
    D([r, i], ([p, f]) => {
      f && M(f, {
        order: p
      });
    });
    const a = (p, f) => {
      if (!f)
        return;
      f.style.flexBasis = p;
      const d = l.em("pane", "fixed");
      p ? U(f, d) : k(f, d);
    };
    D([() => e.size, i], ([p, f]) => {
      p && f && a(p, f);
    }, {
      immediate: !0
    });
    const c = G("orientation");
    let u = "";
    ge(() => {
      e.size && (u = e.size), o && o.setPanes({
        panes: o.state.panes
      });
    }), $e(() => {
      o && o.setPanes({
        panes: o.state.panes
      });
    });
    const g = () => {
      const p = i.value;
      return p ? c === "vertical" ? p.offsetHeight : p.offsetWidth : 0;
    };
    return D([() => e.collapsed, i], ([p, f]) => {
      if (!f)
        return;
      const d = l.em("pane", "hidden");
      p ? U(f, d) : k(f, d), p && e.shrink ? (k(f, d), M(f, {
        flexBasis: `${e.shrinkWidth}px`
      })) : M(f, {
        flexBasis: u
      });
    }, {
      immediate: !0
    }), n({
      order: r,
      getPaneSize: g,
      toggleNearPaneFlexGrow: (p) => {
        const f = i.value;
        if (!ye(f))
          return;
        const d = l.em("pane", "grow");
        Q(f, d) ? k(f, d) : p && U(f, d);
      }
    }), () => {
      var p;
      return w("div", {
        class: l.e("pane"),
        ref: i
      }, [(p = t.default) == null ? void 0 : p.call(t)]);
    };
  }
});
L.install = function(e, t) {
  e.component(t || L.name, L);
};
E.install = function(e, t) {
  e.component(t || E.name, E);
};
const Tt = {
  title: "Splitter 分割器",
  category: "布局",
  status: "100%",
  install(e) {
    e.component(L.name, L), e.component(E.name, E);
  }
};
export {
  L as Splitter,
  E as SplitterPane,
  Tt as default,
  mt as splitterProps
};
