UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,142 lines 1.01 MB
var Yc = Object.defineProperty; var Jc = (e, t, n) => t in e ? Yc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var Ge = (e, t, n) => Jc(e, typeof t != "symbol" ? t + "" : t, n); import { ref as C, defineComponent as Ee, computed as j, watch as ae, createVNode as f, Fragment as ut, reactive as at, createApp as va, onUnmounted as kt, onMounted as nt, Transition as sr, mergeProps as Dt, nextTick as pt, createTextVNode as je, inject as Pe, withDirectives as Lt, resolveDirective as On, onBeforeMount as Fl, provide as bt, triggerRef as Kc, onBeforeUnmount as bo, isVNode as Gt, watchEffect as Pl, Teleport as ur, shallowRef as qo, render as tl, h as ga, cloneVNode as Qc, withModifiers as cr, vModelText as Co, toRaw as Zc, vModelCheckbox as kl, vModelSelect as ed, resolveComponent as td, vShow as nd, onUpdated as od, Comment as dr, getCurrentInstance as fr } from "vue"; import "bignumber.js"; import { debounce as Cn, isUndefined as tn, cloneDeep as Vt, mergeWith as ia, merge as kn, findIndex as Ci, isPlainObject as Si, isNil as ad, isNaN as ld, flatten as pr, get as Pn, isEmpty as id } from "lodash-es"; import { LocaleService as et } from "../components/locale/index.esm.js"; import { getCustomClass as Qt, withInstall as Nn, EVENT_PROPERTY_TAB_IDS as Dn, FormSchemaEntityField$Type as ra, FormSchemaEntityFieldTypeName as wi, useThirdComponent as mr, isMobilePhone as Bt, getMaxZIndex as xi, FormSchemaEntityFieldType$Type as ro, resolveField as Ut, encrypt as rd, useNumberFormat as sd, useDateFormat as ud, useResizeObserver as cd, useTouchMomentum as dd, useTouch as fd, useCommonUtils as An, useBem as $t, useFarrisConfig as pd, useTextBox as md, useClear as vd, getCustomStyle as Ti, useGuid as gd } from "../components/common/index.esm.js"; import { useResizeObserver as vr } from "@vueuse/core"; import { getHierarchyRow as hd, useIdentify as Il, useGroupData as El, useFilter as Bl, useHierarchy as Ll, useLoading as gr, useDataView as Ml, useSelection as Ol, useSelectHierarchyItem as yd, usePagination as Dl, useDataViewContainerStyle as hr, useCommandColumn as yr, useSettingColumn as br, useColumn as Vl, useSort as Cr, useGroupColumn as Sr, useRow as Nl, useEdit as Al, useVisualDataBound as Rl, useVisualDataCell as jl, useVisualDataRow as $l, useVisualData as _l, useCellPosition as wr, useSidebar as Hl, useVirtualScroll as Ul, useFitColumn as xr, useFilterHistory as Tr, useColumnFilter as Fr, useDragColumn as Pr, getColumnHeader as kr, getSidebar as Ir, getDisableMask as Er, getHorizontalScrollbar as Br, getVerticalScrollbar as Lr, getEmpty as Mr, getPagination as Or, getSummary as Dr, ColumnSettingSolution as Vr, refreshScrollAfterDataSourceLoad as Nr, COMMAND_COLUMN_DATA_TYPE as dn, SETTING_COLUMN_DATA_TYPE as fn, useVisualGroupRow as Ar, useVisualSummaryRow as Rr, useScreen as jr, SETTING_COLUMN_FIELD as bd, COMMAND_COLUMN_FIELD as Cd, CellMode as $r, useCellContentStyle as Sd, getFilterPanel as wd, getGroupPanel as xd, useAdapt as Td, useNavigation as Fd } from "../components/data-view/index.esm.js"; import { resolveField as Pd } from "../components/common/index.esm.js/utils/resolve-field"; import kd from "../components/input-group/index.esm.js"; import $n, { ButtonProperty as Id, FButton as Fi } from "../components/button/index.esm.js"; import { resolveAppearance as Xn, createPropsResolver as on, schemaResolverMap as Ed, propertyEffectMap as Bd, propertyConfigSchemaMap as Ld, schemaMap as Md, schemaResolverMapForDesigner as _r, propertyEffectMapForDesigner as zl, propertyConfigSchemaMapForDesigner as ql, schemaMapForDesigner as Hr, getSchemaByTypeForDesigner as Ur, getPropsResolverGenerator as zr, createEventsResolver as qr, createFormBindingResolver as Od } from "../components/dynamic-resolver/index.esm.js"; import { DgControl as we, canvasChanged as Wo, refreshCanvas as Dd, useDesignerComponent as So } from "../components/designer-canvas/index.esm.js"; import { loadRegister as Vd, useComponentManager as Nd, useEntityState as Ad, useDynamicViewUtils as Rd, componentMap as nl, resolverMap as jd, componentPropsConverter as $d } from "../components/dynamic-view/index.esm.js"; import ul from "../components/section/index.esm.js"; import Wr from "../components/accordion/index.esm.js"; import Gr from "./avatar/index.esm.js"; import Xr from "./approval-logs/index.esm.js"; import ha from "./button-edit/index.esm.js"; import Yr from "../components/button-group/index.esm.js"; import Jr from "../components/calendar/index.esm.js"; import Kr from "./capsule/index.esm.js"; import cl from "./checkbox/index.esm.js"; import sa from "./checkbox-group/index.esm.js"; import Qr, { FComboList as Zr } from "../components/combo-list/index.esm.js"; import _d from "../components/combo-tree/index.esm.js"; import es from "../components/component/index.esm.js"; import ts from "../components/color-picker/index.esm.js"; import ns from "../components/content-container/index.esm.js"; import os from "../components/table/index.esm.js"; import as from "./date-picker/index.esm.js"; import ls from "./data-grid/index.esm.js"; import is from "../components/dropdown/index.esm.js"; import rs from "./dynamic-form/index.esm.js"; import Hd from "../components/events-editor/index.esm.js"; import ss from "../components/filter-bar/index.esm.js"; import Ud, { FieldSelectorRepositoryToken as fo } from "../components/field-selector/index.esm.js"; import zd, { FBindingSelectorContainer as qd } from "../components/binding-selector/index.esm.js"; import us from "../components/image-cropper/index.esm.js"; import cs from "./input-group/index.esm.js"; import Wl, { FLayout as Wd, FLayoutPane as ua } from "../components/layout/index.esm.js"; import ds from "../components/list-nav/index.esm.js"; import fs from "./list-view/index.esm.js"; import ps from "../components/lookup/index.esm.js"; import Gd from "../components/mapping-editor/index.esm.js"; import ms from "./nav/index.esm.js"; import vs from "../components/number-range/index.esm.js"; import gs from "./number-spinner/index.esm.js"; import hs from "../components/order/index.esm.js"; import ys from "../components/page-header/index.esm.js"; import bs from "../components/page-footer/index.esm.js"; import Cs from "../components/pagination/index.esm.js"; import Ss from "../components/progress/index.esm.js"; import ws from "../components/query-solution/index.esm.js"; import xs from "./radio-group/index.esm.js"; import Ts from "./rate/index.esm.js"; import Fs from "./response-toolbar/index.esm.js"; import Ps from "../components/response-layout/index.esm.js"; import ks from "./response-layout-editor/index.esm.js"; import Is from "../components/search-box/index.esm.js"; import Es from "./section/index.esm.js"; import Bs from "../components/smoke-detector/index.esm.js"; import Ls from "../components/splitter/index.esm.js"; import Ms from "../components/step/index.esm.js"; import Os from "./switch/index.esm.js"; import Ds from "./tabs/index.esm.js"; import Vs from "./tags/index.esm.js"; import Ns from "../components/text/index.esm.js"; import As from "./time-picker/index.esm.js"; import Rs from "../components/transfer/index.esm.js"; import po, { FTreeView as Xd } from "../components/tree-view/index.esm.js"; import js from "../components/uploader/index.esm.js"; import $s from "../components/verify-detail/index.esm.js"; import _s from "../components/video/index.esm.js"; import Hs from "./textarea/index.esm.js"; import Yd from "../components/schema-selector/index.esm.js"; import Us from "./tree-grid/index.esm.js"; import Jd from "../components/event-parameter/index.esm.js"; import Kd from "../components/filter-condition-editor/index.esm.js"; import zs from "../components/fieldset/index.esm.js"; import Qd from "../components/sort-condition-editor/index.esm.js"; import Zd from "../components/menu-lookup/index.esm.js"; import qs from "./drawer/index.esm.js"; import ef from "../components/json-editor/index.esm.js"; import tf from "../components/property-editor/index.esm.js"; import nf from "../components/expression-editor/index.esm.js"; import of from "../components/code-editor/index.esm.js"; import Ws from "../components/html-template/index.esm.js"; import af from "../components/collection-property-editor/index.esm.js"; import lf from "./modal/index.esm.js"; import Gs from "../components/external-container/index.esm.js"; import Xs from "../components/language-textbox/index.esm.js"; import Ys from "../components/image/index.esm.js"; import Js from "../components/comment/index.esm.js"; import Ks from "./wizard/index.esm.js"; import rf from "../components/tooltip/index.esm.js"; import { BaseControlProperty as sf, InputBaseProperty as Qs, ExpressionProperty as uf } from "../components/property-panel/index.esm.js"; import { FNotifyService as Gl, F_NOTIFY_SERVICE_TOKEN as Xl } from "../components/notify/index.esm.js"; import { useButtonItemsDesigner as cf } from "../components/collection-property-editor/index.esm.js/src/use-button-items.designer"; import { F_MODAL_SERVICE_TOKEN as Yl } from "../components/modal/index.esm.js"; import Zs, { FButtonEdit as Jl } from "../components/button-edit/index.esm.js"; import { FDataGrid as ya } from "../components/data-grid/index.esm.js"; import { FTreeGrid as Kl } from "../components/tree-grid/index.esm.js"; import eu from "../components/list-view/index.esm.js"; import { useNumber as df, useFormat as ff, useSpinner as pf, useTextBox as mf, getSpinnerRender as vf, getNumberTextBoxRender as gf, FNumberSpinner as ol } from "../components/number-spinner/index.esm.js"; import { useInputExpand as tu } from "../components/common/index.esm.js/text-box/use-input-expand"; import { FSwitch as hf } from "../components/switch/index.esm.js"; import { FDatePicker as Pi } from "../components/components/index.esm.js"; import { FRadioGroup as yf } from "../components/radio-group/index.esm.js"; import { FCheckboxGroup as bf } from "../components/checkbox-group/index.esm.js"; import { SearchRelation as al, SearchComparisonOperator as ll } from "../components/field-search-box/index.esm.js"; import Ql from "../components/popover/index.esm.js"; import ba, { FCheckbox as Zl } from "../components/checkbox/index.esm.js"; import nu from "../components/capsule/index.esm.js"; import Yn from "../components/scroll-list/index.esm.js"; import ei from "../components/drawer/index.esm.js"; import Cf, { FDynamicFormGroup as Sf, FDynamicForm as wf, FDynamicFormLabel as xf } from "../components/dynamic-form/index.esm.js"; import Tf, { FTabPage as Ff } from "../components/tabs/index.esm.js"; import Pf from "../components/textarea/index.esm.js"; import kf from "../components/response-toolbar/index.esm.js"; import If from "../components/loading/index.esm.js"; import Ef from "../components/tags/index.esm.js"; const Bf = ["moz", "ms", "webkit"]; function Lf() { 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 Mf() { if (typeof window > "u") return () => 0; if (window.requestAnimationFrame) return window.requestAnimationFrame.bind(window); const e = Bf.filter((t) => `${t}RequestAnimationFrame` in window)[0]; return e ? window[`${e}RequestAnimationFrame`] : Lf(); } Mf(); const vT = Symbol("controller schema repository inject token"), gT = Symbol("form schema repository inject token"); C(""); function qn() { if (typeof window > "u" || typeof navigator > "u") return !1; const e = navigator.userAgent || navigator.vendor || window.opera, t = [ /iPhone/i, /iPod/i, /Android.*Mobile/i, // Android 手机通常包含 "Mobile" 字样,而平板不包含 /webOS/i, /BlackBerry/i, /IEMobile/i, /Opera Mini/i, /Harmony/i ], n = [ /iPad/i, /Android(?!.*Mobile)/i, // Android 平板通常不含 "Mobile" /Tablet/i, /PlayBook/i, /Kindle/i, /Silk/i ]; for (const u of n) if (u.test(e)) return !1; for (const u of t) if (u.test(e)) return !0; if (typeof screen > "u") return !1; const o = "ontouchstart" in window || navigator.maxTouchPoints > 0, a = screen.width, l = screen.height, i = Math.min(a, l); return !!(o && i <= 768); } function Of() { const e = qn(); return e && document.body.classList.add("f-mobile"), e; } typeof document < "u" && Of(); const hn = C(0); function Df() { hn.value++; } function Vf(e, t) { const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), a = o.top >= n.top, l = o.top <= n.bottom; return a && l; } function ou(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 au(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], u = document.querySelector(`[id=${r}]`); if (u && u.contains(e)) return u; } 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 au(r.value.parent.elementRef); } } function ti(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 = au(e); if (a && (o = Vf(e, a)), !o) { n.style.display = "none"; return; } ou(e); } } function mo(e) { if (!e) return; let t; e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && ti(t); } function hT() { const e = document.querySelector(".dgComponentSelected"); if (!e) return; const t = e.querySelector(".component-btn-group"); t && t.getBoundingClientRect().top !== 0 && ou(e); } const Nf = { /** * 组件值 */ modelValue: { type: Object, default: {} }, componentId: { type: String, default: "" }, components: { type: Array }, canvasMode: { type: String, default: "PC" } }; var vn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Af(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function Ho(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 lu = { exports: {} }; (function(e, t) { (function(n) { e.exports = n(); })(function() { return (/* @__PURE__ */ function() { function n(o, a, l) { function i(s, c) { if (!a[s]) { if (!o[s]) { var d = typeof Ho == "function" && Ho; if (!c && d) return d(s, !0); if (r) return r(s, !0); var g = new Error("Cannot find module '" + s + "'"); throw g.code = "MODULE_NOT_FOUND", g; } var m = a[s] = { exports: {} }; o[s][0].call(m.exports, function(p) { var v = o[s][1][p]; return i(v || p); }, m, m.exports, n, o, a, l); } return a[s].exports; } for (var r = typeof Ho == "function" && Ho, u = 0; u < l.length; u++) i(l[u]); return i; } return n; }())({ 1: [function(n, o, a) { var l = {}, i = "(?:^|\\s)", r = "(?:\\s|$)"; function u(d) { var g = l[d]; return g ? g.lastIndex = 0 : l[d] = g = new RegExp(i + d + r, "g"), g; } function s(d, g) { var m = d.className; m.length ? u(g).test(m) || (d.className += " " + g) : d.className = g; } function c(d, g) { d.className = d.className.replace(u(g), " ").trim(); } o.exports = { add: s, rm: c }; }, {}], 2: [function(n, o, a) { (function(l) { var i = n("contra/emitter"), r = n("crossvent"), u = n("./classes"), s = document, c = s.documentElement; function d(E, M) { var A = arguments.length; A === 1 && Array.isArray(E) === !1 && (M = E, E = []); var N, O, D, $, B, z, H, _, G, le = null, q, V, R = !1, U = 0, J, W = M || {}; W.moves === void 0 && (W.moves = b), W.accepts === void 0 && (W.accepts = b), W.invalid === void 0 && (W.invalid = ge), W.containers === void 0 && (W.containers = E || []), W.isContainer === void 0 && (W.isContainer = y), W.copy === void 0 && (W.copy = !1), W.copySortSource === void 0 && (W.copySortSource = !1), W.revertOnSpill === void 0 && (W.revertOnSpill = !1), W.removeOnSpill === void 0 && (W.removeOnSpill = !1), W.direction === void 0 && (W.direction = "vertical"), W.ignoreInputTextSelection === void 0 && (W.ignoreInputTextSelection = !0), W.mirrorContainer === void 0 && (W.mirrorContainer = s.body); var L = i({ containers: W.containers, start: ne, end: ye, cancel: vt, remove: ct, destroy: ue, canMove: Fe, dragging: !1 }); return W.removeOnSpill === !0 && L.on("over", he).on("out", Xe), X(), L; function Q(oe) { return L.containers.indexOf(oe) !== -1 || W.isContainer(oe); } function X(oe) { var De = oe ? "remove" : "add"; p(c, De, "mousedown", Z), p(c, De, "mouseup", We); } function ee(oe) { var De = oe ? "remove" : "add"; p(c, De, "mousemove", ce); } function pe(oe) { var De = oe ? "remove" : "add"; r[De](c, "selectstart", Y), r[De](c, "click", Y); } function ue() { X(!0), We({}); } function Y(oe) { q && oe.preventDefault(); } function Z(oe) { $ = oe.clientX, B = oe.clientY; var De = v(oe) !== 1 || oe.metaKey || oe.ctrlKey; if (!De) { var Le = oe.target, Je = Te(Le); Je && (q = Je, ee(), oe.type === "mousedown" && (x(Le) ? Le.focus() : oe.preventDefault())); } } function ce(oe) { if (q) { if (v(oe) === 0) { We({}); return; } if (!(oe.clientX !== void 0 && Math.abs(oe.clientX - $) <= (W.slideFactorX || 0) && oe.clientY !== void 0 && Math.abs(oe.clientY - B) <= (W.slideFactorY || 0))) { if (W.ignoreInputTextSelection) { var De = I("clientX", oe) || 0, Le = I("clientY", oe) || 0, Je = s.elementFromPoint(De, Le); if (x(Je)) return; } var rt = q; ee(!0), pe(), ye(), ie(rt), u.add(_ || D, "gu-transit"), re(), gt(), U = 0, be(oe); } } } function Te(oe) { if (!(L.dragging && N) && !Q(oe)) { for (var De = oe; P(oe) && Q(P(oe)) === !1; ) if (W.invalid(oe, De) || (oe = P(oe), !oe)) return; var Le = P(oe); if (Le && !W.invalid(oe, De)) { var Je = W.moves(oe, Le, De, S(oe)); if (Je) return { item: oe, source: Le }; } } } function Fe(oe) { return !!Te(oe); } function ne(oe) { var De = Te(oe); De && ie(De); } function ie(oe) { St(oe.item, oe.source) && (_ = oe.item.cloneNode(!0), L.emit("cloned", _, oe.item, "copy")), O = oe.source, D = oe.item, z = H = S(oe.item), L.dragging = !0, L.emit("drag", D, O); } function ge() { return !1; } function ye() { if (L.dragging) { var oe = _ || D; $e(oe, P(oe)); } } function xe() { q = !1, ee(!0), pe(!0); } function We(oe) { if (xe(), !!L.dragging) { var De = _ || D, Le = I("clientX", oe) || 0, Je = I("clientY", oe) || 0, rt = h(N, Le, Je), st = K(rt, Le, Je); st && (_ && W.copySortSource || !_ || st !== O) ? $e(De, st) : W.removeOnSpill ? ct() : vt(); } } function $e(oe, De) { var Le = P(oe); _ && W.copySortSource && De === O && Le.removeChild(D), fe(De) ? L.emit("cancel", oe, O) : L.emit("drop", oe, De, O, H), me(); } function ct() { if (L.dragging) { var oe = _ || D, De = P(oe); De && De.removeChild(oe), L.emit(_ ? "cancel" : "remove", oe, De, O), me(); } } function vt(oe) { if (L.dragging) { var De = arguments.length > 0 ? oe : W.revertOnSpill, Le = _ || D, Je = P(Le), rt = fe(Je); rt === !1 && De && (_ ? Je && Je.removeChild(_) : O.insertBefore(Le, z)), rt || De ? L.emit("cancel", Le, O, O) : L.emit("drop", Le, Je, O, H), me(); } } function me() { var oe = _ || D; xe(), Ue(), te(), oe && u.rm(oe, "gu-transit"), G && clearTimeout(G), L.dragging = !1, le && L.emit("out", oe, le, O), L.emit("dragend", oe, U), O = D = _ = z = H = G = le = null; } function fe(oe, De) { var Le; return De !== void 0 ? Le = De : N ? Le = H : Le = S(_ || D), oe === O && Le === z; } function K(oe, De, Le) { for (var Je = oe; Je && !rt(); ) Je = P(Je); return Je; function rt() { var st = Q(Je); if (st === !1) return !1; var It = Se(Je, oe), Mt = yt(Je, It, De, Le), _t = fe(Je, Mt); return _t ? !0 : W.accepts(D, Je, O, Mt); } } function be(oe) { if (!N) return; oe.preventDefault(); var De = I("clientX", oe) || 0, Le = I("clientY", oe) || 0; N.style.left = De - 2 + "px", N.style.top = Le - 2 + "px"; var Je = _ || D, rt = h(N, De, Le), st = K(rt, De, Le), It = st !== null && st !== le; (It || st === null) && (Nt(), le = st, Xt()), Qe(rt, Le); var Mt = P(Je); if (st === O && _ && !W.copySortSource) { Mt && Mt.removeChild(Je); return; } var _t, Ht = Se(st, rt); if (R = Ve(Ht, st), Ht !== null) _t = yt(st, Ht, De, Le); else if (W.revertOnSpill === !0 && !_) _t = z, st = O; else { _ && Mt && Mt.removeChild(Je), _ && V && (V.style.display = "none"); return; } V.style.display = "block", qe(_t, Je, It), _t ? dt(Ht, _t) : tt(st); function Tt(Pt) { L.emit(Pt, Je, le, O); } function Xt() { It && Tt("over"); } function Nt() { le && Tt("out"); } } function qe(oe, De, Le) { (oe === De || oe === S(De)) && (H = S(De)), (oe === null && Le || oe !== De && oe !== S(De)) && (H = oe); } function he(oe) { u.rm(oe, "gu-hide"); } function Xe(oe) { L.dragging && u.add(oe, "gu-hide"); } function gt() { N || (N = document.createElement("div"), N.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;", N.innerHTML = W.getMirrorText && W.getMirrorText(D) || "控件", u.add(N, "gu-mirror"), W.mirrorContainer.appendChild(N), p(c, "add", "mousemove", be), u.add(W.mirrorContainer, "gu-unselectable"), L.emit("cloned", N, D, "mirror")); } function re() { if (V = document.createElement("div"), u.add(V, "gu-insertion"), D) { var oe = D.getBoundingClientRect(); V.style.left = oe.left + "px", V.style.top = oe.top + "px"; } R = !1, W.mirrorContainer.appendChild(V); } function Ue() { N && (u.rm(W.mirrorContainer, "gu-unselectable"), p(c, "remove", "mousemove", be), P(N).removeChild(N), N = null); } function te() { V && (P(V).removeChild(V), V = null); } function Se(oe, De) { for (var Le = De; Le !== oe && P(Le) !== oe; ) Le = P(Le); return Le === c ? null : Le; } function Ve(oe, De) { if (!De) return R; var Le = oe || De && De.lastElementChild; if (!Le) return !0; var Je = getComputedStyle(oe), rt = /^inline/.test(Je.getPropertyValue("display")) || /^(left|right)$/.test(Je.getPropertyValue("float")); if (rt) return !0; if (De) { var st = getComputedStyle(De), It = st.getPropertyValue("display"); if (/flex$/.test(It)) { var Mt = st.getPropertyValue("flex-direction") || "row"; if (Mt === "row" || Mt === "row-reverse") return !Ne(De); } return !1; } return !0; } function Ne(oe) { if (!oe.children || !oe.children.length) return !1; for (const De of Array.from(oe.children)) { const Je = (De.className && De.className.split(" ") || []).filter((rt) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(rt)); if (!Je.length) return !1; for (const rt of Je) { const st = rt.slice(rt.lastIndexOf("-") + 1); if (parseInt(st, 10) !== 12) return !1; } } return !0; } function dt(oe, De) { const Le = De.getBoundingClientRect(); if (V.style.left = Le.left + "px", V.style.top = Le.top + "px", R) { if (V.style.height = Le.height + "px", V.style.width = "4px", oe) { const Je = oe.getBoundingClientRect(); Je.top !== Le.top && (V.style.left = Je.right + "px", V.style.top = Je.top + "px", V.style.height = Je.height + "px"); } } else if (V.style.height = "4px", V.style.width = Le.width + "px", J) { const Je = J.getBoundingClientRect(); Le.top < Je.top && (V.style.display = "none"); } De === D && D && (V.style.display = "none"); } function tt(oe) { H = null; var De = oe.lastElementChild; if (De) { var Le = De.getBoundingClientRect(); R ? (V.style.left = Le.right + "px", V.style.top = Le.top + "px", V.style.height = Le.height + "px", V.style.width = "4px") : (V.style.left = Le.left + "px", V.style.top = Le.bottom + "px", V.style.height = "4px", V.style.width = Le.width + "px"), De === D && D && (V.style.display = "none"); } else V.style.display = "none"; } function Qe(oe, De) { if (!W.mirrorContainer.contains(oe) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (J = g(oe), !J || !J.contains(oe))) return; const Le = document.querySelector(".dgComponentSelected"), Je = J.getBoundingClientRect(); if (De - 30 < Je.top && J.scrollTop > 0) { let rt = J.scrollTop < 10 ? J.scrollTop : 10; J.scrollBy(0, -1 * rt), Le && J.contains(Le) && (U = U + -1 * rt); } if (De + 30 > Je.bottom && J.scrollTop < J.scrollHeight - J.clientHeight) { const rt = J.scrollHeight - J.clientHeight - J.scrollTop; let st = rt < 10 ? rt : 10; J.scrollBy(0, st), Le && J.contains(Le) && (U = U + st); } } function yt(oe, De, Le, Je) { var rt = W.direction === "horizontal", st = W.direction === "mixed", It = De !== oe ? _t() : Mt(); return It; function Mt() { var Tt = oe.children.length, Xt, Nt, Pt; for (Xt = 0; Xt < Tt; Xt++) if (Nt = oe.children[Xt], Pt = Nt.getBoundingClientRect(), rt && Pt.left + Pt.width / 2 > Le || !st && !rt && Pt.top + Pt.height / 2 > Je || st && Pt.left + Pt.width > Le && Pt.top + Pt.height > Je) return Nt; return null; } function _t() { var Tt = De.getBoundingClientRect(); if (st) { var Xt = Je - Tt.top, Nt = Le - Tt.left, Pt = Tt.bottom - Je, Sn = Tt.right - Le, mn = Math.min(Nt, Sn, Xt, Pt), Yt; return R ? Yt = Sn < Nt : Yt = Pt === mn || Sn === mn || Nt === mn, Ht(Yt); } return Ht(rt ? Le > Tt.left + w(Tt) / 2 : Je > Tt.top + F(Tt) / 2); } function Ht(Tt) { return Tt ? S(De) : De; } } function St(oe, De) { return typeof W.copy == "boolean" ? W.copy : W.copy(oe, De); } } function g(E) { const M = Array.from(window.scrollContainerList); if (M.length === 1) { const N = Array.from(window.scrollContainerList)[0]; return document.getElementById(N); } const A = m(M); for (const N of A) if (N.contains(E)) return N; return null; } function m(E) { const M = []; return E.forEach((A) => { const N = document.getElementById(A); N && M.push(N); }), M.sort((A, N) => A.contains(N) ? 1 : N.contains(A) ? -1 : 0), M; } function p(E, M, A, N) { var O = { mouseup: "touchend", mousedown: "touchstart", mousemove: "touchmove" }, D = { mouseup: "pointerup", mousedown: "pointerdown", mousemove: "pointermove" }, $ = { mouseup: "MSPointerUp", mousedown: "MSPointerDown", mousemove: "MSPointerMove" }; l.navigator.pointerEnabled ? r[M](E, D[A], N) : l.navigator.msPointerEnabled ? r[M](E, $[A], N) : (r[M](E, O[A], N), r[M](E, A, N)); } function v(E) { if (E.touches !== void 0) return E.touches.length; if (E.which !== void 0 && E.which !== 0) return E.which; if (E.buttons !== void 0) return E.buttons; var M = E.button; if (M !== void 0) return M & 1 ? 1 : M & 2 ? 3 : M & 4 ? 2 : 0; } function h(E, M, A) { E = E || {}; var N = E.className || "", O; return E.className += " gu-hide", O = s.elementFromPoint(M, A), E.className = N, O; } function y() { return !1; } function b() { return !0; } function w(E) { return E.width || E.right - E.left; } function F(E) { return E.height || E.bottom - E.top; } function P(E) { return E.parentNode === s ? null : E.parentNode; } function x(E) { return E.tagName === "INPUT" || E.tagName === "TEXTAREA" || E.tagName === "SELECT" || T(E); } function T(E) { return !E || E.contentEditable === "false" ? !1 : E.contentEditable === "true" ? !0 : T(P(E)); } function S(E) { return E.nextElementSibling || M(); function M() { var A = E; do A = A.nextSibling; while (A && A.nodeType !== 1); return A; } } function k(E) { return E.targetTouches && E.targetTouches.length ? E.targetTouches[0] : E.changedTouches && E.changedTouches.length ? E.changedTouches[0] : E; } function I(E, M) { var A = k(M), N = { pageX: "clientX", // IE8 pageY: "clientY" // IE8 }; return E in N && !(E in A) && N[E] in A && (E = N[E]), A[E]; } o.exports = d; }).call(this, typeof vn < "u" ? vn : 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, u, s) { r && l(function() { r.apply(s || null, u || []); }); }; }, { ticky: 10 }], 5: [function(n, o, a) { var l = n("atoa"), i = n("./debounce"); o.exports = function(u, s) { var c = s || {}, d = {}; return u === void 0 && (u = {}), u.on = function(g, m) { return d[g] ? d[g].push(m) : d[g] = [m], u; }, u.once = function(g, m) { return m._once = !0, u.on(g, m), u; }, u.off = function(g, m) { var p = arguments.length; if (p === 1) delete d[g]; else if (p === 0) d = {}; else { var v = d[g]; if (!v) return u; v.splice(v.indexOf(m), 1); } return u; }, u.emit = function() { var g = l(arguments); return u.emitterSnapshot(g.shift()).apply(this, g); }, u.emitterSnapshot = function(g) { var m = (d[g] || []).slice(0); return function() { var p = l(arguments), v = this || u; if (g === "error" && c.throws !== !1 && !m.length) throw p.length === 1 ? p[0] : p; return m.forEach(function(y) { c.async ? i(y, p, v) : y.apply(v, p), y._once && u.off(g, y); }), u; }; }, u; }; }, { "./debounce": 4, atoa: 3 }], 6: [function(n, o, a) { (function(l) { var i = n("custom-event"), r = n("./eventmap"), u = l.document, s = g, c = p, d = []; l.addEventListener || (s = m, c = v), o.exports = { add: s, remove: c, fabricate: h }; function g(P, x, T, S) { return P.addEventListener(x, T, S); } function m(P, x, T) { return P.attachEvent("on" + x, b(P, x, T)); } function p(P, x, T, S) { return P.removeEventListener(x, T, S); } function v(P, x, T) { var S = w(P, x, T); if (S) return P.detachEvent("on" + x, S); } function h(P, x, T) { var S = r.indexOf(x) === -1 ? I() : k(); P.dispatchEvent ? P.dispatchEvent(S) : P.fireEvent("on" + x, S); function k() { var E; return u.createEvent ? (E = u.createEvent("Event"), E.initEvent(x, !0, !0)) : u.createEventObject && (E = u.createEventObject()), E; } function I() { return new i(x, { detail: T }); } } function y(P, x, T) { return function(k) { var I = k || l.event; I.target = I.target || I.srcElement, I.preventDefault = I.preventDefault || function() { I.returnValue = !1; }, I.stopPropagation = I.stopPropagation || function() { I.cancelBubble = !0; }, I.which = I.which || I.keyCode, T.call(P, I); }; } function b(P, x, T) { var S = w(P, x, T) || y(P, x, T); return d.push({ wrapper: S, element: P, type: x, fn: T }), S; } function w(P, x, T) { var S = F(P, x, T); if (S) { var k = d[S].wrapper; return d.splice(S, 1), k; } } function F(P, x, T) { var S, k; for (S = 0; S < d.length; S++) if (k = d[S], k.element === P && k.type === x && k.fn === T) return S; } }).call(this, typeof vn < "u" ? vn : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, { "./eventmap": 7, "custom-event": 8 }], 7: [function(n, o, a) { (function(l) { var i = [], r = "", u = /^on/; for (r in l) u.test(r) && i.push(r.slice(2)); o.exports = i; }).call(this, typeof vn < "u" ? vn : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, {}], 8: [function(n, o, a) { (function(l) { var i = l.CustomEvent; function r() { try { var u = new i("cat", { detail: { foo: "bar" } }); return u.type === "cat" && u.detail.foo === "bar"; } catch { } return !1; } o.exports = r() ? i : ( // IE >= 9 typeof document < "u" && typeof document.createEvent == "function" ? function(s, c) { var d = document.createEvent("CustomEvent"); return c ? d.initCustomEvent(s, c.bubbles, c.cancelable, c.detail) : d.initCustomEvent(s, !1, !1, void 0), d; } : ( // IE <= 8 function(s, c) { var d = document.createEventObject(); return d.type = s, c ? (d.bubbles = !!c.bubbles, d.cancelable = !!c.cancelable, d.detail = c.detail) : (d.bubbles = !1, d.cancelable = !1, d.detail = void 0), d; } ) ); }).call(this, typeof vn < "u" ? vn : typeof self < "u" ? self : typeof window < "u" ? window : {}); }, {}], 9: [function(n, o, a) { var l = o.exports = {}, i, r; function u() { throw new Error("setTimeout has not been defined"); } function s() { throw new Error("clearTimeout has not been defined"); } (function() { try { typeof setTimeout == "function" ? i = setTimeout : i = u; } catch { i = u; } try { typeof clearTimeout == "function" ? r = clearTimeout : r = s; } catch { r = s; } })(); function c(F) { if (i === setTimeout) return setTimeout(F, 0); if ((i === u || !i) && setTimeout) return i = setTimeout, setTimeout(F, 0); try { return i(F, 0); } catch { try { return i.call(null, F, 0); } catch { return i.call(this, F, 0); } } } function d(F) { if (r === clearTimeout) return clearTimeout(F); if ((r === s || !r) && clearTimeout) return r = clearTimeout, clearTimeout(F); try { return r(F); } catch { try { return r.call(null, F); } catch { return r.call(this, F); } } } var g = [], m = !1, p, v = -1; function h() { !m || !p || (m = !1, p.length ? g = p.concat(g) : v = -1, g.length && y()); } function y() { if (!m) { var F = c(h); m = !0; for (var P = g.length; P; ) { for (p = g, g = []; ++v < P; ) p && p[v].run(); v = -1, P = g.length; } p = null, m = !1, d(F); } } l.nextTick = function(F) { var P = new Array(arguments.length - 1); if (arguments.length > 1) for (var x = 1; x < arguments.length; x++) P[x - 1] = arguments[x]; g.push(new b(F, P)), g.length === 1 && !m && c(y); }; function b(F, P) { this.fun = F, this.array = P; } b.prototype.run = function() { this.fun.apply(null, this.array); }, l.title = "browser", l.browser = !0, l.env = {}, l.argv = [], l.version = "", l.versions = {}; function w() { } l.on = w, l.addListener = w, l.once = w, l.off = w, l.removeListener = w, l.removeAllListeners = w, l.emit = w, l.prependListener = w, l.prependOnceListener = w, l.listeners = function(F) { return []; }, l.binding = function(F) { throw new Error("process.binding is not supported"); }, l.cwd = function() { return "/"; }, l.chdir = function(F) { 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(u) { l(u); } : r = function(u) { setTimeout(u, 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, u = Function.prototype.apply, s = Array.prototype.slice, c = {}, d = 0; a.setTimeout = function() { return new g(u.call(setTimeout, window, arguments), clearTimeout); }, a.setInterval = function() { return new g(u.call(setInterval, window, arguments), clearInterval); }, a.clearTimeout = a.clearInterval = function(m) { m.close(); }; function g(m, p) { this._id = m, this._clearFn = p; } g.prototype.unref = g.prototype.ref = function() { }, g.prototype.close = function() { this._clearFn.call(window, this._id); }, a.enroll = function(m, p) { clearTimeout(m._idleTimeoutId), m._idleTimeout = p; }, a.unenroll = function(m) { clearTimeout(m._idleTimeoutId), m._idleTimeout = -1; }, a._unrefActive = a.active = function(m) { clearTimeout(m._idleTimeoutId); var p = m._idleTimeout; p >= 0 && (m._idleTimeoutId = setTimeout(function() { m._onTimeout && m._onTimeout(); }, p)); }, a.setImmediate = typeof l == "function" ? l : function(m) { var p = d++, v = arguments.length < 2 ? !1 : s.call(arguments, 1); return c[p] = !0, r(function() { c[p] && (v ? m.apply(null, v) : m.call(null), a.clearImmediate(p)); }), p; }, a.clearImmediate = typeof i == "function" ? i : function(m) { delete c[m]; }; }).call(this, n("timers").setImmediate, n("timers").clearImmediate); }, { "process/browser.js": 9, timers: 11 }] }, {}, [2])(2); }); })(lu); var Rf = lu.exports; const ki = /* @__PURE__ */ Af(Rf), jf = { 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 } }, $f = { showCloseButton: { type: Boolean, default: !0 }, animate: { type: String, default: "fadeIn" }, options: { type: Object } }, dl = /* @__PURE__ */ Ee({ name: "Toast", props: $f, emits: ["close", "click"], setup: (e, t) => { const n = C(e.animate), o = "fadeOut", a = j(() => e.options), l = C(!1), i = j(() => a.value.title && a.value.message), r = j(() => !a.value.title && a.value.message), u = j(() => { const b = { animated: l.value, toast: !0, "toast--only-content": !i.value }; return b[e.animate] = !1, b[o] = l.value, b["toasty-type-" + a.value.type] = !0, a.value.theme && (b[a.value.theme] = !0), b; }), s = j(() => { const F = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, P = { "f-icon": !0 }; return P[F] = !0, P; }), c = j(() => a.value.title || a.value.message), d = j(() => e.showCloseButton), g = j(() => !!a.value.buttons || !!t.slots.default), m = j(() => et.getLocale() === "en" ? { wordBreak: "keep-all", overflowWrap: "break-word" } : {}); function p(b) { b.stopPropagation(), b.preventDefault(), l.value = !1, setTimeout(() => { t.emit("close", a.value); }, 200); } function v(b, w) { } function h(b) { return `f-preten-link ${b.customClass ? b.customClass : ""}`; } ae(n, () => { n.value; }); const y = () => { var b; return f(ut, null, [f("div", { class: "after-toast-msg text-right" }, [!t.slots.default && ((b = a.value.buttons) == null ? void 0 : b.map((w) => f("span", { class: h(w), onClick: (F) => void 0 }, [w.text]))), t.slots.default && t.slots.default()])]); }; return () => f("div", { class: u.value, style: "min-height:44px" }, [d.value && f("button", { title: et.getLocaleValue("messageBox.close"), class: "toast-close f-btn-icon f-bare", onClick: p }, [f("span", { class: "f-icon modal_close" }, null)]), c.value && f("section", { class: "modal-tips" }, [!i.value && f("div", { class: "float-left modal-tips-iconwrap" }, [f("span", { class: s.value }, null)]), f("div", { class: "modal-tips-content" }, [i.value && f(ut, null, [f("h5", { class: "toast-title modal-tips-title", innerHTML: a.value.title }, null), f("p", { class: "toast-msg", innerHTML: a.value.message, style: m.value }, null), g.value && y()]), r.value && (a.value.buttons ? f("div", { class: "toast-title-btns-wrapper d-flex" }, [f("h5", { class: "toast-title modal-tips-title only-toast-msg", style: m.value, innerHTML: a.value.message }, null), f("div", { class: "after-toast-title text-right ml-auto" }, [y()])]) : f("h5", { class: "toast-title modal-tips-title only-toast-msg", style: m.value, innerHTML: a.value.message }, null))])])]); } }), Go = /* @__PURE__ */ Ee({ name: "Notify", props: jf, emits: ["close", "empty"], setup(e, t) { var v; const n = qn(), a = `farris-notify-${(v = e.options) != null && v.type ? e.options.type : "info"}}`, l = j(() => ({ "farris-notify": !0, [a]: n })), i = { left: 12, right: 12, top: 20, bottom: 12 }, r = C(), u = C(e.options), s = C(e.showCloseButton), c = j(() => e.position || "bottom-right"), d = j(() => e.timeout != null ? e.timeout : 3e3), g = j(() => { const h = e.bottom ? e.bottom : i.bottom, y = e.top ? e.top : i.top, b = { transition: "all 0.2s ease", left: c.value.indexOf("left") > -1 ? `${e.left ? e.left : i.left}px` : "", right: c.value.indexOf("right") > -1 ? `${e.right ? e.right : i.right}px` : "", top: c.value.indexOf("top") > -1 ? `${y}px` : "", bottom: c.value.indexOf("bottom") > -1 ? `${h}px` : "" }; return c.value.indexOf("center") > -1 && (b.left = "50%", b.marginLeft = "calc(-24rem / 2)", c.value === "center-center" &&