var de = Object.defineProperty;
var ue = (s, t, a) => t in s ? de(s, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : s[t] = a;
var E = (s, t, a) => (ue(s, typeof t != "symbol" ? t + "" : t, a), a);
import { EditFormModel as me, FormMDCtrlModel as pe, DefectModelError as he, AppEntityModel as H } from "@ibiz-template/model";
import { useNamespace as B, useControlController as fe, usePropsWatch as ve, getDatePickerProps as ye, getEditorEmits as G, useController as ge, getDataPickerProps as se, useViewController as we } from "@ibiz-template/vue-util";
import { defineComponent as M, getCurrentInstance as W, ref as C, watch as V, h as r, onMounted as De, computed as j } from "vue";
import { createUUID as te } from "qx-util";
import { ViewMode as ae, PluginStaticResource as Ee, OpenAppViewCommand as q, UIActionHandler as Ce, FrontUIActionHandler as re } from "@ibiz-template/runtime";
import { EditFormController as be, FormMDCtrlController as Pe, FormDRUIPartController as Ae, EditViewController as Ie, DatePickerEditorController as Fe, UploadEditorController as Se, PickerEditorController as oe } from "@ibiz-template/controller";
import { ControlVO as ke, calcResPath as K } from "@ibiz-template/service";
import $ from "dayjs";
import { RuntimeError as xe, StringUtil as ne } from "@ibiz-template/core";
class Ne extends be {
  constructor() {
    super(...arguments);
    /**
     *   基础数据
     *
     * @author fangZhiHao
     * @date 2024-04-26 17:04:49
     * @type {IData}
     */
    E(this, "baseResData", []);
    /**
     *   对比数据
     *
     * @author fangZhiHao
     * @date 2024-04-26 17:04:49
     * @type {IData}
     */
    E(this, "compareResData", []);
    /**
     * 表单旧数据
     *
     * @author zk
     * @date 2023-12-20 11:12:43
     * @protected
     * @type {IData}
     * @memberof FormController
     */
    E(this, "oldData", new ke());
    /**
     * version数据
     *
     * @author fangZhiHao
     * @date 2024-04-26 16:04:37
     * @type {IData[]}
     */
    E(this, "versionData", []);
    /**
     *  对比数据
     *
     * @author fangZhiHao
     * @date 2024-04-26 16:04:37
     * @type {IData[]}
     */
    E(this, "comparisonArr", {});
    /**
     *  基础表格数据
     *
     * @author fangZhiHao
     * @date 2024-05-06 11:05:57
     * @type {IData[]}
     */
    E(this, "gridData", []);
    /**
     *  展示完全数据
     *
     * @author fangZhiHao
     * @date 2024-05-06 11:05:04
     * @type {IData[]}
     */
    E(this, "AllGridData", []);
    /**
     *  去除相同数据
     *
     * @author fangZhiHao
     * @date 2024-05-06 11:05:15
     * @type {IData[]}
     */
    E(this, "removeSameGridData", []);
    /**
     *  关系界面数据
     *
     * @author fangZhiHao
     * @date 2024-04-30 10:04:33
     * @type {IData}
     */
    E(this, "AlldruipartData", /* @__PURE__ */ new Map());
    /**
     *  关系界面数据长度
     *
     * @author fangZhiHao
     * @date 2024-05-06 11:05:56
     * @type {number}
     */
    E(this, "druipartDataSize", 0);
    /**
     *   关系界面实际数据
     *
     * @author fangZhiHao
     * @date 2024-05-06 11:05:13
     * @type {IData}
     */
    E(this, "newDruipartData", {});
  }
  /**
   * 加载数据
   *
   * @return {*}  {Promise<ControlVO>}
   * @memberof FormDataComparisonController
   */
  async loadGridData() {
    await this.startLoading();
    const a = this.model.source.M.getPSControlParam.ctrlParams, { BASEENTITY: e, COMPAREENTITY: i } = a, n = await ibiz.entityService.getService(e), c = await ibiz.entityService.getService(i), v = Object.assign({}, this.context.clone(), {
      [e.toLowerCase()]: this.params.base_version
    }), p = Object.assign({}, this.context.clone(), {
      [i.toLowerCase()]: this.params.compare_version
    }), h = await n.exec("Get", v, this.params), g = await c.exec(
      "Get",
      p,
      this.params
    );
    return this.isLoaded = !0, {
      baseData: h.data.data,
      compareData: g.data.data
    };
  }
  /**
   * 判断值是否为空
   *
   * @param {(string | IData[] | null | undefined)} value
   * @return {*}
   * @memberof FormDataComparisonController
   */
  isFalseyButNotEmpty(a) {
    return a == null || typeof a == "string" && a === "" || Array.isArray(a) && a.length === 0 || typeof a == "object" && Object.keys(a).length === 0;
  }
  /**
   * 比较两个值
   *
   * @param {IData} objA
   * @param {IData} objB
   * @return {*}
   * @memberof FormDataComparisonController
   */
  compareObjectValues(a, e) {
    return JSON.stringify(a) !== JSON.stringify(e);
  }
}
const Oe = M({
  name: "IBizFormDataComparison",
  props: {
    modelData: {
      type: me,
      required: !0
    },
    context: {
      type: Object,
      required: !0
    },
    params: {
      type: Object,
      default: () => ({})
    },
    enableAutoSave: {
      type: Boolean,
      required: !1
    }
  },
  setup(s) {
    const t = B("form-data-comparison"), {
      proxy: a
    } = W(), e = fe(a, () => {
      const o = new Ne(s.modelData, s.context, s.params);
      return ve(a, "enableAutoSave", o.setEnableAutoSave.bind(o)), o;
    }), i = C(!0), n = C(!1), c = C({}), v = C({}), p = C([]), h = [], g = C([]), l = C([]), y = C([]), f = /* @__PURE__ */ new Map(), u = C(0), m = (o) => {
      const d = [];
      if (d.push(o), o && o.children) {
        const A = [];
        o.children.forEach((I) => {
          const O = m(I);
          A.push(...O);
        }), d.push(...A);
      }
      return d;
    }, D = m(s.modelData);
    h.push(...D);
    const P = (o) => {
      const d = e.details[o.source.name], A = r("not-supported-editor", {
        attrs: {
          modelData: o.editor
        }
      });
      return r("div", {
        class: [t.e("form-grid-item"), t.is("add", g.value.includes(o.source.name)), t.is("update", y.value.includes(o.source.name)), t.is("delete", l.value.includes(o.source.name))]
      }, [r("div", {
        class: t.em("form-grid-item", "name")
      }, [o.source.caption]), r("div", {
        class: t.em("form-grid-item", "left")
      }, [d.editorProvider ? r(d.editorProvider.formEditor, {
        props: {
          value: v.value[o.source.name],
          data: d.data,
          controller: d.editor,
          disabled: d.disabled,
          readonly: !0
        }
      }) : A]), r("div", {
        class: t.em("form-grid-item", "right")
      }, [d.editorProvider ? r(d.editorProvider.formEditor, {
        props: {
          value: c.value[o.source.name],
          data: d.data,
          controller: d.editor,
          disabled: d.disabled,
          readonly: !0
        }
      }) : A])]);
    }, k = (o, d) => {
      f.set(o.source.id, d), d.evt.on("mounted", () => {
        i.value && e.startLoading(), u.value += 1, d.call.refresh();
      }), d.evt.on("refreshed", () => {
        u.value -= 1, setTimeout(() => {
          i.value && e.endLoading();
        }, 500);
      });
    }, w = (o) => {
      const d = h.find((L) => L.id === `${o.source.id}_srfcopy`), A = o.embedView.source.modelPath, I = d == null ? void 0 : d.embedView.source.modelPath, O = e.context.clone(), N = {
        base_version: s.params.base_version
      }, T = e.context.clone();
      Object.assign(T, {
        gysrlzy_info: s.params.compare_version,
        compare_version: s.params.compare_version
      });
      const _ = {
        compare_version: s.params.compare_version
      }, R = c.value[o.source.userTag], U = v.value[d == null ? void 0 : d.source.userTag];
      let J = !1, z = !1, X = !1;
      if (o.source.userTag2) {
        const L = JSON.parse(o.source.userTag2), {
          comparekey: Z,
          comparelist: ce
        } = L;
        R && U && Array.isArray(R) && Array.isArray(U) && (R.length === 0 && U.length !== 0 ? X = !0 : R.length !== 0 && U.length === 0 ? J = !0 : R.length !== 0 && U.length !== 0 && (R.length !== U.length ? z = !0 : R.some((Q) => {
          const ee = U.find((Y) => Q[Z] === Y[Z]);
          return ee ? ce.some((Y) => Q[Y] !== ee[Y] ? (z = !0, !0) : !1) : (z = !0, !0);
        })));
      }
      return r("div", {
        class: [t.e("druipart"), t.is("add", J), t.is("update", z), t.is("delete", X)]
      }, [r("div", {
        class: t.em("druipart", "caption")
      }, [o.source.caption]), r("div", {
        class: t.em("druipart", "left")
      }, [I && r("ViewShell", {
        attrs: {
          context: T,
          params: _,
          modal: {
            mode: ae.EMBED
          },
          modelPath: I,
          noLoadDefault: !0,
          name: d == null ? void 0 : d.source.id
        },
        key: te(),
        on: {
          neuronInit: (L) => k(d, L)
        }
      })]), r("div", {
        class: t.em("druipart", "right")
      }, [A && r("ViewShell", {
        attrs: {
          context: O,
          params: N,
          modal: {
            mode: ae.EMBED
          },
          modelPath: A,
          noLoadDefault: !0,
          name: o.source.id
        },
        key: te(),
        on: {
          neuronInit: (L) => k(o, L)
        }
      })])]);
    }, b = (o) => {
      const d = {
        modelData: o,
        controller: e.details[o.source.name]
      }, A = e.providers[o.source.name], I = r(A.component, {
        props: {
          ...d
        },
        key: o.id
      }), O = r(A.component, {
        props: {
          ...d
        },
        key: `compare_${o.id}`
      });
      return r("div", {
        class: t.e("mdctrl")
      }, [r("div", {
        class: t.em("mdctrl", "caption")
      }, [o.source.caption]), r("div", {
        class: t.em("mdctrl", "left")
      }, [I]), r("div", {
        class: t.em("mdctrl", "right")
      }, [O])]);
    }, F = (o) => {
      i.value = !1;
      const d = p.value.findIndex((A) => A === o.source.name);
      d > -1 ? p.value.splice(d, 1) : p.value.push(o.source.name);
    }, x = (o) => {
      if (!o.source.hidden) {
        if (o.source.detailType === "FORMPAGE")
          return r("div", {
            class: t.e("form-page")
          }, [o.children.map((d) => x(d))]);
        if (o.source.detailType === "FORMITEM") {
          const d = g.value.includes(o.source.name), A = l.value.includes(o.source.name), I = y.value.includes(o.source.name);
          return n.value && !d && !A && !I ? null : P(o);
        }
        if (o.source.detailType === "GROUPPANEL") {
          const d = p.value.includes(o.source.name);
          return r("div", {
            class: t.b("group")
          }, [r("div", {
            class: [t.be("group", "header"), t.is("hide-caption", !o.source.showCaption)]
          }, [r("div", {
            class: t.bem("group", "header", "name")
          }, [d ? r("i-icon", {
            class: t.bem("group", "header", "icon"),
            attrs: {
              type: "ios-arrow-forward",
              title: "展开"
            },
            on: {
              click: () => F(o)
            }
          }) : r("i-icon", {
            class: t.bem("group", "header", "icon"),
            attrs: {
              type: "ios-arrow-down",
              title: "收缩"
            },
            on: {
              click: () => F(o)
            }
          }), r("span", {
            class: t.bem("group", "header", "name-text")
          }, [o.source.caption || o.source.title])]), r("div", ["---"]), r("div", ["---"])]), r("div", {
            class: [t.be("group", "content"), t.is("collapse", d)]
          }, [o.children.map((A) => x(A))])]);
        }
        return o.source.detailType === "DRUIPART" && !o.source.name.endsWith("_srfcopy") ? w(o) : o.source.detailType === "MDCTRL" ? b(o) : null;
      }
    }, S = (o, d) => {
      const A = [], I = [], O = [];
      return Object.keys(d).forEach((N) => {
        const T = o[N], _ = d[N];
        e.isFalseyButNotEmpty(T) && !e.isFalseyButNotEmpty(_) && A.push(N), !e.isFalseyButNotEmpty(T) && !e.isFalseyButNotEmpty(_) && e.compareObjectValues(T, _) && I.push(N);
      }), Object.keys(o).forEach((N) => {
        if (!Object.prototype.hasOwnProperty.call(d, N) || e.isFalseyButNotEmpty(d[N])) {
          const T = o[N];
          e.isFalseyButNotEmpty(T) || O.push(N);
        }
      }), {
        added: A,
        modified: I,
        deleted: O
      };
    };
    return V(() => s.params, async () => {
      const o = await e.loadGridData();
      c.value = o.baseData, v.value = o.compareData;
      const {
        added: d,
        modified: A,
        deleted: I
      } = S(v.value, c.value);
      g.value = d, y.value = A, l.value = I;
    }, {
      immediate: !0
    }), {
      ns: t,
      c: e,
      switchValue: n,
      druipartNum: u,
      renderEditor: P,
      renderByDetailType: x
    };
  },
  render() {
    return this.c.complete ? r("control-layout", {
      attrs: {
        modelData: this.c.model
      }
    }, [r("div", {
      class: this.ns.b()
    }, [r("div", {
      class: this.ns.e("top")
    }, [r("div", {
      class: this.ns.e("top-hidesame-content")
    }, [r("div", {
      class: this.ns.e("top-hidesame-content-left")
    }, ["隐藏相同项 ", r("i-switch", {
      model: {
        value: this.switchValue,
        callback: (s) => {
          this.switchValue = s;
        }
      }
    })]), r("div", {
      class: this.ns.e("top-hidesame-content-right")
    }, [r("div", {
      class: this.ns.e("top-hidesame-content-right-item")
    }, ["新增", r("div", {
      class: this.ns.e("top-hidesame-content-right-item-add")
    })]), r("div", {
      class: this.ns.e("top-hidesame-content-right-item")
    }, ["修改", r("div", {
      class: this.ns.e("top-hidesame-content-right-item-change")
    })]), r("div", {
      class: this.ns.e("top-hidesame-content-right-item")
    }, ["删除", r("div", {
      class: this.ns.e("top-hidesame-content-right-item-delete")
    })])])]), r("div", {
      class: this.ns.e("top-content")
    }, [r("div", {
      class: this.ns.em("top-content", "attr")
    }, ["信息项"]), r("div", {
      class: [this.ns.em("top-content", "left")]
    }, ["更新前内容"]), r("div", {
      class: [this.ns.em("top-content", "right")]
    }, ["更新后内容"])])]), r("div", {
      class: this.ns.e("content")
    }, [this.modelData.children.map((s) => this.renderByDetailType(s))])])]) : null;
  }
});
const Te = M({
  name: "CustomDataImport",
  props: {
    templateUrl: {
      type: String,
      required: !0
    },
    importUrl: {
      type: String,
      required: !0
    },
    dismiss: {
      type: Function
    }
  },
  setup(s, {
    emit: t
  }) {
    const a = B("data-import"), e = C(), i = C({
      state: "ready",
      message: "",
      rowError: []
    }), n = C(""), c = async (l) => {
      const y = new FormData(), f = $(n.value).format("YYYY-MM");
      y.append("file", l), y.append("ny", f);
      try {
        const u = await ibiz.net.request(s.importUrl, {
          method: "post",
          data: y,
          headers: {
            "Content-Type": "multipart/form-data"
          }
        });
        i.value.state = "success", i.value.message = "导入成功";
        const {
          errorinfo: m,
          success: D,
          total: P
        } = u.data, k = P ? Number(P) : 0, w = D ? Number(D) : 0, b = P - D;
        i.value.message = `共计导入数据 ${k} 条，错误[${b}]，成功[${w}]`, m && Object.keys(m).length > 0 && (i.value.rowError = [], Object.keys(m).forEach((F) => {
          i.value.rowError.push({
            index: Number(F) + 1,
            info: m[F].errorInfo
          });
        }));
      } catch (u) {
        i.value.state = "fail", i.value.message = `导入失败！${u.message}`;
      }
    }, v = (l) => {
      const y = l.target;
      if (!y.files)
        return;
      const f = y.files[0];
      y.value = null, c(f);
    }, p = async () => {
      var y;
      const l = await ibiz.net.request(s.templateUrl, {
        responseType: "blob"
      });
      if (l.status === 200) {
        let f = ((y = l.headers["content-disposition"].split(";").find((D) => D.indexOf("filename=") !== -1)) == null ? void 0 : y.slice(9)) || "";
        f = decodeURIComponent(f);
        const u = new Blob([l.data], {
          type: "application/vnd.ms-excel"
        }), m = document.createElement("a");
        m.download = f, m.style.display = "none", m.href = URL.createObjectURL(u), document.body.appendChild(m), m.click(), URL.revokeObjectURL(m.href), document.body.removeChild(m);
      }
    }, h = () => {
      e.value.click();
    }, g = () => {
      var l;
      t("close", {
        ok: !1,
        data: {}
      }), (l = s.dismiss) == null || l.call(s, {
        ok: !1,
        data: {}
      });
    };
    return De(() => {
      n.value = $().format("YYYY年MM月");
    }), {
      ns: a,
      curDate: n,
      onLinkClick: p,
      selectFile: h,
      onCancelButtonClick: g,
      onFileChange: v,
      inputUpLoad: e,
      message: i
    };
  },
  render() {
    return r("div", {
      class: [this.ns.b(), this.ns.is("custom", !0)]
    }, [r("input", {
      ref: "inputUpLoad",
      attrs: {
        type: "file",
        accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
      },
      style: "display: none",
      on: {
        change: this.onFileChange
      }
    }), r("div", {
      class: this.ns.e("caption")
    }, ["导入数据"]), r("div", {
      class: this.ns.e("date")
    }, [r("span", ["导入数据所属月份"]), r("i-datePicker", {
      attrs: {
        format: "yyyy年MM月",
        type: "month",
        clearable: !1
      },
      model: {
        value: this.curDate,
        callback: (s) => {
          this.curDate = s;
        }
      }
    })]), this.message.state === "ready" ? r("div", {
      class: this.ns.b("upload"),
      on: {
        click: this.selectFile
      }
    }, [r("img", {
      class: this.ns.be("upload", "img"),
      attrs: {
        src: "./assets/img/icon-import.svg"
      }
    }), r("span", {
      class: this.ns.be("upload", "text")
    }, ["单击此区域进行上传"])]) : r("div", {
      class: this.ns.b("message")
    }, [r("div", {
      class: this.ns.be("message", "title")
    }, ["导入结果"]), r("div", {
      class: this.ns.be("message", "content")
    }, [this.message.message]), this.message.rowError.length > 0 && [r("div", {
      class: this.ns.be("message", "title")
    }, ["错误信息"]), r("div", {
      class: this.ns.be("message", "content")
    }, [this.message.rowError.map((s) => r("div", [`第 ${s.index} 行：${s.info}`]))])]]), r("div", {
      class: this.ns.e("template-container")
    }, [r("div", {
      class: this.ns.e("template-description")
    }, ["下载导入模版，并按要求填写："]), r("div", {
      class: this.ns.e("template-link"),
      on: {
        click: this.onLinkClick
      }
    }, [r("i-icon", {
      attrs: {
        type: "ios-link"
      }
    }), "数据导入模板文件"])]), r("div", {
      class: this.ns.e("button-bar")
    }, [this.message.state !== "ready" && r("i-button", {
      on: {
        click: this.selectFile
      }
    }, ["重新上传"])])]);
  }
});
const Me = M({
  name: "YearMonthPicker",
  props: ye(),
  emits: G(),
  setup(s, {
    emit: t
  }) {
    const a = B("date-picker"), e = s.controller, i = e.model, n = C("date"), c = C("yyyy-MM-dd"), v = C(!1);
    switch (i.editorType) {
      case "DATEPICKEREX":
      case "DATEPICKEREX_NOTIME":
        n.value = "date";
        break;
      case "DATEPICKEREX_NODAY":
      case "DATEPICKEREX_NODAY_NOSECOND":
        v.value = !0, n.value = "time";
        break;
      case "DATEPICKEREX_HOUR":
      case "DATEPICKEREX_MINUTE":
      case "DATEPICKEREX_SECOND":
      case "DATEPICKEREX_NOSECOND":
      case "DATEPICKER":
      default:
        n.value = "datetime";
    }
    const p = e.valueFormat;
    if (p) {
      p === "YYYY-MM" ? n.value = "month" : p === "YYYY" && (n.value = "year");
      const f = p.replace("YYYY", "yyyy").replace("DD", "dd");
      c.value = f;
    }
    i.editorParams.formatText && (c.value = i.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd"));
    const h = C();
    V(() => s.value, (f, u) => {
      f && f !== u && (h.value = $(f).format(p));
    }, {
      immediate: !0
    });
    const g = (f, u) => {
      if (f) {
        const m = $(f.replace(/[年月]/g, "-")).format(p);
        t("change", m);
      } else
        t("change", f);
    }, l = (f) => {
      t("operate", f);
    }, y = C();
    return s.autoFocus && V(y, (f) => {
      f && f.$el.getElementsByTagName("input")[0].click();
    }), {
      ns: a,
      c: e,
      editorModel: i,
      type: n,
      format: c,
      formatValue: h,
      handleChange: g,
      onOpenChange: l,
      inputRef: y,
      isTimePicker: v
    };
  },
  render(s) {
    return s("div", {
      class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""]
    }, [[this.readonly && this.formatValue, !this.readonly && this.isTimePicker && s("ITimePicker", {
      ref: "inputRef",
      props: {
        ...this.c.customProps,
        value: this.value,
        type: this.type,
        format: this.format,
        placeholder: this.c.placeHolder,
        disabled: this.disabled,
        transfer: !0
      },
      on: {
        "on-change": this.handleChange,
        "on-open-change": this.onOpenChange
      }
    }), !this.readonly && !this.isTimePicker && s("ICalendarPicker", {
      ref: "inputRef",
      props: {
        ...this.c.customProps,
        value: this.value,
        type: this.type,
        format: this.format,
        placeholder: this.c.placeHolder,
        disabled: this.disabled,
        transfer: !0
      },
      on: {
        "on-change": this.handleChange,
        "on-open-change": this.onOpenChange
      }
    })]]);
  }
});
const ie = new Ee(import.meta.url), Re = M({
  name: "DownLoadSafeFile",
  props: {},
  setup() {
    const s = B("download-safe-file"), t = ie.dir("/assets/doc/safe-file.doc");
    return {
      ns: s,
      url: t
    };
  },
  render() {
    return r("div", {
      class: this.ns.b()
    }, [r("a", {
      attrs: {
        download: "网络信息安全承诺书.doc",
        href: this.url
      }
    }, ["网络信息安全承诺书.doc"])]);
  }
});
class le extends Pe {
  constructor() {
    super(...arguments);
    /**
     * 激活的分页下标
     *
     * @type {number}
     * @memberof FormMDCtrlFormStyle2Controller
     */
    E(this, "active", 0);
  }
  connect(a, e) {
    this.formNeurons.get(a) || (this.formNeurons.set(a, e), e.evt.on("mounted", () => {
      e.call.load();
    }), e.evt.on("destroyed", () => {
      this.formNeurons.delete(a);
    }), e.evt.on("valueChange", (i) => {
      if (i) {
        const n = this.contentCtrlData.find((c) => c.srfkey === i.srfkey);
        n && Object.assign(n, i), this.force();
      }
    }));
  }
  /**
   * 校验
   *
   * @return {*}  {Promise<boolean>}
   * @memberof FormMDCtrlFormStyle2Controller
   */
  async validate() {
    const a = [];
    this.formNeurons.forEach((n, c) => {
      const v = n.call.getFormController();
      a.push({ key: c, controller: v });
    });
    let e = "";
    const i = await Promise.all(
      a.map(async (n) => {
        const c = await n.controller.validate();
        return !e && !c && (e = n.key), c;
      })
    );
    if (e) {
      const n = this.contentCtrlData.findIndex((c) => c.srfkey === e);
      n > -1 && (this.active = n);
    }
    return i.findIndex((n) => !n) === -1;
  }
  /**
   * 静默校验
   *
   * @return {*}  {Promise<boolean>}
   * @memberof FormMDCtrlFormStyle2Controller
   */
  async silentValidate() {
    const a = [];
    this.formNeurons.forEach((n, c) => {
      const v = n.call.getFormController();
      a.push({ key: c, controller: v });
    });
    let e = "";
    const i = await Promise.all(
      a.map(async (n) => {
        const c = await n.controller.silentValidate();
        return !e && !c && (e = n.key), c;
      })
    );
    if (e) {
      const n = this.contentCtrlData.findIndex((c) => c.srfkey === e);
      n > -1 && (this.active = n);
    }
    return i.findIndex((n) => !n) === -1;
  }
}
const Ue = M({
  name: "FormMDCtrlFormStyle2",
  props: {
    controller: {
      type: le,
      required: !0
    },
    modelData: {
      type: pe,
      required: !0
    }
  },
  setup(s) {
    const t = B("form-mdctrl-form-style2"), a = s.controller, {
      proxy: e
    } = W();
    ge(e, s.controller);
    const i = async (h, g, l) => {
      l.stopPropagation(), l.preventDefault();
      const y = a.contentCtrlData.length;
      await a.handleRemove(h, g), y !== a.contentCtrlData.length && g <= a.active && a.active !== 0 && (a.active -= 1);
    }, n = (h) => {
      a.active = h, a.force();
    }, c = async () => {
      const h = JSON.parse(JSON.stringify(a.contentCtrlData)).length;
      await a.handleAdd(), h < a.contentCtrlData.length && (a.active = a.contentCtrlData.length - 1);
    }, v = () => {
      const h = s.modelData.source.userTag;
      let g = {};
      h && (g = JSON.parse(h));
      const {
        tabtitle: l,
        addtitle: y
      } = g;
      return r("div", {
        class: t.e("header")
      }, [a.contentCtrlData.map((f, u) => {
        let m = `新建${u + 1}`;
        return f.srfmajortext ? m = f.srfmajortext : l && f[l] ? m = f[l] : y && (m = `${y}${u + 1}`), r("div", {
          class: [t.e("header-item"), t.is("actived", u === a.active)],
          on: {
            click: () => n(u)
          }
        }, [r("div", {
          class: t.em("header-item", "title")
        }, [m]), a.enableDelete && r("div", {
          class: t.em("header-item", "delete"),
          attrs: {
            title: "移除"
          },
          on: {
            click: (D) => i(f, u, D)
          }
        }, [r("i", {
          class: "fa fa-close"
        })])]);
      }), a.enableCreate && r("div", {
        class: [t.e("header-item"), t.e("add")],
        attrs: {
          title: "添加"
        },
        on: {
          click: () => c()
        }
      }, [r("span", ["添加"]), r("i", {
        class: "fa fa-plus"
      })])]);
    };
    return V(() => a.form.isLoaded, (h, g) => {
      h !== g && h === !0 && a.loadData();
    }), {
      ns: t,
      rendertanHeader: v,
      renderTabs: () => a.contentCtrlData.map((h, g) => {
        var f;
        let l = null;
        const {
          form: y
        } = a.model;
        if (y && a.providers[y.name] && a.model.appEntity) {
          const u = Object.assign(a.form.context.clone(), {
            [(f = a.model.appEntity.codeName) == null ? void 0 : f.toLowerCase()]: h[a.model.appEntity.keyName]
          });
          l = r(a.providers[y.name].component, {
            props: {
              modelData: y,
              context: u,
              params: a.form.params,
              enableAutoSave: !0,
              silentVerify: !0
            },
            on: {
              neuronInit: a.onNeuronInit(h.srfkey)
            }
          });
        }
        return r("div", {
          class: [t.e("content"), t.is("actived", g === a.active)],
          key: h.srfkey
        }, [l]);
      })
    };
  },
  render() {
    return r("div", {
      class: this.ns.b()
    }, [this.rendertanHeader(), this.renderTabs()]);
  }
}), Le = M({
  name: "AutoSelectAll",
  props: se(),
  emits: G(),
  setup(s, {
    emit: t
  }) {
    const a = B("mpicker"), e = s.controller, i = C([]), n = C([]), c = C([]), v = C(!1), p = C(!1), h = C(null), g = C([]), l = j(() => {
      const w = e.editorParams.followitem;
      return w ? s.data[w] : "";
    });
    V(() => s.value, (w) => {
      i.value = [], c.value = [], w && (c.value = JSON.parse(w), c.value.length > 0 && c.value.forEach((b) => {
        n.value.findIndex((x) => Object.is(x.srfkey, b.srfkey)) < 0 && (n.value.push(b), g.value.push(b.srfmajortext)), i.value.push(b.srfkey);
      }));
    }, {
      immediate: !0,
      deep: !0
    });
    const y = async (w) => {
      const b = [];
      if (w && Array.isArray(w))
        for (let x = 0; x < w.length; x++) {
          const S = w[x], o = {
            srfkey: S[e.keyName] || S.srfkey,
            srfmajortext: S[e.textName] || S.srfmajortext
          }, d = await e.calcFillDataItems(S);
          d.length > 0 && d.forEach((I) => {
            Object.assign(o, {
              [I.name]: I.value
            });
          }), b.push(o), n.value.findIndex((I) => Object.is(I[e.keyName], S[e.keyName])) < 0 && n.value.push(o);
        }
      const F = b.length > 0 ? JSON.stringify(b) : "";
      t("change", F);
    }, f = async () => {
      let w;
      c.value.length && (w = JSON.stringify(c.value));
      const b = await e.openPickUpView(s.data, w);
      b && y(b);
    }, u = (w) => {
      const b = [];
      if (w.length > 0) {
        w.forEach((x) => {
          let S = n.value.findIndex((d) => Object.is(d.srfkey, x)), o = null;
          S >= 0 ? o = n.value[S] : (S = c.value.findIndex((d) => Object.is(d.srfkey, x)), S >= 0 && (o = c.value[S])), o && b.push(o);
        });
        const F = b.length > 0 ? JSON.stringify(b) : "";
        t("change", F);
      } else
        t("change", "");
    }, m = async (w) => {
      if (e.model.appDataEntity) {
        p.value = !0;
        try {
          const b = await e.getServiceData(w, s.data);
          p.value = !1, n.value = [], b.data.length > 0 && (n.value = b.data.map((F) => ({
            srfkey: F[e.keyName],
            srfmajortext: F[e.textName]
          })));
        } catch (b) {
          p.value = !1;
        }
      }
    }, D = (w) => {
      v.value = w, t("operate", w), v.value && m("");
    }, P = j(() => c.value.map((w) => w.srfmajortext).join("、")), k = (w) => {
      n.value = w;
    };
    return V(() => l.value, async (w) => {
      if (w) {
        await m("");
        const b = n.value.map((F) => F.srfkey);
        u(b);
      } else
        n.value = [], t("change", "");
    }, {
      immediate: !0
    }), {
      ns: a,
      c: e,
      selectRef: h,
      curValue: i,
      loading: p,
      items: n,
      defaultLabel: g,
      valueText: P,
      onSearch: m,
      onOpenChange: D,
      onSelect: u,
      openPickUpView: f,
      setDefaultOptions: k
    };
  },
  render(s) {
    return s("div", {
      class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""]
    }, [this.readonly && this.valueText, !this.readonly && s("iSelect", {
      ref: "selectRef",
      props: {
        ...this.c.customProps,
        value: this.curValue,
        filterable: !0,
        transfer: !0,
        multiple: !0,
        defaultLabel: this.defaultLabel,
        loading: this.loading,
        placeholder: this.c.placeHolder,
        disabled: this.disabled,
        remoteMethod: this.onSearch
      },
      on: {
        "on-change": this.onSelect,
        "on-open-change": this.onOpenChange
      }
    }, [this.items.map((t) => s("i-option", {
      key: t.srfkey,
      attrs: {
        value: t.srfkey,
        label: t.srfmajortext
      }
    }, [t.srfmajortext]))]), !this.readonly && s("div", {
      class: this.ns.e("buns-position")
    }, [s("div", {
      class: this.ns.e("btns")
    }, [this.c.pickupView ? s("i-button", {
      attrs: {
        icon: "ios-search",
        type: "text"
      },
      on: {
        click: this.openPickUpView
      }
    }) : null])])]);
  }
});
const Ve = M({
  name: "MPickerCheckbox",
  props: se(),
  emits: G(),
  setup(s, {
    emit: t
  }) {
    const a = B("checkbox"), e = s.controller, i = C([]), n = C([]), c = ",", v = j({
      get() {
        var u;
        return ((u = s.value) == null ? void 0 : u.split(",")) || [];
      },
      set(u) {
        let m = null;
        const D = [];
        i.value.length > 0 && (i.value.forEach((P) => {
          u.findIndex((w) => Object.is(P.value, w)) !== -1 && D.push(P.value);
        }), m = D.join(c)), t("change", m);
      }
    }), p = async (u) => {
      const {
        context: m,
        params: D
      } = e.handlePublicParams(u, e.context, e.params);
      if (e.editorParams.codeTag) {
        let P = [];
        const k = e.editorParams.codeTag;
        return P = await ibiz.codeListService.get(k, m, D), P;
      }
      throw new he(e.model.source, "请配置代码表");
    }, h = (u) => {
      v.value = u;
    }, g = j(() => {
      const u = Array.isArray(v.value) ? v.value : [v.value];
      return i.value.filter((m) => u.includes(m.srfkey)).map((m) => m.srfmajortext).join("、");
    }), l = async (u) => {
      if (e.model.appDataEntity)
        try {
          const m = await e.getServiceData(u, s.data);
          n.value = [], m.data.length > 0 && (n.value = m.data.map((D) => ({
            srfkey: D[e.keyName],
            srfmajortext: D[e.textName]
          })));
        } catch (m) {
          console.error(m);
        }
    }, y = j(() => {
      const u = e.editorParams.followitem;
      return u ? s.data[u] : "";
    }), f = () => {
      const u = [];
      i.value.forEach((m) => {
        n.value.findIndex((P) => P.srfkey === m.value) > -1 && u.push(m.value);
      }), h(u);
    };
    return V(() => y, async (u) => {
      await p(u).then((m) => {
        i.value = m;
      }), await l(""), f();
    }, {
      immediate: !0,
      deep: !0
    }), {
      ns: a,
      c: e,
      valueText: g,
      selectArray: v,
      items: i,
      onSearch: l,
      onSelectArrayChange: h
    };
  },
  render(s) {
    return s("div", {
      class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""]
    }, [this.readonly && this.valueText, !this.readonly && s("ICheckboxGroup", {
      props: {
        ...this.c.customProps,
        value: this.selectArray
      },
      on: {
        "on-change": this.onSelectArrayChange
      }
    }, [this.items.map((t, a) => s("i-checkbox", {
      key: a,
      attrs: {
        label: t.value,
        disabled: this.disabled
      }
    }, [s("span", {
      class: this.ns.e("text")
    }, [t.text])]))])]);
  }
});
class Be extends Ae {
  /**
   * 设置嵌入视图的神经元
   *
   * @author lxm
   * @date 2022-09-15 10:09:22
   * @param {ViewNeuron} neuron
   */
  setViewNeuron(t) {
    this.neuron = t, this.neuron.evt.on("refreshed", (a) => {
      if (ibiz.log.debug("接收到关系界面的刷新变更事件", a), this.model.formItemUpdate) {
        const { methodName: e, itemNames: i, model: n } = this.model.formItemUpdate;
        this.form.updateFormItem(
          e,
          i,
          n
        );
      }
    }), this.neuron.evt.on("mounted", () => {
      this.neuron.call.refresh();
    }), this.neuron.evt.on("viewDataChange", async (a) => {
      if (!["LOAD", "LOADDRAFT"].includes(a.type) && (ibiz.log.debug("接收到关系界面的数据变更事件", a.data), this.model.formItemUpdate)) {
        const { methodName: e, itemNames: i, model: n } = this.model.formItemUpdate;
        try {
          this.processState.formItemUpdate = !0, await this.form.updateFormItem(
            e,
            i,
            n
          );
        } finally {
          this.processState.formItemUpdate = !1;
        }
      }
    }), this.neuron.evt.on("destroyed", () => {
      Object.keys(this.processState).forEach((a) => {
        this.processState[a] = !1;
      });
    }), this.neuron.evt.on("viewSaveStart", () => {
      this.processState.viewSave = !0;
    }), this.neuron.evt.on("viewSaveEnd", () => {
      this.processState.viewSave = !1;
    });
  }
}
class _e extends Ie {
  constructor() {
    super(...arguments);
    /**
     * 自定义行为
     *
     * @type {string}
     * @memberof WfEditViewController
     */
    E(this, "userAction");
  }
  async onInit() {
    await super.onInit(), this.getUserAction();
  }
  /**
   * 工作流启动
   *
   * @author lxm
   * @date 2022-09-29 20:09:27
   * @returns {*}  {Promise<void>}
   */
  async wfStart() {
    var h;
    await this.save(), await this.execUserAction();
    const a = await this.entityService.wf.getWFVersion();
    if (a.data.length === 0)
      throw new xe("当前工作流版本不存在");
    const e = a.data[0], i = `WFSTART@${e.wfversion}`, n = Object.assign(this.context.clone(), {
      activeForm: e["process-form"]
    }), c = {
      processDefinitionKey: e.definitionkey
    }, v = (h = this.model.source.findPSAppViewRef(i)) == null ? void 0 : h.getRefPSAppView();
    if (!v) {
      await this.nerve.form.call.wfStart(c), await this.closeView();
      return;
    }
    (await ibiz.commands.execute(
      q.TAG,
      v,
      n,
      c
    )).ok && await this.closeView();
  }
  /**
   * 获取自定义行为
   *
   * @memberof EditViewController
   */
  getUserAction() {
    const { form: a } = this.model, e = a.source.getPSControlHandler();
    if (e) {
      const i = e.findPSControlHandlerAction("user");
      i && i.getPSAppDEMethod() && (this.userAction = i.getPSAppDEMethod().codeName);
    }
  }
  /**
   * 执行自定义行为
   *
   * @memberof EditViewController
   */
  async execUserAction() {
    if (this.userAction) {
      const a = this.getData();
      await this.entityService.exec(this.userAction, this.context, a[0]);
    }
  }
}
function je(s, t) {
  return we(
    s,
    (a, e) => new _e(t, a, e)
  );
}
const ze = M({
  props: {
    context: Object,
    params: {
      type: Object
    },
    modelPath: {
      type: String,
      required: !0
    },
    modal: {
      type: Object
    },
    noLoadDefault: {
      type: Boolean,
      required: !1
    }
  },
  setup(s) {
    const {
      proxy: t
    } = W();
    return {
      c: je(t, s.modelPath)
    };
  },
  render(s) {
    let t = null;
    if (this.c.complete) {
      const {
        form: a
      } = this.c.model;
      this.c.providers[a.name] && (t = s(this.c.providers[a.name].component, {
        props: {
          modelData: a,
          context: this.c.context,
          params: this.c.params
        },
        on: {
          neuronInit: this.c.nerve.onNeuronInit(a.name)
        }
      }));
    }
    return s("view-base", {
      attrs: {
        controller: this.c
      }
    }, [t]);
  }
});
class Ye {
  constructor() {
    E(this, "component", "IBizFormDataComparison");
  }
}
class $e extends Ce {
  async execAction(t, a, e, i) {
    const n = {}, c = t.getPSAppDataEntity();
    if (c) {
      c.isFill === !1 && await c.fill(!0);
      const v = new H(c);
      await v.init();
      const { resultContext: p } = await this.handleParams(
        t,
        a,
        e,
        i
      ), h = ibiz.resourcePathUtil.calcPaths(
        p,
        v.codeName
      ), g = K(p, h);
      let l = `${g}/${v.deNamePlural}/importtemplate`, y = `${g}/${v.deNamePlural}/importdata2`;
      const f = t.getPSAppDEDataImport();
      f && (l += `?srfimporttag=${f.codeName}`, y += `?srfimporttag=${f.codeName}`);
      const u = ibiz.overlay.createModal(
        "CustomDataImport",
        {
          templateUrl: l,
          importUrl: y,
          dismiss: (m) => {
            u.dismiss(m);
          }
        },
        {
          width: "auto",
          placement: "center"
        }
      );
      return u.present(), await u.onWillDismiss(), {
        refresh: !0
      };
    }
    return n;
  }
}
class He {
  constructor() {
    E(this, "handler");
  }
  async getHandler() {
    return this.handler || (this.handler = new $e()), this.handler;
  }
}
class Ge {
  constructor() {
    E(this, "gridEditor", "YearMonthPicker");
    E(this, "formEditor", "YearMonthPicker");
  }
  async createController(t, a) {
    const e = new Fe(t, a);
    return await e.init(), e;
  }
}
class We {
  constructor() {
    E(this, "formEditor", "DownLoadSafeFile");
    E(this, "gridEditor", "DownLoadSafeFile");
  }
  async createController(t, a) {
    const e = new Se(t, a);
    return await e.init(), e;
  }
}
class qe extends re {
  async execAction(t, a, e, i, n) {
    const c = {}, { frontProcessType: v } = t;
    if (v === "OPENHTMLPAGE") {
      const p = ne.fill(t.htmlPageUrl, a, e == null ? void 0 : e[0]);
      window.open(p, "_blank");
    }
    if (v === "DATAIMP") {
      const p = t.getPSAppDataEntity();
      if (p) {
        p.isFill === !1 && await p.fill(!0);
        const h = new H(p);
        await h.init();
        const { resultContext: g } = await this.handleParams(
          t,
          a,
          e,
          i
        ), l = ibiz.resourcePathUtil.calcPaths(
          g,
          h.codeName
        ), y = K(g, l);
        let f = `${y}/${h.deNamePlural}/importtemplate`, u = `${y}/${h.deNamePlural}/importdata2`;
        const m = t.getPSAppDEDataImport();
        m && (f += `?srfimporttag=${m.codeName}`, u += `?srfimporttag=${m.codeName}`);
        const D = ibiz.overlay.createModal(
          "DataImport",
          {
            templateUrl: f,
            importUrl: u,
            dismiss: (P) => {
              D.dismiss(P);
            }
          },
          {
            width: "auto",
            placement: "center"
          }
        );
        return D.present(), await D.onWillDismiss(), {
          refresh: !0
        };
      }
    }
    if (["TOP", "WIZARD"].includes(v)) {
      const p = t.getFrontPSAppView();
      if (!p)
        throw new Error("未配置打开视图");
      await p.fill(!0);
      const { resultContext: h, resultParams: g } = await this.handleParams(
        t,
        a,
        e,
        i
      ), l = await ibiz.commands.execute(
        q.TAG,
        p,
        h,
        g,
        n
      );
      (l == null ? void 0 : l.ok) === !1 && (c.closeView = !1, c.refresh = !1, c.cancel = !0), l != null && l.ok && l.data && (c.data = l.data);
    } else if (n) {
      const { neuron: p } = n, g = p.call.getFormController().call.getFormController(), { druipart1: l, druipart2: y, druipart3: f } = g.details;
      [
        {
          message: "服务履历为空",
          neuron: l
        },
        {
          message: "教育经验为空",
          neuron: y
        },
        {
          message: "项目经验为空",
          neuron: f
        }
      ].some((D) => {
        const P = D.neuron.neuron.call.getGridController();
        if (P) {
          const k = P.call.getGridController();
          if (k && k.items && k.items.length > 0)
            return !1;
        }
        return ibiz.message.error(`${D.message}`, 1.5, !0), !0;
      }) || await p.call.wfStart();
    }
    return c;
  }
}
class Ke {
  constructor() {
    E(this, "handler");
  }
  async getHandler() {
    return this.handler || (this.handler = new qe()), this.handler;
  }
}
class Je {
  constructor() {
    E(this, "component", "FormMDCtrlFormStyle2");
  }
  async createController(t, a, e) {
    const i = new le(t, a, e);
    return await i.init(), i;
  }
}
class Xe {
  constructor() {
    E(this, "formEditor", "AutoSelectAll");
    E(this, "gridEditor", "AutoSelectAll");
  }
  async createController(t, a) {
    const e = new oe(t, a);
    return await e.init(), e;
  }
}
class Ze {
  constructor() {
    E(this, "formEditor", "MPickerCheckbox");
    E(this, "gridEditor", "IBizGridPicker");
  }
  async createController(t, a) {
    const e = new oe(t, a);
    return await e.init(), e;
  }
}
class Qe extends re {
  async execAction(t, a, e, i, n) {
    const c = {}, { frontProcessType: v } = t;
    if (v === "OPENHTMLPAGE") {
      const p = ne.fill(t.htmlPageUrl, a, e == null ? void 0 : e[0]);
      window.open(p, "_blank");
    }
    if (v === "DATAIMP") {
      const p = t.getPSAppDataEntity();
      if (p) {
        p.isFill === !1 && await p.fill(!0);
        const h = new H(p);
        await h.init();
        const { resultContext: g } = await this.handleParams(
          t,
          a,
          e,
          i
        ), l = ibiz.resourcePathUtil.calcPaths(
          g,
          h.codeName
        ), y = K(g, l);
        let f = `${y}/${h.deNamePlural}/importtemplate`, u = `${y}/${h.deNamePlural}/importdata2`;
        const m = t.getPSAppDEDataImport();
        m && (f += `?srfimporttag=${m.codeName}`, u += `?srfimporttag=${m.codeName}`);
        const D = ibiz.overlay.createModal(
          "DataImport",
          {
            templateUrl: f,
            importUrl: u,
            dismiss: (P) => {
              D.dismiss(P);
            }
          },
          {
            width: "auto",
            placement: "center"
          }
        );
        return D.present(), await D.onWillDismiss(), {
          refresh: !0
        };
      }
    }
    if (["TOP", "WIZARD"].includes(v)) {
      const p = t.getFrontPSAppView();
      if (!p)
        throw new Error("未配置打开视图");
      await p.fill(!0);
      const { resultContext: h, resultParams: g } = await this.handleParams(
        t,
        a,
        e,
        i
      ), l = await ibiz.commands.execute(
        q.TAG,
        p,
        h,
        g,
        n
      );
      (l == null ? void 0 : l.ok) === !1 && (c.closeView = !1, c.refresh = !1, c.cancel = !0), l != null && l.ok && l.data && (c.data = l.data);
    } else if (e && e.length > 0 && n) {
      const { neuron: p } = n, l = await p.call.getFormController().call.getFormController().autoSave();
      l && l.rcryqd && Array.isArray(l.rcryqd) && l.rcryqd.length > 0 ? await p.call.wfStart() : ibiz.message.error("入场信息为空");
    }
    return c;
  }
}
class et {
  constructor() {
    E(this, "handler");
  }
  async getHandler() {
    return this.handler || (this.handler = new Qe()), this.handler;
  }
}
class tt {
  constructor() {
    E(this, "component", "FormDruipart");
  }
  async createController(t, a, e) {
    const i = new Be(t, a, e);
    return await i.init(), i;
  }
}
class at {
  constructor() {
    E(this, "component", "WfEditView");
  }
}
const pt = {
  mateUrl: import.meta.url,
  install(s) {
    ie.loadStyle(["/style.css"]), s.component("IBizFormDataComparison", Oe), s.component("CustomDataImport", Te), s.component("YearMonthPicker", Me), s.component("DownLoadSafeFile", Re), s.component("FormMDCtrlFormStyle2", Ue), s.component("AutoSelectAll", Le), s.component("MPickerCheckbox", Ve), s.component("WfEditView", ze), ibiz.register.control.register(
      "EDITFORM_RENDER_FORM_DATA_COMPARISON",
      new Ye()
    ), ibiz.register.uiAction.register(
      "DEUIACTION_CUSTOM_IMPORT",
      new He()
    ), ibiz.register.editor.register(
      "DATEPICKEREX_NOTIME_YEAR_MONTH_PICKER",
      new Ge()
    ), ibiz.register.editor.register(
      "FILEUPLOADER_ONE_DOWNLOAD_FILE",
      new We()
    ), ibiz.register.uiAction.register(
      "DEUIACTION_JUDEG_ENABLE_UPDATE",
      new Ke()
    ), ibiz.register.formDetail.register(
      "FORM_USERCONTROL_MUL_FORM_CARD",
      new Je()
    ), ibiz.register.editor.register(
      "EDITOR_CUSTOMSTYLE_AUTO_SELECT_ALL",
      new Xe()
    ), ibiz.register.editor.register(
      "EDITOR_CUSTOMSTYLE_MULTIPLE_CHECKBOX",
      new Ze()
    ), ibiz.register.uiAction.register(
      "DEUIACTION_check_rcxx",
      new et()
    ), ibiz.register.formDetail.register(
      "FORM_USERCONTROL_DRUIPART_ENABLEINITLOAD",
      new tt()
    ), ibiz.register.view.register(
      "VIEW_CUSTOM_CUSTOM_WF",
      new at()
    );
  }
};
export {
  pt as default
};
