UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1 lines 725 kB
(function(J,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("bignumber.js"),require("lodash-es"),require("../components/locale/index.umd.js"),require("../components/common/index.umd.js"),require("@vueuse/core"),require("../components/data-view/index.umd.js"),require("../components/common/index.umd.js/utils/resolve-field"),require("../components/input-group/index.umd.js"),require("../components/button/index.umd.js"),require("../components/dynamic-resolver/index.umd.js"),require("../components/designer-canvas/index.umd.js"),require("../components/dynamic-view/index.umd.js"),require("../components/section/index.umd.js"),require("../components/accordion/index.umd.js"),require("./avatar/index.umd.js"),require("./approval-logs/index.umd.js"),require("./button-edit/index.umd.js"),require("../components/button-group/index.umd.js"),require("../components/calendar/index.umd.js"),require("./capsule/index.umd.js"),require("./checkbox/index.umd.js"),require("./checkbox-group/index.umd.js"),require("../components/combo-list/index.umd.js"),require("../components/combo-tree/index.umd.js"),require("../components/component/index.umd.js"),require("../components/color-picker/index.umd.js"),require("../components/content-container/index.umd.js"),require("../components/table/index.umd.js"),require("./date-picker/index.umd.js"),require("./data-grid/index.umd.js"),require("../components/dropdown/index.umd.js"),require("./dynamic-form/index.umd.js"),require("../components/events-editor/index.umd.js"),require("../components/filter-bar/index.umd.js"),require("../components/field-selector/index.umd.js"),require("../components/binding-selector/index.umd.js"),require("../components/image-cropper/index.umd.js"),require("./input-group/index.umd.js"),require("../components/layout/index.umd.js"),require("../components/list-nav/index.umd.js"),require("./list-view/index.umd.js"),require("../components/lookup/index.umd.js"),require("../components/mapping-editor/index.umd.js"),require("./nav/index.umd.js"),require("../components/number-range/index.umd.js"),require("./number-spinner/index.umd.js"),require("../components/order/index.umd.js"),require("../components/page-header/index.umd.js"),require("../components/page-footer/index.umd.js"),require("../components/pagination/index.umd.js"),require("../components/progress/index.umd.js"),require("../components/query-solution/index.umd.js"),require("./radio-group/index.umd.js"),require("./rate/index.umd.js"),require("./response-toolbar/index.umd.js"),require("../components/response-layout/index.umd.js"),require("./response-layout-editor/index.umd.js"),require("../components/search-box/index.umd.js"),require("./section/index.umd.js"),require("../components/smoke-detector/index.umd.js"),require("../components/splitter/index.umd.js"),require("../components/step/index.umd.js"),require("./switch/index.umd.js"),require("./tabs/index.umd.js"),require("./tags/index.umd.js"),require("../components/text/index.umd.js"),require("./time-picker/index.umd.js"),require("../components/transfer/index.umd.js"),require("../components/tree-view/index.umd.js"),require("../components/uploader/index.umd.js"),require("../components/verify-detail/index.umd.js"),require("../components/video/index.umd.js"),require("./textarea/index.umd.js"),require("../components/schema-selector/index.umd.js"),require("./tree-grid/index.umd.js"),require("../components/event-parameter/index.umd.js"),require("../components/filter-condition-editor/index.umd.js"),require("../components/fieldset/index.umd.js"),require("../components/sort-condition-editor/index.umd.js"),require("../components/menu-lookup/index.umd.js"),require("./drawer/index.umd.js"),require("../components/json-editor/index.umd.js"),require("../components/property-editor/index.umd.js"),require("../components/expression-editor/index.umd.js"),require("../components/code-editor/index.umd.js"),require("../components/html-template/index.umd.js"),require("../components/collection-property-editor/index.umd.js"),require("./modal/index.umd.js"),require("../components/external-container/index.umd.js"),require("../components/language-textbox/index.umd.js"),require("../components/image/index.umd.js"),require("../components/comment/index.umd.js"),require("./wizard/index.umd.js"),require("../components/tooltip/index.umd.js"),require("../components/property-panel/index.umd.js"),require("../components/notify/index.umd.js"),require("../components/collection-property-editor/index.umd.js/src/use-button-items.designer"),require("../components/modal/index.umd.js"),require("../components/button-edit/index.umd.js"),require("../components/data-grid/index.umd.js"),require("../components/tree-grid/index.umd.js"),require("../components/list-view/index.umd.js"),require("../components/number-spinner/index.umd.js"),require("../components/common/index.umd.js/text-box/use-input-expand"),require("../components/switch/index.umd.js"),require("../components/components/index.umd.js"),require("../components/radio-group/index.umd.js"),require("../components/checkbox-group/index.umd.js"),require("../components/field-search-box/index.umd.js"),require("../components/popover/index.umd.js"),require("../components/checkbox/index.umd.js"),require("../components/capsule/index.umd.js"),require("../components/scroll-list/index.umd.js"),require("../components/drawer/index.umd.js"),require("../components/dynamic-form/index.umd.js"),require("../components/tabs/index.umd.js"),require("../components/textarea/index.umd.js"),require("../components/response-toolbar/index.umd.js"),require("../components/loading/index.umd.js"),require("../components/tags/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","bignumber.js","lodash-es","../components/locale/index.umd.js","../components/common/index.umd.js","@vueuse/core","../components/data-view/index.umd.js","../components/common/index.umd.js/utils/resolve-field","../components/input-group/index.umd.js","../components/button/index.umd.js","../components/dynamic-resolver/index.umd.js","../components/designer-canvas/index.umd.js","../components/dynamic-view/index.umd.js","../components/section/index.umd.js","../components/accordion/index.umd.js","./avatar/index.umd.js","./approval-logs/index.umd.js","./button-edit/index.umd.js","../components/button-group/index.umd.js","../components/calendar/index.umd.js","./capsule/index.umd.js","./checkbox/index.umd.js","./checkbox-group/index.umd.js","../components/combo-list/index.umd.js","../components/combo-tree/index.umd.js","../components/component/index.umd.js","../components/color-picker/index.umd.js","../components/content-container/index.umd.js","../components/table/index.umd.js","./date-picker/index.umd.js","./data-grid/index.umd.js","../components/dropdown/index.umd.js","./dynamic-form/index.umd.js","../components/events-editor/index.umd.js","../components/filter-bar/index.umd.js","../components/field-selector/index.umd.js","../components/binding-selector/index.umd.js","../components/image-cropper/index.umd.js","./input-group/index.umd.js","../components/layout/index.umd.js","../components/list-nav/index.umd.js","./list-view/index.umd.js","../components/lookup/index.umd.js","../components/mapping-editor/index.umd.js","./nav/index.umd.js","../components/number-range/index.umd.js","./number-spinner/index.umd.js","../components/order/index.umd.js","../components/page-header/index.umd.js","../components/page-footer/index.umd.js","../components/pagination/index.umd.js","../components/progress/index.umd.js","../components/query-solution/index.umd.js","./radio-group/index.umd.js","./rate/index.umd.js","./response-toolbar/index.umd.js","../components/response-layout/index.umd.js","./response-layout-editor/index.umd.js","../components/search-box/index.umd.js","./section/index.umd.js","../components/smoke-detector/index.umd.js","../components/splitter/index.umd.js","../components/step/index.umd.js","./switch/index.umd.js","./tabs/index.umd.js","./tags/index.umd.js","../components/text/index.umd.js","./time-picker/index.umd.js","../components/transfer/index.umd.js","../components/tree-view/index.umd.js","../components/uploader/index.umd.js","../components/verify-detail/index.umd.js","../components/video/index.umd.js","./textarea/index.umd.js","../components/schema-selector/index.umd.js","./tree-grid/index.umd.js","../components/event-parameter/index.umd.js","../components/filter-condition-editor/index.umd.js","../components/fieldset/index.umd.js","../components/sort-condition-editor/index.umd.js","../components/menu-lookup/index.umd.js","./drawer/index.umd.js","../components/json-editor/index.umd.js","../components/property-editor/index.umd.js","../components/expression-editor/index.umd.js","../components/code-editor/index.umd.js","../components/html-template/index.umd.js","../components/collection-property-editor/index.umd.js","./modal/index.umd.js","../components/external-container/index.umd.js","../components/language-textbox/index.umd.js","../components/image/index.umd.js","../components/comment/index.umd.js","./wizard/index.umd.js","../components/tooltip/index.umd.js","../components/property-panel/index.umd.js","../components/notify/index.umd.js","../components/collection-property-editor/index.umd.js/src/use-button-items.designer","../components/modal/index.umd.js","../components/button-edit/index.umd.js","../components/data-grid/index.umd.js","../components/tree-grid/index.umd.js","../components/list-view/index.umd.js","../components/number-spinner/index.umd.js","../components/common/index.umd.js/text-box/use-input-expand","../components/switch/index.umd.js","../components/components/index.umd.js","../components/radio-group/index.umd.js","../components/checkbox-group/index.umd.js","../components/field-search-box/index.umd.js","../components/popover/index.umd.js","../components/checkbox/index.umd.js","../components/capsule/index.umd.js","../components/scroll-list/index.umd.js","../components/drawer/index.umd.js","../components/dynamic-form/index.umd.js","../components/tabs/index.umd.js","../components/textarea/index.umd.js","../components/response-toolbar/index.umd.js","../components/loading/index.umd.js","../components/tags/index.umd.js"],t):(J=typeof globalThis<"u"?globalThis:J||self,t(J.FarrisVue={},J.vue,null,J.lodashEs,J.locale,J.common,J.core,J.dataView,J.resolveField,J.FInputGroup$1,J.FButton,J.dynamicResolver,J.designerCanvas,J.dynamicView,J.FSection,J.FAccordion,J.FAvatar,J.FApprovalLogs,J.FButtonEdit$1,J.FButtonGroup,J.FCalendar,J.FCapsule,J.FCheckbox,J.FCheckboxGroup,J.FComboList$1,J.FComboTree,J.FComponent,J.FColorPicker,J.FContentContainer,J.FTable,J.FDatePicker,J.FDataGrid$1,J.FDropdown,J.FDynamicForm$1,J.FEventsEditor,J.FFilterBar,J.FFieldSelector,J.FBindingSelector,J.FImageCropper,J.FInputGroup$2,J.FLayout,J.FListNav,J.FListView$1,J.FLookup$1,J.FMappingEditor,J.FNav,J.FNumberRange,J.FNumberSpinner,J.FOrder,J.FPageHeader,J.FPageFooter,J.FPagination$1,J.FProgress,J.FQuerySolution,J.FRadioGroup,J.FRate,J.FResponseToolbar,J.FResponseLayout,J.FResponseLayoutEditorSetting,J.FSearchBox$1,J.FSection$1,J.FSmokeDetector,J.FSplitter,J.FStep$1,J.FSwitch,J.FTabs$1,J.FTags,J.FText,J.FTimePicker,J.FTransfer,J.FTreeView,J.FUploader,J.FVerifyDetail,J.FVideo,J.FTextArea,J.FSchemaSelector$1,J.FTreeGrid$1,J.FEventParameter$1,J.FFilterConditionEditor,J.FFieldset,J.FSortConditionEditor,J.FMenuLookup,J.FDrawer,J.FJsonEditor,J.FPropertyEditor,J.FExpressionEditor,J.FCodeEditor,J.FHtmlTemplate,J.FCollectionPropertyEditor,J.FModal$1,J.FExternalContainer,J.FLanguageTextbox,J.FImage,J.FComment,J.FWizard,J.FTooltip,J.propertyPanel,J.notify,J.useButtonItems_designer,J.modal,J.FButtonEdit$2,J.dataGrid,J.treeGrid,J.FListView$2,J.numberSpinner,J.useInputExpand,J._switch,J.components,J.radioGroup,J.checkboxGroup,J.fieldSearchBox,J.FPopover,J.Checkbox,J.FCapsule$1,J.List,J.Drawer,J.FResponseForm$1,J.FTabs$2,J.FTextarea,J.FResponseToolbar$1,J.FLoading$1,J.FTags$1))})(this,function(J,t,On,ze,Qe,Ce,ki,ge,dc,uc,Gt,it,ve,Yt,aa,Ii,Ei,Bi,uo,Mi,Di,Li,ia,fo,po,fc,Oi,Ai,ji,Ri,$i,_i,Ui,Hi,pc,qi,vn,zi,Wi,Gi,Qt,Yi,Xi,Ji,mc,Ki,Qi,Zi,el,tl,nl,ol,al,il,ll,rl,sl,cl,dl,ul,fl,pl,ml,gl,hl,yl,vl,bl,Cl,Sl,bn,wl,xl,Tl,Nl,gc,Fl,hc,yc,Vl,vc,bc,Pl,Cc,Sc,wc,xc,kl,Tc,Nc,Il,El,Bl,Ml,Dl,Fc,mo,Cn,Vc,la,An,go,ra,Ll,Xt,Ol,Pc,Al,kc,Ic,Sn,sa,an,jl,wn,ca,ho,Rl,Ec,Bc,Mc,Dc){"use strict";var uv=Object.defineProperty;var fv=(J,t,On)=>t in J?uv(J,t,{enumerable:!0,configurable:!0,writable:!0,value:On}):J[t]=On;var qe=(J,t,On)=>fv(J,typeof t!="symbol"?t+"":t,On);const Lc=["moz","ms","webkit"];function Oc(){let e=0;return n=>{const o=new Date().getTime(),a=Math.max(0,16-(o-e)),i=setTimeout(()=>{n(o+a)},a);return e=o+a,i}}function Ac(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const e=Lc.filter(n=>`${n}RequestAnimationFrame`in window)[0];return e?window[`${e}RequestAnimationFrame`]:Oc()}Ac();const jc=Symbol("controller schema repository inject token"),Rc=Symbol("form schema repository inject token");t.ref("");function xn(){if(typeof window>"u"||typeof navigator>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera,n=[/iPhone/i,/iPod/i,/Android.*Mobile/i,/webOS/i,/BlackBerry/i,/IEMobile/i,/Opera Mini/i,/Harmony/i],o=[/iPad/i,/Android(?!.*Mobile)/i,/Tablet/i,/PlayBook/i,/Kindle/i,/Silk/i];for(const d of o)if(d.test(e))return!1;for(const d of n)if(d.test(e))return!0;if(typeof screen>"u")return!1;const a="ontouchstart"in window||navigator.maxTouchPoints>0,i=screen.width,l=screen.height,r=Math.min(i,l);return!!(a&&r<=768)}function $c(){const e=xn();return e&&document.body.classList.add("f-mobile"),e}typeof document<"u"&&$c();const Jt=t.ref(0);function _c(){Jt.value++}function Uc(e,n){const o=n.getBoundingClientRect(),a=e.getBoundingClientRect(),i=a.top>=o.top,l=a.top<=o.bottom;return i&&l}function da(e){const n=e.querySelector(".component-btn-group");if(!n)return;n.style.display="";const o=n.getBoundingClientRect();if(!(o.top===0&&o.left===0)){const a=n.querySelector("div");if(a){const i=a.getBoundingClientRect();a.style.top=o.top+"px";let l=o.left-i.width;const r=document.querySelector(".editorDiv");if(r){const s=r.getBoundingClientRect();l<s.left&&({left:l}=e.getBoundingClientRect())}a.style.left=l+"px"}}}function $l(e){var o,a,i,l,r;if(!window.scrollContainerList)return;const n=Array.from(window.scrollContainerList);if(n.length)if(n.length===1){const s=n[0],d=document.querySelector(`[id=${s}]`);if(d&&d.contains(e))return d}else{const{componentInstance:s}=e;if(((o=s==null?void 0:s.value)==null?void 0:o.scrollElementId)===((a=s==null?void 0:s.value.schema)==null?void 0:a.id))return e;if(((i=s==null?void 0:s.value)==null?void 0:i.scrollElementId)===`${(l=s==null?void 0:s.value.schema)==null?void 0:l.id}-design-item`)return e.parentElement;if((r=s.value.parent)!=null&&r.elementRef)return $l(s.value.parent.elementRef)}}function yo(e){if(!e)return;const n=e.getBoundingClientRect();if(n.width===0&&n.height===0)return;const o=e.querySelector(".component-btn-group");if(o){let a=!0;const i=$l(e);if(i&&(a=Uc(e,i)),!a){o.style.display="none";return}da(e)}}function jn(e){if(!e)return;let n;e.className.includes("dgComponentSelected")?n=e:n=e.querySelector(".dgComponentSelected"),n&&yo(n)}function Hc(){const e=document.querySelector(".dgComponentSelected");if(!e)return;const n=e.querySelector(".component-btn-group");n&&n.getBoundingClientRect().top!==0&&da(e)}const _l={modelValue:{type:Object,default:{}},componentId:{type:String,default:""},components:{type:Array},canvasMode:{type:String,default:"PC"}};var Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vo(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 Ul={exports:{}};(function(e,n){(function(o){e.exports=o()})(function(){return function(){function o(a,i,l){function r(c,u){if(!i[c]){if(!a[c]){var f=typeof vo=="function"&&vo;if(!u&&f)return f(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var m=i[c]={exports:{}};a[c][0].call(m.exports,function(p){var g=a[c][1][p];return r(g||p)},m,m.exports,o,a,i,l)}return i[c].exports}for(var s=typeof vo=="function"&&vo,d=0;d<l.length;d++)r(l[d]);return r}return o}()({1:[function(o,a,i){var l={},r="(?:^|\\s)",s="(?:\\s|$)";function d(f){var h=l[f];return h?h.lastIndex=0:l[f]=h=new RegExp(r+f+s,"g"),h}function c(f,h){var m=f.className;m.length?d(h).test(m)||(f.className+=" "+h):f.className=h}function u(f,h){f.className=f.className.replace(d(h)," ").trim()}a.exports={add:c,rm:u}},{}],2:[function(o,a,i){(function(l){var r=o("contra/emitter"),s=o("crossvent"),d=o("./classes"),c=document,u=c.documentElement;function f(P,E){var O=arguments.length;O===1&&Array.isArray(P)===!1&&(E=P,P=[]);var L,B,M,j,k,U,$,R,z,oe=null,H,D,A=!1,_=0,Y,q=E||{};q.moves===void 0&&(q.moves=b),q.accepts===void 0&&(q.accepts=b),q.invalid===void 0&&(q.invalid=me),q.containers===void 0&&(q.containers=P||[]),q.isContainer===void 0&&(q.isContainer=v),q.copy===void 0&&(q.copy=!1),q.copySortSource===void 0&&(q.copySortSource=!1),q.revertOnSpill===void 0&&(q.revertOnSpill=!1),q.removeOnSpill===void 0&&(q.removeOnSpill=!1),q.direction===void 0&&(q.direction="vertical"),q.ignoreInputTextSelection===void 0&&(q.ignoreInputTextSelection=!0),q.mirrorContainer===void 0&&(q.mirrorContainer=c.body);var I=r({containers:q.containers,start:te,end:ye,cancel:dt,remove:lt,destroy:re,canMove:Ne,dragging:!1});return q.removeOnSpill===!0&&I.on("over",he).on("out",We),W(),I;function K(ne){return I.containers.indexOf(ne)!==-1||q.isContainer(ne)}function W(ne){var Be=ne?"remove":"add";p(u,Be,"mousedown",Q),p(u,Be,"mouseup",He)}function Z(ne){var Be=ne?"remove":"add";p(u,Be,"mousemove",ce)}function ue(ne){var Be=ne?"remove":"add";s[Be](u,"selectstart",G),s[Be](u,"click",G)}function re(){W(!0),He({})}function G(ne){H&&ne.preventDefault()}function Q(ne){j=ne.clientX,k=ne.clientY;var Be=g(ne)!==1||ne.metaKey||ne.ctrlKey;if(!Be){var Ie=ne.target,Ye=Te(Ie);Ye&&(H=Ye,Z(),ne.type==="mousedown"&&(w(Ie)?Ie.focus():ne.preventDefault()))}}function ce(ne){if(H){if(g(ne)===0){He({});return}if(!(ne.clientX!==void 0&&Math.abs(ne.clientX-j)<=(q.slideFactorX||0)&&ne.clientY!==void 0&&Math.abs(ne.clientY-k)<=(q.slideFactorY||0))){if(q.ignoreInputTextSelection){var Be=V("clientX",ne)||0,Ie=V("clientY",ne)||0,Ye=c.elementFromPoint(Be,Ie);if(w(Ye))return}var ot=H;Z(!0),ue(),ye(),ae(ot),d.add(R||M,"gu-transit"),ie(),ut(),_=0,be(ne)}}}function Te(ne){if(!(I.dragging&&L)&&!K(ne)){for(var Be=ne;N(ne)&&K(N(ne))===!1;)if(q.invalid(ne,Be)||(ne=N(ne),!ne))return;var Ie=N(ne);if(Ie&&!q.invalid(ne,Be)){var Ye=q.moves(ne,Ie,Be,C(ne));if(Ye)return{item:ne,source:Ie}}}}function Ne(ne){return!!Te(ne)}function te(ne){var Be=Te(ne);Be&&ae(Be)}function ae(ne){ht(ne.item,ne.source)&&(R=ne.item.cloneNode(!0),I.emit("cloned",R,ne.item,"copy")),B=ne.source,M=ne.item,U=$=C(ne.item),I.dragging=!0,I.emit("drag",M,B)}function me(){return!1}function ye(){if(I.dragging){var ne=R||M;Ae(ne,N(ne))}}function xe(){H=!1,Z(!0),ue(!0)}function He(ne){if(xe(),!!I.dragging){var Be=R||M,Ie=V("clientX",ne)||0,Ye=V("clientY",ne)||0,ot=y(L,Ie,Ye),at=X(ot,Ie,Ye);at&&(R&&q.copySortSource||!R||at!==B)?Ae(Be,at):q.removeOnSpill?lt():dt()}}function Ae(ne,Be){var Ie=N(ne);R&&q.copySortSource&&Be===B&&Ie.removeChild(M),de(Be)?I.emit("cancel",ne,B):I.emit("drop",ne,Be,B,$),fe()}function lt(){if(I.dragging){var ne=R||M,Be=N(ne);Be&&Be.removeChild(ne),I.emit(R?"cancel":"remove",ne,Be,B),fe()}}function dt(ne){if(I.dragging){var Be=arguments.length>0?ne:q.revertOnSpill,Ie=R||M,Ye=N(Ie),ot=de(Ye);ot===!1&&Be&&(R?Ye&&Ye.removeChild(R):B.insertBefore(Ie,U)),ot||Be?I.emit("cancel",Ie,B,B):I.emit("drop",Ie,Ye,B,$),fe()}}function fe(){var ne=R||M;xe(),$e(),ee(),ne&&d.rm(ne,"gu-transit"),z&&clearTimeout(z),I.dragging=!1,oe&&I.emit("out",ne,oe,B),I.emit("dragend",ne,_),B=M=R=U=$=z=oe=null}function de(ne,Be){var Ie;return Be!==void 0?Ie=Be:L?Ie=$:Ie=C(R||M),ne===B&&Ie===U}function X(ne,Be,Ie){for(var Ye=ne;Ye&&!ot();)Ye=N(Ye);return Ye;function ot(){var at=K(Ye);if(at===!1)return!1;var wt=we(Ye,ne),Tt=mt(Ye,wt,Be,Ie),Bt=de(Ye,Tt);return Bt?!0:q.accepts(M,Ye,B,Tt)}}function be(ne){if(!L)return;ne.preventDefault();var Be=V("clientX",ne)||0,Ie=V("clientY",ne)||0;L.style.left=Be-2+"px",L.style.top=Ie-2+"px";var Ye=R||M,ot=y(L,Be,Ie),at=X(ot,Be,Ie),wt=at!==null&&at!==oe;(wt||at===null)&&(Vt(),oe=at,Ot()),Je(ot,Ie);var Tt=N(Ye);if(at===B&&R&&!q.copySortSource){Tt&&Tt.removeChild(Ye);return}var Bt,Mt=we(at,ot);if(A=Me(Mt,at),Mt!==null)Bt=mt(at,Mt,Be,Ie);else if(q.revertOnSpill===!0&&!R)Bt=U,at=B;else{R&&Tt&&Tt.removeChild(Ye),R&&D&&(D.style.display="none");return}D.style.display="block",Ue(Bt,Ye,wt),Bt?rt(Mt,Bt):Ze(at);function bt(Ct){I.emit(Ct,Ye,oe,B)}function Ot(){wt&&bt("over")}function Vt(){oe&&bt("out")}}function Ue(ne,Be,Ie){(ne===Be||ne===C(Be))&&($=C(Be)),(ne===null&&Ie||ne!==Be&&ne!==C(Be))&&($=ne)}function he(ne){d.rm(ne,"gu-hide")}function We(ne){I.dragging&&d.add(ne,"gu-hide")}function ut(){L||(L=document.createElement("div"),L.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;",L.innerHTML=q.getMirrorText&&q.getMirrorText(M)||"控件",d.add(L,"gu-mirror"),q.mirrorContainer.appendChild(L),p(u,"add","mousemove",be),d.add(q.mirrorContainer,"gu-unselectable"),I.emit("cloned",L,M,"mirror"))}function ie(){if(D=document.createElement("div"),d.add(D,"gu-insertion"),M){var ne=M.getBoundingClientRect();D.style.left=ne.left+"px",D.style.top=ne.top+"px"}A=!1,q.mirrorContainer.appendChild(D)}function $e(){L&&(d.rm(q.mirrorContainer,"gu-unselectable"),p(u,"remove","mousemove",be),N(L).removeChild(L),L=null)}function ee(){D&&(N(D).removeChild(D),D=null)}function we(ne,Be){for(var Ie=Be;Ie!==ne&&N(Ie)!==ne;)Ie=N(Ie);return Ie===u?null:Ie}function Me(ne,Be){if(!Be)return A;var Ie=ne||Be&&Be.lastElementChild;if(!Ie)return!0;var Ye=getComputedStyle(ne),ot=/^inline/.test(Ye.getPropertyValue("display"))||/^(left|right)$/.test(Ye.getPropertyValue("float"));if(ot)return!0;if(Be){var at=getComputedStyle(Be),wt=at.getPropertyValue("display");if(/flex$/.test(wt)){var Tt=at.getPropertyValue("flex-direction")||"row";if(Tt==="row"||Tt==="row-reverse")return!De(Be)}return!1}return!0}function De(ne){if(!ne.children||!ne.children.length)return!1;for(const Be of Array.from(ne.children)){const Ye=(Be.className&&Be.className.split(" ")||[]).filter(ot=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ot));if(!Ye.length)return!1;for(const ot of Ye){const at=ot.slice(ot.lastIndexOf("-")+1);if(parseInt(at,10)!==12)return!1}}return!0}function rt(ne,Be){const Ie=Be.getBoundingClientRect();if(D.style.left=Ie.left+"px",D.style.top=Ie.top+"px",A){if(D.style.height=Ie.height+"px",D.style.width="4px",ne){const Ye=ne.getBoundingClientRect();Ye.top!==Ie.top&&(D.style.left=Ye.right+"px",D.style.top=Ye.top+"px",D.style.height=Ye.height+"px")}}else if(D.style.height="4px",D.style.width=Ie.width+"px",Y){const Ye=Y.getBoundingClientRect();Ie.top<Ye.top&&(D.style.display="none")}Be===M&&M&&(D.style.display="none")}function Ze(ne){$=null;var Be=ne.lastElementChild;if(Be){var Ie=Be.getBoundingClientRect();A?(D.style.left=Ie.right+"px",D.style.top=Ie.top+"px",D.style.height=Ie.height+"px",D.style.width="4px"):(D.style.left=Ie.left+"px",D.style.top=Ie.bottom+"px",D.style.height="4px",D.style.width=Ie.width+"px"),Be===M&&M&&(D.style.display="none")}else D.style.display="none"}function Je(ne,Be){if(!q.mirrorContainer.contains(ne)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(Y=h(ne),!Y||!Y.contains(ne)))return;const Ie=document.querySelector(".dgComponentSelected"),Ye=Y.getBoundingClientRect();if(Be-30<Ye.top&&Y.scrollTop>0){let ot=Y.scrollTop<10?Y.scrollTop:10;Y.scrollBy(0,-1*ot),Ie&&Y.contains(Ie)&&(_=_+-1*ot)}if(Be+30>Ye.bottom&&Y.scrollTop<Y.scrollHeight-Y.clientHeight){const ot=Y.scrollHeight-Y.clientHeight-Y.scrollTop;let at=ot<10?ot:10;Y.scrollBy(0,at),Ie&&Y.contains(Ie)&&(_=_+at)}}function mt(ne,Be,Ie,Ye){var ot=q.direction==="horizontal",at=q.direction==="mixed",wt=Be!==ne?Bt():Tt();return wt;function Tt(){var bt=ne.children.length,Ot,Vt,Ct;for(Ot=0;Ot<bt;Ot++)if(Vt=ne.children[Ot],Ct=Vt.getBoundingClientRect(),ot&&Ct.left+Ct.width/2>Ie||!at&&!ot&&Ct.top+Ct.height/2>Ye||at&&Ct.left+Ct.width>Ie&&Ct.top+Ct.height>Ye)return Vt;return null}function Bt(){var bt=Be.getBoundingClientRect();if(at){var Ot=Ye-bt.top,Vt=Ie-bt.left,Ct=bt.bottom-Ye,mn=bt.right-Ie,on=Math.min(Vt,mn,Ot,Ct),At;return A?At=mn<Vt:At=Ct===on||mn===on||Vt===on,Mt(At)}return Mt(ot?Ie>bt.left+S(bt)/2:Ye>bt.top+T(bt)/2)}function Mt(bt){return bt?C(Be):Be}}function ht(ne,Be){return typeof q.copy=="boolean"?q.copy:q.copy(ne,Be)}}function h(P){const E=Array.from(window.scrollContainerList);if(E.length===1){const L=Array.from(window.scrollContainerList)[0];return document.getElementById(L)}const O=m(E);for(const L of O)if(L.contains(P))return L;return null}function m(P){const E=[];return P.forEach(O=>{const L=document.getElementById(O);L&&E.push(L)}),E.sort((O,L)=>O.contains(L)?1:L.contains(O)?-1:0),E}function p(P,E,O,L){var B={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},M={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},j={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?s[E](P,M[O],L):l.navigator.msPointerEnabled?s[E](P,j[O],L):(s[E](P,B[O],L),s[E](P,O,L))}function g(P){if(P.touches!==void 0)return P.touches.length;if(P.which!==void 0&&P.which!==0)return P.which;if(P.buttons!==void 0)return P.buttons;var E=P.button;if(E!==void 0)return E&1?1:E&2?3:E&4?2:0}function y(P,E,O){P=P||{};var L=P.className||"",B;return P.className+=" gu-hide",B=c.elementFromPoint(E,O),P.className=L,B}function v(){return!1}function b(){return!0}function S(P){return P.width||P.right-P.left}function T(P){return P.height||P.bottom-P.top}function N(P){return P.parentNode===c?null:P.parentNode}function w(P){return P.tagName==="INPUT"||P.tagName==="TEXTAREA"||P.tagName==="SELECT"||x(P)}function x(P){return!P||P.contentEditable==="false"?!1:P.contentEditable==="true"?!0:x(N(P))}function C(P){return P.nextElementSibling||E();function E(){var O=P;do O=O.nextSibling;while(O&&O.nodeType!==1);return O}}function F(P){return P.targetTouches&&P.targetTouches.length?P.targetTouches[0]:P.changedTouches&&P.changedTouches.length?P.changedTouches[0]:P}function V(P,E){var O=F(E),L={pageX:"clientX",pageY:"clientY"};return P in L&&!(P in O)&&L[P]in O&&(P=L[P]),O[P]}a.exports=f}).call(this,typeof Zt<"u"?Zt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,a,i){a.exports=function(r,s){return Array.prototype.slice.call(r,s)}},{}],4:[function(o,a,i){var l=o("ticky");a.exports=function(s,d,c){s&&l(function(){s.apply(c||null,d||[])})}},{ticky:10}],5:[function(o,a,i){var l=o("atoa"),r=o("./debounce");a.exports=function(d,c){var u=c||{},f={};return d===void 0&&(d={}),d.on=function(h,m){return f[h]?f[h].push(m):f[h]=[m],d},d.once=function(h,m){return m._once=!0,d.on(h,m),d},d.off=function(h,m){var p=arguments.length;if(p===1)delete f[h];else if(p===0)f={};else{var g=f[h];if(!g)return d;g.splice(g.indexOf(m),1)}return d},d.emit=function(){var h=l(arguments);return d.emitterSnapshot(h.shift()).apply(this,h)},d.emitterSnapshot=function(h){var m=(f[h]||[]).slice(0);return function(){var p=l(arguments),g=this||d;if(h==="error"&&u.throws!==!1&&!m.length)throw p.length===1?p[0]:p;return m.forEach(function(v){u.async?r(v,p,g):v.apply(g,p),v._once&&d.off(h,v)}),d}},d}},{"./debounce":4,atoa:3}],6:[function(o,a,i){(function(l){var r=o("custom-event"),s=o("./eventmap"),d=l.document,c=h,u=p,f=[];l.addEventListener||(c=m,u=g),a.exports={add:c,remove:u,fabricate:y};function h(N,w,x,C){return N.addEventListener(w,x,C)}function m(N,w,x){return N.attachEvent("on"+w,b(N,w,x))}function p(N,w,x,C){return N.removeEventListener(w,x,C)}function g(N,w,x){var C=S(N,w,x);if(C)return N.detachEvent("on"+w,C)}function y(N,w,x){var C=s.indexOf(w)===-1?V():F();N.dispatchEvent?N.dispatchEvent(C):N.fireEvent("on"+w,C);function F(){var P;return d.createEvent?(P=d.createEvent("Event"),P.initEvent(w,!0,!0)):d.createEventObject&&(P=d.createEventObject()),P}function V(){return new r(w,{detail:x})}}function v(N,w,x){return function(F){var V=F||l.event;V.target=V.target||V.srcElement,V.preventDefault=V.preventDefault||function(){V.returnValue=!1},V.stopPropagation=V.stopPropagation||function(){V.cancelBubble=!0},V.which=V.which||V.keyCode,x.call(N,V)}}function b(N,w,x){var C=S(N,w,x)||v(N,w,x);return f.push({wrapper:C,element:N,type:w,fn:x}),C}function S(N,w,x){var C=T(N,w,x);if(C){var F=f[C].wrapper;return f.splice(C,1),F}}function T(N,w,x){var C,F;for(C=0;C<f.length;C++)if(F=f[C],F.element===N&&F.type===w&&F.fn===x)return C}}).call(this,typeof Zt<"u"?Zt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,a,i){(function(l){var r=[],s="",d=/^on/;for(s in l)d.test(s)&&r.push(s.slice(2));a.exports=r}).call(this,typeof Zt<"u"?Zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,a,i){(function(l){var r=l.CustomEvent;function s(){try{var d=new r("cat",{detail:{foo:"bar"}});return d.type==="cat"&&d.detail.foo==="bar"}catch{}return!1}a.exports=s()?r:typeof document<"u"&&typeof document.createEvent=="function"?function(c,u){var f=document.createEvent("CustomEvent");return u?f.initCustomEvent(c,u.bubbles,u.cancelable,u.detail):f.initCustomEvent(c,!1,!1,void 0),f}:function(c,u){var f=document.createEventObject();return f.type=c,u?(f.bubbles=!!u.bubbles,f.cancelable=!!u.cancelable,f.detail=u.detail):(f.bubbles=!1,f.cancelable=!1,f.detail=void 0),f}}).call(this,typeof Zt<"u"?Zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,a,i){var l=a.exports={},r,s;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"?r=setTimeout:r=d}catch{r=d}try{typeof clearTimeout=="function"?s=clearTimeout:s=c}catch{s=c}})();function u(T){if(r===setTimeout)return setTimeout(T,0);if((r===d||!r)&&setTimeout)return r=setTimeout,setTimeout(T,0);try{return r(T,0)}catch{try{return r.call(null,T,0)}catch{return r.call(this,T,0)}}}function f(T){if(s===clearTimeout)return clearTimeout(T);if((s===c||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(T);try{return s(T)}catch{try{return s.call(null,T)}catch{return s.call(this,T)}}}var h=[],m=!1,p,g=-1;function y(){!m||!p||(m=!1,p.length?h=p.concat(h):g=-1,h.length&&v())}function v(){if(!m){var T=u(y);m=!0;for(var N=h.length;N;){for(p=h,h=[];++g<N;)p&&p[g].run();g=-1,N=h.length}p=null,m=!1,f(T)}}l.nextTick=function(T){var N=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)N[w-1]=arguments[w];h.push(new b(T,N)),h.length===1&&!m&&u(v)};function b(T,N){this.fun=T,this.array=N}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 S(){}l.on=S,l.addListener=S,l.once=S,l.off=S,l.removeListener=S,l.removeAllListeners=S,l.emit=S,l.prependListener=S,l.prependOnceListener=S,l.listeners=function(T){return[]},l.binding=function(T){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(T){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(o,a,i){(function(l){var r=typeof l=="function",s;r?s=function(d){l(d)}:s=function(d){setTimeout(d,0)},a.exports=s}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,a,i){(function(l,r){var s=o("process/browser.js").nextTick,d=Function.prototype.apply,c=Array.prototype.slice,u={},f=0;i.setTimeout=function(){return new h(d.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new h(d.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(m){m.close()};function h(m,p){this._id=m,this._clearFn=p}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(m,p){clearTimeout(m._idleTimeoutId),m._idleTimeout=p},i.unenroll=function(m){clearTimeout(m._idleTimeoutId),m._idleTimeout=-1},i._unrefActive=i.active=function(m){clearTimeout(m._idleTimeoutId);var p=m._idleTimeout;p>=0&&(m._idleTimeoutId=setTimeout(function(){m._onTimeout&&m._onTimeout()},p))},i.setImmediate=typeof l=="function"?l:function(m){var p=f++,g=arguments.length<2?!1:c.call(arguments,1);return u[p]=!0,s(function(){u[p]&&(g?m.apply(null,g):m.call(null),i.clearImmediate(p))}),p},i.clearImmediate=typeof r=="function"?r:function(m){delete u[m]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Ul);var zc=Ul.exports;const Hl=qc(zc),Wc={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}},Gc={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},ua=t.defineComponent({name:"Toast",props:Gc,emits:["close","click"],setup:(e,n)=>{const o=t.ref(e.animate),a="fadeOut",i=t.computed(()=>e.options),l=t.ref(!1),r=t.computed(()=>i.value.title&&i.value.message),s=t.computed(()=>!i.value.title&&i.value.message),d=t.computed(()=>{const b={animated:l.value,toast:!0,"toast--only-content":!r.value};return b[e.animate]=!1,b[a]=l.value,b["toasty-type-"+i.value.type]=!0,i.value.theme&&(b[i.value.theme]=!0),b}),c=t.computed(()=>{const T=`f-icon-${i.value&&i.value.type?i.value.type.replace("toasty-type-",""):"default"}`,N={"f-icon":!0};return N[T]=!0,N}),u=t.computed(()=>i.value.title||i.value.message),f=t.computed(()=>e.showCloseButton),h=t.computed(()=>!!i.value.buttons||!!n.slots.default),m=t.computed(()=>Qe.LocaleService.getLocale()==="en"?{wordBreak:"keep-all",overflowWrap:"break-word"}:{});function p(b){b.stopPropagation(),b.preventDefault(),l.value=!1,setTimeout(()=>{n.emit("close",i.value)},200)}function g(b,S){}function y(b){return`f-preten-link ${b.customClass?b.customClass:""}`}t.watch(o,()=>{o.value});const v=()=>{var b;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((b=i.value.buttons)==null?void 0:b.map(S=>t.createVNode("span",{class:y(S),onClick:T=>void 0},[S.text]))),n.slots.default&&n.slots.default()])])};return()=>t.createVNode("div",{class:d.value,style:"min-height:44px"},[f.value&&t.createVNode("button",{title:Qe.LocaleService.getLocaleValue("messageBox.close"),class:"toast-close f-btn-icon f-bare",onClick:p},[t.createVNode("span",{class:"f-icon modal_close"},null)]),u.value&&t.createVNode("section",{class:"modal-tips"},[!r.value&&t.createVNode("div",{class:"float-left modal-tips-iconwrap"},[t.createVNode("span",{class:c.value},null)]),t.createVNode("div",{class:"modal-tips-content"},[r.value&&t.createVNode(t.Fragment,null,[t.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:i.value.title},null),t.createVNode("p",{class:"toast-msg",innerHTML:i.value.message,style:m.value},null),h.value&&v()]),s.value&&(i.value.buttons?t.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:m.value,innerHTML:i.value.message},null),t.createVNode("div",{class:"after-toast-title text-right ml-auto"},[v()])]):t.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",style:m.value,innerHTML:i.value.message},null))])])])}}),bo=t.defineComponent({name:"Notify",props:Wc,emits:["close","empty"],setup(e,n){var g;const o=xn(),i=`farris-notify-${(g=e.options)!=null&&g.type?e.options.type:"info"}}`,l=t.computed(()=>({"farris-notify":!0,[i]:o})),r={left:12,right:12,top:20,bottom:12},s=t.ref(),d=t.ref(e.options),c=t.ref(e.showCloseButton),u=t.computed(()=>e.position||"bottom-right"),f=t.computed(()=>e.timeout!=null?e.timeout:3e3),h=t.computed(()=>{const y=e.bottom?e.bottom:r.bottom,v=e.top?e.top:r.top,b={transition:"all 0.2s ease",left:u.value.indexOf("left")>-1?`${e.left?e.left:r.left}px`:"",right:u.value.indexOf("right")>-1?`${e.right?e.right:r.right}px`:"",top:u.value.indexOf("top")>-1?`${v}px`:"",bottom:u.value.indexOf("bottom")>-1?`${y}px`:""};return u.value.indexOf("center")>-1&&(b.left="50%",b.marginLeft="calc(-24rem / 2)",u.value==="center-center"&&(b.top="50%",b.transform="translate(-50%, -50%)")),b});function m(y){n.emit("close")}f.value&&setTimeout(()=>{m()},f.value),n.expose({closeToast:m,container:s,notifyPosition:u});function p(y,v){m()}return()=>{var y;return o?t.createVNode("div",{class:l.value,ref:s},[(y=e.options)==null?void 0:y.message]):t.createVNode("div",{class:l.value,style:h.value,ref:s},[t.createVNode(ua,{options:d.value,showCloseButton:c.value,animate:e.animate,onClose:v=>p(v,d.value)},null)])}}});class Co{constructor(){qe(this,"notifyRefs",[]);qe(this,"globalConfig",t.reactive({}))}escapeAllHtml(n){if(typeof n!="string"||!n)return"";const o=document.createElement("div");return o.textContent=n||"",o.innerHTML.replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(n){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...n}),l=document.createElement("div");l.style.display="contents";const r=t.createApp({setup(){var c;const s=t.ref();function d(){s.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,s),r.unmount()},220)}if(i.position.indexOf("top")>-1){const u=o.getNotifyInstances(i.position),f=u[u.length-1];if(f){const h=f.value.container.getBoundingClientRect();i.top=h.bottom}}return i.safeHtml&&((c=i.options)!=null&&c.message)&&(i.options.message=o.escapeAllHtml(i.options.message)),t.onUnmounted(()=>{document.body.removeChild(l)}),t.onMounted(()=>{o.updateNotifyPositionForCreate(i,s)}),()=>t.createVNode(t.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[t.createVNode(bo,t.mergeProps({ref:s},i,{onClose:d}),null)]})}});return r.provide("NotifyService",this),document.body.appendChild(l),r.use(Qe.LocaleService.i18n),r.mount(l),r}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const a=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(i=>{const l=i.value.container.getBoundingClientRect();i.value.container.style.bottom=l.height+a-l.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const a=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const i=this.getNotifyInstances(n.position),l=i.indexOf(o);i.slice(l+1).forEach(r=>{r.value.container.style.top=r.value.container.offsetTop-r.value.container.offsetHeight+"px"})}a>-1&&this.notifyRefs.splice(a,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let a="",i="",l,r,s;typeof o=="string"?a=o:o&&(a=o.message||"",i=o.title||"",r=o.position||null,s=o.showCloseButton!=null?o.showCloseButton:null,l=o.timeout!=null?o.timeout:null);const c={options:{type:n,message:a,title:i}};return r!=null&&(c.position=r),s!=null&&(c.showCloseButton=s),l!=null&&(c.timeout=l),c}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}const fa=Symbol("NOTIFY_SERVICE_TOKEN");bo.install=e=>{e.component(bo.name,bo),e.component(ua.name,ua);const n=new Co;e.provide(fa,n),e.provide("FNotifyService",n)};const Yc={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]},targetComponentInstance:{type:Object,default:{}}};`${Qe.LocaleService.getLocaleValue("datagrid.loadingMessage")}`;const Xc={customClass:{type:String,default:""},sort:{type:Object},filter:{type:Object},autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",required:!0},loadData:{type:Function},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,mode:"server",size:-1}},rowNumber:{type:Object,default:{enable:!0,width:36,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!1}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1},emptyTemplate:{type:Object},summary:{type:Object,default:{enable:!1,groupFields:["numericField1","numericField2"]}},autoHeight:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},checkboxPosition:{type:String,default:"after-expand"},enableColumnSettingSolution:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:""},customSearch:{type:Function},beforeEditCell:{type:Function,default:e=>!0},focusOnEditingCell:{type:Boolean,default:!0}},Jc="enum",Kc="boolean";function Qc(e){const{formatter:n}=e;return!n||typeof n=="function"?null:n}function Zc(e,n){const o=n.options||n,{data:a}=o;if(!a||!a.length)return"";const i=Object.prototype.hasOwnProperty.call(o,"valueField")&&o.valueField||"value",l=Object.prototype.hasOwnProperty.call(o,"textField")&&o.textField||"name";if(typeof e=="string"&&e.includes(",")){const s=e.split(","),d=a.reduce((u,f)=>(u[f[i]]=f,u),{}),c=s.map(u=>{var f;return(f=d[u])==null?void 0:f[l]}).filter(u=>u!=null);return c.length?c.join(","):""}const r=a.find(s=>s[i]===e);return(r==null?void 0:r[l])??(e==null?"":String(e))}function ed(e,n){if(e==null)return"";const o=n.options||n,a=e?o==null?void 0:o.trueText:o==null?void 0:o.falseText;return a==null?"":String(a)}function td(e,n){const o=dc.resolveField(n,e.field),a=Qc(e),i=a==null?void 0:a.type;return i===Jc?Zc(o,a):i===Kc||e.dataType==="boolean"?ed(o,a||{}):o==null?"":String(o)}function nd(e,n,o,a,i,l,r,s,d,c,u,f,h,m,p,g,y,v,b){const{calculateCellPositionInRow:S}=l,{columnContext:T,hasLeftFixedColumn:N,hasRightFixedColumn:w}=r,{gridDataStyle:x,leftFixedGridDataStyle:C,rightFixedGridDataStyle:F}=m,{renderDataRow:V}=ge.getHierarchyRow(e,n,T,y,s,d,c,u,f,h,m,p,g,v,b),P=[V];function E(j,k){const U=S(j);return y.value.filter($=>$.visible!==!1).map(($,R)=>P[$.type]($,U,k,R))}function O(){return t.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:C.value},[E(T.value.leftColumns.filter(j=>j.visible),"left")])])}function L(){return t.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[t.createVNode("div",{class:"fv-grid-data",style:x.value},[E(T.value.primaryColumns.filter(j=>j.visible),"primary")])])}function B(){return t.createVNode("div",{ref:i,class:"fv-grid-content-right-fixed"},[t.createVNode("div",{class:"fv-grid-data",style:F.value},[E(T.value.rightColumns.filter(j=>j.visible),"right")])])}function M(){const j=[];return N.value&&j.push(O()),j.push(L()),w.value&&j.push(B()),j}return{renderDataArea:M}}const pa=t.defineComponent({name:"FTreeGrid",props:Xc,emits:["selectionChange","clickRow","expandNode","unSelectItem","dblclickNode","doubleClickRow","selectItem","filterChanged","unSelectAll","selectAll","sortChanged","selectionUpdate","beginEditCell","endEditCell"],setup(e,n){var _e,nt;const o=t.ref(!1),a=t.ref(!1),i=0,l=t.ref(((_e=e.rowOption)==null?void 0:_e.height)||28);let r=[],s=[];const d=t.ref(20),c=t.ref(e.columns),u=ge.useIdentify(e),{idField:f}=u,h=t.ref(),m=t.ref(),p=t.ref(),g=t.ref(),y=t.ref(),v=t.ref([]),b=t.ref(!1),S=t.ref(((nt=e.rowOption)==null?void 0:nt.wrapContent)||!1),T=ge.useGroupData(e,u),N=ge.useFilter(e,n),w=ge.useHierarchy(e),{collapseField:x}=w,{showLoading:C,renderLoading:F}=ge.useLoading(e,h),V=ge.useDataView(e,new Map,N,w,u),{dataView:P}=V,E=ge.useSelection(e,V,u,v,n),{showSelection:O,selectedValues:L}=E,B=ge.useSelectHierarchyItem(e,v,V,u,E,n),M=t.computed(()=>e.disabled),j=t.computed(()=>e.virtualized?Math.min(V.dataView.value.length,d.value):V.dataView.value.length),k=ge.usePagination(e,V),{shouldRenderPagination:U}=k,{containerStyleObject:$}=ge.useDataViewContainerStyle(e,v),R=t.ref(""),z=t.ref([]),oe=t.computed(()=>e.searchable||!1),H=t.ref(0),D=t.computed(()=>z.value.length?`${H.value+1}/${z.value.length}`:""),A=t.computed(()=>Qe.LocaleService.getRealPropertyValue(e.searchPlaceholder,"","datagrid.search.placeholder")),_=t.computed(()=>Qe.LocaleService.getLocaleValue("datagrid.search.search")),Y=t.computed(()=>Qe.LocaleService.getLocaleValue("datagrid.search.prev")),q=t.computed(()=>Qe.LocaleService.getLocaleValue("datagrid.search.next")),I=t.computed(()=>Qe.LocaleService.getLocaleValue("datagrid.search.clear")),K=ge.useCommandColumn(e),{applyCommands:W}=K;W(c);const{applyColumnSetting:Z,removeColumnSetting:ue}=ge.useSettingColumn(e);e.showSetting&&Z(c);const re=ge.useColumn(e,n),G=ge.useSort(e),{applyColumnSorter:Q,columnContext:ce,updateColumnRenderContext:Te}=re;Q(V,G);const Ne=ge.useGroupColumn(e,ce),te=ge.useRow(e,n,E,u),ae=ge.useEdit(e,n,u,te,v),me=ge.useVisualDataBound(e,V,l),ye=ge.useVisualDataCell(e,ae,me),xe=ge.useVisualDataRow(e,V,ae,w,u,me,ye,l),He=ge.useVisualData(e,c,V,j,i,xe),{getVisualData:Ae}=He,lt=ge.useCellPosition(e,ce,l,o),dt=ge.useSidebar(e,E),{sidebarWidth:fe}=dt,de=ge.useVirtualScroll(e,V,v,ce,He,j,i,fe,l,o),{onWheel:X,dataGridWidth:be,viewPortHeight:Ue,viewPortWidth:he,resetScroll:We,updateVisibleRowsOnLatestVisibleScope:ut}=de,ie=ge.useFitColumn(e,ce,m,he,Ne),{calculateColumnsSize:$e}=ie,ee=ge.useFilterHistory(),we=ge.useColumnFilter(m,y,V,ee,de),Me=ge.useDragColumn(e,n,re,V,Ne,T,de),De=t.computed(()=>{const le={"fv-grid":!0,"fv-grid-bordered":e.showBorder,"fv-grid-horizontal-bordered":e.showHorizontalLines,"fv-datagrid-strip":e.showStripe};return Ce.getCustomClass(le,e.customClass)}),rt=t.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":b.value,"fv-grid-wrap-content":S.value,"fv-grid-scrollbar-visible":de.shouldShowVirticalScrollbar.value&&b.value})),{renderDataArea:Ze}=nd(e,n,p,g,y,lt,re,V,ae,w,te,E,B,de,He,me,v,l,o),{renderGridHeader:Je,renderGridColumnResizeOverlay:mt,shouldShowHeader:ht}=ge.getColumnHeader(e,n,m,g,y,re,V,Me,we,N,ee,ie,Ne,E,dt,G,de,he,v,a),{renderDataGridSidebar:ne}=ge.getSidebar(e,te,E,dt,de),{renderDisableMask:Be}=ge.getDisableMask(),{renderHorizontalScrollbar:Ie}=ge.getHorizontalScrollbar(e,m,de),{renderVerticalScrollbar:Ye}=ge.getVerticalScrollbar(e,m,de);let ot=null;function at(){var le,Se,Ee;if(m.value&&m.value.clientHeight>0&&((le=m.value)==null?void 0:le.clientWidth)>0){const Ge=Math.ceil(m.value.clientHeight/l.value);Ge>d.value&&(d.value=Ge,ut()),Ue.value=((Se=p.value)==null?void 0:Se.clientHeight)||0,be.value=((Ee=m.value)==null?void 0:Ee.clientWidth)||0,p.value&&(he.value=p.value.clientWidth)}m.value&&(m.value.clientHeight>0||m.value.clientWidth>0)&&$e()}function wt(){ot!==null&&cancelAnimationFrame(ot),ot=requestAnimationFrame(()=>{ot=null,at()})}t.onMounted(()=>{m.value&&(d.value=Math.max(Math.ceil(m.value.clientHeight/l.value),d.value),v.value=Ae(0,j.value+i-1),ki.useResizeObserver(m.value,wt),$e(),t.nextTick(()=>{m.value&&(be.value=m.value.clientWidth),p.value&&(he.value=p.value.clientWidth,Ue.value=p.value.clientHeight)})),C.value&&F()}),t.onUnmounted(()=>{ot!==null&&cancelAnimationFrame(ot)});function Tt(le){V.collapseTo(le),V.reOrderVisibleIndex(),We()}function Bt(le){V.expandTo(le),V.reOrderVisibleIndex(),We()}function Mt(){const le=E.getSelectionRow();return le?le.dataIndex-1:-1}function bt(le){const Se=le!==void 0?le:Mt(),Ee=V.insertNewDataItem(Se===-1?0:Se);return v.value=Ae(0,j.value+i-1),Ee}function Ot(){const le=Mt();V.insertNewChildDataItem(le),v.value=Ae(0,j.value+i-