flame-plus 1.5.17 → 1.5.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3926,7 +3926,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3926
3926
 
3927
3927
  `,N+="."+T+" { "+c(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+A,"animation-name: "+A])+` }
3928
3928
  `,N+="@-webkit-keyframes "+A+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
3929
- `,N+="@keyframes "+A+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",O(N)}}function p(C){C.className+=" "+a+"_animation_active"}function m(C,x,k){if(C.addEventListener)C.addEventListener(x,k);else if(C.attachEvent)C.attachEvent("on"+x,k);else return e.error("[scroll] Don't know how to add event listeners.")}function g(C,x,k){if(C.removeEventListener)C.removeEventListener(x,k);else if(C.detachEvent)C.detachEvent("on"+x,k);else return e.error("[scroll] Don't know how to remove event listeners.")}function v(C){return o(C).container.childNodes[0].childNodes[0].childNodes[0]}function b(C){return o(C).container.childNodes[0].childNodes[0].childNodes[1]}function y(C,x){var k=o(C).listeners;if(!k.push)throw new Error("Cannot add listener to an element that is not detectable.");o(C).listeners.push(x)}function w(C,x,k){k||(k=x,x=C,C=null),C=C||{};function O(){if(C.debug){var Z=Array.prototype.slice.call(arguments);if(Z.unshift(r.get(x),"Scroll: "),e.log.apply)e.log.apply(null,Z);else for(var M=0;M<Z.length;M++)e.log(Z[M])}}function A(Z){function M(ne){var Se=ne.getRootNode&&ne.getRootNode().contains(ne);return ne===ne.ownerDocument.body||ne.ownerDocument.body.contains(ne)||Se}return!M(Z)||window.getComputedStyle(Z)===null}function T(Z){var M=o(Z).container.childNodes[0],ne=window.getComputedStyle(M);return!ne.width||ne.width.indexOf("px")===-1}function N(){var Z=window.getComputedStyle(x),M={};return M.position=Z.position,M.width=x.offsetWidth,M.height=x.offsetHeight,M.top=Z.top,M.right=Z.right,M.bottom=Z.bottom,M.left=Z.left,M.widthCSS=Z.width,M.heightCSS=Z.height,M}function j(){var Z=N();o(x).startSize={width:Z.width,height:Z.height},O("Element start size",o(x).startSize)}function I(){o(x).listeners=[]}function E(){if(O("storeStyle invoked."),!o(x)){O("Aborting because element has been uninstalled");return}var Z=N();o(x).style=Z}function P(Z,M,ne){o(Z).lastWidth=M,o(Z).lastHeight=ne}function D(Z){return v(Z).childNodes[0]}function R(){return 2*i.width+1}function z(){return 2*i.height+1}function U(Z){return Z+10+R()}function _(Z){return Z+10+z()}function G(Z){return Z*2+R()}function te(Z){return Z*2+z()}function K(Z,M,ne){var Se=v(Z),de=b(Z),De=U(M),xe=_(ne),le=G(M),He=te(ne);Se.scrollLeft=De,Se.scrollTop=xe,de.scrollLeft=le,de.scrollTop=He}function q(){var Z=o(x).container;if(!Z){Z=document.createElement("div"),Z.className=a,Z.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(x).container=Z,p(Z),x.appendChild(Z);var M=function(){o(x).onRendered&&o(x).onRendered()};m(Z,"animationstart",M),o(x).onAnimationStart=M}return Z}function F(){function Z(){var Q=o(x).style;if(Q.position==="static"){x.style.setProperty("position","relative",C.important?"important":"");var W=function(J,re,me,ie){function he(Ue){return Ue.replace(/[^-\d\.]/g,"")}var Fe=me[ie];Fe!=="auto"&&he(Fe)!=="0"&&(J.warn("An element that is positioned static has style."+ie+"="+Fe+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+ie+" will be set to 0. Element: ",re),re.style[ie]=0)};W(e,x,Q,"top"),W(e,x,Q,"right"),W(e,x,Q,"bottom"),W(e,x,Q,"left")}}function M(Q,W,J,re){return Q=Q?Q+"px":"0",W=W?W+"px":"0",J=J?J+"px":"0",re=re?re+"px":"0",["left: "+Q,"top: "+W,"right: "+re,"bottom: "+J]}if(O("Injecting elements"),!o(x)){O("Aborting because element has been uninstalled");return}Z();var ne=o(x).container;ne||(ne=q());var Se=i.width,de=i.height,De=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),xe=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(M(-(1+Se),-(1+de),-de,-Se))),le=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),He=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),pt=c(["position: absolute","left: 0","top: 0"]),Re=c(["position: absolute","width: 200%","height: 200%"]),gt=document.createElement("div"),Ge=document.createElement("div"),tt=document.createElement("div"),Dt=document.createElement("div"),Ze=document.createElement("div"),Ft=document.createElement("div");gt.dir="ltr",gt.style.cssText=De,gt.className=a,Ge.className=a,Ge.style.cssText=xe,tt.style.cssText=le,Dt.style.cssText=pt,Ze.style.cssText=He,Ft.style.cssText=Re,tt.appendChild(Dt),Ze.appendChild(Ft),Ge.appendChild(tt),Ge.appendChild(Ze),gt.appendChild(Ge),ne.appendChild(gt);function H(){var Q=o(x);Q&&Q.onExpand?Q.onExpand():O("Aborting expand scroll handler: element has been uninstalled")}function X(){var Q=o(x);Q&&Q.onShrink?Q.onShrink():O("Aborting shrink scroll handler: element has been uninstalled")}m(tt,"scroll",H),m(Ze,"scroll",X),o(x).onExpandScroll=H,o(x).onShrinkScroll=X}function oe(){function Z(le,He,pt){var Re=D(le),gt=U(He),Ge=_(pt);Re.style.setProperty("width",gt+"px",C.important?"important":""),Re.style.setProperty("height",Ge+"px",C.important?"important":"")}function M(le){var He=x.offsetWidth,pt=x.offsetHeight,Re=He!==o(x).lastWidth||pt!==o(x).lastHeight;O("Storing current size",He,pt),P(x,He,pt),n.add(0,function(){if(Re){if(!o(x)){O("Aborting because element has been uninstalled");return}if(!ne()){O("Aborting because element container has not been initialized");return}if(C.debug){var gt=x.offsetWidth,Ge=x.offsetHeight;(gt!==He||Ge!==pt)&&e.warn(r.get(x),"Scroll: Size changed before updating detector elements.")}Z(x,He,pt)}}),n.add(1,function(){if(!o(x)){O("Aborting because element has been uninstalled");return}if(!ne()){O("Aborting because element container has not been initialized");return}K(x,He,pt)}),Re&&le&&n.add(2,function(){if(!o(x)){O("Aborting because element has been uninstalled");return}if(!ne()){O("Aborting because element container has not been initialized");return}le()})}function ne(){return!!o(x).container}function Se(){function le(){return o(x).lastNotifiedWidth===void 0}O("notifyListenersIfNeeded invoked");var He=o(x);if(le()&&He.lastWidth===He.startSize.width&&He.lastHeight===He.startSize.height)return O("Not notifying: Size is the same as the start size, and there has been no notification yet.");if(He.lastWidth===He.lastNotifiedWidth&&He.lastHeight===He.lastNotifiedHeight)return O("Not notifying: Size already notified");O("Current size not notified, notifying..."),He.lastNotifiedWidth=He.lastWidth,He.lastNotifiedHeight=He.lastHeight,hpe(o(x).listeners,function(pt){pt(x)})}function de(){if(O("startanimation triggered."),T(x)){O("Ignoring since element is still unrendered...");return}O("Element rendered.");var le=v(x),He=b(x);(le.scrollLeft===0||le.scrollTop===0||He.scrollLeft===0||He.scrollTop===0)&&(O("Scrollbars out of sync. Updating detector elements..."),M(Se))}function De(){if(O("Scroll detected."),T(x)){O("Scroll event fired while unrendered. Ignoring...");return}M(Se)}if(O("registerListenersAndPositionElements invoked."),!o(x)){O("Aborting because element has been uninstalled");return}o(x).onRendered=de,o(x).onExpand=De,o(x).onShrink=De;var xe=o(x).style;Z(x,xe.width,xe.height)}function ve(){if(O("finalizeDomMutation invoked."),!o(x)){O("Aborting because element has been uninstalled");return}var Z=o(x).style;P(x,Z.width,Z.height),K(x,Z.width,Z.height)}function Ee(){k(x)}function ye(){O("Installing..."),I(),j(),n.add(0,E),n.add(1,F),n.add(2,oe),n.add(3,ve),n.add(4,Ee)}O("Making detectable..."),A(x)?(O("Element is detached"),q(),O("Waiting until element is attached..."),o(x).onRendered=function(){O("Element is now attached"),ye()}):ye()}function S(C){var x=o(C);x&&(x.onExpandScroll&&g(v(C),"scroll",x.onExpandScroll),x.onShrinkScroll&&g(b(C),"scroll",x.onShrinkScroll),x.onAnimationStart&&g(x.container,"animationstart",x.onAnimationStart),x.container&&C.removeChild(x.container))}return{makeDetectable:w,addListener:y,uninstall:S,initDocument:l}},Lg=HR.forEach,mpe=epe,gpe=tpe,vpe=npe,bpe=ope,ype=rpe,qR=YR,xpe=lpe,Mu=fpe,wpe=dpe,Cpe=ppe;function $R(t){return Array.isArray(t)||t.length!==void 0}function e5(t){if(Array.isArray(t))return t;var e=[];return Lg(t,function(n){e.push(n)}),e}function t5(t){return t&&t.nodeType===1}var kpe=function(t){t=t||{};var e;if(t.idHandler)e={get:function(w){return t.idHandler.get(w,!0)},set:t.idHandler.set};else{var n=vpe(),o=bpe({idGenerator:n,stateHandler:Mu});e=o}var r=t.reporter;if(!r){var i=r===!1;r=ype(i)}var s=Nu(t,"batchProcessor",xpe({reporter:r})),a={};a.callOnAdd=!!Nu(t,"callOnAdd",!0),a.debug=!!Nu(t,"debug",!1);var l=gpe(e),c=mpe({stateHandler:Mu}),u,h=Nu(t,"strategy","object"),p=Nu(t,"important",!1),m={reporter:r,batchProcessor:s,stateHandler:Mu,idHandler:e,important:p};if(h==="scroll"&&(qR.isLegacyOpera()?(r.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),h="object"):qR.isIE(9)&&(r.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),h="object")),h==="scroll")u=Cpe(m);else if(h==="object")u=wpe(m);else throw new Error("Invalid strategy name: "+h);var g={};function v(w,S,C){function x(j){var I=l.get(j);Lg(I,function(E){E(j)})}function k(j,I,E){l.add(I,E),j&&E(I)}if(C||(C=S,S=w,w={}),!S)throw new Error("At least one element required.");if(!C)throw new Error("Listener required.");if(t5(S))S=[S];else if($R(S))S=e5(S);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var O=0,A=Nu(w,"callOnAdd",a.callOnAdd),T=Nu(w,"onReady",function(){}),N=Nu(w,"debug",a.debug);Lg(S,function(j){Mu.getState(j)||(Mu.initState(j),e.set(j));var I=e.get(j);if(N&&r.log("Attaching listener to element",I,j),!c.isDetectable(j)){if(N&&r.log(I,"Not detectable."),c.isBusy(j)){N&&r.log(I,"System busy making it detectable"),k(A,j,C),g[I]=g[I]||[],g[I].push(function(){O++,O===S.length&&T()});return}return N&&r.log(I,"Making detectable..."),c.markBusy(j,!0),u.makeDetectable({debug:N,important:p},j,function(E){if(N&&r.log(I,"onElementDetectable"),Mu.getState(E)){c.markAsDetectable(E),c.markBusy(E,!1),u.addListener(E,x),k(A,E,C);var P=Mu.getState(E);if(P&&P.startSize){var D=E.offsetWidth,R=E.offsetHeight;(P.startSize.width!==D||P.startSize.height!==R)&&x(E)}g[I]&&Lg(g[I],function(z){z()})}else N&&r.log(I,"Element uninstalled before being detectable.");delete g[I],O++,O===S.length&&T()})}N&&r.log(I,"Already detecable, adding listener."),k(A,j,C),O++}),O===S.length&&T()}function b(w){if(!w)return r.error("At least one element is required.");if(t5(w))w=[w];else if($R(w))w=e5(w);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");Lg(w,function(S){l.removeAllListeners(S),u.uninstall(S),Mu.cleanState(S)})}function y(w){u.initDocument&&u.initDocument(w)}return{listenTo:v,removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:b,initDocument:y}};function Nu(t,e,n){var o=t[e];return o==null&&n!==void 0?n:o}const Spe=qhe(kpe);function jpe(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o?o.push(n):t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var o=t.get(e);o&&o.slice().map(function(r){r(n)}),(o=t.get("*"))&&o.slice().map(function(r){r(e,n)})}}}function n5(){return typeof window<"u"}const o5=()=>{};function Epe(t,e=o5){if(!n5){e();return}window.addEventListener(t,e)}function Ope(t,e=o5){n5&&window.removeEventListener(t,e)}const Tpe={__name:"grid-layout",props:{layout:{type:Array,required:!0},responsiveLayouts:{type:Object,default(){return{}}},colNum:{type:Number,default:12},rowHeight:{type:Number,default:150},maxRows:{type:Number,default:1/0},margin:{type:Array,default(){return[10,10]}},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},preventCollision:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},responsive:{type:Boolean,default:!1},breakpoints:{type:Object,default(){return{lg:1200,md:996,sm:768,xs:480,xxs:0}}},cols:{type:Object,default(){return{lg:12,md:10,sm:6,xs:4,xxs:2}}},useStyleCursor:{type:Boolean,default:!0},transformScale:{type:Number,default:1}},emits:["update:layout","layout-ready","layout-created","layout-before-mount","layout-mounted","layout-updated","breakpoint-changed"],setup(t,{expose:e,emit:n}){const o=t,r=n,i=jpe(),s={el:void 0,placeholderEl:void 0,placeholder:{},emitter:i};e(s);const a=Spe({strategy:"scroll",callOnAdd:!1}),l=f.reactive({width:null,mergedStyle:{},isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:-1},layout:[],layouts:{},lastBreakpoint:null,originalLayout:null});f.provide("emitter",i),f.provide("gridLayout",{props:o,state:l});function c(){i.on("resizeEvent",b),i.on("dragEvent",v),r("layout-created",o.layout),Epe("resize",m)}c(),f.onBeforeMount(()=>{r("layout-before-mount",l.layout)}),f.onMounted(()=>{r("layout-mounted",l.layout)}),f.onBeforeUnmount(()=>{i.off("resizeEvent",b),i.off("dragEvent",v),Ope("resize",m),a&&s.el&&a.uninstall(s.el)}),f.watch(()=>l.width,async(x,k)=>{i.emit("updateWidth",l.width),p(),k===null&&(await f.nextTick(),r("layout-ready",l.layout))}),f.watch(()=>o.layout,()=>{Ghe(o.layout),l.originalLayout=o.layout,h()},{deep:!0,immediate:!0}),f.watch(()=>o.colNum,()=>{l.colNum=o.colNum,i.emit("setColNum",o.colNum)},{immediate:!0}),f.watch(()=>o.rowHeight,()=>{i.emit("setRowHeight",o.rowHeight)}),f.watch(()=>o.isDraggable,()=>{i.emit("setDraggable",o.isDraggable)}),f.watch(()=>o.isResizable,()=>{i.emit("setResizable",o.isResizable)}),f.watch(()=>o.isBounded,()=>{i.emit("setBounded",o.isBounded)}),f.watch(()=>o.transformScale,()=>{i.emit("setTransformScale",o.transformScale)}),f.watch(()=>o.responsive,()=>{o.responsive||(l.layout=sd(l.originalLayout),i.emit("setColNum",o.colNum)),m()}),f.watch(()=>o.maxRows,()=>{i.emit("setMaxRows",o.maxRows)}),f.watch(()=>o.margin,()=>{p()},{deep:!0});function u(x,k){if((x==null?void 0:x.length)!==(k==null?void 0:k.length))return!0;let O=!1,A=0;for(;A<x.length;){const T=x[A],N=Object.keys(T),j=k[A],I=Object.keys(j),E=[...new Set([...N,...I])];let P=0;for(;P<E.length;){const D=E[P];if(T[D]!==j[D]){O=!0;break}P+=1}if(O)break;A+=1}return O}function h(){if(u(o.layout,l.layout)&&(w(),l.layout=sd(o.layout),Dg(l.layout,o.verticalCompact),i.emit("updateWidth",l.width),p(),u(o.layout,l.layout))){const x=sd(l.layout);r("layout-updated",x),r("update:layout",x)}}function p(){l.mergedStyle={height:g()}}function m(){s.el&&(l.width=s.el.offsetWidth),i.emit("resizeEvent")}function g(){var x;if(!o.autoSize)return;const k=((x=o.margin)==null?void 0:x[1])||0;return`${Vhe(l.layout)*(o.rowHeight+k)+k}px`}function v([x,k,O,A,T,N]=[]){let j=DR(l.layout,k);if(j==null&&(j={x:0,y:0}),x==="dragstart"&&!o.verticalCompact&&(l.positionsBeforeDrag=l.layout.reduce((I,{i:E,x:P,y:D})=>({...I,[E]:{x:P,y:D}}),{})),x==="dragmove"||x==="dragstart"?(l.placeholder.x=j.x,l.placeholder.y=j.y,l.placeholder.w=N,l.placeholder.h=T,l.isDragging=!0):l.isDragging=!1,l.layout=z2(l.layout,j,O,A,!0,o.preventCollision),o.restoreOnDrag?(j.static=!0,Dg(l.layout,o.verticalCompact,l.positionsBeforeDrag),j.static=!1):Dg(l.layout,o.verticalCompact),p(),x==="dragend"&&delete l.positionsBeforeDrag,u(o.layout,l.layout)){const I=sd(l.layout);r("layout-updated",I),r("update:layout",I)}}function b([x,k,O,A,T,N]=[]){let j=DR(l.layout,k);j==null&&(j={h:0,w:0});let I;if(o.preventCollision){const E=IR(l.layout,{...j,w:N,h:T}).filter(P=>P.i!==j.i);if(I=E.length>0,I){let P=1/0,D=1/0;E.forEach(R=>{R.x>j.x&&(P=Math.min(P,R.x)),R.y>j.y&&(D=Math.min(D,R.y))}),Number.isFinite(P)&&(j.w=P-j.x),Number.isFinite(D)&&(j.h=D-j.y)}}if(I||(j.w=N,j.h=T),x==="resizestart"||x==="resizemove"?(l.placeholder.x=O,l.placeholder.y=A,l.placeholder.w=j.w,l.placeholder.h=j.h,l.isDragging=!0):l.isDragging=!1,o.responsive&&y(),Dg(l.layout,o.verticalCompact),p(),u(o.layout,l.layout)){const E=sd(l.layout);r("layout-updated",E),r("update:layout",E)}}function y(){const x=Xhe(o.breakpoints,l.width),k=zR(x,o.cols);k!==l.colNum&&(l.colNum=k,l.layout=Jhe(l.layout,l.layouts,o.breakpoints,x,k,o.verticalCompact),l.layouts[x]=l.layout,i.emit("setColNum",k)),l.lastBreakpoint!==x&&(l.lastBreakpoint=x,r("breakpoint-changed",x,l.layout))}function w(){l.layouts={...o.responsiveLayouts}}function S(x){!x||x===s.el||(s.el=x,a&&a.listenTo(s.el,()=>{m()}),l.width=s.el.offsetWidth)}function C(x){x&&(s.placeholder=x,s.placeholderEl=x.el)}return(x,k)=>(f.openBlock(),f.createElementBlock("div",{ref:S,class:"vue-grid-layout",style:f.normalizeStyle(l.mergedStyle)},[f.renderSlot(x.$slots,"default",{},void 0,!0),f.withDirectives(f.createVNode(_2,{ref:C,class:"vue-grid-placeholder",x:l.placeholder.x,y:l.placeholder.y,w:l.placeholder.w,h:l.placeholder.h,i:"placeholder"},null,8,["x","y","w","h"]),[[f.vShow,l.isDragging]])],4))}},r5=UR(Tpe,[["__scopeId","data-v-a10aee95"]]),es=24,W2=[4,4];function sp(t,e){return t.x<e.x+e.w&&t.x+t.w>e.x&&t.y<e.y+e.h&&t.y+t.h>e.y}function i5(t){if(!t||t.nodeKind!=="form"&&t.nodeKind!=="subForm")return 1;const e=t.children;if(!e||!e.length)return 1;let n=1;return e.forEach(o=>{const r=o.x??0,i=o.w??1,s=r+i;s>n&&(n=s)}),n}function s5(t){if(!t||t.nodeKind!=="form"&&t.nodeKind!=="subForm")return 1;const e=t.children;if(!e||!e.length)return 1;let n=1;return e.forEach(o=>{const r=o.y??0,i=o.h??1,s=r+i;s>n&&(n=s)}),n}function s0(t){if(!t.length)return{x:0,y:0,w:6,h:1};let e=0;return t.forEach(n=>{const o=n.y+n.h;o>e&&(e=o)}),{x:0,y:e,w:6,h:1}}function Bg(t,e,n){const o=Math.min(Math.max(1,e),es),r=Math.max(1,n),i=t.children||[];if(!i.length)return{x:0,y:0,w:o,h:r};const s=Ov(i.map(u=>u.y))??0,a=i.filter(u=>u.y===s),l=a.length?Ov(a.map(u=>u.x+u.w))??0:0;return l+o<=es?{x:l,y:s,w:o,h:r}:{x:0,y:Ov(i.map(u=>u.y+u.h))??0,w:o,h:r}}function a0(t){const e=t.children;if(!(e!=null&&e.length))return;const n=[...e].sort((s,a)=>s.y!==a.y?s.y-a.y:s.x-a.x);let o=0,r=0,i=0;for(const s of n){let a=Math.max(1,Math.min(s.w,es));const l=Math.max(1,s.h);a>es&&(a=es),o>0&&o+a>es&&(r+=i,o=0,i=0),s.x=o,s.y=r,o+=a,i=Math.max(i,l)}}function a5(t){if(!(t!=null&&t.length))return!1;let e=0;for(const n of t){const o=Math.max(1,n.w),r=Math.max(1,n.h);if(n.x<0||n.x+o>es)return!0;e=Math.max(e,n.y+r)}for(let n=0;n<e;n++){const o=t.filter(s=>s.y<=n&&n<s.y+Math.max(1,s.h));if(!o.length)continue;const r=o.map(s=>({x1:s.x,x2:s.x+Math.max(1,s.w)})).sort((s,a)=>s.x1-a.x1);let i=0;for(const s of r){if(s.x1<i)return!0;i=Math.max(i,s.x2)}if(i>es)return!0}return!1}function Ape(t){if(!t)return{clientX:void 0,clientY:void 0};const e=t;if(typeof e.clientX=="number"&&typeof e.clientY=="number"){const i=e.clientX,s=e.clientY;if(Number.isFinite(i)&&Number.isFinite(s))return{clientX:i,clientY:s}}const n=e.changedTouches,o=e.touches,r=(n==null?void 0:n[0])??(o==null?void 0:o[0]);return r&&typeof r.clientX=="number"&&typeof r.clientY=="number"?{clientX:r.clientX,clientY:r.clientY}:{clientX:void 0,clientY:void 0}}function l5(t){var s,a,l,c,u;if(!t)return{gridEl:null,clientX:void 0,clientY:void 0};const e=t.to;let n=typeof t.clientX=="number"&&Number.isFinite(t.clientX)?t.clientX:void 0,o=typeof t.clientY=="number"&&Number.isFinite(t.clientY)?t.clientY:void 0;if(n==null||o==null){const h=Ape(t.originalEvent);n==null&&typeof h.clientX=="number"&&Number.isFinite(h.clientX)&&(n=h.clientX),o==null&&typeof h.clientY=="number"&&Number.isFinite(h.clientY)&&(o=h.clientY)}let r=((s=e==null?void 0:e.querySelector)==null?void 0:s.call(e,".vue-grid-layout"))??null;const i=h=>{var m;if(!h||!(h instanceof HTMLElement))return null;const p=(m=h.closest)==null?void 0:m.call(h,".vue-grid-layout");return p instanceof HTMLElement&&(!e||e.contains(p))?p:null};if(!r&&((a=t.originalEvent)!=null&&a.target)){const h=(c=(l=t.originalEvent.target).closest)==null?void 0:c.call(l,".form-inner-drag-zone");h instanceof HTMLElement&&(r=h.querySelector(".vue-grid-layout")),r||(r=i(t.originalEvent.target))}if(!r&&typeof document<"u"&&n!=null&&o!=null&&Number.isFinite(n)&&Number.isFinite(o)){const h=document.elementsFromPoint(n,o);for(const p of h){if(!(p instanceof Element))continue;const m=(u=p.closest)==null?void 0:u.call(p,".vue-grid-layout");if(m instanceof HTMLElement&&(!e||e.contains(m))){r=m;break}}}return{gridEl:r,clientX:n,clientY:o}}function Mpe(t,e,n,o=80){const{w:r,h:i}=e,s=(c,u)=>t.some(h=>sp({x:c,y:u,w:r,h:i},{x:h.x??0,y:h.y??0,w:Math.max(1,h.w??1),h:Math.max(1,h.h??1)})),a=t.reduce((c,u)=>Math.max(c,(u.y??0)+Math.max(1,u.h??1)),0),l=Math.min(Math.max(a+i+12,e.y+20),e.y+o);for(let c=e.y;c<=l;c++){const u=[];if(c===e.y){for(let h=e.x;h>=0;h--)u.push(h);for(let h=e.x+1;h<=n-r;h++)u.push(h)}else for(let h=0;h<=n-r;h++)u.push(h);for(const h of u)if(!(h<0||h+r>n)&&!s(h,c))return{x:h,y:c,w:r,h:i}}return null}function c5(t,e,n,o,r,i,s,a,l,c="drop"){const u=Math.min(Math.max(1,a),r),h=Math.max(1,l),m=(()=>{if(!e||n==null||o==null||!Number.isFinite(n)||!Number.isFinite(o))return null;const g=e.getBoundingClientRect(),v=g.width>0?g.width:e.offsetWidth||0,[b,y]=s,w=(v-b*(r+1))/r;if(!Number.isFinite(w)||w<=0)return null;const S=n-g.left,C=o-g.top;let x=Math.round((S-b)/(w+b)),k=Math.round((C-y)/(i+y));return x=Math.max(0,Math.min(x,r-u)),k=Math.max(0,k),{x,y:k,w:u,h}})();if(m){if(c==="preview")return m;const g=t.children||[];if(!g.some(y=>sp(m,{x:y.x??0,y:y.y??0,w:Math.max(1,y.w??1),h:Math.max(1,y.h??1)})))return m;const b=Mpe(g,m,r);if(b)return b}return Bg(t,u,h)}function Npe(t,e,n=es,o=400){const r=t.children;if(!(r!=null&&r.length))return;const i=l=>({x:l.x??0,y:l.y??0,w:Math.min(Math.max(1,l.w??1),n),h:Math.max(1,l.h??1)}),s=(l,c)=>{const u=i(l),h=i(c);if(h.y>u.y)return!0;if(h.y<u.y)return!1;if(h.x>u.x)return!0;if(h.x<u.x)return!1;const p=r.indexOf(l);return r.indexOf(c)>p};for(let l=0;l<o;l++){let c=!1;for(const u of r){const h=i(u);if(!sp(e,h))continue;const p=e.y<h.y+h.h&&e.y+e.h>h.y,m=e.x+e.w;if(p&&m+h.w<=n)(u.x??0)!==m&&(u.x=m,c=!0);else{const g=e.y+e.h;if((u.y??0)!==g&&(u.y=g,c=!0),(u.x??0)+h.w>n){const v=Math.max(0,n-h.w);(u.x??0)!==v&&(u.x=v,c=!0)}}}for(let u=0;u<r.length;u++)for(let h=u+1;h<r.length;h++){const p=r[u],m=r[h],g=i(p),v=i(m);if(!sp(g,v))continue;const b=s(p,m)?m:p,y=b===m?p:m,w=i(b),S=i(y),C=S.y<w.y+w.h&&S.y+S.h>w.y,x=S.x+S.w;if(C&&x+w.w<=n)(b.x??0)!==x&&(b.x=x,c=!0);else{const k=S.y+S.h;if((b.y??0)!==k&&(b.y=k,c=!0),(b.x??0)+w.w>n){const O=Math.max(0,n-w.w);(b.x??0)!==O&&(b.x=O,c=!0)}}}if(!c)break}for(const l of r){let c=0;for(;c++<120&&sp(e,i(l));)l.y=(l.y??0)+1}let a=!1;for(let l=0;l<r.length;l++){for(let c=l+1;c<r.length;c++)if(sp(i(r[l]),i(r[c]))){a=!0;break}if(a)break}a&&a0(t)}function Ppe(t,e,n,o,r,i,s,a){const[l,c]=a,h=((t.offsetWidth||t.getBoundingClientRect().width)-l*(i+1))/i;if(!Number.isFinite(h)||h<=0)return null;const p=Math.round(h*e+(e+1)*l),m=Math.round(s*n+(n+1)*c),g=o===1/0?o:Math.round(h*o+Math.max(0,o-1)*l),v=r===1/0?r:Math.round(s*r+Math.max(0,r-1)*c);return!Number.isFinite(g)||!Number.isFinite(v)?null:{left:p,top:m,width:g,height:v}}const u5=48,f5={flmInput:"输入框",flmSelect:"选择器",flmInputNumber:"数字输入框",flmDatePicker:"日期选择器",flmTimePicker:"时间选择器",flmTimeSelect:"时间选择",flmUpload:"上传",flmCascader:"级联选择器",flmCheckbox:"多选框",flmColorPicker:"取色器",flmRadio:"单选框",flmRate:"评分",flmRead:"查看",flmTime:"当前时间",flmSlider:"滑块",flmSwitch:"开关",flmTransfer:"穿梭框",flmButton:"按钮",flmDialog:"弹窗",flmDrawer:"抽屉",flmPagination:"分页器",flmCustom:"业务组件"},Dpe=new Set(Object.keys(f5).filter(t=>t!=="flmCustom")),Ipe=["flmInput","flmSelect","flmInputNumber","flmDatePicker","flmTimePicker","flmTimeSelect","flmCascader"],Rpe=["flmInput","flmDatePicker","flmTimePicker","flmTimeSelect","flmCascader"],Lpe=[{key:"container-form",type:"form",label:"表单",icon:"📋"},{key:"container-subForm",type:"subForm",label:"子表单",icon:"📊"},{key:"container-slot",type:"groupSlot",label:"插槽",icon:"🧷"}],Bpe=[{key:"formSlot",type:"formSlot",label:"表单插槽",icon:"🧷"},{key:"flmInput",type:"flmInput",label:"输入框",icon:"📝"},{key:"flmSelect",type:"flmSelect",label:"选择器",icon:"📋"},{key:"flmInputNumber",type:"flmInputNumber",label:"数字输入框",icon:"🔢"},{key:"flmDatePicker",type:"flmDatePicker",label:"日期选择器",icon:"📅"},{key:"flmTimePicker",type:"flmTimePicker",label:"时间选择器",icon:"⏰"},{key:"flmTimeSelect",type:"flmTimeSelect",label:"时间选择",icon:"⏱"},{key:"flmUpload",type:"flmUpload",label:"上传",icon:"📤"},{key:"flmCascader",type:"flmCascader",label:"级联选择器",icon:"📂"},{key:"flmCheckbox",type:"flmCheckbox",label:"多选框",icon:"☑️"},{key:"flmColorPicker",type:"flmColorPicker",label:"取色器",icon:"🎨"},{key:"flmRadio",type:"flmRadio",label:"单选框",icon:"⭕"},{key:"flmRate",type:"flmRate",label:"评分",icon:"⭐"},{key:"flmRead",type:"flmRead",label:"查看",icon:"👁"},{key:"flmTime",type:"flmTime",label:"当前时间",icon:"🕐"},{key:"flmSlider",type:"flmSlider",label:"滑块",icon:"🎚"},{key:"flmSwitch",type:"flmSwitch",label:"开关",icon:"🔘"},{key:"flmTransfer",type:"flmTransfer",label:"穿梭框",icon:"↔️"}];function Vg(t){return t==="flmTransfer"?{w:24,h:7}:t==="flmCustom"?{w:8,h:1}:{w:8,h:1}}function l0(t){return f5[t]??t}function H2(t){return{label:l0(t),required:!1,showMessage:!0,inlineMessage:!1}}function c0(t){return t==="flmSelect"?{placeholder:"请选择",options:[{label:"选项1",value:"1"},{label:"选项2",value:"2"}]}:t==="flmForm"?{items:[],buttons:[{event:"submit",buttonText:"提交",type:"primary"},{event:"cancel",buttonText:"取消"},{event:"reset",buttonText:"重置"}]}:t==="flmInput"?{placeholder:"请输入",clearable:!0}:t==="flmInputNumber"?{placeholder:"请输入",min:0,max:100,step:1}:t==="flmDatePicker"?{placeholder:"选择日期",clearable:!0}:t==="flmTimePicker"?{placeholder:"选择时间",clearable:!0}:t==="flmTimeSelect"?{placeholder:"选择时间",start:"08:00",end:"18:00",step:"00:30"}:t==="flmCascader"?{placeholder:"请选择",options:[]}:t==="flmUpload"?{action:"#","show-file-list":!0,"auto-upload":!0}:t==="flmCheckbox"?{label:"选项"}:t==="flmColorPicker"?{showAlpha:!0}:t==="flmRadio"?{radios:[{label:"选项1"},{label:"选项2"}]}:t==="flmRate"?{max:5,"allow-half":!0}:t==="flmRead"?{"model-value":"示例文本"}:t==="flmTime"?{formatPreset:"date",format:"YYYY-MM-DD"}:t==="flmSlider"?{min:0,max:100,step:1}:t==="flmSwitch"?{"active-text":"开","inactive-text":"关"}:t==="flmTransfer"?{titles:["列表1","列表2"],data:[]}:t==="flmCustom"?{}:t==="flmButton"?{buttonText:"按钮"}:t==="flmDialog"?{title:"弹窗",width:"50%"}:t==="flmDrawer"?{title:"抽屉",direction:"rtl",size:"30%"}:t==="flmPagination"?{total:0,"page-size":10,layout:"total, prev, pager, next"}:{}}function G2(t){return c0(t)}function Vpe(){return[]}const Fpe={class:"form-canvas-area"},zpe={class:"canvas-toolbar"},_pe={class:"canvas-toolbar-actions"},Upe={class:"form-widget-container"},Wpe=["onClick"],Hpe={class:"module-title-wrap"},Gpe={class:"module-title"},Kpe={class:"module-header-actions"},Ype={class:"module-body"},Xpe=["data-palette-drop-group"],Jpe={key:0,class:"slot-placeholder"},Qpe=["data-palette-drop-form"],Zpe=["onClick"],qpe={class:"widget-actions"},$pe={key:0,class:"slot-placeholder slot-placeholder--inner"},eme={key:1,class:"custom-widget-placeholder"},tme={class:"custom-widget-name"},nme={key:2,class:"form-inner"},ome=["data-palette-drop-form"],rme=["onClick"],ime={class:"widget-actions"},sme={key:0,class:"slot-placeholder slot-placeholder--inner"},ame={key:1,class:"custom-widget-placeholder"},lme={class:"custom-widget-name"},cme={class:"global-buttons-bar"},ume={class:"global-buttons-list"},fme={key:1,class:"global-buttons-empty"},dme=f.defineComponent({name:"FormDesignArea"}),hme=f.defineComponent({...dme,props:{layout:{},dropZoneList:{},containerDropList:{},selectedId:{},selectedFormChild:{},colNum:{},rowHeight:{},getDefaultLabel:{type:Function},getDefaultConfig:{type:Function},getDefaultConfigForChild:{type:Function},buttons:{}},emits:["update:layout","drop-from-palette","inner-layout-updated","grid-widget-capture","select-form-child","clear-selection","open-preview","save","reset","copy-widget","delete-widget","copy-form-child","delete-form-child","select-global-button","drop-container","drop-container-in-root","auto-compact-inner"],setup(t,{expose:e,emit:n}){const o={flmInput:yl,flmSelect:Wf,flmInputNumber:Vf,flmUpload:dc,flmDatePicker:GS,flmTimePicker:Kf,flmTimeSelect:Yf,flmCascader:Lf,flmCheckbox:bl,flmColorPicker:Bf,flmRadio:Ff,flmRate:zf,flmRead:_f,flmTime:Uf,flmSlider:Hf,flmSwitch:Gf,flmTransfer:Xf,flmButton:Rf,flmDialog:Jf,flmPagination:cg},r=t,i=n,s=f.computed({get:()=>r.layout,set:E=>i("update:layout",E)}),a=".el-button, .el-tag, .form-inner-control-wrap, .custom-widget-placeholder, .vue-resizable-handle, .vue-rtl-resizable-handle, .vue-draggable-handle",l={name:"rootLayout",put:!0,pull:!1};function c(E,P){i("grid-widget-capture",E,P)}let u=0;function h(E){const P=r.layout[E.newIndex];if(!P||P.nodeKind==="group")return;const D=P.type;if(D!=="form"&&D!=="subForm"&&D!=="groupSlot"){const R=[...r.layout];R.splice(E.newIndex,1),i("update:layout",R);const z=Date.now();z-u>2e3&&(u=z,kt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"));return}i("drop-container-in-root",E.newIndex)}function p(E,P){i("inner-layout-updated",E,P)}function m(E,P){i("select-form-child",E,P)}const g=(E,P)=>{i("delete-widget",E)};function v(E,P){i("copy-form-child",E,P)}function b(E,P){i("delete-form-child",E,P)}function y(E){i("select-global-button",E)}function w(){const E=r.containerDropList;if(E.filter(D=>D.type!=="form"&&D.type!=="subForm"&&D.type!=="groupSlot").length>0){E.splice(0,E.length,...E.filter(R=>R.type==="form"||R.type==="subForm"||R.type==="groupSlot"));const D=Date.now();D-u>2e3&&(u=D,kt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"))}E.length>0&&i("drop-container")}function S(E){return(E.children||[]).some(P=>P.nodeKind==="form"||P.nodeKind==="subForm")}function C(E){const P=(E.children||[]).find(D=>D.nodeKind==="form"||D.nodeKind==="subForm");P&&i("auto-compact-inner",P)}function x(E){return{...E.config||r.getDefaultConfigForChild(E.type)||{},disabled:!0,readonly:!0,"auto-upload":!1}}function k(E){const P=(E.children||[])[0];return P?P.nodeKind==="slot"?"插槽":P.nodeKind==="subForm"?"子表单":"表单":"未设置"}function O(E){const P=(E.children||[])[0];return P?P.nodeKind==="slot"?"warning":P.nodeKind==="subForm"?"success":"primary":"info"}const A=f.shallowRef(null);function T(E){if(E.kind==="custom")return Vg("flmCustom");const P=E.type;return P==="formSlot"?{w:24,h:1}:P==="flmCustom"?Vg("flmCustom"):P&&typeof P=="string"?Vg(P):{w:8,h:1}}function N(E){for(const P of r.layout)for(const D of P.children||[])if(D.i===E&&(D.nodeKind==="form"||D.nodeKind==="subForm"))return D;return null}function j(E){if(!E){A.value=null;return}const P=N(E.formChildId);if(!P){A.value=null;return}const{gridEl:D,clientX:R,clientY:z}=l5({to:E.sortableToEl,originalEvent:E.originalEvent,clientX:E.clientX,clientY:E.clientY});if(!D||R==null||z==null){A.value=null;return}const{w:U,h:_}=T(E.dragged),G=c5(P,D,R,z,r.colNum,r.rowHeight,W2,U,_,"preview"),te=Ppe(D,G.x,G.y,G.w,G.h,r.colNum,r.rowHeight,W2);if(!te){A.value=null;return}const K=D.getBoundingClientRect();A.value={position:"fixed",left:`${K.left+te.left}px`,top:`${K.top+te.top}px`,width:`${te.width}px`,height:`${te.height}px`,zIndex:"10020",pointerEvents:"none",boxSizing:"border-box"}}function I(){A.value=null}return e({updatePaletteDropPreview:j,clearPaletteDropPreview:I}),(E,P)=>{const D=f.resolveComponent("el-button"),R=f.resolveComponent("el-tag"),z=f.resolveComponent("el-icon"),U=f.resolveComponent("el-form-item"),_=f.resolveComponent("el-form");return f.openBlock(),f.createElementBlock("div",Fpe,[f.createElementVNode("div",zpe,[P[9]||(P[9]=f.createElementVNode("span",{class:"canvas-title"},"表单设计区",-1)),f.createElementVNode("div",_pe,[f.createVNode(D,{type:"primary",size:"small",onClick:P[0]||(P[0]=G=>E.$emit("open-preview"))},{default:f.withCtx(()=>[...P[6]||(P[6]=[f.createTextVNode("预览",-1)])]),_:1}),f.createVNode(D,{type:"success",size:"small",onClick:P[1]||(P[1]=G=>E.$emit("save"))},{default:f.withCtx(()=>[...P[7]||(P[7]=[f.createTextVNode("保存",-1)])]),_:1}),f.createVNode(D,{type:"warning",size:"small",onClick:P[2]||(P[2]=G=>E.$emit("reset"))},{default:f.withCtx(()=>[...P[8]||(P[8]=[f.createTextVNode("重置",-1)])]),_:1})])]),(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[A.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:"flame-fw-grid-drop-preview",style:f.normalizeStyle(A.value)},null,4)):f.createCommentVNode("",!0)])),f.createElementVNode("div",{class:"form-canvas",onClick:P[5]||(P[5]=f.withModifiers(G=>E.$emit("clear-selection"),["self"]))},[f.createElementVNode("div",Upe,[f.createVNode(f.unref(x2),{modelValue:s.value,"onUpdate:modelValue":P[3]||(P[3]=G=>s.value=G),"item-key":"i",group:l,sort:!0,filter:a,"prevent-on-filter":!1,"ghost-class":"ghost",class:"module-list",onAdd:h},{item:f.withCtx(({element:G})=>[f.createElementVNode("div",{class:f.normalizeClass(["module-wrap",{"grid-widget-wrap--selected":t.selectedId===G.i}])},[f.createElementVNode("div",{class:"module-header",onClick:te=>c(te,G)},[f.createElementVNode("div",Hpe,[f.createVNode(R,{type:O(G),size:"small",effect:"light"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(k(G)),1)]),_:2},1032,["type"]),f.createElementVNode("span",Gpe,f.toDisplayString(G.label||"分组"),1)]),f.createElementVNode("div",Kpe,[S(G)?(f.openBlock(),f.createBlock(D,{key:0,type:"primary",link:"",size:"small",onClick:f.withModifiers(te=>C(G),["stop"])},{default:f.withCtx(()=>[...P[10]||(P[10]=[f.createTextVNode(" 自动排序 ",-1)])]),_:1},8,["onClick"])):f.createCommentVNode("",!0),f.createVNode(D,{type:"danger",link:"",size:"small",onClick:te=>g(G)},{default:f.withCtx(()=>[...P[11]||(P[11]=[f.createTextVNode(" 删除分组 ",-1)])]),_:1},8,["onClick"])])],8,Wpe),f.createElementVNode("div",Ype,[G.children&&G.children.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(G.children||[],te=>(f.openBlock(),f.createElementBlock("div",{key:te.i,class:"module-body-content"},[te.nodeKind==="slot"&&te.type==="groupSlot"?(f.openBlock(),f.createElementBlock("div",Jpe,[...P[13]||(P[13]=[f.createElementVNode("div",{class:"slot-title"},"分组插槽",-1)])])):te.nodeKind==="form"?(f.openBlock(),f.createBlock(_,{key:1,class:"form-inner"},{default:f.withCtx(()=>[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":te.i},[f.createVNode(f.unref(r5),{layout:te.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:K=>p(K,te)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(te.children||[],K=>(f.openBlock(),f.createBlock(f.unref(_2),{key:K.i,x:K.x,y:K.y,w:K.w,h:K.h,i:K.i},{default:f.withCtx(()=>{var q,F,oe,ve;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((q=t.selectedFormChild)==null?void 0:q.formId)===G.i&&((F=t.selectedFormChild)==null?void 0:F.childId)===K.i,"form-inner-control-wrap--slot":K.nodeKind==="slot"}]),onClick:f.withModifiers(Ee=>m(G,K),["stop"])},[f.createElementVNode("div",qpe,[f.createVNode(D,{type:"primary",link:"",size:"small",onClick:f.withModifiers(Ee=>v(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.CopyDocument))]),_:1})]),_:1},8,["onClick"]),f.createVNode(D,{type:"danger",link:"",size:"small",onClick:f.withModifiers(Ee=>b(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(U,{label:K.nodeKind==="slot"&&K.type==="formSlot"?"":((oe=K.formItem)==null?void 0:oe.label)??K.label??t.getDefaultLabel(K.type),"label-width":K.nodeKind==="slot"&&K.type==="formSlot"?"0":"",required:(ve=K.formItem)==null?void 0:ve.required,class:"canvas-form-item"},{default:f.withCtx(()=>[K.nodeKind==="slot"&&K.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",$pe,[...P[14]||(P[14]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):K.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",eme,[f.createElementVNode("span",tme,f.toDisplayString(K.label||K.customComponentName||"自定义组件"),1)])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[K.type]||yl),{key:2,config:x(K)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,Zpe)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,Qpe)]),_:2},1024)):te.nodeKind==="subForm"?(f.openBlock(),f.createElementBlock("div",nme,[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":te.i},[f.createVNode(f.unref(r5),{layout:te.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:K=>p(K,te)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(te.children||[],K=>(f.openBlock(),f.createBlock(f.unref(_2),{key:K.i,x:K.x,y:K.y,w:K.w,h:K.h,i:K.i},{default:f.withCtx(()=>{var q,F,oe,ve;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((q=t.selectedFormChild)==null?void 0:q.formId)===G.i&&((F=t.selectedFormChild)==null?void 0:F.childId)===K.i,"form-inner-control-wrap--slot":K.nodeKind==="slot"}]),onClick:f.withModifiers(Ee=>m(G,K),["stop"])},[f.createElementVNode("div",ime,[f.createVNode(D,{type:"primary",link:"",size:"small",onClick:f.withModifiers(Ee=>v(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.CopyDocument))]),_:1})]),_:1},8,["onClick"]),f.createVNode(D,{type:"danger",link:"",size:"small",onClick:f.withModifiers(Ee=>b(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(U,{label:K.nodeKind==="slot"&&K.type==="formSlot"?"":((oe=K.formItem)==null?void 0:oe.label)??K.label??t.getDefaultLabel(K.type),"label-width":K.nodeKind==="slot"&&K.type==="formSlot"?"0":"",required:(ve=K.formItem)==null?void 0:ve.required,class:"canvas-form-item"},{default:f.withCtx(()=>[K.nodeKind==="slot"&&K.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",sme,[...P[15]||(P[15]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):K.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",ame,[f.createElementVNode("span",lme,f.toDisplayString(K.customComponentName||"业务组件"),1),P[16]||(P[16]=f.createElementVNode("span",{class:"custom-widget-hint"},"(运行时渲染)",-1))])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[K.type]||yl),{key:2,config:x(K)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,rme)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,ome)])):f.createCommentVNode("",!0)]))),128)):(f.openBlock(),f.createElementBlock("div",{key:0,class:"module-inner-drop-zone","data-palette-drop-group":G.i},[...P[12]||(P[12]=[f.createElementVNode("span",{class:"drop-hint"},"请拖入或右侧选择分组类型",-1)])],8,Xpe))])],2)]),_:1},8,["modelValue"]),f.createVNode(f.unref(x2),{list:t.containerDropList,"item-key":"id",group:{name:"containers",put:!0},sort:!1,class:"container-drop-zone",onAdd:P[4]||(P[4]=G=>w())},{item:f.withCtx(({element:G})=>[(f.openBlock(),f.createElementBlock("span",{key:G.id}))]),footer:f.withCtx(()=>[...P[17]||(P[17]=[f.createElementVNode("span",{class:"drop-hint"},"拖入容器创建分组",-1)])]),_:1},8,["list"]),f.createElementVNode("div",cme,[P[18]||(P[18]=f.createElementVNode("span",{class:"global-buttons-label"},"功能按钮:",-1)),f.createElementVNode("div",ume,[r.buttons&&r.buttons.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(r.buttons,(G,te)=>(f.openBlock(),f.createBlock(D,{key:te,type:G.type||"default",size:"small",onClick:f.withModifiers(K=>y(te),["stop"])},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(G.text||G.buttonText||G.label||"按钮"),1)]),_:2},1032,["type","onClick"]))),128)):(f.openBlock(),f.createElementBlock("span",fme,"(请在右侧“功能按钮”中配置)"))])])])])])}}}),pme=qr(hme,[["__scopeId","data-v-fa8a81c4"]]),mme={class:"preview-canvas"},gme=f.defineComponent({name:"PreviewDialog"}),vme=f.defineComponent({...gme,props:{modelValue:{type:Boolean},config:{}},emits:["update:modelValue"],setup(t){const e=t,n=f.ref(0);f.watch(()=>e.modelValue,l=>{l||n.value++});const o=f.computed(()=>{const l=e.config||{};return!!(l&&Array.isArray(l.groups)&&l.groups.length)});function r(l){console.log("[PreviewDialog] submit formModel:",l)}function i(l){console.log("[PreviewDialog] cancel formModel:",l)}function s(l){console.log("[PreviewDialog] reset formModel:",l)}function a(l){const c=(l==null?void 0:l.data)??(l==null?void 0:l.payload)??(l==null?void 0:l.formModel);console.log("[PreviewDialog] custom event:",l==null?void 0:l.event,"valid:",l==null?void 0:l.valid,c,l==null?void 0:l.button)}return(l,c)=>{const u=f.resolveComponent("el-dialog");return f.openBlock(),f.createBlock(u,{"model-value":t.modelValue,title:"表单预览",width:"960px","destroy-on-close":"",class:"preview-dialog","onUpdate:modelValue":c[0]||(c[0]=h=>l.$emit("update:modelValue",h))},{default:f.withCtx(()=>[f.createElementVNode("div",mme,[o.value?(f.openBlock(),f.createBlock($S,{key:n.value,config:t.config,onSubmit:r,onCancel:i,onReset:s,onCustomEvent:a},null,8,["config"])):f.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),bme=qr(vme,[["__scopeId","data-v-ff02b3af"]]),yme={class:"settings-panel"},xme={key:0,class:"settings-form-wrap"},wme=["onClick","onKeydown"],Cme={class:"attr-group__title"},kme={class:"attr-group__body"},Sme={key:1,class:"settings-empty"},jme=f.defineComponent({name:"SettingsPanel"}),Eme=f.defineComponent({...jme,props:{selectedItem:{},groupsConfig:{}},setup(t){const e=t,n=f.ref({});f.watch(()=>e.groupsConfig,i=>{const s={};i==null||i.forEach(a=>{s[a.name]=n.value[a.name]??a.defaultOpen!==!1}),n.value=s},{immediate:!0});const o=f.computed(()=>{const i=e.groupsConfig||[],s=e.selectedItem;return s?i.filter(a=>!a.visible||a.visible(s)):[]});function r(i){n.value={...n.value,[i]:!n.value[i]}}return(i,s)=>{const a=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",yme,[s[0]||(s[0]=f.createElementVNode("div",{class:"panel-title"},"属性",-1)),t.selectedItem?(f.openBlock(),f.createElementBlock("div",xme,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(o.value,l=>(f.openBlock(),f.createElementBlock("div",{key:l.name,class:"attr-group"},[f.createElementVNode("div",{class:"attr-group__header",onClick:c=>r(l.name),role:"button",tabindex:"0",onKeydown:f.withKeys(f.withModifiers(c=>r(l.name),["prevent"]),["enter","space"])},[f.createVNode(a,{class:f.normalizeClass(["attr-group__arrow",{"is-collapsed":!n.value[l.name]}])},{default:f.withCtx(()=>[f.createVNode(f.unref(_a.ArrowRight))]),_:1},8,["class"]),f.createElementVNode("span",Cme,f.toDisplayString(l.title),1)],40,wme),f.withDirectives(f.createElementVNode("div",kme,[f.createVNode(f.unref(kt.ElConfigProvider),{size:"small"},{default:f.withCtx(()=>[f.renderSlot(i.$slots,l.name,{model:t.selectedItem},void 0,!0)]),_:2},1024)],512),[[f.vShow,n.value[l.name]]])]))),128))])):(f.openBlock(),f.createElementBlock("div",Sme," 点击设计区中的控件以编辑属性 "))])}}}),Ome=qr(Eme,[["__scopeId","data-v-5e429677"]]),Tme={class:"framework-attr-fields-form"},Ame={key:1,class:"unsupported-hint"},Mme=f.defineComponent({name:"FrameworkAttrFieldsForm"}),Nme=f.defineComponent({...Mme,props:{fields:{},model:{},formProps:{}},setup(t){const e=t;function n(b,y){return fv(b,y)}function o(b,y,w){const S=Or(w);IT(b,y,S)}function r(b){if(!b.visible)return!0;try{return b.visible(e.model)}catch{return!0}}const i={input:Ht.ControlTypes.flmInput,"input-number":Ht.ControlTypes.flmInputNumber,slider:Ht.ControlTypes.flmSlider,switch:Ht.ControlTypes.flmSwitch,select:Ht.ControlTypes.flmSelect},s=f.reactive({}),a=f.ref(null),l=f.computed(()=>e.fields.filter(r)),c=f.computed(()=>l.value.filter(b=>!i[b.component])),u=f.computed(()=>l.value.filter(b=>i[b.component]).map(b=>{const y=i[b.component];return{prop:b.key,label:b.label,controlType:y,controlConfig:{...b.props??{},"model-value":s[b.key]}}})),h=f.computed(()=>({size:Ht.ElementSize.small,"label-position":"right","label-width":"120px",...e.formProps??{}})),p=f.computed(()=>({...h.value,model:s,items:u.value}));let m=!1;function g(){l.value.forEach(b=>{i[b.component]&&(s[b.key]=n(e.model,b.key))})}function v(){var y;const b=(y=a.value)==null?void 0:y.formModel;b&&l.value.forEach(w=>{if(!i[w.component])return;const S=b[w.key];o(e.model,w.key,S)})}return f.watch(()=>e.model,()=>{m||(m=!0,g(),m=!1)},{deep:!0,immediate:!0}),f.watch(()=>{var b;return(b=a.value)==null?void 0:b.formModel},()=>{m||(m=!0,v(),m=!1)},{deep:!0}),(b,y)=>(f.openBlock(),f.createElementBlock("div",Tme,[t.model&&u.value.length?(f.openBlock(),f.createBlock(f.unref(Cu),{key:0,ref_key:"flmFormRef",ref:a,config:p.value,type:"edit"},null,8,["config"])):f.createCommentVNode("",!0),c.value.length?(f.openBlock(),f.createElementBlock("div",Ame,f.toDisplayString(c.value.map(w=>w.component).join("、"))+"(暂不支持,请扩展 `FrameworkAttrFieldsForm` 映射到 `flmForm`) ",1)):f.createCommentVNode("",!0)]))}}),Pme=qr(Nme,[["__scopeId","data-v-74925a9d"]]),Dme={key:3,class:"settings-empty-hint"},Ime={class:"options-editor"},Rme={class:"json-options-row"},Lme={class:"json-options-hint"},Bme={class:"options-editor"},Vme={class:"json-options-row"},Fme={class:"json-options-hint"},zme={class:"flm-time-format-row"},_me={class:"flm-time-format-tip-trigger",tabindex:"0",role:"button","aria-label":"时间格式说明"},Ume=qr(f.defineComponent({__name:"DetailSettingsSlot",props:{model:{},inputConfig:{},selectConfig:{},inputNumberConfig:{},datePickerConfig:{},timePickerConfig:{},timeSelectConfig:{},cascaderConfig:{},checkboxConfig:{},colorPickerConfig:{},radioConfig:{},rateConfig:{},sliderConfig:{},switchConfig:{},transferConfig:{},buttonConfig:{},dialogConfig:{},drawerConfig:{},paginationConfig:{},readConfig:{},uploadConfig:{},uploadAcceptSelection:{},uploadAcceptTypeOptions:{},timeConfig:{},onFlmTimePresetChange:{type:Function}},setup(t){const e=t;function n(N){e.inputConfig&&(e.inputConfig.maxlength=N??0)}function o(N){e.inputConfig&&(e.inputConfig.minlength=N??0)}function r(N){e.inputConfig&&(e.inputConfig.autosize=!!N)}function i(N,j){N.value=j}function s(N){N.options||(N.options=[]),N.options.push({label:"新选项",value:`opt_${Date.now()}`})}function a(N,j){if(!N.options)return;N.options.splice(j,1)}function l(N){e.checkboxConfig&&(e.checkboxConfig.label=N)}function c(N){N.radios||(N.radios=[]);const j=(N.radios.length||0)+1;N.radios.push({label:`选项${j}`})}function u(N,j){var I;(I=N.radios)==null||I.splice(j,1)}function h(N){return N==null?void 0:N.value}function p(N,j){!N||typeof N!="object"||(N.value=j)}const m=f.computed({get(){var N,j;return((j=(N=e.transferConfig)==null?void 0:N.titles)==null?void 0:j[0])??""},set(N){if(!e.transferConfig)return;const j=e.transferConfig.titles||[];e.transferConfig.titles=[N,j[1]??""]}}),g=f.computed({get(){var N,j;return((j=(N=e.transferConfig)==null?void 0:N.titles)==null?void 0:j[1])??""},set(N){if(!e.transferConfig)return;const j=e.transferConfig.titles||[];e.transferConfig.titles=[j[0]??"",N]}}),v=f.ref([]);f.watch(()=>{const N=e.model;return(N==null?void 0:N.type)!=="flmCascader"||!N.config?null:N.i},N=>{if(!N){v.value=[];return}const j=e.model;if((j==null?void 0:j.type)!=="flmCascader"||!j.config)return;const I=j.config.options;v.value=Or(Array.isArray(I)?I:[])},{immediate:!0}),f.watch(v,N=>{const j=e.model;(j==null?void 0:j.type)!=="flmCascader"||!j.config||Array.isArray(N)&&(j.config.options=Or(N))},{deep:!0});const b=f.ref([]);f.watch(()=>{const N=e.model;return(N==null?void 0:N.type)!=="flmTransfer"||!N.config?null:N.i},N=>{if(!N){b.value=[];return}const j=e.model;if((j==null?void 0:j.type)!=="flmTransfer"||!j.config)return;const I=j.config.data;b.value=Or(Array.isArray(I)?I:[])},{immediate:!0}),f.watch(b,N=>{const j=e.model;(j==null?void 0:j.type)!=="flmTransfer"||!j.config||Array.isArray(N)&&(j.config.data=Or(N))},{deep:!0});const y=f.ref(!1),w=f.ref(null),S=f.ref([]),C=f.computed(()=>w.value==="cascader"?"编辑级联选项":"编辑穿梭框选项"),x=f.computed(()=>{const N=v.value;return Array.isArray(N)?N.length?`共 ${N.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"}),k=f.computed(()=>{const N=b.value;return Array.isArray(N)?N.length?`共 ${N.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"});function O(N){w.value=N,S.value=Or(N==="cascader"?v.value:b.value),y.value=!0}function A(){const N=S.value;if(!Array.isArray(N)){kt.ElMessage.warning("请配置为 JSON 数组");return}const j=w.value;j==="cascader"?v.value=Or(N):j==="transfer"&&(b.value=Or(N)),y.value=!1}function T(){w.value=null}return(N,j)=>{const I=f.resolveComponent("el-input"),E=f.resolveComponent("el-form-item"),P=f.resolveComponent("el-radio-button"),D=f.resolveComponent("el-radio-group"),R=f.resolveComponent("el-input-number"),z=f.resolveComponent("el-switch"),U=f.resolveComponent("el-button"),_=f.resolveComponent("el-option"),G=f.resolveComponent("el-select"),te=f.resolveComponent("el-form"),K=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[t.model?(f.openBlock(),f.createBlock(te,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>{var q;return[t.model.type==="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[t.model.customComponentName?(f.openBlock(),f.createBlock(E,{key:0,label:"业务组件"},{default:f.withCtx(()=>[f.createVNode(I,{"model-value":t.model.customComponentName,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),t.model.customKey?(f.openBlock(),f.createBlock(E,{key:1,label:"组件键"},{default:f.withCtx(()=>[f.createVNode(I,{"model-value":t.model.customKey,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),(q=t.model.customAttrFields)!=null&&q.length?(f.openBlock(),f.createBlock(Pme,{key:2,fields:t.model.customAttrFields,model:t.model},null,8,["fields","model"])):(f.openBlock(),f.createElementBlock("div",Dme,"未配置属性字段(attrFields)"))],64)):t.inputConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(E,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(D,{modelValue:t.inputConfig.type,"onUpdate:modelValue":j[0]||(j[0]=F=>t.inputConfig.type=F)},{default:f.withCtx(()=>[f.createVNode(P,{value:"text"},{default:f.withCtx(()=>[...j[82]||(j[82]=[f.createTextVNode("单行",-1)])]),_:1}),f.createVNode(P,{value:"textarea"},{default:f.withCtx(()=>[...j[83]||(j[83]=[f.createTextVNode("多行",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"最大长度"},{default:f.withCtx(()=>[f.createVNode(R,{"model-value":Number(t.inputConfig.maxlength??0),"onUpdate:modelValue":n,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1}),f.createVNode(E,{label:"最小长度"},{default:f.withCtx(()=>[f.createVNode(R,{"model-value":Number(t.inputConfig.minlength??0),"onUpdate:modelValue":o,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1}),f.createVNode(E,{label:"显示字数统计"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig["show-word-limit"],"onUpdate:modelValue":j[1]||(j[1]=F=>t.inputConfig["show-word-limit"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示密码"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig["show-password"],"onUpdate:modelValue":j[2]||(j[2]=F=>t.inputConfig["show-password"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"只读"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig.readonly,"onUpdate:modelValue":j[3]||(j[3]=F=>t.inputConfig.readonly=F)},null,8,["modelValue"])]),_:1}),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(E,{key:0,label:"行数"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputConfig.rows,"onUpdate:modelValue":j[4]||(j[4]=F=>t.inputConfig.rows=F),min:1,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(E,{key:1,label:"自动高度"},{default:f.withCtx(()=>[f.createVNode(z,{"model-value":!!t.inputConfig.autosize,"onUpdate:modelValue":r},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),f.createVNode(E,{label:"名称"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.inputConfig.name,"onUpdate:modelValue":j[5]||(j[5]=F=>t.inputConfig.name=F),placeholder:"表单字段名",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"校验事件"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig["validate-event"],"onUpdate:modelValue":j[6]||(j[6]=F=>t.inputConfig["validate-event"]=F)},null,8,["modelValue"])]),_:1})],64)):t.selectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createVNode(E,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Ime,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.selectConfig.options||[],(F,oe)=>(f.openBlock(),f.createElementBlock("div",{key:oe,class:"option-row option-row--kvd"},[f.createVNode(I,{modelValue:F.label,"onUpdate:modelValue":ve=>F.label=ve,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["modelValue","onUpdate:modelValue"]),f.createVNode(I,{"model-value":String(F.value??""),"onUpdate:modelValue":ve=>i(F,ve),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(U,{type:"danger",link:"",size:"small",onClick:ve=>a(t.selectConfig,Number(oe))},{default:f.withCtx(()=>[...j[84]||(j[84]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128)),f.createVNode(U,{type:"primary",link:"",size:"small",onClick:j[7]||(j[7]=F=>s(t.selectConfig))},{default:f.withCtx(()=>[...j[85]||(j[85]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(E,{label:"是否多选"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.selectConfig.multiple,"onUpdate:modelValue":j[8]||(j[8]=F=>t.selectConfig.multiple=F)},null,8,["modelValue"])]),_:1})],64)):t.inputNumberConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:3},[f.createVNode(E,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.min,"onUpdate:modelValue":j[9]||(j[9]=F=>t.inputNumberConfig.min=F),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.max,"onUpdate:modelValue":j[10]||(j[10]=F=>t.inputNumberConfig.max=F),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.step,"onUpdate:modelValue":j[11]||(j[11]=F=>t.inputNumberConfig.step=F),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"精度"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.precision,"onUpdate:modelValue":j[12]||(j[12]=F=>t.inputNumberConfig.precision=F),min:0,max:20,"controls-position":"right",placeholder:"小数位数"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示控制按钮"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputNumberConfig.controls,"onUpdate:modelValue":j[13]||(j[13]=F=>t.inputNumberConfig.controls=F)},null,8,["modelValue"])]),_:1})],64)):t.datePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:4},[f.createVNode(E,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.datePickerConfig.type,"onUpdate:modelValue":j[14]||(j[14]=F=>t.datePickerConfig.type=F),placeholder:"date",clearable:""},{default:f.withCtx(()=>[f.createVNode(_,{label:"年",value:"year"}),f.createVNode(_,{label:"月",value:"month"}),f.createVNode(_,{label:"日",value:"date"}),f.createVNode(_,{label:"周",value:"week"}),f.createVNode(_,{label:"日期时间",value:"datetime"}),f.createVNode(_,{label:"日期范围",value:"daterange"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.datePickerConfig.format,"onUpdate:modelValue":j[15]||(j[15]=F=>t.datePickerConfig.format=F),placeholder:"如 YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.datePickerConfig.editable,"onUpdate:modelValue":j[16]||(j[16]=F=>t.datePickerConfig.editable=F)},null,8,["modelValue"])]),_:1})],64)):t.timePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:5},[f.createVNode(E,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timePickerConfig.format,"onUpdate:modelValue":j[17]||(j[17]=F=>t.timePickerConfig.format=F),placeholder:"如 HH:mm:ss",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.timePickerConfig.editable,"onUpdate:modelValue":j[18]||(j[18]=F=>t.timePickerConfig.editable=F)},null,8,["modelValue"])]),_:1})],64)):t.timeSelectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:6},[f.createVNode(E,{label:"开始时间"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timeSelectConfig.start,"onUpdate:modelValue":j[19]||(j[19]=F=>t.timeSelectConfig.start=F),placeholder:"08:00",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"结束时间"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timeSelectConfig.end,"onUpdate:modelValue":j[20]||(j[20]=F=>t.timeSelectConfig.end=F),placeholder:"18:00",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timeSelectConfig.step,"onUpdate:modelValue":j[21]||(j[21]=F=>t.timeSelectConfig.step=F),placeholder:"00:30",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.uploadConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:7},[f.createVNode(E,{label:"上传地址"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.uploadConfig.action,"onUpdate:modelValue":j[22]||(j[22]=F=>t.uploadConfig.action=F),placeholder:"请输入上传接口地址",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"文件字段名"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.uploadConfig.name,"onUpdate:modelValue":j[23]||(j[23]=F=>t.uploadConfig.name=F),placeholder:"默认 file",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"接受类型"},{default:f.withCtx(()=>[f.createVNode(G,{"model-value":t.uploadAcceptSelection,"onUpdate:modelValue":j[24]||(j[24]=F=>t.uploadAcceptSelection=F),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",filterable:"",clearable:"",placeholder:"请选择允许的文件类型,可多选",style:{width:"100%"}},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.uploadAcceptTypeOptions,F=>(f.openBlock(),f.createBlock(_,{key:F.value,label:F.label,value:F.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),_:1}),f.createVNode(E,{label:"列表样式"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.uploadConfig["list-type"],"onUpdate:modelValue":j[25]||(j[25]=F=>t.uploadConfig["list-type"]=F),placeholder:"请选择",clearable:"",style:{width:"100%"}},{default:f.withCtx(()=>[f.createVNode(_,{label:"文本列表",value:"text"}),f.createVNode(_,{label:"缩略图列表",value:"picture"}),f.createVNode(_,{label:"照片墙",value:"picture-card"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"数量限制"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.uploadConfig.limit,"onUpdate:modelValue":j[26]||(j[26]=F=>t.uploadConfig.limit=F),min:1,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"支持多选"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig.multiple,"onUpdate:modelValue":j[27]||(j[27]=F=>t.uploadConfig.multiple=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"拖拽上传"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig.drag,"onUpdate:modelValue":j[28]||(j[28]=F=>t.uploadConfig.drag=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"自动上传"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig["auto-upload"],"onUpdate:modelValue":j[29]||(j[29]=F=>t.uploadConfig["auto-upload"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示文件列表"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig["show-file-list"],"onUpdate:modelValue":j[30]||(j[30]=F=>t.uploadConfig["show-file-list"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig.disabled,"onUpdate:modelValue":j[31]||(j[31]=F=>t.uploadConfig.disabled=F)},null,8,["modelValue"])]),_:1})],64)):t.cascaderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:8},[f.createVNode(E,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.cascaderConfig.filterable,"onUpdate:modelValue":j[32]||(j[32]=F=>t.cascaderConfig.filterable=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示完整路径"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.cascaderConfig["show-all-levels"],"onUpdate:modelValue":j[33]||(j[33]=F=>t.cascaderConfig["show-all-levels"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",Rme,[f.createElementVNode("span",Lme,f.toDisplayString(x.value),1),f.createVNode(U,{type:"primary",link:"",onClick:j[34]||(j[34]=F=>O("cascader"))},{default:f.withCtx(()=>[...j[86]||(j[86]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.checkboxConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:9},[f.createVNode(E,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(I,{"model-value":t.checkboxConfig.label,"onUpdate:modelValue":l,placeholder:"选项文本",clearable:""},null,8,["model-value"])]),_:1}),f.createVNode(E,{label:"真值"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.checkboxConfig["true-label"],"onUpdate:modelValue":j[35]||(j[35]=F=>t.checkboxConfig["true-label"]=F),placeholder:"选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"假值"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.checkboxConfig["false-label"],"onUpdate:modelValue":j[36]||(j[36]=F=>t.checkboxConfig["false-label"]=F),placeholder:"未选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示边框"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.checkboxConfig.border,"onUpdate:modelValue":j[37]||(j[37]=F=>t.checkboxConfig.border=F)},null,8,["modelValue"])]),_:1})],64)):t.colorPickerConfig?(f.openBlock(),f.createBlock(E,{key:10,label:"显示透明度"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.colorPickerConfig["show-alpha"],"onUpdate:modelValue":j[38]||(j[38]=F=>t.colorPickerConfig["show-alpha"]=F)},null,8,["modelValue"])]),_:1})):t.radioConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:11},[f.createVNode(E,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Bme,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.radioConfig.radios||[],(F,oe)=>(f.openBlock(),f.createElementBlock("div",{key:oe,class:"option-row option-row--kvd"},[f.createVNode(I,{"model-value":F.label,"onUpdate:modelValue":ve=>F.label=ve,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(I,{"model-value":String(h(F)??""),"onUpdate:modelValue":ve=>p(F,ve),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(U,{type:"danger",link:"",size:"small",onClick:ve=>u(t.radioConfig,oe)},{default:f.withCtx(()=>[...j[87]||(j[87]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128)),f.createVNode(U,{type:"primary",link:"",size:"small",onClick:j[39]||(j[39]=F=>c(t.radioConfig))},{default:f.withCtx(()=>[...j[88]||(j[88]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(E,{label:"按钮样式"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.radioConfig.useButton,"onUpdate:modelValue":j[40]||(j[40]=F=>t.radioConfig.useButton=F)},null,8,["modelValue"])]),_:1})],64)):t.rateConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:12},[f.createVNode(E,{label:"最大分值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.rateConfig.max,"onUpdate:modelValue":j[41]||(j[41]=F=>t.rateConfig.max=F),min:1,max:20,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"允许半选"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.rateConfig["allow-half"],"onUpdate:modelValue":j[42]||(j[42]=F=>t.rateConfig["allow-half"]=F)},null,8,["modelValue"])]),_:1})],64)):t.sliderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:13},[f.createVNode(E,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.sliderConfig.min,"onUpdate:modelValue":j[43]||(j[43]=F=>t.sliderConfig.min=F),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.sliderConfig.max,"onUpdate:modelValue":j[44]||(j[44]=F=>t.sliderConfig.max=F),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.sliderConfig.step,"onUpdate:modelValue":j[45]||(j[45]=F=>t.sliderConfig.step=F),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示输入框"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.sliderConfig["show-input"],"onUpdate:modelValue":j[46]||(j[46]=F=>t.sliderConfig["show-input"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"范围模式"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.sliderConfig.range,"onUpdate:modelValue":j[47]||(j[47]=F=>t.sliderConfig.range=F)},null,8,["modelValue"])]),_:1})],64)):t.switchConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:14},[f.createVNode(E,{label:"激活文案"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.switchConfig["active-text"],"onUpdate:modelValue":j[48]||(j[48]=F=>t.switchConfig["active-text"]=F),placeholder:"开",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"未激活文案"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.switchConfig["inactive-text"],"onUpdate:modelValue":j[49]||(j[49]=F=>t.switchConfig["inactive-text"]=F),placeholder:"关",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.transferConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:15},[f.createVNode(E,{label:"左侧标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:m.value,"onUpdate:modelValue":j[50]||(j[50]=F=>m.value=F),placeholder:"列表1",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"右侧标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:g.value,"onUpdate:modelValue":j[51]||(j[51]=F=>g.value=F),placeholder:"列表2",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.transferConfig.filterable,"onUpdate:modelValue":j[52]||(j[52]=F=>t.transferConfig.filterable=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",Vme,[f.createElementVNode("span",Fme,f.toDisplayString(k.value),1),f.createVNode(U,{type:"primary",link:"",onClick:j[53]||(j[53]=F=>O("transfer"))},{default:f.withCtx(()=>[...j[89]||(j[89]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.buttonConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:16},[f.createVNode(E,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.buttonConfig.buttonText,"onUpdate:modelValue":j[54]||(j[54]=F=>t.buttonConfig.buttonText=F),placeholder:"点击",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.buttonConfig.type,"onUpdate:modelValue":j[55]||(j[55]=F=>t.buttonConfig.type=F),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(_,{label:"主要",value:"primary"}),f.createVNode(_,{label:"成功",value:"success"}),f.createVNode(_,{label:"警告",value:"warning"}),f.createVNode(_,{label:"危险",value:"danger"}),f.createVNode(_,{label:"信息",value:"info"}),f.createVNode(_,{label:"默认",value:"default"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.buttonConfig.plain,"onUpdate:modelValue":j[56]||(j[56]=F=>t.buttonConfig.plain=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.buttonConfig.round,"onUpdate:modelValue":j[57]||(j[57]=F=>t.buttonConfig.round=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.buttonConfig.circle,"onUpdate:modelValue":j[58]||(j[58]=F=>t.buttonConfig.circle=F)},null,8,["modelValue"])]),_:1})],64)):t.dialogConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:17},[f.createVNode(E,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.dialogConfig.title,"onUpdate:modelValue":j[59]||(j[59]=F=>t.dialogConfig.title=F),placeholder:"弹窗",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"宽度"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.dialogConfig.width,"onUpdate:modelValue":j[60]||(j[60]=F=>t.dialogConfig.width=F),placeholder:"50% 或 500",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"居中"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig.center,"onUpdate:modelValue":j[61]||(j[61]=F=>t.dialogConfig.center=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可拖拽"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig.draggable,"onUpdate:modelValue":j[62]||(j[62]=F=>t.dialogConfig.draggable=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig["close-on-click-modal"],"onUpdate:modelValue":j[63]||(j[63]=F=>t.dialogConfig["close-on-click-modal"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig["show-close"],"onUpdate:modelValue":j[64]||(j[64]=F=>t.dialogConfig["show-close"]=F)},null,8,["modelValue"])]),_:1})],64)):t.drawerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:18},[f.createVNode(E,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.drawerConfig.title,"onUpdate:modelValue":j[65]||(j[65]=F=>t.drawerConfig.title=F),placeholder:"抽屉",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"方向"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.drawerConfig.direction,"onUpdate:modelValue":j[66]||(j[66]=F=>t.drawerConfig.direction=F),placeholder:"rtl"},{default:f.withCtx(()=>[f.createVNode(_,{label:"右",value:"rtl"}),f.createVNode(_,{label:"左",value:"ltr"}),f.createVNode(_,{label:"上",value:"ttb"}),f.createVNode(_,{label:"下",value:"btt"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.drawerConfig.size,"onUpdate:modelValue":j[67]||(j[67]=F=>t.drawerConfig.size=F),placeholder:"30% 或 400px",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.drawerConfig["close-on-click-modal"],"onUpdate:modelValue":j[68]||(j[68]=F=>t.drawerConfig["close-on-click-modal"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.drawerConfig["show-close"],"onUpdate:modelValue":j[69]||(j[69]=F=>t.drawerConfig["show-close"]=F)},null,8,["modelValue"])]),_:1})],64)):t.paginationConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:19},[f.createVNode(E,{label:"总条数"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.paginationConfig.total,"onUpdate:modelValue":j[70]||(j[70]=F=>t.paginationConfig.total=F),min:0,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"每页条数"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.paginationConfig["page-size"],"onUpdate:modelValue":j[71]||(j[71]=F=>t.paginationConfig["page-size"]=F),min:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"布局"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.paginationConfig.layout,"onUpdate:modelValue":j[72]||(j[72]=F=>t.paginationConfig.layout=F),placeholder:"total, prev, pager, next",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"小尺寸"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.paginationConfig.small,"onUpdate:modelValue":j[73]||(j[73]=F=>t.paginationConfig.small=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.paginationConfig.background,"onUpdate:modelValue":j[74]||(j[74]=F=>t.paginationConfig.background=F)},null,8,["modelValue"])]),_:1})],64)):t.timeConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:20},[f.createVNode(E,{label:"格式预设"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.timeConfig.formatPreset,"onUpdate:modelValue":j[75]||(j[75]=F=>t.timeConfig.formatPreset=F),placeholder:"选择预设",style:{width:"100%"},onChange:t.onFlmTimePresetChange},{default:f.withCtx(()=>[f.createVNode(_,{label:"当前日期",value:"date"}),f.createVNode(_,{label:"当前时间",value:"time"}),f.createVNode(_,{label:"自定义",value:"custom"})]),_:1},8,["modelValue","onChange"])]),_:1}),f.createVNode(E,{label:"时间格式"},{default:f.withCtx(()=>[f.createElementVNode("div",zme,[f.createVNode(I,{modelValue:t.timeConfig.format,"onUpdate:modelValue":j[76]||(j[76]=F=>t.timeConfig.format=F),class:"flm-time-format-row__input",placeholder:"如 YYYY-MM-DD 或 HH:mm:ss",clearable:"",disabled:t.timeConfig.formatPreset!=="custom"},null,8,["modelValue","disabled"]),f.createVNode(f.unref(kt.ElTooltip),{effect:"light",placement:"top-end","show-after":200,trigger:["hover","click"],"popper-class":"flm-time-format-tooltip"},{content:f.withCtx(()=>[...j[90]||(j[90]=[f.createElementVNode("div",null,[f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createTextVNode(" 这里控制"),f.createElementVNode("strong",null,"时间显示成什么文字"),f.createTextVNode(",按从左到右的顺序写「年、月、日、时、分、秒」即可。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"常用写法:")]),f.createElementVNode("ul",{class:"flm-time-format-tooltip__ul"},[f.createElementVNode("li",null,[f.createTextVNode("只要日期:"),f.createElementVNode("code",null,"YYYY-MM-DD"),f.createTextVNode(" → 如 2026-04-02")]),f.createElementVNode("li",null,[f.createTextVNode("只要时刻:"),f.createElementVNode("code",null,"HH:mm:ss"),f.createTextVNode(" → 如 14:30:05")]),f.createElementVNode("li",null,[f.createTextVNode("日期 + 时刻:"),f.createElementVNode("code",null,"YYYY-MM-DD HH:mm:ss")])]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"字母含义:"),f.createTextVNode("Y 表示年,M 月,D 日;H 时,m 分,s 秒(可多段组合在一起)。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"}," 选择「当前日期」或「当前时间」时,下面会自动带出对应格式;选择「自定义」后可以按需要自己改。 ")],-1)])]),default:f.withCtx(()=>[f.createElementVNode("span",_me,[f.createVNode(f.unref(kt.ElIcon),{size:18,color:"var(--el-text-color-secondary)"},{default:f.withCtx(()=>[f.createVNode(f.unref(_a.QuestionFilled))]),_:1})])]),_:1})])]),_:1})],64)):t.readConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:21},[f.createVNode(E,{label:"样式类"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.readConfig.class,"onUpdate:modelValue":j[77]||(j[77]=F=>t.readConfig.class=F),placeholder:"自定义 class",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"内联样式"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.readConfig.style,"onUpdate:modelValue":j[78]||(j[78]=F=>t.readConfig.style=F),placeholder:"自定义 style",clearable:""},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)]}),_:1})):f.createCommentVNode("",!0),f.createVNode(K,{modelValue:y.value,"onUpdate:modelValue":j[81]||(j[81]=q=>y.value=q),title:C.value,class:"framework-json-options-dialog",width:"min(92vw, 900px)",top:"5vh","append-to-body":"","destroy-on-close":"",onClosed:T},{footer:f.withCtx(()=>[f.createVNode(U,{onClick:j[80]||(j[80]=q=>y.value=!1)},{default:f.withCtx(()=>[...j[91]||(j[91]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(U,{type:"primary",onClick:A},{default:f.withCtx(()=>[...j[92]||(j[92]=[f.createTextVNode("确定",-1)])]),_:1})]),default:f.withCtx(()=>[y.value?(f.openBlock(),f.createBlock(f.unref(WS),{key:0,modelValue:S.value,"onUpdate:modelValue":j[79]||(j[79]=q=>S.value=q),class:"framework-json-editor",height:420,"navigation-bar":!0,"status-bar":!0},null,8,["modelValue"])):f.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])],64)}}}),[["__scopeId","data-v-63e69167"]]),Wme={class:"options-editor"},Hme=["onClick"],Gme={class:"opt-index"},Kme={class:"opt-summary"},Yme=qr(f.defineComponent({__name:"GlobalButtonsSlot",props:{buttons:{},selectedIndex:{}},emits:["select","remove","add"],setup(t){return(e,n)=>{const o=f.resolveComponent("el-button"),r=f.resolveComponent("el-form-item"),i=f.resolveComponent("el-input"),s=f.resolveComponent("el-option"),a=f.resolveComponent("el-select"),l=f.resolveComponent("el-switch"),c=f.resolveComponent("el-form");return t.selectedIndex!==null&&t.buttons[t.selectedIndex]?(f.openBlock(),f.createBlock(c,{key:0,size:"small","label-position":"right","label-width":"100px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(r,{label:"按钮组"},{default:f.withCtx(()=>[f.createElementVNode("div",Wme,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.buttons,(u,h)=>(f.openBlock(),f.createElementBlock("div",{key:h,class:f.normalizeClass(["option-row option-row--buttons",{"option-row--active":t.selectedIndex===h}]),onClick:p=>e.$emit("select",h)},[f.createElementVNode("span",Gme,"#"+f.toDisplayString(h+1),1),f.createElementVNode("span",Kme,f.toDisplayString(u.event||"(未命名事件)")+" / "+f.toDisplayString(u.buttonText??"按钮"),1),f.createVNode(o,{type:"danger",link:"",size:"small",onClick:f.withModifiers(p=>e.$emit("remove",h),["stop"])},{default:f.withCtx(()=>[...n[17]||(n[17]=[f.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])],10,Hme))),128)),f.createVNode(o,{type:"primary",link:"",size:"small",onClick:n[0]||(n[0]=u=>e.$emit("add"))},{default:f.withCtx(()=>[...n[18]||(n[18]=[f.createTextVNode(" + 新增按钮 ",-1)])]),_:1})])]),_:1}),f.createVNode(r,{label:"按钮事件"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex].event,"onUpdate:modelValue":n[1]||(n[1]=u=>t.buttons[t.selectedIndex].event=u),placeholder:"与业务监听一致的事件名",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex].buttonText,"onUpdate:modelValue":n[2]||(n[2]=u=>t.buttons[t.selectedIndex].buttonText=u),placeholder:"按钮文本",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(a,{modelValue:t.buttons[t.selectedIndex].type,"onUpdate:modelValue":n[3]||(n[3]=u=>t.buttons[t.selectedIndex].type=u),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(s,{label:"默认",value:"default"}),f.createVNode(s,{label:"主要",value:"primary"}),f.createVNode(s,{label:"成功",value:"success"}),f.createVNode(s,{label:"警告",value:"warning"}),f.createVNode(s,{label:"危险",value:"danger"}),f.createVNode(s,{label:"信息",value:"info"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(r,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(a,{modelValue:t.buttons[t.selectedIndex].size,"onUpdate:modelValue":n[4]||(n[4]=u=>t.buttons[t.selectedIndex].size=u),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(s,{label:"大",value:"large"}),f.createVNode(s,{label:"默认",value:"default"}),f.createVNode(s,{label:"小",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(r,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].plain,"onUpdate:modelValue":n[5]||(n[5]=u=>t.buttons[t.selectedIndex].plain=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].bg,"onUpdate:modelValue":n[6]||(n[6]=u=>t.buttons[t.selectedIndex].bg=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"链接样式"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].link,"onUpdate:modelValue":n[7]||(n[7]=u=>t.buttons[t.selectedIndex].link=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].round,"onUpdate:modelValue":n[8]||(n[8]=u=>t.buttons[t.selectedIndex].round=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].circle,"onUpdate:modelValue":n[9]||(n[9]=u=>t.buttons[t.selectedIndex].circle=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"加载中"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].loading,"onUpdate:modelValue":n[10]||(n[10]=u=>t.buttons[t.selectedIndex].loading=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"加载图标"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex]["loading-icon"],"onUpdate:modelValue":n[11]||(n[11]=u=>t.buttons[t.selectedIndex]["loading-icon"]=u),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].disabled,"onUpdate:modelValue":n[12]||(n[12]=u=>t.buttons[t.selectedIndex].disabled=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"图标"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex].icon,"onUpdate:modelValue":n[13]||(n[13]=u=>t.buttons[t.selectedIndex].icon=u),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"自动聚焦"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].autofocus,"onUpdate:modelValue":n[14]||(n[14]=u=>t.buttons[t.selectedIndex].autofocus=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"原生类型"},{default:f.withCtx(()=>[f.createVNode(a,{modelValue:t.buttons[t.selectedIndex]["native-type"],"onUpdate:modelValue":n[15]||(n[15]=u=>t.buttons[t.selectedIndex]["native-type"]=u),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(s,{label:"普通",value:"button"}),f.createVNode(s,{label:"提交",value:"submit"}),f.createVNode(s,{label:"重置",value:"reset"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(r,{label:"自动插入空格"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex]["auto-insert-space"],"onUpdate:modelValue":n[16]||(n[16]=u=>t.buttons[t.selectedIndex]["auto-insert-space"]=u)},null,8,["modelValue"])]),_:1})]),_:1})):f.createCommentVNode("",!0)}}}),[["__scopeId","data-v-50e5148e"]]),Xme="^1(?:3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$",Jme="^0\\d{2,3}-?\\d{7,8}(-\\d{1,6})?$",Qme="^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",Zme="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",qme="^\\d{6}$",Fg={mobile:"请填写正确手机号",landline:"请填写正确固话",idCard:"请填写正确身份证号",email:"请填写正确邮箱",postal:"请填写正确邮政编码"},d5={required:"必填",mobile:"手机号",landline:"固话",idCard:"身份证号",email:"邮箱",postal:"邮政编码"};function K2(t){return t==="required"||t==="mobile"||t==="landline"||t==="idCard"||t==="email"||t==="postal"}function $me(t){switch(t){case"mobile":return Xme;case"landline":return Jme;case"idCard":return Qme;case"email":return Zme;case"postal":return qme;default:return"^.*$"}}const ege={class:"fi-rules-editor"},tge={key:0,class:"fi-rules-list"},nge=["title"],oge={class:"fi-rules-dialog-body"},rge=f.defineComponent({name:"FormItemRulesEditor"}),ige=f.defineComponent({...rge,props:{formItem:{}},setup(t){const e=t,n=f.ref(!1),o=f.ref(""),r=f.ref(""),i=f.computed(()=>u(o.value));function s(){o.value="",r.value=""}function a(v){const b=v.ruleKind;return b&&K2(b)?d5[b]:v.required===!0?"必填":"规则"}function l(){const v=e.formItem.rules||[];e.formItem.required=v.some(b=>b.required===!0)}function c(){return`请填写${(e.formItem.label||"").trim()||"该项"}`}function u(v){return v==="required"?c():v==="mobile"?Fg.mobile:v==="landline"?Fg.landline:v==="idCard"?Fg.idCard:v==="email"?Fg.email:v==="postal"?Fg.postal:""}function h(v){const b=e.formItem.rules||[];return v==="required"?b.some(y=>y.required===!0||y.ruleKind==="required"):b.some(y=>y.ruleKind===v)}function p(){s(),n.value=!0}function m(){const v=o.value;if(!v||!K2(v)){n.value=!1;return}if(e.formItem.rules||(e.formItem.rules=[]),h(v)){kt.ElMessage.warning(`已存在「${d5[v]}」规则,请勿重复添加`),n.value=!1;return}const b=(r.value||"").trim()||u(v);if(v==="required")e.formItem.rules.push({required:!0,message:b,trigger:"blur",ruleKind:"required"}),l();else{const y=v;e.formItem.rules.push({pattern:$me(y),message:b,trigger:"blur",ruleKind:v})}n.value=!1}function g(v){var b,y;(b=e.formItem.rules)==null||b.splice(v,1),((y=e.formItem.rules)==null?void 0:y.length)===0&&delete e.formItem.rules,l()}return f.watch(()=>e.formItem.rules,()=>l(),{deep:!0}),f.watch(o,v=>{v&&K2(v)?r.value=u(v):r.value=""}),l(),(v,b)=>{const y=f.resolveComponent("el-tag"),w=f.resolveComponent("el-button"),S=f.resolveComponent("el-option"),C=f.resolveComponent("el-select"),x=f.resolveComponent("el-input"),k=f.resolveComponent("el-dialog"),O=f.resolveComponent("el-form-item");return f.openBlock(),f.createBlock(O,{label:"校验规则"},{default:f.withCtx(()=>[f.createElementVNode("div",ege,[(t.formItem.rules||[]).length?(f.openBlock(),f.createElementBlock("div",tge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.formItem.rules,(A,T)=>(f.openBlock(),f.createElementBlock("div",{key:T,class:"fi-rules-row"},[f.createVNode(y,{size:"small",type:"info"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(a(A)),1)]),_:2},1024),f.createElementVNode("span",{class:"fi-rules-msg",title:A.message},f.toDisplayString(A.message||"—"),9,nge),f.createVNode(w,{type:"danger",link:"",size:"small",onClick:N=>g(T)},{default:f.withCtx(()=>[...b[4]||(b[4]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128))])):f.createCommentVNode("",!0),f.createVNode(w,{type:"primary",link:"",size:"small",onClick:p},{default:f.withCtx(()=>[...b[5]||(b[5]=[f.createTextVNode("+ 添加规则",-1)])]),_:1})]),f.createVNode(k,{modelValue:n.value,"onUpdate:modelValue":b[3]||(b[3]=A=>n.value=A),title:"添加校验规则",width:"420px","append-to-body":"","destroy-on-close":"",onClosed:s},{footer:f.withCtx(()=>[f.createVNode(w,{onClick:b[2]||(b[2]=A=>n.value=!1)},{default:f.withCtx(()=>[...b[8]||(b[8]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(w,{type:"primary",disabled:!o.value,onClick:m},{default:f.withCtx(()=>[...b[9]||(b[9]=[f.createTextVNode("确定",-1)])]),_:1},8,["disabled"])]),default:f.withCtx(()=>[f.createElementVNode("div",oge,[b[7]||(b[7]=f.createElementVNode("div",{class:"fi-rules-dialog-hint"},"请选择校验类型",-1)),f.createVNode(C,{modelValue:o.value,"onUpdate:modelValue":b[0]||(b[0]=A=>o.value=A),placeholder:"请选择校验类型",clearable:"",class:"fi-rules-type-select"},{default:f.withCtx(()=>[f.createVNode(S,{label:"必填",value:"required"}),f.createVNode(S,{label:"手机号",value:"mobile"}),f.createVNode(S,{label:"固话",value:"landline"}),f.createVNode(S,{label:"身份证号",value:"idCard"}),f.createVNode(S,{label:"邮箱",value:"email"}),f.createVNode(S,{label:"邮政编码",value:"postal"})]),_:1},8,["modelValue"]),o.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[b[6]||(b[6]=f.createElementVNode("div",{class:"fi-rules-dialog-hint fi-rules-msg-label"},"错误提示",-1)),f.createVNode(x,{modelValue:r.value,"onUpdate:modelValue":b[1]||(b[1]=A=>r.value=A),type:"textarea",rows:2,placeholder:i.value,maxlength:"200","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"])],64)):f.createCommentVNode("",!0)])]),_:1},8,["modelValue"])]),_:1})}}}),h5=qr(ige,[["__scopeId","data-v-1dd5eb69"]]);function sge(t){const e=t==null?void 0:t.type;return(t==null?void 0:t.nodeKind)==="slot"||e==="groupSlot"||e==="formSlot"?[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]},{name:"slotConfig",title:"插槽",defaultOpen:!0,fields:[]}]:e==="globalButton"?[{name:"globalButtons",title:"功能按钮",defaultOpen:!0,visible:()=>!0,fields:[]}]:["flmInput","flmSelect","flmInputNumber","flmDatePicker","flmTimePicker","flmTimeSelect","flmUpload","flmCascader","flmCheckbox","flmColorPicker","flmRadio","flmRate","flmRead","flmTime","flmSlider","flmSwitch","flmTransfer","flmButton","flmDialog","flmDrawer","flmPagination","flmCustom"].includes(e||"")?[{name:"baseSettings",title:"基础设置",defaultOpen:!0,fields:[]},{name:"detailSettings",title:"详细设置",defaultOpen:!0,fields:[]}]:[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]}]}function age(t,e){function n(l){return!l||typeof l!="object"?{}:{...l}}function o(){const l=[];t.value.forEach(u=>{if(u.type!=="group")return;if(!(typeof u.i=="string"?u.i.trim():"")){const p=u.label||u.i;l.push(`分组「${p}」的标识为空,无法生成 groupProp`)}});const c=u=>{var p;if(u.type==="group"||u.type==="flmForm"||u.type==="flmSubForm"||u.nodeKind==="group"||u.nodeKind==="form"||u.nodeKind==="subForm")return;if(!(typeof u.i=="string"?u.i.trim():"")){const m=((p=u.formItem)==null?void 0:p.label)||u.label||u.i;l.push(`控件「${m}」的标识为空,无法生成 prop`)}};return t.value.forEach(u=>{var h;(h=u.children)!=null&&h.length&&u.children.forEach(p=>{var m;(m=p.children)!=null&&m.length&&p.children.forEach(g=>c(g))})}),l}function r(l,c,u){const h=l==null?void 0:l.prop;return h!=null&&String(h).trim()!==""?String(h):`ctrl_${c}_${u}_${Date.now()}`}function i(l){const c=(v,b)=>{const y=v!=null&&String(v).trim()!==""?String(v).trim():"",w=b!=null&&String(b).trim()!==""?String(b).trim():"";return y||w},u=c(l.customComponentName,l.custom_component_name),h=c(l.customKey,l.custom_key),p=l.controlType??l.control_type,m=p!=null&&String(p).trim()!==""?String(p).trim():"flmInput",g=l.customAttrFields??l.custom_attr_fields;return{customComponentName:u,customKey:h,controlType:m,customAttrFieldsRaw:g}}function s(){const l=[],c=[...e.value];return t.value.forEach(u=>{var y;if(u.type!=="group"||!u.children||!u.children.length)return;const h=Dl(u.children,w=>w.nodeKind==="form"||w.nodeKind==="subForm");if(!h)return;const p=h.nodeKind==="subForm",m=h.config||{},g=(h.children||[]).map(w=>{var x;const S=w.formItem||{},C={prop:S.prop||w.i,label:S.label??w.label,required:S.required===!0||Array.isArray(S.rules)&&S.rules.some(k=>(k==null?void 0:k.required)===!0),rules:S.rules,"show-message":S.showMessage,"inline-message":S.inlineMessage,size:S.size,gridX:w.x,gridY:w.y,gridW:w.w,gridH:w.h,controlType:w.type==="flmCustom"?w.customComponentName||"flmCustom":w.type,controlConfig:n(w.config)};return w.type==="flmCustom"&&(w.customKey&&(C.customKey=w.customKey),w.customComponentName&&(C.customComponentName=w.customComponentName),(x=w.customAttrFields)!=null&&x.length&&(C.customAttrFields=Or(w.customAttrFields))),S.labelWidth!=null&&(C["label-width"]=S.labelWidth),C}),v=Tp(m||{},["buttons","items"]),b={id:u.i,title:u.label||"表单分组",type:p?"subForm":"form",groupName:u.label,groupProp:((y=u.config)==null?void 0:y.groupProp)??u.i,items:g,...v};g.length&&b.gridColumns==null&&(b.gridColumns=24),l.push(b)}),{groups:l,buttons:c}}function a(l){const c=[],u=l==null?void 0:l.groups;return(Array.isArray(u)?u:[]).forEach((p,m)=>{const g=(p==null?void 0:p.id)!=null&&String(p.id).trim()!==""?String(p.id):(p==null?void 0:p.groupProp)!=null&&String(p.groupProp).trim()!==""?String(p.groupProp):`group_${m}`,v=p.items,b=Tp(p,["id","title","type","groupName","groupProp","items","buttons"]),y={i:`${g}_form`,x:0,y:0,w:24,h:1,type:p.type==="subForm"?"flmSubForm":"flmForm",label:p.type==="subForm"?"子表单":"表单",nodeKind:p.type==="subForm"?"subForm":"form",config:{...b,items:[]},children:[]},w=v??[];y.children=w.map((C,x)=>{const k={label:C.label,prop:C.prop,required:C.required===!0||Array.isArray(C.rules)&&C.rules.some(j=>(j==null?void 0:j.required)===!0),rules:C.rules,showMessage:C["show-message"],inlineMessage:C["inline-message"],size:C.size};C["label-width"]!=null&&(k.labelWidth=C["label-width"]);const O=r(C,g,x),A=i(C),T=A.customComponentName?"flmCustom":Dpe.has(A.controlType)?A.controlType:"flmCustom",N={i:O,x:C.gridX??0,y:C.gridY??0,w:C.gridW??8,h:C.gridH??1,type:T,label:C.label,config:(C.controlConfig??C.control_config)||{},formItem:{...k,prop:O},nodeKind:"control"};if(T==="flmCustom"){A.customKey&&(N.customKey=A.customKey);const j=A.customComponentName||A.controlType;j&&(N.customComponentName=j);const I=Array.isArray(A.customAttrFieldsRaw)?A.customAttrFieldsRaw:[];I.length&&(N.customAttrFields=Or(I))}return N});const S={i:g,x:0,y:m,w:24,h:1,type:"group",label:p.title||p.groupName||"分组",config:{groupProp:p.groupProp},nodeKind:"group",children:[y]};S.groupProp=p.groupProp,c.push(S)}),c}return{buildFrameworkConfig:s,validateLayoutBeforeSave:o,parseConfigToLayout:a,snapshotControlConfig:n}}let p5=0;function Cs(){return`widget_${++p5}_${Date.now()}`}function Y2(){return`group_${++p5}_${Date.now()}`}const ap={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}};function lge(t,e,n,o){function r(p){var v;if(!p||!((v=p.children)!=null&&v.length))return"form";const g=p.children[0].nodeKind;return g==="subForm"?"subForm":g==="slot"?"slot":"form"}function i(p){const m={x:0,y:0,w:p==="slot"?es:8,h:1};if(p==="slot")return{i:Cs(),x:m.x,y:m.y,w:m.w,h:1,type:"groupSlot",label:"分组插槽",nodeKind:"slot",config:{slotName:""}};if(p==="subForm")return{i:Cs(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmSubForm",label:"子表单",nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};const g=c0("flmForm"),v=Tp(g||{},["buttons"]);return{i:Cs(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmForm",label:"表单",nodeKind:"form",config:v,children:[]}}function s(p,m){p.children=[i(m)],n.value=null}function a(p,m){var v;const g=(v=p.children)==null?void 0:v[0];if(!g){s(p,m);return}if(g.nodeKind==="slot"){s(p,m);return}if(g.nodeKind=m,g.type=m==="subForm"?"flmSubForm":"flmForm",g.label=m==="subForm"?"子表单":"表单",Array.isArray(g.children)||(g.children=[]),(!g.config||typeof g.config!="object")&&(g.config={}),m==="subForm"){const b=g.config;Array.isArray(b.items)||(b.items=[]),b.gridColumns==null&&(b.gridColumns=24),b.addButtonText==null&&(b.addButtonText="新增一行"),b.defaultGenerateOne==null&&(b.defaultGenerateOne=!1)}}function l(p,m){if(!(!p||p.type!=="group"||r(p)===m)){if(m==="slot"){kt.ElMessageBox.confirm("切换至插槽将清空当前分组内容,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{s(p,m)}).catch(()=>{});return}a(p,m)}}function c(p){const m=s0(t.value),g=Y2(),v=i(p),b={i:g,x:m.x,y:m.y,w:m.w,h:m.h,type:"group",label:"分组",config:{},children:[v],nodeKind:"group"};t.value.push(b),e.value=g,n.value=null}function u(p){if(!p)return null;const m=p.nodeKind==="form",g=p.nodeKind==="subForm";if(!m&&!g)return null;let v=p.config||void 0;return v?(!Array.isArray(v.buttons)||!v.buttons.length)&&(v.buttons=[{...ap.submit},{...ap.cancel},{...ap.reset}]):(v={items:[],gridColumns:24},g&&(v.addButtonText="新增一行",v.defaultGenerateOne=!1),v.buttons=[{...ap.submit},{...ap.cancel},{...ap.reset}],p.config=v),v??null}const h=f.computed(()=>{var b;const p=e.value;if(!p)return null;const m=t.value.find(y=>y.i===p);if(!m||m.nodeKind!=="group"||!((b=m.children)!=null&&b.length))return null;const g=m.children[0];return u(g)??null});return{getGroupChildType:r,setGroupChildType:l,createGroupChildByType:i,doSetGroupChildType:s,doSetGroupChildTypeKeepData:a,addGroupByContainerType:c,formConfigForForm:u,selectedGroupFormConfig:h}}function cge(t,e,n,o,r,i,s,a){function l(){const S=a.validateLayoutBeforeSave();if(S.length){kt.ElMessage.error(S[0]),console.error("[表单设计] 预览校验失败:",S);return}i.value=Or(a.buildFrameworkConfig()),s.value=!0}function c(){const S=a.validateLayoutBeforeSave();if(S.length){kt.ElMessage.error(S[0]),console.error("[表单设计] 保存校验失败:",S);return}const C=a.buildFrameworkConfig();console.log("[FlameFramework] dynamic form config:",C),a.onSave(C)}function u(){kt.ElMessageBox.confirm("是否重置表单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value=a.getDefaultLayout(),r.value=[{...a.DEFAULT_BUTTONS.submit},{...a.DEFAULT_BUTTONS.cancel},{...a.DEFAULT_BUTTONS.reset}],e.value=null,o.value=null,n.value=null,kt.ElMessage.success("已重置"),a.onReset()}).catch(()=>{})}function h(S){const C=a.getNextGridPosition(t.value),x={...Or(S),i:Cs(),x:C.x,y:C.y,w:C.w,h:C.h};x.children&&(x.children=x.children.map(k=>({...k,i:Cs()}))),t.value.push(x),e.value=x.i,o.value=null,n.value=null}function p(S){console.log("%c [ item ]-1315","font-size:13px; background:pink; color:#bf2c9f;",S),kt.ElMessageBox.confirm("确认删除当前分组(及内部内容)吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const C=Cv(t.value,{i:S.i});C>=0&&t.value.splice(C,1),e.value===S.i&&(e.value=null),n.value=null}).catch(()=>{})}function m(S,C){S.children||(S.children=[]);const x=a.getNextInnerGridPosition(S,C.w,C.h),k={...Or(C),i:Cs(),x:x.x,y:x.y,w:C.w,h:C.h};S.children.push(k),a.selectFormChild(S,k)}function g(S,C){kt.ElMessageBox.confirm("确认删除当前子节点吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{var O;const x=S.children;if(!x)return;const k=Cv(x,{i:C.i});k>=0&&x.splice(k,1),((O=n.value)==null?void 0:O.childId)===C.i&&(n.value=null)}).catch(()=>{})}function v(S){S.nodeKind!=="form"&&S.nodeKind!=="subForm"||(a.compactInnerFormLayout(S),kt.ElMessage.success("已按从左到右、自上而下重新排布"))}function b(S){o.value=S,e.value=null,n.value=null}function y(){r.value.push({event:`custom_${Date.now()}`,buttonText:"自定义",type:"default"}),o.value=r.value.length-1}function w(S){S<0||S>=r.value.length||(r.value.splice(S,1),o.value===S?o.value=r.value.length?Math.min(S,r.value.length-1):null:o.value!=null&&o.value>S&&o.value--)}return{onOpenPreview:l,onSaveConfig:c,onResetConfig:u,onCopyWidget:h,onDeleteWidget:p,onCopyFormChild:m,onDeleteFormChild:g,onAutoCompactInner:v,onSelectGlobalButton:b,addGlobalButton:y,removeGlobalButton:w}}function uge(t){const e=f.computed(()=>{const E=t.value;return(E==null?void 0:E.type)==="flmInput"&&E.config?E.config:void 0}),n=f.computed(()=>{const E=t.value;return(E==null?void 0:E.type)==="flmSelect"&&E.config?E.config:void 0}),o=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmInputNumber"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),r=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmDatePicker"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),i=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTimePicker"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),s=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTimeSelect"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),a=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmCascader"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),l=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmCheckbox"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),c=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmColorPicker"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),u=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmRadio"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),h=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmRate"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),p=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmSlider"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),m=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmSwitch"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),g=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTransfer"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),v=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmButton"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),b=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmDialog"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),y=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmDrawer"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),w=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmPagination"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),S=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmRead"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),C=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmUpload"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),x=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTime"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),k=f.computed({get(){const E=C.value;if(!E)return[];const P=E.accept;return P==null||P===""?[]:typeof P!="string"?[]:P.split(/[,,]/).map(D=>D.trim()).filter(Boolean)},set(E){const P=C.value;P&&(P.accept=Array.isArray(E)&&E.length?E.join(","):"")}}),O=[{label:"全部图片(通配)",value:"image/*"},{label:"全部视频(通配)",value:"video/*"},{label:"全部音频(通配)",value:"audio/*"},{label:"JPEG 图片",value:"image/jpeg"},{label:"PNG 图片",value:"image/png"},{label:"GIF 图片",value:"image/gif"},{label:"WebP 图片",value:"image/webp"},{label:"SVG 图片",value:"image/svg+xml"},{label:"BMP 图片",value:"image/bmp"},{label:"ICO 图标",value:"image/x-icon"},{label:"TIFF 图片",value:"image/tiff"},{label:"MP4 视频",value:"video/mp4"},{label:"WebM 视频",value:"video/webm"},{label:"OGG 视频",value:"video/ogg"},{label:"QuickTime 视频",value:"video/quicktime"},{label:"MP3 音频",value:"audio/mpeg"},{label:"WAV 音频",value:"audio/wav"},{label:"OGG 音频",value:"audio/ogg"},{label:"AAC 音频",value:"audio/aac"},{label:"FLAC 音频",value:"audio/flac"},{label:"PDF 文档",value:"application/pdf"},{label:"Word(.doc)",value:"application/msword"},{label:"Word(.docx)",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"Excel(.xls)",value:"application/vnd.ms-excel"},{label:"Excel(.xlsx)",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"PowerPoint(.ppt)",value:"application/vnd.ms-powerpoint"},{label:"PowerPoint(.pptx)",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"纯文本",value:"text/plain"},{label:"CSV",value:"text/csv"},{label:"HTML",value:"text/html"},{label:"JSON",value:"application/json"},{label:"XML",value:"application/xml"},{label:"ZIP 压缩包",value:"application/zip"},{label:"RAR 压缩包",value:"application/x-rar-compressed"},{label:"7Z 压缩包",value:"application/x-7z-compressed"},{label:"扩展名:.pdf",value:".pdf"},{label:"扩展名:.doc",value:".doc"},{label:"扩展名:.docx",value:".docx"},{label:"扩展名:.xls",value:".xls"},{label:"扩展名:.xlsx",value:".xlsx"},{label:"扩展名:.ppt",value:".ppt"},{label:"扩展名:.pptx",value:".pptx"},{label:"扩展名:.txt",value:".txt"},{label:"扩展名:.csv",value:".csv"},{label:"扩展名:.zip",value:".zip"},{label:"扩展名:.rar",value:".rar"},{label:"扩展名:.7z",value:".7z"},{label:"扩展名:.jpg",value:".jpg"},{label:"扩展名:.jpeg",value:".jpeg"}];function A(E){const P=x.value;if(!P)return;const D=E;if(D==="date")P.format="YYYY-MM-DD";else if(D==="time")P.format="HH:mm:ss";else{const R=P.format&&String(P.format).trim()||"";(!R||R==="YYYY-MM-DD"||R==="HH:mm:ss")&&(P.format="YYYY-MM-DD HH:mm:ss")}}const T=f.computed(()=>{var E;return((E=t.value)==null?void 0:E.config)??void 0}),N=f.computed(()=>{var E;return!!((E=t.value)!=null&&E.type)&&Ipe.includes(t.value.type)}),j=f.computed(()=>{var E;return!!((E=t.value)!=null&&E.type)&&t.value.type!=="flmRead"&&t.value.type!=="flmTime"}),I=f.computed(()=>{var E;return!!((E=t.value)!=null&&E.type)&&Rpe.includes(t.value.type)});return{inputConfig:e,selectConfig:n,inputNumberConfig:o,datePickerConfig:r,timePickerConfig:i,timeSelectConfig:s,cascaderConfig:a,checkboxConfig:l,colorPickerConfig:c,radioConfig:u,rateConfig:h,sliderConfig:p,switchConfig:m,transferConfig:g,buttonConfig:v,dialogConfig:b,drawerConfig:y,paginationConfig:w,readConfig:S,uploadConfig:C,uploadAcceptSelection:k,uploadAcceptTypeOptions:O,timeConfig:x,onFlmTimePresetChange:A,controlConfig:T,controlHasPlaceholder:N,controlHasDisabled:j,controlHasClearable:I}}function fge(t,e,n,o,r){const i=f.computed(()=>{if(o.value!=null){const u=o.value,h=e.value[u];return h?{i:`global_btn_${u}`,type:"globalButton",nodeKind:"control",config:h}:null}if(r.value){const{formId:u,childId:h}=r.value,p=Dl(t.value,{i:u});if(!p||!p.children)return null;for(const m of p.children){if(!m.children)continue;const g=Dl(m.children,{i:h});if(g)return g}return null}if(!n.value)return null;const l=n.value,c=Dl(t.value,{i:l});if(c)return c;for(const u of t.value){if(!u.children)continue;const h=Dl(u.children,{i:l});if(h)return h}return null});f.watch(i,l=>{console.log("[FlameFramework] selectedItem changed:",l),l&&l.type&&l.type!=="flmForm"&&!l.formItem&&(l.formItem={...H2(l.type),label:l.label??l0(l.type)})},{immediate:!0});function s(l,c){o.value=null,n.value=l.i,r.value={formId:l.i,childId:c.i}}function a(l,c){var h,p,m;const u=l.target;(h=u.closest)!=null&&h.call(u,".module-header-actions")||(p=u.closest)!=null&&p.call(u,".module-child-delete")||(m=u.closest)!=null&&m.call(u,".form-inner-control-wrap")||(n.value=c.i,o.value=null,r.value=null,l.stopPropagation())}return{selectedItem:i,selectFormChild:s,onGridWidgetCapture:a}}function m5(t,e){var n;if(t!=null&&t.length)for(const o of t)e(o),(n=o.children)!=null&&n.length&&m5(o.children,e)}function g5(t){if("kind"in t&&t.kind==="custom"){const n=t;return{type:"flmCustom",kind:"custom",id:Cs(),label:n.label,defaultConfig:n.defaultConfig,defaultFormItem:n.defaultFormItem,customKey:n.key,customComponentName:n.componentName,customAttrFields:n.attrFields?Or(n.attrFields):[]}}const e=t;return{type:e.type,kind:"basic",id:Cs(),label:e.label,defaultConfig:e.defaultConfig,defaultFormItem:e.defaultFormItem}}function dge(t,e,n,o,r,i,s,a,l,c,u){function h(k){for(const O of a.value)for(const A of O.items)if(A.kind==="custom"&&A.key===k)return A}function p(k){for(const O of a.value)for(const A of O.items)if(A.kind==="custom"&&A.componentName===k)return A}function m(k){k.forEach(O=>{O.type!=="group"||!O.children||O.children.forEach(A=>{A.nodeKind!=="form"&&A.nodeKind!=="subForm"||m5(A.children,T=>{var N,j,I;if(T.type==="flmCustom"&&!((N=T.customAttrFields)!=null&&N.length)){if(T.customKey){const E=h(T.customKey);(j=E==null?void 0:E.attrFields)!=null&&j.length&&(T.customAttrFields=Or(E.attrFields));return}if(T.customComponentName){const E=p(T.customComponentName);E&&(T.customKey=E.key,(I=E.attrFields)!=null&&I.length&&(T.customAttrFields=Or(E.attrFields)))}}})})})}function g(k,O){var T;const A=Dl(t.value,{i:k});if(!(A!=null&&A.children))return null;for(const N of A.children)if(!(N.nodeKind==="slot"||N.type==="groupSlot")&&(T=N.children)!=null&&T.some(j=>j.i===O))return N;return null}function v(k){var A;const O=Dl(t.value,{i:k});if(O)return O;for(const T of t.value)if((A=T.children)!=null&&A.some(N=>N.i===k))return T;return null}function b(){const k=[...r.value];r.value=[];let O=null;k.forEach(A=>{if(A.type!=="group")return;const T=s0(t.value),N=Y2(),j={i:N,x:T.x,y:T.y,w:T.w,h:T.h,type:"group",label:"分组",config:{},children:[],nodeKind:"group"};t.value.push(j),O=N}),O&&(o.value=null,n.value=null,e.value=O)}function y(k,O,A){if(O.length){if(k.children||(k.children=[]),k.nodeKind==="group"){let T=null;const N=k.children.some(I=>I.nodeKind==="subForm"),j=k.children.some(I=>I.nodeKind==="form");O.forEach(I=>{if(I.type!=="formSlot"){if(I.type==="groupSlot"){const E=Bg(k,24,1),P={i:Cs(),x:E.x,y:E.y,w:24,h:1,type:"groupSlot",label:"分组插槽",nodeKind:"slot",config:{slotName:""}};k.children.push(P),T=P;return}if(I.type==="subForm"){if(j||N)return;const E=Bg(k,24,1),P={i:Cs(),x:E.x,y:E.y,w:E.w,h:E.h,type:"flmSubForm",label:"子表单",nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};k.children.push(P),T=P;return}if(I.type==="form"){if(j||N)return;const E=Bg(k,24,1),P=c0("flmForm"),D=Tp(P||{},["buttons"]),R={i:Cs(),x:E.x,y:E.y,w:E.w,h:E.h,type:"flmForm",label:"表单",nodeKind:"form",config:D,children:[]};k.children.push(R),T=R;return}}}),T&&(o.value=null,n.value=null,e.value=T.i);return}if(k.nodeKind==="form"||k.nodeKind==="subForm"){const T=(j,I)=>{const E=c5(k,A.gridEl,A.clientX,A.clientY,es,u5,W2,j,I,"preview");return Npe(k,E,es),E};let N=null;if(O.forEach(j=>{var G;if(j.type==="group"||j.type==="subForm"||j.type==="form"||j.type==="groupSlot")return;if(j.type==="formSlot"){const te=T(24,1),K={i:Cs(),x:te.x,y:te.y,w:te.w,h:1,type:"formSlot",label:"表单插槽",nodeKind:"slot",config:{slotName:""}};k.children||(k.children=[]),k.children.push(K),N=K;return}if(j.type==="flmCustom"||j.kind==="custom"){const te=Vg("flmCustom"),K=T(te.w,te.h),q=G2("flmCustom"),F=j.defaultConfig?{...q,...j.defaultConfig}:q,oe=H2("flmCustom"),ve=j.defaultFormItem?{...oe,...j.defaultFormItem}:oe,Ee={i:Cs(),x:K.x,y:K.y,w:te.w,h:te.h,type:"flmCustom",label:j.label||j.customComponentName||"业务组件",config:F,formItem:ve,nodeKind:"control",customKey:j.customKey,customComponentName:j.customComponentName,customAttrFields:(G=j.customAttrFields)!=null&&G.length?Or(j.customAttrFields):[]};k.children||(k.children=[]),k.children.push(Ee),N=Ee;return}const I=j.type,E=Vg(I),P=T(E.w,E.h),D=G2(I),R=j.defaultConfig?{...D,...j.defaultConfig}:D,z=H2(I),U=j.defaultFormItem?{...z,...j.defaultFormItem}:z,_={i:Cs(),x:P.x,y:P.y,w:E.w,h:E.h,type:I,label:j.label||l0(I),config:R,formItem:U,nodeKind:"control"};k.children||(k.children=[]),k.children.push(_),N=_}),N){o.value=null;const j=v(k.i);j?l(j,N):(e.value=k.i,n.value=null)}}}}function w(k,O,A,T,N){const j=l5({to:A,clientX:Number.isFinite(T)?T:void 0,clientY:Number.isFinite(N)?N:void 0});y(k,[O],j)}function S(k,O){!O.children||!k||(k.forEach(A=>{const T=Dl(O.children,{i:A.i});T&&(T.x=A.x,T.y=A.y,T.w=A.w,T.h=A.h)}),a5(O.children)&&a0(O))}function C(){const k=[...s.value];s.value=[];for(const O of k)(O.type==="form"||O.type==="subForm"||O.type==="groupSlot")&&u(O.type==="groupSlot"?"slot":O.type)}function x(k){const O=t.value[k];if(!O||O.nodeKind==="group")return;const A=O.type,T=A==="groupSlot"?"slot":A==="subForm"?"subForm":"form";t.value.splice(k,1);const N=Y2(),j=c(T),I=s0(t.value),E={i:N,x:I.x,y:I.y,w:I.w,h:I.h,type:"group",label:"分组",config:{},children:[j],nodeKind:"group"};t.value.splice(k,0,E),o.value=null,n.value=null,e.value=N}return{onDropFromPalette:b,onInteractDropToFormInner:w,onContainerDrop:C,onDropContainerInRoot:x,onInnerLayoutUpdated:S,findFormContainerForInnerControl:g,findGroupByNodeId:v,findCustomPaletteByKey:h,findCustomPaletteByComponentName:p,hydrateLayoutCustomFields:m}}const Jo={init:hge,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function lp(){}function hge(t){const e=t;Jo.document=e.document,Jo.DocumentFragment=e.DocumentFragment||lp,Jo.SVGElement=e.SVGElement||lp,Jo.SVGSVGElement=e.SVGSVGElement||lp,Jo.SVGElementInstance=e.SVGElementInstance||lp,Jo.Element=e.Element||lp,Jo.HTMLElement=e.HTMLElement||Jo.Element,Jo.Event=e.Event,Jo.Touch=e.Touch||lp,Jo.PointerEvent=e.PointerEvent||e.MSPointerEvent}var v5=t=>!!(t&&t.Window)&&t instanceof t.Window;let b5,ad;function y5(t){b5=t;const e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),ad=t}typeof window<"u"&&window&&y5(window);function bc(t){return v5(t)?t:(t.ownerDocument||t).defaultView||ad.window}const pge=t=>t===ad||v5(t),mge=t=>u0(t)&&t.nodeType===11,u0=t=>!!t&&typeof t=="object",x5=t=>typeof t=="function";var qe={window:pge,docFrag:mge,object:u0,func:x5,number:t=>typeof t=="number",bool:t=>typeof t=="boolean",string:t=>typeof t=="string",element:t=>{if(!t||typeof t!="object")return!1;const e=bc(t)||ad;return/object|function/.test(typeof Element)?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:t=>u0(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString()),array:t=>u0(t)&&typeof t.length<"u"&&x5(t.splice)};const zr={init:gge,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function gge(t){const e=Jo.Element,n=t.navigator||{};zr.supportsTouch="ontouchstart"in t||qe.func(t.DocumentTouch)&&Jo.document instanceof t.DocumentTouch,zr.supportsPointerEvent=n.pointerEnabled!==!1&&!!Jo.PointerEvent,zr.isIOS=/iP(hone|od|ad)/.test(n.platform),zr.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),zr.isIe9=/MSIE 9/.test(n.userAgent),zr.isOperaMobile=n.appName==="Opera"&&zr.supportsTouch&&/Presto/.test(n.userAgent),zr.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",zr.pEventTypes=zr.supportsPointerEvent?Jo.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,zr.wheelEvent=Jo.document&&"onmousewheel"in Jo.document?"mousewheel":"wheel"}const w5=(t,e)=>{for(const n of e)t.push(n);return t},C5=t=>w5([],t),zg=(t,e)=>{for(let n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},f0=(t,e)=>t[zg(t,e)];function d0(t){const e={};for(const n in t){const o=t[n];qe.plainObject(o)?e[n]=d0(o):qe.array(o)?e[n]=C5(o):e[n]=o}return e}function ts(t,e){for(const o in e)t[o]=e[o];return t}let k5=0,yc,ld;function vge(t){if(yc=t.requestAnimationFrame,ld=t.cancelAnimationFrame,!yc){const e=["ms","moz","webkit","o"];for(const n of e)yc=t[`${n}RequestAnimationFrame`],ld=t[`${n}CancelAnimationFrame`]||t[`${n}CancelRequestAnimationFrame`]}yc=yc&&yc.bind(t),ld=ld&&ld.bind(t),yc||(yc=e=>{const n=Date.now(),o=Math.max(0,16-(n-k5)),r=t.setTimeout(()=>{e(n+o)},o);return k5=n+o,r},ld=e=>clearTimeout(e))}var cp={request:t=>yc(t),cancel:t=>ld(t),init:vge};function cd(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r=>!0,o=arguments.length>3?arguments[3]:void 0;if(o=o||{},qe.string(t)&&t.search(" ")!==-1&&(t=S5(t)),qe.array(t))return t.forEach(r=>cd(r,e,n,o)),o;if(qe.object(t)&&(e=t,t=""),qe.func(e)&&n(t))o[t]=o[t]||[],o[t].push(e);else if(qe.array(e))for(const r of e)cd(t,r,n,o);else if(qe.object(e))for(const r in e){const i=S5(r).map(s=>`${t}${s}`);cd(i,e[r],n,o)}return o}function S5(t){return t.trim().split(/ +/)}function j5(t,e){for(const n of e){if(t.immediatePropagationStopped)break;n(t)}}class E5{constructor(e){this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ts({},e||{})}fire(e){let n;const o=this.global;(n=this.types[e.type])&&j5(e,n),!e.propagationStopped&&o&&(n=o[e.type])&&j5(e,n)}on(e,n){const o=cd(e,n);for(e in o)this.types[e]=w5(this.types[e]||[],o[e])}off(e,n){const o=cd(e,n);for(e in o){const r=this.types[e];if(!(!r||!r.length))for(const i of o[e]){const s=r.indexOf(i);s!==-1&&r.splice(s,1)}}}getRect(e){return null}}function ud(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function O5(t,e){for(;qe.element(t);){if(Pu(t,e))return t;t=fd(t)}return null}function fd(t){let e=t.parentNode;if(qe.docFrag(e)){for(;(e=e.host)&&qe.docFrag(e););return e}return e}function Pu(t,e){return ad!==b5&&(e=e.replace(/\/deep\//g," ")),t[zr.prefixedMatchesSelector](e)}const X2=t=>t.parentNode||t.host;function bge(t){let e=[],n;for(let o=0;o<t.length;o++){const r=t[o],i=t[n];if(!r||o===n)continue;if(!i){n=o;continue}const s=X2(r),a=X2(i);if(s===r.ownerDocument)continue;if(a===r.ownerDocument){n=o;continue}if(s===a){yge(r,i)&&(n=o);continue}e=e.length?e:T5(i);let l;if(i instanceof Jo.HTMLElement&&r instanceof Jo.SVGElement&&!(r instanceof Jo.SVGSVGElement)){if(r===a)continue;l=r.ownerSVGElement}else l=r;const c=T5(l,i.ownerDocument);let u=0;for(;c[u]&&c[u]===e[u];)u++;const h=[c[u-1],c[u],e[u]];if(h[0]){let p=h[0].lastChild;for(;p;){if(p===h[1]){n=o,e=c;break}else if(p===h[2])break;p=p.previousSibling}}}return n}function T5(t,e){const n=[];let o=t,r;for(;(r=X2(o))&&o!==e&&r!==o.ownerDocument;)n.unshift(o),o=r;return n}function yge(t,e){const n=parseInt(bc(t).getComputedStyle(t).zIndex,10)||0,o=parseInt(bc(e).getComputedStyle(e).zIndex,10)||0;return n>=o}function A5(t,e,n){for(;qe.element(t);){if(Pu(t,e))return!0;if(t=fd(t),t===n)return Pu(t,e)}return!1}function M5(t){return t.correspondingUseElement||t}function xge(t){return t=t||ad,{x:t.scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function J2(t){const e=t instanceof Jo.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function Q2(t){const e=J2(t);if(!zr.isIOS7&&e){const n=xge(bc(t));e.left+=n.x,e.right+=n.x,e.top+=n.y,e.bottom+=n.y}return e}function N5(t){return qe.string(t)?(Jo.document.querySelector(t),!0):!1}const wge=["webkit","moz"];function P5(t,e){t.__set||(t.__set={});for(const n in e)wge.some(o=>n.indexOf(o)===0)||typeof t[n]!="function"&&n!=="__set"&&Object.defineProperty(t,n,{get(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set(o){t.__set[n]=o},configurable:!0});return t}var Z2=(t,e)=>Math.sqrt(t*t+e*e);function q2(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function Cge(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp}function kge(t,e){const n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n}function Sge(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function D5(t){return t instanceof Jo.Event||t instanceof Jo.Touch}function h0(t,e,n){return n=n||{},t=t||"page",n.x=e[t+"X"],n.y=e[t+"Y"],n}function I5(t,e){return e=e||{x:0,y:0},zr.isOperaMobile&&D5(t)?(h0("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):h0("page",t,e),e}function jge(t,e){return e=e||{},zr.isOperaMobile&&D5(t)?h0("screen",t,e):h0("client",t,e),e}function p0(t){return qe.number(t.pointerId)?t.pointerId:t.identifier}function Ege(t,e,n){const o=e.length>1?R5(e):e[0];I5(o,t.page),jge(o,t.client),t.timeStamp=n}function $2(t){const e=[];return qe.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function R5(t){const e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const n of t)for(const o in e)e[o]+=n[o];for(const n in e)e[n]/=t.length;return e}function Oge(t){if(!t.length)return null;const e=$2(t),n=Math.min(e[0].pageX,e[1].pageX),o=Math.min(e[0].pageY,e[1].pageY),r=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:o,left:n,top:o,right:r,bottom:i,width:r-n,height:i-o}}function Tge(t,e){const n=e+"X",o=e+"Y",r=$2(t),i=r[0][n]-r[1][n],s=r[0][o]-r[1][o];return Z2(i,s)}function Age(t,e){const n=e+"X",o=e+"Y",r=$2(t),i=r[1][n]-r[0][n],s=r[1][o]-r[0][o];return 180*Math.atan2(s,i)/Math.PI}function Mge(t){return qe.string(t.pointerType)?t.pointerType:qe.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof Jo.Touch?"touch":"mouse"}function L5(t){const e=qe.func(t.composedPath)?t.composedPath():t.path;return[M5(e?e[0]:t.target),M5(t.currentTarget)]}function _g(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function Nge(t){var e;const n=[],o={},r=[],i={add:s,remove:a,addDelegate:l,removeDelegate:c,delegateListener:u,delegateUseCapture:h,delegatedEvents:o,documents:r,targets:n,supportsOptions:!1,supportsPassive:!1};(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i;function s(p,m,g,v){if(!p.addEventListener)return;const b=Ug(v);let y=f0(n,w=>w.eventTarget===p);y||(y={eventTarget:p,events:{}},n.push(y)),y.events[m]||(y.events[m]=[]),f0(y.events[m],w=>w.func===g&&m0(w.options,b))||(p.addEventListener(m,g,i.supportsOptions?b:b.capture),y.events[m].push({func:g,options:b}))}function a(p,m,g,v){if(!p.addEventListener||!p.removeEventListener)return;const b=zg(n,C=>C.eventTarget===p),y=n[b];if(!y||!y.events)return;if(m==="all"){for(m in y.events)y.events.hasOwnProperty(m)&&a(p,m,"all");return}let w=!1;const S=y.events[m];if(S)if(g==="all"){for(let C=S.length-1;C>=0;C--){const x=S[C];a(p,m,x.func,x.options)}return}else{const C=Ug(v);for(let x=0;x<S.length;x++){const k=S[x];if(k.func===g&&m0(k.options,C)){p.removeEventListener(m,g,i.supportsOptions?C:C.capture),S.splice(x,1),S.length===0&&(delete y.events[m],w=!0);break}}}w&&!Object.keys(y.events).length&&n.splice(b,1)}function l(p,m,g,v,b){const y=Ug(b);if(!o[g]){o[g]=[];for(const C of r)s(C,g,u),s(C,g,h,!0)}const w=o[g];let S=f0(w,C=>C.selector===p&&C.context===m);S||(S={selector:p,context:m,listeners:[]},w.push(S)),S.listeners.push({func:v,options:y})}function c(p,m,g,v,b){const y=Ug(b),w=o[g];let S=!1,C;if(w)for(C=w.length-1;C>=0;C--){const x=w[C];if(x.selector===p&&x.context===m){const{listeners:k}=x;for(let O=k.length-1;O>=0;O--){const A=k[O];if(A.func===v&&m0(A.options,y)){k.splice(O,1),k.length||(w.splice(C,1),a(m,g,u),a(m,g,h,!0)),S=!0;break}}if(S)break}}}function u(p,m){const g=Ug(m),v=new Pge(p),b=o[p.type],[y]=L5(p);let w=y;for(;qe.element(w);){for(let S=0;S<b.length;S++){const C=b[S],{selector:x,context:k}=C;if(Pu(w,x)&&ud(k,y)&&ud(k,w)){const{listeners:O}=C;v.currentTarget=w;for(const A of O)m0(A.options,g)&&A.func(v)}}w=fd(w)}}function h(p){return u.call(this,p,!0)}return i}class Pge{constructor(e){this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,P5(this,e)}preventOriginalDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}stopImmediatePropagation(){this.originalEvent.stopImmediatePropagation()}}function Ug(t){return qe.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function m0(t,e){return t===e?!0:typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive}var Dge={id:"events",install:Nge};const Ige=function(e){return/^(always|never|auto)$/.test(e)?(this.options.preventDefault=e,this):qe.bool(e)?(this.options.preventDefault=e?"always":"never",this):this.options.preventDefault};function Rge(t,e,n){const o=t.options.preventDefault;if(o!=="never"){if(o==="always"){n.preventDefault();return}if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){const r=bc(n.target).document,i=e.getDocOptions(r);if(!(i&&i.events)||i.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||qe.element(n.target)&&Pu(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}}function Lge(t){let{interaction:e,event:n}=t;e.interactable&&e.interactable.checkAndPreventDefault(n)}function Bge(t){const{Interactable:e}=t;e.prototype.preventDefault=Ige,e.prototype.checkAndPreventDefault=function(n){return Rge(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener(n){for(const o of t.interactions.list)if(o.element&&(o.element===n.target||ud(o.element,n.target))){o.interactable.checkAndPreventDefault(n);return}}})}var Vge={id:"core/interactablePreventDefault",install:Bge,listeners:["down","move","up","cancel"].reduce((t,e)=>(t[`interactions:${e}`]=Lge,t),{})};function Wg(t,e){let n=!1;return function(){return n||(ad.console.warn(e),n=!0),t.apply(this,arguments)}}function B5(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function V5(t,e,n){return t==="parent"?fd(n):t==="self"?e.getRect(n):O5(n,t)}function Fge(t,e,n,o){let r=t;return qe.string(r)?r=V5(r,e,n):qe.func(r)&&(r=r(...o)),qe.element(r)&&(r=Q2(r)),r}function zge(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function _ge(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function F5(t,e,n){const o=n&&t.options[n],i=o&&o.origin||t.options.origin,s=Fge(i,t,e,[t&&e]);return zge(s)||{x:0,y:0}}class ej{constructor(e){this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}Object.defineProperty(ej.prototype,"interaction",{get(){return this._interaction._proxy},set(){}});const z5={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};class tj extends ej{constructor(e,n,o,r,i,s,a){super(e),this.relatedTarget=null,this.screenX=void 0,this.screenY=void 0,this.button=void 0,this.buttons=void 0,this.ctrlKey=void 0,this.shiftKey=void 0,this.altKey=void 0,this.metaKey=void 0,this.page=void 0,this.client=void 0,this.delta=void 0,this.rect=void 0,this.x0=void 0,this.y0=void 0,this.t0=void 0,this.dt=void 0,this.duration=void 0,this.clientX0=void 0,this.clientY0=void 0,this.velocity=void 0,this.speed=void 0,this.swipe=void 0,this.axes=void 0,this.preEnd=void 0,i=i||e.element;const l=e.interactable,c=(l&&l.options||z5).deltaSource,u=F5(l,i,o),h=r==="start",p=r==="end",m=h?this:e.prevEvent,g=h?e.coords.start:p?{page:m.page,client:m.client,timeStamp:e.coords.cur.timeStamp}:e.coords.cur;this.page=ts({},g.page),this.client=ts({},g.client),this.rect=ts({},e.rect),this.timeStamp=g.timeStamp,p||(this.page.x-=u.x,this.page.y-=u.y,this.client.x-=u.x,this.client.y-=u.y),this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.button=n.button,this.buttons=n.buttons,this.target=i,this.currentTarget=i,this.preEnd=s,this.type=a||o+(r||""),this.interactable=l,this.t0=h?e.pointers[e.pointers.length-1].downTime:m.t0,this.x0=e.coords.start.page.x-u.x,this.y0=e.coords.start.page.y-u.y,this.clientX0=e.coords.start.client.x-u.x,this.clientY0=e.coords.start.client.y-u.y,h||p?this.delta={x:0,y:0}:this.delta={x:this[c].x-m[c].x,y:this[c].y-m[c].y},this.dt=e.coords.delta.timeStamp,this.duration=this.timeStamp-this.t0,this.velocity=ts({},e.coords.velocity[c]),this.speed=Z2(this.velocity.x,this.velocity.y),this.swipe=p||r==="inertiastart"?this.getSwipe():null}getSwipe(){const e=this._interaction;if(e.prevEvent.speed<600||this.timeStamp-e.prevEvent.timeStamp>150)return null;let n=180*Math.atan2(e.prevEvent.velocityY,e.prevEvent.velocityX)/Math.PI;const o=22.5;n<0&&(n+=360);const r=135-o<=n&&n<225+o,i=225-o<=n&&n<315+o,s=!r&&(315-o<=n||n<45+o),a=!i&&45-o<=n&&n<135+o;return{up:i,down:a,left:r,right:s,angle:n,speed:e.prevEvent.speed,velocity:{x:e.prevEvent.velocityX,y:e.prevEvent.velocityY}}}preventDefault(){}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}}Object.defineProperties(tj.prototype,{pageX:{get(){return this.page.x},set(t){this.page.x=t}},pageY:{get(){return this.page.y},set(t){this.page.y=t}},clientX:{get(){return this.client.x},set(t){this.client.x=t}},clientY:{get(){return this.client.y},set(t){this.client.y=t}},dx:{get(){return this.delta.x},set(t){this.delta.x=t}},dy:{get(){return this.delta.y},set(t){this.delta.y=t}},velocityX:{get(){return this.velocity.x},set(t){this.velocity.x=t}},velocityY:{get(){return this.velocity.y},set(t){this.velocity.y=t}}});class Uge{constructor(e,n,o,r,i){this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=o,this.downTime=r,this.downTarget=i}}let Wge=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),Hge=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Gge=0;class Kge{get pointerMoveTolerance(){return 1}constructor(e){this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Wg(function(i){this.move(i)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:_g(),prev:_g(),cur:_g(),delta:_g(),velocity:_g()},this._id=Gge++;let{pointerType:n,scopeFire:o}=e;this._scopeFire=o,this.pointerType=n;const r=this;this._proxy={};for(const i in Wge)Object.defineProperty(this._proxy,i,{get(){return r[i]}});for(const i in Hge)Object.defineProperty(this._proxy,i,{value:function(){return r[i](...arguments)}});this._scopeFire("interactions:new",{interaction:this})}pointerDown(e,n,o){const r=this.updatePointer(e,n,o,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:o,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}start(e,n,o){return this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled?!1:(B5(this.prepared,e),this.interactable=n,this.element=o,this.rect=n.getRect(o),this.edges=this.prepared.edges?ts({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}pointerMove(e,n,o){!this.simulation&&!(this.modification&&this.modification.endResult)&&this.updatePointer(e,n,o,!1);const r=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;let i,s;this.pointerIsDown&&!this.pointerWasMoved&&(i=this.coords.cur.client.x-this.coords.start.client.x,s=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Z2(i,s)>this.pointerMoveTolerance);const a=this.getPointerIndex(e),l={pointer:e,pointerIndex:a,pointerInfo:this.pointers[a],event:n,type:"move",eventTarget:o,dx:i,dy:s,duplicate:r,interaction:this};r||kge(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",l),!r&&!this.simulation&&(this.interacting()&&(l.type=null,this.move(l)),this.pointerWasMoved&&q2(this.coords.prev,this.coords.cur))}move(e){(!e||!e.event)&&Sge(this.coords.delta),e=ts({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{}),e.phase="move",this._doPhase(e)}pointerUp(e,n,o,r){let i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,o,!1));const s=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire(`interactions:${s}`,{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:o,type:s,curEventTarget:r,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}documentBlur(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}end(e){this._ending=!0,e=e||this._latestPointer.event;let n;this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}currentAction(){return this._interacting?this.prepared.name:null}interacting(){return this._interacting}stop(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}getPointerIndex(e){const n=p0(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:zg(this.pointers,o=>o.id===n)}getPointerInfo(e){return this.pointers[this.getPointerIndex(e)]}updatePointer(e,n,o,r){const i=p0(e);let s=this.getPointerIndex(e),a=this.pointers[s];return r=r===!1?!1:r||/(down|start)$/i.test(n.type),a?a.pointer=e:(a=new Uge(i,e,n,null,null),s=this.pointers.length,this.pointers.push(a)),Ege(this.coords.cur,this.pointers.map(l=>l.pointer),this._now()),Cge(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=o,P5(this.downPointer,e),this.interacting()||(q2(this.coords.start,this.coords.cur),q2(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,o),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:o,down:r,pointerInfo:a,pointerIndex:s,interaction:this}),s}removePointer(e,n){const o=this.getPointerIndex(e);if(o===-1)return;const r=this.pointers[o];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:o,pointerInfo:r,interaction:this}),this.pointers.splice(o,1),this.pointerIsDown=!1}_updateLatestPointer(e,n,o){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=o}destroy(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}_createPreparedEvent(e,n,o,r){return new tj(this,e,this.prepared.name,n,this.element,o,r)}_fireEvent(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}_doPhase(e){const{event:n,phase:o,preEnd:r,type:i}=e,{rect:s}=this;if(s&&o==="move"&&(_ge(this.edges,s,this.coords.delta[this.interactable.options.deltaSource]),s.width=s.right-s.left,s.height=s.bottom-s.top),this._scopeFire(`interactions:before-action-${o}`,e)===!1)return!1;const l=e.iEvent=this._createPreparedEvent(n,o,r,i);return this._scopeFire(`interactions:action-${o}`,e),o==="start"&&(this.prevEvent=l),this._fireEvent(l),this._scopeFire(`interactions:after-action-${o}`,e),!0}_now(){return Date.now()}}const nj={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search(t){for(const e of nj.methodOrder){const n=nj[e](t);if(n)return n}return null},simulationResume(t){let{pointerType:e,eventType:n,eventTarget:o,scope:r}=t;if(!/down|start/i.test(n))return null;for(const i of r.interactions.list){let s=o;if(i.simulation&&i.simulation.allowResume&&i.pointerType===e)for(;s;){if(s===i.element)return i;s=fd(s)}}return null},mouseOrPen(t){let{pointerId:e,pointerType:n,eventType:o,scope:r}=t;if(n!=="mouse"&&n!=="pen")return null;let i;for(const s of r.interactions.list)if(s.pointerType===n){if(s.simulation&&!_5(s,e))continue;if(s.interacting())return s;i||(i=s)}if(i)return i;for(const s of r.interactions.list)if(s.pointerType===n&&!(/down/i.test(o)&&s.simulation))return s;return null},hasPointer(t){let{pointerId:e,scope:n}=t;for(const o of n.interactions.list)if(_5(o,e))return o;return null},idle(t){let{pointerType:e,scope:n}=t;for(const o of n.interactions.list){if(o.pointers.length===1){const r=o.interactable;if(r&&!(r.options.gesture&&r.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function _5(t,e){return t.pointers.some(n=>{let{id:o}=n;return o===e})}const U5=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Yge(t){const e={};for(const i of U5)e[i]=W5(i,t);const n=zr.pEventTypes;let o;Jo.PointerEvent?o=[{type:n.down,listener:r},{type:n.down,listener:e.pointerDown},{type:n.move,listener:e.pointerMove},{type:n.up,listener:e.pointerUp},{type:n.cancel,listener:e.pointerUp}]:o=[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:r},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}],o.push({type:"blur",listener(i){for(const s of t.interactions.list)s.documentBlur(i)}}),t.prevTouchTime=0,t.Interaction=class extends Kge{get pointerMoveTolerance(){return t.interactions.pointerMoveTolerance}set pointerMoveTolerance(i){t.interactions.pointerMoveTolerance=i}_now(){return t.now()}},t.interactions={list:[],new(i){i.scopeFire=(a,l)=>t.fire(a,l);const s=new t.Interaction(i);return t.interactions.list.push(s),s},listeners:e,docEvents:o,pointerMoveTolerance:1};function r(){for(const i of t.interactions.list)if(!(!i.pointerIsDown||i.pointerType!=="touch"||i._interacting))for(const s of i.pointers)t.documents.some(a=>{let{doc:l}=a;return ud(l,s.downTarget)})||i.removePointer(s.pointer,s.event)}t.usePlugin(Vge)}function W5(t,e){return function(n){const o=e.interactions.list,r=Mge(n),[i,s]=L5(n),a=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(const l of n.changedTouches){const c=l,u=p0(c),h={pointer:c,pointerId:u,pointerType:r,eventType:n.type,eventTarget:i,curEventTarget:s,scope:e},p=H5(h);a.push([h.pointer,h.eventTarget,h.curEventTarget,p])}}else{let l=!1;if(!zr.supportsPointerEvent&&/mouse/.test(n.type)){for(let c=0;c<o.length&&!l;c++)l=o[c].pointerType!=="mouse"&&o[c].pointerIsDown;l=l||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!l){const c={pointer:n,pointerId:p0(n),pointerType:r,eventType:n.type,curEventTarget:s,eventTarget:i,scope:e},u=H5(c);a.push([c.pointer,c.eventTarget,c.curEventTarget,u])}}for(const[l,c,u,h]of a)h[t](l,n,c,u)}}function H5(t){const{pointerType:e,scope:n}=t,r={interaction:nj.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function oj(t,e){let{doc:n,scope:o,options:r}=t;const{interactions:{docEvents:i},events:s}=o,a=s[e];o.browser.isIOS&&!r.events&&(r.events={passive:!1});for(const c in s.delegatedEvents)a(n,c,s.delegateListener),a(n,c,s.delegateUseCapture,!0);const l=r&&r.events;for(const{type:c,listener:u}of i)a(n,c,u,l)}const Xge={id:"core/interactions",install:Yge,listeners:{"scope:add-document":t=>oj(t,"add"),"scope:remove-document":t=>oj(t,"remove"),"interactable:unset":(t,e)=>{let{interactable:n}=t;for(let o=e.interactions.list.length-1;o>=0;o--){const r=e.interactions.list[o];r.interactable===n&&(r.stop(),e.fire("interactions:destroy",{interaction:r}),r.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(o,1))}}},onDocSignal:oj,doOnInteractions:W5,methodNames:U5};function g0(t,e){if(e.phaselessTypes[t])return!0;for(const n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}var Du=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Du||{});class Jge{get _defaults(){return{base:{},perAction:{},actions:{}}}constructor(e,n,o,r){this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new E5,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||o,this._win=bc(N5(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=r,this.set(n)}setOnEvents(e,n){return qe.func(n.onstart)&&this.on(`${e}start`,n.onstart),qe.func(n.onmove)&&this.on(`${e}move`,n.onmove),qe.func(n.onend)&&this.on(`${e}end`,n.onend),qe.func(n.oninertiastart)&&this.on(`${e}inertiastart`,n.oninertiastart),this}updatePerActionListeners(e,n,o){var r;const i=(r=this._actions.map[e])==null?void 0:r.filterEventType,s=a=>(i==null||i(a))&&g0(a,this._actions);(qe.array(n)||qe.object(n))&&this._onOff(Du.Off,e,n,void 0,s),(qe.array(o)||qe.object(o))&&this._onOff(Du.On,e,o,void 0,s)}setPerAction(e,n){const o=this._defaults;for(const r in n){const i=r,s=this.options[e],a=n[i];i==="listeners"&&this.updatePerActionListeners(e,s.listeners,a),qe.array(a)?s[i]=C5(a):qe.plainObject(a)?(s[i]=ts(s[i]||{},d0(a)),qe.object(o.perAction[i])&&"enabled"in o.perAction[i]&&(s[i].enabled=a.enabled!==!1)):qe.bool(a)&&qe.object(o.perAction[i])?s[i].enabled=a:s[i]=a}}getRect(e){return e=e||(qe.element(this.target)?this.target:null),qe.string(this.target)&&(e=e||this._context.querySelector(this.target)),Q2(e)}rectChecker(e){return qe.func(e)?(this.getRect=n=>{const o=ts({},e.apply(this,n));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}_backCompatOption(e,n){if(N5(n)||qe.object(n)){this.options[e]=n;for(const o in this._actions.map)this.options[o][e]=n;return this}return this.options[e]}origin(e){return this._backCompatOption("origin",e)}deltaSource(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}getAllElements(){const{target:e}=this;return qe.string(e)?Array.from(this._context.querySelectorAll(e)):qe.func(e)&&e.getAllElements?e.getAllElements():qe.element(e)?[e]:[]}context(){return this._context}inContext(e){return this._context===e.ownerDocument||ud(this._context,e)}testIgnoreAllow(e,n,o){return!this.testIgnore(e.ignoreFrom,n,o)&&this.testAllow(e.allowFrom,n,o)}testAllow(e,n,o){return e?qe.element(o)?qe.string(e)?A5(o,e,n):qe.element(e)?ud(e,o):!1:!1:!0}testIgnore(e,n,o){return!e||!qe.element(o)?!1:qe.string(e)?A5(o,e,n):qe.element(e)?ud(e,o):!1}fire(e){return this.events.fire(e),this}_onOff(e,n,o,r,i){qe.object(n)&&!qe.array(n)&&(r=o,o=null);const s=cd(n,o,i);for(let a in s){a==="wheel"&&(a=zr.wheelEvent);for(const l of s[a])g0(a,this._actions)?this.events[e===Du.On?"on":"off"](a,l):qe.string(this.target)?this._scopeEvents[e===Du.On?"addDelegate":"removeDelegate"](this.target,this._context,a,l,r):this._scopeEvents[e===Du.On?"add":"remove"](this.target,a,l,r)}return this}on(e,n,o){return this._onOff(Du.On,e,n,o)}off(e,n,o){return this._onOff(Du.Off,e,n,o)}set(e){const n=this._defaults;qe.object(e)||(e={}),this.options=d0(n.base);for(const o in this._actions.methodDict){const r=o,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,ts(ts({},n.perAction),n.actions[r])),this[i](e[r])}for(const o in e){if(o==="getRect"){this.rectChecker(e.getRect);continue}qe.func(this[o])&&this[o](e[o])}return this}unset(){if(qe.string(this.target))for(const e in this._scopeEvents.delegatedEvents){const n=this._scopeEvents.delegatedEvents[e];for(let o=n.length-1;o>=0;o--){const{selector:r,context:i,listeners:s}=n[o];r===this.target&&i===this._context&&n.splice(o,1);for(let a=s.length-1;a>=0;a--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[a][0],s[a][1])}}else this._scopeEvents.remove(this.target,"all")}}class Qge{constructor(e){this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":n=>{let{interactable:o}=n;const{target:r}=o,i=qe.string(r)?this.selectorMap[r]:r[this.scope.id],s=zg(i,a=>a===o);i.splice(s,1)}})}new(e,n){n=ts(n||{},{actions:this.scope.actions});const o=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(o._doc),this.list.push(o),qe.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(o)):(o.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(o)),this.scope.fire("interactable:new",{target:e,options:n,interactable:o,win:this.scope._win}),o}getExisting(e,n){const o=n&&n.context||this.scope.document,r=qe.string(e),i=r?this.selectorMap[e]:e[this.scope.id];if(i)return f0(i,s=>s._context===o&&(r||s.inContext(e)))}forEachMatch(e,n){for(const o of this.list){let r;if((qe.string(o.target)?qe.element(e)&&Pu(e,o.target):e===o.target)&&o.inContext(e)&&(r=n(o)),r!==void 0)return r}}}function Zge(t){const e=(n,o)=>{let r=t.interactables.getExisting(n,o);return r||(r=t.interactables.new(n,o),r.events.global=e.globalEvents),r};return e.getPointerAverage=R5,e.getTouchBBox=Oge,e.getTouchDistance=Tge,e.getTouchAngle=Age,e.getElementRect=Q2,e.getElementClientRect=J2,e.matchesSelector=Pu,e.closest=O5,e.globalEvents={},e.version="1.10.27",e.scope=t,e.use=function(n,o){return this.scope.usePlugin(n,o),this},e.isSet=function(n,o){return!!this.scope.interactables.get(n,o&&o.context)},e.on=Wg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.on(s,r,i);return this}if(qe.object(o)){for(const s in o)this.on(s,o[s],r);return this}return g0(o,this.scope.actions)?this.globalEvents[o]?this.globalEvents[o].push(r):this.globalEvents[o]=[r]:this.scope.events.add(this.scope.document,o,r,{options:i}),this},"The interact.on() method is being deprecated"),e.off=Wg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.off(s,r,i);return this}if(qe.object(o)){for(const s in o)this.off(s,o[s],r);return this}if(g0(o,this.scope.actions)){let s;o in this.globalEvents&&(s=this.globalEvents[o].indexOf(r))!==-1&&this.globalEvents[o].splice(s,1)}else this.scope.events.remove(this.scope.document,o,r,i);return this},"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return zr.supportsTouch},e.supportsPointerEvent=function(){return zr.supportsPointerEvent},e.stop=function(){for(const n of this.scope.interactions.list)n.stop();return this},e.pointerMoveTolerance=function(n){return qe.number(n)?(this.scope.interactions.pointerMoveTolerance=n,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(n,o){this.scope.addDocument(n,o)},e.removeDocument=function(n){this.scope.removeDocument(n)},e}class qge{constructor(){this.id=`__interact_scope_${Math.floor(Math.random()*100)}`,this.isInitialized=!1,this.listenerMaps=[],this.browser=zr,this.defaults=d0(z5),this.Eventable=E5,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=Zge(this),this.InteractEvent=tj,this.Interactable=void 0,this.interactables=new Qge(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=n=>this.removeDocument(n.target);const e=this;this.Interactable=class extends Jge{get _defaults(){return e.defaults}set(n){return super.set(n),e.fire("interactable:set",{options:n,interactable:this}),this}unset(){super.unset();const n=e.interactables.list.indexOf(this);n<0||(e.interactables.list.splice(n,1),e.fire("interactable:unset",{interactable:this}))}}}addListeners(e,n){this.listenerMaps.push({id:n,map:e})}fire(e,n){for(const{map:{[e]:o}}of this.listenerMaps)if(o&&o(n,this,e)===!1)return!1}init(e){return this.isInitialized?this:$ge(this,e)}pluginIsInstalled(e){const{id:n}=e;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}usePlugin(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){let o=0;const r=this.listenerMaps.length,i=e.before.reduce((s,a)=>(s[a]=!0,s[G5(a)]=!0,s),{});for(;o<r;o++){const s=this.listenerMaps[o].id;if(s&&(i[s]||i[G5(s)]))break}this.listenerMaps.splice(o,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}addDocument(e,n){if(this.getDocIndex(e)!==-1)return!1;const o=bc(e);n=n?ts({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(o,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:o,scope:this,options:n})}removeDocument(e){const n=this.getDocIndex(e),o=bc(e),r=this.documents[n].options;this.events.remove(o,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:o,scope:this,options:r})}getDocIndex(e){for(let n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}getDocOptions(e){const n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}now(){return(this.window.Date||Date).now()}}function $ge(t,e){return t.isInitialized=!0,qe.window(e)&&y5(e),Jo.init(e),zr.init(e),cp.init(e),t.window=e,t.document=e.document,t.usePlugin(Xge),t.usePlugin(Dge),t}function G5(t){return t&&t.replace(/\/.*$/,"")}const K5=new qge,Iu=K5.interactStatic,eve=typeof globalThis<"u"?globalThis:window;K5.init(eve);function tve(t){const{Interactable:e}=t;e.prototype.getAction=function(o,r,i,s){const a=nve(this,r,i,s,t);return this.options.actionChecker?this.options.actionChecker(o,r,a,this,s,i):a},e.prototype.ignoreFrom=Wg(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Wg(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=rve,e.prototype.styleCursor=ove}function nve(t,e,n,o,r){const i=t.getRect(o),s=e.buttons||{0:1,1:4,3:8,4:16}[e.button],a={action:null,interactable:t,interaction:n,element:o,rect:i,buttons:s};return r.fire("auto-start:check",a),a.action}function ove(t){return qe.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function rve(t){return qe.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ive={id:"auto-start/interactableMethods",install:tve};function sve(t){const{interactStatic:e,defaults:n}=t;t.usePlugin(ive),n.base.actionChecker=null,n.base.styleCursor=!0,ts(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=o=>Q5(o,t),t.autoStart={maxInteractions:1/0,withinInteractionLimit:v0,cursorElement:null}}function ave(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.interacting())return;const s=X5(n,o,r,i,e);J5(n,s,e)}function lve(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.pointerType!=="mouse"||n.pointerIsDown||n.interacting())return;const s=X5(n,o,r,i,e);J5(n,s,e)}function cve(t,e){const{interaction:n}=t;if(!n.pointerIsDown||n.interacting()||!n.pointerWasMoved||!n.prepared.name)return;e.fire("autoStart:before-start",t);const{interactable:o}=n,r=n.prepared.name;r&&o&&(o.options[r].manualStart||!v0(o,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,o,n.element),Z5(n,e)))}function uve(t,e){let{interaction:n}=t;const{interactable:o}=n;o&&o.options.styleCursor&&rj(n.element,"",e)}function Y5(t,e,n,o,r){return e.testIgnoreAllow(e.options[t.name],n,o)&&e.options[t.name].enabled&&v0(e,n,t,r)?t:null}function fve(t,e,n,o,r,i,s){for(let a=0,l=o.length;a<l;a++){const c=o[a],u=r[a],h=c.getAction(e,n,t,u);if(!h)continue;const p=Y5(h,c,u,i,s);if(p)return{action:p,interactable:c,element:u}}return{action:null,interactable:null,element:null}}function X5(t,e,n,o,r){let i=[],s=[],a=o;function l(c){i.push(c),s.push(a)}for(;qe.element(a);){i=[],s=[],r.interactables.forEachMatch(a,l);const c=fve(t,e,n,i,s,o,r);if(c.action&&!c.interactable.options[c.action.name].manualStart)return c;a=fd(a)}return{action:null,interactable:null,element:null}}function J5(t,e,n){let{action:o,interactable:r,element:i}=e;o=o||{name:null},t.interactable=r,t.element=i,B5(t.prepared,o),t.rect=r&&o.name?r.getRect(i):null,Z5(t,n),n.fire("autoStart:prepared",{interaction:t})}function v0(t,e,n,o){const r=t.options,i=r[n.name].max,s=r[n.name].maxPerElement,a=o.autoStart.maxInteractions;let l=0,c=0,u=0;if(!(i&&s&&a))return!1;for(const h of o.interactions.list){const p=h.prepared.name;if(h.interacting()){if(l++,l>=a)return!1;if(h.interactable===t&&(c+=p===n.name?1:0,c>=i||h.element===e&&(u++,p===n.name&&u>=s)))return!1}}return a>0}function Q5(t,e){return qe.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function rj(t,e,n){const{cursorElement:o}=n.autoStart;o&&o!==t&&(o.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function Z5(t,e){const{interactable:n,element:o,prepared:r}=t;if(!(t.pointerType==="mouse"&&n&&n.options.styleCursor)){e.autoStart.cursorElement&&rj(e.autoStart.cursorElement,"",e);return}let i="";if(r.name){const s=n.options[r.name].cursorChecker;qe.func(s)?i=s(r,n,o,t._interacting):i=e.actions.map[r.name].getCursor(r)}rj(t.element,i||"",e)}const ij={id:"auto-start/base",before:["actions"],install:sve,listeners:{"interactions:down":ave,"interactions:move":(t,e)=>{lve(t,e),cve(t,e)},"interactions:stop":uve},maxInteractions:Q5,withinInteractionLimit:v0,validateAction:Y5};function dve(t,e){let{interaction:n,eventTarget:o,dx:r,dy:i}=t;if(n.prepared.name!=="drag")return;const s=Math.abs(r),a=Math.abs(i),l=n.interactable.options.drag,c=l.startAxis,u=s>a?"x":s<a?"y":"xy";if(n.prepared.axis=l.lockAxis==="start"?u[0]:l.lockAxis,u!=="xy"&&c!=="xy"&&c!==u){n.prepared.name=null;let h=o;const p=function(m){if(m===n.interactable)return;const g=n.interactable.options.drag;if(!g.manualStart&&m.testIgnoreAllow(g,h,o)){const v=m.getAction(n.downPointer,n.downEvent,n,h);if(v&&v.name==="drag"&&hve(u,m)&&ij.validateAction(v,m,h,o,e))return m}};for(;qe.element(h);){const m=e.interactables.forEachMatch(h,p);if(m){n.prepared.name="drag",n.interactable=m,n.element=h;break}h=fd(h)}}}function hve(t,e){if(!e)return!1;const n=e.options.drag.startAxis;return t==="xy"||n==="xy"||n===t}var pve={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":dve}};function mve(t){const{defaults:e}=t;t.usePlugin(ij),e.perAction.hold=0,e.perAction.delay=0}function sj(t){const e=t.prepared&&t.prepared.name;if(!e)return null;const n=t.interactable.options;return n[e].hold||n[e].delay}const gve={id:"auto-start/hold",install:mve,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoStartHoldTimer=null},"autoStart:prepared":t=>{let{interaction:e}=t;const n=sj(e);n>0&&(e.autoStartHoldTimer=setTimeout(()=>{e.start(e.prepared,e.interactable,e.element)},n))},"interactions:move":t=>{let{interaction:e,duplicate:n}=t;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":t=>{let{interaction:e}=t;sj(e)>0&&(e.prepared.name=null)}},getHoldDuration:sj};var vve={id:"auto-start",install(t){t.usePlugin(ij),t.usePlugin(gve),t.usePlugin(pve)}};Iu.use(vve);function bve(t){const{defaults:e,actions:n}=t;t.autoScroll=vn,vn.now=()=>t.now(),n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=vn.defaults}const vn={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start(t){vn.isScrolling=!0,cp.cancel(vn.i),t.autoScroll=vn,vn.interaction=t,vn.prevTime=vn.now(),vn.i=cp.request(vn.scroll)},stop(){vn.isScrolling=!1,vn.interaction&&(vn.interaction.autoScroll=null),cp.cancel(vn.i)},scroll(){const{interaction:t}=vn,{interactable:e,element:n}=t,o=t.prepared.name,r=e.options[o].autoScroll,i=q5(r.container,e,n),s=vn.now(),a=(s-vn.prevTime)/1e3,l=r.speed*a;if(l>=1){const c={x:vn.x*l,y:vn.y*l};if(c.x||c.y){const u=$5(i);qe.window(i)?i.scrollBy(c.x,c.y):i&&(i.scrollLeft+=c.x,i.scrollTop+=c.y);const h=$5(i),p={x:h.x-u.x,y:h.y-u.y};(p.x||p.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:p,interaction:t,container:i})}vn.prevTime=s}vn.isScrolling&&(cp.cancel(vn.i),vn.i=cp.request(vn.scroll))},check(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove(t){let{interaction:e,pointer:n}=t;if(!(e.interacting()&&vn.check(e.interactable,e.prepared.name)))return;if(e.simulation){vn.x=vn.y=0;return}let o,r,i,s;const{interactable:a,element:l}=e,c=e.prepared.name,u=a.options[c].autoScroll,h=q5(u.container,a,l);if(qe.window(h))s=n.clientX<vn.margin,o=n.clientY<vn.margin,r=n.clientX>h.innerWidth-vn.margin,i=n.clientY>h.innerHeight-vn.margin;else{const p=J2(h);s=n.clientX<p.left+vn.margin,o=n.clientY<p.top+vn.margin,r=n.clientX>p.right-vn.margin,i=n.clientY>p.bottom-vn.margin}vn.x=r?1:s?-1:0,vn.y=i?1:o?-1:0,vn.isScrolling||(vn.margin=u.margin,vn.speed=u.speed,vn.start(e))}};function q5(t,e,n){return(qe.string(t)?V5(t,e,n):t)||bc(n)}function $5(t){return qe.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}const yve={id:"auto-scroll",install:bve,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoScroll=null},"interactions:destroy":t=>{let{interaction:e}=t;e.autoScroll=null,vn.stop(),vn.interaction&&(vn.interaction=null)},"interactions:stop":vn.stop,"interactions:action-move":t=>vn.onInteractionMove(t)}};Iu.use(yve);function xve(t){const{actions:e,Interactable:n,defaults:o}=t;n.prototype.draggable=Hg.draggable,e.map.drag=Hg,e.methodDict.drag="draggable",o.actions.drag=Hg.defaults}function aj(t){let{interaction:e}=t;if(e.prepared.name!=="drag")return;const n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}function e9(t){let{iEvent:e,interaction:n}=t;if(n.prepared.name!=="drag")return;const o=n.prepared.axis;if(o==="x"||o==="y"){const r=o==="x"?"y":"x";e.page[r]=n.coords.start.page[r],e.client[r]=n.coords.start.client[r],e.delta[r]=0}}const Hg={id:"actions/drag",install:xve,listeners:{"interactions:before-action-move":aj,"interactions:action-resume":aj,"interactions:action-move":e9,"auto-start:check":t=>{const{interaction:e,interactable:n,buttons:o}=t,r=n.options.drag;if(!(!(r&&r.enabled)||e.pointerIsDown&&/mouse|pointer/.test(e.pointerType)&&(o&n.options.drag.mouseButtons)===0))return t.action={name:"drag",axis:r.lockAxis==="start"?r.startAxis:r.lockAxis},!1}},draggable:function(e){return qe.object(e)?(this.options.drag.enabled=e.enabled!==!1,this.setPerAction("drag",e),this.setOnEvents("drag",e),/^(xy|x|y|start)$/.test(e.lockAxis)&&(this.options.drag.lockAxis=e.lockAxis),/^(xy|x|y)$/.test(e.startAxis)&&(this.options.drag.startAxis=e.startAxis),this):qe.bool(e)?(this.options.drag.enabled=e,this):this.options.drag},beforeMove:aj,move:e9,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor(){return"move"},filterEventType:t=>t.search("drag")===0};Iu.use(Hg);class xc extends ej{constructor(e,n,o){super(n._interaction),this.dropzone=void 0,this.dragEvent=void 0,this.relatedTarget=void 0,this.draggable=void 0,this.propagationStopped=!1,this.immediatePropagationStopped=!1;const{element:r,dropzone:i}=o==="dragleave"?e.prev:e.cur;this.type=o,this.target=r,this.currentTarget=r,this.dropzone=i,this.dragEvent=n,this.relatedTarget=n.target,this.draggable=n.interactable,this.timeStamp=n.timeStamp}reject(){const{dropState:e}=this._interaction;if(!(this.type!=="dropactivate"&&(!this.dropzone||e.cur.dropzone!==this.dropzone||e.cur.element!==this.target)))if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){const n=e.activeDrops,o=zg(n,i=>{let{dropzone:s,element:a}=i;return s===this.dropzone&&a===this.target});e.activeDrops.splice(o,1);const r=new xc(e,this.dragEvent,"dropdeactivate");r.dropzone=this.dropzone,r.target=this.target,this.dropzone.fire(r)}else this.dropzone.fire(new xc(e,this.dragEvent,"dragleave"))}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}function wve(t){const{actions:e,interactStatic:n,Interactable:o,defaults:r}=t;t.usePlugin(Hg),o.prototype.dropzone=function(i){return kve(this,i)},o.prototype.dropCheck=function(i,s,a,l,c,u){return Sve(this,i,s,a,l,c,u)},n.dynamicDrop=function(i){return qe.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},ts(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,r.actions.drop=r9.defaults}function Cve(t,e){let{interactables:n}=t;const o=[];for(const r of n.list){if(!r.options.drop.enabled)continue;const i=r.options.drop.accept;if(!(qe.element(i)&&i!==e||qe.string(i)&&!Pu(e,i)||qe.func(i)&&!i({dropzone:r,draggableElement:e})))for(const s of r.getAllElements())s!==e&&o.push({dropzone:r,element:s,rect:r.getRect(s)})}return o}function t9(t,e){for(const{dropzone:n,element:o}of t.slice())e.dropzone=n,e.target=o,n.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}function lj(t,e){const n=Cve(t,e);for(const o of n)o.rect=o.dropzone.getRect(o.element);return n}function n9(t,e,n){let{dropState:o,interactable:r,element:i}=t;const s=[];for(const{dropzone:l,element:c,rect:u}of o.activeDrops){const h=l.dropCheck(e,n,r,i,c,u);s.push(h?c:null)}const a=bge(s);return o.activeDrops[a]||null}function cj(t,e,n){const o=t.dropState,r={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(r.activate=new xc(o,n,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),n.type==="dragend"&&(r.deactivate=new xc(o,n,"dropdeactivate"),r.deactivate.target=null,r.deactivate.dropzone=null),o.rejected||(o.cur.element!==o.prev.element&&(o.prev.dropzone&&(r.leave=new xc(o,n,"dragleave"),n.dragLeave=r.leave.target=o.prev.element,n.prevDropzone=r.leave.dropzone=o.prev.dropzone),o.cur.dropzone&&(r.enter=new xc(o,n,"dragenter"),n.dragEnter=o.cur.element,n.dropzone=o.cur.dropzone)),n.type==="dragend"&&o.cur.dropzone&&(r.drop=new xc(o,n,"drop"),n.dropzone=o.cur.dropzone,n.relatedTarget=o.cur.element),n.type==="dragmove"&&o.cur.dropzone&&(r.move=new xc(o,n,"dropmove"),n.dropzone=o.cur.dropzone)),r}function uj(t,e){const n=t.dropState,{activeDrops:o,cur:r,prev:i}=n;e.leave&&i.dropzone.fire(e.leave),e.enter&&r.dropzone.fire(e.enter),e.move&&r.dropzone.fire(e.move),e.drop&&r.dropzone.fire(e.drop),e.deactivate&&t9(o,e.deactivate),n.prev.dropzone=r.dropzone,n.prev.element=r.element}function o9(t,e){let{interaction:n,iEvent:o,event:r}=t;if(o.type!=="dragmove"&&o.type!=="dragend")return;const i=n.dropState;e.dynamicDrop&&(i.activeDrops=lj(e,n.element));const s=o,a=n9(n,s,r);i.rejected=i.rejected&&!!a&&a.dropzone===i.cur.dropzone&&a.element===i.cur.element,i.cur.dropzone=a&&a.dropzone,i.cur.element=a&&a.element,i.events=cj(n,r,s)}function kve(t,e){if(qe.object(e)){if(t.options.drop.enabled=e.enabled!==!1,e.listeners){const n=cd(e.listeners),o=Object.keys(n).reduce((i,s)=>{const a=/^(enter|leave)/.test(s)?`drag${s}`:/^(activate|deactivate|move)/.test(s)?`drop${s}`:s;return i[a]=n[s],i},{}),r=t.options.drop.listeners;r&&t.off(r),t.on(o),t.options.drop.listeners=o}return qe.func(e.ondrop)&&t.on("drop",e.ondrop),qe.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),qe.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),qe.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),qe.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),qe.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:qe.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return qe.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}function Sve(t,e,n,o,r,i,s){let a=!1;if(!(s=s||t.getRect(i)))return t.options.drop.checker?t.options.drop.checker(e,n,a,t,i,o,r):!1;const l=t.options.drop.overlap;if(l==="pointer"){const u=F5(o,r,"drag"),h=I5(e);h.x+=u.x,h.y+=u.y;const p=h.x>s.left&&h.x<s.right,m=h.y>s.top&&h.y<s.bottom;a=p&&m}const c=o.getRect(r);if(c&&l==="center"){const u=c.left+c.width/2,h=c.top+c.height/2;a=u>=s.left&&u<=s.right&&h>=s.top&&h<=s.bottom}return c&&qe.number(l)&&(a=Math.max(0,Math.min(s.right,c.right)-Math.max(s.left,c.left))*Math.max(0,Math.min(s.bottom,c.bottom)-Math.max(s.top,c.top))/(c.width*c.height)>=l),t.options.drop.checker&&(a=t.options.drop.checker(e,n,a,t,i,o,r)),a}const r9={id:"actions/drop",install:wve,listeners:{"interactions:before-action-start":t=>{let{interaction:e}=t;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":(t,e)=>{let{interaction:n,event:o,iEvent:r}=t;if(n.prepared.name!=="drag")return;const i=n.dropState;i.activeDrops=[],i.events={},i.activeDrops=lj(e,n.element),i.events=cj(n,o,r),i.events.activate&&(t9(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))},"interactions:action-move":o9,"interactions:after-action-move":(t,e)=>{let{interaction:n,iEvent:o}=t;if(n.prepared.name!=="drag")return;const r=n.dropState;uj(n,r.events),e.fire("actions/drop:move",{interaction:n,dragEvent:o}),r.events={}},"interactions:action-end":(t,e)=>{if(t.interaction.prepared.name!=="drag")return;const{interaction:n,iEvent:o}=t;o9(t,e),uj(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:o})},"interactions:stop":t=>{let{interaction:e}=t;if(e.prepared.name!=="drag")return;const{dropState:n}=e;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}},getActiveDrops:lj,getDrop:n9,getDropEvents:cj,fireDropEvents:uj,filterEventType:t=>t.search("drag")===0||t.search("drop")===0,defaults:{enabled:!1,accept:null,overlap:"pointer"}};Iu.use(r9);const b0=".widget-panel .flame-fw-palette-drag-source",fj="[data-palette-drop-form]",i9="[data-palette-drop-group]",jve="flame-fw-palette-interact-dragging";function dj(t){typeof document>"u"||document.documentElement.classList.toggle(jve,t)}function Gg(t){const e=t;return e!=null&&e.closest?e.closest(b0):null}function Eve(t){const e=t.dragEvent;if(e&&typeof e.clientX=="number"&&typeof e.clientY=="number"&&Number.isFinite(e.clientX)&&Number.isFinite(e.clientY))return{x:e.clientX,y:e.clientY};const n=t.client;return n&&typeof n.x=="number"&&typeof n.y=="number"&&Number.isFinite(n.x)&&Number.isFinite(n.y)?{x:n.x,y:n.y}:{x:NaN,y:NaN}}function s9(t,e,n){const o=Eve(t);return e.valid&&Number.isFinite(e.x)&&Number.isFinite(e.y)?{x:e.x,y:e.y}:Number.isFinite(o.x)&&Number.isFinite(o.y)?{x:o.x,y:o.y}:n.ok?{x:n.x,y:n.y}:o}function Ove(t,e,n){const o=document.elementsFromPoint(t,e);return n?o.filter(r=>r instanceof Element?!(r===n||n.contains(r)):!1):o}function Tve(t){if(!t)return{};if("kind"in t&&t.kind==="custom")return{kind:"custom"};const e=t;return{type:e.type,kind:e.kind}}function Ave(t){Iu.dynamicDrop(!0);let e=null;const n=new WeakMap,o={x:0,y:0,valid:!1},r={x:0,y:0,ok:!1};let i=null;const s={capture:!0,passive:!1};function a(S,C){e&&(!Number.isFinite(S)||!Number.isFinite(C)||(o.x=S,o.y=C,o.valid=!0,r.x=S,r.y=C,r.ok=!0,m(S,C,e.el)))}function l(S){a(S.clientX,S.clientY)}function c(S){const C=S.touches[0]??S.changedTouches[0];C&&a(C.clientX,C.clientY)}function u(S){S.preventDefault()}function h(){document.addEventListener("pointermove",l,!0),document.addEventListener("touchmove",c,s),document.addEventListener("selectstart",u,!0)}function p(){document.removeEventListener("pointermove",l,!0),document.removeEventListener("touchmove",c,s),document.removeEventListener("selectstart",u,!0)}const m=(S,C,x)=>{var T,N;if(!t.updatePreview)return;if(!Number.isFinite(S)||!Number.isFinite(C)){(T=t.clearPreview)==null||T.call(t);return}const k=x===(e==null?void 0:e.el)?e.origin:void 0,O=Tve(k),A=Ove(S,C,x);for(const j of A){if(!(j instanceof Element))continue;const I=j.closest(fj);if(I instanceof HTMLElement&&I.dataset.paletteDropForm){t.updatePreview({formChildId:I.dataset.paletteDropForm,dragged:O,originalEvent:{clientX:S,clientY:C},sortableToEl:I,clientX:S,clientY:C});return}}(N=t.clearPreview)==null||N.call(t)},g=Iu(b0).draggable({inertia:!1,listeners:{start(S){e=null,o.valid=!1,r.ok=!1;const C=Gg(S.target);if(!C)return;const x=C.getAttribute("data-fw-palette-source"),k=x?t.resolvePaletteBySource(x):null;k&&(e={el:C,origin:k}),n.set(C,{x:0,y:0}),dj(!0),h()},move(S){var k,O;const C=Gg(S.target);if(!C)return;const x=n.get(C);x&&(x.x+=S.dx,x.y+=S.dy,C.style.transform=`translate(${x.x}px, ${x.y}px)`,C.style.zIndex="10010"),!o.valid&&Number.isFinite((k=S.client)==null?void 0:k.x)&&Number.isFinite((O=S.client)==null?void 0:O.y)&&(o.x=S.client.x,o.y=S.client.y,o.valid=!0,m(S.client.x,S.client.y,C))},end(S){p();const C=Gg(S.target),x=e;C&&(C.style.transform="",C.style.zIndex="",n.delete(C)),i!=null&&clearTimeout(i),i=setTimeout(()=>{var k;i=null,dj(!1),e===x&&(e=null,o.valid=!1,r.ok=!1),(k=t.clearPreview)==null||k.call(t)},0)}}}),v=S=>{var E,P,D;const C=S.target,x=(E=C.closest)==null?void 0:E.call(C,fj);if(!Gg(S.relatedTarget)||!((P=x==null?void 0:x.dataset)!=null&&P.paletteDropForm))return;const O=e==null?void 0:e.origin;if(!O)return;const A=t.clonePaletteItem(O),{x:T,y:N}=s9(S,o,r),j=x.dataset.paletteDropForm,I=t.findFormShellById(j);I&&t.onInteractDrop(I.formItem,A,x,T,N),(D=t.clearPreview)==null||D.call(t)},b=S=>{var E,P,D;const C=S.target,x=(E=C.closest)==null?void 0:E.call(C,i9);if(!Gg(S.relatedTarget)||!((P=x==null?void 0:x.dataset)!=null&&P.paletteDropGroup))return;const O=e==null?void 0:e.origin;if(!O)return;const A=t.clonePaletteItem(O),{x:T,y:N}=s9(S,o,r),j=x.dataset.paletteDropGroup,I=t.findGroupById(j);I&&t.onInteractDrop(I,A,x,T,N),(D=t.clearPreview)==null||D.call(t)},y=Iu(fj).dropzone({accept:b0,overlap:.15,listeners:{drop:v}}),w=Iu(i9).dropzone({accept:b0,overlap:.15,listeners:{drop:b}});return()=>{var S;i!=null&&(clearTimeout(i),i=null),dj(!1),p(),g.unset(),y.unset(),w.unset(),(S=t.clearPreview)==null||S.call(t)}}const Mve={class:"framework-lr"},Nve=f.defineComponent({name:"FlameFramework"}),Pve=f.defineComponent({...Nve,props:{componentGroups:{default:()=>[]},componentList:{default:()=>[]},hideBasicWidgets:{type:Boolean,default:!1}},emits:["save","reset"],setup(t,{expose:e,emit:n}){const o=t,r=f.computed(()=>{const ot=o.componentGroups;if(ot&&ot.length)return ot;const Je=o.componentList||[];return Je.length?[{title:"组件库",items:Je.map(vt=>({kind:"basic",key:vt.key,label:vt.label,icon:vt.icon,type:vt.type,defaultConfig:vt.defaultConfig,defaultFormItem:vt.defaultFormItem}))}]:[]}),i=n,s={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}},a=f.ref([{...s.submit},{...s.cancel},{...s.reset}]),l=f.computed(()=>o.hideBasicWidgets?[]:Bpe),c=f.ref(Lpe),u=f.ref([]),h=f.ref([]),p=f.ref([]),m=f.ref([]),g=f.ref([]),v=f.ref(0),b=f.ref(null),y=f.ref(null),w=f.ref(null),S=f.ref(!1),C=f.ref(null),{selectedItem:x,selectFormChild:k,onGridWidgetCapture:O}=fge(g,a,y,w,C),{getGroupChildType:A,setGroupChildType:T,createGroupChildByType:N,addGroupByContainerType:j,selectedGroupFormConfig:I}=lge(g,y,C),{buildFrameworkConfig:E,validateLayoutBeforeSave:P,parseConfigToLayout:D,snapshotControlConfig:R}=age(g,a),z=f.ref({groups:[],buttons:[]}),{onOpenPreview:U,onSaveConfig:_,onResetConfig:G,onCopyWidget:te,onDeleteWidget:K,onCopyFormChild:q,onDeleteFormChild:F,onAutoCompactInner:oe,onSelectGlobalButton:ve,addGlobalButton:Ee,removeGlobalButton:ye}=cge(g,y,C,w,a,z,S,{buildFrameworkConfig:E,validateLayoutBeforeSave:P,compactInnerFormLayout:a0,parseConfigToLayout:D,snapshotControlConfig:R,getNextGridPosition:s0,getNextInnerGridPosition:Bg,selectFormChild:k,onSave:ot=>i("save",ot),onReset:()=>i("reset"),getDefaultLayout:Vpe,DEFAULT_BUTTONS:s}),{onDropFromPalette:Z,onInteractDropToFormInner:M,onContainerDrop:ne,onDropContainerInRoot:Se,onInnerLayoutUpdated:de,findFormContainerForInnerControl:De,hydrateLayoutCustomFields:xe}=dge(g,y,C,w,h,m,p,r,k,N,j),le=f.ref(null);let He=null;function pt(ot){var Je;if(ot.startsWith("b:")){const vt=parseInt(ot.slice(2),10),jt=l.value;return Number.isFinite(vt)&&vt>=0&&vt<jt.length?jt[vt]:null}if(ot.startsWith("c:")){const vt=parseInt(ot.slice(2),10),jt=u.value;return Number.isFinite(vt)&&vt>=0&&vt<jt.length?jt[vt]:null}if(ot.startsWith("g:")){const vt=ot.slice(2).split(":"),jt=parseInt(vt[0],10),xn=parseInt(vt[1],10),Yn=r.value[jt];return((Je=Yn==null?void 0:Yn.items)==null?void 0:Je[xn])??null}return null}function Re(ot){const Je=g.value.find(vt=>vt.i===ot);return(Je==null?void 0:Je.nodeKind)==="group"?Je:void 0}function gt(ot){for(const Je of g.value)if(!(Je.nodeKind!=="group"||!Je.children)){for(const vt of Je.children)if(vt.i===ot&&(vt.nodeKind==="form"||vt.nodeKind==="subForm"))return{group:Je,formItem:vt}}return null}function Ge(){He==null||He(),He=null,le.value&&(He=Ave({clonePaletteItem:g5,resolvePaletteBySource:pt,findGroupById:Re,findFormShellById:gt,onInteractDrop:M,updatePreview:ot=>{var Je,vt;return(vt=(Je=b.value)==null?void 0:Je.updatePaletteDropPreview)==null?void 0:vt.call(Je,ot)},clearPreview:()=>{var ot,Je;return(Je=(ot=b.value)==null?void 0:ot.clearPaletteDropPreview)==null?void 0:Je.call(ot)}}))}f.onMounted(()=>{f.nextTick(()=>Ge())}),f.watch(v,()=>{f.nextTick(()=>Ge())}),f.watch(()=>g.value.length,()=>{f.nextTick(()=>Ge())}),f.onBeforeUnmount(()=>{He==null||He(),He=null});const tt=f.computed(()=>sge(x.value)),{inputConfig:Dt,selectConfig:Ze,inputNumberConfig:Ft,datePickerConfig:H,timePickerConfig:X,timeSelectConfig:Q,cascaderConfig:W,checkboxConfig:J,colorPickerConfig:re,radioConfig:me,rateConfig:ie,sliderConfig:he,switchConfig:Fe,transferConfig:Ue,buttonConfig:We,dialogConfig:Me,drawerConfig:ze,paginationConfig:lt,readConfig:Tt,uploadConfig:ft,uploadAcceptSelection:$t,uploadAcceptTypeOptions:pn,timeConfig:Cn,onFlmTimePresetChange:kn,controlConfig:It,controlHasPlaceholder:Kn,controlHasDisabled:Qt,controlHasClearable:bt}=uge(x);function An(ot){g.value=ot}return e({getConfig:()=>E(),setConfig:ot=>{if(!ot||typeof ot!="object")return;Array.isArray(ot.buttons)&&(a.value=ot.buttons.map(vt=>({...vt})));const Je=D(ot);xe(Je),g.value=Je,v.value++,y.value=null,w.value=null,C.value=null},getLayout:()=>g.value,setLayout:ot=>{Array.isArray(ot)&&ot.length&&(g.value=ot)}}),f.watch(()=>{const ot=C.value,Je=x.value;return!ot||!Je?"":`${ot.formId}\0${ot.childId}\0${Je.w}\0${Je.h}\0${Je.x}\0${Je.y}`},()=>{f.nextTick(()=>{const ot=C.value,Je=x.value;if(!ot||!Je)return;const vt=De(ot.formId,ot.childId);vt!=null&&vt.children&&a5(vt.children)&&a0(vt)})}),(ot,Je)=>{const vt=f.resolveComponent("el-input"),jt=f.resolveComponent("el-form-item"),xn=f.resolveComponent("el-option"),Yn=f.resolveComponent("el-select"),Mo=f.resolveComponent("el-input-number"),ao=f.resolveComponent("el-switch"),Co=f.resolveComponent("el-slider"),Qo=f.resolveComponent("el-form");return f.openBlock(),f.createElementBlock("div",{ref_key:"frameworkRootEl",ref:le,class:"form-builder-framework"},[f.createElementVNode("div",Mve,[f.createVNode(f.unref(Pfe),{"container-widget-list":c.value,"basic-widget-list":l.value,"complex-widget-list":u.value,"component-groups":r.value,"clone-palette-item":f.unref(g5)},null,8,["container-widget-list","basic-widget-list","complex-widget-list","component-groups","clone-palette-item"]),(f.openBlock(),f.createBlock(f.unref(pme),{ref_key:"formDesignAreaRef",ref:b,key:v.value,layout:g.value,"onUpdate:layout":An,"drop-zone-list":h.value,"container-drop-list":p.value,"selected-id":y.value,"selected-form-child":C.value,"col-num":f.unref(es),"row-height":f.unref(u5),"get-default-label":f.unref(l0),"get-default-config":f.unref(c0),"get-default-config-for-child":f.unref(G2),buttons:a.value,onDropFromPalette:f.unref(Z),onInnerLayoutUpdated:f.unref(de),onGridWidgetCapture:f.unref(O),onSelectFormChild:f.unref(k),onClearSelection:Je[0]||(Je[0]=Ye=>{y.value=null,C.value=null}),onOpenPreview:f.unref(U),onSave:f.unref(_),onReset:f.unref(G),onCopyWidget:f.unref(te),onDeleteWidget:f.unref(K),onCopyFormChild:f.unref(q),onDeleteFormChild:f.unref(F),onSelectGlobalButton:f.unref(ve),onDropContainer:f.unref(ne),onDropContainerInRoot:f.unref(Se),onAutoCompactInner:f.unref(oe)},null,8,["layout","drop-zone-list","container-drop-list","selected-id","selected-form-child","col-num","row-height","get-default-label","get-default-config","get-default-config-for-child","buttons","onDropFromPalette","onInnerLayoutUpdated","onGridWidgetCapture","onSelectFormChild","onOpenPreview","onSave","onReset","onCopyWidget","onDeleteWidget","onCopyFormChild","onDeleteFormChild","onSelectGlobalButton","onDropContainer","onDropContainerInRoot","onAutoCompactInner"])),f.createVNode(f.unref(Ome),{"selected-item":f.unref(x),"groups-config":tt.value},{base:f.withCtx(({model:Ye})=>[f.createVNode(Qo,{size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(vt,{"model-value":Ye==null?void 0:Ye.i,disabled:""},null,8,["model-value"])]),_:2},1024),(Ye==null?void 0:Ye.nodeKind)==="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"分组名称"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.label,"onUpdate:modelValue":ct=>Ye.label=ct,placeholder:"请输入分组名称",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"分组类型"},{default:f.withCtx(()=>[f.createVNode(Yn,{"model-value":f.unref(A)(Ye),placeholder:"选择类型",style:{width:"100%"},"onUpdate:modelValue":ct=>f.unref(T)(Ye,ct)},{default:f.withCtx(()=>[f.createVNode(xn,{label:"表单",value:"form"}),f.createVNode(xn,{label:"子表单",value:"subForm"}),f.createVNode(xn,{label:"插槽",value:"slot"})]),_:1},8,["model-value","onUpdate:modelValue"])]),_:2},1024),f.unref(I)&&f.unref(A)(Ye)!=="slot"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"标签位置"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:f.unref(I)["label-position"],"onUpdate:modelValue":Je[1]||(Je[1]=ct=>f.unref(I)["label-position"]=ct),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"左侧",value:"left"}),f.createVNode(xn,{label:"右侧",value:"right"}),f.createVNode(xn,{label:"顶部",value:"top"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:f.unref(I)["label-width"],"onUpdate:modelValue":Je[2]||(Je[2]=ct=>f.unref(I)["label-width"]=ct),placeholder:"如 80px、120",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"栅格列数"},{default:f.withCtx(()=>[f.createVNode(Mo,{modelValue:f.unref(I).gridColumns,"onUpdate:modelValue":Je[3]||(Je[3]=ct=>f.unref(I).gridColumns=ct),min:1,max:48,step:1,placeholder:"24","controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:f.unref(I).size,"onUpdate:modelValue":Je[4]||(Je[4]=ct=>f.unref(I).size=ct),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I).disabled,"onUpdate:modelValue":Je[5]||(Je[5]=ct=>f.unref(I).disabled=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"隐藏必填星号"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I)["hide-required-asterisk"],"onUpdate:modelValue":Je[6]||(Je[6]=ct=>f.unref(I)["hide-required-asterisk"]=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I)["show-message"],"onUpdate:modelValue":Je[7]||(Je[7]=ct=>f.unref(I)["show-message"]=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"行内校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I)["inline-message"],"onUpdate:modelValue":Je[8]||(Je[8]=ct=>f.unref(I)["inline-message"]=ct)},null,8,["modelValue"])]),_:1}),f.unref(A)(Ye)==="subForm"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"是否默认生成一项"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I).defaultGenerateOne,"onUpdate:modelValue":Je[9]||(Je[9]=ct=>f.unref(I).defaultGenerateOne=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"最小子表单数"},{default:f.withCtx(()=>[f.createVNode(Mo,{modelValue:f.unref(I).minItems,"onUpdate:modelValue":Je[10]||(Je[10]=ct=>f.unref(I).minItems=ct),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"最大子表单数"},{default:f.withCtx(()=>[f.createVNode(Mo,{modelValue:f.unref(I).maxItems,"onUpdate:modelValue":Je[11]||(Je[11]=ct=>f.unref(I).maxItems=ct),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),Ye&&Ye.nodeKind!=="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(jt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.w,"onUpdate:modelValue":ct=>Ye.w=ct,min:f.unref(i5)(Ye),max:f.unref(es),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(jt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.h,"onUpdate:modelValue":ct=>Ye.h=ct,min:f.unref(s5)(Ye),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024)],64)):f.createCommentVNode("",!0)]),_:2},1024)]),slotConfig:f.withCtx(({model:Ye})=>[(Ye==null?void 0:Ye.nodeKind)==="slot"?(f.openBlock(),f.createBlock(Qo,{key:0,size:"small","label-position":"left","label-width":"80px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"插槽名称 slotName",required:""},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.config.slotName,"onUpdate:modelValue":ct=>Ye.config.slotName=ct,placeholder:"如 header / footer / actions",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)):f.createCommentVNode("",!0)]),formItem:f.withCtx(({model:Ye})=>[Ye!=null&&Ye.formItem?(f.openBlock(),f.createBlock(Qo,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.label,"onUpdate:modelValue":ct=>Ye.formItem.label=ct,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.labelWidth,"onUpdate:modelValue":ct=>Ye.formItem.labelWidth=ct,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.showMessage,"onUpdate:modelValue":ct=>Ye.formItem.showMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.inlineMessage,"onUpdate:modelValue":ct=>Ye.formItem.inlineMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:Ye.formItem.size,"onUpdate:modelValue":ct=>Ye.formItem.size=ct,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(f.unref(h5),{"form-item":Ye.formItem},null,8,["form-item"])]),_:2},1024)):f.createCommentVNode("",!0)]),baseSettings:f.withCtx(({model:Ye})=>[Ye?(f.openBlock(),f.createBlock(Qo,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(vt,{"model-value":Ye==null?void 0:Ye.i,disabled:""},null,8,["model-value"])]),_:2},1024),f.createVNode(jt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.w,"onUpdate:modelValue":ct=>Ye.w=ct,min:f.unref(i5)(Ye),max:f.unref(es),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(jt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.h,"onUpdate:modelValue":ct=>Ye.h=ct,min:f.unref(s5)(Ye),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024),Ye!=null&&Ye.formItem?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.label,"onUpdate:modelValue":ct=>Ye.formItem.label=ct,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.labelWidth,"onUpdate:modelValue":ct=>Ye.formItem.labelWidth=ct,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.showMessage,"onUpdate:modelValue":ct=>Ye.formItem.showMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.inlineMessage,"onUpdate:modelValue":ct=>Ye.formItem.inlineMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:Ye.formItem.size,"onUpdate:modelValue":ct=>Ye.formItem.size=ct,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(f.unref(h5),{"form-item":Ye.formItem},null,8,["form-item"])],64)):f.createCommentVNode("",!0),f.unref(It)&&(Ye==null?void 0:Ye.type)!=="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.unref(Kn)?(f.openBlock(),f.createBlock(jt,{key:0,label:"占位符"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:f.unref(It).placeholder,"onUpdate:modelValue":Je[12]||(Je[12]=ct=>f.unref(It).placeholder=ct),placeholder:"占位文案",clearable:""},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(Qt)?(f.openBlock(),f.createBlock(jt,{key:1,label:"禁用"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(It).disabled,"onUpdate:modelValue":Je[13]||(Je[13]=ct=>f.unref(It).disabled=ct)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(bt)?(f.openBlock(),f.createBlock(jt,{key:2,label:"可清空"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(It).clearable,"onUpdate:modelValue":Je[14]||(Je[14]=ct=>f.unref(It).clearable=ct)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),(Ye==null?void 0:Ye.type)==="flmInput"?(f.openBlock(),f.createBlock(jt,{key:3,label:"控件尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:f.unref(It).size,"onUpdate:modelValue":Je[15]||(Je[15]=ct=>f.unref(It).size=ct),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1})):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)]),_:2},1024)):f.createCommentVNode("",!0)]),detailSettings:f.withCtx(({model:Ye})=>[f.createVNode(f.unref(Ume),{model:Ye,"input-config":f.unref(Dt),"select-config":f.unref(Ze),"input-number-config":f.unref(Ft),"date-picker-config":f.unref(H),"time-picker-config":f.unref(X),"time-select-config":f.unref(Q),"cascader-config":f.unref(W),"checkbox-config":f.unref(J),"color-picker-config":f.unref(re),"radio-config":f.unref(me),"rate-config":f.unref(ie),"slider-config":f.unref(he),"switch-config":f.unref(Fe),"transfer-config":f.unref(Ue),"button-config":f.unref(We),"dialog-config":f.unref(Me),"drawer-config":f.unref(ze),"pagination-config":f.unref(lt),"read-config":f.unref(Tt),"upload-config":f.unref(ft),"upload-accept-selection":f.unref($t),"upload-accept-type-options":f.unref(pn),"time-config":f.unref(Cn),"on-flm-time-preset-change":f.unref(kn)},null,8,["model","input-config","select-config","input-number-config","date-picker-config","time-picker-config","time-select-config","cascader-config","checkbox-config","color-picker-config","radio-config","rate-config","slider-config","switch-config","transfer-config","button-config","dialog-config","drawer-config","pagination-config","read-config","upload-config","upload-accept-selection","upload-accept-type-options","time-config","on-flm-time-preset-change"])]),globalButtons:f.withCtx(({model:Ye})=>[f.createVNode(f.unref(Yme),{buttons:a.value,"selected-index":w.value,onSelect:f.unref(ve),onRemove:f.unref(ye),onAdd:f.unref(Ee)},null,8,["buttons","selected-index","onSelect","onRemove","onAdd"])]),_:1},8,["selected-item","groups-config"])]),f.createVNode(f.unref(bme),{modelValue:S.value,"onUpdate:modelValue":Je[16]||(Je[16]=Ye=>S.value=Ye),config:z.value},null,8,["modelValue","config"])],512)}}}),a9=qr(Pve,[["__scopeId","data-v-7d86fefd"]]),l9={flmButton:Rf,flmCascader:Lf,flmCheckbox:bl,flmCheckboxGroup:yI,flmColorPicker:Bf,flmDatePicker:GS,flmInput:yl,flmInputNumber:Vf,flmUpload:dc,flmPagination:cg,flmRadio:Ff,flmRate:zf,flmRead:_f,flmTime:Uf,flmSelect:Wf,flmSlider:Hf,flmSwitch:Gf,flmTimePicker:Kf,flmTimeSelect:Yf,flmTransfer:Xf,flmDialog:Jf,flmCollapse:YS,FlmPrintTable:dI,FlmEditor:Il,FlmJsonEditor:WS,flmForm:Cu,flmTable:T1,flmSubForm:ZS,flmDynamicForm:$S,FlmFormUploadImage:wu,flmSearch:QS,flmSearchSelect:Jh,FlmToolbar:ug,flmReportPage:e2,flmExportPage:bI,FlameFramework:a9},Dve={install:(t,e,n,o)=>{let r=l9;if(n&&(r=gE(r,n)),e&&e.forEach(i=>{t.use(i)}),o)for(const[i,s]of Object.entries(o))t.component(i,s);Object.entries(r).forEach(([i,s])=>t.component(i,s))},...l9};/*!
3929
+ `,N+="@keyframes "+A+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",O(N)}}function p(C){C.className+=" "+a+"_animation_active"}function m(C,x,k){if(C.addEventListener)C.addEventListener(x,k);else if(C.attachEvent)C.attachEvent("on"+x,k);else return e.error("[scroll] Don't know how to add event listeners.")}function g(C,x,k){if(C.removeEventListener)C.removeEventListener(x,k);else if(C.detachEvent)C.detachEvent("on"+x,k);else return e.error("[scroll] Don't know how to remove event listeners.")}function v(C){return o(C).container.childNodes[0].childNodes[0].childNodes[0]}function b(C){return o(C).container.childNodes[0].childNodes[0].childNodes[1]}function y(C,x){var k=o(C).listeners;if(!k.push)throw new Error("Cannot add listener to an element that is not detectable.");o(C).listeners.push(x)}function w(C,x,k){k||(k=x,x=C,C=null),C=C||{};function O(){if(C.debug){var Z=Array.prototype.slice.call(arguments);if(Z.unshift(r.get(x),"Scroll: "),e.log.apply)e.log.apply(null,Z);else for(var M=0;M<Z.length;M++)e.log(Z[M])}}function A(Z){function M(ne){var Se=ne.getRootNode&&ne.getRootNode().contains(ne);return ne===ne.ownerDocument.body||ne.ownerDocument.body.contains(ne)||Se}return!M(Z)||window.getComputedStyle(Z)===null}function T(Z){var M=o(Z).container.childNodes[0],ne=window.getComputedStyle(M);return!ne.width||ne.width.indexOf("px")===-1}function N(){var Z=window.getComputedStyle(x),M={};return M.position=Z.position,M.width=x.offsetWidth,M.height=x.offsetHeight,M.top=Z.top,M.right=Z.right,M.bottom=Z.bottom,M.left=Z.left,M.widthCSS=Z.width,M.heightCSS=Z.height,M}function j(){var Z=N();o(x).startSize={width:Z.width,height:Z.height},O("Element start size",o(x).startSize)}function I(){o(x).listeners=[]}function E(){if(O("storeStyle invoked."),!o(x)){O("Aborting because element has been uninstalled");return}var Z=N();o(x).style=Z}function P(Z,M,ne){o(Z).lastWidth=M,o(Z).lastHeight=ne}function D(Z){return v(Z).childNodes[0]}function R(){return 2*i.width+1}function z(){return 2*i.height+1}function U(Z){return Z+10+R()}function _(Z){return Z+10+z()}function G(Z){return Z*2+R()}function te(Z){return Z*2+z()}function K(Z,M,ne){var Se=v(Z),de=b(Z),De=U(M),xe=_(ne),le=G(M),He=te(ne);Se.scrollLeft=De,Se.scrollTop=xe,de.scrollLeft=le,de.scrollTop=He}function q(){var Z=o(x).container;if(!Z){Z=document.createElement("div"),Z.className=a,Z.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(x).container=Z,p(Z),x.appendChild(Z);var M=function(){o(x).onRendered&&o(x).onRendered()};m(Z,"animationstart",M),o(x).onAnimationStart=M}return Z}function F(){function Z(){var Q=o(x).style;if(Q.position==="static"){x.style.setProperty("position","relative",C.important?"important":"");var W=function(J,re,me,ie){function he(Ue){return Ue.replace(/[^-\d\.]/g,"")}var Fe=me[ie];Fe!=="auto"&&he(Fe)!=="0"&&(J.warn("An element that is positioned static has style."+ie+"="+Fe+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+ie+" will be set to 0. Element: ",re),re.style[ie]=0)};W(e,x,Q,"top"),W(e,x,Q,"right"),W(e,x,Q,"bottom"),W(e,x,Q,"left")}}function M(Q,W,J,re){return Q=Q?Q+"px":"0",W=W?W+"px":"0",J=J?J+"px":"0",re=re?re+"px":"0",["left: "+Q,"top: "+W,"right: "+re,"bottom: "+J]}if(O("Injecting elements"),!o(x)){O("Aborting because element has been uninstalled");return}Z();var ne=o(x).container;ne||(ne=q());var Se=i.width,de=i.height,De=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),xe=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(M(-(1+Se),-(1+de),-de,-Se))),le=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),He=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),pt=c(["position: absolute","left: 0","top: 0"]),Re=c(["position: absolute","width: 200%","height: 200%"]),gt=document.createElement("div"),Ge=document.createElement("div"),tt=document.createElement("div"),Dt=document.createElement("div"),Ze=document.createElement("div"),Ft=document.createElement("div");gt.dir="ltr",gt.style.cssText=De,gt.className=a,Ge.className=a,Ge.style.cssText=xe,tt.style.cssText=le,Dt.style.cssText=pt,Ze.style.cssText=He,Ft.style.cssText=Re,tt.appendChild(Dt),Ze.appendChild(Ft),Ge.appendChild(tt),Ge.appendChild(Ze),gt.appendChild(Ge),ne.appendChild(gt);function H(){var Q=o(x);Q&&Q.onExpand?Q.onExpand():O("Aborting expand scroll handler: element has been uninstalled")}function X(){var Q=o(x);Q&&Q.onShrink?Q.onShrink():O("Aborting shrink scroll handler: element has been uninstalled")}m(tt,"scroll",H),m(Ze,"scroll",X),o(x).onExpandScroll=H,o(x).onShrinkScroll=X}function oe(){function Z(le,He,pt){var Re=D(le),gt=U(He),Ge=_(pt);Re.style.setProperty("width",gt+"px",C.important?"important":""),Re.style.setProperty("height",Ge+"px",C.important?"important":"")}function M(le){var He=x.offsetWidth,pt=x.offsetHeight,Re=He!==o(x).lastWidth||pt!==o(x).lastHeight;O("Storing current size",He,pt),P(x,He,pt),n.add(0,function(){if(Re){if(!o(x)){O("Aborting because element has been uninstalled");return}if(!ne()){O("Aborting because element container has not been initialized");return}if(C.debug){var gt=x.offsetWidth,Ge=x.offsetHeight;(gt!==He||Ge!==pt)&&e.warn(r.get(x),"Scroll: Size changed before updating detector elements.")}Z(x,He,pt)}}),n.add(1,function(){if(!o(x)){O("Aborting because element has been uninstalled");return}if(!ne()){O("Aborting because element container has not been initialized");return}K(x,He,pt)}),Re&&le&&n.add(2,function(){if(!o(x)){O("Aborting because element has been uninstalled");return}if(!ne()){O("Aborting because element container has not been initialized");return}le()})}function ne(){return!!o(x).container}function Se(){function le(){return o(x).lastNotifiedWidth===void 0}O("notifyListenersIfNeeded invoked");var He=o(x);if(le()&&He.lastWidth===He.startSize.width&&He.lastHeight===He.startSize.height)return O("Not notifying: Size is the same as the start size, and there has been no notification yet.");if(He.lastWidth===He.lastNotifiedWidth&&He.lastHeight===He.lastNotifiedHeight)return O("Not notifying: Size already notified");O("Current size not notified, notifying..."),He.lastNotifiedWidth=He.lastWidth,He.lastNotifiedHeight=He.lastHeight,hpe(o(x).listeners,function(pt){pt(x)})}function de(){if(O("startanimation triggered."),T(x)){O("Ignoring since element is still unrendered...");return}O("Element rendered.");var le=v(x),He=b(x);(le.scrollLeft===0||le.scrollTop===0||He.scrollLeft===0||He.scrollTop===0)&&(O("Scrollbars out of sync. Updating detector elements..."),M(Se))}function De(){if(O("Scroll detected."),T(x)){O("Scroll event fired while unrendered. Ignoring...");return}M(Se)}if(O("registerListenersAndPositionElements invoked."),!o(x)){O("Aborting because element has been uninstalled");return}o(x).onRendered=de,o(x).onExpand=De,o(x).onShrink=De;var xe=o(x).style;Z(x,xe.width,xe.height)}function ve(){if(O("finalizeDomMutation invoked."),!o(x)){O("Aborting because element has been uninstalled");return}var Z=o(x).style;P(x,Z.width,Z.height),K(x,Z.width,Z.height)}function Ee(){k(x)}function ye(){O("Installing..."),I(),j(),n.add(0,E),n.add(1,F),n.add(2,oe),n.add(3,ve),n.add(4,Ee)}O("Making detectable..."),A(x)?(O("Element is detached"),q(),O("Waiting until element is attached..."),o(x).onRendered=function(){O("Element is now attached"),ye()}):ye()}function S(C){var x=o(C);x&&(x.onExpandScroll&&g(v(C),"scroll",x.onExpandScroll),x.onShrinkScroll&&g(b(C),"scroll",x.onShrinkScroll),x.onAnimationStart&&g(x.container,"animationstart",x.onAnimationStart),x.container&&C.removeChild(x.container))}return{makeDetectable:w,addListener:y,uninstall:S,initDocument:l}},Lg=HR.forEach,mpe=epe,gpe=tpe,vpe=npe,bpe=ope,ype=rpe,qR=YR,xpe=lpe,Mu=fpe,wpe=dpe,Cpe=ppe;function $R(t){return Array.isArray(t)||t.length!==void 0}function e5(t){if(Array.isArray(t))return t;var e=[];return Lg(t,function(n){e.push(n)}),e}function t5(t){return t&&t.nodeType===1}var kpe=function(t){t=t||{};var e;if(t.idHandler)e={get:function(w){return t.idHandler.get(w,!0)},set:t.idHandler.set};else{var n=vpe(),o=bpe({idGenerator:n,stateHandler:Mu});e=o}var r=t.reporter;if(!r){var i=r===!1;r=ype(i)}var s=Nu(t,"batchProcessor",xpe({reporter:r})),a={};a.callOnAdd=!!Nu(t,"callOnAdd",!0),a.debug=!!Nu(t,"debug",!1);var l=gpe(e),c=mpe({stateHandler:Mu}),u,h=Nu(t,"strategy","object"),p=Nu(t,"important",!1),m={reporter:r,batchProcessor:s,stateHandler:Mu,idHandler:e,important:p};if(h==="scroll"&&(qR.isLegacyOpera()?(r.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),h="object"):qR.isIE(9)&&(r.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),h="object")),h==="scroll")u=Cpe(m);else if(h==="object")u=wpe(m);else throw new Error("Invalid strategy name: "+h);var g={};function v(w,S,C){function x(j){var I=l.get(j);Lg(I,function(E){E(j)})}function k(j,I,E){l.add(I,E),j&&E(I)}if(C||(C=S,S=w,w={}),!S)throw new Error("At least one element required.");if(!C)throw new Error("Listener required.");if(t5(S))S=[S];else if($R(S))S=e5(S);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var O=0,A=Nu(w,"callOnAdd",a.callOnAdd),T=Nu(w,"onReady",function(){}),N=Nu(w,"debug",a.debug);Lg(S,function(j){Mu.getState(j)||(Mu.initState(j),e.set(j));var I=e.get(j);if(N&&r.log("Attaching listener to element",I,j),!c.isDetectable(j)){if(N&&r.log(I,"Not detectable."),c.isBusy(j)){N&&r.log(I,"System busy making it detectable"),k(A,j,C),g[I]=g[I]||[],g[I].push(function(){O++,O===S.length&&T()});return}return N&&r.log(I,"Making detectable..."),c.markBusy(j,!0),u.makeDetectable({debug:N,important:p},j,function(E){if(N&&r.log(I,"onElementDetectable"),Mu.getState(E)){c.markAsDetectable(E),c.markBusy(E,!1),u.addListener(E,x),k(A,E,C);var P=Mu.getState(E);if(P&&P.startSize){var D=E.offsetWidth,R=E.offsetHeight;(P.startSize.width!==D||P.startSize.height!==R)&&x(E)}g[I]&&Lg(g[I],function(z){z()})}else N&&r.log(I,"Element uninstalled before being detectable.");delete g[I],O++,O===S.length&&T()})}N&&r.log(I,"Already detecable, adding listener."),k(A,j,C),O++}),O===S.length&&T()}function b(w){if(!w)return r.error("At least one element is required.");if(t5(w))w=[w];else if($R(w))w=e5(w);else return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");Lg(w,function(S){l.removeAllListeners(S),u.uninstall(S),Mu.cleanState(S)})}function y(w){u.initDocument&&u.initDocument(w)}return{listenTo:v,removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:b,initDocument:y}};function Nu(t,e,n){var o=t[e];return o==null&&n!==void 0?n:o}const Spe=qhe(kpe);function jpe(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o?o.push(n):t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var o=t.get(e);o&&o.slice().map(function(r){r(n)}),(o=t.get("*"))&&o.slice().map(function(r){r(e,n)})}}}function n5(){return typeof window<"u"}const o5=()=>{};function Epe(t,e=o5){if(!n5){e();return}window.addEventListener(t,e)}function Ope(t,e=o5){n5&&window.removeEventListener(t,e)}const Tpe={__name:"grid-layout",props:{layout:{type:Array,required:!0},responsiveLayouts:{type:Object,default(){return{}}},colNum:{type:Number,default:12},rowHeight:{type:Number,default:150},maxRows:{type:Number,default:1/0},margin:{type:Array,default(){return[10,10]}},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},preventCollision:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},responsive:{type:Boolean,default:!1},breakpoints:{type:Object,default(){return{lg:1200,md:996,sm:768,xs:480,xxs:0}}},cols:{type:Object,default(){return{lg:12,md:10,sm:6,xs:4,xxs:2}}},useStyleCursor:{type:Boolean,default:!0},transformScale:{type:Number,default:1}},emits:["update:layout","layout-ready","layout-created","layout-before-mount","layout-mounted","layout-updated","breakpoint-changed"],setup(t,{expose:e,emit:n}){const o=t,r=n,i=jpe(),s={el:void 0,placeholderEl:void 0,placeholder:{},emitter:i};e(s);const a=Spe({strategy:"scroll",callOnAdd:!1}),l=f.reactive({width:null,mergedStyle:{},isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:-1},layout:[],layouts:{},lastBreakpoint:null,originalLayout:null});f.provide("emitter",i),f.provide("gridLayout",{props:o,state:l});function c(){i.on("resizeEvent",b),i.on("dragEvent",v),r("layout-created",o.layout),Epe("resize",m)}c(),f.onBeforeMount(()=>{r("layout-before-mount",l.layout)}),f.onMounted(()=>{r("layout-mounted",l.layout)}),f.onBeforeUnmount(()=>{i.off("resizeEvent",b),i.off("dragEvent",v),Ope("resize",m),a&&s.el&&a.uninstall(s.el)}),f.watch(()=>l.width,async(x,k)=>{i.emit("updateWidth",l.width),p(),k===null&&(await f.nextTick(),r("layout-ready",l.layout))}),f.watch(()=>o.layout,()=>{Ghe(o.layout),l.originalLayout=o.layout,h()},{deep:!0,immediate:!0}),f.watch(()=>o.colNum,()=>{l.colNum=o.colNum,i.emit("setColNum",o.colNum)},{immediate:!0}),f.watch(()=>o.rowHeight,()=>{i.emit("setRowHeight",o.rowHeight)}),f.watch(()=>o.isDraggable,()=>{i.emit("setDraggable",o.isDraggable)}),f.watch(()=>o.isResizable,()=>{i.emit("setResizable",o.isResizable)}),f.watch(()=>o.isBounded,()=>{i.emit("setBounded",o.isBounded)}),f.watch(()=>o.transformScale,()=>{i.emit("setTransformScale",o.transformScale)}),f.watch(()=>o.responsive,()=>{o.responsive||(l.layout=sd(l.originalLayout),i.emit("setColNum",o.colNum)),m()}),f.watch(()=>o.maxRows,()=>{i.emit("setMaxRows",o.maxRows)}),f.watch(()=>o.margin,()=>{p()},{deep:!0});function u(x,k){if((x==null?void 0:x.length)!==(k==null?void 0:k.length))return!0;let O=!1,A=0;for(;A<x.length;){const T=x[A],N=Object.keys(T),j=k[A],I=Object.keys(j),E=[...new Set([...N,...I])];let P=0;for(;P<E.length;){const D=E[P];if(T[D]!==j[D]){O=!0;break}P+=1}if(O)break;A+=1}return O}function h(){if(u(o.layout,l.layout)&&(w(),l.layout=sd(o.layout),Dg(l.layout,o.verticalCompact),i.emit("updateWidth",l.width),p(),u(o.layout,l.layout))){const x=sd(l.layout);r("layout-updated",x),r("update:layout",x)}}function p(){l.mergedStyle={height:g()}}function m(){s.el&&(l.width=s.el.offsetWidth),i.emit("resizeEvent")}function g(){var x;if(!o.autoSize)return;const k=((x=o.margin)==null?void 0:x[1])||0;return`${Vhe(l.layout)*(o.rowHeight+k)+k}px`}function v([x,k,O,A,T,N]=[]){let j=DR(l.layout,k);if(j==null&&(j={x:0,y:0}),x==="dragstart"&&!o.verticalCompact&&(l.positionsBeforeDrag=l.layout.reduce((I,{i:E,x:P,y:D})=>({...I,[E]:{x:P,y:D}}),{})),x==="dragmove"||x==="dragstart"?(l.placeholder.x=j.x,l.placeholder.y=j.y,l.placeholder.w=N,l.placeholder.h=T,l.isDragging=!0):l.isDragging=!1,l.layout=z2(l.layout,j,O,A,!0,o.preventCollision),o.restoreOnDrag?(j.static=!0,Dg(l.layout,o.verticalCompact,l.positionsBeforeDrag),j.static=!1):Dg(l.layout,o.verticalCompact),p(),x==="dragend"&&delete l.positionsBeforeDrag,u(o.layout,l.layout)){const I=sd(l.layout);r("layout-updated",I),r("update:layout",I)}}function b([x,k,O,A,T,N]=[]){let j=DR(l.layout,k);j==null&&(j={h:0,w:0});let I;if(o.preventCollision){const E=IR(l.layout,{...j,w:N,h:T}).filter(P=>P.i!==j.i);if(I=E.length>0,I){let P=1/0,D=1/0;E.forEach(R=>{R.x>j.x&&(P=Math.min(P,R.x)),R.y>j.y&&(D=Math.min(D,R.y))}),Number.isFinite(P)&&(j.w=P-j.x),Number.isFinite(D)&&(j.h=D-j.y)}}if(I||(j.w=N,j.h=T),x==="resizestart"||x==="resizemove"?(l.placeholder.x=O,l.placeholder.y=A,l.placeholder.w=j.w,l.placeholder.h=j.h,l.isDragging=!0):l.isDragging=!1,o.responsive&&y(),Dg(l.layout,o.verticalCompact),p(),u(o.layout,l.layout)){const E=sd(l.layout);r("layout-updated",E),r("update:layout",E)}}function y(){const x=Xhe(o.breakpoints,l.width),k=zR(x,o.cols);k!==l.colNum&&(l.colNum=k,l.layout=Jhe(l.layout,l.layouts,o.breakpoints,x,k,o.verticalCompact),l.layouts[x]=l.layout,i.emit("setColNum",k)),l.lastBreakpoint!==x&&(l.lastBreakpoint=x,r("breakpoint-changed",x,l.layout))}function w(){l.layouts={...o.responsiveLayouts}}function S(x){!x||x===s.el||(s.el=x,a&&a.listenTo(s.el,()=>{m()}),l.width=s.el.offsetWidth)}function C(x){x&&(s.placeholder=x,s.placeholderEl=x.el)}return(x,k)=>(f.openBlock(),f.createElementBlock("div",{ref:S,class:"vue-grid-layout",style:f.normalizeStyle(l.mergedStyle)},[f.renderSlot(x.$slots,"default",{},void 0,!0),f.withDirectives(f.createVNode(_2,{ref:C,class:"vue-grid-placeholder",x:l.placeholder.x,y:l.placeholder.y,w:l.placeholder.w,h:l.placeholder.h,i:"placeholder"},null,8,["x","y","w","h"]),[[f.vShow,l.isDragging]])],4))}},r5=UR(Tpe,[["__scopeId","data-v-a10aee95"]]),es=24,W2=[4,4];function sp(t,e){return t.x<e.x+e.w&&t.x+t.w>e.x&&t.y<e.y+e.h&&t.y+t.h>e.y}function i5(t){if(!t||t.nodeKind!=="form"&&t.nodeKind!=="subForm")return 1;const e=t.children;if(!e||!e.length)return 1;let n=1;return e.forEach(o=>{const r=o.x??0,i=o.w??1,s=r+i;s>n&&(n=s)}),n}function s5(t){if(!t||t.nodeKind!=="form"&&t.nodeKind!=="subForm")return 1;const e=t.children;if(!e||!e.length)return 1;let n=1;return e.forEach(o=>{const r=o.y??0,i=o.h??1,s=r+i;s>n&&(n=s)}),n}function s0(t){if(!t.length)return{x:0,y:0,w:6,h:1};let e=0;return t.forEach(n=>{const o=n.y+n.h;o>e&&(e=o)}),{x:0,y:e,w:6,h:1}}function Bg(t,e,n){const o=Math.min(Math.max(1,e),es),r=Math.max(1,n),i=t.children||[];if(!i.length)return{x:0,y:0,w:o,h:r};const s=Ov(i.map(u=>u.y))??0,a=i.filter(u=>u.y===s),l=a.length?Ov(a.map(u=>u.x+u.w))??0:0;return l+o<=es?{x:l,y:s,w:o,h:r}:{x:0,y:Ov(i.map(u=>u.y+u.h))??0,w:o,h:r}}function a0(t){const e=t.children;if(!(e!=null&&e.length))return;const n=[...e].sort((s,a)=>s.y!==a.y?s.y-a.y:s.x-a.x);let o=0,r=0,i=0;for(const s of n){let a=Math.max(1,Math.min(s.w,es));const l=Math.max(1,s.h);a>es&&(a=es),o>0&&o+a>es&&(r+=i,o=0,i=0),s.x=o,s.y=r,o+=a,i=Math.max(i,l)}}function a5(t){if(!(t!=null&&t.length))return!1;let e=0;for(const n of t){const o=Math.max(1,n.w),r=Math.max(1,n.h);if(n.x<0||n.x+o>es)return!0;e=Math.max(e,n.y+r)}for(let n=0;n<e;n++){const o=t.filter(s=>s.y<=n&&n<s.y+Math.max(1,s.h));if(!o.length)continue;const r=o.map(s=>({x1:s.x,x2:s.x+Math.max(1,s.w)})).sort((s,a)=>s.x1-a.x1);let i=0;for(const s of r){if(s.x1<i)return!0;i=Math.max(i,s.x2)}if(i>es)return!0}return!1}function Ape(t){if(!t)return{clientX:void 0,clientY:void 0};const e=t;if(typeof e.clientX=="number"&&typeof e.clientY=="number"){const i=e.clientX,s=e.clientY;if(Number.isFinite(i)&&Number.isFinite(s))return{clientX:i,clientY:s}}const n=e.changedTouches,o=e.touches,r=(n==null?void 0:n[0])??(o==null?void 0:o[0]);return r&&typeof r.clientX=="number"&&typeof r.clientY=="number"?{clientX:r.clientX,clientY:r.clientY}:{clientX:void 0,clientY:void 0}}function l5(t){var s,a,l,c,u;if(!t)return{gridEl:null,clientX:void 0,clientY:void 0};const e=t.to;let n=typeof t.clientX=="number"&&Number.isFinite(t.clientX)?t.clientX:void 0,o=typeof t.clientY=="number"&&Number.isFinite(t.clientY)?t.clientY:void 0;if(n==null||o==null){const h=Ape(t.originalEvent);n==null&&typeof h.clientX=="number"&&Number.isFinite(h.clientX)&&(n=h.clientX),o==null&&typeof h.clientY=="number"&&Number.isFinite(h.clientY)&&(o=h.clientY)}let r=((s=e==null?void 0:e.querySelector)==null?void 0:s.call(e,".vue-grid-layout"))??null;const i=h=>{var m;if(!h||!(h instanceof HTMLElement))return null;const p=(m=h.closest)==null?void 0:m.call(h,".vue-grid-layout");return p instanceof HTMLElement&&(!e||e.contains(p))?p:null};if(!r&&((a=t.originalEvent)!=null&&a.target)){const h=(c=(l=t.originalEvent.target).closest)==null?void 0:c.call(l,".form-inner-drag-zone");h instanceof HTMLElement&&(r=h.querySelector(".vue-grid-layout")),r||(r=i(t.originalEvent.target))}if(!r&&typeof document<"u"&&n!=null&&o!=null&&Number.isFinite(n)&&Number.isFinite(o)){const h=document.elementsFromPoint(n,o);for(const p of h){if(!(p instanceof Element))continue;const m=(u=p.closest)==null?void 0:u.call(p,".vue-grid-layout");if(m instanceof HTMLElement&&(!e||e.contains(m))){r=m;break}}}return{gridEl:r,clientX:n,clientY:o}}function Mpe(t,e,n,o=80){const{w:r,h:i}=e,s=(c,u)=>t.some(h=>sp({x:c,y:u,w:r,h:i},{x:h.x??0,y:h.y??0,w:Math.max(1,h.w??1),h:Math.max(1,h.h??1)})),a=t.reduce((c,u)=>Math.max(c,(u.y??0)+Math.max(1,u.h??1)),0),l=Math.min(Math.max(a+i+12,e.y+20),e.y+o);for(let c=e.y;c<=l;c++){const u=[];if(c===e.y){for(let h=e.x;h>=0;h--)u.push(h);for(let h=e.x+1;h<=n-r;h++)u.push(h)}else for(let h=0;h<=n-r;h++)u.push(h);for(const h of u)if(!(h<0||h+r>n)&&!s(h,c))return{x:h,y:c,w:r,h:i}}return null}function c5(t,e,n,o,r,i,s,a,l,c="drop"){const u=Math.min(Math.max(1,a),r),h=Math.max(1,l),m=(()=>{if(!e||n==null||o==null||!Number.isFinite(n)||!Number.isFinite(o))return null;const g=e.getBoundingClientRect(),v=g.width>0?g.width:e.offsetWidth||0,[b,y]=s,w=(v-b*(r+1))/r;if(!Number.isFinite(w)||w<=0)return null;const S=n-g.left,C=o-g.top;let x=Math.round((S-b)/(w+b)),k=Math.round((C-y)/(i+y));return x=Math.max(0,Math.min(x,r-u)),k=Math.max(0,k),{x,y:k,w:u,h}})();if(m){if(c==="preview")return m;const g=t.children||[];if(!g.some(y=>sp(m,{x:y.x??0,y:y.y??0,w:Math.max(1,y.w??1),h:Math.max(1,y.h??1)})))return m;const b=Mpe(g,m,r);if(b)return b}return Bg(t,u,h)}function Npe(t,e,n=es,o=400){const r=t.children;if(!(r!=null&&r.length))return;const i=l=>({x:l.x??0,y:l.y??0,w:Math.min(Math.max(1,l.w??1),n),h:Math.max(1,l.h??1)}),s=(l,c)=>{const u=i(l),h=i(c);if(h.y>u.y)return!0;if(h.y<u.y)return!1;if(h.x>u.x)return!0;if(h.x<u.x)return!1;const p=r.indexOf(l);return r.indexOf(c)>p};for(let l=0;l<o;l++){let c=!1;for(const u of r){const h=i(u);if(!sp(e,h))continue;const p=e.y<h.y+h.h&&e.y+e.h>h.y,m=e.x+e.w;if(p&&m+h.w<=n)(u.x??0)!==m&&(u.x=m,c=!0);else{const g=e.y+e.h;if((u.y??0)!==g&&(u.y=g,c=!0),(u.x??0)+h.w>n){const v=Math.max(0,n-h.w);(u.x??0)!==v&&(u.x=v,c=!0)}}}for(let u=0;u<r.length;u++)for(let h=u+1;h<r.length;h++){const p=r[u],m=r[h],g=i(p),v=i(m);if(!sp(g,v))continue;const b=s(p,m)?m:p,y=b===m?p:m,w=i(b),S=i(y),C=S.y<w.y+w.h&&S.y+S.h>w.y,x=S.x+S.w;if(C&&x+w.w<=n)(b.x??0)!==x&&(b.x=x,c=!0);else{const k=S.y+S.h;if((b.y??0)!==k&&(b.y=k,c=!0),(b.x??0)+w.w>n){const O=Math.max(0,n-w.w);(b.x??0)!==O&&(b.x=O,c=!0)}}}if(!c)break}for(const l of r){let c=0;for(;c++<120&&sp(e,i(l));)l.y=(l.y??0)+1}let a=!1;for(let l=0;l<r.length;l++){for(let c=l+1;c<r.length;c++)if(sp(i(r[l]),i(r[c]))){a=!0;break}if(a)break}a&&a0(t)}function Ppe(t,e,n,o,r,i,s,a){const[l,c]=a,h=((t.offsetWidth||t.getBoundingClientRect().width)-l*(i+1))/i;if(!Number.isFinite(h)||h<=0)return null;const p=Math.round(h*e+(e+1)*l),m=Math.round(s*n+(n+1)*c),g=o===1/0?o:Math.round(h*o+Math.max(0,o-1)*l),v=r===1/0?r:Math.round(s*r+Math.max(0,r-1)*c);return!Number.isFinite(g)||!Number.isFinite(v)?null:{left:p,top:m,width:g,height:v}}const u5=48,f5={flmInput:"输入框",flmSelect:"选择器",flmInputNumber:"数字输入框",flmDatePicker:"日期选择器",flmTimePicker:"时间选择器",flmTimeSelect:"时间选择",flmUpload:"上传",flmCascader:"级联选择器",flmCheckbox:"多选框",flmColorPicker:"取色器",flmRadio:"单选框",flmRate:"评分",flmRead:"查看",flmTime:"当前时间",flmSlider:"滑块",flmSwitch:"开关",flmTransfer:"穿梭框",flmButton:"按钮",flmDialog:"弹窗",flmDrawer:"抽屉",flmPagination:"分页器",flmCustom:"业务组件"},Dpe=new Set(Object.keys(f5).filter(t=>t!=="flmCustom")),Ipe=["flmInput","flmSelect","flmInputNumber","flmDatePicker","flmTimePicker","flmTimeSelect","flmCascader"],Rpe=["flmInput","flmDatePicker","flmTimePicker","flmTimeSelect","flmCascader"],Lpe=[{key:"container-form",type:"form",label:"表单",icon:"📋"},{key:"container-subForm",type:"subForm",label:"子表单",icon:"📊"},{key:"container-slot",type:"groupSlot",label:"插槽",icon:"🧷"}],Bpe=[{key:"formSlot",type:"formSlot",label:"表单插槽",icon:"🧷"},{key:"flmInput",type:"flmInput",label:"输入框",icon:"📝"},{key:"flmSelect",type:"flmSelect",label:"选择器",icon:"📋"},{key:"flmInputNumber",type:"flmInputNumber",label:"数字输入框",icon:"🔢"},{key:"flmDatePicker",type:"flmDatePicker",label:"日期选择器",icon:"📅"},{key:"flmTimePicker",type:"flmTimePicker",label:"时间选择器",icon:"⏰"},{key:"flmTimeSelect",type:"flmTimeSelect",label:"时间选择",icon:"⏱"},{key:"flmUpload",type:"flmUpload",label:"上传",icon:"📤"},{key:"flmCascader",type:"flmCascader",label:"级联选择器",icon:"📂"},{key:"flmCheckbox",type:"flmCheckbox",label:"多选框",icon:"☑️"},{key:"flmColorPicker",type:"flmColorPicker",label:"取色器",icon:"🎨"},{key:"flmRadio",type:"flmRadio",label:"单选框",icon:"⭕"},{key:"flmRate",type:"flmRate",label:"评分",icon:"⭐"},{key:"flmRead",type:"flmRead",label:"查看",icon:"👁"},{key:"flmTime",type:"flmTime",label:"当前时间",icon:"🕐"},{key:"flmSlider",type:"flmSlider",label:"滑块",icon:"🎚"},{key:"flmSwitch",type:"flmSwitch",label:"开关",icon:"🔘"},{key:"flmTransfer",type:"flmTransfer",label:"穿梭框",icon:"↔️"}];function Vg(t){return t==="flmTransfer"?{w:24,h:7}:t==="flmCustom"?{w:8,h:1}:{w:8,h:1}}function l0(t){return f5[t]??t}function H2(t){return{label:l0(t),required:!1,showMessage:!0,inlineMessage:!1}}function c0(t){return t==="flmSelect"?{placeholder:"请选择",options:[{label:"选项1",value:"1"},{label:"选项2",value:"2"}]}:t==="flmForm"?{items:[],buttons:[{event:"submit",buttonText:"提交",type:"primary"},{event:"cancel",buttonText:"取消"},{event:"reset",buttonText:"重置"}]}:t==="flmInput"?{placeholder:"请输入",clearable:!0}:t==="flmInputNumber"?{placeholder:"请输入",min:0,max:100,step:1}:t==="flmDatePicker"?{placeholder:"选择日期",clearable:!0}:t==="flmTimePicker"?{placeholder:"选择时间",clearable:!0}:t==="flmTimeSelect"?{placeholder:"选择时间",start:"08:00",end:"18:00",step:"00:30"}:t==="flmCascader"?{placeholder:"请选择",options:[]}:t==="flmUpload"?{action:"#","show-file-list":!0,"auto-upload":!0}:t==="flmCheckbox"?{label:"选项"}:t==="flmColorPicker"?{showAlpha:!0}:t==="flmRadio"?{radios:[{label:"选项1"},{label:"选项2"}]}:t==="flmRate"?{max:5,"allow-half":!0}:t==="flmRead"?{"model-value":"示例文本"}:t==="flmTime"?{formatPreset:"date",format:"YYYY-MM-DD"}:t==="flmSlider"?{min:0,max:100,step:1}:t==="flmSwitch"?{"active-text":"开","inactive-text":"关"}:t==="flmTransfer"?{titles:["列表1","列表2"],data:[]}:t==="flmCustom"?{}:t==="flmButton"?{buttonText:"按钮"}:t==="flmDialog"?{title:"弹窗",width:"50%"}:t==="flmDrawer"?{title:"抽屉",direction:"rtl",size:"30%"}:t==="flmPagination"?{total:0,"page-size":10,layout:"total, prev, pager, next"}:{}}function G2(t){return c0(t)}function Vpe(){return[]}const Fpe={class:"form-canvas-area"},zpe={class:"canvas-toolbar"},_pe={class:"canvas-toolbar-actions"},Upe={class:"form-widget-container"},Wpe=["onClick"],Hpe={class:"module-title-wrap"},Gpe={class:"module-title"},Kpe={class:"module-header-actions"},Ype={class:"module-body"},Xpe=["data-palette-drop-group"],Jpe={key:0,class:"slot-placeholder"},Qpe=["data-palette-drop-form"],Zpe=["onClick"],qpe={class:"widget-actions"},$pe={key:0,class:"slot-placeholder slot-placeholder--inner"},eme={key:1,class:"custom-widget-placeholder"},tme={class:"custom-widget-name"},nme={key:2,class:"form-inner"},ome=["data-palette-drop-form"],rme=["onClick"],ime={class:"widget-actions"},sme={key:0,class:"slot-placeholder slot-placeholder--inner"},ame={key:1,class:"custom-widget-placeholder"},lme={class:"custom-widget-name"},cme={class:"global-buttons-bar"},ume={class:"global-buttons-list"},fme={key:1,class:"global-buttons-empty"},dme=f.defineComponent({name:"FormDesignArea"}),hme=f.defineComponent({...dme,props:{layout:{},dropZoneList:{},containerDropList:{},selectedId:{},selectedFormChild:{},colNum:{},rowHeight:{},getDefaultLabel:{type:Function},getDefaultConfig:{type:Function},getDefaultConfigForChild:{type:Function},buttons:{}},emits:["update:layout","drop-from-palette","inner-layout-updated","grid-widget-capture","select-form-child","clear-selection","open-preview","save","reset","copy-widget","delete-widget","copy-form-child","delete-form-child","select-global-button","drop-container","drop-container-in-root","auto-compact-inner"],setup(t,{expose:e,emit:n}){const o={flmInput:yl,flmSelect:Wf,flmInputNumber:Vf,flmUpload:dc,flmDatePicker:GS,flmTimePicker:Kf,flmTimeSelect:Yf,flmCascader:Lf,flmCheckbox:bl,flmColorPicker:Bf,flmRadio:Ff,flmRate:zf,flmRead:_f,flmTime:Uf,flmSlider:Hf,flmSwitch:Gf,flmTransfer:Xf,flmButton:Rf,flmDialog:Jf,flmPagination:cg},r=t,i=n,s=f.computed({get:()=>r.layout,set:E=>i("update:layout",E)}),a=".el-button, .el-tag, .form-inner-control-wrap, .custom-widget-placeholder, .vue-resizable-handle, .vue-rtl-resizable-handle, .vue-draggable-handle",l={name:"rootLayout",put:!0,pull:!1};function c(E,P){i("grid-widget-capture",E,P)}let u=0;function h(E){const P=r.layout[E.newIndex];if(!P||P.nodeKind==="group")return;const D=P.type;if(D!=="form"&&D!=="subForm"&&D!=="groupSlot"){const R=[...r.layout];R.splice(E.newIndex,1),i("update:layout",R);const z=Date.now();z-u>2e3&&(u=z,kt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"));return}i("drop-container-in-root",E.newIndex)}function p(E,P){i("inner-layout-updated",E,P)}function m(E,P){i("select-form-child",E,P)}const g=(E,P)=>{i("delete-widget",E)};function v(E,P){i("copy-form-child",E,P)}function b(E,P){i("delete-form-child",E,P)}function y(E){i("select-global-button",E)}function w(){const E=r.containerDropList;if(E.filter(D=>D.type!=="form"&&D.type!=="subForm"&&D.type!=="groupSlot").length>0){E.splice(0,E.length,...E.filter(R=>R.type==="form"||R.type==="subForm"||R.type==="groupSlot"));const D=Date.now();D-u>2e3&&(u=D,kt.ElMessage.warning("请先将控件拖入容器(表单/子表单)内部"))}E.length>0&&i("drop-container")}function S(E){return(E.children||[]).some(P=>P.nodeKind==="form"||P.nodeKind==="subForm")}function C(E){const P=(E.children||[]).find(D=>D.nodeKind==="form"||D.nodeKind==="subForm");P&&i("auto-compact-inner",P)}function x(E){return{...E.config||r.getDefaultConfigForChild(E.type)||{},disabled:!0,readonly:!0,"auto-upload":!1}}function k(E){const P=(E.children||[])[0];return P?P.nodeKind==="slot"?"插槽":P.nodeKind==="subForm"?"子表单":"表单":"未设置"}function O(E){const P=(E.children||[])[0];return P?P.nodeKind==="slot"?"warning":P.nodeKind==="subForm"?"success":"primary":"info"}const A=f.shallowRef(null);function T(E){if(E.kind==="custom")return Vg("flmCustom");const P=E.type;return P==="formSlot"?{w:24,h:1}:P==="flmCustom"?Vg("flmCustom"):P&&typeof P=="string"?Vg(P):{w:8,h:1}}function N(E){for(const P of r.layout)for(const D of P.children||[])if(D.i===E&&(D.nodeKind==="form"||D.nodeKind==="subForm"))return D;return null}function j(E){if(!E){A.value=null;return}const P=N(E.formChildId);if(!P){A.value=null;return}const{gridEl:D,clientX:R,clientY:z}=l5({to:E.sortableToEl,originalEvent:E.originalEvent,clientX:E.clientX,clientY:E.clientY});if(!D||R==null||z==null){A.value=null;return}const{w:U,h:_}=T(E.dragged),G=c5(P,D,R,z,r.colNum,r.rowHeight,W2,U,_,"preview"),te=Ppe(D,G.x,G.y,G.w,G.h,r.colNum,r.rowHeight,W2);if(!te){A.value=null;return}const K=D.getBoundingClientRect();A.value={position:"fixed",left:`${K.left+te.left}px`,top:`${K.top+te.top}px`,width:`${te.width}px`,height:`${te.height}px`,zIndex:"10020",pointerEvents:"none",boxSizing:"border-box"}}function I(){A.value=null}return e({updatePaletteDropPreview:j,clearPaletteDropPreview:I}),(E,P)=>{const D=f.resolveComponent("el-button"),R=f.resolveComponent("el-tag"),z=f.resolveComponent("el-icon"),U=f.resolveComponent("el-form-item"),_=f.resolveComponent("el-form");return f.openBlock(),f.createElementBlock("div",Fpe,[f.createElementVNode("div",zpe,[P[9]||(P[9]=f.createElementVNode("span",{class:"canvas-title"},"表单设计区",-1)),f.createElementVNode("div",_pe,[f.createVNode(D,{type:"primary",size:"small",onClick:P[0]||(P[0]=G=>E.$emit("open-preview"))},{default:f.withCtx(()=>[...P[6]||(P[6]=[f.createTextVNode("预览",-1)])]),_:1}),f.createVNode(D,{type:"success",size:"small",onClick:P[1]||(P[1]=G=>E.$emit("save"))},{default:f.withCtx(()=>[...P[7]||(P[7]=[f.createTextVNode("保存",-1)])]),_:1}),f.createVNode(D,{type:"warning",size:"small",onClick:P[2]||(P[2]=G=>E.$emit("reset"))},{default:f.withCtx(()=>[...P[8]||(P[8]=[f.createTextVNode("重置",-1)])]),_:1})])]),(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[A.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:"flame-fw-grid-drop-preview",style:f.normalizeStyle(A.value)},null,4)):f.createCommentVNode("",!0)])),f.createElementVNode("div",{class:"form-canvas",onClick:P[5]||(P[5]=f.withModifiers(G=>E.$emit("clear-selection"),["self"]))},[f.createElementVNode("div",Upe,[f.createVNode(f.unref(x2),{modelValue:s.value,"onUpdate:modelValue":P[3]||(P[3]=G=>s.value=G),"item-key":"i",group:l,sort:!0,filter:a,"prevent-on-filter":!1,"ghost-class":"ghost",class:"module-list",onAdd:h},{item:f.withCtx(({element:G})=>[f.createElementVNode("div",{class:f.normalizeClass(["module-wrap",{"grid-widget-wrap--selected":t.selectedId===G.i}])},[f.createElementVNode("div",{class:"module-header",onClick:te=>c(te,G)},[f.createElementVNode("div",Hpe,[f.createVNode(R,{type:O(G),size:"small",effect:"light"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(k(G)),1)]),_:2},1032,["type"]),f.createElementVNode("span",Gpe,f.toDisplayString(G.label||"分组"),1)]),f.createElementVNode("div",Kpe,[S(G)?(f.openBlock(),f.createBlock(D,{key:0,type:"primary",link:"",size:"small",onClick:f.withModifiers(te=>C(G),["stop"])},{default:f.withCtx(()=>[...P[10]||(P[10]=[f.createTextVNode(" 自动排序 ",-1)])]),_:1},8,["onClick"])):f.createCommentVNode("",!0),f.createVNode(D,{type:"danger",link:"",size:"small",onClick:te=>g(G)},{default:f.withCtx(()=>[...P[11]||(P[11]=[f.createTextVNode(" 删除分组 ",-1)])]),_:1},8,["onClick"])])],8,Wpe),f.createElementVNode("div",Ype,[G.children&&G.children.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:1},f.renderList(G.children||[],te=>(f.openBlock(),f.createElementBlock("div",{key:te.i,class:"module-body-content"},[te.nodeKind==="slot"&&te.type==="groupSlot"?(f.openBlock(),f.createElementBlock("div",Jpe,[...P[13]||(P[13]=[f.createElementVNode("div",{class:"slot-title"},"分组插槽",-1)])])):te.nodeKind==="form"?(f.openBlock(),f.createBlock(_,{key:1,class:"form-inner"},{default:f.withCtx(()=>[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":te.i},[f.createVNode(f.unref(r5),{layout:te.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:K=>p(K,te)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(te.children||[],K=>(f.openBlock(),f.createBlock(f.unref(_2),{key:K.i,x:K.x,y:K.y,w:K.w,h:K.h,i:K.i},{default:f.withCtx(()=>{var q,F,oe,ve;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((q=t.selectedFormChild)==null?void 0:q.formId)===G.i&&((F=t.selectedFormChild)==null?void 0:F.childId)===K.i,"form-inner-control-wrap--slot":K.nodeKind==="slot"}]),onClick:f.withModifiers(Ee=>m(G,K),["stop"])},[f.createElementVNode("div",qpe,[f.createVNode(D,{type:"primary",link:"",size:"small",onClick:f.withModifiers(Ee=>v(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.CopyDocument))]),_:1})]),_:1},8,["onClick"]),f.createVNode(D,{type:"danger",link:"",size:"small",onClick:f.withModifiers(Ee=>b(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(U,{label:K.nodeKind==="slot"&&K.type==="formSlot"?"":((oe=K.formItem)==null?void 0:oe.label)??K.label??t.getDefaultLabel(K.type),"label-width":K.nodeKind==="slot"&&K.type==="formSlot"?"0":"",required:(ve=K.formItem)==null?void 0:ve.required,class:"canvas-form-item"},{default:f.withCtx(()=>[K.nodeKind==="slot"&&K.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",$pe,[...P[14]||(P[14]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):K.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",eme,[f.createElementVNode("span",tme,f.toDisplayString(K.label||K.customComponentName||"自定义组件"),1)])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[K.type]||yl),{key:2,config:x(K)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,Zpe)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,Qpe)]),_:2},1024)):te.nodeKind==="subForm"?(f.openBlock(),f.createElementBlock("div",nme,[f.createElementVNode("div",{class:"form-inner-drag-zone","data-palette-drop-form":te.i},[f.createVNode(f.unref(r5),{layout:te.children||[],"col-num":t.colNum,"row-height":t.rowHeight,"is-draggable":!0,"is-resizable":!0,"vertical-compact":!1,margin:[4,4],class:"form-inner-grid-layout",onLayoutUpdated:K=>p(K,te)},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(te.children||[],K=>(f.openBlock(),f.createBlock(f.unref(_2),{key:K.i,x:K.x,y:K.y,w:K.w,h:K.h,i:K.i},{default:f.withCtx(()=>{var q,F,oe,ve;return[f.createElementVNode("div",{class:f.normalizeClass(["form-inner-control-wrap",{"form-inner-control-wrap--selected":((q=t.selectedFormChild)==null?void 0:q.formId)===G.i&&((F=t.selectedFormChild)==null?void 0:F.childId)===K.i,"form-inner-control-wrap--slot":K.nodeKind==="slot"}]),onClick:f.withModifiers(Ee=>m(G,K),["stop"])},[f.createElementVNode("div",ime,[f.createVNode(D,{type:"primary",link:"",size:"small",onClick:f.withModifiers(Ee=>v(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.CopyDocument))]),_:1})]),_:1},8,["onClick"]),f.createVNode(D,{type:"danger",link:"",size:"small",onClick:f.withModifiers(Ee=>b(te,K),["stop"])},{default:f.withCtx(()=>[f.createVNode(z,null,{default:f.withCtx(()=>[f.createVNode(f.unref(_a.Delete))]),_:1})]),_:1},8,["onClick"])]),f.createVNode(U,{label:K.nodeKind==="slot"&&K.type==="formSlot"?"":((oe=K.formItem)==null?void 0:oe.label)??K.label??t.getDefaultLabel(K.type),"label-width":K.nodeKind==="slot"&&K.type==="formSlot"?"0":"",required:(ve=K.formItem)==null?void 0:ve.required,class:"canvas-form-item"},{default:f.withCtx(()=>[K.nodeKind==="slot"&&K.type==="formSlot"?(f.openBlock(),f.createElementBlock("div",sme,[...P[15]||(P[15]=[f.createElementVNode("div",{class:"slot-title"},"表单插槽",-1)])])):K.type==="flmCustom"?(f.openBlock(),f.createElementBlock("div",ame,[f.createElementVNode("span",lme,f.toDisplayString(K.customComponentName||"业务组件"),1),P[16]||(P[16]=f.createElementVNode("span",{class:"custom-widget-hint"},"(运行时渲染)",-1))])):(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o[K.type]||yl),{key:2,config:x(K)},null,8,["config"]))]),_:2},1032,["label","label-width","required"])],10,rme)]}),_:2},1032,["x","y","w","h","i"]))),128))]),_:2},1032,["layout","col-num","row-height","onLayoutUpdated"])],8,ome)])):f.createCommentVNode("",!0)]))),128)):(f.openBlock(),f.createElementBlock("div",{key:0,class:"module-inner-drop-zone","data-palette-drop-group":G.i},[...P[12]||(P[12]=[f.createElementVNode("span",{class:"drop-hint"},"请拖入或右侧选择分组类型",-1)])],8,Xpe))])],2)]),_:1},8,["modelValue"]),f.createVNode(f.unref(x2),{list:t.containerDropList,"item-key":"id",group:{name:"containers",put:!0},sort:!1,class:"container-drop-zone",onAdd:P[4]||(P[4]=G=>w())},{item:f.withCtx(({element:G})=>[(f.openBlock(),f.createElementBlock("span",{key:G.id}))]),footer:f.withCtx(()=>[...P[17]||(P[17]=[f.createElementVNode("span",{class:"drop-hint"},"拖入容器创建分组",-1)])]),_:1},8,["list"]),f.createElementVNode("div",cme,[P[18]||(P[18]=f.createElementVNode("span",{class:"global-buttons-label"},"功能按钮:",-1)),f.createElementVNode("div",ume,[r.buttons&&r.buttons.length?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(r.buttons,(G,te)=>(f.openBlock(),f.createBlock(D,{key:te,type:G.type||"default",size:"small",onClick:f.withModifiers(K=>y(te),["stop"])},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(G.text||G.buttonText||G.label||"按钮"),1)]),_:2},1032,["type","onClick"]))),128)):(f.openBlock(),f.createElementBlock("span",fme,"(请在右侧“功能按钮”中配置)"))])])])])])}}}),pme=qr(hme,[["__scopeId","data-v-fa8a81c4"]]),mme={class:"preview-canvas"},gme=f.defineComponent({name:"PreviewDialog"}),vme=f.defineComponent({...gme,props:{modelValue:{type:Boolean},config:{}},emits:["update:modelValue"],setup(t){const e=t,n=f.ref(0);f.watch(()=>e.modelValue,l=>{l||n.value++});const o=f.computed(()=>{const l=e.config||{};return!!(l&&Array.isArray(l.groups)&&l.groups.length)});function r(l){console.log("[PreviewDialog] submit formModel:",l)}function i(l){console.log("[PreviewDialog] cancel formModel:",l)}function s(l){console.log("[PreviewDialog] reset formModel:",l)}function a(l){const c=(l==null?void 0:l.data)??(l==null?void 0:l.payload)??(l==null?void 0:l.formModel);console.log("[PreviewDialog] custom event:",l==null?void 0:l.event,"valid:",l==null?void 0:l.valid,c,l==null?void 0:l.button)}return(l,c)=>{const u=f.resolveComponent("el-dialog");return f.openBlock(),f.createBlock(u,{"model-value":t.modelValue,title:"表单预览",width:"960px","destroy-on-close":"",class:"preview-dialog","onUpdate:modelValue":c[0]||(c[0]=h=>l.$emit("update:modelValue",h))},{default:f.withCtx(()=>[f.createElementVNode("div",mme,[o.value?(f.openBlock(),f.createBlock($S,{key:n.value,config:t.config,onSubmit:r,onCancel:i,onReset:s,onCustomEvent:a},null,8,["config"])):f.createCommentVNode("",!0)])]),_:1},8,["model-value"])}}}),bme=qr(vme,[["__scopeId","data-v-ff02b3af"]]),yme={class:"settings-panel"},xme={key:0,class:"settings-form-wrap"},wme=["onClick","onKeydown"],Cme={class:"attr-group__title"},kme={class:"attr-group__body"},Sme={key:1,class:"settings-empty"},jme=f.defineComponent({name:"SettingsPanel"}),Eme=f.defineComponent({...jme,props:{selectedItem:{},groupsConfig:{}},setup(t){const e=t,n=f.ref({});f.watch(()=>e.groupsConfig,i=>{const s={};i==null||i.forEach(a=>{s[a.name]=n.value[a.name]??a.defaultOpen!==!1}),n.value=s},{immediate:!0});const o=f.computed(()=>{const i=e.groupsConfig||[],s=e.selectedItem;return s?i.filter(a=>!a.visible||a.visible(s)):[]});function r(i){n.value={...n.value,[i]:!n.value[i]}}return(i,s)=>{const a=f.resolveComponent("el-icon");return f.openBlock(),f.createElementBlock("div",yme,[s[0]||(s[0]=f.createElementVNode("div",{class:"panel-title"},"属性",-1)),t.selectedItem?(f.openBlock(),f.createElementBlock("div",xme,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(o.value,l=>(f.openBlock(),f.createElementBlock("div",{key:l.name,class:"attr-group"},[f.createElementVNode("div",{class:"attr-group__header",onClick:c=>r(l.name),role:"button",tabindex:"0",onKeydown:f.withKeys(f.withModifiers(c=>r(l.name),["prevent"]),["enter","space"])},[f.createVNode(a,{class:f.normalizeClass(["attr-group__arrow",{"is-collapsed":!n.value[l.name]}])},{default:f.withCtx(()=>[f.createVNode(f.unref(_a.ArrowRight))]),_:1},8,["class"]),f.createElementVNode("span",Cme,f.toDisplayString(l.title),1)],40,wme),f.withDirectives(f.createElementVNode("div",kme,[f.createVNode(f.unref(kt.ElConfigProvider),{size:"small"},{default:f.withCtx(()=>[f.renderSlot(i.$slots,l.name,{model:t.selectedItem},void 0,!0)]),_:2},1024)],512),[[f.vShow,n.value[l.name]]])]))),128))])):(f.openBlock(),f.createElementBlock("div",Sme," 点击设计区中的控件以编辑属性 "))])}}}),Ome=qr(Eme,[["__scopeId","data-v-20671d90"]]),Tme={class:"framework-attr-fields-form"},Ame={key:1,class:"unsupported-hint"},Mme=f.defineComponent({name:"FrameworkAttrFieldsForm"}),Nme=f.defineComponent({...Mme,props:{fields:{},model:{},formProps:{}},setup(t){const e=t;function n(b,y){return fv(b,y)}function o(b,y,w){const S=Or(w);IT(b,y,S)}function r(b){if(!b.visible)return!0;try{return b.visible(e.model)}catch{return!0}}const i={input:Ht.ControlTypes.flmInput,"input-number":Ht.ControlTypes.flmInputNumber,slider:Ht.ControlTypes.flmSlider,switch:Ht.ControlTypes.flmSwitch,select:Ht.ControlTypes.flmSelect},s=f.reactive({}),a=f.ref(null),l=f.computed(()=>e.fields.filter(r)),c=f.computed(()=>l.value.filter(b=>!i[b.component])),u=f.computed(()=>l.value.filter(b=>i[b.component]).map(b=>{const y=i[b.component];return{prop:b.key,label:b.label,controlType:y,controlConfig:{...b.props??{},"model-value":s[b.key]}}})),h=f.computed(()=>({size:Ht.ElementSize.small,"label-position":"right","label-width":"120px",...e.formProps??{}})),p=f.computed(()=>({...h.value,model:s,items:u.value}));let m=!1;function g(){l.value.forEach(b=>{i[b.component]&&(s[b.key]=n(e.model,b.key))})}function v(){var y;const b=(y=a.value)==null?void 0:y.formModel;b&&l.value.forEach(w=>{if(!i[w.component])return;const S=b[w.key];o(e.model,w.key,S)})}return f.watch(()=>e.model,()=>{m||(m=!0,g(),m=!1)},{deep:!0,immediate:!0}),f.watch(()=>{var b;return(b=a.value)==null?void 0:b.formModel},()=>{m||(m=!0,v(),m=!1)},{deep:!0}),(b,y)=>(f.openBlock(),f.createElementBlock("div",Tme,[t.model&&u.value.length?(f.openBlock(),f.createBlock(f.unref(Cu),{key:0,ref_key:"flmFormRef",ref:a,config:p.value,type:"edit"},null,8,["config"])):f.createCommentVNode("",!0),c.value.length?(f.openBlock(),f.createElementBlock("div",Ame,f.toDisplayString(c.value.map(w=>w.component).join("、"))+"(暂不支持,请扩展 `FrameworkAttrFieldsForm` 映射到 `flmForm`) ",1)):f.createCommentVNode("",!0)]))}}),Pme=qr(Nme,[["__scopeId","data-v-74925a9d"]]),Dme={key:3,class:"settings-empty-hint"},Ime={class:"options-editor"},Rme={class:"json-options-row"},Lme={class:"json-options-hint"},Bme={class:"options-editor"},Vme={class:"json-options-row"},Fme={class:"json-options-hint"},zme={class:"flm-time-format-row"},_me={class:"flm-time-format-tip-trigger",tabindex:"0",role:"button","aria-label":"时间格式说明"},Ume=qr(f.defineComponent({__name:"DetailSettingsSlot",props:{model:{},inputConfig:{},selectConfig:{},inputNumberConfig:{},datePickerConfig:{},timePickerConfig:{},timeSelectConfig:{},cascaderConfig:{},checkboxConfig:{},colorPickerConfig:{},radioConfig:{},rateConfig:{},sliderConfig:{},switchConfig:{},transferConfig:{},buttonConfig:{},dialogConfig:{},drawerConfig:{},paginationConfig:{},readConfig:{},uploadConfig:{},uploadAcceptSelection:{},uploadAcceptTypeOptions:{},timeConfig:{},onFlmTimePresetChange:{type:Function}},setup(t){const e=t;function n(N){e.inputConfig&&(e.inputConfig.maxlength=N??0)}function o(N){e.inputConfig&&(e.inputConfig.minlength=N??0)}function r(N){e.inputConfig&&(e.inputConfig.autosize=!!N)}function i(N,j){N.value=j}function s(N){N.options||(N.options=[]),N.options.push({label:"新选项",value:`opt_${Date.now()}`})}function a(N,j){if(!N.options)return;N.options.splice(j,1)}function l(N){e.checkboxConfig&&(e.checkboxConfig.label=N)}function c(N){N.radios||(N.radios=[]);const j=(N.radios.length||0)+1;N.radios.push({label:`选项${j}`})}function u(N,j){var I;(I=N.radios)==null||I.splice(j,1)}function h(N){return N==null?void 0:N.value}function p(N,j){!N||typeof N!="object"||(N.value=j)}const m=f.computed({get(){var N,j;return((j=(N=e.transferConfig)==null?void 0:N.titles)==null?void 0:j[0])??""},set(N){if(!e.transferConfig)return;const j=e.transferConfig.titles||[];e.transferConfig.titles=[N,j[1]??""]}}),g=f.computed({get(){var N,j;return((j=(N=e.transferConfig)==null?void 0:N.titles)==null?void 0:j[1])??""},set(N){if(!e.transferConfig)return;const j=e.transferConfig.titles||[];e.transferConfig.titles=[j[0]??"",N]}}),v=f.ref([]);f.watch(()=>{const N=e.model;return(N==null?void 0:N.type)!=="flmCascader"||!N.config?null:N.i},N=>{if(!N){v.value=[];return}const j=e.model;if((j==null?void 0:j.type)!=="flmCascader"||!j.config)return;const I=j.config.options;v.value=Or(Array.isArray(I)?I:[])},{immediate:!0}),f.watch(v,N=>{const j=e.model;(j==null?void 0:j.type)!=="flmCascader"||!j.config||Array.isArray(N)&&(j.config.options=Or(N))},{deep:!0});const b=f.ref([]);f.watch(()=>{const N=e.model;return(N==null?void 0:N.type)!=="flmTransfer"||!N.config?null:N.i},N=>{if(!N){b.value=[];return}const j=e.model;if((j==null?void 0:j.type)!=="flmTransfer"||!j.config)return;const I=j.config.data;b.value=Or(Array.isArray(I)?I:[])},{immediate:!0}),f.watch(b,N=>{const j=e.model;(j==null?void 0:j.type)!=="flmTransfer"||!j.config||Array.isArray(N)&&(j.config.data=Or(N))},{deep:!0});const y=f.ref(!1),w=f.ref(null),S=f.ref([]),C=f.computed(()=>w.value==="cascader"?"编辑级联选项":"编辑穿梭框选项"),x=f.computed(()=>{const N=v.value;return Array.isArray(N)?N.length?`共 ${N.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"}),k=f.computed(()=>{const N=b.value;return Array.isArray(N)?N.length?`共 ${N.length} 项`:"暂无选项,点击编辑添加":"当前不是数组,请点击编辑修正"});function O(N){w.value=N,S.value=Or(N==="cascader"?v.value:b.value),y.value=!0}function A(){const N=S.value;if(!Array.isArray(N)){kt.ElMessage.warning("请配置为 JSON 数组");return}const j=w.value;j==="cascader"?v.value=Or(N):j==="transfer"&&(b.value=Or(N)),y.value=!1}function T(){w.value=null}return(N,j)=>{const I=f.resolveComponent("el-input"),E=f.resolveComponent("el-form-item"),P=f.resolveComponent("el-radio-button"),D=f.resolveComponent("el-radio-group"),R=f.resolveComponent("el-input-number"),z=f.resolveComponent("el-switch"),U=f.resolveComponent("el-button"),_=f.resolveComponent("el-option"),G=f.resolveComponent("el-select"),te=f.resolveComponent("el-form"),K=f.resolveComponent("el-dialog");return f.openBlock(),f.createElementBlock(f.Fragment,null,[t.model?(f.openBlock(),f.createBlock(te,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>{var q;return[t.model.type==="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[t.model.customComponentName?(f.openBlock(),f.createBlock(E,{key:0,label:"业务组件"},{default:f.withCtx(()=>[f.createVNode(I,{"model-value":t.model.customComponentName,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),t.model.customKey?(f.openBlock(),f.createBlock(E,{key:1,label:"组件键"},{default:f.withCtx(()=>[f.createVNode(I,{"model-value":t.model.customKey,disabled:""},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),(q=t.model.customAttrFields)!=null&&q.length?(f.openBlock(),f.createBlock(Pme,{key:2,fields:t.model.customAttrFields,model:t.model},null,8,["fields","model"])):(f.openBlock(),f.createElementBlock("div",Dme,"未配置属性字段(attrFields)"))],64)):t.inputConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(E,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(D,{modelValue:t.inputConfig.type,"onUpdate:modelValue":j[0]||(j[0]=F=>t.inputConfig.type=F)},{default:f.withCtx(()=>[f.createVNode(P,{value:"text"},{default:f.withCtx(()=>[...j[82]||(j[82]=[f.createTextVNode("单行",-1)])]),_:1}),f.createVNode(P,{value:"textarea"},{default:f.withCtx(()=>[...j[83]||(j[83]=[f.createTextVNode("多行",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"最大长度"},{default:f.withCtx(()=>[f.createVNode(R,{"model-value":Number(t.inputConfig.maxlength??0),"onUpdate:modelValue":n,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1}),f.createVNode(E,{label:"最小长度"},{default:f.withCtx(()=>[f.createVNode(R,{"model-value":Number(t.inputConfig.minlength??0),"onUpdate:modelValue":o,min:0,step:1,"controls-position":"right"},null,8,["model-value"])]),_:1}),f.createVNode(E,{label:"显示字数统计"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig["show-word-limit"],"onUpdate:modelValue":j[1]||(j[1]=F=>t.inputConfig["show-word-limit"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示密码"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig["show-password"],"onUpdate:modelValue":j[2]||(j[2]=F=>t.inputConfig["show-password"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"只读"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig.readonly,"onUpdate:modelValue":j[3]||(j[3]=F=>t.inputConfig.readonly=F)},null,8,["modelValue"])]),_:1}),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(E,{key:0,label:"行数"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputConfig.rows,"onUpdate:modelValue":j[4]||(j[4]=F=>t.inputConfig.rows=F),min:1,step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),t.inputConfig.type==="textarea"?(f.openBlock(),f.createBlock(E,{key:1,label:"自动高度"},{default:f.withCtx(()=>[f.createVNode(z,{"model-value":!!t.inputConfig.autosize,"onUpdate:modelValue":r},null,8,["model-value"])]),_:1})):f.createCommentVNode("",!0),f.createVNode(E,{label:"名称"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.inputConfig.name,"onUpdate:modelValue":j[5]||(j[5]=F=>t.inputConfig.name=F),placeholder:"表单字段名",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"校验事件"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputConfig["validate-event"],"onUpdate:modelValue":j[6]||(j[6]=F=>t.inputConfig["validate-event"]=F)},null,8,["modelValue"])]),_:1})],64)):t.selectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:2},[f.createVNode(E,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Ime,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.selectConfig.options||[],(F,oe)=>(f.openBlock(),f.createElementBlock("div",{key:oe,class:"option-row option-row--kvd"},[f.createVNode(I,{modelValue:F.label,"onUpdate:modelValue":ve=>F.label=ve,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["modelValue","onUpdate:modelValue"]),f.createVNode(I,{"model-value":String(F.value??""),"onUpdate:modelValue":ve=>i(F,ve),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(U,{type:"danger",link:"",size:"small",onClick:ve=>a(t.selectConfig,Number(oe))},{default:f.withCtx(()=>[...j[84]||(j[84]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128)),f.createVNode(U,{type:"primary",link:"",size:"small",onClick:j[7]||(j[7]=F=>s(t.selectConfig))},{default:f.withCtx(()=>[...j[85]||(j[85]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(E,{label:"是否多选"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.selectConfig.multiple,"onUpdate:modelValue":j[8]||(j[8]=F=>t.selectConfig.multiple=F)},null,8,["modelValue"])]),_:1})],64)):t.inputNumberConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:3},[f.createVNode(E,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.min,"onUpdate:modelValue":j[9]||(j[9]=F=>t.inputNumberConfig.min=F),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.max,"onUpdate:modelValue":j[10]||(j[10]=F=>t.inputNumberConfig.max=F),step:1,"controls-position":"right",placeholder:"不限"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.step,"onUpdate:modelValue":j[11]||(j[11]=F=>t.inputNumberConfig.step=F),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"精度"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.inputNumberConfig.precision,"onUpdate:modelValue":j[12]||(j[12]=F=>t.inputNumberConfig.precision=F),min:0,max:20,"controls-position":"right",placeholder:"小数位数"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示控制按钮"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.inputNumberConfig.controls,"onUpdate:modelValue":j[13]||(j[13]=F=>t.inputNumberConfig.controls=F)},null,8,["modelValue"])]),_:1})],64)):t.datePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:4},[f.createVNode(E,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.datePickerConfig.type,"onUpdate:modelValue":j[14]||(j[14]=F=>t.datePickerConfig.type=F),placeholder:"date",clearable:""},{default:f.withCtx(()=>[f.createVNode(_,{label:"年",value:"year"}),f.createVNode(_,{label:"月",value:"month"}),f.createVNode(_,{label:"日",value:"date"}),f.createVNode(_,{label:"周",value:"week"}),f.createVNode(_,{label:"日期时间",value:"datetime"}),f.createVNode(_,{label:"日期范围",value:"daterange"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.datePickerConfig.format,"onUpdate:modelValue":j[15]||(j[15]=F=>t.datePickerConfig.format=F),placeholder:"如 YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.datePickerConfig.editable,"onUpdate:modelValue":j[16]||(j[16]=F=>t.datePickerConfig.editable=F)},null,8,["modelValue"])]),_:1})],64)):t.timePickerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:5},[f.createVNode(E,{label:"格式"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timePickerConfig.format,"onUpdate:modelValue":j[17]||(j[17]=F=>t.timePickerConfig.format=F),placeholder:"如 HH:mm:ss",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可编辑"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.timePickerConfig.editable,"onUpdate:modelValue":j[18]||(j[18]=F=>t.timePickerConfig.editable=F)},null,8,["modelValue"])]),_:1})],64)):t.timeSelectConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:6},[f.createVNode(E,{label:"开始时间"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timeSelectConfig.start,"onUpdate:modelValue":j[19]||(j[19]=F=>t.timeSelectConfig.start=F),placeholder:"08:00",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"结束时间"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timeSelectConfig.end,"onUpdate:modelValue":j[20]||(j[20]=F=>t.timeSelectConfig.end=F),placeholder:"18:00",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.timeSelectConfig.step,"onUpdate:modelValue":j[21]||(j[21]=F=>t.timeSelectConfig.step=F),placeholder:"00:30",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.uploadConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:7},[f.createVNode(E,{label:"上传地址"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.uploadConfig.action,"onUpdate:modelValue":j[22]||(j[22]=F=>t.uploadConfig.action=F),placeholder:"请输入上传接口地址",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"文件字段名"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.uploadConfig.name,"onUpdate:modelValue":j[23]||(j[23]=F=>t.uploadConfig.name=F),placeholder:"默认 file",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"接受类型"},{default:f.withCtx(()=>[f.createVNode(G,{"model-value":t.uploadAcceptSelection,"onUpdate:modelValue":j[24]||(j[24]=F=>t.uploadAcceptSelection=F),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",filterable:"",clearable:"",placeholder:"请选择允许的文件类型,可多选",style:{width:"100%"}},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.uploadAcceptTypeOptions,F=>(f.openBlock(),f.createBlock(_,{key:F.value,label:F.label,value:F.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),_:1}),f.createVNode(E,{label:"列表样式"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.uploadConfig["list-type"],"onUpdate:modelValue":j[25]||(j[25]=F=>t.uploadConfig["list-type"]=F),placeholder:"请选择",clearable:"",style:{width:"100%"}},{default:f.withCtx(()=>[f.createVNode(_,{label:"文本列表",value:"text"}),f.createVNode(_,{label:"缩略图列表",value:"picture"}),f.createVNode(_,{label:"照片墙",value:"picture-card"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"数量限制"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.uploadConfig.limit,"onUpdate:modelValue":j[26]||(j[26]=F=>t.uploadConfig.limit=F),min:1,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"支持多选"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig.multiple,"onUpdate:modelValue":j[27]||(j[27]=F=>t.uploadConfig.multiple=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"拖拽上传"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig.drag,"onUpdate:modelValue":j[28]||(j[28]=F=>t.uploadConfig.drag=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"自动上传"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig["auto-upload"],"onUpdate:modelValue":j[29]||(j[29]=F=>t.uploadConfig["auto-upload"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示文件列表"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig["show-file-list"],"onUpdate:modelValue":j[30]||(j[30]=F=>t.uploadConfig["show-file-list"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.uploadConfig.disabled,"onUpdate:modelValue":j[31]||(j[31]=F=>t.uploadConfig.disabled=F)},null,8,["modelValue"])]),_:1})],64)):t.cascaderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:8},[f.createVNode(E,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.cascaderConfig.filterable,"onUpdate:modelValue":j[32]||(j[32]=F=>t.cascaderConfig.filterable=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示完整路径"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.cascaderConfig["show-all-levels"],"onUpdate:modelValue":j[33]||(j[33]=F=>t.cascaderConfig["show-all-levels"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",Rme,[f.createElementVNode("span",Lme,f.toDisplayString(x.value),1),f.createVNode(U,{type:"primary",link:"",onClick:j[34]||(j[34]=F=>O("cascader"))},{default:f.withCtx(()=>[...j[86]||(j[86]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.checkboxConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:9},[f.createVNode(E,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(I,{"model-value":t.checkboxConfig.label,"onUpdate:modelValue":l,placeholder:"选项文本",clearable:""},null,8,["model-value"])]),_:1}),f.createVNode(E,{label:"真值"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.checkboxConfig["true-label"],"onUpdate:modelValue":j[35]||(j[35]=F=>t.checkboxConfig["true-label"]=F),placeholder:"选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"假值"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.checkboxConfig["false-label"],"onUpdate:modelValue":j[36]||(j[36]=F=>t.checkboxConfig["false-label"]=F),placeholder:"未选中时的值",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示边框"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.checkboxConfig.border,"onUpdate:modelValue":j[37]||(j[37]=F=>t.checkboxConfig.border=F)},null,8,["modelValue"])]),_:1})],64)):t.colorPickerConfig?(f.openBlock(),f.createBlock(E,{key:10,label:"显示透明度"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.colorPickerConfig["show-alpha"],"onUpdate:modelValue":j[38]||(j[38]=F=>t.colorPickerConfig["show-alpha"]=F)},null,8,["modelValue"])]),_:1})):t.radioConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:11},[f.createVNode(E,{label:"选项列表"},{default:f.withCtx(()=>[f.createElementVNode("div",Bme,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.radioConfig.radios||[],(F,oe)=>(f.openBlock(),f.createElementBlock("div",{key:oe,class:"option-row option-row--kvd"},[f.createVNode(I,{"model-value":F.label,"onUpdate:modelValue":ve=>F.label=ve,placeholder:"显示文本",size:"small",class:"opt-label"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(I,{"model-value":String(h(F)??""),"onUpdate:modelValue":ve=>p(F,ve),placeholder:"值",size:"small",class:"opt-value"},null,8,["model-value","onUpdate:modelValue"]),f.createVNode(U,{type:"danger",link:"",size:"small",onClick:ve=>u(t.radioConfig,oe)},{default:f.withCtx(()=>[...j[87]||(j[87]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128)),f.createVNode(U,{type:"primary",link:"",size:"small",onClick:j[39]||(j[39]=F=>c(t.radioConfig))},{default:f.withCtx(()=>[...j[88]||(j[88]=[f.createTextVNode("+ 添加选项",-1)])]),_:1})])]),_:1}),f.createVNode(E,{label:"按钮样式"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.radioConfig.useButton,"onUpdate:modelValue":j[40]||(j[40]=F=>t.radioConfig.useButton=F)},null,8,["modelValue"])]),_:1})],64)):t.rateConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:12},[f.createVNode(E,{label:"最大分值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.rateConfig.max,"onUpdate:modelValue":j[41]||(j[41]=F=>t.rateConfig.max=F),min:1,max:20,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"允许半选"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.rateConfig["allow-half"],"onUpdate:modelValue":j[42]||(j[42]=F=>t.rateConfig["allow-half"]=F)},null,8,["modelValue"])]),_:1})],64)):t.sliderConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:13},[f.createVNode(E,{label:"最小值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.sliderConfig.min,"onUpdate:modelValue":j[43]||(j[43]=F=>t.sliderConfig.min=F),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"最大值"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.sliderConfig.max,"onUpdate:modelValue":j[44]||(j[44]=F=>t.sliderConfig.max=F),step:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"步长"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.sliderConfig.step,"onUpdate:modelValue":j[45]||(j[45]=F=>t.sliderConfig.step=F),min:0,step:.1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示输入框"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.sliderConfig["show-input"],"onUpdate:modelValue":j[46]||(j[46]=F=>t.sliderConfig["show-input"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"范围模式"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.sliderConfig.range,"onUpdate:modelValue":j[47]||(j[47]=F=>t.sliderConfig.range=F)},null,8,["modelValue"])]),_:1})],64)):t.switchConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:14},[f.createVNode(E,{label:"激活文案"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.switchConfig["active-text"],"onUpdate:modelValue":j[48]||(j[48]=F=>t.switchConfig["active-text"]=F),placeholder:"开",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"未激活文案"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.switchConfig["inactive-text"],"onUpdate:modelValue":j[49]||(j[49]=F=>t.switchConfig["inactive-text"]=F),placeholder:"关",clearable:""},null,8,["modelValue"])]),_:1})],64)):t.transferConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:15},[f.createVNode(E,{label:"左侧标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:m.value,"onUpdate:modelValue":j[50]||(j[50]=F=>m.value=F),placeholder:"列表1",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"右侧标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:g.value,"onUpdate:modelValue":j[51]||(j[51]=F=>g.value=F),placeholder:"列表2",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可搜索"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.transferConfig.filterable,"onUpdate:modelValue":j[52]||(j[52]=F=>t.transferConfig.filterable=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"选项(JSON)"},{default:f.withCtx(()=>[f.createElementVNode("div",Vme,[f.createElementVNode("span",Fme,f.toDisplayString(k.value),1),f.createVNode(U,{type:"primary",link:"",onClick:j[53]||(j[53]=F=>O("transfer"))},{default:f.withCtx(()=>[...j[89]||(j[89]=[f.createTextVNode(" 编辑 ",-1)])]),_:1})])]),_:1})],64)):t.buttonConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:16},[f.createVNode(E,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.buttonConfig.buttonText,"onUpdate:modelValue":j[54]||(j[54]=F=>t.buttonConfig.buttonText=F),placeholder:"点击",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.buttonConfig.type,"onUpdate:modelValue":j[55]||(j[55]=F=>t.buttonConfig.type=F),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(_,{label:"主要",value:"primary"}),f.createVNode(_,{label:"成功",value:"success"}),f.createVNode(_,{label:"警告",value:"warning"}),f.createVNode(_,{label:"危险",value:"danger"}),f.createVNode(_,{label:"信息",value:"info"}),f.createVNode(_,{label:"默认",value:"default"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.buttonConfig.plain,"onUpdate:modelValue":j[56]||(j[56]=F=>t.buttonConfig.plain=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.buttonConfig.round,"onUpdate:modelValue":j[57]||(j[57]=F=>t.buttonConfig.round=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.buttonConfig.circle,"onUpdate:modelValue":j[58]||(j[58]=F=>t.buttonConfig.circle=F)},null,8,["modelValue"])]),_:1})],64)):t.dialogConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:17},[f.createVNode(E,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.dialogConfig.title,"onUpdate:modelValue":j[59]||(j[59]=F=>t.dialogConfig.title=F),placeholder:"弹窗",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"宽度"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.dialogConfig.width,"onUpdate:modelValue":j[60]||(j[60]=F=>t.dialogConfig.width=F),placeholder:"50% 或 500",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"居中"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig.center,"onUpdate:modelValue":j[61]||(j[61]=F=>t.dialogConfig.center=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"可拖拽"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig.draggable,"onUpdate:modelValue":j[62]||(j[62]=F=>t.dialogConfig.draggable=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig["close-on-click-modal"],"onUpdate:modelValue":j[63]||(j[63]=F=>t.dialogConfig["close-on-click-modal"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.dialogConfig["show-close"],"onUpdate:modelValue":j[64]||(j[64]=F=>t.dialogConfig["show-close"]=F)},null,8,["modelValue"])]),_:1})],64)):t.drawerConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:18},[f.createVNode(E,{label:"标题"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.drawerConfig.title,"onUpdate:modelValue":j[65]||(j[65]=F=>t.drawerConfig.title=F),placeholder:"抽屉",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"方向"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.drawerConfig.direction,"onUpdate:modelValue":j[66]||(j[66]=F=>t.drawerConfig.direction=F),placeholder:"rtl"},{default:f.withCtx(()=>[f.createVNode(_,{label:"右",value:"rtl"}),f.createVNode(_,{label:"左",value:"ltr"}),f.createVNode(_,{label:"上",value:"ttb"}),f.createVNode(_,{label:"下",value:"btt"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(E,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.drawerConfig.size,"onUpdate:modelValue":j[67]||(j[67]=F=>t.drawerConfig.size=F),placeholder:"30% 或 400px",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"点击遮罩关闭"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.drawerConfig["close-on-click-modal"],"onUpdate:modelValue":j[68]||(j[68]=F=>t.drawerConfig["close-on-click-modal"]=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"显示关闭按钮"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.drawerConfig["show-close"],"onUpdate:modelValue":j[69]||(j[69]=F=>t.drawerConfig["show-close"]=F)},null,8,["modelValue"])]),_:1})],64)):t.paginationConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:19},[f.createVNode(E,{label:"总条数"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.paginationConfig.total,"onUpdate:modelValue":j[70]||(j[70]=F=>t.paginationConfig.total=F),min:0,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"每页条数"},{default:f.withCtx(()=>[f.createVNode(R,{modelValue:t.paginationConfig["page-size"],"onUpdate:modelValue":j[71]||(j[71]=F=>t.paginationConfig["page-size"]=F),min:1,"controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"布局"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.paginationConfig.layout,"onUpdate:modelValue":j[72]||(j[72]=F=>t.paginationConfig.layout=F),placeholder:"total, prev, pager, next",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"小尺寸"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.paginationConfig.small,"onUpdate:modelValue":j[73]||(j[73]=F=>t.paginationConfig.small=F)},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode(z,{modelValue:t.paginationConfig.background,"onUpdate:modelValue":j[74]||(j[74]=F=>t.paginationConfig.background=F)},null,8,["modelValue"])]),_:1})],64)):t.timeConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:20},[f.createVNode(E,{label:"格式预设"},{default:f.withCtx(()=>[f.createVNode(G,{modelValue:t.timeConfig.formatPreset,"onUpdate:modelValue":j[75]||(j[75]=F=>t.timeConfig.formatPreset=F),placeholder:"选择预设",style:{width:"100%"},onChange:t.onFlmTimePresetChange},{default:f.withCtx(()=>[f.createVNode(_,{label:"当前日期",value:"date"}),f.createVNode(_,{label:"当前时间",value:"time"}),f.createVNode(_,{label:"自定义",value:"custom"})]),_:1},8,["modelValue","onChange"])]),_:1}),f.createVNode(E,{label:"时间格式"},{default:f.withCtx(()=>[f.createElementVNode("div",zme,[f.createVNode(I,{modelValue:t.timeConfig.format,"onUpdate:modelValue":j[76]||(j[76]=F=>t.timeConfig.format=F),class:"flm-time-format-row__input",placeholder:"如 YYYY-MM-DD 或 HH:mm:ss",clearable:"",disabled:t.timeConfig.formatPreset!=="custom"},null,8,["modelValue","disabled"]),f.createVNode(f.unref(kt.ElTooltip),{effect:"light",placement:"top-end","show-after":200,trigger:["hover","click"],"popper-class":"flm-time-format-tooltip"},{content:f.withCtx(()=>[...j[90]||(j[90]=[f.createElementVNode("div",null,[f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createTextVNode(" 这里控制"),f.createElementVNode("strong",null,"时间显示成什么文字"),f.createTextVNode(",按从左到右的顺序写「年、月、日、时、分、秒」即可。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"常用写法:")]),f.createElementVNode("ul",{class:"flm-time-format-tooltip__ul"},[f.createElementVNode("li",null,[f.createTextVNode("只要日期:"),f.createElementVNode("code",null,"YYYY-MM-DD"),f.createTextVNode(" → 如 2026-04-02")]),f.createElementVNode("li",null,[f.createTextVNode("只要时刻:"),f.createElementVNode("code",null,"HH:mm:ss"),f.createTextVNode(" → 如 14:30:05")]),f.createElementVNode("li",null,[f.createTextVNode("日期 + 时刻:"),f.createElementVNode("code",null,"YYYY-MM-DD HH:mm:ss")])]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"},[f.createElementVNode("strong",null,"字母含义:"),f.createTextVNode("Y 表示年,M 月,D 日;H 时,m 分,s 秒(可多段组合在一起)。 ")]),f.createElementVNode("p",{class:"flm-time-format-tooltip__p"}," 选择「当前日期」或「当前时间」时,下面会自动带出对应格式;选择「自定义」后可以按需要自己改。 ")],-1)])]),default:f.withCtx(()=>[f.createElementVNode("span",_me,[f.createVNode(f.unref(kt.ElIcon),{size:18,color:"var(--el-text-color-secondary)"},{default:f.withCtx(()=>[f.createVNode(f.unref(_a.QuestionFilled))]),_:1})])]),_:1})])]),_:1})],64)):t.readConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:21},[f.createVNode(E,{label:"样式类"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.readConfig.class,"onUpdate:modelValue":j[77]||(j[77]=F=>t.readConfig.class=F),placeholder:"自定义 class",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(E,{label:"内联样式"},{default:f.withCtx(()=>[f.createVNode(I,{modelValue:t.readConfig.style,"onUpdate:modelValue":j[78]||(j[78]=F=>t.readConfig.style=F),placeholder:"自定义 style",clearable:""},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)]}),_:1})):f.createCommentVNode("",!0),f.createVNode(K,{modelValue:y.value,"onUpdate:modelValue":j[81]||(j[81]=q=>y.value=q),title:C.value,class:"framework-json-options-dialog",width:"min(92vw, 900px)",top:"5vh","append-to-body":"","destroy-on-close":"",onClosed:T},{footer:f.withCtx(()=>[f.createVNode(U,{onClick:j[80]||(j[80]=q=>y.value=!1)},{default:f.withCtx(()=>[...j[91]||(j[91]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(U,{type:"primary",onClick:A},{default:f.withCtx(()=>[...j[92]||(j[92]=[f.createTextVNode("确定",-1)])]),_:1})]),default:f.withCtx(()=>[y.value?(f.openBlock(),f.createBlock(f.unref(WS),{key:0,modelValue:S.value,"onUpdate:modelValue":j[79]||(j[79]=q=>S.value=q),class:"framework-json-editor",height:420,"navigation-bar":!0,"status-bar":!0},null,8,["modelValue"])):f.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])],64)}}}),[["__scopeId","data-v-63e69167"]]),Wme={class:"options-editor"},Hme=["onClick"],Gme={class:"opt-index"},Kme={class:"opt-summary"},Yme=qr(f.defineComponent({__name:"GlobalButtonsSlot",props:{buttons:{},selectedIndex:{}},emits:["select","remove","add"],setup(t){return(e,n)=>{const o=f.resolveComponent("el-button"),r=f.resolveComponent("el-form-item"),i=f.resolveComponent("el-input"),s=f.resolveComponent("el-option"),a=f.resolveComponent("el-select"),l=f.resolveComponent("el-switch"),c=f.resolveComponent("el-form");return t.selectedIndex!==null&&t.buttons[t.selectedIndex]?(f.openBlock(),f.createBlock(c,{key:0,size:"small","label-position":"right","label-width":"100px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(r,{label:"按钮组"},{default:f.withCtx(()=>[f.createElementVNode("div",Wme,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.buttons,(u,h)=>(f.openBlock(),f.createElementBlock("div",{key:h,class:f.normalizeClass(["option-row option-row--buttons",{"option-row--active":t.selectedIndex===h}]),onClick:p=>e.$emit("select",h)},[f.createElementVNode("span",Gme,"#"+f.toDisplayString(h+1),1),f.createElementVNode("span",Kme,f.toDisplayString(u.event||"(未命名事件)")+" / "+f.toDisplayString(u.buttonText??"按钮"),1),f.createVNode(o,{type:"danger",link:"",size:"small",onClick:f.withModifiers(p=>e.$emit("remove",h),["stop"])},{default:f.withCtx(()=>[...n[17]||(n[17]=[f.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])],10,Hme))),128)),f.createVNode(o,{type:"primary",link:"",size:"small",onClick:n[0]||(n[0]=u=>e.$emit("add"))},{default:f.withCtx(()=>[...n[18]||(n[18]=[f.createTextVNode(" + 新增按钮 ",-1)])]),_:1})])]),_:1}),f.createVNode(r,{label:"按钮事件"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex].event,"onUpdate:modelValue":n[1]||(n[1]=u=>t.buttons[t.selectedIndex].event=u),placeholder:"与业务监听一致的事件名",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"按钮文案"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex].buttonText,"onUpdate:modelValue":n[2]||(n[2]=u=>t.buttons[t.selectedIndex].buttonText=u),placeholder:"按钮文本",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"类型"},{default:f.withCtx(()=>[f.createVNode(a,{modelValue:t.buttons[t.selectedIndex].type,"onUpdate:modelValue":n[3]||(n[3]=u=>t.buttons[t.selectedIndex].type=u),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(s,{label:"默认",value:"default"}),f.createVNode(s,{label:"主要",value:"primary"}),f.createVNode(s,{label:"成功",value:"success"}),f.createVNode(s,{label:"警告",value:"warning"}),f.createVNode(s,{label:"危险",value:"danger"}),f.createVNode(s,{label:"信息",value:"info"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(r,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(a,{modelValue:t.buttons[t.selectedIndex].size,"onUpdate:modelValue":n[4]||(n[4]=u=>t.buttons[t.selectedIndex].size=u),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(s,{label:"大",value:"large"}),f.createVNode(s,{label:"默认",value:"default"}),f.createVNode(s,{label:"小",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(r,{label:"朴素"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].plain,"onUpdate:modelValue":n[5]||(n[5]=u=>t.buttons[t.selectedIndex].plain=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"背景色"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].bg,"onUpdate:modelValue":n[6]||(n[6]=u=>t.buttons[t.selectedIndex].bg=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"链接样式"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].link,"onUpdate:modelValue":n[7]||(n[7]=u=>t.buttons[t.selectedIndex].link=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"圆角"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].round,"onUpdate:modelValue":n[8]||(n[8]=u=>t.buttons[t.selectedIndex].round=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"圆形"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].circle,"onUpdate:modelValue":n[9]||(n[9]=u=>t.buttons[t.selectedIndex].circle=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"加载中"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].loading,"onUpdate:modelValue":n[10]||(n[10]=u=>t.buttons[t.selectedIndex].loading=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"加载图标"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex]["loading-icon"],"onUpdate:modelValue":n[11]||(n[11]=u=>t.buttons[t.selectedIndex]["loading-icon"]=u),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].disabled,"onUpdate:modelValue":n[12]||(n[12]=u=>t.buttons[t.selectedIndex].disabled=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"图标"},{default:f.withCtx(()=>[f.createVNode(i,{modelValue:t.buttons[t.selectedIndex].icon,"onUpdate:modelValue":n[13]||(n[13]=u=>t.buttons[t.selectedIndex].icon=u),placeholder:"图标名称",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"自动聚焦"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex].autofocus,"onUpdate:modelValue":n[14]||(n[14]=u=>t.buttons[t.selectedIndex].autofocus=u)},null,8,["modelValue"])]),_:1}),f.createVNode(r,{label:"原生类型"},{default:f.withCtx(()=>[f.createVNode(a,{modelValue:t.buttons[t.selectedIndex]["native-type"],"onUpdate:modelValue":n[15]||(n[15]=u=>t.buttons[t.selectedIndex]["native-type"]=u),placeholder:"请选择",clearable:""},{default:f.withCtx(()=>[f.createVNode(s,{label:"普通",value:"button"}),f.createVNode(s,{label:"提交",value:"submit"}),f.createVNode(s,{label:"重置",value:"reset"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(r,{label:"自动插入空格"},{default:f.withCtx(()=>[f.createVNode(l,{modelValue:t.buttons[t.selectedIndex]["auto-insert-space"],"onUpdate:modelValue":n[16]||(n[16]=u=>t.buttons[t.selectedIndex]["auto-insert-space"]=u)},null,8,["modelValue"])]),_:1})]),_:1})):f.createCommentVNode("",!0)}}}),[["__scopeId","data-v-50e5148e"]]),Xme="^1(?:3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$",Jme="^0\\d{2,3}-?\\d{7,8}(-\\d{1,6})?$",Qme="^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",Zme="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",qme="^\\d{6}$",Fg={mobile:"请填写正确手机号",landline:"请填写正确固话",idCard:"请填写正确身份证号",email:"请填写正确邮箱",postal:"请填写正确邮政编码"},d5={required:"必填",mobile:"手机号",landline:"固话",idCard:"身份证号",email:"邮箱",postal:"邮政编码"};function K2(t){return t==="required"||t==="mobile"||t==="landline"||t==="idCard"||t==="email"||t==="postal"}function $me(t){switch(t){case"mobile":return Xme;case"landline":return Jme;case"idCard":return Qme;case"email":return Zme;case"postal":return qme;default:return"^.*$"}}const ege={class:"fi-rules-editor"},tge={key:0,class:"fi-rules-list"},nge=["title"],oge={class:"fi-rules-dialog-body"},rge=f.defineComponent({name:"FormItemRulesEditor"}),ige=f.defineComponent({...rge,props:{formItem:{}},setup(t){const e=t,n=f.ref(!1),o=f.ref(""),r=f.ref(""),i=f.computed(()=>u(o.value));function s(){o.value="",r.value=""}function a(v){const b=v.ruleKind;return b&&K2(b)?d5[b]:v.required===!0?"必填":"规则"}function l(){const v=e.formItem.rules||[];e.formItem.required=v.some(b=>b.required===!0)}function c(){return`请填写${(e.formItem.label||"").trim()||"该项"}`}function u(v){return v==="required"?c():v==="mobile"?Fg.mobile:v==="landline"?Fg.landline:v==="idCard"?Fg.idCard:v==="email"?Fg.email:v==="postal"?Fg.postal:""}function h(v){const b=e.formItem.rules||[];return v==="required"?b.some(y=>y.required===!0||y.ruleKind==="required"):b.some(y=>y.ruleKind===v)}function p(){s(),n.value=!0}function m(){const v=o.value;if(!v||!K2(v)){n.value=!1;return}if(e.formItem.rules||(e.formItem.rules=[]),h(v)){kt.ElMessage.warning(`已存在「${d5[v]}」规则,请勿重复添加`),n.value=!1;return}const b=(r.value||"").trim()||u(v);if(v==="required")e.formItem.rules.push({required:!0,message:b,trigger:"blur",ruleKind:"required"}),l();else{const y=v;e.formItem.rules.push({pattern:$me(y),message:b,trigger:"blur",ruleKind:v})}n.value=!1}function g(v){var b,y;(b=e.formItem.rules)==null||b.splice(v,1),((y=e.formItem.rules)==null?void 0:y.length)===0&&delete e.formItem.rules,l()}return f.watch(()=>e.formItem.rules,()=>l(),{deep:!0}),f.watch(o,v=>{v&&K2(v)?r.value=u(v):r.value=""}),l(),(v,b)=>{const y=f.resolveComponent("el-tag"),w=f.resolveComponent("el-button"),S=f.resolveComponent("el-option"),C=f.resolveComponent("el-select"),x=f.resolveComponent("el-input"),k=f.resolveComponent("el-dialog"),O=f.resolveComponent("el-form-item");return f.openBlock(),f.createBlock(O,{label:"校验规则"},{default:f.withCtx(()=>[f.createElementVNode("div",ege,[(t.formItem.rules||[]).length?(f.openBlock(),f.createElementBlock("div",tge,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.formItem.rules,(A,T)=>(f.openBlock(),f.createElementBlock("div",{key:T,class:"fi-rules-row"},[f.createVNode(y,{size:"small",type:"info"},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(a(A)),1)]),_:2},1024),f.createElementVNode("span",{class:"fi-rules-msg",title:A.message},f.toDisplayString(A.message||"—"),9,nge),f.createVNode(w,{type:"danger",link:"",size:"small",onClick:N=>g(T)},{default:f.withCtx(()=>[...b[4]||(b[4]=[f.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128))])):f.createCommentVNode("",!0),f.createVNode(w,{type:"primary",link:"",size:"small",onClick:p},{default:f.withCtx(()=>[...b[5]||(b[5]=[f.createTextVNode("+ 添加规则",-1)])]),_:1})]),f.createVNode(k,{modelValue:n.value,"onUpdate:modelValue":b[3]||(b[3]=A=>n.value=A),title:"添加校验规则",width:"420px","append-to-body":"","destroy-on-close":"",onClosed:s},{footer:f.withCtx(()=>[f.createVNode(w,{onClick:b[2]||(b[2]=A=>n.value=!1)},{default:f.withCtx(()=>[...b[8]||(b[8]=[f.createTextVNode("取消",-1)])]),_:1}),f.createVNode(w,{type:"primary",disabled:!o.value,onClick:m},{default:f.withCtx(()=>[...b[9]||(b[9]=[f.createTextVNode("确定",-1)])]),_:1},8,["disabled"])]),default:f.withCtx(()=>[f.createElementVNode("div",oge,[b[7]||(b[7]=f.createElementVNode("div",{class:"fi-rules-dialog-hint"},"请选择校验类型",-1)),f.createVNode(C,{modelValue:o.value,"onUpdate:modelValue":b[0]||(b[0]=A=>o.value=A),placeholder:"请选择校验类型",clearable:"",class:"fi-rules-type-select"},{default:f.withCtx(()=>[f.createVNode(S,{label:"必填",value:"required"}),f.createVNode(S,{label:"手机号",value:"mobile"}),f.createVNode(S,{label:"固话",value:"landline"}),f.createVNode(S,{label:"身份证号",value:"idCard"}),f.createVNode(S,{label:"邮箱",value:"email"}),f.createVNode(S,{label:"邮政编码",value:"postal"})]),_:1},8,["modelValue"]),o.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[b[6]||(b[6]=f.createElementVNode("div",{class:"fi-rules-dialog-hint fi-rules-msg-label"},"错误提示",-1)),f.createVNode(x,{modelValue:r.value,"onUpdate:modelValue":b[1]||(b[1]=A=>r.value=A),type:"textarea",rows:2,placeholder:i.value,maxlength:"200","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"])],64)):f.createCommentVNode("",!0)])]),_:1},8,["modelValue"])]),_:1})}}}),h5=qr(ige,[["__scopeId","data-v-1dd5eb69"]]);function sge(t){const e=t==null?void 0:t.type;return(t==null?void 0:t.nodeKind)==="slot"||e==="groupSlot"||e==="formSlot"?[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]},{name:"slotConfig",title:"插槽",defaultOpen:!0,fields:[]}]:e==="globalButton"?[{name:"globalButtons",title:"功能按钮",defaultOpen:!0,visible:()=>!0,fields:[]}]:["flmInput","flmSelect","flmInputNumber","flmDatePicker","flmTimePicker","flmTimeSelect","flmUpload","flmCascader","flmCheckbox","flmColorPicker","flmRadio","flmRate","flmRead","flmTime","flmSlider","flmSwitch","flmTransfer","flmButton","flmDialog","flmDrawer","flmPagination","flmCustom"].includes(e||"")?[{name:"baseSettings",title:"基础设置",defaultOpen:!0,fields:[]},{name:"detailSettings",title:"详细设置",defaultOpen:!0,fields:[]}]:[{name:"base",title:"基础属性",defaultOpen:!0,fields:[]}]}function age(t,e){function n(l){return!l||typeof l!="object"?{}:{...l}}function o(){const l=[];t.value.forEach(u=>{if(u.type!=="group")return;if(!(typeof u.i=="string"?u.i.trim():"")){const p=u.label||u.i;l.push(`分组「${p}」的标识为空,无法生成 groupProp`)}});const c=u=>{var p;if(u.type==="group"||u.type==="flmForm"||u.type==="flmSubForm"||u.nodeKind==="group"||u.nodeKind==="form"||u.nodeKind==="subForm")return;if(!(typeof u.i=="string"?u.i.trim():"")){const m=((p=u.formItem)==null?void 0:p.label)||u.label||u.i;l.push(`控件「${m}」的标识为空,无法生成 prop`)}};return t.value.forEach(u=>{var h;(h=u.children)!=null&&h.length&&u.children.forEach(p=>{var m;(m=p.children)!=null&&m.length&&p.children.forEach(g=>c(g))})}),l}function r(l,c,u){const h=l==null?void 0:l.prop;return h!=null&&String(h).trim()!==""?String(h):`ctrl_${c}_${u}_${Date.now()}`}function i(l){const c=(v,b)=>{const y=v!=null&&String(v).trim()!==""?String(v).trim():"",w=b!=null&&String(b).trim()!==""?String(b).trim():"";return y||w},u=c(l.customComponentName,l.custom_component_name),h=c(l.customKey,l.custom_key),p=l.controlType??l.control_type,m=p!=null&&String(p).trim()!==""?String(p).trim():"flmInput",g=l.customAttrFields??l.custom_attr_fields;return{customComponentName:u,customKey:h,controlType:m,customAttrFieldsRaw:g}}function s(){const l=[],c=[...e.value];return t.value.forEach(u=>{var y;if(u.type!=="group"||!u.children||!u.children.length)return;const h=Dl(u.children,w=>w.nodeKind==="form"||w.nodeKind==="subForm");if(!h)return;const p=h.nodeKind==="subForm",m=h.config||{},g=(h.children||[]).map(w=>{var x;const S=w.formItem||{},C={prop:S.prop||w.i,label:S.label??w.label,required:S.required===!0||Array.isArray(S.rules)&&S.rules.some(k=>(k==null?void 0:k.required)===!0),rules:S.rules,"show-message":S.showMessage,"inline-message":S.inlineMessage,size:S.size,gridX:w.x,gridY:w.y,gridW:w.w,gridH:w.h,controlType:w.type==="flmCustom"?w.customComponentName||"flmCustom":w.type,controlConfig:n(w.config)};return w.type==="flmCustom"&&(w.customKey&&(C.customKey=w.customKey),w.customComponentName&&(C.customComponentName=w.customComponentName),(x=w.customAttrFields)!=null&&x.length&&(C.customAttrFields=Or(w.customAttrFields))),S.labelWidth!=null&&(C["label-width"]=S.labelWidth),C}),v=Tp(m||{},["buttons","items"]),b={id:u.i,title:u.label||"表单分组",type:p?"subForm":"form",groupName:u.label,groupProp:((y=u.config)==null?void 0:y.groupProp)??u.i,items:g,...v};g.length&&b.gridColumns==null&&(b.gridColumns=24),l.push(b)}),{groups:l,buttons:c}}function a(l){const c=[],u=l==null?void 0:l.groups;return(Array.isArray(u)?u:[]).forEach((p,m)=>{const g=(p==null?void 0:p.id)!=null&&String(p.id).trim()!==""?String(p.id):(p==null?void 0:p.groupProp)!=null&&String(p.groupProp).trim()!==""?String(p.groupProp):`group_${m}`,v=p.items,b=Tp(p,["id","title","type","groupName","groupProp","items","buttons"]),y={i:`${g}_form`,x:0,y:0,w:24,h:1,type:p.type==="subForm"?"flmSubForm":"flmForm",label:p.type==="subForm"?"子表单":"表单",nodeKind:p.type==="subForm"?"subForm":"form",config:{...b,items:[]},children:[]},w=v??[];y.children=w.map((C,x)=>{const k={label:C.label,prop:C.prop,required:C.required===!0||Array.isArray(C.rules)&&C.rules.some(j=>(j==null?void 0:j.required)===!0),rules:C.rules,showMessage:C["show-message"],inlineMessage:C["inline-message"],size:C.size};C["label-width"]!=null&&(k.labelWidth=C["label-width"]);const O=r(C,g,x),A=i(C),T=A.customComponentName?"flmCustom":Dpe.has(A.controlType)?A.controlType:"flmCustom",N={i:O,x:C.gridX??0,y:C.gridY??0,w:C.gridW??8,h:C.gridH??1,type:T,label:C.label,config:(C.controlConfig??C.control_config)||{},formItem:{...k,prop:O},nodeKind:"control"};if(T==="flmCustom"){A.customKey&&(N.customKey=A.customKey);const j=A.customComponentName||A.controlType;j&&(N.customComponentName=j);const I=Array.isArray(A.customAttrFieldsRaw)?A.customAttrFieldsRaw:[];I.length&&(N.customAttrFields=Or(I))}return N});const S={i:g,x:0,y:m,w:24,h:1,type:"group",label:p.title||p.groupName||"分组",config:{groupProp:p.groupProp},nodeKind:"group",children:[y]};S.groupProp=p.groupProp,c.push(S)}),c}return{buildFrameworkConfig:s,validateLayoutBeforeSave:o,parseConfigToLayout:a,snapshotControlConfig:n}}let p5=0;function Cs(){return`widget_${++p5}_${Date.now()}`}function Y2(){return`group_${++p5}_${Date.now()}`}const ap={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}};function lge(t,e,n,o){function r(p){var v;if(!p||!((v=p.children)!=null&&v.length))return"form";const g=p.children[0].nodeKind;return g==="subForm"?"subForm":g==="slot"?"slot":"form"}function i(p){const m={x:0,y:0,w:p==="slot"?es:8,h:1};if(p==="slot")return{i:Cs(),x:m.x,y:m.y,w:m.w,h:1,type:"groupSlot",label:"分组插槽",nodeKind:"slot",config:{slotName:""}};if(p==="subForm")return{i:Cs(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmSubForm",label:"子表单",nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};const g=c0("flmForm"),v=Tp(g||{},["buttons"]);return{i:Cs(),x:m.x,y:m.y,w:m.w,h:m.h,type:"flmForm",label:"表单",nodeKind:"form",config:v,children:[]}}function s(p,m){p.children=[i(m)],n.value=null}function a(p,m){var v;const g=(v=p.children)==null?void 0:v[0];if(!g){s(p,m);return}if(g.nodeKind==="slot"){s(p,m);return}if(g.nodeKind=m,g.type=m==="subForm"?"flmSubForm":"flmForm",g.label=m==="subForm"?"子表单":"表单",Array.isArray(g.children)||(g.children=[]),(!g.config||typeof g.config!="object")&&(g.config={}),m==="subForm"){const b=g.config;Array.isArray(b.items)||(b.items=[]),b.gridColumns==null&&(b.gridColumns=24),b.addButtonText==null&&(b.addButtonText="新增一行"),b.defaultGenerateOne==null&&(b.defaultGenerateOne=!1)}}function l(p,m){if(!(!p||p.type!=="group"||r(p)===m)){if(m==="slot"){kt.ElMessageBox.confirm("切换至插槽将清空当前分组内容,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{s(p,m)}).catch(()=>{});return}a(p,m)}}function c(p){const m=s0(t.value),g=Y2(),v=i(p),b={i:g,x:m.x,y:m.y,w:m.w,h:m.h,type:"group",label:"分组",config:{},children:[v],nodeKind:"group"};t.value.push(b),e.value=g,n.value=null}function u(p){if(!p)return null;const m=p.nodeKind==="form",g=p.nodeKind==="subForm";if(!m&&!g)return null;let v=p.config||void 0;return v?(!Array.isArray(v.buttons)||!v.buttons.length)&&(v.buttons=[{...ap.submit},{...ap.cancel},{...ap.reset}]):(v={items:[],gridColumns:24},g&&(v.addButtonText="新增一行",v.defaultGenerateOne=!1),v.buttons=[{...ap.submit},{...ap.cancel},{...ap.reset}],p.config=v),v??null}const h=f.computed(()=>{var b;const p=e.value;if(!p)return null;const m=t.value.find(y=>y.i===p);if(!m||m.nodeKind!=="group"||!((b=m.children)!=null&&b.length))return null;const g=m.children[0];return u(g)??null});return{getGroupChildType:r,setGroupChildType:l,createGroupChildByType:i,doSetGroupChildType:s,doSetGroupChildTypeKeepData:a,addGroupByContainerType:c,formConfigForForm:u,selectedGroupFormConfig:h}}function cge(t,e,n,o,r,i,s,a){function l(){const S=a.validateLayoutBeforeSave();if(S.length){kt.ElMessage.error(S[0]),console.error("[表单设计] 预览校验失败:",S);return}i.value=Or(a.buildFrameworkConfig()),s.value=!0}function c(){const S=a.validateLayoutBeforeSave();if(S.length){kt.ElMessage.error(S[0]),console.error("[表单设计] 保存校验失败:",S);return}const C=a.buildFrameworkConfig();console.log("[FlameFramework] dynamic form config:",C),a.onSave(C)}function u(){kt.ElMessageBox.confirm("是否重置表单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.value=a.getDefaultLayout(),r.value=[{...a.DEFAULT_BUTTONS.submit},{...a.DEFAULT_BUTTONS.cancel},{...a.DEFAULT_BUTTONS.reset}],e.value=null,o.value=null,n.value=null,kt.ElMessage.success("已重置"),a.onReset()}).catch(()=>{})}function h(S){const C=a.getNextGridPosition(t.value),x={...Or(S),i:Cs(),x:C.x,y:C.y,w:C.w,h:C.h};x.children&&(x.children=x.children.map(k=>({...k,i:Cs()}))),t.value.push(x),e.value=x.i,o.value=null,n.value=null}function p(S){console.log("%c [ item ]-1315","font-size:13px; background:pink; color:#bf2c9f;",S),kt.ElMessageBox.confirm("确认删除当前分组(及内部内容)吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const C=Cv(t.value,{i:S.i});C>=0&&t.value.splice(C,1),e.value===S.i&&(e.value=null),n.value=null}).catch(()=>{})}function m(S,C){S.children||(S.children=[]);const x=a.getNextInnerGridPosition(S,C.w,C.h),k={...Or(C),i:Cs(),x:x.x,y:x.y,w:C.w,h:C.h};S.children.push(k),a.selectFormChild(S,k)}function g(S,C){kt.ElMessageBox.confirm("确认删除当前子节点吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{var O;const x=S.children;if(!x)return;const k=Cv(x,{i:C.i});k>=0&&x.splice(k,1),((O=n.value)==null?void 0:O.childId)===C.i&&(n.value=null)}).catch(()=>{})}function v(S){S.nodeKind!=="form"&&S.nodeKind!=="subForm"||(a.compactInnerFormLayout(S),kt.ElMessage.success("已按从左到右、自上而下重新排布"))}function b(S){o.value=S,e.value=null,n.value=null}function y(){r.value.push({event:`custom_${Date.now()}`,buttonText:"自定义",type:"default"}),o.value=r.value.length-1}function w(S){S<0||S>=r.value.length||(r.value.splice(S,1),o.value===S?o.value=r.value.length?Math.min(S,r.value.length-1):null:o.value!=null&&o.value>S&&o.value--)}return{onOpenPreview:l,onSaveConfig:c,onResetConfig:u,onCopyWidget:h,onDeleteWidget:p,onCopyFormChild:m,onDeleteFormChild:g,onAutoCompactInner:v,onSelectGlobalButton:b,addGlobalButton:y,removeGlobalButton:w}}function uge(t){const e=f.computed(()=>{const E=t.value;return(E==null?void 0:E.type)==="flmInput"&&E.config?E.config:void 0}),n=f.computed(()=>{const E=t.value;return(E==null?void 0:E.type)==="flmSelect"&&E.config?E.config:void 0}),o=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmInputNumber"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),r=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmDatePicker"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),i=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTimePicker"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),s=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTimeSelect"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),a=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmCascader"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),l=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmCheckbox"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),c=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmColorPicker"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),u=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmRadio"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),h=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmRate"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),p=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmSlider"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),m=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmSwitch"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),g=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTransfer"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),v=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmButton"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),b=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmDialog"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),y=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmDrawer"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),w=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmPagination"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),S=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmRead"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),C=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmUpload"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),x=f.computed(()=>{var E,P;return((E=t.value)==null?void 0:E.type)==="flmTime"&&((P=t.value)!=null&&P.config)?t.value.config:void 0}),k=f.computed({get(){const E=C.value;if(!E)return[];const P=E.accept;return P==null||P===""?[]:typeof P!="string"?[]:P.split(/[,,]/).map(D=>D.trim()).filter(Boolean)},set(E){const P=C.value;P&&(P.accept=Array.isArray(E)&&E.length?E.join(","):"")}}),O=[{label:"全部图片(通配)",value:"image/*"},{label:"全部视频(通配)",value:"video/*"},{label:"全部音频(通配)",value:"audio/*"},{label:"JPEG 图片",value:"image/jpeg"},{label:"PNG 图片",value:"image/png"},{label:"GIF 图片",value:"image/gif"},{label:"WebP 图片",value:"image/webp"},{label:"SVG 图片",value:"image/svg+xml"},{label:"BMP 图片",value:"image/bmp"},{label:"ICO 图标",value:"image/x-icon"},{label:"TIFF 图片",value:"image/tiff"},{label:"MP4 视频",value:"video/mp4"},{label:"WebM 视频",value:"video/webm"},{label:"OGG 视频",value:"video/ogg"},{label:"QuickTime 视频",value:"video/quicktime"},{label:"MP3 音频",value:"audio/mpeg"},{label:"WAV 音频",value:"audio/wav"},{label:"OGG 音频",value:"audio/ogg"},{label:"AAC 音频",value:"audio/aac"},{label:"FLAC 音频",value:"audio/flac"},{label:"PDF 文档",value:"application/pdf"},{label:"Word(.doc)",value:"application/msword"},{label:"Word(.docx)",value:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{label:"Excel(.xls)",value:"application/vnd.ms-excel"},{label:"Excel(.xlsx)",value:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{label:"PowerPoint(.ppt)",value:"application/vnd.ms-powerpoint"},{label:"PowerPoint(.pptx)",value:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{label:"纯文本",value:"text/plain"},{label:"CSV",value:"text/csv"},{label:"HTML",value:"text/html"},{label:"JSON",value:"application/json"},{label:"XML",value:"application/xml"},{label:"ZIP 压缩包",value:"application/zip"},{label:"RAR 压缩包",value:"application/x-rar-compressed"},{label:"7Z 压缩包",value:"application/x-7z-compressed"},{label:"扩展名:.pdf",value:".pdf"},{label:"扩展名:.doc",value:".doc"},{label:"扩展名:.docx",value:".docx"},{label:"扩展名:.xls",value:".xls"},{label:"扩展名:.xlsx",value:".xlsx"},{label:"扩展名:.ppt",value:".ppt"},{label:"扩展名:.pptx",value:".pptx"},{label:"扩展名:.txt",value:".txt"},{label:"扩展名:.csv",value:".csv"},{label:"扩展名:.zip",value:".zip"},{label:"扩展名:.rar",value:".rar"},{label:"扩展名:.7z",value:".7z"},{label:"扩展名:.jpg",value:".jpg"},{label:"扩展名:.jpeg",value:".jpeg"}];function A(E){const P=x.value;if(!P)return;const D=E;if(D==="date")P.format="YYYY-MM-DD";else if(D==="time")P.format="HH:mm:ss";else{const R=P.format&&String(P.format).trim()||"";(!R||R==="YYYY-MM-DD"||R==="HH:mm:ss")&&(P.format="YYYY-MM-DD HH:mm:ss")}}const T=f.computed(()=>{var E;return((E=t.value)==null?void 0:E.config)??void 0}),N=f.computed(()=>{var E;return!!((E=t.value)!=null&&E.type)&&Ipe.includes(t.value.type)}),j=f.computed(()=>{var E;return!!((E=t.value)!=null&&E.type)&&t.value.type!=="flmRead"&&t.value.type!=="flmTime"}),I=f.computed(()=>{var E;return!!((E=t.value)!=null&&E.type)&&Rpe.includes(t.value.type)});return{inputConfig:e,selectConfig:n,inputNumberConfig:o,datePickerConfig:r,timePickerConfig:i,timeSelectConfig:s,cascaderConfig:a,checkboxConfig:l,colorPickerConfig:c,radioConfig:u,rateConfig:h,sliderConfig:p,switchConfig:m,transferConfig:g,buttonConfig:v,dialogConfig:b,drawerConfig:y,paginationConfig:w,readConfig:S,uploadConfig:C,uploadAcceptSelection:k,uploadAcceptTypeOptions:O,timeConfig:x,onFlmTimePresetChange:A,controlConfig:T,controlHasPlaceholder:N,controlHasDisabled:j,controlHasClearable:I}}function fge(t,e,n,o,r){const i=f.computed(()=>{if(o.value!=null){const u=o.value,h=e.value[u];return h?{i:`global_btn_${u}`,type:"globalButton",nodeKind:"control",config:h}:null}if(r.value){const{formId:u,childId:h}=r.value,p=Dl(t.value,{i:u});if(!p||!p.children)return null;for(const m of p.children){if(!m.children)continue;const g=Dl(m.children,{i:h});if(g)return g}return null}if(!n.value)return null;const l=n.value,c=Dl(t.value,{i:l});if(c)return c;for(const u of t.value){if(!u.children)continue;const h=Dl(u.children,{i:l});if(h)return h}return null});f.watch(i,l=>{console.log("[FlameFramework] selectedItem changed:",l),l&&l.type&&l.type!=="flmForm"&&!l.formItem&&(l.formItem={...H2(l.type),label:l.label??l0(l.type)})},{immediate:!0});function s(l,c){o.value=null,n.value=l.i,r.value={formId:l.i,childId:c.i}}function a(l,c){var h,p,m;const u=l.target;(h=u.closest)!=null&&h.call(u,".module-header-actions")||(p=u.closest)!=null&&p.call(u,".module-child-delete")||(m=u.closest)!=null&&m.call(u,".form-inner-control-wrap")||(n.value=c.i,o.value=null,r.value=null,l.stopPropagation())}return{selectedItem:i,selectFormChild:s,onGridWidgetCapture:a}}function m5(t,e){var n;if(t!=null&&t.length)for(const o of t)e(o),(n=o.children)!=null&&n.length&&m5(o.children,e)}function g5(t){if("kind"in t&&t.kind==="custom"){const n=t;return{type:"flmCustom",kind:"custom",id:Cs(),label:n.label,defaultConfig:n.defaultConfig,defaultFormItem:n.defaultFormItem,customKey:n.key,customComponentName:n.componentName,customAttrFields:n.attrFields?Or(n.attrFields):[]}}const e=t;return{type:e.type,kind:"basic",id:Cs(),label:e.label,defaultConfig:e.defaultConfig,defaultFormItem:e.defaultFormItem}}function dge(t,e,n,o,r,i,s,a,l,c,u){function h(k){for(const O of a.value)for(const A of O.items)if(A.kind==="custom"&&A.key===k)return A}function p(k){for(const O of a.value)for(const A of O.items)if(A.kind==="custom"&&A.componentName===k)return A}function m(k){k.forEach(O=>{O.type!=="group"||!O.children||O.children.forEach(A=>{A.nodeKind!=="form"&&A.nodeKind!=="subForm"||m5(A.children,T=>{var N,j,I;if(T.type==="flmCustom"&&!((N=T.customAttrFields)!=null&&N.length)){if(T.customKey){const E=h(T.customKey);(j=E==null?void 0:E.attrFields)!=null&&j.length&&(T.customAttrFields=Or(E.attrFields));return}if(T.customComponentName){const E=p(T.customComponentName);E&&(T.customKey=E.key,(I=E.attrFields)!=null&&I.length&&(T.customAttrFields=Or(E.attrFields)))}}})})})}function g(k,O){var T;const A=Dl(t.value,{i:k});if(!(A!=null&&A.children))return null;for(const N of A.children)if(!(N.nodeKind==="slot"||N.type==="groupSlot")&&(T=N.children)!=null&&T.some(j=>j.i===O))return N;return null}function v(k){var A;const O=Dl(t.value,{i:k});if(O)return O;for(const T of t.value)if((A=T.children)!=null&&A.some(N=>N.i===k))return T;return null}function b(){const k=[...r.value];r.value=[];let O=null;k.forEach(A=>{if(A.type!=="group")return;const T=s0(t.value),N=Y2(),j={i:N,x:T.x,y:T.y,w:T.w,h:T.h,type:"group",label:"分组",config:{},children:[],nodeKind:"group"};t.value.push(j),O=N}),O&&(o.value=null,n.value=null,e.value=O)}function y(k,O,A){if(O.length){if(k.children||(k.children=[]),k.nodeKind==="group"){let T=null;const N=k.children.some(I=>I.nodeKind==="subForm"),j=k.children.some(I=>I.nodeKind==="form");O.forEach(I=>{if(I.type!=="formSlot"){if(I.type==="groupSlot"){const E=Bg(k,24,1),P={i:Cs(),x:E.x,y:E.y,w:24,h:1,type:"groupSlot",label:"分组插槽",nodeKind:"slot",config:{slotName:""}};k.children.push(P),T=P;return}if(I.type==="subForm"){if(j||N)return;const E=Bg(k,24,1),P={i:Cs(),x:E.x,y:E.y,w:E.w,h:E.h,type:"flmSubForm",label:"子表单",nodeKind:"subForm",children:[],config:{items:[],gridColumns:24,addButtonText:"新增一行",defaultGenerateOne:!1,minItems:void 0,maxItems:void 0}};k.children.push(P),T=P;return}if(I.type==="form"){if(j||N)return;const E=Bg(k,24,1),P=c0("flmForm"),D=Tp(P||{},["buttons"]),R={i:Cs(),x:E.x,y:E.y,w:E.w,h:E.h,type:"flmForm",label:"表单",nodeKind:"form",config:D,children:[]};k.children.push(R),T=R;return}}}),T&&(o.value=null,n.value=null,e.value=T.i);return}if(k.nodeKind==="form"||k.nodeKind==="subForm"){const T=(j,I)=>{const E=c5(k,A.gridEl,A.clientX,A.clientY,es,u5,W2,j,I,"preview");return Npe(k,E,es),E};let N=null;if(O.forEach(j=>{var G;if(j.type==="group"||j.type==="subForm"||j.type==="form"||j.type==="groupSlot")return;if(j.type==="formSlot"){const te=T(24,1),K={i:Cs(),x:te.x,y:te.y,w:te.w,h:1,type:"formSlot",label:"表单插槽",nodeKind:"slot",config:{slotName:""}};k.children||(k.children=[]),k.children.push(K),N=K;return}if(j.type==="flmCustom"||j.kind==="custom"){const te=Vg("flmCustom"),K=T(te.w,te.h),q=G2("flmCustom"),F=j.defaultConfig?{...q,...j.defaultConfig}:q,oe=H2("flmCustom"),ve=j.defaultFormItem?{...oe,...j.defaultFormItem}:oe,Ee={i:Cs(),x:K.x,y:K.y,w:te.w,h:te.h,type:"flmCustom",label:j.label||j.customComponentName||"业务组件",config:F,formItem:ve,nodeKind:"control",customKey:j.customKey,customComponentName:j.customComponentName,customAttrFields:(G=j.customAttrFields)!=null&&G.length?Or(j.customAttrFields):[]};k.children||(k.children=[]),k.children.push(Ee),N=Ee;return}const I=j.type,E=Vg(I),P=T(E.w,E.h),D=G2(I),R=j.defaultConfig?{...D,...j.defaultConfig}:D,z=H2(I),U=j.defaultFormItem?{...z,...j.defaultFormItem}:z,_={i:Cs(),x:P.x,y:P.y,w:E.w,h:E.h,type:I,label:j.label||l0(I),config:R,formItem:U,nodeKind:"control"};k.children||(k.children=[]),k.children.push(_),N=_}),N){o.value=null;const j=v(k.i);j?l(j,N):(e.value=k.i,n.value=null)}}}}function w(k,O,A,T,N){const j=l5({to:A,clientX:Number.isFinite(T)?T:void 0,clientY:Number.isFinite(N)?N:void 0});y(k,[O],j)}function S(k,O){!O.children||!k||(k.forEach(A=>{const T=Dl(O.children,{i:A.i});T&&(T.x=A.x,T.y=A.y,T.w=A.w,T.h=A.h)}),a5(O.children)&&a0(O))}function C(){const k=[...s.value];s.value=[];for(const O of k)(O.type==="form"||O.type==="subForm"||O.type==="groupSlot")&&u(O.type==="groupSlot"?"slot":O.type)}function x(k){const O=t.value[k];if(!O||O.nodeKind==="group")return;const A=O.type,T=A==="groupSlot"?"slot":A==="subForm"?"subForm":"form";t.value.splice(k,1);const N=Y2(),j=c(T),I=s0(t.value),E={i:N,x:I.x,y:I.y,w:I.w,h:I.h,type:"group",label:"分组",config:{},children:[j],nodeKind:"group"};t.value.splice(k,0,E),o.value=null,n.value=null,e.value=N}return{onDropFromPalette:b,onInteractDropToFormInner:w,onContainerDrop:C,onDropContainerInRoot:x,onInnerLayoutUpdated:S,findFormContainerForInnerControl:g,findGroupByNodeId:v,findCustomPaletteByKey:h,findCustomPaletteByComponentName:p,hydrateLayoutCustomFields:m}}const Jo={init:hge,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function lp(){}function hge(t){const e=t;Jo.document=e.document,Jo.DocumentFragment=e.DocumentFragment||lp,Jo.SVGElement=e.SVGElement||lp,Jo.SVGSVGElement=e.SVGSVGElement||lp,Jo.SVGElementInstance=e.SVGElementInstance||lp,Jo.Element=e.Element||lp,Jo.HTMLElement=e.HTMLElement||Jo.Element,Jo.Event=e.Event,Jo.Touch=e.Touch||lp,Jo.PointerEvent=e.PointerEvent||e.MSPointerEvent}var v5=t=>!!(t&&t.Window)&&t instanceof t.Window;let b5,ad;function y5(t){b5=t;const e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),ad=t}typeof window<"u"&&window&&y5(window);function bc(t){return v5(t)?t:(t.ownerDocument||t).defaultView||ad.window}const pge=t=>t===ad||v5(t),mge=t=>u0(t)&&t.nodeType===11,u0=t=>!!t&&typeof t=="object",x5=t=>typeof t=="function";var qe={window:pge,docFrag:mge,object:u0,func:x5,number:t=>typeof t=="number",bool:t=>typeof t=="boolean",string:t=>typeof t=="string",element:t=>{if(!t||typeof t!="object")return!1;const e=bc(t)||ad;return/object|function/.test(typeof Element)?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:t=>u0(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString()),array:t=>u0(t)&&typeof t.length<"u"&&x5(t.splice)};const zr={init:gge,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function gge(t){const e=Jo.Element,n=t.navigator||{};zr.supportsTouch="ontouchstart"in t||qe.func(t.DocumentTouch)&&Jo.document instanceof t.DocumentTouch,zr.supportsPointerEvent=n.pointerEnabled!==!1&&!!Jo.PointerEvent,zr.isIOS=/iP(hone|od|ad)/.test(n.platform),zr.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),zr.isIe9=/MSIE 9/.test(n.userAgent),zr.isOperaMobile=n.appName==="Opera"&&zr.supportsTouch&&/Presto/.test(n.userAgent),zr.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",zr.pEventTypes=zr.supportsPointerEvent?Jo.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,zr.wheelEvent=Jo.document&&"onmousewheel"in Jo.document?"mousewheel":"wheel"}const w5=(t,e)=>{for(const n of e)t.push(n);return t},C5=t=>w5([],t),zg=(t,e)=>{for(let n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1},f0=(t,e)=>t[zg(t,e)];function d0(t){const e={};for(const n in t){const o=t[n];qe.plainObject(o)?e[n]=d0(o):qe.array(o)?e[n]=C5(o):e[n]=o}return e}function ts(t,e){for(const o in e)t[o]=e[o];return t}let k5=0,yc,ld;function vge(t){if(yc=t.requestAnimationFrame,ld=t.cancelAnimationFrame,!yc){const e=["ms","moz","webkit","o"];for(const n of e)yc=t[`${n}RequestAnimationFrame`],ld=t[`${n}CancelAnimationFrame`]||t[`${n}CancelRequestAnimationFrame`]}yc=yc&&yc.bind(t),ld=ld&&ld.bind(t),yc||(yc=e=>{const n=Date.now(),o=Math.max(0,16-(n-k5)),r=t.setTimeout(()=>{e(n+o)},o);return k5=n+o,r},ld=e=>clearTimeout(e))}var cp={request:t=>yc(t),cancel:t=>ld(t),init:vge};function cd(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r=>!0,o=arguments.length>3?arguments[3]:void 0;if(o=o||{},qe.string(t)&&t.search(" ")!==-1&&(t=S5(t)),qe.array(t))return t.forEach(r=>cd(r,e,n,o)),o;if(qe.object(t)&&(e=t,t=""),qe.func(e)&&n(t))o[t]=o[t]||[],o[t].push(e);else if(qe.array(e))for(const r of e)cd(t,r,n,o);else if(qe.object(e))for(const r in e){const i=S5(r).map(s=>`${t}${s}`);cd(i,e[r],n,o)}return o}function S5(t){return t.trim().split(/ +/)}function j5(t,e){for(const n of e){if(t.immediatePropagationStopped)break;n(t)}}class E5{constructor(e){this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ts({},e||{})}fire(e){let n;const o=this.global;(n=this.types[e.type])&&j5(e,n),!e.propagationStopped&&o&&(n=o[e.type])&&j5(e,n)}on(e,n){const o=cd(e,n);for(e in o)this.types[e]=w5(this.types[e]||[],o[e])}off(e,n){const o=cd(e,n);for(e in o){const r=this.types[e];if(!(!r||!r.length))for(const i of o[e]){const s=r.indexOf(i);s!==-1&&r.splice(s,1)}}}getRect(e){return null}}function ud(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function O5(t,e){for(;qe.element(t);){if(Pu(t,e))return t;t=fd(t)}return null}function fd(t){let e=t.parentNode;if(qe.docFrag(e)){for(;(e=e.host)&&qe.docFrag(e););return e}return e}function Pu(t,e){return ad!==b5&&(e=e.replace(/\/deep\//g," ")),t[zr.prefixedMatchesSelector](e)}const X2=t=>t.parentNode||t.host;function bge(t){let e=[],n;for(let o=0;o<t.length;o++){const r=t[o],i=t[n];if(!r||o===n)continue;if(!i){n=o;continue}const s=X2(r),a=X2(i);if(s===r.ownerDocument)continue;if(a===r.ownerDocument){n=o;continue}if(s===a){yge(r,i)&&(n=o);continue}e=e.length?e:T5(i);let l;if(i instanceof Jo.HTMLElement&&r instanceof Jo.SVGElement&&!(r instanceof Jo.SVGSVGElement)){if(r===a)continue;l=r.ownerSVGElement}else l=r;const c=T5(l,i.ownerDocument);let u=0;for(;c[u]&&c[u]===e[u];)u++;const h=[c[u-1],c[u],e[u]];if(h[0]){let p=h[0].lastChild;for(;p;){if(p===h[1]){n=o,e=c;break}else if(p===h[2])break;p=p.previousSibling}}}return n}function T5(t,e){const n=[];let o=t,r;for(;(r=X2(o))&&o!==e&&r!==o.ownerDocument;)n.unshift(o),o=r;return n}function yge(t,e){const n=parseInt(bc(t).getComputedStyle(t).zIndex,10)||0,o=parseInt(bc(e).getComputedStyle(e).zIndex,10)||0;return n>=o}function A5(t,e,n){for(;qe.element(t);){if(Pu(t,e))return!0;if(t=fd(t),t===n)return Pu(t,e)}return!1}function M5(t){return t.correspondingUseElement||t}function xge(t){return t=t||ad,{x:t.scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function J2(t){const e=t instanceof Jo.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function Q2(t){const e=J2(t);if(!zr.isIOS7&&e){const n=xge(bc(t));e.left+=n.x,e.right+=n.x,e.top+=n.y,e.bottom+=n.y}return e}function N5(t){return qe.string(t)?(Jo.document.querySelector(t),!0):!1}const wge=["webkit","moz"];function P5(t,e){t.__set||(t.__set={});for(const n in e)wge.some(o=>n.indexOf(o)===0)||typeof t[n]!="function"&&n!=="__set"&&Object.defineProperty(t,n,{get(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set(o){t.__set[n]=o},configurable:!0});return t}var Z2=(t,e)=>Math.sqrt(t*t+e*e);function q2(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function Cge(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp}function kge(t,e){const n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n}function Sge(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function D5(t){return t instanceof Jo.Event||t instanceof Jo.Touch}function h0(t,e,n){return n=n||{},t=t||"page",n.x=e[t+"X"],n.y=e[t+"Y"],n}function I5(t,e){return e=e||{x:0,y:0},zr.isOperaMobile&&D5(t)?(h0("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):h0("page",t,e),e}function jge(t,e){return e=e||{},zr.isOperaMobile&&D5(t)?h0("screen",t,e):h0("client",t,e),e}function p0(t){return qe.number(t.pointerId)?t.pointerId:t.identifier}function Ege(t,e,n){const o=e.length>1?R5(e):e[0];I5(o,t.page),jge(o,t.client),t.timeStamp=n}function $2(t){const e=[];return qe.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function R5(t){const e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const n of t)for(const o in e)e[o]+=n[o];for(const n in e)e[n]/=t.length;return e}function Oge(t){if(!t.length)return null;const e=$2(t),n=Math.min(e[0].pageX,e[1].pageX),o=Math.min(e[0].pageY,e[1].pageY),r=Math.max(e[0].pageX,e[1].pageX),i=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:o,left:n,top:o,right:r,bottom:i,width:r-n,height:i-o}}function Tge(t,e){const n=e+"X",o=e+"Y",r=$2(t),i=r[0][n]-r[1][n],s=r[0][o]-r[1][o];return Z2(i,s)}function Age(t,e){const n=e+"X",o=e+"Y",r=$2(t),i=r[1][n]-r[0][n],s=r[1][o]-r[0][o];return 180*Math.atan2(s,i)/Math.PI}function Mge(t){return qe.string(t.pointerType)?t.pointerType:qe.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof Jo.Touch?"touch":"mouse"}function L5(t){const e=qe.func(t.composedPath)?t.composedPath():t.path;return[M5(e?e[0]:t.target),M5(t.currentTarget)]}function _g(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function Nge(t){var e;const n=[],o={},r=[],i={add:s,remove:a,addDelegate:l,removeDelegate:c,delegateListener:u,delegateUseCapture:h,delegatedEvents:o,documents:r,targets:n,supportsOptions:!1,supportsPassive:!1};(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i;function s(p,m,g,v){if(!p.addEventListener)return;const b=Ug(v);let y=f0(n,w=>w.eventTarget===p);y||(y={eventTarget:p,events:{}},n.push(y)),y.events[m]||(y.events[m]=[]),f0(y.events[m],w=>w.func===g&&m0(w.options,b))||(p.addEventListener(m,g,i.supportsOptions?b:b.capture),y.events[m].push({func:g,options:b}))}function a(p,m,g,v){if(!p.addEventListener||!p.removeEventListener)return;const b=zg(n,C=>C.eventTarget===p),y=n[b];if(!y||!y.events)return;if(m==="all"){for(m in y.events)y.events.hasOwnProperty(m)&&a(p,m,"all");return}let w=!1;const S=y.events[m];if(S)if(g==="all"){for(let C=S.length-1;C>=0;C--){const x=S[C];a(p,m,x.func,x.options)}return}else{const C=Ug(v);for(let x=0;x<S.length;x++){const k=S[x];if(k.func===g&&m0(k.options,C)){p.removeEventListener(m,g,i.supportsOptions?C:C.capture),S.splice(x,1),S.length===0&&(delete y.events[m],w=!0);break}}}w&&!Object.keys(y.events).length&&n.splice(b,1)}function l(p,m,g,v,b){const y=Ug(b);if(!o[g]){o[g]=[];for(const C of r)s(C,g,u),s(C,g,h,!0)}const w=o[g];let S=f0(w,C=>C.selector===p&&C.context===m);S||(S={selector:p,context:m,listeners:[]},w.push(S)),S.listeners.push({func:v,options:y})}function c(p,m,g,v,b){const y=Ug(b),w=o[g];let S=!1,C;if(w)for(C=w.length-1;C>=0;C--){const x=w[C];if(x.selector===p&&x.context===m){const{listeners:k}=x;for(let O=k.length-1;O>=0;O--){const A=k[O];if(A.func===v&&m0(A.options,y)){k.splice(O,1),k.length||(w.splice(C,1),a(m,g,u),a(m,g,h,!0)),S=!0;break}}if(S)break}}}function u(p,m){const g=Ug(m),v=new Pge(p),b=o[p.type],[y]=L5(p);let w=y;for(;qe.element(w);){for(let S=0;S<b.length;S++){const C=b[S],{selector:x,context:k}=C;if(Pu(w,x)&&ud(k,y)&&ud(k,w)){const{listeners:O}=C;v.currentTarget=w;for(const A of O)m0(A.options,g)&&A.func(v)}}w=fd(w)}}function h(p){return u.call(this,p,!0)}return i}class Pge{constructor(e){this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,P5(this,e)}preventOriginalDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}stopImmediatePropagation(){this.originalEvent.stopImmediatePropagation()}}function Ug(t){return qe.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function m0(t,e){return t===e?!0:typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive}var Dge={id:"events",install:Nge};const Ige=function(e){return/^(always|never|auto)$/.test(e)?(this.options.preventDefault=e,this):qe.bool(e)?(this.options.preventDefault=e?"always":"never",this):this.options.preventDefault};function Rge(t,e,n){const o=t.options.preventDefault;if(o!=="never"){if(o==="always"){n.preventDefault();return}if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){const r=bc(n.target).document,i=e.getDocOptions(r);if(!(i&&i.events)||i.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||qe.element(n.target)&&Pu(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}}function Lge(t){let{interaction:e,event:n}=t;e.interactable&&e.interactable.checkAndPreventDefault(n)}function Bge(t){const{Interactable:e}=t;e.prototype.preventDefault=Ige,e.prototype.checkAndPreventDefault=function(n){return Rge(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener(n){for(const o of t.interactions.list)if(o.element&&(o.element===n.target||ud(o.element,n.target))){o.interactable.checkAndPreventDefault(n);return}}})}var Vge={id:"core/interactablePreventDefault",install:Bge,listeners:["down","move","up","cancel"].reduce((t,e)=>(t[`interactions:${e}`]=Lge,t),{})};function Wg(t,e){let n=!1;return function(){return n||(ad.console.warn(e),n=!0),t.apply(this,arguments)}}function B5(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function V5(t,e,n){return t==="parent"?fd(n):t==="self"?e.getRect(n):O5(n,t)}function Fge(t,e,n,o){let r=t;return qe.string(r)?r=V5(r,e,n):qe.func(r)&&(r=r(...o)),qe.element(r)&&(r=Q2(r)),r}function zge(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function _ge(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function F5(t,e,n){const o=n&&t.options[n],i=o&&o.origin||t.options.origin,s=Fge(i,t,e,[t&&e]);return zge(s)||{x:0,y:0}}class ej{constructor(e){this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}Object.defineProperty(ej.prototype,"interaction",{get(){return this._interaction._proxy},set(){}});const z5={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};class tj extends ej{constructor(e,n,o,r,i,s,a){super(e),this.relatedTarget=null,this.screenX=void 0,this.screenY=void 0,this.button=void 0,this.buttons=void 0,this.ctrlKey=void 0,this.shiftKey=void 0,this.altKey=void 0,this.metaKey=void 0,this.page=void 0,this.client=void 0,this.delta=void 0,this.rect=void 0,this.x0=void 0,this.y0=void 0,this.t0=void 0,this.dt=void 0,this.duration=void 0,this.clientX0=void 0,this.clientY0=void 0,this.velocity=void 0,this.speed=void 0,this.swipe=void 0,this.axes=void 0,this.preEnd=void 0,i=i||e.element;const l=e.interactable,c=(l&&l.options||z5).deltaSource,u=F5(l,i,o),h=r==="start",p=r==="end",m=h?this:e.prevEvent,g=h?e.coords.start:p?{page:m.page,client:m.client,timeStamp:e.coords.cur.timeStamp}:e.coords.cur;this.page=ts({},g.page),this.client=ts({},g.client),this.rect=ts({},e.rect),this.timeStamp=g.timeStamp,p||(this.page.x-=u.x,this.page.y-=u.y,this.client.x-=u.x,this.client.y-=u.y),this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.button=n.button,this.buttons=n.buttons,this.target=i,this.currentTarget=i,this.preEnd=s,this.type=a||o+(r||""),this.interactable=l,this.t0=h?e.pointers[e.pointers.length-1].downTime:m.t0,this.x0=e.coords.start.page.x-u.x,this.y0=e.coords.start.page.y-u.y,this.clientX0=e.coords.start.client.x-u.x,this.clientY0=e.coords.start.client.y-u.y,h||p?this.delta={x:0,y:0}:this.delta={x:this[c].x-m[c].x,y:this[c].y-m[c].y},this.dt=e.coords.delta.timeStamp,this.duration=this.timeStamp-this.t0,this.velocity=ts({},e.coords.velocity[c]),this.speed=Z2(this.velocity.x,this.velocity.y),this.swipe=p||r==="inertiastart"?this.getSwipe():null}getSwipe(){const e=this._interaction;if(e.prevEvent.speed<600||this.timeStamp-e.prevEvent.timeStamp>150)return null;let n=180*Math.atan2(e.prevEvent.velocityY,e.prevEvent.velocityX)/Math.PI;const o=22.5;n<0&&(n+=360);const r=135-o<=n&&n<225+o,i=225-o<=n&&n<315+o,s=!r&&(315-o<=n||n<45+o),a=!i&&45-o<=n&&n<135+o;return{up:i,down:a,left:r,right:s,angle:n,speed:e.prevEvent.speed,velocity:{x:e.prevEvent.velocityX,y:e.prevEvent.velocityY}}}preventDefault(){}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}}Object.defineProperties(tj.prototype,{pageX:{get(){return this.page.x},set(t){this.page.x=t}},pageY:{get(){return this.page.y},set(t){this.page.y=t}},clientX:{get(){return this.client.x},set(t){this.client.x=t}},clientY:{get(){return this.client.y},set(t){this.client.y=t}},dx:{get(){return this.delta.x},set(t){this.delta.x=t}},dy:{get(){return this.delta.y},set(t){this.delta.y=t}},velocityX:{get(){return this.velocity.x},set(t){this.velocity.x=t}},velocityY:{get(){return this.velocity.y},set(t){this.velocity.y=t}}});class Uge{constructor(e,n,o,r,i){this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=n,this.event=o,this.downTime=r,this.downTarget=i}}let Wge=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),Hge=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Gge=0;class Kge{get pointerMoveTolerance(){return 1}constructor(e){this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=Wg(function(i){this.move(i)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:_g(),prev:_g(),cur:_g(),delta:_g(),velocity:_g()},this._id=Gge++;let{pointerType:n,scopeFire:o}=e;this._scopeFire=o,this.pointerType=n;const r=this;this._proxy={};for(const i in Wge)Object.defineProperty(this._proxy,i,{get(){return r[i]}});for(const i in Hge)Object.defineProperty(this._proxy,i,{value:function(){return r[i](...arguments)}});this._scopeFire("interactions:new",{interaction:this})}pointerDown(e,n,o){const r=this.updatePointer(e,n,o,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:o,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}start(e,n,o){return this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled?!1:(B5(this.prepared,e),this.interactable=n,this.element=o,this.rect=n.getRect(o),this.edges=this.prepared.edges?ts({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}pointerMove(e,n,o){!this.simulation&&!(this.modification&&this.modification.endResult)&&this.updatePointer(e,n,o,!1);const r=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;let i,s;this.pointerIsDown&&!this.pointerWasMoved&&(i=this.coords.cur.client.x-this.coords.start.client.x,s=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Z2(i,s)>this.pointerMoveTolerance);const a=this.getPointerIndex(e),l={pointer:e,pointerIndex:a,pointerInfo:this.pointers[a],event:n,type:"move",eventTarget:o,dx:i,dy:s,duplicate:r,interaction:this};r||kge(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",l),!r&&!this.simulation&&(this.interacting()&&(l.type=null,this.move(l)),this.pointerWasMoved&&q2(this.coords.prev,this.coords.cur))}move(e){(!e||!e.event)&&Sge(this.coords.delta),e=ts({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{}),e.phase="move",this._doPhase(e)}pointerUp(e,n,o,r){let i=this.getPointerIndex(e);i===-1&&(i=this.updatePointer(e,n,o,!1));const s=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire(`interactions:${s}`,{pointer:e,pointerIndex:i,pointerInfo:this.pointers[i],event:n,eventTarget:o,type:s,curEventTarget:r,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}documentBlur(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}end(e){this._ending=!0,e=e||this._latestPointer.event;let n;this.interacting()&&(n=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}currentAction(){return this._interacting?this.prepared.name:null}interacting(){return this._interacting}stop(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}getPointerIndex(e){const n=p0(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:zg(this.pointers,o=>o.id===n)}getPointerInfo(e){return this.pointers[this.getPointerIndex(e)]}updatePointer(e,n,o,r){const i=p0(e);let s=this.getPointerIndex(e),a=this.pointers[s];return r=r===!1?!1:r||/(down|start)$/i.test(n.type),a?a.pointer=e:(a=new Uge(i,e,n,null,null),s=this.pointers.length,this.pointers.push(a)),Ege(this.coords.cur,this.pointers.map(l=>l.pointer),this._now()),Cge(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=o,P5(this.downPointer,e),this.interacting()||(q2(this.coords.start,this.coords.cur),q2(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,o),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:o,down:r,pointerInfo:a,pointerIndex:s,interaction:this}),s}removePointer(e,n){const o=this.getPointerIndex(e);if(o===-1)return;const r=this.pointers[o];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:o,pointerInfo:r,interaction:this}),this.pointers.splice(o,1),this.pointerIsDown=!1}_updateLatestPointer(e,n,o){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=o}destroy(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}_createPreparedEvent(e,n,o,r){return new tj(this,e,this.prepared.name,n,this.element,o,r)}_fireEvent(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}_doPhase(e){const{event:n,phase:o,preEnd:r,type:i}=e,{rect:s}=this;if(s&&o==="move"&&(_ge(this.edges,s,this.coords.delta[this.interactable.options.deltaSource]),s.width=s.right-s.left,s.height=s.bottom-s.top),this._scopeFire(`interactions:before-action-${o}`,e)===!1)return!1;const l=e.iEvent=this._createPreparedEvent(n,o,r,i);return this._scopeFire(`interactions:action-${o}`,e),o==="start"&&(this.prevEvent=l),this._fireEvent(l),this._scopeFire(`interactions:after-action-${o}`,e),!0}_now(){return Date.now()}}const nj={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search(t){for(const e of nj.methodOrder){const n=nj[e](t);if(n)return n}return null},simulationResume(t){let{pointerType:e,eventType:n,eventTarget:o,scope:r}=t;if(!/down|start/i.test(n))return null;for(const i of r.interactions.list){let s=o;if(i.simulation&&i.simulation.allowResume&&i.pointerType===e)for(;s;){if(s===i.element)return i;s=fd(s)}}return null},mouseOrPen(t){let{pointerId:e,pointerType:n,eventType:o,scope:r}=t;if(n!=="mouse"&&n!=="pen")return null;let i;for(const s of r.interactions.list)if(s.pointerType===n){if(s.simulation&&!_5(s,e))continue;if(s.interacting())return s;i||(i=s)}if(i)return i;for(const s of r.interactions.list)if(s.pointerType===n&&!(/down/i.test(o)&&s.simulation))return s;return null},hasPointer(t){let{pointerId:e,scope:n}=t;for(const o of n.interactions.list)if(_5(o,e))return o;return null},idle(t){let{pointerType:e,scope:n}=t;for(const o of n.interactions.list){if(o.pointers.length===1){const r=o.interactable;if(r&&!(r.options.gesture&&r.options.gesture.enabled))continue}else if(o.pointers.length>=2)continue;if(!o.interacting()&&e===o.pointerType)return o}return null}};function _5(t,e){return t.pointers.some(n=>{let{id:o}=n;return o===e})}const U5=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Yge(t){const e={};for(const i of U5)e[i]=W5(i,t);const n=zr.pEventTypes;let o;Jo.PointerEvent?o=[{type:n.down,listener:r},{type:n.down,listener:e.pointerDown},{type:n.move,listener:e.pointerMove},{type:n.up,listener:e.pointerUp},{type:n.cancel,listener:e.pointerUp}]:o=[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:r},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}],o.push({type:"blur",listener(i){for(const s of t.interactions.list)s.documentBlur(i)}}),t.prevTouchTime=0,t.Interaction=class extends Kge{get pointerMoveTolerance(){return t.interactions.pointerMoveTolerance}set pointerMoveTolerance(i){t.interactions.pointerMoveTolerance=i}_now(){return t.now()}},t.interactions={list:[],new(i){i.scopeFire=(a,l)=>t.fire(a,l);const s=new t.Interaction(i);return t.interactions.list.push(s),s},listeners:e,docEvents:o,pointerMoveTolerance:1};function r(){for(const i of t.interactions.list)if(!(!i.pointerIsDown||i.pointerType!=="touch"||i._interacting))for(const s of i.pointers)t.documents.some(a=>{let{doc:l}=a;return ud(l,s.downTarget)})||i.removePointer(s.pointer,s.event)}t.usePlugin(Vge)}function W5(t,e){return function(n){const o=e.interactions.list,r=Mge(n),[i,s]=L5(n),a=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(const l of n.changedTouches){const c=l,u=p0(c),h={pointer:c,pointerId:u,pointerType:r,eventType:n.type,eventTarget:i,curEventTarget:s,scope:e},p=H5(h);a.push([h.pointer,h.eventTarget,h.curEventTarget,p])}}else{let l=!1;if(!zr.supportsPointerEvent&&/mouse/.test(n.type)){for(let c=0;c<o.length&&!l;c++)l=o[c].pointerType!=="mouse"&&o[c].pointerIsDown;l=l||e.now()-e.prevTouchTime<500||n.timeStamp===0}if(!l){const c={pointer:n,pointerId:p0(n),pointerType:r,eventType:n.type,curEventTarget:s,eventTarget:i,scope:e},u=H5(c);a.push([c.pointer,c.eventTarget,c.curEventTarget,u])}}for(const[l,c,u,h]of a)h[t](l,n,c,u)}}function H5(t){const{pointerType:e,scope:n}=t,r={interaction:nj.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function oj(t,e){let{doc:n,scope:o,options:r}=t;const{interactions:{docEvents:i},events:s}=o,a=s[e];o.browser.isIOS&&!r.events&&(r.events={passive:!1});for(const c in s.delegatedEvents)a(n,c,s.delegateListener),a(n,c,s.delegateUseCapture,!0);const l=r&&r.events;for(const{type:c,listener:u}of i)a(n,c,u,l)}const Xge={id:"core/interactions",install:Yge,listeners:{"scope:add-document":t=>oj(t,"add"),"scope:remove-document":t=>oj(t,"remove"),"interactable:unset":(t,e)=>{let{interactable:n}=t;for(let o=e.interactions.list.length-1;o>=0;o--){const r=e.interactions.list[o];r.interactable===n&&(r.stop(),e.fire("interactions:destroy",{interaction:r}),r.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(o,1))}}},onDocSignal:oj,doOnInteractions:W5,methodNames:U5};function g0(t,e){if(e.phaselessTypes[t])return!0;for(const n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}var Du=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Du||{});class Jge{get _defaults(){return{base:{},perAction:{},actions:{}}}constructor(e,n,o,r){this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new E5,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=e,this._context=n.context||o,this._win=bc(N5(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=r,this.set(n)}setOnEvents(e,n){return qe.func(n.onstart)&&this.on(`${e}start`,n.onstart),qe.func(n.onmove)&&this.on(`${e}move`,n.onmove),qe.func(n.onend)&&this.on(`${e}end`,n.onend),qe.func(n.oninertiastart)&&this.on(`${e}inertiastart`,n.oninertiastart),this}updatePerActionListeners(e,n,o){var r;const i=(r=this._actions.map[e])==null?void 0:r.filterEventType,s=a=>(i==null||i(a))&&g0(a,this._actions);(qe.array(n)||qe.object(n))&&this._onOff(Du.Off,e,n,void 0,s),(qe.array(o)||qe.object(o))&&this._onOff(Du.On,e,o,void 0,s)}setPerAction(e,n){const o=this._defaults;for(const r in n){const i=r,s=this.options[e],a=n[i];i==="listeners"&&this.updatePerActionListeners(e,s.listeners,a),qe.array(a)?s[i]=C5(a):qe.plainObject(a)?(s[i]=ts(s[i]||{},d0(a)),qe.object(o.perAction[i])&&"enabled"in o.perAction[i]&&(s[i].enabled=a.enabled!==!1)):qe.bool(a)&&qe.object(o.perAction[i])?s[i].enabled=a:s[i]=a}}getRect(e){return e=e||(qe.element(this.target)?this.target:null),qe.string(this.target)&&(e=e||this._context.querySelector(this.target)),Q2(e)}rectChecker(e){return qe.func(e)?(this.getRect=n=>{const o=ts({},e.apply(this,n));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}_backCompatOption(e,n){if(N5(n)||qe.object(n)){this.options[e]=n;for(const o in this._actions.map)this.options[o][e]=n;return this}return this.options[e]}origin(e){return this._backCompatOption("origin",e)}deltaSource(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}getAllElements(){const{target:e}=this;return qe.string(e)?Array.from(this._context.querySelectorAll(e)):qe.func(e)&&e.getAllElements?e.getAllElements():qe.element(e)?[e]:[]}context(){return this._context}inContext(e){return this._context===e.ownerDocument||ud(this._context,e)}testIgnoreAllow(e,n,o){return!this.testIgnore(e.ignoreFrom,n,o)&&this.testAllow(e.allowFrom,n,o)}testAllow(e,n,o){return e?qe.element(o)?qe.string(e)?A5(o,e,n):qe.element(e)?ud(e,o):!1:!1:!0}testIgnore(e,n,o){return!e||!qe.element(o)?!1:qe.string(e)?A5(o,e,n):qe.element(e)?ud(e,o):!1}fire(e){return this.events.fire(e),this}_onOff(e,n,o,r,i){qe.object(n)&&!qe.array(n)&&(r=o,o=null);const s=cd(n,o,i);for(let a in s){a==="wheel"&&(a=zr.wheelEvent);for(const l of s[a])g0(a,this._actions)?this.events[e===Du.On?"on":"off"](a,l):qe.string(this.target)?this._scopeEvents[e===Du.On?"addDelegate":"removeDelegate"](this.target,this._context,a,l,r):this._scopeEvents[e===Du.On?"add":"remove"](this.target,a,l,r)}return this}on(e,n,o){return this._onOff(Du.On,e,n,o)}off(e,n,o){return this._onOff(Du.Off,e,n,o)}set(e){const n=this._defaults;qe.object(e)||(e={}),this.options=d0(n.base);for(const o in this._actions.methodDict){const r=o,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,ts(ts({},n.perAction),n.actions[r])),this[i](e[r])}for(const o in e){if(o==="getRect"){this.rectChecker(e.getRect);continue}qe.func(this[o])&&this[o](e[o])}return this}unset(){if(qe.string(this.target))for(const e in this._scopeEvents.delegatedEvents){const n=this._scopeEvents.delegatedEvents[e];for(let o=n.length-1;o>=0;o--){const{selector:r,context:i,listeners:s}=n[o];r===this.target&&i===this._context&&n.splice(o,1);for(let a=s.length-1;a>=0;a--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[a][0],s[a][1])}}else this._scopeEvents.remove(this.target,"all")}}class Qge{constructor(e){this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":n=>{let{interactable:o}=n;const{target:r}=o,i=qe.string(r)?this.selectorMap[r]:r[this.scope.id],s=zg(i,a=>a===o);i.splice(s,1)}})}new(e,n){n=ts(n||{},{actions:this.scope.actions});const o=new this.scope.Interactable(e,n,this.scope.document,this.scope.events);return this.scope.addDocument(o._doc),this.list.push(o),qe.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(o)):(o.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(o)),this.scope.fire("interactable:new",{target:e,options:n,interactable:o,win:this.scope._win}),o}getExisting(e,n){const o=n&&n.context||this.scope.document,r=qe.string(e),i=r?this.selectorMap[e]:e[this.scope.id];if(i)return f0(i,s=>s._context===o&&(r||s.inContext(e)))}forEachMatch(e,n){for(const o of this.list){let r;if((qe.string(o.target)?qe.element(e)&&Pu(e,o.target):e===o.target)&&o.inContext(e)&&(r=n(o)),r!==void 0)return r}}}function Zge(t){const e=(n,o)=>{let r=t.interactables.getExisting(n,o);return r||(r=t.interactables.new(n,o),r.events.global=e.globalEvents),r};return e.getPointerAverage=R5,e.getTouchBBox=Oge,e.getTouchDistance=Tge,e.getTouchAngle=Age,e.getElementRect=Q2,e.getElementClientRect=J2,e.matchesSelector=Pu,e.closest=O5,e.globalEvents={},e.version="1.10.27",e.scope=t,e.use=function(n,o){return this.scope.usePlugin(n,o),this},e.isSet=function(n,o){return!!this.scope.interactables.get(n,o&&o.context)},e.on=Wg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.on(s,r,i);return this}if(qe.object(o)){for(const s in o)this.on(s,o[s],r);return this}return g0(o,this.scope.actions)?this.globalEvents[o]?this.globalEvents[o].push(r):this.globalEvents[o]=[r]:this.scope.events.add(this.scope.document,o,r,{options:i}),this},"The interact.on() method is being deprecated"),e.off=Wg(function(o,r,i){if(qe.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),qe.array(o)){for(const s of o)this.off(s,r,i);return this}if(qe.object(o)){for(const s in o)this.off(s,o[s],r);return this}if(g0(o,this.scope.actions)){let s;o in this.globalEvents&&(s=this.globalEvents[o].indexOf(r))!==-1&&this.globalEvents[o].splice(s,1)}else this.scope.events.remove(this.scope.document,o,r,i);return this},"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return zr.supportsTouch},e.supportsPointerEvent=function(){return zr.supportsPointerEvent},e.stop=function(){for(const n of this.scope.interactions.list)n.stop();return this},e.pointerMoveTolerance=function(n){return qe.number(n)?(this.scope.interactions.pointerMoveTolerance=n,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(n,o){this.scope.addDocument(n,o)},e.removeDocument=function(n){this.scope.removeDocument(n)},e}class qge{constructor(){this.id=`__interact_scope_${Math.floor(Math.random()*100)}`,this.isInitialized=!1,this.listenerMaps=[],this.browser=zr,this.defaults=d0(z5),this.Eventable=E5,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=Zge(this),this.InteractEvent=tj,this.Interactable=void 0,this.interactables=new Qge(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=n=>this.removeDocument(n.target);const e=this;this.Interactable=class extends Jge{get _defaults(){return e.defaults}set(n){return super.set(n),e.fire("interactable:set",{options:n,interactable:this}),this}unset(){super.unset();const n=e.interactables.list.indexOf(this);n<0||(e.interactables.list.splice(n,1),e.fire("interactable:unset",{interactable:this}))}}}addListeners(e,n){this.listenerMaps.push({id:n,map:e})}fire(e,n){for(const{map:{[e]:o}}of this.listenerMaps)if(o&&o(n,this,e)===!1)return!1}init(e){return this.isInitialized?this:$ge(this,e)}pluginIsInstalled(e){const{id:n}=e;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}usePlugin(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){let o=0;const r=this.listenerMaps.length,i=e.before.reduce((s,a)=>(s[a]=!0,s[G5(a)]=!0,s),{});for(;o<r;o++){const s=this.listenerMaps[o].id;if(s&&(i[s]||i[G5(s)]))break}this.listenerMaps.splice(o,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}addDocument(e,n){if(this.getDocIndex(e)!==-1)return!1;const o=bc(e);n=n?ts({},n):{},this.documents.push({doc:e,options:n}),this.events.documents.push(e),e!==this.document&&this.events.add(o,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:o,scope:this,options:n})}removeDocument(e){const n=this.getDocIndex(e),o=bc(e),r=this.documents[n].options;this.events.remove(o,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:e,window:o,scope:this,options:r})}getDocIndex(e){for(let n=0;n<this.documents.length;n++)if(this.documents[n].doc===e)return n;return-1}getDocOptions(e){const n=this.getDocIndex(e);return n===-1?null:this.documents[n].options}now(){return(this.window.Date||Date).now()}}function $ge(t,e){return t.isInitialized=!0,qe.window(e)&&y5(e),Jo.init(e),zr.init(e),cp.init(e),t.window=e,t.document=e.document,t.usePlugin(Xge),t.usePlugin(Dge),t}function G5(t){return t&&t.replace(/\/.*$/,"")}const K5=new qge,Iu=K5.interactStatic,eve=typeof globalThis<"u"?globalThis:window;K5.init(eve);function tve(t){const{Interactable:e}=t;e.prototype.getAction=function(o,r,i,s){const a=nve(this,r,i,s,t);return this.options.actionChecker?this.options.actionChecker(o,r,a,this,s,i):a},e.prototype.ignoreFrom=Wg(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=Wg(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=rve,e.prototype.styleCursor=ove}function nve(t,e,n,o,r){const i=t.getRect(o),s=e.buttons||{0:1,1:4,3:8,4:16}[e.button],a={action:null,interactable:t,interaction:n,element:o,rect:i,buttons:s};return r.fire("auto-start:check",a),a.action}function ove(t){return qe.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function rve(t){return qe.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ive={id:"auto-start/interactableMethods",install:tve};function sve(t){const{interactStatic:e,defaults:n}=t;t.usePlugin(ive),n.base.actionChecker=null,n.base.styleCursor=!0,ts(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=o=>Q5(o,t),t.autoStart={maxInteractions:1/0,withinInteractionLimit:v0,cursorElement:null}}function ave(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.interacting())return;const s=X5(n,o,r,i,e);J5(n,s,e)}function lve(t,e){let{interaction:n,pointer:o,event:r,eventTarget:i}=t;if(n.pointerType!=="mouse"||n.pointerIsDown||n.interacting())return;const s=X5(n,o,r,i,e);J5(n,s,e)}function cve(t,e){const{interaction:n}=t;if(!n.pointerIsDown||n.interacting()||!n.pointerWasMoved||!n.prepared.name)return;e.fire("autoStart:before-start",t);const{interactable:o}=n,r=n.prepared.name;r&&o&&(o.options[r].manualStart||!v0(o,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,o,n.element),Z5(n,e)))}function uve(t,e){let{interaction:n}=t;const{interactable:o}=n;o&&o.options.styleCursor&&rj(n.element,"",e)}function Y5(t,e,n,o,r){return e.testIgnoreAllow(e.options[t.name],n,o)&&e.options[t.name].enabled&&v0(e,n,t,r)?t:null}function fve(t,e,n,o,r,i,s){for(let a=0,l=o.length;a<l;a++){const c=o[a],u=r[a],h=c.getAction(e,n,t,u);if(!h)continue;const p=Y5(h,c,u,i,s);if(p)return{action:p,interactable:c,element:u}}return{action:null,interactable:null,element:null}}function X5(t,e,n,o,r){let i=[],s=[],a=o;function l(c){i.push(c),s.push(a)}for(;qe.element(a);){i=[],s=[],r.interactables.forEachMatch(a,l);const c=fve(t,e,n,i,s,o,r);if(c.action&&!c.interactable.options[c.action.name].manualStart)return c;a=fd(a)}return{action:null,interactable:null,element:null}}function J5(t,e,n){let{action:o,interactable:r,element:i}=e;o=o||{name:null},t.interactable=r,t.element=i,B5(t.prepared,o),t.rect=r&&o.name?r.getRect(i):null,Z5(t,n),n.fire("autoStart:prepared",{interaction:t})}function v0(t,e,n,o){const r=t.options,i=r[n.name].max,s=r[n.name].maxPerElement,a=o.autoStart.maxInteractions;let l=0,c=0,u=0;if(!(i&&s&&a))return!1;for(const h of o.interactions.list){const p=h.prepared.name;if(h.interacting()){if(l++,l>=a)return!1;if(h.interactable===t&&(c+=p===n.name?1:0,c>=i||h.element===e&&(u++,p===n.name&&u>=s)))return!1}}return a>0}function Q5(t,e){return qe.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function rj(t,e,n){const{cursorElement:o}=n.autoStart;o&&o!==t&&(o.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function Z5(t,e){const{interactable:n,element:o,prepared:r}=t;if(!(t.pointerType==="mouse"&&n&&n.options.styleCursor)){e.autoStart.cursorElement&&rj(e.autoStart.cursorElement,"",e);return}let i="";if(r.name){const s=n.options[r.name].cursorChecker;qe.func(s)?i=s(r,n,o,t._interacting):i=e.actions.map[r.name].getCursor(r)}rj(t.element,i||"",e)}const ij={id:"auto-start/base",before:["actions"],install:sve,listeners:{"interactions:down":ave,"interactions:move":(t,e)=>{lve(t,e),cve(t,e)},"interactions:stop":uve},maxInteractions:Q5,withinInteractionLimit:v0,validateAction:Y5};function dve(t,e){let{interaction:n,eventTarget:o,dx:r,dy:i}=t;if(n.prepared.name!=="drag")return;const s=Math.abs(r),a=Math.abs(i),l=n.interactable.options.drag,c=l.startAxis,u=s>a?"x":s<a?"y":"xy";if(n.prepared.axis=l.lockAxis==="start"?u[0]:l.lockAxis,u!=="xy"&&c!=="xy"&&c!==u){n.prepared.name=null;let h=o;const p=function(m){if(m===n.interactable)return;const g=n.interactable.options.drag;if(!g.manualStart&&m.testIgnoreAllow(g,h,o)){const v=m.getAction(n.downPointer,n.downEvent,n,h);if(v&&v.name==="drag"&&hve(u,m)&&ij.validateAction(v,m,h,o,e))return m}};for(;qe.element(h);){const m=e.interactables.forEachMatch(h,p);if(m){n.prepared.name="drag",n.interactable=m,n.element=h;break}h=fd(h)}}}function hve(t,e){if(!e)return!1;const n=e.options.drag.startAxis;return t==="xy"||n==="xy"||n===t}var pve={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":dve}};function mve(t){const{defaults:e}=t;t.usePlugin(ij),e.perAction.hold=0,e.perAction.delay=0}function sj(t){const e=t.prepared&&t.prepared.name;if(!e)return null;const n=t.interactable.options;return n[e].hold||n[e].delay}const gve={id:"auto-start/hold",install:mve,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoStartHoldTimer=null},"autoStart:prepared":t=>{let{interaction:e}=t;const n=sj(e);n>0&&(e.autoStartHoldTimer=setTimeout(()=>{e.start(e.prepared,e.interactable,e.element)},n))},"interactions:move":t=>{let{interaction:e,duplicate:n}=t;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":t=>{let{interaction:e}=t;sj(e)>0&&(e.prepared.name=null)}},getHoldDuration:sj};var vve={id:"auto-start",install(t){t.usePlugin(ij),t.usePlugin(gve),t.usePlugin(pve)}};Iu.use(vve);function bve(t){const{defaults:e,actions:n}=t;t.autoScroll=vn,vn.now=()=>t.now(),n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=vn.defaults}const vn={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start(t){vn.isScrolling=!0,cp.cancel(vn.i),t.autoScroll=vn,vn.interaction=t,vn.prevTime=vn.now(),vn.i=cp.request(vn.scroll)},stop(){vn.isScrolling=!1,vn.interaction&&(vn.interaction.autoScroll=null),cp.cancel(vn.i)},scroll(){const{interaction:t}=vn,{interactable:e,element:n}=t,o=t.prepared.name,r=e.options[o].autoScroll,i=q5(r.container,e,n),s=vn.now(),a=(s-vn.prevTime)/1e3,l=r.speed*a;if(l>=1){const c={x:vn.x*l,y:vn.y*l};if(c.x||c.y){const u=$5(i);qe.window(i)?i.scrollBy(c.x,c.y):i&&(i.scrollLeft+=c.x,i.scrollTop+=c.y);const h=$5(i),p={x:h.x-u.x,y:h.y-u.y};(p.x||p.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:p,interaction:t,container:i})}vn.prevTime=s}vn.isScrolling&&(cp.cancel(vn.i),vn.i=cp.request(vn.scroll))},check(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove(t){let{interaction:e,pointer:n}=t;if(!(e.interacting()&&vn.check(e.interactable,e.prepared.name)))return;if(e.simulation){vn.x=vn.y=0;return}let o,r,i,s;const{interactable:a,element:l}=e,c=e.prepared.name,u=a.options[c].autoScroll,h=q5(u.container,a,l);if(qe.window(h))s=n.clientX<vn.margin,o=n.clientY<vn.margin,r=n.clientX>h.innerWidth-vn.margin,i=n.clientY>h.innerHeight-vn.margin;else{const p=J2(h);s=n.clientX<p.left+vn.margin,o=n.clientY<p.top+vn.margin,r=n.clientX>p.right-vn.margin,i=n.clientY>p.bottom-vn.margin}vn.x=r?1:s?-1:0,vn.y=i?1:o?-1:0,vn.isScrolling||(vn.margin=u.margin,vn.speed=u.speed,vn.start(e))}};function q5(t,e,n){return(qe.string(t)?V5(t,e,n):t)||bc(n)}function $5(t){return qe.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}const yve={id:"auto-scroll",install:bve,listeners:{"interactions:new":t=>{let{interaction:e}=t;e.autoScroll=null},"interactions:destroy":t=>{let{interaction:e}=t;e.autoScroll=null,vn.stop(),vn.interaction&&(vn.interaction=null)},"interactions:stop":vn.stop,"interactions:action-move":t=>vn.onInteractionMove(t)}};Iu.use(yve);function xve(t){const{actions:e,Interactable:n,defaults:o}=t;n.prototype.draggable=Hg.draggable,e.map.drag=Hg,e.methodDict.drag="draggable",o.actions.drag=Hg.defaults}function aj(t){let{interaction:e}=t;if(e.prepared.name!=="drag")return;const n=e.prepared.axis;n==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):n==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}function e9(t){let{iEvent:e,interaction:n}=t;if(n.prepared.name!=="drag")return;const o=n.prepared.axis;if(o==="x"||o==="y"){const r=o==="x"?"y":"x";e.page[r]=n.coords.start.page[r],e.client[r]=n.coords.start.client[r],e.delta[r]=0}}const Hg={id:"actions/drag",install:xve,listeners:{"interactions:before-action-move":aj,"interactions:action-resume":aj,"interactions:action-move":e9,"auto-start:check":t=>{const{interaction:e,interactable:n,buttons:o}=t,r=n.options.drag;if(!(!(r&&r.enabled)||e.pointerIsDown&&/mouse|pointer/.test(e.pointerType)&&(o&n.options.drag.mouseButtons)===0))return t.action={name:"drag",axis:r.lockAxis==="start"?r.startAxis:r.lockAxis},!1}},draggable:function(e){return qe.object(e)?(this.options.drag.enabled=e.enabled!==!1,this.setPerAction("drag",e),this.setOnEvents("drag",e),/^(xy|x|y|start)$/.test(e.lockAxis)&&(this.options.drag.lockAxis=e.lockAxis),/^(xy|x|y)$/.test(e.startAxis)&&(this.options.drag.startAxis=e.startAxis),this):qe.bool(e)?(this.options.drag.enabled=e,this):this.options.drag},beforeMove:aj,move:e9,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor(){return"move"},filterEventType:t=>t.search("drag")===0};Iu.use(Hg);class xc extends ej{constructor(e,n,o){super(n._interaction),this.dropzone=void 0,this.dragEvent=void 0,this.relatedTarget=void 0,this.draggable=void 0,this.propagationStopped=!1,this.immediatePropagationStopped=!1;const{element:r,dropzone:i}=o==="dragleave"?e.prev:e.cur;this.type=o,this.target=r,this.currentTarget=r,this.dropzone=i,this.dragEvent=n,this.relatedTarget=n.target,this.draggable=n.interactable,this.timeStamp=n.timeStamp}reject(){const{dropState:e}=this._interaction;if(!(this.type!=="dropactivate"&&(!this.dropzone||e.cur.dropzone!==this.dropzone||e.cur.element!==this.target)))if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){const n=e.activeDrops,o=zg(n,i=>{let{dropzone:s,element:a}=i;return s===this.dropzone&&a===this.target});e.activeDrops.splice(o,1);const r=new xc(e,this.dragEvent,"dropdeactivate");r.dropzone=this.dropzone,r.target=this.target,this.dropzone.fire(r)}else this.dropzone.fire(new xc(e,this.dragEvent,"dragleave"))}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}function wve(t){const{actions:e,interactStatic:n,Interactable:o,defaults:r}=t;t.usePlugin(Hg),o.prototype.dropzone=function(i){return kve(this,i)},o.prototype.dropCheck=function(i,s,a,l,c,u){return Sve(this,i,s,a,l,c,u)},n.dynamicDrop=function(i){return qe.bool(i)?(t.dynamicDrop=i,n):t.dynamicDrop},ts(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,r.actions.drop=r9.defaults}function Cve(t,e){let{interactables:n}=t;const o=[];for(const r of n.list){if(!r.options.drop.enabled)continue;const i=r.options.drop.accept;if(!(qe.element(i)&&i!==e||qe.string(i)&&!Pu(e,i)||qe.func(i)&&!i({dropzone:r,draggableElement:e})))for(const s of r.getAllElements())s!==e&&o.push({dropzone:r,element:s,rect:r.getRect(s)})}return o}function t9(t,e){for(const{dropzone:n,element:o}of t.slice())e.dropzone=n,e.target=o,n.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}function lj(t,e){const n=Cve(t,e);for(const o of n)o.rect=o.dropzone.getRect(o.element);return n}function n9(t,e,n){let{dropState:o,interactable:r,element:i}=t;const s=[];for(const{dropzone:l,element:c,rect:u}of o.activeDrops){const h=l.dropCheck(e,n,r,i,c,u);s.push(h?c:null)}const a=bge(s);return o.activeDrops[a]||null}function cj(t,e,n){const o=t.dropState,r={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(r.activate=new xc(o,n,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),n.type==="dragend"&&(r.deactivate=new xc(o,n,"dropdeactivate"),r.deactivate.target=null,r.deactivate.dropzone=null),o.rejected||(o.cur.element!==o.prev.element&&(o.prev.dropzone&&(r.leave=new xc(o,n,"dragleave"),n.dragLeave=r.leave.target=o.prev.element,n.prevDropzone=r.leave.dropzone=o.prev.dropzone),o.cur.dropzone&&(r.enter=new xc(o,n,"dragenter"),n.dragEnter=o.cur.element,n.dropzone=o.cur.dropzone)),n.type==="dragend"&&o.cur.dropzone&&(r.drop=new xc(o,n,"drop"),n.dropzone=o.cur.dropzone,n.relatedTarget=o.cur.element),n.type==="dragmove"&&o.cur.dropzone&&(r.move=new xc(o,n,"dropmove"),n.dropzone=o.cur.dropzone)),r}function uj(t,e){const n=t.dropState,{activeDrops:o,cur:r,prev:i}=n;e.leave&&i.dropzone.fire(e.leave),e.enter&&r.dropzone.fire(e.enter),e.move&&r.dropzone.fire(e.move),e.drop&&r.dropzone.fire(e.drop),e.deactivate&&t9(o,e.deactivate),n.prev.dropzone=r.dropzone,n.prev.element=r.element}function o9(t,e){let{interaction:n,iEvent:o,event:r}=t;if(o.type!=="dragmove"&&o.type!=="dragend")return;const i=n.dropState;e.dynamicDrop&&(i.activeDrops=lj(e,n.element));const s=o,a=n9(n,s,r);i.rejected=i.rejected&&!!a&&a.dropzone===i.cur.dropzone&&a.element===i.cur.element,i.cur.dropzone=a&&a.dropzone,i.cur.element=a&&a.element,i.events=cj(n,r,s)}function kve(t,e){if(qe.object(e)){if(t.options.drop.enabled=e.enabled!==!1,e.listeners){const n=cd(e.listeners),o=Object.keys(n).reduce((i,s)=>{const a=/^(enter|leave)/.test(s)?`drag${s}`:/^(activate|deactivate|move)/.test(s)?`drop${s}`:s;return i[a]=n[s],i},{}),r=t.options.drop.listeners;r&&t.off(r),t.on(o),t.options.drop.listeners=o}return qe.func(e.ondrop)&&t.on("drop",e.ondrop),qe.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),qe.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),qe.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),qe.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),qe.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:qe.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return qe.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}function Sve(t,e,n,o,r,i,s){let a=!1;if(!(s=s||t.getRect(i)))return t.options.drop.checker?t.options.drop.checker(e,n,a,t,i,o,r):!1;const l=t.options.drop.overlap;if(l==="pointer"){const u=F5(o,r,"drag"),h=I5(e);h.x+=u.x,h.y+=u.y;const p=h.x>s.left&&h.x<s.right,m=h.y>s.top&&h.y<s.bottom;a=p&&m}const c=o.getRect(r);if(c&&l==="center"){const u=c.left+c.width/2,h=c.top+c.height/2;a=u>=s.left&&u<=s.right&&h>=s.top&&h<=s.bottom}return c&&qe.number(l)&&(a=Math.max(0,Math.min(s.right,c.right)-Math.max(s.left,c.left))*Math.max(0,Math.min(s.bottom,c.bottom)-Math.max(s.top,c.top))/(c.width*c.height)>=l),t.options.drop.checker&&(a=t.options.drop.checker(e,n,a,t,i,o,r)),a}const r9={id:"actions/drop",install:wve,listeners:{"interactions:before-action-start":t=>{let{interaction:e}=t;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":(t,e)=>{let{interaction:n,event:o,iEvent:r}=t;if(n.prepared.name!=="drag")return;const i=n.dropState;i.activeDrops=[],i.events={},i.activeDrops=lj(e,n.element),i.events=cj(n,o,r),i.events.activate&&(t9(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))},"interactions:action-move":o9,"interactions:after-action-move":(t,e)=>{let{interaction:n,iEvent:o}=t;if(n.prepared.name!=="drag")return;const r=n.dropState;uj(n,r.events),e.fire("actions/drop:move",{interaction:n,dragEvent:o}),r.events={}},"interactions:action-end":(t,e)=>{if(t.interaction.prepared.name!=="drag")return;const{interaction:n,iEvent:o}=t;o9(t,e),uj(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:o})},"interactions:stop":t=>{let{interaction:e}=t;if(e.prepared.name!=="drag")return;const{dropState:n}=e;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}},getActiveDrops:lj,getDrop:n9,getDropEvents:cj,fireDropEvents:uj,filterEventType:t=>t.search("drag")===0||t.search("drop")===0,defaults:{enabled:!1,accept:null,overlap:"pointer"}};Iu.use(r9);const b0=".widget-panel .flame-fw-palette-drag-source",fj="[data-palette-drop-form]",i9="[data-palette-drop-group]",jve="flame-fw-palette-interact-dragging";function dj(t){typeof document>"u"||document.documentElement.classList.toggle(jve,t)}function Gg(t){const e=t;return e!=null&&e.closest?e.closest(b0):null}function Eve(t){const e=t.dragEvent;if(e&&typeof e.clientX=="number"&&typeof e.clientY=="number"&&Number.isFinite(e.clientX)&&Number.isFinite(e.clientY))return{x:e.clientX,y:e.clientY};const n=t.client;return n&&typeof n.x=="number"&&typeof n.y=="number"&&Number.isFinite(n.x)&&Number.isFinite(n.y)?{x:n.x,y:n.y}:{x:NaN,y:NaN}}function s9(t,e,n){const o=Eve(t);return e.valid&&Number.isFinite(e.x)&&Number.isFinite(e.y)?{x:e.x,y:e.y}:Number.isFinite(o.x)&&Number.isFinite(o.y)?{x:o.x,y:o.y}:n.ok?{x:n.x,y:n.y}:o}function Ove(t,e,n){const o=document.elementsFromPoint(t,e);return n?o.filter(r=>r instanceof Element?!(r===n||n.contains(r)):!1):o}function Tve(t){if(!t)return{};if("kind"in t&&t.kind==="custom")return{kind:"custom"};const e=t;return{type:e.type,kind:e.kind}}function Ave(t){Iu.dynamicDrop(!0);let e=null;const n=new WeakMap,o={x:0,y:0,valid:!1},r={x:0,y:0,ok:!1};let i=null;const s={capture:!0,passive:!1};function a(S,C){e&&(!Number.isFinite(S)||!Number.isFinite(C)||(o.x=S,o.y=C,o.valid=!0,r.x=S,r.y=C,r.ok=!0,m(S,C,e.el)))}function l(S){a(S.clientX,S.clientY)}function c(S){const C=S.touches[0]??S.changedTouches[0];C&&a(C.clientX,C.clientY)}function u(S){S.preventDefault()}function h(){document.addEventListener("pointermove",l,!0),document.addEventListener("touchmove",c,s),document.addEventListener("selectstart",u,!0)}function p(){document.removeEventListener("pointermove",l,!0),document.removeEventListener("touchmove",c,s),document.removeEventListener("selectstart",u,!0)}const m=(S,C,x)=>{var T,N;if(!t.updatePreview)return;if(!Number.isFinite(S)||!Number.isFinite(C)){(T=t.clearPreview)==null||T.call(t);return}const k=x===(e==null?void 0:e.el)?e.origin:void 0,O=Tve(k),A=Ove(S,C,x);for(const j of A){if(!(j instanceof Element))continue;const I=j.closest(fj);if(I instanceof HTMLElement&&I.dataset.paletteDropForm){t.updatePreview({formChildId:I.dataset.paletteDropForm,dragged:O,originalEvent:{clientX:S,clientY:C},sortableToEl:I,clientX:S,clientY:C});return}}(N=t.clearPreview)==null||N.call(t)},g=Iu(b0).draggable({inertia:!1,listeners:{start(S){e=null,o.valid=!1,r.ok=!1;const C=Gg(S.target);if(!C)return;const x=C.getAttribute("data-fw-palette-source"),k=x?t.resolvePaletteBySource(x):null;k&&(e={el:C,origin:k}),n.set(C,{x:0,y:0}),dj(!0),h()},move(S){var k,O;const C=Gg(S.target);if(!C)return;const x=n.get(C);x&&(x.x+=S.dx,x.y+=S.dy,C.style.transform=`translate(${x.x}px, ${x.y}px)`,C.style.zIndex="10010"),!o.valid&&Number.isFinite((k=S.client)==null?void 0:k.x)&&Number.isFinite((O=S.client)==null?void 0:O.y)&&(o.x=S.client.x,o.y=S.client.y,o.valid=!0,m(S.client.x,S.client.y,C))},end(S){p();const C=Gg(S.target),x=e;C&&(C.style.transform="",C.style.zIndex="",n.delete(C)),i!=null&&clearTimeout(i),i=setTimeout(()=>{var k;i=null,dj(!1),e===x&&(e=null,o.valid=!1,r.ok=!1),(k=t.clearPreview)==null||k.call(t)},0)}}}),v=S=>{var E,P,D;const C=S.target,x=(E=C.closest)==null?void 0:E.call(C,fj);if(!Gg(S.relatedTarget)||!((P=x==null?void 0:x.dataset)!=null&&P.paletteDropForm))return;const O=e==null?void 0:e.origin;if(!O)return;const A=t.clonePaletteItem(O),{x:T,y:N}=s9(S,o,r),j=x.dataset.paletteDropForm,I=t.findFormShellById(j);I&&t.onInteractDrop(I.formItem,A,x,T,N),(D=t.clearPreview)==null||D.call(t)},b=S=>{var E,P,D;const C=S.target,x=(E=C.closest)==null?void 0:E.call(C,i9);if(!Gg(S.relatedTarget)||!((P=x==null?void 0:x.dataset)!=null&&P.paletteDropGroup))return;const O=e==null?void 0:e.origin;if(!O)return;const A=t.clonePaletteItem(O),{x:T,y:N}=s9(S,o,r),j=x.dataset.paletteDropGroup,I=t.findGroupById(j);I&&t.onInteractDrop(I,A,x,T,N),(D=t.clearPreview)==null||D.call(t)},y=Iu(fj).dropzone({accept:b0,overlap:.15,listeners:{drop:v}}),w=Iu(i9).dropzone({accept:b0,overlap:.15,listeners:{drop:b}});return()=>{var S;i!=null&&(clearTimeout(i),i=null),dj(!1),p(),g.unset(),y.unset(),w.unset(),(S=t.clearPreview)==null||S.call(t)}}const Mve={class:"framework-lr"},Nve=f.defineComponent({name:"FlameFramework"}),Pve=f.defineComponent({...Nve,props:{componentGroups:{default:()=>[]},componentList:{default:()=>[]},hideBasicWidgets:{type:Boolean,default:!1}},emits:["save","reset"],setup(t,{expose:e,emit:n}){const o=t,r=f.computed(()=>{const ot=o.componentGroups;if(ot&&ot.length)return ot;const Je=o.componentList||[];return Je.length?[{title:"组件库",items:Je.map(vt=>({kind:"basic",key:vt.key,label:vt.label,icon:vt.icon,type:vt.type,defaultConfig:vt.defaultConfig,defaultFormItem:vt.defaultFormItem}))}]:[]}),i=n,s={submit:{event:"submit",buttonText:"提交",type:"primary"},cancel:{event:"cancel",buttonText:"取消",type:"default"},reset:{event:"reset",buttonText:"重置",type:"default"}},a=f.ref([{...s.submit},{...s.cancel},{...s.reset}]),l=f.computed(()=>o.hideBasicWidgets?[]:Bpe),c=f.ref(Lpe),u=f.ref([]),h=f.ref([]),p=f.ref([]),m=f.ref([]),g=f.ref([]),v=f.ref(0),b=f.ref(null),y=f.ref(null),w=f.ref(null),S=f.ref(!1),C=f.ref(null),{selectedItem:x,selectFormChild:k,onGridWidgetCapture:O}=fge(g,a,y,w,C),{getGroupChildType:A,setGroupChildType:T,createGroupChildByType:N,addGroupByContainerType:j,selectedGroupFormConfig:I}=lge(g,y,C),{buildFrameworkConfig:E,validateLayoutBeforeSave:P,parseConfigToLayout:D,snapshotControlConfig:R}=age(g,a),z=f.ref({groups:[],buttons:[]}),{onOpenPreview:U,onSaveConfig:_,onResetConfig:G,onCopyWidget:te,onDeleteWidget:K,onCopyFormChild:q,onDeleteFormChild:F,onAutoCompactInner:oe,onSelectGlobalButton:ve,addGlobalButton:Ee,removeGlobalButton:ye}=cge(g,y,C,w,a,z,S,{buildFrameworkConfig:E,validateLayoutBeforeSave:P,compactInnerFormLayout:a0,parseConfigToLayout:D,snapshotControlConfig:R,getNextGridPosition:s0,getNextInnerGridPosition:Bg,selectFormChild:k,onSave:ot=>i("save",ot),onReset:()=>i("reset"),getDefaultLayout:Vpe,DEFAULT_BUTTONS:s}),{onDropFromPalette:Z,onInteractDropToFormInner:M,onContainerDrop:ne,onDropContainerInRoot:Se,onInnerLayoutUpdated:de,findFormContainerForInnerControl:De,hydrateLayoutCustomFields:xe}=dge(g,y,C,w,h,m,p,r,k,N,j),le=f.ref(null);let He=null;function pt(ot){var Je;if(ot.startsWith("b:")){const vt=parseInt(ot.slice(2),10),jt=l.value;return Number.isFinite(vt)&&vt>=0&&vt<jt.length?jt[vt]:null}if(ot.startsWith("c:")){const vt=parseInt(ot.slice(2),10),jt=u.value;return Number.isFinite(vt)&&vt>=0&&vt<jt.length?jt[vt]:null}if(ot.startsWith("g:")){const vt=ot.slice(2).split(":"),jt=parseInt(vt[0],10),xn=parseInt(vt[1],10),Yn=r.value[jt];return((Je=Yn==null?void 0:Yn.items)==null?void 0:Je[xn])??null}return null}function Re(ot){const Je=g.value.find(vt=>vt.i===ot);return(Je==null?void 0:Je.nodeKind)==="group"?Je:void 0}function gt(ot){for(const Je of g.value)if(!(Je.nodeKind!=="group"||!Je.children)){for(const vt of Je.children)if(vt.i===ot&&(vt.nodeKind==="form"||vt.nodeKind==="subForm"))return{group:Je,formItem:vt}}return null}function Ge(){He==null||He(),He=null,le.value&&(He=Ave({clonePaletteItem:g5,resolvePaletteBySource:pt,findGroupById:Re,findFormShellById:gt,onInteractDrop:M,updatePreview:ot=>{var Je,vt;return(vt=(Je=b.value)==null?void 0:Je.updatePaletteDropPreview)==null?void 0:vt.call(Je,ot)},clearPreview:()=>{var ot,Je;return(Je=(ot=b.value)==null?void 0:ot.clearPaletteDropPreview)==null?void 0:Je.call(ot)}}))}f.onMounted(()=>{f.nextTick(()=>Ge())}),f.watch(v,()=>{f.nextTick(()=>Ge())}),f.watch(()=>g.value.length,()=>{f.nextTick(()=>Ge())}),f.onBeforeUnmount(()=>{He==null||He(),He=null});const tt=f.computed(()=>sge(x.value)),{inputConfig:Dt,selectConfig:Ze,inputNumberConfig:Ft,datePickerConfig:H,timePickerConfig:X,timeSelectConfig:Q,cascaderConfig:W,checkboxConfig:J,colorPickerConfig:re,radioConfig:me,rateConfig:ie,sliderConfig:he,switchConfig:Fe,transferConfig:Ue,buttonConfig:We,dialogConfig:Me,drawerConfig:ze,paginationConfig:lt,readConfig:Tt,uploadConfig:ft,uploadAcceptSelection:$t,uploadAcceptTypeOptions:pn,timeConfig:Cn,onFlmTimePresetChange:kn,controlConfig:It,controlHasPlaceholder:Kn,controlHasDisabled:Qt,controlHasClearable:bt}=uge(x);function An(ot){g.value=ot}return e({getConfig:()=>E(),setConfig:ot=>{if(!ot||typeof ot!="object")return;Array.isArray(ot.buttons)&&(a.value=ot.buttons.map(vt=>({...vt})));const Je=D(ot);xe(Je),g.value=Je,v.value++,y.value=null,w.value=null,C.value=null},getLayout:()=>g.value,setLayout:ot=>{Array.isArray(ot)&&ot.length&&(g.value=ot)}}),f.watch(()=>{const ot=C.value,Je=x.value;return!ot||!Je?"":`${ot.formId}\0${ot.childId}\0${Je.w}\0${Je.h}\0${Je.x}\0${Je.y}`},()=>{f.nextTick(()=>{const ot=C.value,Je=x.value;if(!ot||!Je)return;const vt=De(ot.formId,ot.childId);vt!=null&&vt.children&&a5(vt.children)&&a0(vt)})}),(ot,Je)=>{const vt=f.resolveComponent("el-input"),jt=f.resolveComponent("el-form-item"),xn=f.resolveComponent("el-option"),Yn=f.resolveComponent("el-select"),Mo=f.resolveComponent("el-input-number"),ao=f.resolveComponent("el-switch"),Co=f.resolveComponent("el-slider"),Qo=f.resolveComponent("el-form");return f.openBlock(),f.createElementBlock("div",{ref_key:"frameworkRootEl",ref:le,class:"form-builder-framework"},[f.createElementVNode("div",Mve,[f.createVNode(f.unref(Pfe),{"container-widget-list":c.value,"basic-widget-list":l.value,"complex-widget-list":u.value,"component-groups":r.value,"clone-palette-item":f.unref(g5)},null,8,["container-widget-list","basic-widget-list","complex-widget-list","component-groups","clone-palette-item"]),(f.openBlock(),f.createBlock(f.unref(pme),{ref_key:"formDesignAreaRef",ref:b,key:v.value,layout:g.value,"onUpdate:layout":An,"drop-zone-list":h.value,"container-drop-list":p.value,"selected-id":y.value,"selected-form-child":C.value,"col-num":f.unref(es),"row-height":f.unref(u5),"get-default-label":f.unref(l0),"get-default-config":f.unref(c0),"get-default-config-for-child":f.unref(G2),buttons:a.value,onDropFromPalette:f.unref(Z),onInnerLayoutUpdated:f.unref(de),onGridWidgetCapture:f.unref(O),onSelectFormChild:f.unref(k),onClearSelection:Je[0]||(Je[0]=Ye=>{y.value=null,C.value=null}),onOpenPreview:f.unref(U),onSave:f.unref(_),onReset:f.unref(G),onCopyWidget:f.unref(te),onDeleteWidget:f.unref(K),onCopyFormChild:f.unref(q),onDeleteFormChild:f.unref(F),onSelectGlobalButton:f.unref(ve),onDropContainer:f.unref(ne),onDropContainerInRoot:f.unref(Se),onAutoCompactInner:f.unref(oe)},null,8,["layout","drop-zone-list","container-drop-list","selected-id","selected-form-child","col-num","row-height","get-default-label","get-default-config","get-default-config-for-child","buttons","onDropFromPalette","onInnerLayoutUpdated","onGridWidgetCapture","onSelectFormChild","onOpenPreview","onSave","onReset","onCopyWidget","onDeleteWidget","onCopyFormChild","onDeleteFormChild","onSelectGlobalButton","onDropContainer","onDropContainerInRoot","onAutoCompactInner"])),f.createVNode(f.unref(Ome),{"selected-item":f.unref(x),"groups-config":tt.value},{base:f.withCtx(({model:Ye})=>[f.createVNode(Qo,{size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(vt,{"model-value":Ye==null?void 0:Ye.i,disabled:""},null,8,["model-value"])]),_:2},1024),(Ye==null?void 0:Ye.nodeKind)==="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"分组名称"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.label,"onUpdate:modelValue":ct=>Ye.label=ct,placeholder:"请输入分组名称",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"分组类型"},{default:f.withCtx(()=>[f.createVNode(Yn,{"model-value":f.unref(A)(Ye),placeholder:"选择类型",style:{width:"100%"},"onUpdate:modelValue":ct=>f.unref(T)(Ye,ct)},{default:f.withCtx(()=>[f.createVNode(xn,{label:"表单",value:"form"}),f.createVNode(xn,{label:"子表单",value:"subForm"}),f.createVNode(xn,{label:"插槽",value:"slot"})]),_:1},8,["model-value","onUpdate:modelValue"])]),_:2},1024),f.unref(I)&&f.unref(A)(Ye)!=="slot"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"标签位置"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:f.unref(I)["label-position"],"onUpdate:modelValue":Je[1]||(Je[1]=ct=>f.unref(I)["label-position"]=ct),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"左侧",value:"left"}),f.createVNode(xn,{label:"右侧",value:"right"}),f.createVNode(xn,{label:"顶部",value:"top"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:f.unref(I)["label-width"],"onUpdate:modelValue":Je[2]||(Je[2]=ct=>f.unref(I)["label-width"]=ct),placeholder:"如 80px、120",clearable:""},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"栅格列数"},{default:f.withCtx(()=>[f.createVNode(Mo,{modelValue:f.unref(I).gridColumns,"onUpdate:modelValue":Je[3]||(Je[3]=ct=>f.unref(I).gridColumns=ct),min:1,max:48,step:1,placeholder:"24","controls-position":"right"},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:f.unref(I).size,"onUpdate:modelValue":Je[4]||(Je[4]=ct=>f.unref(I).size=ct),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"禁用"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I).disabled,"onUpdate:modelValue":Je[5]||(Je[5]=ct=>f.unref(I).disabled=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"隐藏必填星号"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I)["hide-required-asterisk"],"onUpdate:modelValue":Je[6]||(Je[6]=ct=>f.unref(I)["hide-required-asterisk"]=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I)["show-message"],"onUpdate:modelValue":Je[7]||(Je[7]=ct=>f.unref(I)["show-message"]=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"行内校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I)["inline-message"],"onUpdate:modelValue":Je[8]||(Je[8]=ct=>f.unref(I)["inline-message"]=ct)},null,8,["modelValue"])]),_:1}),f.unref(A)(Ye)==="subForm"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"是否默认生成一项"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(I).defaultGenerateOne,"onUpdate:modelValue":Je[9]||(Je[9]=ct=>f.unref(I).defaultGenerateOne=ct)},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"最小子表单数"},{default:f.withCtx(()=>[f.createVNode(Mo,{modelValue:f.unref(I).minItems,"onUpdate:modelValue":Je[10]||(Je[10]=ct=>f.unref(I).minItems=ct),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),f.createVNode(jt,{label:"最大子表单数"},{default:f.withCtx(()=>[f.createVNode(Mo,{modelValue:f.unref(I).maxItems,"onUpdate:modelValue":Je[11]||(Je[11]=ct=>f.unref(I).maxItems=ct),min:0,max:999,placeholder:"不限制","controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),Ye&&Ye.nodeKind!=="group"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createVNode(jt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.w,"onUpdate:modelValue":ct=>Ye.w=ct,min:f.unref(i5)(Ye),max:f.unref(es),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(jt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.h,"onUpdate:modelValue":ct=>Ye.h=ct,min:f.unref(s5)(Ye),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024)],64)):f.createCommentVNode("",!0)]),_:2},1024)]),slotConfig:f.withCtx(({model:Ye})=>[(Ye==null?void 0:Ye.nodeKind)==="slot"?(f.openBlock(),f.createBlock(Qo,{key:0,size:"small","label-position":"left","label-width":"80px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"插槽名称 slotName",required:""},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.config.slotName,"onUpdate:modelValue":ct=>Ye.config.slotName=ct,placeholder:"如 header / footer / actions",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)):f.createCommentVNode("",!0)]),formItem:f.withCtx(({model:Ye})=>[Ye!=null&&Ye.formItem?(f.openBlock(),f.createBlock(Qo,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.label,"onUpdate:modelValue":ct=>Ye.formItem.label=ct,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.labelWidth,"onUpdate:modelValue":ct=>Ye.formItem.labelWidth=ct,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.showMessage,"onUpdate:modelValue":ct=>Ye.formItem.showMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.inlineMessage,"onUpdate:modelValue":ct=>Ye.formItem.inlineMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:Ye.formItem.size,"onUpdate:modelValue":ct=>Ye.formItem.size=ct,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(f.unref(h5),{"form-item":Ye.formItem},null,8,["form-item"])]),_:2},1024)):f.createCommentVNode("",!0)]),baseSettings:f.withCtx(({model:Ye})=>[Ye?(f.openBlock(),f.createBlock(Qo,{key:0,size:"small","label-position":"right","label-width":"120px",class:"settings-form settings-form--nested"},{default:f.withCtx(()=>[f.createVNode(jt,{label:"标识"},{default:f.withCtx(()=>[f.createVNode(vt,{"model-value":Ye==null?void 0:Ye.i,disabled:""},null,8,["model-value"])]),_:2},1024),f.createVNode(jt,{label:"栅格宽度(列)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.w,"onUpdate:modelValue":ct=>Ye.w=ct,min:f.unref(i5)(Ye),max:f.unref(es),step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min","max"])]),_:2},1024),f.createVNode(jt,{label:"栅格高度(行)"},{default:f.withCtx(()=>[f.createVNode(Co,{modelValue:Ye.h,"onUpdate:modelValue":ct=>Ye.h=ct,min:f.unref(s5)(Ye),max:24,step:1,"show-input":""},null,8,["modelValue","onUpdate:modelValue","min"])]),_:2},1024),Ye!=null&&Ye.formItem?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(jt,{label:"标签"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.label,"onUpdate:modelValue":ct=>Ye.formItem.label=ct,placeholder:"请输入标签",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"标签宽度"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:Ye.formItem.labelWidth,"onUpdate:modelValue":ct=>Ye.formItem.labelWidth=ct,placeholder:"如 80px、120",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"显示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.showMessage,"onUpdate:modelValue":ct=>Ye.formItem.showMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"行内展示校验信息"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:Ye.formItem.inlineMessage,"onUpdate:modelValue":ct=>Ye.formItem.inlineMessage=ct},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(jt,{label:"尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:Ye.formItem.size,"onUpdate:modelValue":ct=>Ye.formItem.size=ct,placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1024),f.createVNode(f.unref(h5),{"form-item":Ye.formItem},null,8,["form-item"])],64)):f.createCommentVNode("",!0),f.unref(It)&&(Ye==null?void 0:Ye.type)!=="flmCustom"?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.unref(Kn)?(f.openBlock(),f.createBlock(jt,{key:0,label:"占位符"},{default:f.withCtx(()=>[f.createVNode(vt,{modelValue:f.unref(It).placeholder,"onUpdate:modelValue":Je[12]||(Je[12]=ct=>f.unref(It).placeholder=ct),placeholder:"占位文案",clearable:""},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(Qt)?(f.openBlock(),f.createBlock(jt,{key:1,label:"禁用"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(It).disabled,"onUpdate:modelValue":Je[13]||(Je[13]=ct=>f.unref(It).disabled=ct)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),f.unref(bt)?(f.openBlock(),f.createBlock(jt,{key:2,label:"可清空"},{default:f.withCtx(()=>[f.createVNode(ao,{modelValue:f.unref(It).clearable,"onUpdate:modelValue":Je[14]||(Je[14]=ct=>f.unref(It).clearable=ct)},null,8,["modelValue"])]),_:1})):f.createCommentVNode("",!0),(Ye==null?void 0:Ye.type)==="flmInput"?(f.openBlock(),f.createBlock(jt,{key:3,label:"控件尺寸"},{default:f.withCtx(()=>[f.createVNode(Yn,{modelValue:f.unref(It).size,"onUpdate:modelValue":Je[15]||(Je[15]=ct=>f.unref(It).size=ct),placeholder:"默认",clearable:""},{default:f.withCtx(()=>[f.createVNode(xn,{label:"large",value:"large"}),f.createVNode(xn,{label:"default",value:"default"}),f.createVNode(xn,{label:"small",value:"small"})]),_:1},8,["modelValue"])]),_:1})):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0)]),_:2},1024)):f.createCommentVNode("",!0)]),detailSettings:f.withCtx(({model:Ye})=>[f.createVNode(f.unref(Ume),{model:Ye,"input-config":f.unref(Dt),"select-config":f.unref(Ze),"input-number-config":f.unref(Ft),"date-picker-config":f.unref(H),"time-picker-config":f.unref(X),"time-select-config":f.unref(Q),"cascader-config":f.unref(W),"checkbox-config":f.unref(J),"color-picker-config":f.unref(re),"radio-config":f.unref(me),"rate-config":f.unref(ie),"slider-config":f.unref(he),"switch-config":f.unref(Fe),"transfer-config":f.unref(Ue),"button-config":f.unref(We),"dialog-config":f.unref(Me),"drawer-config":f.unref(ze),"pagination-config":f.unref(lt),"read-config":f.unref(Tt),"upload-config":f.unref(ft),"upload-accept-selection":f.unref($t),"upload-accept-type-options":f.unref(pn),"time-config":f.unref(Cn),"on-flm-time-preset-change":f.unref(kn)},null,8,["model","input-config","select-config","input-number-config","date-picker-config","time-picker-config","time-select-config","cascader-config","checkbox-config","color-picker-config","radio-config","rate-config","slider-config","switch-config","transfer-config","button-config","dialog-config","drawer-config","pagination-config","read-config","upload-config","upload-accept-selection","upload-accept-type-options","time-config","on-flm-time-preset-change"])]),globalButtons:f.withCtx(({model:Ye})=>[f.createVNode(f.unref(Yme),{buttons:a.value,"selected-index":w.value,onSelect:f.unref(ve),onRemove:f.unref(ye),onAdd:f.unref(Ee)},null,8,["buttons","selected-index","onSelect","onRemove","onAdd"])]),_:1},8,["selected-item","groups-config"])]),f.createVNode(f.unref(bme),{modelValue:S.value,"onUpdate:modelValue":Je[16]||(Je[16]=Ye=>S.value=Ye),config:z.value},null,8,["modelValue","config"])],512)}}}),a9=qr(Pve,[["__scopeId","data-v-7d86fefd"]]),l9={flmButton:Rf,flmCascader:Lf,flmCheckbox:bl,flmCheckboxGroup:yI,flmColorPicker:Bf,flmDatePicker:GS,flmInput:yl,flmInputNumber:Vf,flmUpload:dc,flmPagination:cg,flmRadio:Ff,flmRate:zf,flmRead:_f,flmTime:Uf,flmSelect:Wf,flmSlider:Hf,flmSwitch:Gf,flmTimePicker:Kf,flmTimeSelect:Yf,flmTransfer:Xf,flmDialog:Jf,flmCollapse:YS,FlmPrintTable:dI,FlmEditor:Il,FlmJsonEditor:WS,flmForm:Cu,flmTable:T1,flmSubForm:ZS,flmDynamicForm:$S,FlmFormUploadImage:wu,flmSearch:QS,flmSearchSelect:Jh,FlmToolbar:ug,flmReportPage:e2,flmExportPage:bI,FlameFramework:a9},Dve={install:(t,e,n,o)=>{let r=l9;if(n&&(r=gE(r,n)),e&&e.forEach(i=>{t.use(i)}),o)for(const[i,s]of Object.entries(o))t.component(i,s);Object.entries(r).forEach(([i,s])=>t.component(i,s))},...l9};/*!
3930
3930
  * vanilla-picker v2.12.3
3931
3931
  * https://vanilla-picker.js.org
3932
3932
  *