@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 247 kB
JavaScript
(function(te,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../modal/index.umd.js"),require("../transfer/index.umd.js"),require("../tabs/index.umd.js"),require("../order/index.umd.js"),require("../condition/index.umd.js"),require("../checkbox/index.umd.js"),require("../filter-bar/index.umd.js"),require("../tooltip/index.umd.js"),require("../pagination/index.umd.js"),require("../button/index.umd.js"),require("../search-box/index.umd.js"),require("../tags/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../binding-selector/index.umd.js"),require("../notify/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../fieldset/index.umd.js"),require("../drawer/index.umd.js"),require("../common/index.umd.js"),require("../combo-tree/index.umd.js"),require("../field-selector/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../schema-selector/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../dynamic-resolver/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","@vueuse/core","../data-view/index.umd.js","../modal/index.umd.js","../transfer/index.umd.js","../tabs/index.umd.js","../order/index.umd.js","../condition/index.umd.js","../checkbox/index.umd.js","../filter-bar/index.umd.js","../tooltip/index.umd.js","../pagination/index.umd.js","../button/index.umd.js","../search-box/index.umd.js","../tags/index.umd.js","../dynamic-form/index.umd.js","../designer-canvas/index.umd.js","../binding-selector/index.umd.js","../notify/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../fieldset/index.umd.js","../drawer/index.umd.js","../common/index.umd.js","../combo-tree/index.umd.js","../field-selector/index.umd.js","../mapping-editor/index.umd.js","../schema-selector/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../dynamic-resolver/index.umd.js"],n):(te=typeof globalThis<"u"?globalThis:te||self,n(te["flow-canvas"]={},te.Vue,te.LodashES,te.VueUseCore,te.dataView,null,te.FTransfer,te.FTabs,te.FOrder,null,te.FCheckBox,te.FFilterBar,te.FTooltip,te.FPagination,te.FButton,te.FSearchBox,te.FTags,te.FDynamicForm,null,te.FBindingSelector,te.notify,te.FAccordion,te.FAvatar,te.FButtonEdit,te.FButtonGroup,te.FCalendar,te.FCapsule,te.FColorPicker,te.FComboList,te.FContentContainer,te.FDataGrid,te.FDatePicker,te.FDropdown,te.FExteranlContainer,te.FEventsEditor,te.FImageCropper,te.FInputGroup,te.FLayout,te.FListNav,te.FListView,te.FLookup,te.FNav,te.FNumberSpinner,te.FNumberRange,te.FPageHeader,te.FPageFooter,te.FProgress,te.FQuerySolution,te.FRadioGroup,te.FRate,te.FResponseToolbar,te.FResponseLayout,te.FResponseLayoutEditorSetting,te.FSection,te.FSmokeDetector,te.FSplitter,te.FStep,te.FSwitch,te.FText,te.FTimePicker,te.FTreeview,te.FUploader,te.FVerifyDetail,te.FComponent,te.FVideo,te.FTextArea,te.FTreeGrid$1,te.FFieldset,te.FDrawer,te.common,te.FComboTree,te.FFieldSelector,te.FMappingEditor,te.FSchemaSelector,te.FEventParameter,te.FFilterConditionEditor,te.FSortConditionEditor,te.FMenuLookup,te.dynamicResolver))})(this,function(te,n,Ee,Ht,Ne,Oa,qt,zt,Gt,Fa,It,Ut,Yt,Xt,Bo,Kt,Qt,wt,ka,Jt,Do,Zt,en,tn,nn,on,rn,an,xt,sn,ln,cn,un,Po,dn,fn,pn,mn,hn,gn,vn,yn,bn,Cn,wn,xn,Sn,_n,Tn,Nn,Vn,On,Fn,kn,In,En,Mn,jn,Bn,Dn,Pn,Rn,$n,An,Ln,Wn,Hn,qn,zn,Be,Ro,$o,Ao,Lo,Wo,Ho,qo,zo,Go){"use strict";var Na=Object.defineProperty;var Va=(te,n,Ee)=>n in te?Na(te,n,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):te[n]=Ee;var re=(te,n,Ee)=>Va(te,typeof n!="symbol"?n+"":n,Ee);const Gn={modelValue:{type:Object,default:{}}};function Uo(){const r={aroundDirection:"none",left:2,right:2,top:2,bottom:2,x:0,y:0};function i(){const w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("fill","none"),w.setAttribute("stroke","#4d53e8"),w.setAttribute("stroke-width","2"),w.setAttribute("class",""),w}function s(){const w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("fill","none"),w.setAttribute("stroke","#4d53e8"),w.setAttribute("stroke-width","2"),w.setAttribute("stroke-linecap","round"),w}function a(){const w=document.createElementNS("http://www.w3.org/2000/svg","path");return w.setAttribute("fill","none"),w.setAttribute("stroke","#4d53e8"),w.setAttribute("stroke-width","2"),w.setAttribute("stroke-linecap","round"),w}function d(w,g,I,j){const P=M=>{M.key==="Delete"&&(w.indexOf("^"),document.removeEventListener("keydown",P),g.remove())};I.addEventListener("mouseenter",()=>{I.setAttribute("stroke","#37d0ff"),j.setAttribute("stroke","#37d0ff"),I.setAttribute("stroke-width","3"),document.addEventListener("keydown",P)}),I.addEventListener("mouseleave",()=>{I.setAttribute("stroke","#4d53e8"),I.setAttribute("stroke-width","2"),j.setAttribute("stroke","#4d53e8"),document.removeEventListener("keydown",P)})}function u(w){let g=document.getElementById(w);if(g==null){const I=document.createElementNS("http://www.w3.org/2000/svg","svg"),j=i();I.appendChild(j);const P=s();I.appendChild(P);const M=a();I.appendChild(M);const H=a();I.appendChild(H),g=document.createElement("div"),g.id=w,g.style.position="absolute",g.appendChild(I),d(w,g,j,P);const Y=document.getElementById("svg-container");return Y&&Y.appendChild(g),g}return g}function v(w,g,I,j,P){const M={x:0,y:0};return w==="west"&&(g==="north_west"&&(I==="north"&&(M.x=0,M.y=0-P/2),I==="west"&&(M.x=0-j/2,M.y=0)),g==="north_east"&&(I==="north"&&(M.x=-100,M.y=0-P/2),I==="east"&&(M.x=-100,M.y=0-P/2)),g==="south_east"&&(I==="south"&&(M.x=-100,M.y=0+P/2),I==="east"&&(M.x=-100,M.y=0+P/2)),g==="south_west"&&(I==="south"&&(M.x=0,M.y=0+P/2),I==="west"&&(M.x=0-j/2,M.y=0))),w==="east"&&(g==="north_west"&&(I==="north"&&(M.x=-100,M.y=0-P/2),I==="west"&&(M.x=100,M.y=0-P/2)),g==="north_east"&&(I==="north"&&(M.x=0,M.y=0-P/2),I==="east"&&(M.x=0+j/2,M.y=0)),g==="south_east"&&(I==="south"&&(M.x=0,M.y=0+P/2),I==="east"&&(M.x=0+j/2,M.y=0)),g==="south_west"&&(I==="south"&&(M.x=100,M.y=0+P/2),I==="west"&&(M.x=100,M.y=0+P/2))),w==="north"&&(g==="north_west"&&(I==="north"&&(M.x=0,M.y=0-P/2),I==="west"&&(M.x=0-j/2,M.y=0)),g==="north_east"&&(I==="north"&&(M.x=0,M.y=0-P/2),I==="east"&&(M.x=0+j/2,M.y=0)),g==="south_east"&&(I==="south"&&(M.x=0+j/2,M.y=-100),I==="east"&&(M.x=0+j/2,M.y=-100)),g==="south_west"&&(I==="south"&&(M.x=0-j/2,M.y=-100),I==="west"&&(M.x=0-j/2,M.y=-100))),w==="south"&&(g==="north_west"&&(I==="north"&&(M.x=0-j/2,M.y=100),I==="west"&&(M.x=0-j/2,M.y=100)),g==="north_east"&&(I==="north"&&(M.x=0+j/2,M.y=100),I==="east"&&(M.x=0+j/2,M.y=100)),g==="south_east"&&(I==="south"&&(M.x=0,M.y=0+P/2),I==="east"&&(M.x=0+j/2,M.y=0)),g==="south_west"&&(I==="south"&&(M.x=0,M.y=P/2),I==="west"&&(M.x=0-j/2,M.y=0))),M}function m(w,g,I,j){const P={x:0,y:0};return w==="south"&&(g==="west"&&(P.x=-100,P.y=0-j/2),g==="east"&&(P.x=100,P.y=-100),g==="south"&&(P.x=0-I/2,P.y=100),(g==="north"||g==="center")&&(P.x=0,P.y=0-j/2)),w==="north"&&(g==="west"&&(P.x=-100,P.y=100),g==="east"&&(P.x=100,P.y=100),g==="north"&&(P.x=0-I/2,P.y=-100),(g==="south"||g==="center")&&(P.x=0,P.y=j/2)),w==="east"&&(g==="north"&&(P.y=-100,P.x=-100),g==="south"&&(P.y=100,P.x=-100),g==="east"&&(P.x=100,P.y=100),(g==="west"||g==="center")&&(P.x=0-I/2,P.y=0)),w==="west"&&(g==="north"&&(P.y=-100,P.x=100),g==="south"&&(P.y=100,P.x=100),g==="west"&&(P.x=-100,P.y=j/2),(g==="east"||g==="center")&&(P.x=I/2,P.y=0)),P}function p(w,g,I,j,P,M,H){const Y=H==="south"||H==="east"?"portrait":"landscape",$=P,L=Y==="landscape"?"east":"north",G=H==="center"?Y==="landscape"?"west":"south":H,K=v($,M,L,w,g),{x:z,y:U}=K,A=m(L,G,w,g),{x:W,y:J}=A;J<0&&(g+=Math.abs(J));const Z=new Map([["default",0+z],["portrait",0+z],["landscape",0+z]]),X=new Map([["default",g+U],["portrait",g+U],["landscape",g+U]]);z<0&&(w+=Math.abs(z)),W>0&&(w+=W);const Te=new Map([["default",w+W],["portrait",w+W],["landscape",w+W]]),Se=new Map([["default",0+J],["portrait",0+J],["landscape",0+J]]),xe=j.left>r.left,Ve=j.bottom>r.bottom,Ie=xe?0:Ve?w/2:Z.get(Y),ke=Ve?g+j.bottom:xe?g/2:X.get(Y),je=Te.get(Y),Me=Se.get(Y);return[{x:Ie,y:ke},{x:je,y:Me},{x:W,y:J}]}function c(w,g,I,j,P,M,H){const Y=H==="south"||H==="west"?"portrait":"landscape",$=P,L=Y==="landscape"?"west":"north",G=H,K=v($,M,L,w,g),{x:z,y:U}=K,A=m(L,G,w,g),{x:W,y:J}=A;J<0&&(g+=Math.abs(J)),z>0&&(w+=z),W<0&&(w+=Math.abs(W));const Z=new Map([["default",w+z],["portrait",w+z],["landscape",w+z]]),X=new Map([["default",g+U],["portrait",g+U],["landscape",g+U]]),Te=new Map([["default",0+W],["portrait",0+W],["landscape",0+W]]),Se=new Map([["default",0+J],["portrait",0+J],["landscape",0+J]]),xe=j.right>r.right,Ve=j.bottom>r.bottom,Ie=xe?w+j.right:Ve?w/2:Z.get(Y),ke=Ve?g+j.bottom:xe?g/2:X.get(Y),je=Te.get(Y),Me=Se.get(Y);return[{x:Ie,y:ke},{x:je,y:Me},{x:W,y:J}]}function b(w,g,I,j,P,M,H){const Y=H==="north"||H==="east"?"portrait":"landscape",$=P,L=Y==="landscape"?"east":"south",G=H,K=v($,M,L,w,g),{x:z,y:U}=K,A=m(L,G,w,g),{x:W,y:J}=A,Z=new Map([["default",0+z],["portrait",0+z],["landscape",0+z]]),X=new Map([["default",0+U],["portrait",0+U],["landscape",0+U]]);z<0&&(w+=Math.abs(z)),U<0&&(g+=Math.abs(U)),W>0&&(w+=W),J>0&&(g+=J);const Te=new Map([["default",w+W],["portrait",w+W],["landscape",w+W]]),Se=new Map([["default",g+J],["portrait",g+J],["landscape",g+J]]),xe=j.left>r.left,Ve=j.top>r.top,Ie=xe?0:Ve?w/2:Z.get(Y),ke=Ve?0:xe?g/2:X.get(Y),je=Te.get(Y),Me=Se.get(Y);return[{x:Ie,y:ke},{x:je,y:Me},{x:W,y:J}]}function y(w,g,I,j,P,M,H){const Y=H==="north"||H==="west"?"portrait":"landscape",$=P,L=Y==="landscape"?"west":"south",G=H,K=v($,M,L,w,g),{x:z,y:U}=K,A=m(L,G,w,g),{x:W,y:J}=A;W<0&&(w+=Math.abs(W));const Z=new Map([["default",w+z],["portrait",w+z],["landscape",w+z]]),X=new Map([["default",0+U],["portrait",0+U],["landscape",0+U]]);U<0&&(g+=Math.abs(U)),J>0&&(g+=J);const Te=new Map([["default",0+W],["portrait",0+W],["landscape",0+W]]),Se=new Map([["default",g+J],["portrait",g+J],["landscape",g+J]]),xe=j.right>r.right,Ve=j.top>r.top,Ie=xe?w+j.right:Ve?w/2:Z.get(Y),ke=Ve?0:xe?g/2:X.get(Y),je=Te.get(Y),Me=Se.get(Y);return[{x:Ie,y:ke},{x:je,y:Me},{x:W,y:J}]}const F=new Map([["north_east",p],["north_west",c],["south_east",b],["south_west",y]]),_=new Map([["east",["north_west","south_west"]],["west",["north_east","south_east"]],["north",["south_west","south_east"]],["south",["north_west","north_east"]],["center",[]]]);function f(w,g){return w==="north_west"?{aroundDirection:"north_west",left:g.left,right:100,top:g.top,bottom:g.top}:w==="south_west"?{aroundDirection:"south_west",left:g.left,right:100,top:g.top,bottom:g.bottom}:g}function S(w,g){return w==="north_east"?{left:100,right:g.right,top:g.top,bottom:g.top}:w==="south_east"?{left:100,right:g.right,top:g.top,bottom:g.bottom}:g}function C(w,g){return w==="south_west"?{left:g.left,right:g.right,top:100,bottom:g.top}:w==="south_east"?{left:g.left,right:g.right,top:100,bottom:g.bottom}:g}function h(w,g){return w==="north_west"?{left:g.left,right:g.right,top:g.top,bottom:100}:w==="north_east"?{left:g.left,right:g.right,top:g.top,bottom:100}:g}function x(w,g){return g}const V=new Map([["east",f],["west",S],["north",C],["south",h],["center",x]]);function l(w,g,I,j){const P=g.x-w.x,M=g.y-w.y,H=P>=0?"east":"west",Y=M>=0?"south":"north",$=`${Y}_${H}`,G=(_.get(I)||[]).includes($),K=V.get(I),z=G?K($,r):r,U=Math.abs(P),A=Math.abs(M),W=F.get(`${Y}_${H}`),[J,Z,X]=W(U,A,G,z,I,$,j),Te=H==="west"?X.x<0?Math.abs(X.x):0:X.x>0?X.x:0,Se=z.left+z.right+U+Te,xe=Y==="north"?X.y<0?Math.abs(X.y):0:X.y>0?X.y:0,Ve=z.top+z.bottom+A+xe,Ie=H==="east"?w.x-z.left:w.x+z.right-Se,ke=Y==="south"?w.y-z.top:w.y+z.bottom-Ve,je=H==="east"?z.left:Se-z.right,Me=Y==="north"?Ve-z.bottom:z.top,Ze=H==="west"?X.x<0?Math.abs(X.x):0:X.x<0?Se:Se-X.x,oe=Y==="north"?X.y<0?Math.abs(X.y):0:X.y<0?Ve:Ve-X.y;return{width:Se,height:Ve,left:Ie,top:ke,startPoinInBoundray:{x:je,y:Me},firstControlPoint:J,secondControlPoint:Z,endPoinInBoundray:{x:Ze,y:oe}}}function T(w,g,I,j,P){w.style.position="absolute",w.style.alignItems="center",w.style.left=`${g}px`,w.style.top=`${I}px`,w.style.width=j+"px",w.style.height=P+"px"}function N(w,g,I,j,P,M,H){const Y=w.childNodes[0];Y.setAttribute("width",String(g)),Y.setAttribute("height",String(I)),w.appendChild(Y);const $=Y.childNodes[0],L=`${j.x} ${j.y}`,G=`${P.x} ${P.y}`,K=`${M.x} ${M.y}`,z=`${H.x} ${H.y}`,U="M ".concat(L).concat(" C ").concat(G).concat(","+K+",").concat(z);$.setAttribute("d",U),$.setAttribute("fill","none"),$.setAttribute("stroke","#4d53e8"),$.setAttribute("stroke-width","2"),$.setAttribute("class","")}function k(w,g,I,j,P){const{width:M,height:H,left:Y,top:$,startPoinInBoundray:L,firstControlPoint:G,secondControlPoint:K,endPoinInBoundray:z}=l(g,I,j,P);T(w,Y,$,M,H),N(w,M,H,L,G,K,z)}function O(w,g,I,j,P){const M=u(w);k(M,g,I,j,P)}function B(w){return Number(w.replace("px",""))}function D(w){if(w!==null){const g=w.parentNode,I=B(g.style.left),j=B(g.style.top);return{x:I+w.offsetLeft+w.offsetWidth/2,y:j+w.offsetTop+w.offsetHeight/2}}return{x:0,y:0}}function R(w,g){const I=document.getElementById(w),j=document.getElementById(g),P=D(I),M=D(j),H=P.x+2,Y=P.y,$=M.x-2,L=M.y;return{startPoint:{x:H,y:Y},endPoint:{x:$,y:L}}}function E(w,g,I,j){const{startPoint:P,endPoint:M}=R(w,g);O(`${w}_${g}`,P,M,I,j)}return{connect:E,drawing:O}}function Yo(e){const t=n.ref(),o=n.ref(0),r=n.ref(0),i=n.ref({x:0,y:0}),s=n.ref(),{drawing:a}=e;function d(f){return Number(f.replace("px",""))}function u(f){return(f&&f.className&&f.className.split?f.className.split(" "):[]).includes("f-flow-ancher")}function v(f){switch((f?f.className.split(" "):[]).find(h=>h.startsWith("circle-"))||""){case"circle-left":return"west";case"circle-right":return"east";case"circle-top":return"north";case"circle-bottom":return"south";default:return"center"}}function m(f,S,C){const h=C.getBoundingClientRect();o.value=h.left,r.value=h.top,i.value={x:f,y:S},t.value=v(C)}function p(f){var T;const S=f.clientX-o.value,C=f.clientY-r.value,h=i.value.x+S,x=i.value.y+C,V=f.target,l=V&&typeof V.className=="string"&&u(V)?v(V):"center";a(`${(T=s.value)==null?void 0:T.id}_curve_to`,{x:i.value.x,y:i.value.y},{x:h,y:x},t.value,l)}function c(f){const S=document.getElementById(f);S&&S.remove()}function b(){document.addEventListener("mousemove",p)}function y(){document.removeEventListener("mousemove",p)}function F(f){s.value=void 0,y()}function _(f,S){s.value=document.getElementById(f);const C=s.value.offsetParent,h=s.value.getBoundingClientRect(),x=C.getBoundingClientRect(),V=d(C.style.left)+(h.left-x.left),l=d(C.style.top)+(h.top-x.top),T=V+h.width/2,N=l+h.height/2;m(T,N,s.value),b()}return{drawFrom:_,eraseDrawingLine:c,finishToDraw:F,getAncherPointPosition:v,isAncherPoint:u}}const Xo={id:{type:String,default:""},type:{type:String,default:""},modelValue:{type:Object},x:{type:Number,default:0},y:{type:Number,default:0},connection:{type:Array,default:[]}},mt=n.ref(0);function Ko(e,t){const o=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.top>=o.top,s=r.top<=o.bottom;return i&&s}function Qo(e){const t=e.querySelector(".component-btn-group");if(!t)return;t.style.display="";const o=t.getBoundingClientRect();if(!(o.top===0&&o.left===0)){const r=t.querySelector("div");if(r){const i=r.getBoundingClientRect();r.style.top=o.top+"px";let s=o.left-i.width;const a=document.querySelector(".editorDiv");if(a){const d=a.getBoundingClientRect();s<d.left&&({left:s}=e.getBoundingClientRect())}r.style.left=s+"px"}}}function Jo(e){if(!window.scrollContainerList)return;const t=Array.from(window.scrollContainerList);if(t.length&&t.length===1){const o=t[0],r=document.querySelector(`[id=${o}]`);if(r&&r.contains(e))return r}}function Un(e){if(!e)return;const t=e.getBoundingClientRect();if(t.width===0&&t.height===0)return;const o=e.querySelector(".component-btn-group");if(o){let r=!0;const i=Jo(e);if(i&&(r=Ko(e,i)),!r){o.style.display="none";return}Qo(e)}}function St(e){if(!e)return;let t;e.className.includes("dgComponentSelected")?t=e:t=e.querySelector(".dgComponentSelected"),t&&Un(t)}const Zo={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _t(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 Yn={exports:{}};(function(e,t){(function(o){e.exports=o()})(function(){return function(){function o(r,i,s){function a(v,m){if(!i[v]){if(!r[v]){var p=typeof _t=="function"&&_t;if(!m&&p)return p(v,!0);if(d)return d(v,!0);var c=new Error("Cannot find module '"+v+"'");throw c.code="MODULE_NOT_FOUND",c}var b=i[v]={exports:{}};r[v][0].call(b.exports,function(y){var F=r[v][1][y];return a(F||y)},b,b.exports,o,r,i,s)}return i[v].exports}for(var d=typeof _t=="function"&&_t,u=0;u<s.length;u++)a(s[u]);return a}return o}()({1:[function(o,r,i){var s={},a="(?:^|\\s)",d="(?:\\s|$)";function u(p){var c=s[p];return c?c.lastIndex=0:s[p]=c=new RegExp(a+p+d,"g"),c}function v(p,c){var b=p.className;b.length?u(c).test(b)||(p.className+=" "+c):p.className=c}function m(p,c){p.className=p.className.replace(u(c)," ").trim()}r.exports={add:v,rm:m}},{}],2:[function(o,r,i){(function(s){var a=o("contra/emitter"),d=o("crossvent"),u=o("./classes"),v=document,m=v.documentElement;function p(O,B){var D=arguments.length;D===1&&Array.isArray(O)===!1&&(B=O,O=[]);var R,E,w,g,I,j,P,M,H,Y=null,$,L,G=!1,K=0,z,U=B||{};U.moves===void 0&&(U.moves=S),U.accepts===void 0&&(U.accepts=S),U.invalid===void 0&&(U.invalid=Ze),U.containers===void 0&&(U.containers=O||[]),U.isContainer===void 0&&(U.isContainer=f),U.copy===void 0&&(U.copy=!1),U.copySortSource===void 0&&(U.copySortSource=!1),U.revertOnSpill===void 0&&(U.revertOnSpill=!1),U.removeOnSpill===void 0&&(U.removeOnSpill=!1),U.direction===void 0&&(U.direction="vertical"),U.ignoreInputTextSelection===void 0&&(U.ignoreInputTextSelection=!0),U.mirrorContainer===void 0&&(U.mirrorContainer=v.body);var A=a({containers:U.containers,start:je,end:oe,cancel:st,remove:Pe,destroy:Te,canMove:ke,dragging:!1});return U.removeOnSpill===!0&&A.on("over",he).on("out",ye),J(),A;function W(q){return A.containers.indexOf(q)!==-1||U.isContainer(q)}function J(q){var ne=q?"remove":"add";y(m,ne,"mousedown",xe),y(m,ne,"mouseup",De)}function Z(q){var ne=q?"remove":"add";y(m,ne,"mousemove",Ve)}function X(q){var ne=q?"remove":"add";d[ne](m,"selectstart",Se),d[ne](m,"click",Se)}function Te(){J(!0),De({})}function Se(q){$&&q.preventDefault()}function xe(q){g=q.clientX,I=q.clientY;var ne=F(q)!==1||q.metaKey||q.ctrlKey;if(!ne){var ee=q.target,de=Ie(ee);de&&($=de,Z(),q.type==="mousedown"&&(V(ee)?ee.focus():q.preventDefault()))}}function Ve(q){if($){if(F(q)===0){De({});return}if(!(q.clientX!==void 0&&Math.abs(q.clientX-g)<=(U.slideFactorX||0)&&q.clientY!==void 0&&Math.abs(q.clientY-I)<=(U.slideFactorY||0))){if(U.ignoreInputTextSelection){var ne=k("clientX",q)||0,ee=k("clientY",q)||0,de=v.elementFromPoint(ne,ee);if(V(de))return}var be=$;Z(!0),X(),oe(),Me(be),u.add(M||w,"gu-transit"),Re(),Fe(),K=0,Xe(q)}}}function Ie(q){if(!(A.dragging&&R)&&!W(q)){for(var ne=q;x(q)&&W(x(q))===!1;)if(U.invalid(q,ne)||(q=x(q),!q))return;var ee=x(q);if(ee&&!U.invalid(q,ne)){var de=U.moves(q,ee,ne,T(q));if(de)return{item:q,source:ee}}}}function ke(q){return!!Ie(q)}function je(q){var ne=Ie(q);ne&&Me(ne)}function Me(q){ze(q.item,q.source)&&(M=q.item.cloneNode(!0),A.emit("cloned",M,q.item,"copy")),E=q.source,w=q.item,j=P=T(q.item),A.dragging=!0,A.emit("drag",w,E)}function Ze(){return!1}function oe(){if(A.dragging){var q=M||w;Le(q,x(q))}}function we(){$=!1,Z(!0),X(!0)}function De(q){if(we(),!!A.dragging){var ne=M||w,ee=k("clientX",q)||0,de=k("clientY",q)||0,be=_(R,ee,de),Ce=ut(be,ee,de);Ce&&(M&&U.copySortSource||!M||Ce!==E)?Le(ne,Ce):U.removeOnSpill?Pe():st()}}function Le(q,ne){var ee=x(q);M&&U.copySortSource&&ne===E&&ee.removeChild(w),rt(ne)?A.emit("cancel",q,E):A.emit("drop",q,ne,E,P),ot()}function Pe(){if(A.dragging){var q=M||w,ne=x(q);ne&&ne.removeChild(q),A.emit(M?"cancel":"remove",q,ne,E),ot()}}function st(q){if(A.dragging){var ne=arguments.length>0?q:U.revertOnSpill,ee=M||w,de=x(ee),be=rt(de);be===!1&&ne&&(M?de&&de.removeChild(M):E.insertBefore(ee,j)),be||ne?A.emit("cancel",ee,E,E):A.emit("drop",ee,de,E,P),ot()}}function ot(){var q=M||w;we(),qe(),Ye(),q&&u.rm(q,"gu-transit"),H&&clearTimeout(H),A.dragging=!1,Y&&A.emit("out",q,Y,E),A.emit("dragend",q,K),E=w=M=j=P=H=Y=null}function rt(q,ne){var ee;return ne!==void 0?ee=ne:R?ee=P:ee=T(M||w),q===E&&ee===j}function ut(q,ne,ee){for(var de=q;de&&!be();)de=x(de);return de;function be(){var Ce=W(de);if(Ce===!1)return!1;var se=it(de,q),Oe=Ae(de,se,ne,ee),We=rt(de,Oe);return We?!0:U.accepts(w,de,E,Oe)}}function Xe(q){if(!R)return;q.preventDefault();var ne=k("clientX",q)||0,ee=k("clientY",q)||0;R.style.left=ne-2+"px",R.style.top=ee-2+"px";var de=M||w,be=_(R,ne,ee),Ce=ut(be,ne,ee),se=Ce!==null&&Ce!==Y;(se||Ce===null)&&(tt(),Y=Ce,dt()),_e(be,ee);var Oe=x(de);if(Ce===E&&M&&!U.copySortSource){Oe&&Oe.removeChild(de);return}var We,et=it(Ce,be);if(G=at(et,Ce),et!==null)We=Ae(Ce,et,ne,ee);else if(U.revertOnSpill===!0&&!M)We=j,Ce=E;else{M&&Oe&&Oe.removeChild(de),M&&L&&(L.style.display="none");return}L.style.display="block",ie(We,de,se),We?Q(et,We):ve(Ce);function Ge(Ue){A.emit(Ue,de,Y,E)}function dt(){se&&Ge("over")}function tt(){Y&&Ge("out")}}function ie(q,ne,ee){(q===ne||q===T(ne))&&(P=T(ne)),(q===null&&ee||q!==ne&&q!==T(ne))&&(P=q)}function he(q){u.rm(q,"gu-hide")}function ye(q){A.dragging&&u.add(q,"gu-hide")}function Fe(){R||(R=document.createElement("div"),R.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",R.innerHTML=U.getMirrorText&&U.getMirrorText(w)||"控件",u.add(R,"gu-mirror"),U.mirrorContainer.appendChild(R),y(m,"add","mousemove",Xe),u.add(U.mirrorContainer,"gu-unselectable"),A.emit("cloned",R,w,"mirror"))}function Re(){if(L=document.createElement("div"),u.add(L,"gu-insertion"),w){var q=w.getBoundingClientRect();L.style.left=q.left+"px",L.style.top=q.top+"px"}G=!1,U.mirrorContainer.appendChild(L)}function qe(){R&&(u.rm(U.mirrorContainer,"gu-unselectable"),y(m,"remove","mousemove",Xe),x(R).removeChild(R),R=null)}function Ye(){L&&(x(L).removeChild(L),L=null)}function it(q,ne){for(var ee=ne;ee!==q&&x(ee)!==q;)ee=x(ee);return ee===m?null:ee}function at(q,ne){if(!ne)return G;var ee=q||ne&&ne.lastElementChild;if(!ee)return!0;var de=getComputedStyle(q),be=/^inline/.test(de.getPropertyValue("display"))||/^(left|right)$/.test(de.getPropertyValue("float"));if(be)return!0;if(ne){var Ce=getComputedStyle(ne),se=Ce.getPropertyValue("display");if(/flex$/.test(se)){var Oe=Ce.getPropertyValue("flex-direction")||"row";if(Oe==="row"||Oe==="row-reverse")return!Ke(ne)}return!1}return!0}function Ke(q){if(!q.children||!q.children.length)return!1;for(const ne of Array.from(q.children)){const de=(ne.className&&ne.className.split(" ")||[]).filter(be=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(be));if(!de.length)return!1;for(const be of de){const Ce=be.slice(be.lastIndexOf("-")+1);if(parseInt(Ce,10)!==12)return!1}}return!0}function Q(q,ne){const ee=ne.getBoundingClientRect();if(L.style.left=ee.left+"px",L.style.top=ee.top+"px",G){if(L.style.height=ee.height+"px",L.style.width="4px",q){const de=q.getBoundingClientRect();de.top!==ee.top&&(L.style.left=de.right+"px",L.style.top=de.top+"px",L.style.height=de.height+"px")}}else if(L.style.height="4px",L.style.width=ee.width+"px",z){const de=z.getBoundingClientRect();ee.top<de.top&&(L.style.display="none")}ne===w&&w&&(L.style.display="none")}function ve(q){P=null;var ne=q.lastElementChild;if(ne){var ee=ne.getBoundingClientRect();G?(L.style.left=ee.right+"px",L.style.top=ee.top+"px",L.style.height=ee.height+"px",L.style.width="4px"):(L.style.left=ee.left+"px",L.style.top=ee.bottom+"px",L.style.height="4px",L.style.width=ee.width+"px"),ne===w&&w&&(L.style.display="none")}else L.style.display="none"}function _e(q,ne){if(!U.mirrorContainer.contains(q)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(z=c(q),!z||!z.contains(q)))return;const ee=document.querySelector(".dgComponentSelected"),de=z.getBoundingClientRect();if(ne-30<de.top&&z.scrollTop>0){let be=z.scrollTop<10?z.scrollTop:10;z.scrollBy(0,-1*be),ee&&z.contains(ee)&&(K=K+-1*be)}if(ne+30>de.bottom&&z.scrollTop<z.scrollHeight-z.clientHeight){const be=z.scrollHeight-z.clientHeight-z.scrollTop;let Ce=be<10?be:10;z.scrollBy(0,Ce),ee&&z.contains(ee)&&(K=K+Ce)}}function Ae(q,ne,ee,de){var be=U.direction==="horizontal",Ce=U.direction==="mixed",se=ne!==q?We():Oe();return se;function Oe(){var Ge=q.children.length,dt,tt,Ue;for(dt=0;dt<Ge;dt++)if(tt=q.children[dt],Ue=tt.getBoundingClientRect(),be&&Ue.left+Ue.width/2>ee||!Ce&&!be&&Ue.top+Ue.height/2>de||Ce&&Ue.left+Ue.width>ee&&Ue.top+Ue.height>de)return tt;return null}function We(){var Ge=ne.getBoundingClientRect();if(Ce){var dt=de-Ge.top,tt=ee-Ge.left,Ue=Ge.bottom-de,At=Ge.right-ee,Lt=Math.min(tt,At,dt,Ue),Wt;return G?Wt=At<tt:Wt=Ue===Lt||At===Lt||tt===Lt,et(Wt)}return et(be?ee>Ge.left+C(Ge)/2:de>Ge.top+h(Ge)/2)}function et(Ge){return Ge?T(ne):ne}}function ze(q,ne){return typeof U.copy=="boolean"?U.copy:U.copy(q,ne)}}function c(O){const B=Array.from(window.scrollContainerList);if(B.length===1){const R=Array.from(window.scrollContainerList)[0];return document.getElementById(R)}const D=b(B);for(const R of D)if(R.contains(O))return R;return null}function b(O){const B=[];return O.forEach(D=>{const R=document.getElementById(D);R&&B.push(R)}),B.sort((D,R)=>D.contains(R)?1:R.contains(D)?-1:0),B}function y(O,B,D,R){var E={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},w={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},g={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};s.navigator.pointerEnabled?d[B](O,w[D],R):s.navigator.msPointerEnabled?d[B](O,g[D],R):(d[B](O,E[D],R),d[B](O,D,R))}function F(O){if(O.touches!==void 0)return O.touches.length;if(O.which!==void 0&&O.which!==0)return O.which;if(O.buttons!==void 0)return O.buttons;var B=O.button;if(B!==void 0)return B&1?1:B&2?3:B&4?2:0}function _(O,B,D){O=O||{};var R=O.className||"",E;return O.className+=" gu-hide",E=v.elementFromPoint(B,D),O.className=R,E}function f(){return!1}function S(){return!0}function C(O){return O.width||O.right-O.left}function h(O){return O.height||O.bottom-O.top}function x(O){return O.parentNode===v?null:O.parentNode}function V(O){return O.tagName==="INPUT"||O.tagName==="TEXTAREA"||O.tagName==="SELECT"||l(O)}function l(O){return!O||O.contentEditable==="false"?!1:O.contentEditable==="true"?!0:l(x(O))}function T(O){return O.nextElementSibling||B();function B(){var D=O;do D=D.nextSibling;while(D&&D.nodeType!==1);return D}}function N(O){return O.targetTouches&&O.targetTouches.length?O.targetTouches[0]:O.changedTouches&&O.changedTouches.length?O.changedTouches[0]:O}function k(O,B){var D=N(B),R={pageX:"clientX",pageY:"clientY"};return O in R&&!(O in D)&&R[O]in D&&(O=R[O]),D[O]}r.exports=p}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,r,i){r.exports=function(a,d){return Array.prototype.slice.call(a,d)}},{}],4:[function(o,r,i){var s=o("ticky");r.exports=function(d,u,v){d&&s(function(){d.apply(v||null,u||[])})}},{ticky:10}],5:[function(o,r,i){var s=o("atoa"),a=o("./debounce");r.exports=function(u,v){var m=v||{},p={};return u===void 0&&(u={}),u.on=function(c,b){return p[c]?p[c].push(b):p[c]=[b],u},u.once=function(c,b){return b._once=!0,u.on(c,b),u},u.off=function(c,b){var y=arguments.length;if(y===1)delete p[c];else if(y===0)p={};else{var F=p[c];if(!F)return u;F.splice(F.indexOf(b),1)}return u},u.emit=function(){var c=s(arguments);return u.emitterSnapshot(c.shift()).apply(this,c)},u.emitterSnapshot=function(c){var b=(p[c]||[]).slice(0);return function(){var y=s(arguments),F=this||u;if(c==="error"&&m.throws!==!1&&!b.length)throw y.length===1?y[0]:y;return b.forEach(function(f){m.async?a(f,y,F):f.apply(F,y),f._once&&u.off(c,f)}),u}},u}},{"./debounce":4,atoa:3}],6:[function(o,r,i){(function(s){var a=o("custom-event"),d=o("./eventmap"),u=s.document,v=c,m=y,p=[];s.addEventListener||(v=b,m=F),r.exports={add:v,remove:m,fabricate:_};function c(x,V,l,T){return x.addEventListener(V,l,T)}function b(x,V,l){return x.attachEvent("on"+V,S(x,V,l))}function y(x,V,l,T){return x.removeEventListener(V,l,T)}function F(x,V,l){var T=C(x,V,l);if(T)return x.detachEvent("on"+V,T)}function _(x,V,l){var T=d.indexOf(V)===-1?k():N();x.dispatchEvent?x.dispatchEvent(T):x.fireEvent("on"+V,T);function N(){var O;return u.createEvent?(O=u.createEvent("Event"),O.initEvent(V,!0,!0)):u.createEventObject&&(O=u.createEventObject()),O}function k(){return new a(V,{detail:l})}}function f(x,V,l){return function(N){var k=N||s.event;k.target=k.target||k.srcElement,k.preventDefault=k.preventDefault||function(){k.returnValue=!1},k.stopPropagation=k.stopPropagation||function(){k.cancelBubble=!0},k.which=k.which||k.keyCode,l.call(x,k)}}function S(x,V,l){var T=C(x,V,l)||f(x,V,l);return p.push({wrapper:T,element:x,type:V,fn:l}),T}function C(x,V,l){var T=h(x,V,l);if(T){var N=p[T].wrapper;return p.splice(T,1),N}}function h(x,V,l){var T,N;for(T=0;T<p.length;T++)if(N=p[T],N.element===x&&N.type===V&&N.fn===l)return T}}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,r,i){(function(s){var a=[],d="",u=/^on/;for(d in s)u.test(d)&&a.push(d.slice(2));r.exports=a}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,r,i){(function(s){var a=s.CustomEvent;function d(){try{var u=new a("cat",{detail:{foo:"bar"}});return u.type==="cat"&&u.detail.foo==="bar"}catch{}return!1}r.exports=d()?a:typeof document<"u"&&typeof document.createEvent=="function"?function(v,m){var p=document.createEvent("CustomEvent");return m?p.initCustomEvent(v,m.bubbles,m.cancelable,m.detail):p.initCustomEvent(v,!1,!1,void 0),p}:function(v,m){var p=document.createEventObject();return p.type=v,m?(p.bubbles=!!m.bubbles,p.cancelable=!!m.cancelable,p.detail=m.detail):(p.bubbles=!1,p.cancelable=!1,p.detail=void 0),p}}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,r,i){var s=r.exports={},a,d;function u(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=u}catch{a=u}try{typeof clearTimeout=="function"?d=clearTimeout:d=v}catch{d=v}})();function m(h){if(a===setTimeout)return setTimeout(h,0);if((a===u||!a)&&setTimeout)return a=setTimeout,setTimeout(h,0);try{return a(h,0)}catch{try{return a.call(null,h,0)}catch{return a.call(this,h,0)}}}function p(h){if(d===clearTimeout)return clearTimeout(h);if((d===v||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(h);try{return d(h)}catch{try{return d.call(null,h)}catch{return d.call(this,h)}}}var c=[],b=!1,y,F=-1;function _(){!b||!y||(b=!1,y.length?c=y.concat(c):F=-1,c.length&&f())}function f(){if(!b){var h=m(_);b=!0;for(var x=c.length;x;){for(y=c,c=[];++F<x;)y&&y[F].run();F=-1,x=c.length}y=null,b=!1,p(h)}}s.nextTick=function(h){var x=new Array(arguments.length-1);if(arguments.length>1)for(var V=1;V<arguments.length;V++)x[V-1]=arguments[V];c.push(new S(h,x)),c.length===1&&!b&&m(f)};function S(h,x){this.fun=h,this.array=x}S.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={};function C(){}s.on=C,s.addListener=C,s.once=C,s.off=C,s.removeListener=C,s.removeAllListeners=C,s.emit=C,s.prependListener=C,s.prependOnceListener=C,s.listeners=function(h){return[]},s.binding=function(h){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(h){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],10:[function(o,r,i){(function(s){var a=typeof s=="function",d;a?d=function(u){s(u)}:d=function(u){setTimeout(u,0)},r.exports=d}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,r,i){(function(s,a){var d=o("process/browser.js").nextTick,u=Function.prototype.apply,v=Array.prototype.slice,m={},p=0;i.setTimeout=function(){return new c(u.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new c(u.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(b){b.close()};function c(b,y){this._id=b,this._clearFn=y}c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(b,y){clearTimeout(b._idleTimeoutId),b._idleTimeout=y},i.unenroll=function(b){clearTimeout(b._idleTimeoutId),b._idleTimeout=-1},i._unrefActive=i.active=function(b){clearTimeout(b._idleTimeoutId);var y=b._idleTimeout;y>=0&&(b._idleTimeoutId=setTimeout(function(){b._onTimeout&&b._onTimeout()},y))},i.setImmediate=typeof s=="function"?s:function(b){var y=p++,F=arguments.length<2?!1:v.call(arguments,1);return m[y]=!0,d(function(){m[y]&&(F?b.apply(null,F):b.call(null),i.clearImmediate(y))}),y},i.clearImmediate=typeof a=="function"?a:function(b){delete m[b]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Yn);var tr=Yn.exports;const Xn=er(tr),nr={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}},or={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Et=n.defineComponent({name:"Toast",props:or,emits:["close","click"],setup:(e,t)=>{const o=n.ref(e.animate),r="fadeOut",i=n.computed(()=>e.options),s=n.ref(!1),a=n.computed(()=>{const f={animated:s.value,toast:!0};return f[e.animate]=!1,f[r]=s.value,f[i.value.type]=!0,i.value.theme&&(f[i.value.theme]=!0),f}),d=n.computed(()=>{const C=`f-icon-${i.value&&i.value.type?i.value.type.replace("toasty-type-",""):"default"}`,h={"f-icon":!0};return h[C]=!0,h}),u=n.computed(()=>i.value.title||i.value.message),v=n.computed(()=>i.value.title&&i.value.message),m=n.computed(()=>!i.value.title&&i.value.message),p=n.computed(()=>e.showCloseButton),c=n.computed(()=>!!i.value.buttons||!!t.slots.default);function b(f){f.stopPropagation(),f.preventDefault(),s.value=!1,setTimeout(()=>{t.emit("close",i.value)},200)}function y(f,S){}function F(f){return`f-preten-link ${f.customClass?f.customClass:""}`}n.watch(o,()=>{o.value});const _=()=>{var f;return n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"after-toast-msg text-right"},[!t.slots.default&&((f=i.value.buttons)==null?void 0:f.map(S=>n.createVNode("span",{class:F(S),onClick:C=>void 0},[S.text]))),t.slots.default&&t.slots.default()])])};return()=>n.createVNode("div",{class:a.value,style:"min-height:44px"},[p.value&&n.createVNode("button",{title:"关闭",class:"toast-close f-btn-icon f-bare",onClick:b},[n.createVNode("span",{class:"f-icon modal_close"},null)]),u.value&&n.createVNode("section",{class:"modal-tips"},[n.createVNode("div",{class:"float-left modal-tips-iconwrap"},[n.createVNode("span",{class:d.value},null)]),n.createVNode("div",{class:"modal-tips-content"},[v.value&&n.createVNode(n.Fragment,null,[n.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:i.value.title},null),n.createVNode("p",{class:"toast-msg",innerHTML:i.value.message},null),c.value&&_()]),m.value&&(i.value.buttons?n.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:i.value.message},null),n.createVNode("div",{class:"after-toast-title text-right ml-auto"},[_()])]):n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:i.value.message},null))])])])}}),Tt=n.defineComponent({name:"Notify",props:nr,emits:["close","empty"],setup(e,t){const o=n.computed(()=>({"farris-notify":!0})),r={left:12,right:12,top:20,bottom:12},i=n.ref(),s=n.ref(e.options),a=n.ref(e.showCloseButton),d=n.computed(()=>e.position||"bottom-right"),u=n.computed(()=>e.timeout!=null?e.timeout:3e3),v=n.computed(()=>{const c=e.bottom?e.bottom:r.bottom,b=e.top?e.top:r.top,y={transition:"all 0.2s ease",left:d.value.indexOf("left")>-1?`${e.left?e.left:r.left}px`:"",right:d.value.indexOf("right")>-1?`${e.right?e.right:r.right}px`:"",top:d.value.indexOf("top")>-1?`${b}px`:"",bottom:d.value.indexOf("bottom")>-1?`${c}px`:""};return d.value.indexOf("center")>-1&&(y.left="50%",y.marginLeft="calc(-24rem / 2)",d.value==="center-center"&&(y.top="50%",y.transform="translate(-50%, -50%)")),y});function m(c){t.emit("close")}u.value&&setTimeout(()=>{m()},u.value),t.expose({closeToast:m,container:i,notifyPosition:d});function p(c,b){m()}return()=>n.createVNode("div",{class:o.value,style:v.value,ref:i},[n.createVNode(Et,{options:s.value,showCloseButton:a.value,animate:e.animate,onClose:c=>p(c,s.value)},null)])}});class vt{constructor(){re(this,"notifyRefs",[]);re(this,"globalConfig",n.reactive({}))}createNotifyInstance(t){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0},this.globalConfig,{...t}),s=document.createElement("div");s.style.display="contents";const a=n.createApp({setup(){const d=n.ref();function u(){d.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,d),a.unmount()},220)}if(i.position.indexOf("top")>-1){const v=o.getNotifyInstances(i.position),m=v[v.length-1];if(m){const p=m.value.container.getBoundingClientRect();i.top=p.bottom}}return n.onUnmounted(()=>{document.body.removeChild(s)}),n.onMounted(()=>{o.updateNotifyPositionForCreate(i,d)}),()=>n.createVNode(n.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[n.createVNode(Tt,n.mergeProps({ref:d},i,{onClose:u}),null)]})}});return a.provide("NotifyService",this),document.body.appendChild(s),a.mount(s),a}getNotifyInstances(t){return this.notifyRefs.filter(o=>o.value.notifyPosition===t)}updateNotifyPositionForCreate(t,o){if(this.notifyRefs&&this.notifyRefs.length){const r=window.innerHeight;t.position.indexOf("bottom")>-1&&this.getNotifyInstances(t.position).forEach(i=>{const s=i.value.container.getBoundingClientRect();i.value.container.style.bottom=s.height+r-s.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(t,o){const r=this.notifyRefs.indexOf(o);if(t.position.indexOf("top")>-1){const i=this.getNotifyInstances(t.position),s=i.indexOf(o);i.slice(s+1).forEach(a=>{a.value.container.style.top=a.value.container.offsetTop-a.value.container.offsetHeight+"px"})}r>-1&&this.notifyRefs.splice(r,1)}show(t){return this.createNotifyInstance(t)}buildNotifyProps(t,o){let r="",i="",s,a,d;typeof o=="string"?r=o:o&&(r=o.message||"",i=o.title||"",a=o.position||null,d=o.showCloseButton!=null?o.showCloseButton:null,s=o.timeout!=null?o.timeout:null);const v={options:{type:t,message:r,title:i}};return a!=null&&(v.position=a),d!=null&&(v.showCloseButton=d),s!=null&&(v.timeout=s),v}info(t){const o=this.buildNotifyProps("info",t);return this.show(o)}success(t){const o=this.buildNotifyProps("success",t);return this.show(o)}warning(t){const o=this.buildNotifyProps("warning",t);return this.show(o)}error(t){const o=this.buildNotifyProps("error",t);return this.show(o)}close(t){t&&t.unmount()}closeAll(){this.notifyRefs.forEach(t=>{t==null||t.value.closeToast()}),this.notifyRefs.length=0}}const rr=Symbol("NOTIFY_SERVICE_TOKEN");Tt.install=e=>{e.component(Tt.name,Tt),e.component(Et.name,Et);const t=new vt;e.provide(rr,t),e.provide("FNotifyService",t)};const ir={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]}},Kn={},Qn={};function Mt(e){const{properties:t,title:o,ignore:r}=e,i=r&&Array.isArray(r),s=Object.keys(t).reduce((a,d)=>((!i||!r.find(u=>u===d))&&(a[d]=t[d].type==="object"&&t[d].properties?Mt(t[d]):Ee.cloneDeep(t[d].default)),a),{});if(o&&(!i||!r.find(a=>a==="id"))){const a=o.toLowerCase().replace(/-/g,"_");s.id=`${a}_${Math.random().toString().slice(2,6)}`}return s}function ar(e){const{properties:t,title:o,required:r}=e;if(r&&Array.isArray(r)){const i=r.reduce((s,a)=>(s[a]=t[a].type==="object"&&t[a].properties?Mt(t[a]):Ee.cloneDeep(t[a].default),s),{});if(o&&r.find(s=>s==="id")){const s=o.toLowerCase().replace(/-/g,"_");i.id=`${s}_${Math.random().toString().slice(2,6)}`}return i}return{type:o}}function Jn(e,t={},o){const r=Kn[e];if(r){let i=ar(r);const s=Qn[e];return i=s?s({getSchemaByType:Jn},i,t,o):i,i}return null}function sr(e,t){const o=Mt(t);return Object.keys(o).reduce((r,i)=>(Object.prototype.hasOwnProperty.call(e,i)&&(r[i]&&Ee.isPlainObject(r[i])&&Ee.isPlainObject(e[i]||!e[i])?Object.assign(r[i],e[i]||{}):r[i]=e[i]),r),o),o}function Zn(e,t){return Object.keys(e).filter(r=>e[r]!=null).reduce((r,i)=>{if(t.has(i)){const s=t.get(i);if(typeof s=="string")r[s]=e[i];else{const a=s(i,e[i],e);Object.assign(r,a)}}else r[i]=e[i];return r},{})}function lr(e,t,o=new Map){const r=sr(e,t);return Zn(r,o)}function cr(e={}){function t(v,m,p,c){if(typeof p=="number")return c[v].length===p;if(typeof p=="object"){const b=Object.keys(p)[0],y=p[b];if(b==="not")return Number(c[v].length)!==Number(y);if(b==="moreThan")return Number(c[v].length)>=Number(y);if(b==="lessThan")return Number(c[v].length)<=Number(y)}return!1}function o(v,m,p,c){return c[v]&&c[v].propertyValue&&String(c[v].propertyValue.value)===String(p)}const r=new Map([["length",t],["getProperty",o]]);Object.keys(e).reduce((v,m)=>(v.set(m,e[m]),v),r);function i(v,m){const p=v;return typeof m=="number"?[{target:p,operator:"length",param:null,value:Number(m)}]:typeof m=="boolean"?[{target:p,operator:"getProperty",param:v,value:!!m}]:typeof m=="object"?Object.keys(m).map(c=>{if(c==="length")return{target:p,operator:"length",param:null,value:m[c]};const b=c,y=m[c];return{target:p,operator:"getProperty",param:b,value:y}}):[]}function s(v){return Object.keys(v).reduce((p,c)=>{const b=i(c,v[c]);return p.push(...b),p},[])}function a(v,m){if(r.has(v.operator)){const p=r.get(v.operator);return p&&p(v.target,v.param,v.value,m)||!1}return!1}function d(v,m){return s(v).reduce((b,y)=>b&&a(y,m),!0)}function u(v,m){const p=Object.keys(v),c=p.includes("allOf"),b=p.includes("anyOf"),y=c||b,f=(y?v[y?c?"allOf":"anyOf":"allOf"]:[v]).map(C=>d(C,m));return c?!f.includes(!1):f.includes(!0)}return{parseValueSchema:u}}const ae={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"}},ur={},dr={};cr();function ft(e,t,o=new Map,r=(a,d,u,v)=>d,i={},s=a=>a){return Kn[t.title]=t,Qn[t.title]=r,ur[t.title]=i,dr[t.title]=s,(a={},d=!0)=>{if(!d)return Zn(a,o);const u=lr(a,t,o),v=Object.keys(e).reduce((m,p)=>(m[p]=e[p].default,m),{});return Object.assign(v,u)}}function Nt(e,t){return{customClass:t.class,customStyle:t.style}}function fr(){function e(t,o){const{dataSource:r}=t||{};return r===void 0?{}:{}}return{resolve:e}}function pr(){function e(t,o){return t.selectItemById(o)}return{selectItemById:e}}function mr(){function e(t,o){const{columns:r}=o;return t.updateColumns(r)}return{updateColumns:e}}const eo=new Map([["appearance",Nt],["column","columnOption"]]);function hr(e,t,o){var p;const r=o.parentComponentInstance,i=r.schema.type,s=String(((p=r.schema.appearance)==null?void 0:p.class)||"").split(" "),a=i==="section"||i==="tab-page",d=s.includes("f-page-content-nav"),u=s.includes("f-page-main"),v=e.getSchemaByType("component");v.id=`${t.id}-component`,v.componentType="data-grid";let m="";return m+=a?"f-struct-data-grid-in-card f-struct-is-subgrid":"",m+=d?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",m+=u?"f-struct-data-grid f-struct-wrapper":"",v.appearance={class:m},v.contents=[t],v}function gr(e,t,o){const r=o.parentComponentInstance,i=String(r.schema.appearance.class||"").split(" "),s=i.includes("f-page-content-nav"),a=i.includes("f-page-main"),d=e.getSchemaByType("section");d.id=`${t.id}-section`;let u="";return u+=s?"f-section-in-nav ":"",u+=a?"f-section-in-managelist ":"",u+="f-section-grid",d.appearance={class:u},d.contents=[t],d}function vr(e,t,o){const r=e.getSchemaByType("content-container");return r.id=`${t.id}-layout`,r.appearance=