@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,175 lines • 704 kB
JavaScript
var ls = Object.defineProperty;
var is = (e, t, n) => t in e ? ls(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var Me = (e, t, n) => is(e, typeof t != "symbol" ? t + "" : t, n);
import { ref as b, defineComponent as Ne, computed as $, watch as ae, createVNode as p, Fragment as st, reactive as it, createApp as po, onUnmounted as Nt, onMounted as et, Transition as al, mergeProps as Lt, nextTick as dt, createTextVNode as Ge, inject as he, withDirectives as $t, resolveDirective as Cn, onBeforeMount as ta, provide as ft, triggerRef as rs, onBeforeUnmount as na, isVNode as sn, watchEffect as ll, Teleport as il, shallowRef as Xn, render as Ho, h as ss, cloneVNode as us, withModifiers as rl, toRaw as cs, vModelCheckbox as sl, vModelText as oa, resolveComponent as ds, vShow as fs, onUpdated as ps, Comment as ul, getCurrentInstance as cl } from "vue";
import "bignumber.js";
import { isUndefined as Kt, cloneDeep as Dt, mergeWith as aa, merge as fn, findIndex as ja, isPlainObject as $a, isNil as ms, isNaN as vs, flatten as gs, throttle as hs, get as dn, debounce as mo, isEmpty as ys } from "lodash-es";
import { LocaleService as nt } from "../components/locale/index.esm.js";
import { getCustomClass as Vt, withInstall as Nn, FormSchemaEntityField$Type as lo, FormSchemaEntityFieldTypeName as za, useThirdComponent as dl, isMobilePhone as rn, getMaxZIndex as _a, resolveField as En, encrypt as bs, FormSchemaEntityFieldType$Type as Cs, useCommonUtils as la, getCustomStyle as Ha, useGuid as ws } from "../components/common/index.esm.js";
import { useResizeObserver as fl } from "@vueuse/core";
import { getHierarchyRow as Ss, useIdentify as ia, useGroupData as ra, useFilter as sa, useHierarchy as ua, useLoading as pl, useDataView as ca, useSelection as da, useSelectHierarchyItem as Ts, usePagination as fa, useDataViewContainerStyle as ml, useCommandColumn as vl, useSettingColumn as gl, useColumn as pa, useSort as hl, useGroupColumn as yl, useRow as ma, useEdit as va, useVisualDataBound as ga, useVisualDataCell as ha, useVisualDataRow as ya, useVisualData as ba, useCellPosition as bl, useSidebar as Ca, useVirtualScroll as wa, useFitColumn as Cl, useFilterHistory as wl, useColumnFilter as Sl, useDragColumn as Tl, getColumnHeader as Fl, getSidebar as xl, getDisableMask as kl, getHorizontalScrollbar as Il, getVerticalScrollbar as Pl, getEmpty as El, getPagination as Bl, getSummary as Ml, ColumnSettingSolution as Ol, COMMAND_COLUMN_DATA_TYPE as Yt, SETTING_COLUMN_DATA_TYPE as Jt, useVisualGroupRow as Dl, useVisualSummaryRow as Ll, SETTING_COLUMN_FIELD as Fs, COMMAND_COLUMN_FIELD as xs, CellMode as Vl, useMobile as ks, useCellContentStyle as Is, getFilterPanel as Ps, getGroupPanel as Es, useNavigation as Bs } from "../components/data-view/index.esm.js";
import Ms from "../components/input-group/index.esm.js";
import Wo from "../components/button/index.esm.js";
import { resolveAppearance as Rn, createPropsResolver as Wt, schemaResolverMap as Os, propertyEffectMap as Ds, propertyConfigSchemaMap as Ls, schemaMap as Vs, schemaResolverMapForDesigner as Nl, propertyEffectMapForDesigner as Rl, propertyConfigSchemaMapForDesigner as Al, schemaMapForDesigner as jl, getSchemaByTypeForDesigner as $l, getPropsResolverGenerator as Ns, createEventsResolver as zl, createFormBindingResolver as Rs } from "../components/dynamic-resolver/index.esm.js";
import { useDesignerComponent as vo, DgControl as de, FDesignerCanvas as As, canvasChanged as Yn, refreshCanvas as js } from "../components/designer-canvas/index.esm.js";
import { loadRegister as $s, useComponentManager as zs, useBindingData as _s, useEntityState as Hs, useDynamicViewUtils as Us, componentMap as Uo, resolverMap as Gs, componentPropsConverter as Ws } from "../components/dynamic-view/index.esm.js";
import qo from "../components/section/index.esm.js";
import _l from "../components/accordion/index.esm.js";
import Hl from "../components/avatar/index.esm.js";
import Sa from "./button-edit/index.esm.js";
import Ul from "../components/button-group/index.esm.js";
import Gl from "../components/calendar/index.esm.js";
import Wl from "./capsule/index.esm.js";
import Xo from "./checkbox/index.esm.js";
import io from "./checkbox-group/index.esm.js";
import ql, { FComboList as Xl } from "../components/combo-list/index.esm.js";
import qs from "../components/combo-tree/index.esm.js";
import Yl from "../components/component/index.esm.js";
import Jl from "../components/color-picker/index.esm.js";
import Ql from "../components/content-container/index.esm.js";
import Zl from "./date-picker/index.esm.js";
import Kl from "./data-grid/index.esm.js";
import ei from "../components/dropdown/index.esm.js";
import ti from "./dynamic-form/index.esm.js";
import Xs from "../components/events-editor/index.esm.js";
import ni from "../components/filter-bar/index.esm.js";
import Ys, { FieldSelectorRepositoryToken as Jn } from "../components/field-selector/index.esm.js";
import Js, { FBindingSelectorContainer as Qs } from "../components/binding-selector/index.esm.js";
import oi from "../components/image-cropper/index.esm.js";
import ai from "./input-group/index.esm.js";
import Ta, { FLayout as Zs, FLayoutPane as ro } from "../components/layout/index.esm.js";
import li from "../components/list-nav/index.esm.js";
import ii from "./list-view/index.esm.js";
import ri from "../components/lookup/index.esm.js";
import Ks from "../components/mapping-editor/index.esm.js";
import si from "../components/nav/index.esm.js";
import ui from "../components/number-range/index.esm.js";
import ci from "./number-spinner/index.esm.js";
import di from "../components/order/index.esm.js";
import fi from "../components/page-header/index.esm.js";
import pi from "../components/page-footer/index.esm.js";
import mi from "../components/pagination/index.esm.js";
import vi from "../components/progress/index.esm.js";
import gi from "../components/query-solution/index.esm.js";
import hi from "./radio-group/index.esm.js";
import yi from "./rate/index.esm.js";
import bi from "./response-toolbar/index.esm.js";
import Ci from "../components/response-layout/index.esm.js";
import wi from "./response-layout-editor/index.esm.js";
import Si from "../components/search-box/index.esm.js";
import Ti from "./section/index.esm.js";
import Fi from "../components/smoke-detector/index.esm.js";
import xi from "../components/splitter/index.esm.js";
import ki from "../components/step/index.esm.js";
import Ii from "./switch/index.esm.js";
import Pi from "./tabs/index.esm.js";
import Ei from "./tags/index.esm.js";
import Bi from "../components/text/index.esm.js";
import Mi from "./time-picker/index.esm.js";
import Oi from "../components/transfer/index.esm.js";
import Bn, { FTreeView as eu } from "../components/tree-view/index.esm.js";
import Di from "../components/uploader/index.esm.js";
import Li from "../components/verify-detail/index.esm.js";
import Vi from "../components/video/index.esm.js";
import Ni from "./textarea/index.esm.js";
import tu from "../components/schema-selector/index.esm.js";
import Ri from "./tree-grid/index.esm.js";
import nu from "../components/event-parameter/index.esm.js";
import ou from "../components/filter-condition-editor/index.esm.js";
import Ai from "../components/fieldset/index.esm.js";
import au from "../components/sort-condition-editor/index.esm.js";
import lu from "../components/menu-lookup/index.esm.js";
import ji from "./drawer/index.esm.js";
import iu from "../components/json-editor/index.esm.js";
import ru from "../components/property-editor/index.esm.js";
import su from "../components/expression-editor/index.esm.js";
import uu from "../components/code-editor/index.esm.js";
import $i from "../components/html-template/index.esm.js";
import cu from "../components/collection-property-editor/index.esm.js";
import du from "./modal/index.esm.js";
import zi from "../components/external-container/index.esm.js";
import _i from "../components/language-textbox/index.esm.js";
import Hi from "../components/image/index.esm.js";
import Ui from "../components/comment/index.esm.js";
import { BaseControlProperty as fu, InputBaseProperty as pu, ExpressionProperty as mu } from "../components/property-panel/index.esm.js";
import { FNotifyService as Gi, F_NOTIFY_SERVICE_TOKEN as Fa } from "../components/notify/index.esm.js";
import { F_MODAL_SERVICE_TOKEN as Wi } from "../components/modal/index.esm.js";
import vu, { FButtonEdit as qi } from "../components/button-edit/index.esm.js";
import { FDataGrid as go } from "../components/data-grid/index.esm.js";
import { FTreeGrid as xa } from "../components/tree-grid/index.esm.js";
import Xi from "../components/popover/index.esm.js";
import gu, { FDynamicFormGroup as hu, FDynamicForm as yu, FDynamicFormLabel as bu } from "../components/dynamic-form/index.esm.js";
import Cu, { FTabPage as wu } from "../components/tabs/index.esm.js";
import Su from "../components/textarea/index.esm.js";
import Tu from "../components/capsule/index.esm.js";
import Fu from "../components/response-toolbar/index.esm.js";
import xu from "../components/list-view/index.esm.js";
import ku from "../components/loading/index.esm.js";
import { FCheckbox as ka } from "../components/checkbox/index.esm.js";
import Iu from "../components/tags/index.esm.js";
import Pu from "../components/drawer/index.esm.js";
const Eu = ["moz", "ms", "webkit"];
function Bu() {
let e = 0;
return (t) => {
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), a = setTimeout(() => {
t(n + o);
}, o);
return e = n + o, a;
};
}
function Mu() {
if (typeof window > "u")
return () => 0;
if (window.requestAnimationFrame)
return window.requestAnimationFrame.bind(window);
const e = Eu.filter((t) => `${t}RequestAnimationFrame` in window)[0];
return e ? window[`${e}RequestAnimationFrame`] : Bu();
}
Mu();
const bh = Symbol("controller schema repository inject token"), Ch = Symbol("form schema repository inject token"), on = b(0);
function Ou() {
on.value++;
}
function Du(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), a = o.top >= n.top, l = o.top <= n.bottom;
return a && l;
}
function Yi(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 a = o.getBoundingClientRect();
o.style.top = n.top + "px";
let l = n.left - a.width;
const i = document.querySelector(".editorDiv");
if (i) {
const r = i.getBoundingClientRect();
l < r.left && ({ left: l } = e.getBoundingClientRect());
}
o.style.left = l + "px";
}
}
}
function Ji(e) {
var n, o, a, l, i;
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length)
if (t.length === 1) {
const r = t[0], d = document.querySelector(`[id=${r}]`);
if (d && d.contains(e))
return d;
} else {
const { componentInstance: r } = e;
if (((n = r == null ? void 0 : r.value) == null ? void 0 : n.scrollElementId) === ((o = r == null ? void 0 : r.value.schema) == null ? void 0 : o.id))
return e;
if (((a = r == null ? void 0 : r.value) == null ? void 0 : a.scrollElementId) === `${(l = r == null ? void 0 : r.value.schema) == null ? void 0 : l.id}-design-item`)
return e.parentElement;
if ((i = r.value.parent) != null && i.elementRef)
return Ji(r.value.parent.elementRef);
}
}
function Ia(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 a = Ji(e);
if (a && (o = Du(e, a)), !o) {
n.style.display = "none";
return;
}
Yi(e);
}
}
function Mn(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && Ia(t);
}
function wh() {
const e = document.querySelector(".dgComponentSelected");
if (!e)
return;
const t = e.querySelector(".component-btn-group");
t && t.getBoundingClientRect().top !== 0 && Yi(e);
}
const Lu = {
/**
* 组件值
*/
modelValue: { type: Object, default: {} },
componentId: { type: String, default: "" },
components: { type: Array },
canvasMode: { type: String, default: "PC" }
};
var en = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Vu(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function qn(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 Qi = { exports: {} };
(function(e, t) {
(function(n) {
e.exports = n();
})(function() {
return (/* @__PURE__ */ function() {
function n(o, a, l) {
function i(c, u) {
if (!a[c]) {
if (!o[c]) {
var s = typeof qn == "function" && qn;
if (!u && s) return s(c, !0);
if (r) return r(c, !0);
var g = new Error("Cannot find module '" + c + "'");
throw g.code = "MODULE_NOT_FOUND", g;
}
var f = a[c] = { exports: {} };
o[c][0].call(f.exports, function(m) {
var v = o[c][1][m];
return i(v || m);
}, f, f.exports, n, o, a, l);
}
return a[c].exports;
}
for (var r = typeof qn == "function" && qn, d = 0; d < l.length; d++) i(l[d]);
return i;
}
return n;
}())({
1: [function(n, o, a) {
var l = {}, i = "(?:^|\\s)", r = "(?:\\s|$)";
function d(s) {
var g = l[s];
return g ? g.lastIndex = 0 : l[s] = g = new RegExp(i + s + r, "g"), g;
}
function c(s, g) {
var f = s.className;
f.length ? d(g).test(f) || (s.className += " " + g) : s.className = g;
}
function u(s, g) {
s.className = s.className.replace(d(g), " ").trim();
}
o.exports = {
add: c,
rm: u
};
}, {}],
2: [function(n, o, a) {
(function(l) {
var i = n("contra/emitter"), r = n("crossvent"), d = n("./classes"), c = document, u = c.documentElement;
function s(V, M) {
var _ = arguments.length;
_ === 1 && Array.isArray(V) === !1 && (M = V, V = []);
var A, R, w, F, E, B, D, N, U, J = null, z, G, Z = !1, te = 0, W, H = M || {};
H.moves === void 0 && (H.moves = C), H.accepts === void 0 && (H.accepts = C), H.invalid === void 0 && (H.invalid = Te), H.containers === void 0 && (H.containers = V || []), H.isContainer === void 0 && (H.isContainer = h), H.copy === void 0 && (H.copy = !1), H.copySortSource === void 0 && (H.copySortSource = !1), H.revertOnSpill === void 0 && (H.revertOnSpill = !1), H.removeOnSpill === void 0 && (H.removeOnSpill = !1), H.direction === void 0 && (H.direction = "vertical"), H.ignoreInputTextSelection === void 0 && (H.ignoreInputTextSelection = !0), H.mirrorContainer === void 0 && (H.mirrorContainer = c.body);
var j = i({
containers: H.containers,
start: ke,
end: Se,
cancel: qe,
remove: ue,
destroy: re,
canMove: Le,
dragging: !1
});
return H.removeOnSpill === !0 && j.on("over", zt).on("out", _t), q(), j;
function Y(Q) {
return j.containers.indexOf(Q) !== -1 || H.isContainer(Q);
}
function q(Q) {
var me = Q ? "remove" : "add";
m(u, me, "mousedown", Ce), m(u, me, "mouseup", We);
}
function oe(Q) {
var me = Q ? "remove" : "add";
m(u, me, "mousemove", we);
}
function K(Q) {
var me = Q ? "remove" : "add";
r[me](u, "selectstart", ie), r[me](u, "click", ie);
}
function re() {
q(!0), We({});
}
function ie(Q) {
z && Q.preventDefault();
}
function Ce(Q) {
F = Q.clientX, E = Q.clientY;
var me = v(Q) !== 1 || Q.metaKey || Q.ctrlKey;
if (!me) {
var ve = Q.target, Ve = Re(ve);
Ve && (z = Ve, oe(), Q.type === "mousedown" && (O(ve) ? ve.focus() : Q.preventDefault()));
}
}
function we(Q) {
if (z) {
if (v(Q) === 0) {
We({});
return;
}
if (!(Q.clientX !== void 0 && Math.abs(Q.clientX - F) <= (H.slideFactorX || 0) && Q.clientY !== void 0 && Math.abs(Q.clientY - E) <= (H.slideFactorY || 0))) {
if (H.ignoreInputTextSelection) {
var me = S("clientX", Q) || 0, ve = S("clientY", Q) || 0, Ve = c.elementFromPoint(me, ve);
if (O(Ve))
return;
}
var Qe = z;
oe(!0), K(), Se(), ce(Qe), d.add(N || w, "gu-transit"), Ae(), ne(), te = 0, Xe(Q);
}
}
}
function Re(Q) {
if (!(j.dragging && A) && !Y(Q)) {
for (var me = Q; I(Q) && Y(I(Q)) === !1; )
if (H.invalid(Q, me) || (Q = I(Q), !Q))
return;
var ve = I(Q);
if (ve && !H.invalid(Q, me)) {
var Ve = H.moves(Q, ve, me, k(Q));
if (Ve)
return {
item: Q,
source: ve
};
}
}
}
function Le(Q) {
return !!Re(Q);
}
function ke(Q) {
var me = Re(Q);
me && ce(me);
}
function ce(Q) {
yt(Q.item, Q.source) && (N = Q.item.cloneNode(!0), j.emit("cloned", N, Q.item, "copy")), R = Q.source, w = Q.item, B = D = k(Q.item), j.dragging = !0, j.emit("drag", w, R);
}
function Te() {
return !1;
}
function Se() {
if (j.dragging) {
var Q = N || w;
vt(Q, I(Q));
}
}
function Fe() {
z = !1, oe(!0), K(!0);
}
function We(Q) {
if (Fe(), !!j.dragging) {
var me = N || w, ve = S("clientX", Q) || 0, Ve = S("clientY", Q) || 0, Qe = y(A, ve, Ve), Ke = Ye(Qe, ve, Ve);
Ke && (N && H.copySortSource || !N || Ke !== R) ? vt(me, Ke) : H.removeOnSpill ? ue() : qe();
}
}
function vt(Q, me) {
var ve = I(Q);
N && H.copySortSource && me === R && ve.removeChild(w), Oe(me) ? j.emit("cancel", Q, R) : j.emit("drop", Q, me, R, D), le();
}
function ue() {
if (j.dragging) {
var Q = N || w, me = I(Q);
me && me.removeChild(Q), j.emit(N ? "cancel" : "remove", Q, me, R), le();
}
}
function qe(Q) {
if (j.dragging) {
var me = arguments.length > 0 ? Q : H.revertOnSpill, ve = N || w, Ve = I(ve), Qe = Oe(Ve);
Qe === !1 && me && (N ? Ve && Ve.removeChild(N) : R.insertBefore(ve, B)), Qe || me ? j.emit("cancel", ve, R, R) : j.emit("drop", ve, Ve, R, D), le();
}
}
function le() {
var Q = N || w;
Fe(), Je(), X(), Q && d.rm(Q, "gu-transit"), U && clearTimeout(U), j.dragging = !1, J && j.emit("out", Q, J, R), j.emit("dragend", Q, te), R = w = N = B = D = U = J = null;
}
function Oe(Q, me) {
var ve;
return me !== void 0 ? ve = me : A ? ve = D : ve = k(N || w), Q === R && ve === B;
}
function Ye(Q, me, ve) {
for (var Ve = Q; Ve && !Qe(); )
Ve = I(Ve);
return Ve;
function Qe() {
var Ke = Y(Ve);
if (Ke === !1)
return !1;
var Tt = ye(Ve, Q), xt = wt(Ve, Tt, me, ve), Bt = Oe(Ve, xt);
return Bt ? !0 : H.accepts(w, Ve, R, xt);
}
}
function Xe(Q) {
if (!A)
return;
Q.preventDefault();
var me = S("clientX", Q) || 0, ve = S("clientY", Q) || 0;
A.style.left = me - 2 + "px", A.style.top = ve - 2 + "px";
var Ve = N || w, Qe = y(A, me, ve), Ke = Ye(Qe, me, ve), Tt = Ke !== null && Ke !== J;
(Tt || Ke === null) && (It(), J = Ke, Mt()), _e(Qe, ve);
var xt = I(Ve);
if (Ke === R && N && !H.copySortSource) {
xt && xt.removeChild(Ve);
return;
}
var Bt, kt = ye(Ke, Qe);
if (Z = xe(kt, Ke), kt !== null)
Bt = wt(Ke, kt, me, ve);
else if (H.revertOnSpill === !0 && !N)
Bt = B, Ke = R;
else {
N && xt && xt.removeChild(Ve), N && G && (G.style.display = "none");
return;
}
G.style.display = "block", pt(Bt, Ve, Tt), Bt ? ze(kt, Bt) : $e(Ke);
function bt(St) {
j.emit(St, Ve, J, R);
}
function Mt() {
Tt && bt("over");
}
function It() {
J && bt("out");
}
}
function pt(Q, me, ve) {
(Q === me || Q === k(me)) && (D = k(me)), (Q === null && ve || Q !== me && Q !== k(me)) && (D = Q);
}
function zt(Q) {
d.rm(Q, "gu-hide");
}
function _t(Q) {
j.dragging && d.add(Q, "gu-hide");
}
function ne() {
A || (A = document.createElement("div"), A.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;", A.innerHTML = H.getMirrorText && H.getMirrorText(w) || "控件", d.add(A, "gu-mirror"), H.mirrorContainer.appendChild(A), m(u, "add", "mousemove", Xe), d.add(H.mirrorContainer, "gu-unselectable"), j.emit("cloned", A, w, "mirror"));
}
function Ae() {
if (G = document.createElement("div"), d.add(G, "gu-insertion"), w) {
var Q = w.getBoundingClientRect();
G.style.left = Q.left + "px", G.style.top = Q.top + "px";
}
Z = !1, H.mirrorContainer.appendChild(G);
}
function Je() {
A && (d.rm(H.mirrorContainer, "gu-unselectable"), m(u, "remove", "mousemove", Xe), I(A).removeChild(A), A = null);
}
function X() {
G && (I(G).removeChild(G), G = null);
}
function ye(Q, me) {
for (var ve = me; ve !== Q && I(ve) !== Q; )
ve = I(ve);
return ve === u ? null : ve;
}
function xe(Q, me) {
if (!me)
return Z;
var ve = Q || me && me.lastElementChild;
if (!ve)
return !0;
var Ve = getComputedStyle(Q), Qe = /^inline/.test(Ve.getPropertyValue("display")) || /^(left|right)$/.test(Ve.getPropertyValue("float"));
if (Qe)
return !0;
if (me) {
var Ke = getComputedStyle(me), Tt = Ke.getPropertyValue("display");
if (/flex$/.test(Tt)) {
var xt = Ke.getPropertyValue("flex-direction") || "row";
if (xt === "row" || xt === "row-reverse")
return !je(me);
}
return !1;
}
return !0;
}
function je(Q) {
if (!Q.children || !Q.children.length)
return !1;
for (const me of Array.from(Q.children)) {
const Ve = (me.className && me.className.split(" ") || []).filter((Qe) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Qe));
if (!Ve.length)
return !1;
for (const Qe of Ve) {
const Ke = Qe.slice(Qe.lastIndexOf("-") + 1);
if (parseInt(Ke, 10) !== 12)
return !1;
}
}
return !0;
}
function ze(Q, me) {
const ve = me.getBoundingClientRect();
if (G.style.left = ve.left + "px", G.style.top = ve.top + "px", Z) {
if (G.style.height = ve.height + "px", G.style.width = "4px", Q) {
const Ve = Q.getBoundingClientRect();
Ve.top !== ve.top && (G.style.left = Ve.right + "px", G.style.top = Ve.top + "px", G.style.height = Ve.height + "px");
}
} else if (G.style.height = "4px", G.style.width = ve.width + "px", W) {
const Ve = W.getBoundingClientRect();
ve.top < Ve.top && (G.style.display = "none");
}
me === w && w && (G.style.display = "none");
}
function $e(Q) {
D = null;
var me = Q.lastElementChild;
if (me) {
var ve = me.getBoundingClientRect();
Z ? (G.style.left = ve.right + "px", G.style.top = ve.top + "px", G.style.height = ve.height + "px", G.style.width = "4px") : (G.style.left = ve.left + "px", G.style.top = ve.bottom + "px", G.style.height = "4px", G.style.width = ve.width + "px"), me === w && w && (G.style.display = "none");
} else
G.style.display = "none";
}
function _e(Q, me) {
if (!H.mirrorContainer.contains(Q) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (W = g(Q), !W || !W.contains(Q)))
return;
const ve = document.querySelector(".dgComponentSelected"), Ve = W.getBoundingClientRect();
if (me - 30 < Ve.top && W.scrollTop > 0) {
let Qe = W.scrollTop < 10 ? W.scrollTop : 10;
W.scrollBy(0, -1 * Qe), ve && W.contains(ve) && (te = te + -1 * Qe);
}
if (me + 30 > Ve.bottom && W.scrollTop < W.scrollHeight - W.clientHeight) {
const Qe = W.scrollHeight - W.clientHeight - W.scrollTop;
let Ke = Qe < 10 ? Qe : 10;
W.scrollBy(0, Ke), ve && W.contains(ve) && (te = te + Ke);
}
}
function wt(Q, me, ve, Ve) {
var Qe = H.direction === "horizontal", Ke = H.direction === "mixed", Tt = me !== Q ? Bt() : xt();
return Tt;
function xt() {
var bt = Q.children.length, Mt, It, St;
for (Mt = 0; Mt < bt; Mt++)
if (It = Q.children[Mt], St = It.getBoundingClientRect(), Qe && St.left + St.width / 2 > ve || !Ke && !Qe && St.top + St.height / 2 > Ve || Ke && St.left + St.width > ve && St.top + St.height > Ve)
return It;
return null;
}
function Bt() {
var bt = me.getBoundingClientRect();
if (Ke) {
var Mt = Ve - bt.top, It = ve - bt.left, St = bt.bottom - Ve, Ht = bt.right - ve, un = Math.min(It, Ht, Mt, St), qt;
return Z ? qt = Ht < It : qt = St === un || Ht === un || It === un, kt(qt);
}
return kt(Qe ? ve > bt.left + L(bt) / 2 : Ve > bt.top + x(bt) / 2);
}
function kt(bt) {
return bt ? k(me) : me;
}
}
function yt(Q, me) {
return typeof H.copy == "boolean" ? H.copy : H.copy(Q, me);
}
}
function g(V) {
const M = Array.from(window.scrollContainerList);
if (M.length === 1) {
const A = Array.from(window.scrollContainerList)[0];
return document.getElementById(A);
}
const _ = f(M);
for (const A of _)
if (A.contains(V))
return A;
return null;
}
function f(V) {
const M = [];
return V.forEach((_) => {
const A = document.getElementById(_);
A && M.push(A);
}), M.sort((_, A) => _.contains(A) ? 1 : A.contains(_) ? -1 : 0), M;
}
function m(V, M, _, A) {
var R = {
mouseup: "touchend",
mousedown: "touchstart",
mousemove: "touchmove"
}, w = {
mouseup: "pointerup",
mousedown: "pointerdown",
mousemove: "pointermove"
}, F = {
mouseup: "MSPointerUp",
mousedown: "MSPointerDown",
mousemove: "MSPointerMove"
};
l.navigator.pointerEnabled ? r[M](V, w[_], A) : l.navigator.msPointerEnabled ? r[M](V, F[_], A) : (r[M](V, R[_], A), r[M](V, _, A));
}
function v(V) {
if (V.touches !== void 0)
return V.touches.length;
if (V.which !== void 0 && V.which !== 0)
return V.which;
if (V.buttons !== void 0)
return V.buttons;
var M = V.button;
if (M !== void 0)
return M & 1 ? 1 : M & 2 ? 3 : M & 4 ? 2 : 0;
}
function y(V, M, _) {
V = V || {};
var A = V.className || "", R;
return V.className += " gu-hide", R = c.elementFromPoint(M, _), V.className = A, R;
}
function h() {
return !1;
}
function C() {
return !0;
}
function L(V) {
return V.width || V.right - V.left;
}
function x(V) {
return V.height || V.bottom - V.top;
}
function I(V) {
return V.parentNode === c ? null : V.parentNode;
}
function O(V) {
return V.tagName === "INPUT" || V.tagName === "TEXTAREA" || V.tagName === "SELECT" || P(V);
}
function P(V) {
return !V || V.contentEditable === "false" ? !1 : V.contentEditable === "true" ? !0 : P(I(V));
}
function k(V) {
return V.nextElementSibling || M();
function M() {
var _ = V;
do
_ = _.nextSibling;
while (_ && _.nodeType !== 1);
return _;
}
}
function T(V) {
return V.targetTouches && V.targetTouches.length ? V.targetTouches[0] : V.changedTouches && V.changedTouches.length ? V.changedTouches[0] : V;
}
function S(V, M) {
var _ = T(M), A = {
pageX: "clientX",
// IE8
pageY: "clientY"
// IE8
};
return V in A && !(V in _) && A[V] in _ && (V = A[V]), _[V];
}
o.exports = s;
}).call(this, typeof en < "u" ? en : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
3: [function(n, o, a) {
o.exports = function(i, r) {
return Array.prototype.slice.call(i, r);
};
}, {}],
4: [function(n, o, a) {
var l = n("ticky");
o.exports = function(r, d, c) {
r && l(function() {
r.apply(c || null, d || []);
});
};
}, { ticky: 10 }],
5: [function(n, o, a) {
var l = n("atoa"), i = n("./debounce");
o.exports = function(d, c) {
var u = c || {}, s = {};
return d === void 0 && (d = {}), d.on = function(g, f) {
return s[g] ? s[g].push(f) : s[g] = [f], d;
}, d.once = function(g, f) {
return f._once = !0, d.on(g, f), d;
}, d.off = function(g, f) {
var m = arguments.length;
if (m === 1)
delete s[g];
else if (m === 0)
s = {};
else {
var v = s[g];
if (!v)
return d;
v.splice(v.indexOf(f), 1);
}
return d;
}, d.emit = function() {
var g = l(arguments);
return d.emitterSnapshot(g.shift()).apply(this, g);
}, d.emitterSnapshot = function(g) {
var f = (s[g] || []).slice(0);
return function() {
var m = l(arguments), v = this || d;
if (g === "error" && u.throws !== !1 && !f.length)
throw m.length === 1 ? m[0] : m;
return f.forEach(function(h) {
u.async ? i(h, m, v) : h.apply(v, m), h._once && d.off(g, h);
}), d;
};
}, d;
};
}, { "./debounce": 4, atoa: 3 }],
6: [function(n, o, a) {
(function(l) {
var i = n("custom-event"), r = n("./eventmap"), d = l.document, c = g, u = m, s = [];
l.addEventListener || (c = f, u = v), o.exports = {
add: c,
remove: u,
fabricate: y
};
function g(I, O, P, k) {
return I.addEventListener(O, P, k);
}
function f(I, O, P) {
return I.attachEvent("on" + O, C(I, O, P));
}
function m(I, O, P, k) {
return I.removeEventListener(O, P, k);
}
function v(I, O, P) {
var k = L(I, O, P);
if (k)
return I.detachEvent("on" + O, k);
}
function y(I, O, P) {
var k = r.indexOf(O) === -1 ? S() : T();
I.dispatchEvent ? I.dispatchEvent(k) : I.fireEvent("on" + O, k);
function T() {
var V;
return d.createEvent ? (V = d.createEvent("Event"), V.initEvent(O, !0, !0)) : d.createEventObject && (V = d.createEventObject()), V;
}
function S() {
return new i(O, { detail: P });
}
}
function h(I, O, P) {
return function(T) {
var S = T || l.event;
S.target = S.target || S.srcElement, S.preventDefault = S.preventDefault || function() {
S.returnValue = !1;
}, S.stopPropagation = S.stopPropagation || function() {
S.cancelBubble = !0;
}, S.which = S.which || S.keyCode, P.call(I, S);
};
}
function C(I, O, P) {
var k = L(I, O, P) || h(I, O, P);
return s.push({
wrapper: k,
element: I,
type: O,
fn: P
}), k;
}
function L(I, O, P) {
var k = x(I, O, P);
if (k) {
var T = s[k].wrapper;
return s.splice(k, 1), T;
}
}
function x(I, O, P) {
var k, T;
for (k = 0; k < s.length; k++)
if (T = s[k], T.element === I && T.type === O && T.fn === P)
return k;
}
}).call(this, typeof en < "u" ? en : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, { "./eventmap": 7, "custom-event": 8 }],
7: [function(n, o, a) {
(function(l) {
var i = [], r = "", d = /^on/;
for (r in l)
d.test(r) && i.push(r.slice(2));
o.exports = i;
}).call(this, typeof en < "u" ? en : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, {}],
8: [function(n, o, a) {
(function(l) {
var i = l.CustomEvent;
function r() {
try {
var d = new i("cat", { detail: { foo: "bar" } });
return d.type === "cat" && d.detail.foo === "bar";
} catch {
}
return !1;
}
o.exports = r() ? i : (
// IE >= 9
typeof document < "u" && typeof document.createEvent == "function" ? function(c, u) {
var s = document.createEvent("CustomEvent");
return u ? s.initCustomEvent(c, u.bubbles, u.cancelable, u.detail) : s.initCustomEvent(c, !1, !1, void 0), s;
} : (
// IE <= 8
function(c, u) {
var s = document.createEventObject();
return s.type = c, u ? (s.bubbles = !!u.bubbles, s.cancelable = !!u.cancelable, s.detail = u.detail) : (s.bubbles = !1, s.cancelable = !1, s.detail = void 0), s;
}
)
);
}).call(this, typeof en < "u" ? en : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, {}],
9: [function(n, o, a) {
var l = o.exports = {}, i, r;
function d() {
throw new Error("setTimeout has not been defined");
}
function c() {
throw new Error("clearTimeout has not been defined");
}
(function() {
try {
typeof setTimeout == "function" ? i = setTimeout : i = d;
} catch {
i = d;
}
try {
typeof clearTimeout == "function" ? r = clearTimeout : r = c;
} catch {
r = c;
}
})();
function u(x) {
if (i === setTimeout)
return setTimeout(x, 0);
if ((i === d || !i) && setTimeout)
return i = setTimeout, setTimeout(x, 0);
try {
return i(x, 0);
} catch {
try {
return i.call(null, x, 0);
} catch {
return i.call(this, x, 0);
}
}
}
function s(x) {
if (r === clearTimeout)
return clearTimeout(x);
if ((r === c || !r) && clearTimeout)
return r = clearTimeout, clearTimeout(x);
try {
return r(x);
} catch {
try {
return r.call(null, x);
} catch {
return r.call(this, x);
}
}
}
var g = [], f = !1, m, v = -1;
function y() {
!f || !m || (f = !1, m.length ? g = m.concat(g) : v = -1, g.length && h());
}
function h() {
if (!f) {
var x = u(y);
f = !0;
for (var I = g.length; I; ) {
for (m = g, g = []; ++v < I; )
m && m[v].run();
v = -1, I = g.length;
}
m = null, f = !1, s(x);
}
}
l.nextTick = function(x) {
var I = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var O = 1; O < arguments.length; O++)
I[O - 1] = arguments[O];
g.push(new C(x, I)), g.length === 1 && !f && u(h);
};
function C(x, I) {
this.fun = x, this.array = I;
}
C.prototype.run = function() {
this.fun.apply(null, this.array);
}, l.title = "browser", l.browser = !0, l.env = {}, l.argv = [], l.version = "", l.versions = {};
function L() {
}
l.on = L, l.addListener = L, l.once = L, l.off = L, l.removeListener = L, l.removeAllListeners = L, l.emit = L, l.prependListener = L, l.prependOnceListener = L, l.listeners = function(x) {
return [];
}, l.binding = function(x) {
throw new Error("process.binding is not supported");
}, l.cwd = function() {
return "/";
}, l.chdir = function(x) {
throw new Error("process.chdir is not supported");
}, l.umask = function() {
return 0;
};
}, {}],
10: [function(n, o, a) {
(function(l) {
var i = typeof l == "function", r;
i ? r = function(d) {
l(d);
} : r = function(d) {
setTimeout(d, 0);
}, o.exports = r;
}).call(this, n("timers").setImmediate);
}, { timers: 11 }],
11: [function(n, o, a) {
(function(l, i) {
var r = n("process/browser.js").nextTick, d = Function.prototype.apply, c = Array.prototype.slice, u = {}, s = 0;
a.setTimeout = function() {
return new g(d.call(setTimeout, window, arguments), clearTimeout);
}, a.setInterval = function() {
return new g(d.call(setInterval, window, arguments), clearInterval);
}, a.clearTimeout = a.clearInterval = function(f) {
f.close();
};
function g(f, m) {
this._id = f, this._clearFn = m;
}
g.prototype.unref = g.prototype.ref = function() {
}, g.prototype.close = function() {
this._clearFn.call(window, this._id);
}, a.enroll = function(f, m) {
clearTimeout(f._idleTimeoutId), f._idleTimeout = m;
}, a.unenroll = function(f) {
clearTimeout(f._idleTimeoutId), f._idleTimeout = -1;
}, a._unrefActive = a.active = function(f) {
clearTimeout(f._idleTimeoutId);
var m = f._idleTimeout;
m >= 0 && (f._idleTimeoutId = setTimeout(function() {
f._onTimeout && f._onTimeout();
}, m));
}, a.setImmediate = typeof l == "function" ? l : function(f) {
var m = s++, v = arguments.length < 2 ? !1 : c.call(arguments, 1);
return u[m] = !0, r(function() {
u[m] && (v ? f.apply(null, v) : f.call(null), a.clearImmediate(m));
}), m;
}, a.clearImmediate = typeof i == "function" ? i : function(f) {
delete u[f];
};
}).call(this, n("timers").setImmediate, n("timers").clearImmediate);
}, { "process/browser.js": 9, timers: 11 }]
}, {}, [2])(2);
});
})(Qi);
var Nu = Qi.exports;
const Ua = /* @__PURE__ */ Vu(Nu), Ru = {
showCloseButton: { type: Boolean, default: !0 },
position: { type: String, default: "top-center" },
timeout: { type: Number, default: 3e3 },
theme: { type: String, default: "bootstrap" },
left: { type: Number },
right: { type: Number },
top: { type: Number },
bottom: { type: Number },
id: { type: String },
animate: { type: String, default: "fadeIn" },
options: { type: Object },
safeHtml: { type: Boolean, default: !0 }
}, Au = {
showCloseButton: { type: Boolean, default: !0 },
animate: { type: String, default: "fadeIn" },
options: { type: Object }
}, Yo = /* @__PURE__ */ Ne({
name: "Toast",
props: Au,
emits: ["close", "click"],
setup: (e, t) => {
const n = b(e.animate), o = "fadeOut", a = $(() => e.options), l = b(!1), i = $(() => a.value.title && a.value.message), r = $(() => !a.value.title && a.value.message), d = $(() => {
const C = {
animated: l.value,
toast: !0,
"toast--only-content": !i.value
};
return C[e.animate] = !1, C[o] = l.value, C["toasty-type-" + a.value.type] = !0, a.value.theme && (C[a.value.theme] = !0), C;
}), c = $(() => {
const x = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, I = {
"f-icon": !0
};
return I[x] = !0, I;
}), u = $(() => a.value.title || a.value.message), s = $(() => e.showCloseButton), g = $(() => !!a.value.buttons || !!t.slots.default), f = $(() => nt.getLocale() === "en" ? {
wordBreak: "keep-all",
overflowWrap: "break-word"
} : {});
function m(C) {
C.stopPropagation(), C.preventDefault(), l.value = !1, setTimeout(() => {
t.emit("close", a.value);
}, 200);
}
function v(C, L) {
}
function y(C) {
return `f-preten-link ${C.customClass ? C.customClass : ""}`;
}
ae(n, () => {
n.value;
});
const h = () => {
var C;
return p(st, null, [p("div", {
class: "after-toast-msg text-right"
}, [!t.slots.default && ((C = a.value.buttons) == null ? void 0 : C.map((L) => p("span", {
class: y(L),
onClick: (x) => void 0
}, [L.text]))), t.slots.default && t.slots.default()])]);
};
return () => p("div", {
class: d.value,
style: "min-height:44px"
}, [s.value && p("button", {
title: nt.getLocaleValue("messageBox.close"),
class: "toast-close f-btn-icon f-bare",
onClick: m
}, [p("span", {
class: "f-icon modal_close"
}, null)]), u.value && p("section", {
class: "modal-tips"
}, [!i.value && p("div", {
class: "float-left modal-tips-iconwrap"
}, [p("span", {
class: c.value
}, null)]), p("div", {
class: "modal-tips-content"
}, [i.value && p(st, null, [p("h5", {
class: "toast-title modal-tips-title",
innerHTML: a.value.title
}, null), p("p", {
class: "toast-msg",
innerHTML: a.value.message,
style: f.value
}, null), g.value && h()]), r.value && (a.value.buttons ? p("div", {
class: "toast-title-btns-wrapper d-flex"
}, [p("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: f.value,
innerHTML: a.value.message
}, null), p("div", {
class: "after-toast-title text-right ml-auto"
}, [h()])]) : p("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: f.value,
innerHTML: a.value.message
}, null))])])]);
}
}), Qn = /* @__PURE__ */ Ne({
name: "Notify",
props: Ru,
emits: ["close", "empty"],
setup(e, t) {
const n = $(() => ({
"farris-notify": !0
})), o = {
left: 12,
right: 12,
top: 20,
bottom: 12
}, a = b(), l = b(e.options), i = b(e.showCloseButton), r = $(() => e.position || "bottom-right"), d = $(() => e.timeout != null ? e.timeout : 3e3), c = $(() => {
const g = e.bottom ? e.bottom : o.bottom, f = e.top ? e.top : o.top, m = {
transition: "all 0.2s ease",
left: r.value.indexOf("left") > -1 ? `${e.left ? e.left : o.left}px` : "",
right: r.value.indexOf("right") > -1 ? `${e.right ? e.right : o.right}px` : "",
top: r.value.indexOf("top") > -1 ? `${f}px` : "",
bottom: r.value.indexOf("bottom") > -1 ? `${g}px` : ""
};
return r.value.indexOf("center") > -1 && (m.left = "50%", m.marginLeft = "calc(-24rem / 2)", r.value === "center-center" && (m.top = "50%", m.transform = "translate(-50%, -50%)")), m;
});
function u(g) {
t.emit("close");
}
d.value && setTimeout(() => {
u();
}, d.value), t.expose({
closeToast: u,
container: a,
notifyPosition: r
});
function s(g, f) {
u();
}
return () => p("div", {
class: n.value,
style: c.value,
ref: a
}, [p(Yo, {
options: l.value,
showCloseButton: i.value,
animate: e.animate,
onClose: (g) => s(g, l.value)
}, null)]);
}
});
class ho {
constructor() {
Me(this, "notifyRefs", []);
Me(this, "globalConfig", it({}));
}
escapeAllHtml(t) {
if (typeof t != "string" || !t)
return "";
const n = document.createElement("div");
return n.textContent = t || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
}
createNotifyInstance(t) {
const n = this, a = Object.assign({
timeout: 3e3,
position: "bottom-right",
showCloseButton: !0,
safeHtml: !0
}, this.globalConfig, {
...t
}), l = document.createElement("div");
l.style.display = "contents";
const i = po({
setup() {
var c;
const r = b();
function d() {
r.value.container.style.transform = "scale(0)", setTimeout(() => {
n.updateNotifyPositionForClose(a, r), i.unmount();
}, 220);
}
if (a.position.indexOf("top") > -1) {
const u = n.getNotifyInstances(a.position), s = u[u.length - 1];
if (s) {
const g = s.value.container.getBoundingClientRect();
a.top = g.bottom;
}
}
return a.safeHtml && ((c = a.options) != null && c.message) && (a.options.message = n.escapeAllHtml(a.options.message)), Nt(() => {
document.body.removeChild(l);
}), et(() => {
n.updateNotifyPositionForCreate(a, r);
}), () => p(al, {
mode: "out-in",
name: "fade",
appear: !0
}, {
default: () => [p(Qn, Lt({
ref: r
}, a, {
onClose: d
}), null)]
});
}
});
return i.provide("NotifyService", this), document.body.appendChild(l), i.use(nt.i18n), i.mount(l), i;
}
getNotifyInstances(t) {
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
}
updateNotifyPositionForCreate(t, n) {
if (this.notifyRefs && this.notifyRefs.length) {
const o = window.innerHeight;
t.position.indexOf("bottom") > -1 && this.getNo