@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,334 lines • 349 kB
JavaScript
var oo = Object.defineProperty;
var io = (e, t, n) => t in e ? oo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var q = (e, t, n) => io(e, typeof t != "symbol" ? t + "" : t, n);
import { defineComponent as Oe, inject as ut, onMounted as Ke, createVNode as k, Fragment as bt, computed as $, ref as T, provide as un, watch as we, reactive as st, createApp as Ut, onUnmounted as Ft, Transition as cn, mergeProps as vt, createTextVNode as ze, onBeforeUnmount as dn, withDirectives as Bt, resolveDirective as ao, onBeforeMount as ro, Teleport as fn, shallowRef as lo, nextTick as wt, render as jt, h as so, cloneVNode as uo, triggerRef as co, isVNode as fo, vShow as po, vModelText as Zt } from "vue";
import { useCheck as mo, useDateFormat as ho, useNumberFormat as vo, resolveField as Ye, setFieldValue as At, getCustomClass as Lt, withInstall as go, FormSchemaEntityField$Type as en, FormSchemaEntityFieldType$Type as yo, useGuid as pn } from "../common/index.esm.js";
import { isPlainObject as tn, cloneDeep as ct, isUndefined as nn } from "lodash-es";
import { DgControl as on } from "../designer-canvas/index.esm.js";
import { useResizeObserver as mn } from "@vueuse/core";
import { useIdentify as bo, useGroupData as Co, useFilter as wo, useHierarchy as _o, useLoading as So, useDataView as xo, useSelection as To, useSelectHierarchyItem as Fo, useDataViewContainerStyle as ko, useCommandColumn as Io, useColumn as Eo, useSort as Mo, useGroupColumn as Bo, useRow as Oo, useEdit as Vo, useVisualDataBound as Do, useVisualDataCell as Ro, useVisualDataRow as No, useVisualData as $o, useCellPosition as Po, useSidebar as jo, useVirtualScroll as Lo, useFitColumn as Wo, useFilterHistory as Ao, useColumnFilter as Ho, useDragColumn as Go, getColumnHeader as zo, getSidebar as qo, getDisableMask as Uo, getHorizontalScrollbar as Xo, getVerticalScrollbar as Yo, getEmpty as Ko } from "../data-view/index.esm.js";
import "../modal/index.esm.js";
import Qo from "../transfer/index.esm.js";
import Jo from "../tabs/index.esm.js";
import Zo from "../order/index.esm.js";
import "../condition/index.esm.js";
import ei, { FCheckbox as ti } from "../checkbox/index.esm.js";
import ni from "../filter-bar/index.esm.js";
import an from "../tooltip/index.esm.js";
import oi from "../pagination/index.esm.js";
import ii from "../button/index.esm.js";
import ai from "../search-box/index.esm.js";
import hn from "../tags/index.esm.js";
import ri, { FDynamicFormGroup as li, FDynamicFormInput as si } from "../dynamic-form/index.esm.js";
import ui from "../binding-selector/index.esm.js";
import { FNotifyService as ci } from "../notify/index.esm.js";
import di from "../accordion/index.esm.js";
import fi from "../avatar/index.esm.js";
import pi from "../button-edit/index.esm.js";
import mi from "../button-group/index.esm.js";
import hi from "../calendar/index.esm.js";
import vi from "../capsule/index.esm.js";
import gi from "../color-picker/index.esm.js";
import Ht from "../combo-list/index.esm.js";
import yi from "../content-container/index.esm.js";
import vn from "../data-grid/index.esm.js";
import bi from "../date-picker/index.esm.js";
import Ci from "../dropdown/index.esm.js";
import "../external-container/index.esm.js";
import wi from "../events-editor/index.esm.js";
import _i from "../image-cropper/index.esm.js";
import Si from "../input-group/index.esm.js";
import xi from "../layout/index.esm.js";
import Ti from "../list-nav/index.esm.js";
import Fi from "../list-view/index.esm.js";
import ki from "../lookup/index.esm.js";
import Ii from "../nav/index.esm.js";
import Ei from "../number-spinner/index.esm.js";
import Mi from "../number-range/index.esm.js";
import Bi from "../page-header/index.esm.js";
import Oi from "../page-footer/index.esm.js";
import Vi from "../progress/index.esm.js";
import Di from "../query-solution/index.esm.js";
import Ri from "../radio-group/index.esm.js";
import Ni from "../rate/index.esm.js";
import $i from "../response-toolbar/index.esm.js";
import Pi from "../response-layout/index.esm.js";
import ji from "../response-layout-editor/index.esm.js";
import Li from "../section/index.esm.js";
import Wi from "../smoke-detector/index.esm.js";
import Ai from "../splitter/index.esm.js";
import Hi from "../step/index.esm.js";
import Gi from "../switch/index.esm.js";
import zi from "../text/index.esm.js";
import qi from "../time-picker/index.esm.js";
import Ui from "../tree-view/index.esm.js";
import Xi from "../uploader/index.esm.js";
import Yi from "../verify-detail/index.esm.js";
import Ki from "../component/index.esm.js";
import Qi from "../video/index.esm.js";
import Ji from "../textarea/index.esm.js";
import Zi from "../tree-grid/index.esm.js";
import ea from "../fieldset/index.esm.js";
import ta from "../drawer/index.esm.js";
import na from "../combo-tree/index.esm.js";
import oa from "../field-selector/index.esm.js";
import ia from "../mapping-editor/index.esm.js";
import aa from "../schema-selector/index.esm.js";
import ra from "../event-parameter/index.esm.js";
import la from "../filter-condition-editor/index.esm.js";
import sa from "../sort-condition-editor/index.esm.js";
import ua from "../menu-lookup/index.esm.js";
import { createPropsResolver as gn, resolveAppearance as ca } from "../dynamic-resolver/index.esm.js";
import da from "../popover/index.esm.js";
const fa = {
value: { type: String, default: "" },
/** 值 */
modelValue: { type: String, default: "" },
/** name值 */
name: { type: String, default: "" },
/** 标签名 */
label: { type: String, default: "" },
/** 标识 */
id: { type: String, default: "" }
}, yn = Symbol("radioGroupContext"), rn = /* @__PURE__ */ Oe({
name: "FRadio",
props: fa,
emits: ["update:value"],
setup(e, t) {
const n = ut(yn, null), {
buttonClass: o,
checked: i,
disabled: a,
name: r,
shouldRenderButton: u,
shouldRenderNative: s,
onClickRadio: p
} = mo(e, t, n == null ? void 0 : n.parentProps, n == null ? void 0 : n.parentContext);
return Ke(() => {
}), () => {
var c, l, d, g;
return k(bt, null, [u.value && k("div", {
class: o.value,
style: "border-radius:0;border: 1px solid #E8EBF2;",
onClick: p
}, [(l = (c = t.slots).default) == null ? void 0 : l.call(c)]), s.value && k("div", {
class: "custom-control custom-radio",
onClick: p
}, [k("input", {
type: "radio",
class: "custom-control-input",
name: r.value,
id: e.id,
value: e.value,
checked: i.value,
disabled: a.value
}, null), k("div", {
class: "custom-control-label"
}, [(g = (d = t.slots).default) == null ? void 0 : g.call(d)])])]);
};
}
});
function pa(e, t, n) {
return t;
}
function ma(e, t, n) {
return t;
}
const bn = {}, Cn = {};
function Xt(e) {
const { properties: t, title: n, ignore: o } = e, i = o && Array.isArray(o), a = Object.keys(t).reduce((r, u) => ((!i || !o.find((s) => s === u)) && (r[u] = t[u].type === "object" && t[u].properties ? Xt(t[u]) : ct(t[u].default)), r), {});
if (n && (!i || !o.find((r) => r === "id"))) {
const r = n.toLowerCase().replace(/-/g, "_");
a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
}
return a;
}
function ha(e) {
const { properties: t, title: n, required: o } = e;
if (o && Array.isArray(o)) {
const i = o.reduce((a, r) => (a[r] = t[r].type === "object" && t[r].properties ? Xt(t[r]) : ct(t[r].default), a), {});
if (n && o.find((a) => a === "id")) {
const a = n.toLowerCase().replace(/-/g, "_");
i.id = `${a}_${Math.random().toString().slice(2, 6)}`;
}
return i;
}
return {
type: n
};
}
function wn(e, t = {}, n) {
const o = bn[e];
if (o) {
let i = ha(o);
const a = Cn[e];
return i = a ? a({ getSchemaByType: wn }, i, t, n) : i, i;
}
return null;
}
function va(e, t) {
const n = Xt(t);
return Object.keys(n).reduce((o, i) => (Object.prototype.hasOwnProperty.call(e, i) && (o[i] && tn(o[i]) && tn(e[i] || !e[i]) ? Object.assign(o[i], e[i] || {}) : o[i] = e[i]), o), n), n;
}
function _n(e, t) {
return Object.keys(e).filter((o) => e[o] != null).reduce((o, i) => {
if (t.has(i)) {
const a = t.get(i);
if (typeof a == "string")
o[a] = e[i];
else {
const r = a(i, e[i], e);
Object.assign(o, r);
}
} else
o[i] = e[i];
return o;
}, {});
}
function ga(e, t, n = /* @__PURE__ */ new Map()) {
const o = va(e, t);
return _n(o, n);
}
function ya(e = {}) {
function t(p, c, l, d) {
if (typeof l == "number")
return d[p].length === l;
if (typeof l == "object") {
const g = Object.keys(l)[0], v = l[g];
if (g === "not")
return Number(d[p].length) !== Number(v);
if (g === "moreThan")
return Number(d[p].length) >= Number(v);
if (g === "lessThan")
return Number(d[p].length) <= Number(v);
}
return !1;
}
function n(p, c, l, d) {
return d[p] && d[p].propertyValue && String(d[p].propertyValue.value) === String(l);
}
const o = /* @__PURE__ */ new Map([
["length", t],
["getProperty", n]
]);
Object.keys(e).reduce((p, c) => (p.set(c, e[c]), p), o);
function i(p, c) {
const l = p;
return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: p, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
if (d === "length")
return { target: l, operator: "length", param: null, value: c[d] };
const g = d, v = c[d];
return { target: l, operator: "getProperty", param: g, value: v };
}) : [];
}
function a(p) {
return Object.keys(p).reduce((l, d) => {
const g = i(d, p[d]);
return l.push(...g), l;
}, []);
}
function r(p, c) {
if (o.has(p.operator)) {
const l = o.get(p.operator);
return l && l(p.target, p.param, p.value, c) || !1;
}
return !1;
}
function u(p, c) {
return a(p).reduce((g, v) => g && r(v, c), !0);
}
function s(p, c) {
const l = Object.keys(p), d = l.includes("allOf"), g = l.includes("anyOf"), v = d || g, m = (v ? p[v ? d ? "allOf" : "anyOf" : "allOf"] : [p]).map((x) => u(x, c));
return d ? !m.includes(!1) : m.includes(!0);
}
return { parseValueSchema: s };
}
const le = {
button: { type: "button", name: "按钮" },
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
"content-container": { type: "content-container", name: "容器" },
"input-group": { type: "input-group", name: "文本" },
textarea: { type: "textarea", name: "多行文本" },
lookup: { type: "lookup", name: "帮助" },
"number-spinner": { type: "number-spinner", name: "数值" },
"date-picker": { type: "date-picker", name: "日期" },
switch: { type: "switch", name: "开关" },
"radio-group": { type: "radio-group", name: "单选组" },
"check-box": { type: "check-box", name: "复选框" },
"check-group": { type: "check-group", name: "复选框组" },
"combo-list": { type: "combo-list", name: "下拉列表" },
"response-form": { type: "response-form", name: "卡片面板" },
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
"tree-grid": { type: "tree-grid", name: "树表格" },
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
"data-grid": { type: "data-grid", name: "表格" },
"data-grid-column": { type: "data-grid-column", name: "表格列" },
module: { type: "Module", name: "模块" },
component: { type: "component", name: "组件" },
tabs: { type: "tabs", name: "标签页" },
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
"time-picker": { type: "time-picker", name: "时间选择" },
section: { type: "section", name: "分组面板" },
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
splitter: { type: "splitter", name: "分栏面板" },
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
"component-ref": { type: "component-ref", name: "组件引用节点" },
uploader: { type: "uploader", name: "附件上传" },
"page-header": { type: "page-header", name: "页头" },
"page-footer": { type: "page-footer", name: "页脚" },
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
fieldset: { type: "fieldset", name: "分组" },
"query-solution": { type: "query-solution", name: "筛选方案" },
drawer: { type: "drawer", name: "抽屉" }
}, ba = {}, Ca = {};
ya();
function dt(e, t, n = /* @__PURE__ */ new Map(), o = (r, u, s, p) => u, i = {}, a = (r) => r) {
return bn[t.title] = t, Cn[t.title] = o, ba[t.title] = i, Ca[t.title] = a, (r = {}, u = !0) => {
if (!u)
return _n(r, n);
const s = ga(r, t, n), p = Object.keys(e).reduce((c, l) => (c[l] = e[l].default, c), {});
return Object.assign(p, s);
};
}
function kt(e, t) {
return { customClass: t.class, customStyle: t.style };
}
function wa() {
function e(t, n) {
const { dataSource: o } = t || {};
return o === void 0 ? {} : {};
}
return {
resolve: e
};
}
function _a() {
function e(t, n) {
return t.selectItemById(n);
}
return {
selectItemById: e
};
}
function Sa() {
function e(t, n) {
const { columns: o } = n;
return t.updateColumns(o);
}
return {
updateColumns: e
};
}
const xa = /* @__PURE__ */ new Map([
["appearance", kt]
]), Ta = /* @__PURE__ */ new Map([]), Fa = "https://json-schema.org/draft/2020-12/schema", ka = "https://farris-design.gitee.io/radio-group.schema.json", Ia = "radio-group", Ea = "A Farris Input Component", Ma = "object", Ba = {
id: {
description: "The unique identifier for a radio-group",
type: "string"
},
type: {
description: "The type string of radio-group component",
type: "string",
default: "radio-group"
},
appearance: {
description: "",
type: "object",
properties: {
class: {
type: "string"
},
style: {
type: "string"
}
},
default: {}
},
binding: {
description: "",
type: "object",
default: {}
},
disabled: {
type: "boolean",
default: !1
},
readonly: {
description: "",
type: "boolean",
default: !1
},
required: {
description: "",
type: "boolean",
default: !1
},
tabindex: {
description: "",
type: "number",
default: -1
},
visible: {
description: "",
type: "boolean",
default: !0
},
textField: {
description: "",
type: "string",
default: "name"
},
valueField: {
description: "",
type: "string",
default: "value"
},
data: {
description: "",
type: "array"
},
direction: {
description: "",
type: "string",
default: "horizontal"
}
}, Oa = [
"type"
], Va = [
"id",
"appearance",
"binding",
"visible"
], Da = {
$schema: Fa,
$id: ka,
title: Ia,
description: Ea,
type: Ma,
properties: Ba,
required: Oa,
ignore: Va
}, Ra = {
/**
* 是否被选中
*/
checked: { type: Boolean, default: !1 },
/**
* 展示方向 水平或者垂直
*/
direction: { type: String, default: "horizontal" },
/**
* 单选组类型
*/
// mode: { type: String as PropType<'default' | 'button' | 'tag'>, default: 'default' },
/**
* type为button或者tag时的颜色
*/
type: { type: String, default: "default" },
/**
* type为button或者tag时的尺寸
* 应该要弃用
*/
size: { type: String, default: "middle" },
/**
* 选项列表
*/
options: { type: Object, default: [] }
}, Yt = {
...Ra,
/**
* 组件标识
*/
id: String,
/**
* 禁用组件,不允许切换单选值
*/
disabled: { type: Boolean, default: !1 },
/**
* 功能同disabled
*/
readonly: { type: Boolean, default: !1 },
/**
* 单选组枚举数组----废弃
*/
enumData: {
type: Array,
default: []
},
/**
* 单选组枚举数组
*/
data: {
type: Array,
default: []
},
/**
* 组件值
*/
modelValue: { type: String, default: "" },
/**
* 组件名称
*/
name: { type: String, default: "" },
/**
* 输入框Tab键索引
*/
tabIndex: { type: Number, default: -1 },
/**
* 枚举数组中展示文本的key值。
*/
textField: { type: String, default: "name" },
/**
* 枚举数组中枚举值的key值。
*/
valueField: { type: String, default: "value" }
}, Sn = dt(Yt, Da, xa, pa);
function xn(e, t, n) {
const o = $(() => !e.disabled), i = $(() => e.data || e.enumData || e.options || []);
function a(s) {
return s[e.valueField];
}
function r(s) {
return s[e.textField];
}
function u(s, p) {
if (o.value) {
const c = a(s);
n.value !== c && (n.value = c, t.emit("changeValue", c), t.emit("update:modelValue", c));
}
p.stopPropagation();
}
return {
enumData: i,
getValue: a,
getText: r,
onClickRadio: u
};
}
const _t = /* @__PURE__ */ Oe({
name: "FRadioGroup",
props: Yt,
emits: ["changeValue", "update:modelValue"],
setup(e, t) {
const n = T(e.modelValue), {
enumData: o,
onClickRadio: i,
getValue: a,
getText: r
} = xn(e, t, n), u = $(() => ({
"farris-checkradio-hor": e.direction === "horizontal"
})), s = T([]);
return un(yn, {
radios: s,
parentProps: e,
parentContext: t
}), we(() => e.modelValue, (p) => {
n.value = p;
}), () => k("div", {
class: ["farris-input-wrap", "btn-group", u.value]
}, [t.slots.default ? t.slots.default() : o.value.map((p, c) => {
const l = "radio_" + e.id + e.name + p[e.valueField];
return k("div", {
class: "custom-control custom-radio"
}, [k("input", {
type: "radio",
class: "custom-control-input",
name: l,
id: l,
value: a(p),
checked: a(p) === n.value,
disabled: e.readonly || e.disabled,
tabindex: e.tabIndex,
onClick: (d) => i(p, d)
}, null), k("label", {
class: "custom-control-label",
for: l
}, [r(p)])]);
})]);
}
});
function Tn(e, t, n) {
var E;
const o = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", a = T();
function r() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
}
function u() {
return !1;
}
function s() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
}
function p() {
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
}
function c(f) {
if (!f || !f.value)
return null;
if (f.value.schema && f.value.schema.type === "component")
return f.value;
const b = T(f == null ? void 0 : f.value.parent), C = c(b);
return C || null;
}
function l(f = t) {
var _;
if (n != null && n.getDraggableDesignItemElement)
return n.getDraggableDesignItemElement(f);
const { componentInstance: b, designerItemElementRef: C } = f;
if (!b || !b.value)
return null;
const { getCustomButtons: w } = b.value;
return b.value.canMove || w && ((_ = w()) != null && _.length) ? C : l(f.parent);
}
function d(f) {
return !!n && n.canAccepts(f);
}
function g() {
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
}
function v() {
}
function I(f, b) {
var C;
!f || !b || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(f, b), (C = t == null ? void 0 : t.setupContext) == null || C.emit("dragEnd"));
}
function S(f, b) {
const { componentType: C } = f;
let w = wn(C, f, b);
n && n.onResolveNewComponentSchema && (w = n.onResolveNewComponentSchema(f, w));
const _ = C.toLowerCase().replace(/-/g, "_");
return w && !w.id && w.type === C && (w.id = `${_}_${Math.random().toString().slice(2, 6)}`), w;
}
function m(f) {
f && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(f);
}
function y(...f) {
if (n && n.getPropsConfig)
return n.getPropsConfig(...f);
}
function x() {
n && n.onRemoveComponent && n.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((f) => {
let b = f.id;
f.type === "component-ref" && (b = f.component);
const C = e.value.querySelectorAll(`#${b}-design-item`);
C != null && C.length && Array.from(C).map((w) => {
var _;
(_ = w == null ? void 0 : w.componentInstance) != null && _.value.onRemoveComponent && w.componentInstance.value.onRemoveComponent();
});
});
}
function h() {
if (n && n.getCustomButtons)
return n.getCustomButtons();
}
function F(f) {
if (n && n.onPropertyChanged)
return n.onPropertyChanged(f);
}
return a.value = {
canMove: r(),
canSelectParent: u(),
canDelete: s(),
canNested: !p(),
contents: t == null ? void 0 : t.schema.contents,
elementRef: e,
parent: (E = t == null ? void 0 : t.parent) == null ? void 0 : E.componentInstance,
schema: t == null ? void 0 : t.schema,
styles: o,
designerClass: i,
canAccepts: d,
getBelongedComponentInstance: c,
getDraggableDesignItemElement: l,
getDraggingDisplayText: g,
getPropConfig: y,
getDragScopeElement: v,
onAcceptMovedChildElement: I,
onChildElementMovedOut: m,
addNewChildComponentSchema: S,
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || T(!1),
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
onRemoveComponent: x,
getCustomButtons: h,
onPropertyChanged: F
}, a;
}
const Na = T(0);
function $a() {
Na.value++;
}
const yt = T(0);
function Pa(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), i = o.top >= n.top, a = o.top <= n.bottom;
return i && a;
}
function ja(e) {
const t = e.querySelector(".component-btn-group");
if (!t)
return;
t.style.display = "";
const n = t.getBoundingClientRect();
if (!(n.top === 0 && n.left === 0)) {
const o = t.querySelector("div");
if (o) {
const i = o.getBoundingClientRect();
o.style.top = n.top + "px";
let a = n.left - i.width;
const r = document.querySelector(".editorDiv");
if (r) {
const u = r.getBoundingClientRect();
a < u.left && ({ left: a } = e.getBoundingClientRect());
}
o.style.left = a + "px";
}
}
}
function La(e) {
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length && t.length === 1) {
const n = t[0], o = document.querySelector(`[id=${n}]`);
if (o && o.contains(e))
return o;
}
}
function Fn(e) {
if (!e)
return;
const t = e.getBoundingClientRect();
if (t.width === 0 && t.height === 0)
return;
const n = e.querySelector(".component-btn-group");
if (n) {
let o = !0;
const i = La(e);
if (i && (o = Pa(e, i)), !o) {
n.style.display = "none";
return;
}
ja(e);
}
}
function Wa(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && Fn(t);
}
class kn {
constructor(t, n) {
q(this, "componentId");
q(this, "viewModelId");
q(this, "eventsEditorUtils");
q(this, "formSchemaUtils");
q(this, "formMetadataConverter");
q(this, "designViewModelUtils");
q(this, "designViewModelField");
q(this, "controlCreatorUtils");
q(this, "designerHostService");
q(this, "schemaService", null);
q(this, "metadataService", null);
q(this, "propertyConfig", {
type: "object",
categories: {}
});
var o;
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
}
getTableInfo() {
var t;
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
}
setDesignViewModelField(t) {
var o;
const n = t.binding && t.binding.type === "Form" && t.binding.field;
if (n) {
if (!this.designViewModelField) {
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
this.designViewModelField = i.fields.find((a) => a.id === n);
}
t.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
}
}
getBasicPropConfig(t) {
return {
description: "Basic Information",
title: "基本信息",
properties: {
id: {
description: "组件标识",
title: "标识",
type: "string",
readonly: !0
},
type: {
description: "组件类型",
title: "控件类型",
type: "select",
editor: {
type: "combo-list",
textField: "name",
valueField: "value",
editable: !1,
data: [{ value: t.type, name: le[t.type].name }]
}
}
}
};
}
getAppearanceConfig(t = null) {
return {
title: "外观",
description: "Appearance",
properties: {
class: {
title: "class样式",
type: "string",
description: "组件的CSS样式",
$converter: "/converter/appearance.converter"
},
style: {
title: "style样式",
type: "string",
description: "组件的样式",
$converter: "/converter/appearance.converter"
}
},
setPropertyRelates(n, o) {
if (n)
switch (n && n.propertyID) {
case "class":
case "style": {
yt.value++;
break;
}
}
}
};
}
/**
*
* @param propertyId
* @param componentInstance
* @returns
*/
updateElementByParentContainer(t, n) {
const o = n && n.parent && n.parent.schema;
if (!o)
return;
const i = o.contents.findIndex((r) => r.id === t), a = ct(o.contents[i]);
o.contents.splice(i, 1), o.contents.splice(i, 0, a), $a();
}
}
const Ct = class Ct {
/**
* 根据绑定字段类型获取可用的输入类控件
*/
static getEditorTypesByMDataType(t, n = "") {
let o = Ct.fieldControlTypeMapping[t];
if (n === "data-grid-column" && (o != null && o.length)) {
const i = [le["check-group"].type, le["radio-group"].type];
o = o.filter((a) => !i.includes(a.key));
}
return o;
}
/**
* 获取所有输入类控件
*/
static getAllInputTypes() {
const t = [];
for (const n in Ct.fieldControlTypeMapping)
Ct.fieldControlTypeMapping[n].forEach((o) => {
t.find((i) => i.key === o.key && i.value === o.value) || t.push({ key: o.key, value: o.value });
});
return t;
}
/**
* 提供schema字段基础属性和DOM控件属性的映射
* @param control 控件元数据
*/
static mappingDomPropAndSchemaProp(t) {
var i;
const n = (i = t.editor) == null ? void 0 : i.type, o = [];
return (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === le["input-group"].type || n === le.textarea.type || n === le["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === le["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === le["combo-list"].type || n === le["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === le["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === le["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === le.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === le["data-grid-column"].type || t.type === le["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
}
};
/**
* <字段类型,可配置的控件类型列表>的映射
*/
q(Ct, "fieldControlTypeMapping", {
String: [
{ key: le["input-group"].type, value: le["input-group"].name },
{ key: le.lookup.type, value: le.lookup.name },
{ key: le["date-picker"].type, value: le["date-picker"].name },
{ key: le["check-group"].type, value: le["check-group"].name },
{ key: le["radio-group"].type, value: le["radio-group"].name },
{ key: le["combo-list"].type, value: le["combo-list"].name },
{ key: le.textarea.type, value: le.textarea.name },
{ key: le["time-picker"].type, value: le["time-picker"].name }
],
Text: [
{ key: le.textarea.type, value: le.textarea.name },
{ key: le.lookup.type, value: le.lookup.name }
],
Decimal: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
Integer: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
Number: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
BigNumber: [
{ key: le["number-spinner"].type, value: le["number-spinner"].name }
],
Date: [
{ key: le["date-picker"].type, value: le["date-picker"].name }
],
DateTime: [
{ key: le["date-picker"].type, value: le["date-picker"].name }
],
Boolean: [
{ key: le.switch.type, value: le.switch.name },
{ key: le["check-box"].type, value: le["check-box"].name }
],
Enum: [
{ key: le["combo-list"].type, value: le["combo-list"].name },
{ key: le["radio-group"].type, value: le["radio-group"].name }
],
Object: [
{ key: le.lookup.type, value: le.lookup.name },
{ key: le["combo-list"].type, value: le["combo-list"].name },
{ key: le["radio-group"].type, value: le["radio-group"].name }
]
});
let Ot = Ct;
class Aa {
constructor() {
/** 控件标题 */
q(this, "label", "");
/** 控件id */
q(this, "id", "");
/** 每个控件占用的栅格数 */
q(this, "columnInSM", 12);
q(this, "columnInMD", 6);
q(this, "columnInLG", 3);
q(this, "columnInEL", 2);
/** 每个控件占用的列数 */
q(this, "displayWidthInSM", 1);
q(this, "displayWidthInMD", 1);
q(this, "displayWidthInLG", 1);
q(this, "displayWidthInEL", 1);
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
q(this, "displayColumnCountAtBreakPoint", "md");
/** 控件所在行,传0即可-----编辑器内部使用 */
q(this, "tagRow", 0);
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
q(this, "showTopBorder", 0);
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
q(this, "group", 1);
/** 控件是否符合标准的class配置(设计器用的) */
q(this, "isSupportedClass", !0);
/** 控件所在分组id(设计器用的) */
q(this, "fieldSetId", "");
}
}
function Ha(e) {
let t, n;
const o = /* @__PURE__ */ new Map();
let i = [];
function a(c, l) {
const g = c.split(" ").filter((y) => y.startsWith("col-"));
if (g.length === 0) {
l.isSupportedClass = !1;
return;
}
let v = g.find((y) => /^col-([1-9]|10|11|12)$/.test(y)), I = g.find((y) => /^col-md-([1-9]|10|11|12)$/.test(y)), S = g.find((y) => /^col-xl-([1-9]|10|11|12)$/.test(y)), m = g.find((y) => /^col-el-([1-9]|10|11|12)$/.test(y));
v = v || "col-12", l.columnInSM = parseInt(v.replace("col-", ""), 10), l.displayWidthInSM = l.columnInSM / 12, l.displayWidthInSM !== 1 && (l.isSupportedClass = !1), I = I || "col-md-" + l.columnInSM, l.columnInMD = parseInt(I.replace("col-md-", ""), 10), l.displayWidthInMD = l.columnInMD / 6, [1, 2].includes(l.displayWidthInMD) || (l.isSupportedClass = !1), S = S || "col-xl-" + l.columnInMD, l.columnInLG = parseInt(S.replace("col-xl-", ""), 10), l.displayWidthInLG = l.columnInLG / 3, [1, 2, 3, 4].includes(l.displayWidthInLG) || (l.isSupportedClass = !1), m = m || "col-el-" + l.columnInLG, l.columnInEL = parseInt(m.replace("col-el-", ""), 10), l.displayWidthInEL = l.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(l.displayWidthInEL) || (l.isSupportedClass = !1);
}
function r(c, l, d, g = !1) {
let v = !1;
c.contents.forEach((I) => {
if (I.type === "fieldset") {
d += 1, r(I, l, d, !0), v = !0;
return;
}
v && (d += 1, v = !1);
const S = I.appearance && I.appearance.class, m = new Aa();
S ? a(S, m) : m.isSupportedClass = !1, m.label = I.label || I.id, m.id = I.id, m.group = d, g && (m.fieldSetId = c.id), n === I.id && (t = d), o.set(I.id, I), l.push(m);
});
}
function u(c) {
const l = e.getComponentById(c);
if (!l || !l.componentType || !l.componentType.startsWith("form"))
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
const d = e.selectNode(l, (g) => g.type === on["response-form"].type);
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
}
function s(c, l) {
l = l || c.id;
const { result: d, message: g, formNode: v } = u(l);
if (!d)
return { result: d, message: g };
n = c.id, i = [], o.clear();
const I = v.contents[0].type === on.fieldset.type ? 0 : 1;
r(v, i, I);
const S = i.find((y) => !y.isSupportedClass);
return {
defaultState: {
defaultGroupNumber: t || 1,
model: S ? "customize" : "standard"
},
importData: i
};
}
function p(c, l) {
l = l;
const { result: d, formNode: g } = u(l);
if (!d)
return "";
const v = [];
return c.forEach((I) => {
var y;
const S = o.get(I.id), m = S.appearance && S.appearance.class;
if (m) {
const h = m.split(" ").filter((w) => !w.startsWith("col-")), F = "col-" + I.columnInSM, E = "col-md-" + I.columnInMD, f = "col-xl-" + I.columnInLG, b = "col-el-" + I.columnInEL, C = [F, E, f, b].concat(h);
S.appearance.class = C.join(" ");
}
if (I.fieldSetId) {
const x = g.contents.find((F) => F.id === I.fieldSetId), h = v.find((F) => F.id === I.fieldSetId);
h ? (y = h.contents) == null || y.push(S) : (v.push(x), x.contents = [S]);
} else
v.push(S);
}), g.contents = v, g.id;
}
return {
checkCanFindFormNode: u,
checkCanOpenLayoutEditor: s,
changeFormControlsByResponseLayoutConfig: p,
getResonseFormLayoutConfig: r
};
}
var mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function It(e) {
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var Ga = { exports: {} };
(function(e, t) {
(function(n) {
e.exports = n();
})(function() {
return (/* @__PURE__ */ function() {
function n(o, i, a) {
function r(p, c) {
if (!i[p]) {
if (!o[p]) {
var l = typeof It == "function" && It;
if (!c && l) return l(p, !0);
if (u) return u(p, !0);
var d = new Error("Cannot find module '" + p + "'");
throw d.code = "MODULE_NOT_FOUND", d;
}
var g = i[p] = { exports: {} };
o[p][0].call(g.exports, function(v) {
var I = o[p][1][v];
return r(I || v);
}, g, g.exports, n, o, i, a);
}
return i[p].exports;
}
for (var u = typeof It == "function" && It, s = 0; s < a.length; s++) r(a[s]);
return r;
}
return n;
}())({
1: [function(n, o, i) {
var a = {}, r = "(?:^|\\s)", u = "(?:\\s|$)";
function s(l) {
var d = a[l];
return d ? d.lastIndex = 0 : a[l] = d = new RegExp(r + l + u, "g"), d;
}
function p(l, d) {
var g = l.className;
g.length ? s(d).test(g) || (l.className += " " + d) : l.className = d;
}
function c(l, d) {
l.className = l.className.replace(s(d), " ").trim();
}
o.exports = {
add: p,
rm: c
};
}, {}],
2: [function(n, o, i) {
(function(a) {
var r = n("contra/emitter"), u = n("crossvent"), s = n("./classes"), p = document, c = p.documentElement;
function l(_, V) {
var D = arguments.length;
D === 1 && Array.isArray(_) === !1 && (V = _, _ = []);
var R, M, O, B, N, A, K, oe, te, pe = null, W, L, H = !1, X = 0, J, Y = V || {};
Y.moves === void 0 && (Y.moves = y), Y.accepts === void 0 && (Y.accepts = y), Y.invalid === void 0 && (Y.invalid = rt), Y.containers === void 0 && (Y.containers = _ || []), Y.isContainer === void 0 && (Y.isContainer = m), Y.copy === void 0 && (Y.copy = !1), Y.copySortSource === void 0 && (Y.copySortSource = !1), Y.revertOnSpill === void 0 && (Y.revertOnSpill = !1), Y.removeOnSpill === void 0 && (Y.removeOnSpill = !1), Y.direction === void 0 && (Y.direction = "vertical"), Y.ignoreInputTextSelection === void 0 && (Y.ignoreInputTextSelection = !0), Y.mirrorContainer === void 0 && (Y.mirrorContainer = p.body);
var P = r({
containers: Y.containers,
start: qe,
end: ne,
cancel: lt,
remove: ke,
destroy: xe,
canMove: Me,
dragging: !1
});
return Y.removeOnSpill === !0 && P.on("over", me).on("out", ve), ae(), P;
function z(j) {
return P.containers.indexOf(j) !== -1 || Y.isContainer(j);
}
function ae(j) {
var Q = j ? "remove" : "add";
v(c, Q, "mousedown", Te), v(c, Q, "mouseup", Ie);
}
function Z(j) {
var Q = j ? "remove" : "add";
v(c, Q, "mousemove", We);
}
function ee(j) {
var Q = j ? "remove" : "add";
u[Q](c, "selectstart", Fe), u[Q](c, "click", Fe);
}
function xe() {
ae(!0), Ie({});
}
function Fe(j) {
W && j.preventDefault();
}
function Te(j) {
B = j.clientX, N = j.clientY;
var Q = I(j) !== 1 || j.metaKey || j.ctrlKey;
if (!Q) {
var U = j.target, ce = Ne(U);
ce && (W = ce, Z(), j.type === "mousedown" && (E(U) ? U.focus() : j.preventDefault()));
}
}
function We(j) {
if (W) {
if (I(j) === 0) {
Ie({});
return;
}
if (!(j.clientX !== void 0 && Math.abs(j.clientX - B) <= (Y.slideFactorX || 0) && j.clientY !== void 0 && Math.abs(j.clientY - N) <= (Y.slideFactorY || 0))) {
if (Y.ignoreInputTextSelection) {
var Q = w("clientX", j) || 0, U = w("clientY", j) || 0, ce = p.elementFromPoint(Q, U);
if (E(ce))
return;
}
var ge = W;
Z(!0), ee(), ne(), He(ge), s.add(oe || O, "gu-transit"), Ee(), Se(), X = 0, Ue(j);
}
}
}
function Ne(j) {
if (!(P.dragging && R) && !z(j)) {
for (var Q = j; F(j) && z(F(j)) === !1; )
if (Y.invalid(j, Q) || (j = F(j), !j))
return;
var U = F(j);
if (U && !Y.invalid(j, Q)) {
var ce = Y.moves(j, U, Q, b(j));
if (ce)
return {
item: j,
source: U
};
}
}
}
function Me(j) {
return !!Ne(j);
}
function qe(j) {
var Q = Ne(j);
Q && He(Q);
}
function He(j) {
Pe(j.item, j.source) && (oe = j.item.cloneNode(!0), P.emit("cloned", oe, j.item, "copy")), M = j.source, O = j.item, A = K = b(j.item), P.dragging = !0, P.emit("drag", O, M);
}
function rt() {
return !1;
}
function ne() {
if (P.dragging) {
var j = oe || O;
De(j, F(j));
}
}
function be() {
W = !1, Z(!0), ee(!0);
}
function Ie(j) {
if (be(), !!P.dragging) {
var Q = oe || O, U = w("clientX", j) || 0, ce = w("clientY", j) || 0, ge = S(R, U, ce), ye = ft(ge, U, ce);
ye && (oe && Y.copySortSource || !oe || ye !== M) ? De(Q, ye) : Y.removeOnSpill ? ke() : lt();
}
}
function De(j, Q) {
var U = F(j);
oe && Y.copySortSource && Q === M && U.removeChild(O), nt(Q) ? P.emit("cancel", j, M) : P.emit("drop", j, Q, M, K), tt();
}
function ke() {
if (P.dragging) {
var j = oe || O, Q = F(j);
Q && Q.removeChild(j), P.emit(oe ? "cancel" : "remove", j, Q, M), tt();
}
}
function lt(j) {
if (P.dragging) {
var Q = arguments.length > 0 ? j : Y.revertOnSpill, U = oe || O, ce = F(U), ge = nt(ce);
ge === !1 && Q && (oe ? ce && ce.removeChild(oe) : M.insertBefore(U, A)), ge || Q ? P.emit("cancel", U, M, M) : P.emit("drop", U, ce, M, K), tt();
}
}
function tt() {
var j = oe || O;
be(), $e(), Ge(), j && s.rm(j, "gu-transit"), te && clearTimeout(te), P.dragging = !1, pe && P.emit("out", j, pe, M), P.emit("dragend", j, X), M = O = oe = A = K = te = pe = null;
}
function nt(j, Q) {
var U;
return Q !== void 0 ? U = Q : R ? U = K : U = b(oe || O), j === M && U === A;
}
function ft(j, Q, U) {
for (var ce = j; ce && !ge(); )
ce = F(ce);
return ce;
function ge() {
var ye = z(ce);
if (ye === !1)
return !1;
var re = ot(ce, j), _e = Ve(ce, re, Q, U), Re = nt(ce, _e);
return Re ? !0 : Y.accepts(O, ce, M, _e);
}
}
function Ue(j) {
if (!R)
return;
j.preventDefault();
var Q = w("clientX", j) || 0, U = w("clientY", j) || 0;
R.style.left = Q - 2 + "px", R.style.top = U - 2 + "px";
var ce = oe || O, ge = S(R, Q, U), ye = ft(ge, Q, U), re = ye !== null && ye !== pe;
(re || ye === null) && (Je(), pe = ye, pt()), Ce(ge, U);
var _e = F(ce);
if (ye === M && oe && !Y.copySortSource) {
_e && _e.removeChild(ce);
return;
}
var Re, Qe = ot(ye, ge);
if (H = it(Qe, ye), Qe !== null)
Re = Ve(ye, Qe, Q, U);
else if (Y.revertOnSpill === !0 && !oe)
Re = A, ye = M;
else {
oe && _e && _e.removeChild(ce), oe && L && (L.style.display = "none");
return;
}
L.style.display = "block", ie(Re, ce, re), Re ? G(Qe, Re) : he(ye);
function je(Ae) {
P.emit(Ae, ce, pe, M);
}
function pt() {
re && je("over");
}
function Je() {
pe && je("out");
}
}
function ie(j, Q, U) {
(j === Q || j === b(Q)) && (K = b(Q)), (j === null && U || j !== Q && j !== b(Q)) && (K = j);
}
function me(j) {
s.rm(j, "gu-hide");
}
function ve(j) {
P.dragging && s.add(j, "gu-hide");
}
function Se() {
R || (R = document.createElement("div"), R.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", R.innerHTML = Y.getMirrorText && Y.getMirrorText(O) || "控件", s.add(R, "gu-mirror"), Y.mirrorContainer.appendChild(R), v(c, "add", "mousemove", Ue), s.add(Y.mirrorContainer, "gu-unselectable"), P.emit("cloned", R, O, "mirror"));
}
function Ee() {
if (L = document.createElement("div"), s.add(L, "gu-insertion"), O) {
var j = O.getBoundingClientRect();
L.style.left = j.left + "px", L.style.top = j.top + "px";
}
H = !1, Y.mirrorContainer.appendChild(L);
}
function $e() {
R && (s.rm(Y.mirrorContainer, "gu-unselectable"), v(c, "remove", "mousemove", Ue), F(R).removeChild(R), R = null);
}
function Ge() {
L && (F(L).removeChild(L), L = null);
}
function ot(j, Q) {
for (var U = Q; U !== j && F(U) !== j; )
U = F(U);
return U === c ? null : U;
}
function it(j, Q) {
if (!Q)
return H;
var U = j || Q && Q.lastElementChild;
if (!U)
return !0;
var ce = getComputedStyle(j), ge = /^inline/.test(ce.getPropertyValue("display")) || /^(left|right)$/.test(ce.getPropertyValue("float"));
if (ge)
return !0;
if (Q) {
var ye = getComputedStyle(Q), re = ye.getPropertyValue("display");
if (/flex$/.test(re)) {
var _e = ye.getPropertyValue("flex-direction") || "row";
if (_e === "row" || _e === "row-reverse")
return !Xe(Q);
}
return !1;
}
return !0;
}
function Xe(j) {
if (!j.children || !j.children.length)
return !1;
for (const Q of Array.from(j.children)) {
const ce = (Q.className && Q.className.split(" ") || []).filter((ge) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ge));
if (!ce.length)
return !1;
for (const ge of ce) {
const ye = ge.slice(ge.lastIndexOf("-") + 1);
if (parseInt(ye, 10) !== 12)
return !1;
}
}
return !0;
}
function G(j, Q) {
const U = Q.getBoundingClientRect();
if (L.style.left = U.left + "px", L.style.top = U.top + "px", H) {
if (L.style.height = U.height + "px", L.style.width = "4px", j) {
const ce = j.getBoundingClientRect();
ce.top !== U.top && (L.style.left = ce.right + "px", L.style.top = ce.top + "px", L.style.height = ce.height + "px");
}
} else if (L.style.height = "4px", L.style.width = U.width + "px", J) {
const ce = J.getBoundingClientRect();
U.top < ce.top && (L.style.display = "none");
}
Q === O && O && (L.style.display = "none");
}
function he(j) {
K = null;
var Q = j.lastElementChild;
if (Q) {
var U = Q.getBoundingClientRect();
H ? (L.style.left = U.right + "px", L.style.top = U.top + "px", L.style.height = U.height + "px", L.style.width = "4px") : (L.style.left = U.left + "px", L.style.top = U.bottom + "px", L.style.height = "4px", L.style.width = U.width + "px"), Q === O && O && (L.style.display = "none");
} else
L.style.display = "none";
}
function Ce(j, Q) {
if (!Y.mirrorContainer.contains(j) || !window.scrollContainerList || !Arra