@a2simcode/dui 0.0.37 → 0.0.38

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.
package/dist/dui.umd.js CHANGED
@@ -25,7 +25,7 @@ Target: ${t}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or ta
25
25
  Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
26
26
  Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"},de=class extends Error{constructor(e,...A){var t;super((t=xa[e])==null?void 0:t.call(xa,...A)),this.name="VueFlowError",this.code=e,this.args=A}};function ai(e){return"clientX"in e}function nB(e){return"sourceEvent"in e}function We(e,A){const t=ai(e);let n,o;return t?(n=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(n=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(n=0,o=0),{x:n-(A?.left??0),y:o-(A?.top??0)}}var br=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function rB(e){var A,t;return{width:((A=e.dimensions)==null?void 0:A.width)??e.width??0,height:((t=e.dimensions)==null?void 0:t.height)??e.height??0}}function Ir(e,A=[1,1]){return{x:A[0]*Math.round(e.x/A[0]),y:A[1]*Math.round(e.y/A[1])}}var oB=()=>!0;function li(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function iB(e,A,t){const n=[],o={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of A.values())Er(o,Qr(a))>0&&n.push(a);return n}var sB=250;function aB(e,A,t,n){var o,a;let c=[],d=Number.POSITIVE_INFINITY;const h=iB(e,t,A+sB);for(const g of h){const B=[...((o=g.handleBounds)==null?void 0:o.source)??[],...((a=g.handleBounds)==null?void 0:a.target)??[]];for(const w of B){if(n.nodeId===w.nodeId&&n.type===w.type&&n.id===w.id)continue;const{x:m,y}=qt(g,w,w.position,!0),v=Math.sqrt((m-e.x)**2+(y-e.y)**2);v>A||(v<d?(c=[{...w,x:m,y}],d=v):v===d&&c.push({...w,x:m,y}))}}if(!c.length)return null;if(c.length>1){const g=n.type==="source"?"target":"source";return c.find(B=>B.type===g)??c[0]}return c[0]}function Da(e,{handle:A,connectionMode:t,fromNodeId:n,fromHandleId:o,fromType:a,doc:c,lib:d,flowId:h,isValidConnection:g=oB},B,w,m,y){const v=a==="target",I=A?c.querySelector(`.${d}-flow__handle[data-id="${h}-${A?.nodeId}-${A?.id}-${A?.type}"]`):null,{x:L,y:k}=We(e),V=c.elementFromPoint(L,k),F=V?.classList.contains(`${d}-flow__handle`)?V:I,M={handleDomNode:F,isValid:!1,connection:null,toHandle:null};if(F){const tA=Na(void 0,F),W=F.getAttribute("data-nodeid"),aA=F.getAttribute("data-handleid"),dA=F.classList.contains("connectable"),rA=F.classList.contains("connectableend");if(!W||!tA)return M;const oA={source:v?W:n,sourceHandle:v?aA:o,target:v?n:W,targetHandle:v?o:aA};M.connection=oA,M.isValid=dA&&rA&&(t===nt.Strict?v&&tA==="source"||!v&&tA==="target":W!==n||aA!==o)&&g(oA,{nodes:w,edges:B,sourceNode:m(oA.source),targetNode:m(oA.target)}),M.toHandle=La(W,tA,aA,y,t,!0)}return M}function Na(e,A){return e||(A?.classList.contains("target")?"target":A?.classList.contains("source")?"source":null)}function lB(e,A){let t=null;return A?t="valid":e&&!A&&(t="invalid"),t}function cB(e,A){let t=null;return A?t=!0:e&&!A&&(t=!1),t}function La(e,A,t,n,o,a=!1){var c,d,h;const g=n.get(e);if(!g)return null;const B=o===nt.Strict?(c=g.handleBounds)==null?void 0:c[A]:[...((d=g.handleBounds)==null?void 0:d.source)??[],...((h=g.handleBounds)==null?void 0:h.target)??[]],w=(t?B?.find(m=>m.id===t):B?.[0])??null;return w&&a?{...w,...qt(g,w,w.position,!0)}:w}var ci={[HA.Left]:HA.Right,[HA.Right]:HA.Left,[HA.Top]:HA.Bottom,[HA.Bottom]:HA.Top},uB=["production","prod"];function Tn(e,...A){Ta()&&console.warn(`[Vue Flow]: ${e}`,...A)}function Ta(){return!uB.includes(process.env.NODE_ENV||"")}function ka(e,A,t,n,o){const a=A.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(c=>{const d=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:e,nodeId:o,position:c.getAttribute("data-handlepos"),x:(d.left-t.left)/n,y:(d.top-t.top)/n,...Fr(c)}}):null}function ui(e,A,t,n,o,a=!1,c){o.value=!1,e.selected?(a||e.selected&&A)&&(n([e]),(0,r.nextTick)(()=>{c.blur()})):t([e])}function le(e){return typeof(0,r.unref)(e)<"u"}function dB(e,A,t,n){if(!e||!e.source||!e.target)return t(new de(ae.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let o;return ht(e)?o=e:o={...e,id:ga(e)},o=da(o,void 0,n),zh(o,A)?!1:o}function fB(e,A,t,n,o){if(!A.source||!A.target)return o(new de(ae.EDGE_INVALID,e.id)),!1;if(!t)return o(new de(ae.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...c}=e;return{...c,id:n?ga(A):a,source:A.source,target:A.target,sourceHandle:A.sourceHandle,targetHandle:A.targetHandle}}function Ma(e,A,t){const n={},o=[];for(let a=0;a<e.length;++a){const c=e[a];if(!Lt(c)){t(new de(ae.NODE_INVALID,c?.id));continue}const d=Vh(c,A(c.id),c.parentNode);c.parentNode&&(n[c.parentNode]=!0),o[a]=d}for(const a of o){const c=A(a.parentNode)||o.find(d=>d.id===a.parentNode);a.parentNode&&!c&&t(new de(ae.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||n[a.id])&&(n[a.id]&&(a.isParent=!0),c&&(c.isParent=!0))}return o}function Oa(e,A,t,n,o,a){let c=o;const d=n.get(c)||new Map;n.set(c,d.set(t,A)),c=`${o}-${e}`;const h=n.get(c)||new Map;if(n.set(c,h.set(t,A)),a){c=`${o}-${e}-${a}`;const g=n.get(c)||new Map;n.set(c,g.set(t,A))}}function di(e,A,t){e.clear();for(const n of t){const{source:o,target:a,sourceHandle:c=null,targetHandle:d=null}=n,h={edgeId:n.id,source:o,target:a,sourceHandle:c,targetHandle:d},g=`${o}-${c}--${a}-${d}`;Oa("source",h,`${a}-${d}--${o}-${c}`,e,o,c),Oa("target",h,g,e,a,d)}}function Ka(e,A){if(e.size!==A.size)return!1;for(const t of e)if(!A.has(t))return!1;return!0}function fi(e,A,t,n,o,a,c,d){const h=[];for(const g of e){const B=ht(g)?g:dB(g,d,o,a);if(!B)continue;const w=t(B.source),m=t(B.target);if(!w||!m){o(new de(ae.EDGE_SOURCE_TARGET_MISSING,B.id,B.source,B.target));continue}if(!w){o(new de(ae.EDGE_SOURCE_MISSING,B.id,B.source));continue}if(!m){o(new de(ae.EDGE_TARGET_MISSING,B.id,B.target));continue}if(A&&!A(B,{edges:d,nodes:c,sourceNode:w,targetNode:m})){o(new de(ae.EDGE_INVALID,B.id));continue}const y=n(B.id);h.push({...da(B,y,a),sourceNode:w,targetNode:m})}return h}var Ra=Symbol("vueFlow"),Va=Symbol("nodeId"),Pa=Symbol("nodeRef"),gB=Symbol("edgeId"),hB=Symbol("edgeRef"),Hr=Symbol("slots");function Ga(e){const{vueFlowRef:A,snapToGrid:t,snapGrid:n,noDragClassName:o,nodeLookup:a,nodeExtent:c,nodeDragThreshold:d,viewport:h,autoPanOnNodeDrag:g,autoPanSpeed:B,nodesDraggable:w,panBy:m,findNode:y,multiSelectionActive:v,nodesSelectionActive:I,selectNodesOnDrag:L,removeSelectedElements:k,addSelectedNodes:V,updateNodePositions:F,emits:M}=ZA(),{onStart:tA,onDrag:W,onStop:aA,onClick:dA,el:rA,disabled:oA,id:AA,selectable:O,dragHandle:lA}=e,_=(0,r.shallowRef)(!1);let Z=[],U,x=null,G={x:void 0,y:void 0},R={x:0,y:0},$=null,J=!1,nA=!1,hA=0,UA=!1;const eA=mB(),uA=({x:fA,y:vA})=>{G={x:fA,y:vA};let S=!1;if(Z=Z.map(H=>{const T={x:fA-H.distance.x,y:vA-H.distance.y},{computedPosition:D}=si(H,t.value?Ir(T,n.value):T,M.error,c.value,H.parentNode?y(H.parentNode):void 0);return S=S||H.position.x!==D.x||H.position.y!==D.y,H.position=D,H}),nA=nA||S,!!S&&(F(Z,!0,!0),_.value=!0,$)){const[H,T]=ii({id:AA,dragItems:Z,findNode:y});W({event:$,node:H,nodes:T})}},Y=()=>{if(!x)return;const[fA,vA]=Qa(R,x,B.value);if(fA!==0||vA!==0){const S={x:(G.x??0)-fA/h.value.zoom,y:(G.y??0)-vA/h.value.zoom};m({x:fA,y:vA})&&uA(S)}hA=requestAnimationFrame(Y)},cA=(fA,vA)=>{J=!0;const S=y(AA);!L.value&&!v.value&&S&&(S.selected||k()),S&&(0,r.toValue)(O)&&L.value&&ui(S,v.value,V,k,I,!1,vA);const H=eA(fA.sourceEvent);if(G=H,Z=Zh(a.value,w.value,H,AA),Z.length){const[T,D]=ii({id:AA,dragItems:Z,findNode:y});tA({event:fA.sourceEvent,node:T,nodes:D})}},mA=(fA,vA)=>{var S;fA.sourceEvent.type==="touchmove"&&fA.sourceEvent.touches.length>1||(nA=!1,d.value===0&&cA(fA,vA),G=eA(fA.sourceEvent),x=((S=A.value)==null?void 0:S.getBoundingClientRect())||null,R=We(fA.sourceEvent,x))},yA=(fA,vA)=>{const S=eA(fA.sourceEvent);if(!UA&&J&&g.value&&(UA=!0,Y()),!J){const H=S.xSnapped-(G.x??0),T=S.ySnapped-(G.y??0);Math.sqrt(H*H+T*T)>d.value&&cA(fA,vA)}(G.x!==S.xSnapped||G.y!==S.ySnapped)&&Z.length&&J&&($=fA.sourceEvent,R=We(fA.sourceEvent,x),uA(S))},IA=fA=>{let vA=!1;if(!J&&!_.value&&!v.value){const S=fA.sourceEvent,H=eA(S),T=H.xSnapped-(G.x??0),D=H.ySnapped-(G.y??0),b=Math.sqrt(T*T+D*D);b!==0&&b<=d.value&&(dA?.(S),vA=!0)}if(Z.length&&!vA){nA&&(F(Z,!1,!1),nA=!1);const[S,H]=ii({id:AA,dragItems:Z,findNode:y});aA({event:fA.sourceEvent,node:S,nodes:H})}Z=[],_.value=!1,UA=!1,J=!1,G={x:void 0,y:void 0},cancelAnimationFrame(hA)};return(0,r.watch)([()=>(0,r.toValue)(oA),rA],([fA,vA],S,H)=>{if(vA){const T=ke(vA);fA||(U=Rf().on("start",D=>mA(D,vA)).on("drag",D=>yA(D,vA)).on("end",D=>IA(D)).filter(D=>{const b=D.target,z=(0,r.toValue)(lA);return!D.button&&(!o.value||!Ha(b,`.${o.value}`,vA)&&(!z||Ha(b,z,vA)))}),T.call(U)),H(()=>{T.on(".drag",null),U&&(U.on("start",null),U.on("drag",null),U.on("end",null))})}}),_}function BB(){return{doubleClick:EA(),click:EA(),mouseEnter:EA(),mouseMove:EA(),mouseLeave:EA(),contextMenu:EA(),updateStart:EA(),update:EA(),updateEnd:EA()}}function pB(e,A){const t=BB();return t.doubleClick.on(n=>{var o,a;A.edgeDoubleClick(n),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,n)}),t.click.on(n=>{var o,a;A.edgeClick(n),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,n)}),t.mouseEnter.on(n=>{var o,a;A.edgeMouseEnter(n),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,n)}),t.mouseMove.on(n=>{var o,a;A.edgeMouseMove(n),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,n)}),t.mouseLeave.on(n=>{var o,a;A.edgeMouseLeave(n),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,n)}),t.contextMenu.on(n=>{var o,a;A.edgeContextMenu(n),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,n)}),t.updateStart.on(n=>{var o,a;A.edgeUpdateStart(n),(a=(o=e.events)==null?void 0:o.updateStart)==null||a.call(o,n)}),t.update.on(n=>{var o,a;A.edgeUpdate(n),(a=(o=e.events)==null?void 0:o.update)==null||a.call(o,n)}),t.updateEnd.on(n=>{var o,a;A.edgeUpdateEnd(n),(a=(o=e.events)==null?void 0:o.updateEnd)==null||a.call(o,n)}),Object.entries(t).reduce((n,[o,a])=>(n.emit[o]=a.trigger,n.on[o]=a.on,n),{emit:{},on:{}})}function mB(){const{viewport:e,snapGrid:A,snapToGrid:t,vueFlowRef:n}=ZA();return o=>{var a;const c=((a=n.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},{x:d,y:h}=We(nB(o)?o.sourceEvent:o,c),g=Nn({x:d,y:h},e.value),{x:B,y:w}=t.value?Ir(g,A.value):g;return{xSnapped:B,ySnapped:w,...g}}}function _r(){return!0}function za({handleId:e,nodeId:A,type:t,isValidConnection:n,edgeUpdaterType:o,onEdgeUpdate:a,onEdgeUpdateEnd:c}){const{id:d,vueFlowRef:h,connectionMode:g,connectionRadius:B,connectOnClick:w,connectionClickStartHandle:m,nodesConnectable:y,autoPanOnConnect:v,autoPanSpeed:I,findNode:L,panBy:k,startConnection:V,updateConnection:F,endConnection:M,emits:tA,viewport:W,edges:aA,nodes:dA,isValidConnection:rA,nodeLookup:oA}=ZA();let AA=null,O=!1,lA=null;function _(U){var x;const G=(0,r.toValue)(t)==="target",R=ai(U),$=ua(U.target),J=U.currentTarget;if(J&&(R&&U.button===0||!R)){let nA=function(gA){S=We(gA,IA),uA=aB(Nn(S,W.value,!1,[1,1]),B.value,oA.value,D),H||(T(),H=!0);const iA=Da(gA,{handle:uA,connectionMode:g.value,fromNodeId:(0,r.toValue)(A),fromHandleId:(0,r.toValue)(e),fromType:G?"target":"source",isValidConnection:eA,doc:$,lib:"vue",flowId:d,nodeLookup:oA.value},aA.value,dA.value,L,oA.value);lA=iA.handleDomNode,AA=iA.connection,O=cB(!!uA,iA.isValid);const SA={...P,isValid:O,to:iA.toHandle&&O?Dn({x:iA.toHandle.x,y:iA.toHandle.y},W.value):S,toHandle:iA.toHandle,toPosition:O&&iA.toHandle?iA.toHandle.position:ci[D.position],toNode:iA.toHandle?oA.value.get(iA.toHandle.nodeId):null};if(O&&uA&&P?.toHandle&&SA.toHandle&&P.toHandle.type===SA.toHandle.type&&P.toHandle.nodeId===SA.toHandle.nodeId&&P.toHandle.id===SA.toHandle.id&&P.to.x===SA.to.x&&P.to.y===SA.to.y)return;const xA=uA??iA.toHandle;if(F(xA&&O?Dn({x:xA.x,y:xA.y},W.value):S,xA,lB(!!xA,O)),P=SA,!uA&&!O&&!lA)return li(vA);AA&&AA.source!==AA.target&&lA&&(li(vA),vA=lA,lA.classList.add("connecting","vue-flow__handle-connecting"),lA.classList.toggle("valid",!!O),lA.classList.toggle("vue-flow__handle-valid",!!O))},hA=function(gA){"touches"in gA&&gA.touches.length>0||((uA||lA)&&AA&&O&&(a?a(gA,AA):tA.connect(AA)),tA.connectEnd(gA),o&&c?.(gA),li(vA),cancelAnimationFrame(Y),M(gA),H=!1,O=!1,AA=null,lA=null,$.removeEventListener("mousemove",nA),$.removeEventListener("mouseup",hA),$.removeEventListener("touchmove",nA),$.removeEventListener("touchend",hA))};const UA=L((0,r.toValue)(A));let eA=(0,r.toValue)(n)||rA.value||_r;!eA&&UA&&(eA=(G?UA.isValidSourcePos:UA.isValidTargetPos)||_r);let uA,Y=0;const{x:cA,y:mA}=We(U),yA=Na((0,r.toValue)(o),J),IA=(x=h.value)==null?void 0:x.getBoundingClientRect();if(!IA||!yA)return;const fA=La((0,r.toValue)(A),yA,(0,r.toValue)(e),oA.value,g.value);if(!fA)return;let vA,S=We(U,IA),H=!1;const T=()=>{if(!v.value)return;const[gA,iA]=Qa(S,IA,I.value);k({x:gA,y:iA}),Y=requestAnimationFrame(T)},D={...fA,nodeId:(0,r.toValue)(A),type:yA,position:fA.position},b=oA.value.get((0,r.toValue)(A)),z={inProgress:!0,isValid:null,from:qt(b,D,HA.Left,!0),fromHandle:D,fromPosition:D.position,fromNode:b,to:S,toHandle:null,toPosition:ci[D.position],toNode:null};V({nodeId:(0,r.toValue)(A),id:(0,r.toValue)(e),type:yA,position:J?.getAttribute("data-handlepos")||HA.Top,...S},{x:cA-IA.left,y:mA-IA.top}),tA.connectStart({event:U,nodeId:(0,r.toValue)(A),handleId:(0,r.toValue)(e),handleType:yA});let P=z;$.addEventListener("mousemove",nA),$.addEventListener("mouseup",hA),$.addEventListener("touchmove",nA),$.addEventListener("touchend",hA)}}function Z(U){var x,G;if(!w.value)return;const R=(0,r.toValue)(t)==="target";if(!m.value){tA.clickConnectStart({event:U,nodeId:(0,r.toValue)(A),handleId:(0,r.toValue)(e)}),V({nodeId:(0,r.toValue)(A),type:(0,r.toValue)(t),id:(0,r.toValue)(e),position:HA.Top,...We(U)},void 0,!0);return}let $=(0,r.toValue)(n)||rA.value||_r;const J=L((0,r.toValue)(A));if(!$&&J&&($=(R?J.isValidSourcePos:J.isValidTargetPos)||_r),J&&(typeof J.connectable>"u"?y.value:J.connectable)===!1)return;const nA=ua(U.target),hA=Da(U,{handle:{nodeId:(0,r.toValue)(A),id:(0,r.toValue)(e),type:(0,r.toValue)(t),position:HA.Top,...We(U)},connectionMode:g.value,fromNodeId:m.value.nodeId,fromHandleId:m.value.id??null,fromType:m.value.type,isValidConnection:$,doc:nA,lib:"vue",flowId:d,nodeLookup:oA.value},aA.value,dA.value,L,oA.value),UA=((x=hA.connection)==null?void 0:x.source)===((G=hA.connection)==null?void 0:G.target);hA.isValid&&hA.connection&&!UA&&tA.connect(hA.connection),tA.clickConnectEnd(U),M(U,!0)}return{handlePointerDown:_,handleClick:Z}}function wB(){return(0,r.inject)(Va,"")}function $a(e){const A=e??wB()??"",t=(0,r.inject)(Pa,(0,r.ref)(null)),{findNode:n,edges:o,emits:a}=ZA(),c=n(A);return c||a.error(new de(ae.NODE_NOT_FOUND,A)),{id:A,nodeEl:t,node:c,parentNode:(0,r.computed)(()=>n(c.parentNode)),connectedEdges:(0,r.computed)(()=>ma([c],o.value))}}function CB(){return{doubleClick:EA(),click:EA(),mouseEnter:EA(),mouseMove:EA(),mouseLeave:EA(),contextMenu:EA(),dragStart:EA(),drag:EA(),dragStop:EA()}}function yB(e,A){const t=CB();return t.doubleClick.on(n=>{var o,a;A.nodeDoubleClick(n),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,n)}),t.click.on(n=>{var o,a;A.nodeClick(n),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,n)}),t.mouseEnter.on(n=>{var o,a;A.nodeMouseEnter(n),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,n)}),t.mouseMove.on(n=>{var o,a;A.nodeMouseMove(n),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,n)}),t.mouseLeave.on(n=>{var o,a;A.nodeMouseLeave(n),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,n)}),t.contextMenu.on(n=>{var o,a;A.nodeContextMenu(n),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,n)}),t.dragStart.on(n=>{var o,a;A.nodeDragStart(n),(a=(o=e.events)==null?void 0:o.dragStart)==null||a.call(o,n)}),t.drag.on(n=>{var o,a;A.nodeDrag(n),(a=(o=e.events)==null?void 0:o.drag)==null||a.call(o,n)}),t.dragStop.on(n=>{var o,a;A.nodeDragStop(n),(a=(o=e.events)==null?void 0:o.dragStop)==null||a.call(o,n)}),Object.entries(t).reduce((n,[o,a])=>(n.emit[o]=a.trigger,n.on[o]=a.on,n),{emit:{},on:{}})}function Xa(){const{getSelectedNodes:e,nodeExtent:A,updateNodePositions:t,findNode:n,snapGrid:o,snapToGrid:a,nodesDraggable:c,emits:d}=ZA();return(h,g=!1)=>{const B=a.value?o.value[0]:5,w=a.value?o.value[1]:5,m=g?4:1,y=h.x*B*m,v=h.y*w*m,I=[];for(const L of e.value)if(L.draggable||c&&typeof L.draggable>"u"){const{position:k}=si(L,{x:L.computedPosition.x+y,y:L.computedPosition.y+v},d.error,A.value,L.parentNode?n(L.parentNode):void 0);I.push({id:L.id,position:k,from:L.position,distance:{x:h.x,y:h.y},dimensions:L.dimensions})}t(I,!0,!1)}}var Sr=.1,vB=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function mt(){return Tn("Viewport not initialized yet."),Promise.resolve(!1)}var QB={zoomIn:mt,zoomOut:mt,zoomTo:mt,fitView:mt,setCenter:mt,fitBounds:mt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:mt,setTransform:mt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function EB(e){function A(n,o){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(o?.interpolate==="linear"?En:fr).scaleBy(gi(e.d3Selection,o?.duration,o?.ease,()=>{a(!0)}),n):a(!1)})}function t(n,o,a,c){return new Promise(d=>{var h;const{x:g,y:B}=ca({x:-n,y:-o},e.translateExtent),w=Jt.translate(-g,-B).scale(a);e.d3Selection&&e.d3Zoom?(h=e.d3Zoom)==null||h.interpolate(c?.interpolate==="linear"?En:fr).transform(gi(e.d3Selection,c?.duration,c?.ease,()=>{d(!0)}),w):d(!1)})}return(0,r.computed)(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:n=>A(1.2,n),zoomOut:n=>A(1/1.2,n),zoomTo:(n,o)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(o?.interpolate==="linear"?En:fr).scaleTo(gi(e.d3Selection,o?.duration,o?.ease,()=>{a(!0)}),n):a(!1)}),setViewport:(n,o)=>t(n.x,n.y,n.zoom,o),setTransform:(n,o)=>t(n.x,n.y,n.zoom,o),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(n={padding:Sr,includeHiddenNodes:!1,duration:0})=>{var o,a;const c=[];for(const B of e.nodes)B.dimensions.width&&B.dimensions.height&&(n?.includeHiddenNodes||!B.hidden)&&(!((o=n.nodes)!=null&&o.length)||(a=n.nodes)!=null&&a.length&&n.nodes.includes(B.id))&&c.push(B);if(!c.length)return Promise.resolve(!1);const{x:d,y:h,zoom:g}=wa(Ba(c),e.dimensions.width,e.dimensions.height,n.minZoom??e.minZoom,n.maxZoom??e.maxZoom,n.padding??Sr);return t(d,h,g,n)},setCenter:(n,o,a)=>{const c=typeof a?.zoom<"u"?a.zoom:e.maxZoom;return t(e.dimensions.width/2-n*c,e.dimensions.height/2-o*c,c,a)},fitBounds:(n,o={padding:Sr})=>{const{x:a,y:c,zoom:d}=wa(n,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding??Sr);return t(a,c,d,o)},project:n=>Nn(n,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:n=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect();return Nn({x:n.x-o,y:n.y-a},e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:n=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect();return Dn({x:n.x+o,y:n.y+a},e.viewport)}return{x:0,y:0}}}:QB)}function gi(e,A=0,t=vB,n=()=>{}){const o=typeof A=="number"&&A>0;return o||n(),o?e.transition().duration(A).ease(t).on("end",n):e}function FB(e,A,t){const n=(0,r.effectScope)(!0);return n.run(()=>{const o=()=>{n.run(()=>{let I,L,k=!!(t.nodes.value.length||t.edges.value.length);I=zt([e.modelValue,()=>{var V,F;return(F=(V=e.modelValue)==null?void 0:V.value)==null?void 0:F.length}],([V])=>{V&&Array.isArray(V)&&(L?.pause(),t.setElements(V),!L&&!k&&V.length?k=!0:L?.resume())}),L=zt([t.nodes,t.edges,()=>t.edges.value.length,()=>t.nodes.value.length],([V,F])=>{var M;(M=e.modelValue)!=null&&M.value&&Array.isArray(e.modelValue.value)&&(I?.pause(),e.modelValue.value=[...V,...F],(0,r.nextTick)(()=>{I?.resume()}))},{immediate:k}),(0,r.onScopeDispose)(()=>{I?.stop(),L?.stop()})})},a=()=>{n.run(()=>{let I,L,k=!!t.nodes.value.length;I=zt([e.nodes,()=>{var V,F;return(F=(V=e.nodes)==null?void 0:V.value)==null?void 0:F.length}],([V])=>{V&&Array.isArray(V)&&(L?.pause(),t.setNodes(V),!L&&!k&&V.length?k=!0:L?.resume())}),L=zt([t.nodes,()=>t.nodes.value.length],([V])=>{var F;(F=e.nodes)!=null&&F.value&&Array.isArray(e.nodes.value)&&(I?.pause(),e.nodes.value=[...V],(0,r.nextTick)(()=>{I?.resume()}))},{immediate:k}),(0,r.onScopeDispose)(()=>{I?.stop(),L?.stop()})})},c=()=>{n.run(()=>{let I,L,k=!!t.edges.value.length;I=zt([e.edges,()=>{var V,F;return(F=(V=e.edges)==null?void 0:V.value)==null?void 0:F.length}],([V])=>{V&&Array.isArray(V)&&(L?.pause(),t.setEdges(V),!L&&!k&&V.length?k=!0:L?.resume())}),L=zt([t.edges,()=>t.edges.value.length],([V])=>{var F;(F=e.edges)!=null&&F.value&&Array.isArray(e.edges.value)&&(I?.pause(),e.edges.value=[...V],(0,r.nextTick)(()=>{I?.resume()}))},{immediate:k}),(0,r.onScopeDispose)(()=>{I?.stop(),L?.stop()})})},d=()=>{n.run(()=>{(0,r.watch)(()=>A.maxZoom,()=>{A.maxZoom&&le(A.maxZoom)&&t.setMaxZoom(A.maxZoom)},{immediate:!0})})},h=()=>{n.run(()=>{(0,r.watch)(()=>A.minZoom,()=>{A.minZoom&&le(A.minZoom)&&t.setMinZoom(A.minZoom)},{immediate:!0})})},g=()=>{n.run(()=>{(0,r.watch)(()=>A.translateExtent,()=>{A.translateExtent&&le(A.translateExtent)&&t.setTranslateExtent(A.translateExtent)},{immediate:!0})})},B=()=>{n.run(()=>{(0,r.watch)(()=>A.nodeExtent,()=>{A.nodeExtent&&le(A.nodeExtent)&&t.setNodeExtent(A.nodeExtent)},{immediate:!0})})},w=()=>{n.run(()=>{(0,r.watch)(()=>A.applyDefault,()=>{le(A.applyDefault)&&(t.applyDefault.value=A.applyDefault)},{immediate:!0})})},m=()=>{n.run(()=>{const I=async L=>{let k=L;typeof A.autoConnect=="function"&&(k=await A.autoConnect(L)),k!==!1&&t.addEdges([k])};(0,r.watch)(()=>A.autoConnect,()=>{le(A.autoConnect)&&(t.autoConnect.value=A.autoConnect)},{immediate:!0}),(0,r.watch)(t.autoConnect,(L,k,V)=>{L?t.onConnect(I):t.hooks.value.connect.off(I),V(()=>{t.hooks.value.connect.off(I)})},{immediate:!0})})},y=()=>{const I=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const L of Object.keys(A)){const k=L;if(!I.includes(k)){const V=(0,r.toRef)(()=>A[k]),F=t[k];(0,r.isRef)(F)&&n.run(()=>{(0,r.watch)(V,M=>{le(M)&&(F.value=M)},{immediate:!0})})}}};o(),a(),c(),h(),d(),g(),B(),w(),m(),y()}),()=>n.stop()}function UB(){return{edgesChange:EA(),nodesChange:EA(),nodeDoubleClick:EA(),nodeClick:EA(),nodeMouseEnter:EA(),nodeMouseMove:EA(),nodeMouseLeave:EA(),nodeContextMenu:EA(),nodeDragStart:EA(),nodeDrag:EA(),nodeDragStop:EA(),nodesInitialized:EA(),miniMapNodeClick:EA(),miniMapNodeDoubleClick:EA(),miniMapNodeMouseEnter:EA(),miniMapNodeMouseMove:EA(),miniMapNodeMouseLeave:EA(),connect:EA(),connectStart:EA(),connectEnd:EA(),clickConnectStart:EA(),clickConnectEnd:EA(),paneReady:EA(),init:EA(),move:EA(),moveStart:EA(),moveEnd:EA(),selectionDragStart:EA(),selectionDrag:EA(),selectionDragStop:EA(),selectionContextMenu:EA(),selectionStart:EA(),selectionEnd:EA(),viewportChangeStart:EA(),viewportChange:EA(),viewportChangeEnd:EA(),paneScroll:EA(),paneClick:EA(),paneContextMenu:EA(),paneMouseEnter:EA(),paneMouseMove:EA(),paneMouseLeave:EA(),edgeContextMenu:EA(),edgeMouseEnter:EA(),edgeMouseMove:EA(),edgeMouseLeave:EA(),edgeDoubleClick:EA(),edgeClick:EA(),edgeUpdateStart:EA(),edgeUpdate:EA(),edgeUpdateEnd:EA(),updateNodeInternals:EA(),error:EA(e=>Tn(e.message))}}function bB(e,A){const t=(0,r.getCurrentInstance)();(0,r.onBeforeMount)(()=>{for(const[o,a]of Object.entries(A.value)){const c=d=>{e(o,d)};a.setEmitter(c),mn(a.removeEmitter),a.setHasEmitListeners(()=>n(o)),mn(a.removeHasEmitListeners)}});function n(o){var a;const c=IB(o);return!!((a=t?.vnode.props)!=null&&a[c])}}function IB(e){const[A,...t]=e.split(":");return`on${A.replace(/(?:^|-)(\w)/g,(n,o)=>o.toUpperCase())}${t.length?`:${t.join(":")}`:""}`}function Wa(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:ni.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:_n.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Dt.Bezier,style:{}},connectionMode:nt.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:br()?"Meta":"Control",zoomActivationKeyCode:br()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:UB(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}var HB=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function _B(e,A,t){const n=EB(e),o=S=>{const H=S??[];e.hooks.updateNodeInternals.trigger(H)},a=S=>Gh(S,e.nodes,e.edges),c=S=>Ph(S,e.nodes,e.edges),d=S=>ma(S,e.edges),h=({id:S,type:H,nodeId:T})=>{var D;const b=S?`-${H}-${S}`:`-${H}`;return Array.from(((D=e.connectionLookup.get(`${T}${b}`))==null?void 0:D.values())??[])},g=S=>{if(S)return A.value.get(S)},B=S=>{if(S)return t.value.get(S)},w=(S,H,T)=>{var D,b;const z=[];for(const P of S){const gA={id:P.id,type:"position",dragging:T,from:P.from};if(H&&(gA.position=P.position,P.parentNode)){const iA=g(P.parentNode);gA.position={x:gA.position.x-(((D=iA?.computedPosition)==null?void 0:D.x)??0),y:gA.position.y-(((b=iA?.computedPosition)==null?void 0:b.y)??0)}}z.push(gA)}z?.length&&e.hooks.nodesChange.trigger(z)},m=S=>{if(!e.vueFlowRef)return;const H=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!H)return;const T=window.getComputedStyle(H),{m22:D}=new window.DOMMatrixReadOnly(T.transform),b=[];for(const z of S){const P=z,gA=g(P.id);if(gA){const iA=Fr(P.nodeElement);if(iA.width&&iA.height&&(gA.dimensions.width!==iA.width||gA.dimensions.height!==iA.height||P.forceUpdate)){const SA=P.nodeElement.getBoundingClientRect();gA.dimensions=iA,gA.handleBounds.source=ka("source",P.nodeElement,SA,D,gA.id),gA.handleBounds.target=ka("target",P.nodeElement,SA,D,gA.id),b.push({id:gA.id,type:"dimensions",dimensions:iA})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&n.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),b.length&&e.hooks.nodesChange.trigger(b)},y=(S,H)=>{const T=new Set,D=new Set;for(const P of S)Lt(P)?T.add(P.id):ht(P)&&D.add(P.id);const b=pt(A.value,T,!0),z=pt(t.value,D);if(e.multiSelectionActive){for(const P of T)b.push(Bt(P,H));for(const P of D)z.push(Bt(P,H))}b.length&&e.hooks.nodesChange.trigger(b),z.length&&e.hooks.edgesChange.trigger(z)},v=S=>{if(e.multiSelectionActive){const H=S.map(T=>Bt(T.id,!0));e.hooks.nodesChange.trigger(H);return}e.hooks.nodesChange.trigger(pt(A.value,new Set(S.map(H=>H.id)),!0)),e.hooks.edgesChange.trigger(pt(t.value))},I=S=>{if(e.multiSelectionActive){const H=S.map(T=>Bt(T.id,!0));e.hooks.edgesChange.trigger(H);return}e.hooks.edgesChange.trigger(pt(t.value,new Set(S.map(H=>H.id)))),e.hooks.nodesChange.trigger(pt(A.value,new Set,!0))},L=S=>{y(S,!0)},k=S=>{const H=(S||e.nodes).map(T=>(T.selected=!1,Bt(T.id,!1)));e.hooks.nodesChange.trigger(H)},V=S=>{const H=(S||e.edges).map(T=>(T.selected=!1,Bt(T.id,!1)));e.hooks.edgesChange.trigger(H)},F=S=>{if(!S||!S.length)return y([],!1);const H=S.reduce((T,D)=>{const b=Bt(D.id,!1);return Lt(D)?T.nodes.push(b):T.edges.push(b),T},{nodes:[],edges:[]});H.nodes.length&&e.hooks.nodesChange.trigger(H.nodes),H.edges.length&&e.hooks.edgesChange.trigger(H.edges)},M=S=>{var H;(H=e.d3Zoom)==null||H.scaleExtent([S,e.maxZoom]),e.minZoom=S},tA=S=>{var H;(H=e.d3Zoom)==null||H.scaleExtent([e.minZoom,S]),e.maxZoom=S},W=S=>{var H;(H=e.d3Zoom)==null||H.translateExtent(S),e.translateExtent=S},aA=S=>{e.nodeExtent=S,o()},dA=S=>{var H;(H=e.d3Zoom)==null||H.clickDistance(S)},rA=S=>{e.nodesDraggable=S,e.nodesConnectable=S,e.elementsSelectable=S},oA=S=>{const H=S instanceof Function?S(e.nodes):S;!e.initialized&&!H.length||(e.nodes=Ma(H,g,e.hooks.error.trigger))},AA=S=>{const H=S instanceof Function?S(e.edges):S;if(!e.initialized&&!H.length)return;const T=fi(H,e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);di(e.connectionLookup,t.value,T),e.edges=T},O=S=>{const H=S instanceof Function?S([...e.nodes,...e.edges]):S;!e.initialized&&!H.length||(oA(H.filter(Lt)),AA(H.filter(ht)))},lA=S=>{let H=S instanceof Function?S(e.nodes):S;H=Array.isArray(H)?H:[H];const T=Ma(H,g,e.hooks.error.trigger),D=[];for(const b of T)D.push(Fa(b));D.length&&e.hooks.nodesChange.trigger(D)},_=S=>{let H=S instanceof Function?S(e.edges):S;H=Array.isArray(H)?H:[H];const T=fi(H,e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),D=[];for(const b of T)D.push(Fa(b));D.length&&e.hooks.edgesChange.trigger(D)},Z=(S,H=!0,T=!1)=>{const D=S instanceof Function?S(e.nodes):S,b=Array.isArray(D)?D:[D],z=[],P=[];function gA(SA){const xA=d(SA);for(const KA of xA)(!le(KA.deletable)||KA.deletable)&&P.push(ba(KA.id,KA.source,KA.target,KA.sourceHandle,KA.targetHandle))}function iA(SA){const xA=[];for(const KA of e.nodes)KA.parentNode===SA&&xA.push(KA);if(xA.length){for(const KA of xA)z.push(Ua(KA.id));H&&gA(xA);for(const KA of xA)iA(KA.id)}}for(const SA of b){const xA=typeof SA=="string"?g(SA):SA;xA&&(le(xA.deletable)&&!xA.deletable||(z.push(Ua(xA.id)),H&&gA([xA]),T&&iA(xA.id)))}P.length&&e.hooks.edgesChange.trigger(P),z.length&&e.hooks.nodesChange.trigger(z)},U=S=>{const H=S instanceof Function?S(e.edges):S,T=Array.isArray(H)?H:[H],D=[];for(const b of T){const z=typeof b=="string"?B(b):b;z&&(le(z.deletable)&&!z.deletable||D.push(ba(typeof b=="string"?b:b.id,z.source,z.target,z.sourceHandle,z.targetHandle)))}e.hooks.edgesChange.trigger(D)},x=(S,H,T=!0)=>{const D=B(S.id);if(!D)return!1;const b=e.edges.indexOf(D),z=fB(S,H,D,T,e.hooks.error.trigger);if(z){const[P]=fi([z],e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((gA,iA)=>iA===b?P:gA),di(e.connectionLookup,t.value,[P]),P}return!1},G=(S,H,T={replace:!1})=>{const D=B(S);if(!D)return;const b=typeof H=="function"?H(D):H;D.data=T.replace?b:{...D.data,...b}},R=S=>Ea(S,e.nodes),$=S=>{const H=Ea(S,e.edges);return di(e.connectionLookup,t.value,H),H},J=(S,H,T={replace:!1})=>{const D=g(S);if(!D)return;const b=typeof H=="function"?H(D):H;T.replace?e.nodes.splice(e.nodes.indexOf(D),1,b):Object.assign(D,b)},nA=(S,H,T={replace:!1})=>{const D=g(S);if(!D)return;const b=typeof H=="function"?H(D):H;D.data=T.replace?b:{...D.data,...b}},hA=(S,H,T=!1)=>{T?e.connectionClickStartHandle=S:e.connectionStartHandle=S,e.connectionEndHandle=null,e.connectionStatus=null,H&&(e.connectionPosition=H)},UA=(S,H=null,T=null)=>{e.connectionStartHandle&&(e.connectionPosition=S,e.connectionEndHandle=H,e.connectionStatus=T)},eA=(S,H)=>{e.connectionPosition={x:NaN,y:NaN},e.connectionEndHandle=null,e.connectionStatus=null,H?e.connectionClickStartHandle=null:e.connectionStartHandle=null},uA=S=>{const H=Rh(S),T=H?null:xn(S)?S:g(S.id);return!H&&!T?[null,null,H]:[H?S:Qr(T),T,H]},Y=(S,H=!0,T=e.nodes)=>{const[D,b,z]=uA(S);if(!D)return[];const P=[];for(const gA of T||e.nodes){if(!z&&(gA.id===b.id||!gA.computedPosition))continue;const iA=Qr(gA),SA=Er(iA,D);(H&&SA>0||SA>=iA.width*iA.height||SA>=Number(D.width)*Number(D.height))&&P.push(gA)}return P},cA=(S,H,T=!0)=>{const[D]=uA(S);if(!D)return!1;const b=Er(D,H);return T&&b>0||b>=Number(D.width)*Number(D.height)},mA=S=>{const{viewport:H,dimensions:T,d3Zoom:D,d3Selection:b,translateExtent:z}=e;if(!D||!b||!S.x&&!S.y)return!1;const P=Jt.translate(H.x+S.x,H.y+S.y).scale(H.zoom),gA=[[0,0],[T.width,T.height]],iA=D.constrain()(P,gA,z),SA=e.viewport.x!==iA.x||e.viewport.y!==iA.y||e.viewport.zoom!==iA.k;return D.transform(b,iA),SA},yA=S=>{const H=S instanceof Function?S(e):S,T=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];le(H.defaultEdgeOptions)&&(e.defaultEdgeOptions=H.defaultEdgeOptions);const D=H.modelValue||H.nodes||H.edges?[]:void 0;D&&(H.modelValue&&D.push(...H.modelValue),H.nodes&&D.push(...H.nodes),H.edges&&D.push(...H.edges),O(D));const b=()=>{le(H.maxZoom)&&tA(H.maxZoom),le(H.minZoom)&&M(H.minZoom),le(H.translateExtent)&&W(H.translateExtent)};for(const z of Object.keys(H)){const P=z,gA=H[P];![...HB,...T].includes(P)&&le(gA)&&(e[P]=gA)}To(()=>e.d3Zoom).not.toBeNull().then(b),e.initialized||(e.initialized=!0)};return{updateNodePositions:w,updateNodeDimensions:m,setElements:O,setNodes:oA,setEdges:AA,addNodes:lA,addEdges:_,removeNodes:Z,removeEdges:U,findNode:g,findEdge:B,updateEdge:x,updateEdgeData:G,updateNode:J,updateNodeData:nA,applyEdgeChanges:$,applyNodeChanges:R,addSelectedElements:L,addSelectedNodes:v,addSelectedEdges:I,setMinZoom:M,setMaxZoom:tA,setTranslateExtent:W,setNodeExtent:aA,setPaneClickDistance:dA,removeSelectedElements:F,removeSelectedNodes:k,removeSelectedEdges:V,startConnection:hA,updateConnection:UA,endConnection:eA,setInteractive:rA,setState:yA,getIntersectingNodes:Y,getIncomers:a,getOutgoers:c,getConnectedEdges:d,getHandleConnections:h,isNodeIntersecting:cA,panBy:mA,fitView:S=>n.value.fitView(S),zoomIn:S=>n.value.zoomIn(S),zoomOut:S=>n.value.zoomOut(S),zoomTo:(S,H)=>n.value.zoomTo(S,H),setViewport:(S,H)=>n.value.setViewport(S,H),setTransform:(S,H)=>n.value.setTransform(S,H),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(S,H,T)=>n.value.setCenter(S,H,T),fitBounds:(S,H)=>n.value.fitBounds(S,H),project:S=>n.value.project(S),screenToFlowCoordinate:S=>n.value.screenToFlowCoordinate(S),flowToScreenCoordinate:S=>n.value.flowToScreenCoordinate(S),toObject:()=>{const S=[],H=[];for(const T of e.nodes){const{computedPosition:D,handleBounds:b,selected:z,dimensions:P,isParent:gA,resizing:iA,dragging:SA,events:xA,...KA}=T;S.push(KA)}for(const T of e.edges){const{selected:D,sourceNode:b,targetNode:z,events:P,...gA}=T;H.push(gA)}return JSON.parse(JSON.stringify({nodes:S,edges:H,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:S=>new Promise(H=>{const{nodes:T,edges:D,position:b,zoom:z,viewport:P}=S;T&&oA(T),D&&AA(D);const[gA,iA]=P?.x&&P?.y?[P.x,P.y]:b??[null,null];if(gA&&iA){const SA=P?.zoom||z||e.viewport.zoom;return To(()=>n.value.viewportInitialized).toBe(!0).then(()=>{n.value.setViewport({x:gA,y:iA,zoom:SA}).then(()=>{H(!0)})})}else H(!0)}),updateNodeInternals:o,viewportHelper:n,$reset:()=>{const S=Wa();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const H=Jt.translate(S.defaultViewport.x??0,S.defaultViewport.y??0).scale(Nt(S.defaultViewport.zoom??1,S.minZoom,S.maxZoom)),T=e.viewportRef.getBoundingClientRect(),D=[[0,0],[T.width,T.height]],b=e.d3Zoom.constrain()(H,D,S.translateExtent);e.d3Zoom.transform(e.d3Selection,b)}yA(S)},$destroy:()=>{}}}var SB=["data-id","data-handleid","data-nodeid","data-handlepos"],An=(0,r.defineComponent)({name:"Handle",compatConfig:{MODE:3},props:{id:{default:null},type:{},position:{default:()=>HA.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:A}){const t=(0,r.createPropsRestProxy)(e,["position","connectable","connectableStart","connectableEnd","id"]),n=(0,r.toRef)(()=>t.type??"source"),o=(0,r.toRef)(()=>t.isValidConnection??null),{id:a,connectionStartHandle:c,connectionClickStartHandle:d,connectionEndHandle:h,vueFlowRef:g,nodesConnectable:B,noDragClassName:w,noPanClassName:m}=ZA(),{id:y,node:v,nodeEl:I,connectedEdges:L}=$a(),k=(0,r.ref)(),V=(0,r.toRef)(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),F=(0,r.toRef)(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),M=(0,r.toRef)(()=>{var AA,O,lA,_,Z,U;return((AA=c.value)==null?void 0:AA.nodeId)===y&&((O=c.value)==null?void 0:O.id)===e.id&&((lA=c.value)==null?void 0:lA.type)===n.value||((_=h.value)==null?void 0:_.nodeId)===y&&((Z=h.value)==null?void 0:Z.id)===e.id&&((U=h.value)==null?void 0:U.type)===n.value}),tA=(0,r.toRef)(()=>{var AA,O,lA;return((AA=d.value)==null?void 0:AA.nodeId)===y&&((O=d.value)==null?void 0:O.id)===e.id&&((lA=d.value)==null?void 0:lA.type)===n.value}),{handlePointerDown:W,handleClick:aA}=za({nodeId:y,handleId:e.id,isValidConnection:o,type:n}),dA=(0,r.computed)(()=>typeof e.connectable=="string"&&e.connectable==="single"?!L.value.some(AA=>{const O=AA[`${n.value}Handle`];return AA[n.value]!==y?!1:O?O===e.id:!0}):typeof e.connectable=="number"?L.value.filter(AA=>{const O=AA[`${n.value}Handle`];return AA[n.value]!==y?!1:O?O===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(v,L.value):le(e.connectable)?e.connectable:B.value);(0,r.onMounted)(()=>{var AA;if(!v.dimensions.width||!v.dimensions.height)return;const O=(AA=v.handleBounds[n.value])==null?void 0:AA.find(R=>R.id===e.id);if(!g.value||O)return;const lA=g.value.querySelector(".vue-flow__transformationpane");if(!I.value||!k.value||!lA||!e.id)return;const _=I.value.getBoundingClientRect(),Z=k.value.getBoundingClientRect(),U=window.getComputedStyle(lA),{m22:x}=new window.DOMMatrixReadOnly(U.transform),G={id:e.id,position:e.position,x:(Z.left-_.left)/x,y:(Z.top-_.top)/x,type:n.value,nodeId:y,...Fr(k.value)};v.handleBounds[n.value]=[...v.handleBounds[n.value]??[],G]});function rA(AA){const O=ai(AA);dA.value&&V.value&&(O&&AA.button===0||!O)&&W(AA)}function oA(AA){!y||!d.value&&!V.value||dA.value&&aA(AA)}return A({handleClick:aA,handlePointerDown:W,onClick:oA,onPointerDown:rA}),(AA,O)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"handle",ref:k,"data-id":`${(0,r.unref)(a)}-${(0,r.unref)(y)}-${e.id}-${n.value}`,"data-handleid":e.id,"data-nodeid":(0,r.unref)(y),"data-handlepos":AA.position,class:(0,r.normalizeClass)(["vue-flow__handle",[`vue-flow__handle-${AA.position}`,`vue-flow__handle-${e.id}`,(0,r.unref)(w),(0,r.unref)(m),n.value,{connectable:dA.value,connecting:tA.value,connectablestart:V.value,connectableend:F.value,connectionindicator:dA.value&&(V.value&&!M.value||F.value&&M.value)}]]),onMousedown:rA,onTouchstartPassive:rA,onClick:oA},[(0,r.renderSlot)(AA.$slots,"default",{id:AA.id})],42,SB))}}),xr=function({sourcePosition:e=HA.Bottom,targetPosition:A=HA.Top,label:t,connectable:n=!0,isValidTargetPos:o,isValidSourcePos:a,data:c}){const d=c.label??t;return[(0,r.h)(An,{type:"target",position:A,connectable:n,isValidConnection:o}),typeof d!="string"&&d?(0,r.h)(d):(0,r.h)(r.Fragment,[d]),(0,r.h)(An,{type:"source",position:e,connectable:n,isValidConnection:a})]};xr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],xr.inheritAttrs=!1,xr.compatConfig={MODE:3};var xB=xr,Dr=function({targetPosition:e=HA.Top,label:A,connectable:t=!0,isValidTargetPos:n,data:o}){const a=o.label??A;return[(0,r.h)(An,{type:"target",position:e,connectable:t,isValidConnection:n}),typeof a!="string"&&a?(0,r.h)(a):(0,r.h)(r.Fragment,[a])]};Dr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Dr.inheritAttrs=!1,Dr.compatConfig={MODE:3};var DB=Dr,Nr=function({sourcePosition:e=HA.Bottom,label:A,connectable:t=!0,isValidSourcePos:n,data:o}){const a=o.label??A;return[typeof a!="string"&&a?(0,r.h)(a):(0,r.h)(r.Fragment,[a]),(0,r.h)(An,{type:"source",position:e,connectable:t,isValidConnection:n})]};Nr.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Nr.inheritAttrs=!1,Nr.compatConfig={MODE:3};var NB=Nr,LB=["transform"],TB=["width","height","x","y","rx","ry"],kB=["y"],MB=(0,r.defineComponent)({name:"EdgeText",compatConfig:{MODE:3},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const A=(0,r.ref)({x:0,y:0,width:0,height:0}),t=(0,r.ref)(null),n=(0,r.computed)(()=>`translate(${e.x-A.value.width/2} ${e.y-A.value.height/2})`);(0,r.onMounted)(o),(0,r.watch)([()=>e.x,()=>e.y,t,()=>e.label],o);function o(){if(!t.value)return;const a=t.value.getBBox();(a.width!==A.value.width||a.height!==A.value.height)&&(A.value=a)}return(a,c)=>((0,r.openBlock)(),(0,r.createElementBlock)("g",{transform:n.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?((0,r.openBlock)(),(0,r.createElementBlock)("rect",{key:0,class:"vue-flow__edge-textbg",width:`${A.value.width+2*a.labelBgPadding[0]}px`,height:`${A.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:(0,r.normalizeStyle)(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,TB)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("text",(0,r.mergeProps)(a.$attrs,{ref_key:"el",ref:t,class:"vue-flow__edge-text",y:A.value.height/2,dy:"0.3em",style:a.labelStyle}),[(0,r.renderSlot)(a.$slots,"default",{},()=>[typeof a.label!="string"?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(a.label),{key:0})):((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createTextVNode)((0,r.toDisplayString)(a.label),1)],64))])],16,kB)],8,LB))}}),OB=["id","d","marker-end","marker-start"],KB=["d","stroke-width"],kn=(0,r.defineComponent)({name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:A}){const t=(0,r.ref)(null),n=(0,r.ref)(null),o=(0,r.ref)(null),a=(0,r.useAttrs)();return A({pathEl:t,interactionEl:n,labelEl:o}),(c,d)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createElementVNode)("path",(0,r.mergeProps)((0,r.unref)(a),{id:c.id,ref_key:"pathEl",ref:t,d:c.path,class:"vue-flow__edge-path","marker-end":c.markerEnd,"marker-start":c.markerStart}),null,16,OB),c.interactionWidth?((0,r.openBlock)(),(0,r.createElementBlock)("path",{key:0,ref_key:"interactionEl",ref:n,fill:"none",d:c.path,"stroke-width":c.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,KB)):(0,r.createCommentVNode)("",!0),c.label&&c.labelX&&c.labelY?((0,r.openBlock)(),(0,r.createBlock)(MB,{key:1,ref_key:"labelEl",ref:o,x:c.labelX,y:c.labelY,label:c.label,"label-show-bg":c.labelShowBg,"label-bg-style":c.labelBgStyle,"label-bg-padding":c.labelBgPadding,"label-bg-border-radius":c.labelBgBorderRadius,"label-style":c.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):(0,r.createCommentVNode)("",!0)],64))}});function Ya({sourceX:e,sourceY:A,targetX:t,targetY:n}){const o=Math.abs(t-e)/2,a=t<e?t+o:t-o,c=Math.abs(n-A)/2;return[a,n<A?n+c:n-c,o,c]}function Ja({sourceX:e,sourceY:A,targetX:t,targetY:n,sourceControlX:o,sourceControlY:a,targetControlX:c,targetControlY:d}){const h=e*.125+o*.375+c*.375+t*.125,g=A*.125+a*.375+d*.375+n*.125;return[h,g,Math.abs(h-e),Math.abs(g-A)]}function Lr(e,A){return e>=0?.5*e:A*25*Math.sqrt(-e)}function Za({pos:e,x1:A,y1:t,x2:n,y2:o,c:a}){let c,d;switch(e){case HA.Left:c=A-Lr(A-n,a),d=t;break;case HA.Right:c=A+Lr(n-A,a),d=t;break;case HA.Top:c=A,d=t-Lr(t-o,a);break;case HA.Bottom:c=A,d=t+Lr(o-t,a);break}return[c,d]}function hi(e){const{sourceX:A,sourceY:t,sourcePosition:n=HA.Bottom,targetX:o,targetY:a,targetPosition:c=HA.Top,curvature:d=.25}=e,[h,g]=Za({pos:n,x1:A,y1:t,x2:o,y2:a,c:d}),[B,w]=Za({pos:c,x1:o,y1:a,x2:A,y2:t,c:d}),[m,y,v,I]=Ja({sourceX:A,sourceY:t,targetX:o,targetY:a,sourceControlX:h,sourceControlY:g,targetControlX:B,targetControlY:w});return[`M${A},${t} C${h},${g} ${B},${w} ${o},${a}`,m,y,v,I]}function ja({pos:e,x1:A,y1:t,x2:n,y2:o}){let a,c;switch(e){case HA.Left:case HA.Right:a=.5*(A+n),c=t;break;case HA.Top:case HA.Bottom:a=A,c=.5*(t+o);break}return[a,c]}function qa(e){const{sourceX:A,sourceY:t,sourcePosition:n=HA.Bottom,targetX:o,targetY:a,targetPosition:c=HA.Top}=e,[d,h]=ja({pos:n,x1:A,y1:t,x2:o,y2:a}),[g,B]=ja({pos:c,x1:o,y1:a,x2:A,y2:t}),[w,m,y,v]=Ja({sourceX:A,sourceY:t,targetX:o,targetY:a,sourceControlX:d,sourceControlY:h,targetControlX:g,targetControlY:B});return[`M${A},${t} C${d},${h} ${g},${B} ${o},${a}`,w,m,y,v]}var Al={[HA.Left]:{x:-1,y:0},[HA.Right]:{x:1,y:0},[HA.Top]:{x:0,y:-1},[HA.Bottom]:{x:0,y:1}};function RB({source:e,sourcePosition:A=HA.Bottom,target:t}){return A===HA.Left||A===HA.Right?e.x<t.x?{x:1,y:0}:{x:-1,y:0}:e.y<t.y?{x:0,y:1}:{x:0,y:-1}}function el(e,A){return Math.sqrt((A.x-e.x)**2+(A.y-e.y)**2)}function VB({source:e,sourcePosition:A=HA.Bottom,target:t,targetPosition:n=HA.Top,center:o,offset:a}){const c=Al[A],d=Al[n],h={x:e.x+c.x*a,y:e.y+c.y*a},g={x:t.x+d.x*a,y:t.y+d.y*a},B=RB({source:h,sourcePosition:A,target:g}),w=B.x!==0?"x":"y",m=B[w];let y,v,I;const L={x:0,y:0},k={x:0,y:0},[V,F,M,tA]=Ya({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(c[w]*d[w]===-1){v=o.x??V,I=o.y??F;const W=[{x:v,y:h.y},{x:v,y:g.y}],aA=[{x:h.x,y:I},{x:g.x,y:I}];c[w]===m?y=w==="x"?W:aA:y=w==="x"?aA:W}else{const W=[{x:h.x,y:g.y}],aA=[{x:g.x,y:h.y}];if(w==="x"?y=c.x===m?aA:W:y=c.y===m?W:aA,A===n){const oA=Math.abs(e[w]-t[w]);if(oA<=a){const AA=Math.min(a-1,a-oA);c[w]===m?L[w]=(h[w]>e[w]?-1:1)*AA:k[w]=(g[w]>t[w]?-1:1)*AA}}if(A!==n){const oA=w==="x"?"y":"x",AA=c[w]===d[oA],O=h[oA]>g[oA],lA=h[oA]<g[oA];(c[w]===1&&(!AA&&O||AA&&lA)||c[w]!==1&&(!AA&&lA||AA&&O))&&(y=w==="x"?W:aA)}const dA={x:h.x+L.x,y:h.y+L.y},rA={x:g.x+k.x,y:g.y+k.y};Math.max(Math.abs(dA.x-y[0].x),Math.abs(rA.x-y[0].x))>=Math.max(Math.abs(dA.y-y[0].y),Math.abs(rA.y-y[0].y))?(v=(dA.x+rA.x)/2,I=y[0].y):(v=y[0].x,I=(dA.y+rA.y)/2)}return[[e,{x:h.x+L.x,y:h.y+L.y},...y,{x:g.x+k.x,y:g.y+k.y},t],v,I,M,tA]}function PB(e,A,t,n){const o=Math.min(el(e,A)/2,el(A,t)/2,n),{x:a,y:c}=A;if(e.x===a&&a===t.x||e.y===c&&c===t.y)return`L${a} ${c}`;if(e.y===c){const h=e.x<t.x?-1:1,g=e.y<t.y?1:-1;return`L ${a+o*h},${c}Q ${a},${c} ${a},${c+o*g}`}const d=e.x<t.x?1:-1;return`L ${a},${c+o*(e.y<t.y?-1:1)}Q ${a},${c} ${a+o*d},${c}`}function Bi(e){const{sourceX:A,sourceY:t,sourcePosition:n=HA.Bottom,targetX:o,targetY:a,targetPosition:c=HA.Top,borderRadius:d=5,centerX:h,centerY:g,offset:B=20}=e,[w,m,y,v,I]=VB({source:{x:A,y:t},sourcePosition:n,target:{x:o,y:a},targetPosition:c,center:{x:h,y:g},offset:B});return[w.reduce((L,k,V)=>{let F;return V>0&&V<w.length-1?F=PB(w[V-1],k,w[V+1],d):F=`${V===0?"M":"L"}${k.x} ${k.y}`,L+=F,L},""),m,y,v,I]}function GB(e){const{sourceX:A,sourceY:t,targetX:n,targetY:o}=e,[a,c,d,h]=Ya({sourceX:A,sourceY:t,targetX:n,targetY:o});return[`M ${A},${t}L ${n},${o}`,a,c,d,h]}var zB=(0,r.defineComponent)({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=GB(e);return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),tl=(0,r.defineComponent)({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=Bi({...e,sourcePosition:e.sourcePosition??HA.Bottom,targetPosition:e.targetPosition??HA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),$B=(0,r.defineComponent)({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:A}){return()=>(0,r.h)(tl,{...e,...A,borderRadius:0})}}),XB=(0,r.defineComponent)({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=hi({...e,sourcePosition:e.sourcePosition??HA.Bottom,targetPosition:e.targetPosition??HA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),WB=(0,r.defineComponent)({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=qa({...e,sourcePosition:e.sourcePosition??HA.Bottom,targetPosition:e.targetPosition??HA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),YB={input:NB,default:xB,output:DB},JB={default:XB,straight:zB,step:$B,smoothstep:tl,simplebezier:WB};function ZB(e,A,t){const n=(0,r.computed)(()=>v=>A.value.get(v)),o=(0,r.computed)(()=>v=>t.value.get(v)),a=(0,r.computed)(()=>{const v={...JB,...e.edgeTypes},I=Object.keys(v);for(const L of e.edges)L.type&&!I.includes(L.type)&&(v[L.type]=L.type);return v}),c=(0,r.computed)(()=>{const v={...YB,...e.nodeTypes},I=Object.keys(v);for(const L of e.nodes)L.type&&!I.includes(L.type)&&(v[L.type]=L.type);return v}),d=(0,r.computed)(()=>e.onlyRenderVisibleElements?pa(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),h=(0,r.computed)(()=>{if(e.onlyRenderVisibleElements){const v=[];for(const I of e.edges){const L=A.value.get(I.source),k=A.value.get(I.target);eB({sourcePos:L.computedPosition||{x:0,y:0},targetPos:k.computedPosition||{x:0,y:0},sourceWidth:L.dimensions.width,sourceHeight:L.dimensions.height,targetWidth:k.dimensions.width,targetHeight:k.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&v.push(I)}return v}return e.edges}),g=(0,r.computed)(()=>[...d.value,...h.value]),B=(0,r.computed)(()=>{const v=[];for(const I of e.nodes)I.selected&&v.push(I);return v}),w=(0,r.computed)(()=>{const v=[];for(const I of e.edges)I.selected&&v.push(I);return v}),m=(0,r.computed)(()=>[...B.value,...w.value]),y=(0,r.computed)(()=>{const v=[];for(const I of e.nodes)I.dimensions.width&&I.dimensions.height&&I.handleBounds!==void 0&&v.push(I);return v});return{getNode:n,getEdge:o,getElements:g,getEdgeTypes:a,getNodeTypes:c,getEdges:h,getNodes:d,getSelectedElements:m,getSelectedNodes:B,getSelectedEdges:w,getNodesInitialized:y,areNodesInitialized:(0,r.computed)(()=>d.value.length>0&&y.value.length===d.value.length)}}var jB=class hn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var A;const t=(A=(0,r.getCurrentInstance)())==null?void 0:A.appContext.app;return hn.instance=t?.config.globalProperties.$vueFlowStorage??hn.instance??new hn,t&&(t.config.globalProperties.$vueFlowStorage=hn.instance),hn.instance}set(A,t){return this.flows.set(A,t)}get(A){return this.flows.get(A)}remove(A){return this.flows.delete(A)}create(A,t){const n=(0,r.reactive)(Wa()),o={};for(const[w,m]of Object.entries(n.hooks)){const y=`on${w.charAt(0).toUpperCase()+w.slice(1)}`;o[y]=m.on}const a={};for(const[w,m]of Object.entries(n.hooks))a[w]=m.trigger;const c=(0,r.computed)(()=>{const w=new Map;for(const m of n.nodes)w.set(m.id,m);return w}),d=(0,r.computed)(()=>{const w=new Map;for(const m of n.edges)w.set(m.id,m);return w}),h=ZB(n,c,d),g=_B(n,c,d);g.setState({...n,...t});const B={...o,...h,...g,...Yu(n),nodeLookup:c,edgeLookup:d,emits:a,id:A,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(A)}};return this.set(A,B),B}getId(){return`vue-flow-${this.currentId++}`}};function ZA(e){const A=jB.getInstance(),t=(0,r.getCurrentScope)(),n=typeof e=="object",o=n?e:{id:e},a=o.id,c=a??t?.vueFlowId;let d;if(t){const h=(0,r.inject)(Ra,null);typeof h<"u"&&h!==null&&(!c||h.id===c)&&(d=h)}if(d||c&&(d=A.get(c)),!d||c&&d.id!==c){const h=a??A.getId(),g=A.create(h,o);d=g,(t??(0,r.effectScope)(!0)).run(()=>{(0,r.watch)(g.applyDefault,(B,w,m)=>{const y=I=>{g.applyNodeChanges(I)},v=I=>{g.applyEdgeChanges(I)};B?(g.onNodesChange(y),g.onEdgesChange(v)):(g.hooks.value.nodesChange.off(y),g.hooks.value.edgesChange.off(v)),m(()=>{g.hooks.value.nodesChange.off(y),g.hooks.value.edgesChange.off(v)})},{immediate:!0}),mn(()=>{if(d){const B=A.get(d.id);B?B.$destroy():Tn(`No store instance found for id ${d.id} in storage.`)}})})}else n&&d.setState(o);if(t&&((0,r.provide)(Ra,d),t.vueFlowId=d.id),n){const h=(0,r.getCurrentInstance)();h?.type.name!=="VueFlow"&&d.emits.error(new de(ae.USEVUEFLOW_OPTIONS))}return d}function qB(e){const{emits:A,dimensions:t}=ZA();let n;(0,r.onMounted)(()=>{const o=()=>{var a,c;if(!e.value||!(((c=(a=e.value).checkVisibility)==null?void 0:c.call(a))??!0))return;const d=Fr(e.value);(d.width===0||d.height===0)&&A.error(new de(ae.MISSING_VIEWPORT_DIMENSIONS)),t.value={width:d.width||500,height:d.height||500}};o(),window.addEventListener("resize",o),e.value&&(n=new ResizeObserver(()=>o()),n.observe(e.value)),(0,r.onBeforeUnmount)(()=>{window.removeEventListener("resize",o),n&&e.value&&n.unobserve(e.value)})})}var Ap=(0,r.defineComponent)({name:"UserSelection",compatConfig:{MODE:3},props:{userSelectionRect:{}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vue-flow__selection vue-flow__container",style:(0,r.normalizeStyle)({width:`${A.userSelectionRect.width}px`,height:`${A.userSelectionRect.height}px`,transform:`translate(${A.userSelectionRect.x}px, ${A.userSelectionRect.y}px)`})},null,4))}}),ep=["tabIndex"],tp=(0,r.defineComponent)({name:"NodesSelection",compatConfig:{MODE:3},setup(e){const{emits:A,viewport:t,getSelectedNodes:n,noPanClassName:o,disableKeyboardA11y:a,userSelectionActive:c}=ZA(),d=Xa(),h=(0,r.ref)(null),g=Ga({el:h,onStart(v){A.selectionDragStart(v),A.nodeDragStart(v)},onDrag(v){A.selectionDrag(v),A.nodeDrag(v)},onStop(v){A.selectionDragStop(v),A.nodeDragStop(v)}});(0,r.onMounted)(()=>{var v;a.value||(v=h.value)==null||v.focus({preventScroll:!0})});const B=(0,r.computed)(()=>Ba(n.value)),w=(0,r.computed)(()=>({width:`${B.value.width}px`,height:`${B.value.height}px`,top:`${B.value.y}px`,left:`${B.value.x}px`}));function m(v){A.selectionContextMenu({event:v,nodes:n.value})}function y(v){a.value||Zt[v.key]&&(v.preventDefault(),d({x:Zt[v.key].x,y:Zt[v.key].y},v.shiftKey))}return(v,I)=>!(0,r.unref)(c)&&B.value.width&&B.value.height?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["vue-flow__nodesselection vue-flow__container",(0,r.unref)(o)]),style:(0,r.normalizeStyle)({transform:`translate(${(0,r.unref)(t).x}px,${(0,r.unref)(t).y}px) scale(${(0,r.unref)(t).zoom})`})},[(0,r.createElementVNode)("div",{ref_key:"el",ref:h,class:(0,r.normalizeClass)([{dragging:(0,r.unref)(g)},"vue-flow__nodesselection-rect"]),style:(0,r.normalizeStyle)(w.value),tabIndex:(0,r.unref)(a)?void 0:-1,onContextmenu:m,onKeydown:y},null,46,ep)],6)):(0,r.createCommentVNode)("",!0)}});function np(e,A){return{x:e.clientX-A.left,y:e.clientY-A.top}}var rp=(0,r.defineComponent)({name:"Pane",compatConfig:{MODE:3},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:A,nodes:t,viewport:n,emits:o,userSelectionActive:a,removeSelectedElements:c,userSelectionRect:d,elementsSelectable:h,nodesSelectionActive:g,getSelectedEdges:B,getSelectedNodes:w,removeNodes:m,removeEdges:y,selectionMode:v,deleteKeyCode:I,multiSelectionKeyCode:L,multiSelectionActive:k,edgeLookup:V,nodeLookup:F,connectionLookup:M,defaultEdgeOptions:tA,connectionStartHandle:W,panOnDrag:aA}=ZA(),dA=(0,r.shallowRef)(null),rA=(0,r.shallowRef)(new Set),oA=(0,r.shallowRef)(new Set),AA=(0,r.shallowRef)(null),O=(0,r.toRef)(()=>h.value&&(e.isSelecting||a.value)),lA=(0,r.toRef)(()=>W.value!==null);let _=!1,Z=!1;const U=Sn(I,{actInsideInputWithModifier:!1}),x=Sn(L);(0,r.watch)(U,eA=>{eA&&(m(w.value),y(B.value),g.value=!1)}),(0,r.watch)(x,eA=>{k.value=eA});function G(eA,uA){return Y=>{Y.target===uA&&eA?.(Y)}}function R(eA){if(_||lA.value){_=!1;return}o.paneClick(eA),c(),g.value=!1}function $(eA){var uA;if(Array.isArray(aA.value)&&((uA=aA.value)!=null&&uA.includes(2))){eA.preventDefault();return}o.paneContextMenu(eA)}function J(eA){o.paneScroll(eA)}function nA(eA){var uA,Y,cA;if(AA.value=((uA=A.value)==null?void 0:uA.getBoundingClientRect())??null,!h.value||!e.isSelecting||eA.button!==0||eA.target!==dA.value||!AA.value)return;(cA=(Y=eA.target)==null?void 0:Y.setPointerCapture)==null||cA.call(Y,eA.pointerId);const{x:mA,y:yA}=np(eA,AA.value);Z=!0,_=!1,c(),d.value={width:0,height:0,startX:mA,startY:yA,x:mA,y:yA},o.selectionStart(eA)}function hA(eA){var uA;if(!AA.value||!d.value)return;_=!0;const{x:Y,y:cA}=We(eA,AA.value),{startX:mA=0,startY:yA=0}=d.value,IA={startX:mA,startY:yA,x:Y<mA?Y:mA,y:cA<yA?cA:yA,width:Math.abs(Y-mA),height:Math.abs(cA-yA)},fA=rA.value,vA=oA.value;rA.value=new Set(pa(t.value,IA,n.value,v.value===ni.Partial,!0).map(H=>H.id)),oA.value=new Set;const S=((uA=tA.value)==null?void 0:uA.selectable)??!0;for(const H of rA.value){const T=M.value.get(H);if(T)for(const{edgeId:D}of T.values()){const b=V.value.get(D);b&&(b.selectable??S)&&oA.value.add(D)}}if(!Ka(fA,rA.value)){const H=pt(F.value,rA.value,!0);o.nodesChange(H)}if(!Ka(vA,oA.value)){const H=pt(V.value,oA.value);o.edgesChange(H)}d.value=IA,a.value=!0,g.value=!1}function UA(eA){var uA;eA.button!==0||!Z||((uA=eA.target)==null||uA.releasePointerCapture(eA.pointerId),!a.value&&d.value&&eA.target===dA.value&&R(eA),a.value=!1,d.value=null,g.value=rA.value.size>0,o.selectionEnd(eA),e.selectionKeyPressed&&(_=!1),Z=!1)}return(eA,uA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"container",ref:dA,class:(0,r.normalizeClass)(["vue-flow__pane vue-flow__container",{selection:eA.isSelecting}]),onClick:uA[0]||(uA[0]=Y=>O.value?void 0:G(R,dA.value)(Y)),onContextmenu:uA[1]||(uA[1]=Y=>G($,dA.value)(Y)),onWheelPassive:uA[2]||(uA[2]=Y=>G(J,dA.value)(Y)),onPointerenter:uA[3]||(uA[3]=Y=>O.value?void 0:(0,r.unref)(o).paneMouseEnter(Y)),onPointerdown:uA[4]||(uA[4]=Y=>O.value?nA(Y):(0,r.unref)(o).paneMouseMove(Y)),onPointermove:uA[5]||(uA[5]=Y=>O.value?hA(Y):(0,r.unref)(o).paneMouseMove(Y)),onPointerup:uA[6]||(uA[6]=Y=>O.value?UA(Y):void 0),onPointerleave:uA[7]||(uA[7]=Y=>(0,r.unref)(o).paneMouseLeave(Y))},[(0,r.renderSlot)(eA.$slots,"default"),(0,r.unref)(a)&&(0,r.unref)(d)?((0,r.openBlock)(),(0,r.createBlock)(Ap,{key:0,"user-selection-rect":(0,r.unref)(d)},null,8,["user-selection-rect"])):(0,r.createCommentVNode)("",!0),(0,r.unref)(g)&&(0,r.unref)(w).length?((0,r.openBlock)(),(0,r.createBlock)(tp,{key:1})):(0,r.createCommentVNode)("",!0)],34))}}),op=(0,r.defineComponent)({name:"Transform",compatConfig:{MODE:3},setup(e){const{viewport:A,fitViewOnInit:t,fitViewOnInitDone:n}=ZA(),o=(0,r.computed)(()=>t.value?!n.value:!1),a=(0,r.computed)(()=>`translate(${A.value.x}px,${A.value.y}px) scale(${A.value.zoom})`);return(c,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vue-flow__transformationpane vue-flow__container",style:(0,r.normalizeStyle)({transform:a.value,opacity:o.value?0:void 0})},[(0,r.renderSlot)(c.$slots,"default")],4))}}),ip=(0,r.defineComponent)({name:"Viewport",compatConfig:{MODE:3},setup(e){const{minZoom:A,maxZoom:t,defaultViewport:n,translateExtent:o,zoomActivationKeyCode:a,selectionKeyCode:c,panActivationKeyCode:d,panOnScroll:h,panOnScrollMode:g,panOnScrollSpeed:B,panOnDrag:w,zoomOnDoubleClick:m,zoomOnPinch:y,zoomOnScroll:v,preventScrolling:I,noWheelClassName:L,noPanClassName:k,emits:V,connectionStartHandle:F,userSelectionActive:M,paneDragging:tA,d3Zoom:W,d3Selection:aA,d3ZoomHandler:dA,viewport:rA,viewportRef:oA,paneClickDistance:AA}=ZA();qB(oA);const O=(0,r.shallowRef)(!1),lA=(0,r.shallowRef)(!1);let _=null,Z=!1,U=0,x={x:0,y:0,zoom:0};const G=Sn(d),R=Sn(c),$=Sn(a),J=(0,r.toRef)(()=>(!R.value||R.value&&c.value===!0)&&(G.value||w.value)),nA=(0,r.toRef)(()=>G.value||h.value),hA=(0,r.toRef)(()=>c.value===!0&&J.value!==!0),UA=(0,r.toRef)(()=>R.value&&c.value!==!0||M.value||hA.value),eA=(0,r.toRef)(()=>F.value!==null);(0,r.onMounted)(()=>{if(!oA.value){Tn("Viewport element is missing");return}const yA=oA.value,IA=yA.getBoundingClientRect(),fA=Nh().clickDistance(AA.value).scaleExtent([A.value,t.value]).translateExtent(o.value),vA=ke(yA).call(fA),S=vA.on("wheel.zoom"),H=Jt.translate(n.value.x??0,n.value.y??0).scale(Nt(n.value.zoom??1,A.value,t.value)),T=[[0,0],[IA.width,IA.height]],D=fA.constrain()(H,T,o.value);fA.transform(vA,D),fA.wheelDelta(ya),W.value=fA,aA.value=vA,dA.value=S,rA.value={x:D.x,y:D.y,zoom:D.k},fA.on("start",b=>{var z;if(!b.sourceEvent)return null;U=b.sourceEvent.button,O.value=!0;const P=cA(b.transform);((z=b.sourceEvent)==null?void 0:z.type)==="mousedown"&&(tA.value=!0),x=P,V.viewportChangeStart(P),V.moveStart({event:b,flowTransform:P})}),fA.on("end",b=>{if(!b.sourceEvent)return null;if(O.value=!1,tA.value=!1,uA(J.value,U??0)&&!Z&&V.paneContextMenu(b.sourceEvent),Z=!1,Y(x,b.transform)){const z=cA(b.transform);x=z,V.viewportChangeEnd(z),V.moveEnd({event:b,flowTransform:z})}}),fA.filter(b=>{var z;const P=$.value||v.value,gA=y.value&&b.ctrlKey,iA=b.button,SA=b.type==="wheel";if(iA===1&&b.type==="mousedown"&&(mA(b,"vue-flow__node")||mA(b,"vue-flow__edge")))return!0;if(!J.value&&!P&&!nA.value&&!m.value&&!y.value||M.value||eA.value&&!SA||!m.value&&b.type==="dblclick"||mA(b,L.value)&&SA||mA(b,k.value)&&(!SA||nA.value&&SA&&!$.value)||!y.value&&b.ctrlKey&&SA||!P&&!nA.value&&!gA&&SA)return!1;if(!y&&b.type==="touchstart"&&((z=b.touches)==null?void 0:z.length)>1)return b.preventDefault(),!1;if(!J.value&&(b.type==="mousedown"||b.type==="touchstart")||hA.value&&Array.isArray(w.value)&&w.value.includes(0)&&iA===0||Array.isArray(w.value)&&!w.value.includes(iA)&&(b.type==="mousedown"||b.type==="touchstart"))return!1;const xA=Array.isArray(w.value)&&w.value.includes(iA)||c.value===!0&&Array.isArray(w.value)&&!w.value.includes(0)||!iA||iA<=1;return(!b.ctrlKey||G.value||SA)&&xA}),(0,r.watch)([M,J],()=>{M.value&&!O.value?fA.on("zoom",null):M.value||fA.on("zoom",b=>{rA.value={x:b.transform.x,y:b.transform.y,zoom:b.transform.k};const z=cA(b.transform);Z=uA(J.value,U??0),V.viewportChange(z),V.move({event:b,flowTransform:z})})},{immediate:!0}),(0,r.watch)([M,nA,g,$,y,I,L],()=>{nA.value&&!$.value&&!M.value?vA.on("wheel.zoom",b=>{if(mA(b,L.value))return!1;const z=$.value||v.value,P=y.value&&b.ctrlKey;if(!(!I.value||nA.value||z||P))return!1;b.preventDefault(),b.stopImmediatePropagation();const gA=vA.property("__zoom").k||1,iA=br();if(!G.value&&b.ctrlKey&&y.value&&iA){const YA=Ge(b),PA=gA*2**ya(b);fA.scaleTo(vA,PA,YA,b);return}const SA=b.deltaMode===1?20:1;let xA=g.value===_n.Vertical?0:b.deltaX*SA,KA=g.value===_n.Horizontal?0:b.deltaY*SA;!iA&&b.shiftKey&&g.value!==_n.Vertical&&!xA&&KA&&(xA=KA,KA=0),fA.translateBy(vA,-(xA/gA)*B.value,-(KA/gA)*B.value);const ne=cA(vA.property("__zoom"));_&&clearTimeout(_),lA.value?(V.move({event:b,flowTransform:ne}),V.viewportChange(ne),_=setTimeout(()=>{V.moveEnd({event:b,flowTransform:ne}),V.viewportChangeEnd(ne),lA.value=!1},150)):(lA.value=!0,V.moveStart({event:b,flowTransform:ne}),V.viewportChangeStart(ne))},{passive:!1}):typeof S<"u"&&vA.on("wheel.zoom",function(b,z){const P=!I.value&&b.type==="wheel"&&!b.ctrlKey,gA=$.value||v.value,iA=y.value&&b.ctrlKey;if(!gA&&!h.value&&!iA&&b.type==="wheel"||P||mA(b,L.value))return null;b.preventDefault(),S.call(this,b,z)},{passive:!1})},{immediate:!0})});function uA(yA,IA){return IA===2&&Array.isArray(yA)&&yA.includes(2)}function Y(yA,IA){return yA.x!==IA.x&&!Number.isNaN(IA.x)||yA.y!==IA.y&&!Number.isNaN(IA.y)||yA.zoom!==IA.k&&!Number.isNaN(IA.k)}function cA(yA){return{x:yA.x,y:yA.y,zoom:yA.k}}function mA(yA,IA){return yA.target.closest(`.${IA}`)}return(yA,IA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"viewportRef",ref:oA,class:"vue-flow__viewport vue-flow__container"},[(0,r.createVNode)(rp,{"is-selecting":UA.value,"selection-key-pressed":(0,r.unref)(R),class:(0,r.normalizeClass)({connecting:eA.value,dragging:(0,r.unref)(tA),draggable:(0,r.unref)(w)===!0||Array.isArray((0,r.unref)(w))&&(0,r.unref)(w).includes(0)})},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(op,null,{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(yA.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),sp=["id"],ap=["id"],lp=["id"],cp=(0,r.defineComponent)({name:"A11yDescriptions",compatConfig:{MODE:3},setup(e){const{id:A,disableKeyboardA11y:t,ariaLiveMessage:n}=ZA();return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createElementVNode)("div",{id:`${(0,r.unref)(sa)}-${(0,r.unref)(A)}`,style:{display:"none"}}," Press enter or space to select a node. "+(0,r.toDisplayString)((0,r.unref)(t)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,sp),(0,r.createElementVNode)("div",{id:`${(0,r.unref)(aa)}-${(0,r.unref)(A)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,ap),(0,r.unref)(t)?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,id:`${(0,r.unref)(Kh)}-${(0,r.unref)(A)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},(0,r.toDisplayString)((0,r.unref)(n)),9,lp))],64))}});function up(){const e=ZA();(0,r.watch)(()=>e.viewportHelper.value.viewportInitialized,A=>{A&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function dp(e,A,t){return t===HA.Left?e-A:t===HA.Right?e+A:e}function fp(e,A,t){return t===HA.Top?e-A:t===HA.Bottom?e+A:e}var pi=function({radius:e=10,centerX:A=0,centerY:t=0,position:n=HA.Top,type:o}){return(0,r.h)("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:dp(A,e,n),cy:fp(t,e,n),r:e,stroke:"transparent",fill:"transparent"})};pi.props=["radius","centerX","centerY","position","type"],pi.compatConfig={MODE:3};var nl=pi,gp=(0,r.defineComponent)({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:A,addSelectedEdges:t,connectionMode:n,edgeUpdaterRadius:o,emits:a,nodesSelectionActive:c,noPanClassName:d,getEdgeTypes:h,removeSelectedEdges:g,findEdge:B,findNode:w,isValidConnection:m,multiSelectionActive:y,disableKeyboardA11y:v,elementsSelectable:I,edgesUpdatable:L,edgesFocusable:k,hooks:V}=ZA(),F=(0,r.computed)(()=>B(e.id)),{emit:M,on:tA}=pB(F.value,a),W=(0,r.inject)(Hr),aA=(0,r.getCurrentInstance)(),dA=(0,r.ref)(!1),rA=(0,r.ref)(!1),oA=(0,r.ref)(""),AA=(0,r.ref)(null),O=(0,r.ref)("source"),lA=(0,r.ref)(null),_=(0,r.toRef)(()=>typeof F.value.selectable>"u"?I.value:F.value.selectable),Z=(0,r.toRef)(()=>typeof F.value.updatable>"u"?L.value:F.value.updatable),U=(0,r.toRef)(()=>typeof F.value.focusable>"u"?k.value:F.value.focusable);(0,r.provide)(gB,e.id),(0,r.provide)(hB,lA);const x=(0,r.computed)(()=>F.value.class instanceof Function?F.value.class(F.value):F.value.class),G=(0,r.computed)(()=>F.value.style instanceof Function?F.value.style(F.value):F.value.style),R=(0,r.computed)(()=>{const H=F.value.type||"default",T=W?.[`edge-${H}`];if(T)return T;let D=F.value.template??h.value[H];if(typeof D=="string"&&aA){const b=Object.keys(aA.appContext.components);b&&b.includes(H)&&(D=(0,r.resolveComponent)(H,!1))}return D&&typeof D!="string"?D:(a.error(new de(ae.EDGE_TYPE_MISSING,D)),!1)}),{handlePointerDown:$}=za({nodeId:oA,handleId:AA,type:O,isValidConnection:m,edgeUpdaterType:O,onEdgeUpdate:hA,onEdgeUpdateEnd:UA});return()=>{const H=w(F.value.source),T=w(F.value.target),D="pathOptions"in F.value?F.value.pathOptions:{};if(!H&&!T)return a.error(new de(ae.EDGE_SOURCE_TARGET_MISSING,F.value.id,F.value.source,F.value.target)),null;if(!H)return a.error(new de(ae.EDGE_SOURCE_MISSING,F.value.id,F.value.source)),null;if(!T)return a.error(new de(ae.EDGE_TARGET_MISSING,F.value.id,F.value.target)),null;if(!F.value||F.value.hidden||H.hidden||T.hidden)return null;let b;n.value===nt.Strict?b=H.handleBounds.source:b=[...H.handleBounds.source||[],...H.handleBounds.target||[]];const z=Sa(b,F.value.sourceHandle);let P;n.value===nt.Strict?P=T.handleBounds.target:P=[...T.handleBounds.target||[],...T.handleBounds.source||[]];const gA=Sa(P,F.value.targetHandle),iA=z?.position||HA.Bottom,SA=gA?.position||HA.Top,{x:xA,y:KA}=qt(H,z,iA),{x:ne,y:YA}=qt(T,gA,SA);return F.value.sourceX=xA,F.value.sourceY=KA,F.value.targetX=ne,F.value.targetY=YA,(0,r.h)("g",{ref:lA,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${R.value===!1?"default":F.value.type||"default"}`,d.value,x.value,{updating:dA.value,selected:F.value.selected,animated:F.value.animated,inactive:!_.value&&!V.value.edgeClick.hasListeners()}],tabIndex:U.value?0:void 0,"aria-label":F.value.ariaLabel===null?void 0:F.value.ariaLabel??`Edge from ${F.value.source} to ${F.value.target}`,"aria-describedby":U.value?`${aa}-${A}`:void 0,"aria-roledescription":"edge",role:U.value?"group":"img",...F.value.domAttributes,onClick:uA,onContextmenu:Y,onDblclick:cA,onMouseenter:mA,onMousemove:yA,onMouseleave:IA,onKeyDown:U.value?S:void 0},[rA.value?null:(0,r.h)(R.value===!1?h.value.default:R.value,{id:e.id,sourceNode:H,targetNode:T,source:F.value.source,target:F.value.target,type:F.value.type,updatable:Z.value,selected:F.value.selected,animated:F.value.animated,label:F.value.label,labelStyle:F.value.labelStyle,labelShowBg:F.value.labelShowBg,labelBgStyle:F.value.labelBgStyle,labelBgPadding:F.value.labelBgPadding,labelBgBorderRadius:F.value.labelBgBorderRadius,data:F.value.data,events:{...F.value.events,...tA},style:G.value,markerStart:`url('#${Ln(F.value.markerStart,A)}')`,markerEnd:`url('#${Ln(F.value.markerEnd,A)}')`,sourcePosition:iA,targetPosition:SA,sourceX:xA,sourceY:KA,targetX:ne,targetY:YA,sourceHandleId:F.value.sourceHandle,targetHandleId:F.value.targetHandle,interactionWidth:F.value.interactionWidth,...D}),[Z.value==="source"||Z.value===!0?[(0,r.h)("g",{onMousedown:fA,onMouseenter:J,onMouseout:nA},(0,r.h)(nl,{position:iA,centerX:xA,centerY:KA,radius:o.value,type:"source","data-type":"source"}))]:null,Z.value==="target"||Z.value===!0?[(0,r.h)("g",{onMousedown:vA,onMouseenter:J,onMouseout:nA},(0,r.h)(nl,{position:SA,centerX:ne,centerY:YA,radius:o.value,type:"target","data-type":"target"}))]:null]])};function J(){dA.value=!0}function nA(){dA.value=!1}function hA(H,T){M.update({event:H,edge:F.value,connection:T})}function UA(H){M.updateEnd({event:H,edge:F.value}),rA.value=!1}function eA(H,T){H.button===0&&(rA.value=!0,oA.value=T?F.value.target:F.value.source,AA.value=(T?F.value.targetHandle:F.value.sourceHandle)??null,O.value=T?"target":"source",M.updateStart({event:H,edge:F.value}),$(H))}function uA(H){var T;const D={event:H,edge:F.value};_.value&&(c.value=!1,F.value.selected&&y.value?(g([F.value]),(T=lA.value)==null||T.blur()):t([F.value])),M.click(D)}function Y(H){M.contextMenu({event:H,edge:F.value})}function cA(H){M.doubleClick({event:H,edge:F.value})}function mA(H){M.mouseEnter({event:H,edge:F.value})}function yA(H){M.mouseMove({event:H,edge:F.value})}function IA(H){M.mouseLeave({event:H,edge:F.value})}function fA(H){eA(H,!0)}function vA(H){eA(H,!1)}function S(H){var T;!v.value&&la.includes(H.key)&&_.value&&(H.key==="Escape"?((T=lA.value)==null||T.blur(),g([B(e.id)])):t([B(e.id)]))}}}),hp=(0,r.defineComponent)({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:A,connectionMode:t,connectionStartHandle:n,connectionEndHandle:o,connectionPosition:a,connectionLineType:c,connectionLineStyle:d,connectionLineOptions:h,connectionStatus:g,viewport:B,findNode:w}=ZA(),m=(e=(0,r.inject)(Hr))==null?void 0:e["connection-line"],y=(0,r.computed)(()=>{var V;return w((V=n.value)==null?void 0:V.nodeId)}),v=(0,r.computed)(()=>{var V;return w((V=o.value)==null?void 0:V.nodeId)??null}),I=(0,r.computed)(()=>({x:(a.value.x-B.value.x)/B.value.zoom,y:(a.value.y-B.value.y)/B.value.zoom})),L=(0,r.computed)(()=>h.value.markerStart?`url(#${Ln(h.value.markerStart,A)})`:""),k=(0,r.computed)(()=>h.value.markerEnd?`url(#${Ln(h.value.markerEnd,A)})`:"");return()=>{var V,F,M;if(!y.value||!n.value)return null;const tA=n.value.id,W=n.value.type,aA=y.value.handleBounds;let dA=aA?.[W]??[];if(t.value===nt.Loose){const G=aA?.[W==="source"?"target":"source"]??[];dA=[...dA,...G]}if(!dA)return null;const rA=(tA?dA.find(G=>G.id===tA):dA[0])??null,oA=rA?.position??HA.Top,{x:AA,y:O}=qt(y.value,rA,oA);let lA=null;v.value&&(t.value===nt.Strict?lA=((V=v.value.handleBounds[W==="source"?"target":"source"])==null?void 0:V.find(G=>{var R;return G.id===((R=o.value)==null?void 0:R.id)}))||null:lA=((F=[...v.value.handleBounds.source??[],...v.value.handleBounds.target??[]])==null?void 0:F.find(G=>{var R;return G.id===((R=o.value)==null?void 0:R.id)}))||null);const _=((M=o.value)==null?void 0:M.position)??(oA?ci[oA]:null);if(!oA||!_)return null;const Z=c.value??h.value.type??Dt.Bezier;let U="";const x={sourceX:AA,sourceY:O,sourcePosition:oA,targetX:I.value.x,targetY:I.value.y,targetPosition:_};return Z===Dt.Bezier?[U]=hi(x):Z===Dt.Step?[U]=Bi({...x,borderRadius:0}):Z===Dt.SmoothStep?[U]=Bi(x):Z===Dt.SimpleBezier?[U]=qa(x):U=`M${AA},${O} ${I.value.x},${I.value.y}`,(0,r.h)("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},(0,r.h)("g",{class:"vue-flow__connection"},m?(0,r.h)(m,{sourceX:AA,sourceY:O,sourcePosition:oA,targetX:I.value.x,targetY:I.value.y,targetPosition:_,sourceNode:y.value,sourceHandle:rA,targetNode:v.value,targetHandle:lA,markerEnd:k.value,markerStart:L.value,connectionStatus:g.value}):(0,r.h)("path",{d:U,class:[h.value.class,g.value,"vue-flow__connection-path"],style:{...d.value,...h.value.style},"marker-end":k.value,"marker-start":L.value})))}}}),Bp=["id","markerWidth","markerHeight","markerUnits","orient"],pp=(0,r.defineComponent)({name:"MarkerType",compatConfig:{MODE:3},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("marker",{id:A.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${A.width}`,markerHeight:`${A.height}`,markerUnits:A.markerUnits,orient:A.orient},[A.type===(0,r.unref)(rt).ArrowClosed?((0,r.openBlock)(),(0,r.createElementBlock)("polyline",{key:0,style:(0,r.normalizeStyle)({stroke:A.color,fill:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):(0,r.createCommentVNode)("",!0),A.type===(0,r.unref)(rt).Arrow?((0,r.openBlock)(),(0,r.createElementBlock)("polyline",{key:1,style:(0,r.normalizeStyle)({stroke:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):(0,r.createCommentVNode)("",!0)],8,Bp))}}),mp={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},wp=(0,r.defineComponent)({name:"MarkerDefinitions",compatConfig:{MODE:3},setup(e){const{id:A,edges:t,connectionLineOptions:n,defaultMarkerColor:o}=ZA(),a=(0,r.computed)(()=>{const c=new Set,d=[],h=g=>{if(g){const B=Ln(g,A);c.has(B)||(typeof g=="object"?d.push({...g,id:B,color:g.color||o.value}):d.push({id:B,color:o.value,type:g}),c.add(B))}};for(const g of[n.value.markerEnd,n.value.markerStart])h(g);for(const g of t.value)for(const B of[g.markerStart,g.markerEnd])h(B);return d.sort((g,B)=>g.id.localeCompare(B.id))});return(c,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",mp,[(0,r.createElementVNode)("defs",null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(a.value,h=>((0,r.openBlock)(),(0,r.createBlock)(pp,{id:h.id,key:h.id,type:h.type,color:h.color,width:h.width,height:h.height,markerUnits:h.markerUnits,"stroke-width":h.strokeWidth,orient:h.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),Cp=(0,r.defineComponent)({name:"Edges",compatConfig:{MODE:3},setup(e){const{findNode:A,getEdges:t,elevateEdgesOnSelect:n}=ZA();return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)(wp),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(t),c=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{key:c.id,class:"vue-flow__edges vue-flow__container",style:(0,r.normalizeStyle)({zIndex:(0,r.unref)(tB)(c,(0,r.unref)(A),(0,r.unref)(n))})},[(0,r.createVNode)((0,r.unref)(gp),{id:c.id},null,8,["id"])],4))),128)),(0,r.createVNode)((0,r.unref)(hp))],64))}}),yp=(0,r.defineComponent)({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:A,noPanClassName:t,selectNodesOnDrag:n,nodesSelectionActive:o,multiSelectionActive:a,emits:c,removeSelectedNodes:d,addSelectedNodes:h,updateNodeDimensions:g,onUpdateNodeInternals:B,getNodeTypes:w,nodeExtent:m,elevateNodesOnSelect:y,disableKeyboardA11y:v,ariaLiveMessage:I,snapToGrid:L,snapGrid:k,nodeDragThreshold:V,nodesDraggable:F,elementsSelectable:M,nodesConnectable:tA,nodesFocusable:W,hooks:aA}=ZA(),dA=(0,r.ref)(null);(0,r.provide)(Pa,dA),(0,r.provide)(Va,e.id);const rA=(0,r.inject)(Hr),oA=(0,r.getCurrentInstance)(),AA=Xa(),{node:O,parentNode:lA}=$a(e.id),{emit:_,on:Z}=yB(O,c),U=(0,r.toRef)(()=>typeof O.draggable>"u"?F.value:O.draggable),x=(0,r.toRef)(()=>typeof O.selectable>"u"?M.value:O.selectable),G=(0,r.toRef)(()=>typeof O.connectable>"u"?tA.value:O.connectable),R=(0,r.toRef)(()=>typeof O.focusable>"u"?W.value:O.focusable),$=(0,r.computed)(()=>x.value||U.value||aA.value.nodeClick.hasListeners()||aA.value.nodeDoubleClick.hasListeners()||aA.value.nodeMouseEnter.hasListeners()||aA.value.nodeMouseMove.hasListeners()||aA.value.nodeMouseLeave.hasListeners()),J=(0,r.toRef)(()=>!!O.dimensions.width&&!!O.dimensions.height),nA=(0,r.computed)(()=>{const T=O.type||"default",D=rA?.[`node-${T}`];if(D)return D;let b=O.template||w.value[T];if(typeof b=="string"&&oA){const z=Object.keys(oA.appContext.components);z&&z.includes(T)&&(b=(0,r.resolveComponent)(T,!1))}return b&&typeof b!="string"?b:(c.error(new de(ae.NODE_TYPE_MISSING,b)),!1)}),hA=Ga({id:e.id,el:dA,disabled:()=>!U.value,selectable:x,dragHandle:()=>O.dragHandle,onStart(T){_.dragStart(T)},onDrag(T){_.drag(T)},onStop(T){_.dragStop(T)},onClick(T){S(T)}}),UA=(0,r.computed)(()=>O.class instanceof Function?O.class(O):O.class),eA=(0,r.computed)(()=>{const T=(O.style instanceof Function?O.style(O):O.style)||{},D=O.width instanceof Function?O.width(O):O.width,b=O.height instanceof Function?O.height(O):O.height;return!T.width&&D&&(T.width=typeof D=="string"?D:`${D}px`),!T.height&&b&&(T.height=typeof b=="string"?b:`${b}px`),T}),uA=(0,r.toRef)(()=>Number(O.zIndex??eA.value.zIndex??0));return B(T=>{(T.includes(e.id)||!T.length)&&cA()}),(0,r.onMounted)(()=>{(0,r.watch)(()=>O.hidden,(T=!1,D,b)=>{!T&&dA.value&&(e.resizeObserver.observe(dA.value),b(()=>{dA.value&&e.resizeObserver.unobserve(dA.value)}))},{immediate:!0,flush:"post"})}),(0,r.watch)([()=>O.type,()=>O.sourcePosition,()=>O.targetPosition],()=>{(0,r.nextTick)(()=>{g([{id:e.id,nodeElement:dA.value,forceUpdate:!0}])})}),(0,r.watch)([()=>O.position.x,()=>O.position.y,()=>{var T;return(T=lA.value)==null?void 0:T.computedPosition.x},()=>{var T;return(T=lA.value)==null?void 0:T.computedPosition.y},()=>{var T;return(T=lA.value)==null?void 0:T.computedPosition.z},uA,()=>O.selected,()=>O.dimensions.height,()=>O.dimensions.width,()=>{var T;return(T=lA.value)==null?void 0:T.dimensions.height},()=>{var T;return(T=lA.value)==null?void 0:T.dimensions.width}],([T,D,b,z,P,gA])=>{const iA={x:T,y:D,z:gA+(y.value&&O.selected?1e3:0)};typeof b<"u"&&typeof z<"u"?O.computedPosition=Jh({x:b,y:z,z:P},iA):O.computedPosition=iA},{flush:"post",immediate:!0}),(0,r.watch)([()=>O.extent,m],([T,D],[b,z])=>{(T!==b||D!==z)&&Y()}),O.extent==="parent"||typeof O.extent=="object"&&"range"in O.extent&&O.extent.range==="parent"?To(()=>J).toBe(!0).then(Y):Y(),()=>O.hidden?null:(0,r.h)("div",{ref:dA,"data-id":O.id,class:["vue-flow__node",`vue-flow__node-${nA.value===!1?"default":O.type||"default"}`,{[t.value]:U.value,dragging:hA?.value,draggable:U.value,selected:O.selected,selectable:x.value,parent:O.isParent},UA.value],style:{visibility:J.value?"visible":"hidden",zIndex:O.computedPosition.z??uA.value,transform:`translate(${O.computedPosition.x}px,${O.computedPosition.y}px)`,pointerEvents:$.value?"all":"none",...eA.value},tabIndex:R.value?0:void 0,role:R.value?"group":void 0,"aria-describedby":v.value?void 0:`${sa}-${A}`,"aria-label":O.ariaLabel,"aria-roledescription":"node",...O.domAttributes,onMouseenter:mA,onMousemove:yA,onMouseleave:IA,onContextmenu:fA,onClick:S,onDblclick:vA,onKeydown:H},[(0,r.h)(nA.value===!1?w.value.default:nA.value,{id:O.id,type:O.type,data:O.data,events:{...O.events,...Z},selected:O.selected,resizing:O.resizing,dragging:hA.value,connectable:G.value,position:O.computedPosition,dimensions:O.dimensions,isValidTargetPos:O.isValidTargetPos,isValidSourcePos:O.isValidSourcePos,parent:O.parentNode,parentNodeId:O.parentNode,zIndex:O.computedPosition.z??uA.value,targetPosition:O.targetPosition,sourcePosition:O.sourcePosition,label:O.label,dragHandle:O.dragHandle,onUpdateNodeInternals:cA})]);function Y(){const T=O.computedPosition,{computedPosition:D,position:b}=si(O,L.value?Ir(T,k.value):T,c.error,m.value,lA.value);(O.computedPosition.x!==D.x||O.computedPosition.y!==D.y)&&(O.computedPosition={...O.computedPosition,...D}),(O.position.x!==b.x||O.position.y!==b.y)&&(O.position=b)}function cA(){dA.value&&g([{id:e.id,nodeElement:dA.value,forceUpdate:!0}])}function mA(T){hA?.value||_.mouseEnter({event:T,node:O})}function yA(T){hA?.value||_.mouseMove({event:T,node:O})}function IA(T){hA?.value||_.mouseLeave({event:T,node:O})}function fA(T){return _.contextMenu({event:T,node:O})}function vA(T){return _.doubleClick({event:T,node:O})}function S(T){x.value&&(!n.value||!U.value||V.value>0)&&ui(O,a.value,h,d,o,!1,dA.value),_.click({event:T,node:O})}function H(T){if(!(ri(T)||v.value))if(la.includes(T.key)&&x.value){const D=T.key==="Escape";ui(O,a.value,h,d,o,D,dA.value)}else U.value&&O.selected&&Zt[T.key]&&(T.preventDefault(),I.value=`Moved selected node ${T.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~O.position.x}, y: ${~~O.position.y}`,AA({x:Zt[T.key].x,y:Zt[T.key].y},T.shiftKey))}}}),vp={height:"0",width:"0"},Qp=(0,r.defineComponent)({name:"EdgeLabelRenderer",compatConfig:{MODE:3},setup(e){const{viewportRef:A}=ZA(),t=(0,r.toRef)(()=>{var n;return(n=A.value)==null?void 0:n.getElementsByClassName("vue-flow__edge-labels")[0]});return(n,o)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",null,[((0,r.openBlock)(),(0,r.createElementBlock)("foreignObject",vp,[((0,r.openBlock)(),(0,r.createBlock)(r.Teleport,{to:t.value,disabled:!t.value},[(0,r.renderSlot)(n.$slots,"default")],8,["to","disabled"]))]))]))}});function Ep(e={includeHiddenNodes:!1}){const{nodes:A}=ZA();return(0,r.computed)(()=>{if(A.value.length===0)return!1;for(const t of A.value)if((e.includeHiddenNodes||!t.hidden)&&(t?.handleBounds===void 0||t.dimensions.width===0||t.dimensions.height===0))return!1;return!0})}var Fp={class:"vue-flow__nodes vue-flow__container"},Up=(0,r.defineComponent)({name:"Nodes",compatConfig:{MODE:3},setup(e){const{getNodes:A,updateNodeDimensions:t,emits:n}=ZA(),o=Ep(),a=(0,r.ref)();return(0,r.watch)(o,c=>{c&&(0,r.nextTick)(()=>{n.nodesInitialized(A.value)})},{immediate:!0}),(0,r.onMounted)(()=>{a.value=new ResizeObserver(c=>{const d=c.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));(0,r.nextTick)(()=>t(d))})}),(0,r.onBeforeUnmount)(()=>{var c;return(c=a.value)==null?void 0:c.disconnect()}),(c,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",Fp,[a.value?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)((0,r.unref)(A),(h,g,B,w)=>{const m=[h.id];if(w&&w.key===h.id&&(0,r.isMemoSame)(w,m))return w;const y=((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(yp),{id:h.id,key:h.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return y.memo=m,y},d,0),128)):(0,r.createCommentVNode)("",!0)]))}});function bp(){const{emits:e}=ZA();(0,r.onMounted)(()=>{if(Ta()){const A=document.querySelector(".vue-flow__pane");A&&window.getComputedStyle(A).zIndex!=="1"&&e.error(new de(ae.MISSING_STYLES))}})}var Ip=(0,r.createElementVNode)("div",{class:"vue-flow__edge-labels"},null,-1),Hp=(0,r.defineComponent)({name:"VueFlow",compatConfig:{MODE:3},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:A,emit:t}){const n=e,o=(0,r.useSlots)(),a=ko(n,"modelValue",t),c=ko(n,"nodes",t),d=ko(n,"edges",t),h=ZA(n),g=FB({modelValue:a,nodes:c,edges:d},n,h);return bB(t,h.hooks),up(),bp(),(0,r.provide)(Hr,o),(0,r.onUnmounted)(g),A(h),(B,w)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref:(0,r.unref)(h).vueFlowRef,class:"vue-flow"},[(0,r.createVNode)(ip,null,{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Cp),Ip,(0,r.createVNode)(Up),(0,r.renderSlot)(B.$slots,"zoom-pane")]),_:3}),(0,r.renderSlot)(B.$slots,"default"),(0,r.createVNode)(cp)],512))}}),_p=(0,r.defineComponent)({name:"Panel",compatConfig:{MODE:3},props:{position:{}},setup(e){const A=e,{userSelectionActive:t}=ZA(),n=(0,r.computed)(()=>`${A.position}`.split("-"));return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["vue-flow__panel",n.value]),style:(0,r.normalizeStyle)({pointerEvents:(0,r.unref)(t)?"none":"all"})},[(0,r.renderSlot)(o.$slots,"default")],6))}}),ot=(e=>(e.Lines="lines",e.Dots="dots",e))(ot||{}),Sp=function({dimensions:e,size:A,color:t}){return(0,r.h)("path",{stroke:t,"stroke-width":A,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},xp=function({radius:e,color:A}){return(0,r.h)("circle",{cx:e,cy:e,r:e,fill:A})};ot.Lines,ot.Dots;var Dp={[ot.Dots]:"#81818a",[ot.Lines]:"#eee"},Np=["id","x","y","width","height","patternTransform"],Lp={key:2,height:"100",width:"100"},Tp=["fill"],kp=["x","y","fill"],Mp=(0,r.defineComponent)({name:"Background",compatConfig:{MODE:3},props:{id:{},variant:{default:()=>ot.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:A,viewport:t}=ZA(),n=(0,r.computed)(()=>{const c=t.value.zoom,[d,h]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],g=[d*c||1,h*c||1],B=e.size*c,[w,m]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset];return{scaledGap:g,offset:[w*c||1+g[0]/2,m*c||1+g[1]/2],size:B}}),o=(0,r.toRef)(()=>`pattern-${A}${e.id?`-${e.id}`:""}`),a=(0,r.toRef)(()=>e.color||e.patternColor||Dp[e.variant||ot.Dots]);return(c,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{class:"vue-flow__background vue-flow__container",style:(0,r.normalizeStyle)({height:`${c.height>100?100:c.height}%`,width:`${c.width>100?100:c.width}%`})},[(0,r.renderSlot)(c.$slots,"pattern-container",{id:o.value},()=>[(0,r.createElementVNode)("pattern",{id:o.value,x:(0,r.unref)(t).x%n.value.scaledGap[0],y:(0,r.unref)(t).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[(0,r.renderSlot)(c.$slots,"pattern",{},()=>[c.variant===(0,r.unref)(ot).Lines?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Sp),{key:0,size:c.lineWidth,color:a.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):c.variant===(0,r.unref)(ot).Dots?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(xp),{key:1,color:a.value,radius:n.value.size/2},null,8,["color","radius"])):(0,r.createCommentVNode)("",!0),c.bgColor?((0,r.openBlock)(),(0,r.createElementBlock)("svg",Lp,[(0,r.createElementVNode)("rect",{width:"100%",height:"100%",fill:c.bgColor},null,8,Tp)])):(0,r.createCommentVNode)("",!0)])],8,Np)]),(0,r.createElementVNode)("rect",{x:c.x,y:c.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,kp),(0,r.renderSlot)(c.$slots,"default",{id:o.value})],4))}}),Op={name:"ControlButton",compatConfig:{MODE:3}},Kp=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Rp={type:"button",class:"vue-flow__controls-button"};function Vp(e,A,t,n,o,a){return(0,r.openBlock)(),(0,r.createElementBlock)("button",Rp,[(0,r.renderSlot)(e.$slots,"default")])}var Tr=Kp(Op,[["render",Vp]]),Pp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Gp=[(0,r.createElementVNode)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function zp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Pp,Gp)}var $p={render:zp},Xp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Wp=[(0,r.createElementVNode)("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Yp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Xp,Wp)}var Jp={render:Yp},Zp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},jp=[(0,r.createElementVNode)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function qp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Zp,jp)}var Am={render:qp},em={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},tm=[(0,r.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function nm(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",em,tm)}var rm={render:nm},om={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},im=[(0,r.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function sm(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",om,im)}var am={render:sm},lm=(0,r.defineComponent)({name:"Controls",compatConfig:{MODE:3},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>oa.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:A}){const{nodesDraggable:t,nodesConnectable:n,elementsSelectable:o,setInteractive:a,zoomIn:c,zoomOut:d,fitView:h,viewport:g,minZoom:B,maxZoom:w}=ZA(),m=(0,r.toRef)(()=>t.value||n.value||o.value),y=(0,r.toRef)(()=>g.value.zoom<=B.value),v=(0,r.toRef)(()=>g.value.zoom>=w.value);function I(){c(),A("zoomIn")}function L(){d(),A("zoomOut")}function k(){h(e.fitViewParams),A("fitView")}function V(){a(!m.value),A("interactionChange",!m.value)}return(F,M)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(_p),{class:"vue-flow__controls",position:F.position},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(F.$slots,"top"),F.showZoom?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.renderSlot)(F.$slots,"control-zoom-in",{},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-zoomin",disabled:v.value,onClick:I},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(F.$slots,"icon-zoom-in",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)($p))))])]),_:3},8,["disabled"])]),(0,r.renderSlot)(F.$slots,"control-zoom-out",{},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-zoomout",disabled:y.value,onClick:L},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(F.$slots,"icon-zoom-out",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Jp))))])]),_:3},8,["disabled"])])],64)):(0,r.createCommentVNode)("",!0),F.showFitView?(0,r.renderSlot)(F.$slots,"control-fit-view",{key:1},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-fitview",onClick:k},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(F.$slots,"icon-fit-view",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Am))))])]),_:3})]):(0,r.createCommentVNode)("",!0),F.showInteractive?(0,r.renderSlot)(F.$slots,"control-interactive",{key:2},()=>[F.showInteractive?((0,r.openBlock)(),(0,r.createBlock)(Tr,{key:0,class:"vue-flow__controls-interactive",onClick:V},{default:(0,r.withCtx)(()=>[m.value?(0,r.renderSlot)(F.$slots,"icon-unlock",{key:0},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(am))))]):(0,r.createCommentVNode)("",!0),m.value?(0,r.createCommentVNode)("",!0):(0,r.renderSlot)(F.$slots,"icon-lock",{key:1},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(rm))))])]),_:3})):(0,r.createCommentVNode)("",!0)]):(0,r.createCommentVNode)("",!0),(0,r.renderSlot)(F.$slots,"default")]),_:3},8,["position"]))}}),cm=["onClick"],um={class:"d-flow-node-menus-item-name"},dm=(0,r.defineComponent)({name:"DNodeMenus",__name:"nodeMenus",props:{fromNodeId:{},handleId:{}},emits:["addNode"],setup(e,{emit:A}){const t=e,n=A,o=(0,r.inject)("d_flow_design_provide",{}),a=o.getFlowComponents?.()||[],c=d=>{n("addNode",d.type),(0,r.nextTick)(()=>{t.handleId==="line"?o.addNodeByLine?.(d.type,t.fromNodeId||""):o.addNode?.(d.type,t.fromNodeId||"",t.handleId||"")})};return(d,h)=>{const g=(0,r.resolveComponent)("j-icon");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-flow-node-menus",onClick:(0,r.withModifiers)(()=>{},["stop"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(a),(B,w)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:w,class:"d-flow-node-menus-item",onClick:m=>c(B)},[(0,r.createElementVNode)("div",{class:"d-flow-node-menus-item-icon",style:(0,r.normalizeStyle)({backgroundColor:B.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(g,{icon:B.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",um,(0,r.toDisplayString)(B.name),1)],8,cm))),128))])}}}),mi=dm,fm={class:"d-flow-step-name"},gm={key:0,style:{color:"var(--j-color-text-2)"}},hm={style:{color:"var(--j-color-text)"}},Bm=(0,r.defineComponent)({name:"DStepNode",__name:"stepNode",props:{id:{},data:{}},setup(e){const A=e,{onNodeClick:t,onEdgeClick:n,onMoveStart:o,onConnectStart:a,onNodeDragStart:c,removeNodes:d,getEdges:h,getNodes:g,onNodesChange:B}=ZA(),w=(0,r.inject)("d_flow_design_provide",{}),m=(0,r.computed)(()=>w.getFlowComponentMap?.value?.[A.data.type]||{}),y=()=>{d(A.id),w.onRemoveNode?.(A.id)},v=(0,r.ref)({});B(lA=>{if(A.data.isInit&&lA.findIndex(_=>_.type==="select"&&_.id===A.id&&_.id==="start"&&_.selected)!==-1){const _=g.value.find(Z=>Z.id==="start");_&&(_.data.isInit=!1),v.value.s1=!0}});const I=(0,r.ref)(!1),L=lA=>{lA.indexOf("t")!==-1&&!k.value||(I.value=!0,v.value[lA]=!0)},k=(0,r.computed)(()=>h.value.findIndex(lA=>lA.target===A.id)===-1),V=(0,r.ref)(!1),F=()=>{V.value=!0},M=(lA,_)=>{if(h.value.find(U=>U.source===_&&U.target===lA))return!0;const Z=h.value.filter(U=>U.target===lA);for(let U=0;U<Z.length;U++)if(M(Z[U].source,_))return!0;return!1},tA=lA=>V.value?(V.value=!1,!1):M(lA.source,lA.target)?!1:lA.source!==lA.target&&lA.sourceHandle!==lA.targetHandle&&lA.sourceHandle.indexOf("s")!==-1&&lA.targetHandle.indexOf("t")!==-1,W=()=>{AA(),Object.keys(v.value).forEach(lA=>{v.value[lA]=!1})},aA=()=>{W()};t(()=>{console.log("onNodeClick"),I.value?I.value=!1:W()}),n(()=>{W()}),o(()=>{W()}),a(()=>{W()}),c(()=>{W()});const dA=(0,r.ref)(),rA=(0,r.ref)({top:0,left:0,bottom:0,right:0}),oA=(0,r.ref)({getBoundingClientRect:()=>rA.value}),AA=()=>{dA.value?.handleClose()},O=lA=>{const{clientX:_,clientY:Z}=lA;rA.value=DOMRect.fromRect({x:_,y:Z}),lA.preventDefault(),dA.value?.handleOpen()};return(lA,_)=>{const Z=(0,r.resolveComponent)("j-icon"),U=(0,r.resolveComponent)("el-popover"),x=(0,r.resolveComponent)("el-tooltip"),G=(0,r.resolveComponent)("el-dropdown-item"),R=(0,r.resolveComponent)("el-dropdown-menu"),$=(0,r.resolveComponent)("el-dropdown");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-flow-step",onContextmenu:(0,r.withModifiers)(O,["stop"])},[(0,r.createElementVNode)("div",{class:"d-flow-step-icon",style:(0,r.normalizeStyle)({backgroundColor:m.value.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(Z,{icon:m.value.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",fm,(0,r.toDisplayString)(m.value.name),1),e.data.type!=="start"?((0,r.openBlock)(),(0,r.createBlock)(x,{key:0,placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,r.withCtx)(()=>[k.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",gm,[..._[4]||(_[4]=[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击",-1),(0,r.createTextVNode)("添加节点 ",-1)])])):(0,r.createCommentVNode)("",!0),_[5]||(_[5]=(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,r.createTextVNode)("连接节点 ")],-1))]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(An),{onClick:_[1]||(_[1]=J=>L("t1")),onMousedown:F,id:"t1",class:(0,r.normalizeClass)(["d-flow-step-target-handle",{"d-flow-step-target-handle-notadd":!k.value}]),type:"target",position:(0,r.unref)(HA).Left,"is-valid-connection":tA},{default:(0,r.withCtx)(()=>[k.value?((0,r.openBlock)(),(0,r.createBlock)(U,{key:0,visible:v.value.t1,"onUpdate:visible":_[0]||(_[0]=J=>v.value.t1=J),placement:"left","popper-class":"d-flow-step-popper",trigger:"click","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,r.withCtx)(()=>[(0,r.createVNode)(Z,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(mi,{"handle-id":"t1","from-node-id":e.id,onAddNode:aA},null,8,["from-node-id"])]),_:1},8,["visible"])):(0,r.createCommentVNode)("",!0)]),_:1},8,["class","position"])]),_:1})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(x,{placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,r.withCtx)(()=>[..._[6]||(_[6]=[(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击"),(0,r.createTextVNode)("添加节点 ")],-1),(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,r.createTextVNode)("连接节点 ")],-1)])]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(An),{onClick:_[3]||(_[3]=J=>L("s1")),onMousedown:F,id:"s1",class:"d-flow-step-source-handle",type:"source",position:(0,r.unref)(HA).Right,"is-valid-connection":tA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(U,{visible:v.value.s1,"onUpdate:visible":_[2]||(_[2]=J=>v.value.s1=J),placement:"right",trigger:"click","popper-class":"d-flow-step-popper","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,r.withCtx)(()=>[(0,r.createVNode)(Z,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(mi,{"handle-id":"s1","from-node-id":e.id,onAddNode:aA},null,8,["from-node-id"])]),_:1},8,["visible"])]),_:1},8,["position"])]),_:1}),(0,r.createVNode)($,{ref_key:"dropdownRef",ref:dA,"popper-class":"d-flow-step-dropdown","virtual-ref":oA.value,"show-arrow":!1,"popper-options":{modifiers:[{name:"offset",options:{offset:[0,0]}}]},"virtual-triggering":"",trigger:"contextmenu",placement:"bottom-start"},{dropdown:(0,r.withCtx)(()=>[(0,r.createVNode)(R,null,{default:(0,r.withCtx)(()=>[e.data.type!="start"?((0,r.openBlock)(),(0,r.createBlock)(G,{key:0,onClick:y},{default:(0,r.withCtx)(()=>[..._[7]||(_[7]=[(0,r.createTextVNode)("删除",-1)])]),_:1})):(0,r.createCommentVNode)("",!0),m.value.des?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:1,style:(0,r.normalizeStyle)({width:"160px",padding:"4px 16px 0 16px","font-size":"12px","border-top":e.data.type!="start"?"1px solid var(--j-color-border)":void 0,"margin-top":e.data.type!="start"?"4px":void 0})},[_[8]||(_[8]=(0,r.createElementVNode)("div",{style:{"margin-bottom":"4px",color:"var(--j-color-text-2)"}},"关于",-1)),(0,r.createElementVNode)("div",hm,(0,r.toDisplayString)(m.value.des),1)],4)):(0,r.createCommentVNode)("",!0)]),_:1})]),_:1},8,["virtual-ref"])],32)}}}),pm=Bm,mm=(0,r.defineComponent)({name:"DEdgeWithButton",__name:"edgeWithButton",props:{id:{},sourceX:{},sourceY:{},targetX:{},targetY:{},sourcePosition:{},targetPosition:{},markerEnd:{},style:{}},setup(e){const A=e,{onEdgeMouseEnter:t,onEdgeMouseLeave:n,onNodeClick:o,onEdgeClick:a,onMoveStart:c,onConnectStart:d,onNodeDragStart:h}=ZA(),g=(0,r.computed)(()=>hi(A)),B=(0,r.ref)(!1),w=(0,r.ref)(!1);t(({edge:L})=>{L.id===A.id&&(B.value=!0)}),n(()=>{B.value=!1});const m=(0,r.ref)(!1),y=()=>{m.value=!1,(0,r.nextTick)(()=>{w.value=!1})},v=()=>{w.value=!0,m.value=!0},I=()=>{y()};return o(()=>{y()}),a(()=>{y()}),c(()=>{y()}),d(()=>{y()}),h(()=>{y()}),(L,k)=>{const V=(0,r.resolveComponent)("j-icon"),F=(0,r.resolveComponent)("el-popover");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)((0,r.unref)(kn),{id:e.id,style:(0,r.normalizeStyle)(e.style),path:g.value[0],"marker-end":e.markerEnd},null,8,["id","style","path","marker-end"]),(0,r.createVNode)((0,r.unref)(Qp),null,{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({pointerEvents:"all",position:"absolute",transform:`translate(-50%, -50%) translate(${g.value[1]}px,${g.value[2]}px)`}),class:"nodrag nopan"},[(0,r.createVNode)(F,{visible:m.value,"show-arrow":!1,placement:"right","popper-class":"d-flow-step-popper"},{reference:(0,r.withCtx)(()=>[(0,r.withDirectives)((0,r.createElementVNode)("div",{onClick:(0,r.withModifiers)(v,["stop"]),class:"d-flow-edge-button"},[(0,r.createVNode)(V,{icon:"mdi:plus-circle"})],512),[[r.vShow,B.value||w.value]])]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(mi,{"handle-id":"line","from-node-id":e.id,onAddNode:I},null,8,["from-node-id"])]),_:1},8,["visible"])],4)]),_:1})],64)}}}),wm=mm,Cm=(0,r.defineComponent)({name:"DFlow",__name:"flow",props:{nodes:{default:()=>[]},edges:{default:()=>[]}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Hp),{"min-zoom":.2,"max-zoom":4,"default-viewport":{zoom:1},"connection-mode":(0,r.unref)(nt).Strict,nodes:e.nodes,edges:e.edges},{"edge-button":(0,r.withCtx)(n=>[(0,r.createVNode)(wm,{id:n.id,"source-x":n.sourceX,"source-y":n.sourceY,"target-x":n.targetX,"target-y":n.targetY,"source-position":n.sourcePosition,"target-position":n.targetPosition,"marker-end":n.markerEnd,style:(0,r.normalizeStyle)(n.style)},null,8,["id","source-x","source-y","target-x","target-y","source-position","target-position","marker-end","style"])]),"node-step":(0,r.withCtx)(n=>[(0,r.createVNode)(pm,(0,r.normalizeProps)((0,r.guardReactiveProps)(n)),null,16)]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(lm),{position:"bottom-left"}),(0,r.createVNode)((0,r.unref)(Mp))]),_:1},8,["connection-mode","nodes","edges"]))}}),ym=Cm,vm={class:"d-flow-design"},Qm={class:"d-flow-design-canvas"},Em={class:"d-flow-design-right"},Fm={class:"d-flow-design-title"},Um={class:"d-flow-design-title-name"},bm={class:"d-flow-design-panel"},Im=(0,r.defineComponent)({name:"DFlowDesign",__name:"flowDesign",props:{components:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["nodeClick","edgeClick","paneClick","connect"],setup(e,{expose:A,emit:t}){const n=e,o=t,{addNodes:a,addEdges:c,removeEdges:d,addSelectedNodes:h,removeSelectedNodes:g,onConnect:B,onNodeClick:w,onPaneClick:m,onEdgeClick:y,getNodes:v,getEdges:I}=ZA(),L=(0,r.computed)(()=>{const R={};return n.components.forEach($=>{R[$.type]=$}),R.start={name:"开始",type:"start",icon:"ant-design:play-circle-outlined",des:"执行开始节点"},R}),k={id:"start",type:"step",data:{type:"start",isInit:!1},position:{x:80,y:160}},V=(0,r.ref)([k]),F=(0,r.ref)([]),M=(R,$)=>{if($.indexOf("t")===-1){const J=I.value.filter(nA=>nA.source===R.id);if(J.length>0){let nA=-1e6,hA=0;return J.forEach(UA=>{nA=Math.max(nA,UA.targetNode.position.y+UA.targetNode.dimensions.height+32),hA=UA.targetNode.position.x||0}),{x:hA,y:nA}}return{x:R.position.x+R.dimensions.width+100,y:R.position.y}}return{x:R.position.x-100-R.dimensions.width,y:R.position.y}},tA=(R,$,J)=>{const nA=v.value.find(UA=>UA.id===$);if(!nA)return;const hA={id:gt(),type:"step",data:{type:R},position:M(nA,J)};if(n.flowInit){const UA=n.flowInit(hA.data.type);UA&&Object.keys(UA).forEach(eA=>{hA.data[eA]=UA[eA]})}a(hA),J.indexOf("t")===-1?c({id:`${$}-${hA.id}`,source:$,target:hA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:rt.Arrow}):c({id:`${$}-${hA.id}`,source:hA.id,target:$,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:rt.Arrow}),O(hA.id)},W=R=>{const $=v.value.find(J=>J.id===R);$&&($.position.x+=100+$.dimensions.width,I.value.filter(J=>J.source===R).forEach(J=>{W(J.target)}))},aA=(R,$)=>{const J=I.value.find(hA=>hA.id===$);if(!J)return;const nA={id:gt(),type:"step",data:{type:R},position:{x:J.targetNode.position.x,y:J.targetNode.position.y}};if(n.flowInit){const hA=n.flowInit(nA.data.type);hA&&Object.keys(hA).forEach(UA=>{nA.data[UA]=hA[UA]})}a(nA),c({id:`${J.sourceNode.id}-${nA.id}`,source:J.sourceNode.id,target:nA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:rt.Arrow}),c({id:`${nA.id}-${J.targetNode.id}`,source:nA.id,target:J.targetNode.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:rt.Arrow}),d($),W(J.target),O(nA.id)};B(R=>{console.log("onConnect",R),R.type="button",R.markerEnd=rt.Arrow,c(R),o("connect",R)});const dA=()=>n.components||[],rA=(0,r.ref)(),oA=(0,r.computed)(()=>rA.value?L.value[rA.value.data.type]:void 0);w(R=>{rA.value?.id!==R.node.id&&(rA.value=R.node,Z()),o("nodeClick",R.node)}),m(()=>{rA.value=void 0,o("paneClick")}),y(R=>{rA.value=void 0,o("edgeClick",R.edge)});const AA=R=>{rA.value?.id===R&&(rA.value=void 0)},O=R=>{rA.value&&g([rA.value]),rA.value=v.value.find($=>$.id===R),rA.value&&(Z(),setTimeout(()=>{rA.value&&h([rA.value])},100))},lA=(0,r.ref)(),_={};Object.keys(n.flowComponentConfigs).forEach(R=>{const $={type:"j-collapse",config:{defaultValue:[]},children:[]};n.flowComponentConfigs[R].forEach((J,nA)=>{const hA=`_collapse${nA}`;$.config?.defaultValue.push(hA),$.children?.push(J)}),_[R]=[$]});const Z=()=>{const R=_[rA.value?.data.type||""];R&&lA.value?(lA.value.init&&lA.value.init(R,rA.value?.data),n.flowComponentConfigInit&&n.flowComponentConfigInit({configRef:lA,inputParams:n.inputParams,components:v.value,configData:rA.value?.data})):lA.value&&lA.value.init&&lA.value.init([])},U=(R,$)=>{rA.value&&n.flowComponentConfigChange&&n.flowComponentConfigChange(rA.value.data.type,{configRef:lA,component:R,configData:rA.value.data,...$,isFlowNode:!0})};return(0,r.provide)("d_flow_design_provide",{getFlowComponents:dA,addNode:tA,addNodeByLine:aA,onRemoveNode:AA,getFlowComponentMap:L}),A({getData:()=>{const R=[];return v.value.forEach($=>{R.push({config:$.data,id:$.id,position:$.position,type:$.type})}),I.value.forEach($=>{R.push({id:$.id,source:$.source,target:$.target,sourceHandle:$.sourceHandle,targetHandle:$.targetHandle,type:"line",config:{},position:{x:0,y:0}})}),R},setData:R=>{if(!R||R.length===0)k.data.isInit=!0,V.value=[k],O(k.id);else{k.data.isInit=!1;const $=[],J=[];R.forEach(nA=>{if(nA.type==="line")nA.type="button",nA.markerEnd=rt.Arrow,J.push(nA);else{const hA={id:nA.id,type:nA.type,data:nA.config,position:nA.position};$.push(hA)}}),V.value=$,F.value=J}}}),(R,$)=>{const J=(0,r.resolveComponent)("j-icon"),nA=(0,r.resolveComponent)("j-form");return(0,r.openBlock)(),(0,r.createElementBlock)("div",vm,[(0,r.createElementVNode)("div",Qm,[(0,r.createVNode)(ym,{nodes:V.value,edges:F.value},null,8,["nodes","edges"])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Em,[(0,r.createElementVNode)("div",Fm,[(0,r.createElementVNode)("div",{class:"d-flow-design-title-icon",style:(0,r.normalizeStyle)({backgroundColor:oA.value?.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(J,{icon:oA.value?.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",Um,(0,r.toDisplayString)(oA.value?.name||""),1)]),(0,r.createElementVNode)("div",bm,[(0,r.createVNode)(nA,{config:{labelPosition:"top"},style:{padding:"0"},ref_key:"configRef",ref:lA,onChange:U},null,512)])],512),[[r.vShow,rA.value&&_[rA.value.data.type]]])])}}}),Hm=Im,rl=ft(Hm),_m={class:"d-input-flow j-block"},Sm=(0,r.defineComponent)({name:"DInputFlow",__name:"inputFlow",props:{modelValue:{},type:{},btnText:{default:"事件"},title:{},size:{default:"default"},width:{default:1200},height:{default:800},beforeClose:{},flowComponents:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["update:modelValue","change"],setup(e,{emit:A}){const t=e,n=A,o=(0,r.ref)(),a=(0,r.computed)({get(){return t.modelValue},set(w){n("update:modelValue",w)}}),c=(0,r.computed)(()=>(t.modelValue?.trim(),t.btnText)),d=w=>{const m=typeof w=="string"?w:void 0;try{o.value?.setData(JSON.parse(m||"[]"))}catch{o.value?.setData([])}},h=async()=>{const w=o.value?.getData();return w?JSON.stringify(w):void 0},g=w=>{if(t.beforeClose){const m=typeof w=="string"?w:void 0;return t.beforeClose(m)}return!0},B=w=>{const m=w.value;n("change",{value:typeof m=="string"?m:void 0})};return(w,m)=>{const y=(0,r.resolveComponent)("d-flow-design"),v=(0,r.resolveComponent)("j-input-button");return(0,r.openBlock)(),(0,r.createBlock)(v,(0,r.mergeProps)(w.$attrs,{type:e.type,"btn-text":c.value,title:e.title,size:e.size,width:e.width,height:e.height,"before-close":g,ok:h,open:d,"destroy-on-close":"",modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=I=>a.value=I),onChange:B}),{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",_m,[(0,r.createVNode)(y,{ref_key:"flowRef",ref:o,components:e.flowComponents,"flow-init":e.flowInit,"flow-component-config-init":e.flowComponentConfigInit,"flow-component-configs":e.flowComponentConfigs,"flow-component-config-change":e.flowComponentConfigChange,"input-params":e.inputParams},null,8,["components","flow-init","flow-component-config-init","flow-component-configs","flow-component-config-change","input-params"])])]),_:1},16,["type","btn-text","title","size","width","height","modelValue"])}}}),xm=Sm,ol=ft(xm),q=class Le{static getElements(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(n&&!isNaN(+A[0])){const a=n.getElementById(A);return a?[a]:[]}let o=t.querySelectorAll(A);if(!o.length&&A[0]!=="."&&A[0]!=="#"&&(o=t.querySelectorAll("."+A),o.length||(o=t.querySelectorAll("#"+A)),!o.length)){const a=t.querySelector(`[gs-id="${A}"]`);return a?[a]:[]}return Array.from(o)}return[A]}static getElement(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(!A.length)return null;if(n&&A[0]==="#")return n.getElementById(A.substring(1));if(A[0]==="#"||A[0]==="."||A[0]==="[")return t.querySelector(A);if(n&&!isNaN(+A[0]))return n.getElementById(A);let o=t.querySelector(A);return n&&!o&&(o=n.getElementById(A)),o||(o=t.querySelector("."+A)),o}return A}static lazyLoad(A){return A.lazyLoad||A.grid?.opts?.lazyLoad&&A.lazyLoad!==!1}static createDiv(A,t){const n=document.createElement("div");return A.forEach(o=>{o&&n.classList.add(o)}),t?.appendChild(n),n}static shouldSizeToContent(A,t=!1){return A?.grid&&(t?A.sizeToContent===!0||A.grid.opts.sizeToContent===!0&&A.sizeToContent===void 0:!!A.sizeToContent||A.grid.opts.sizeToContent&&A.sizeToContent!==!1)}static isIntercepted(A,t){return!(A.y>=t.y+t.h||A.y+A.h<=t.y||A.x+A.w<=t.x||A.x>=t.x+t.w)}static isTouching(A,t){return Le.isIntercepted(A,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(A,t){const n=A.x>t.x?A.x:t.x,o=A.x+A.w<t.x+t.w?A.x+A.w:t.x+t.w;if(o<=n)return 0;const a=A.y>t.y?A.y:t.y,c=A.y+A.h<t.y+t.h?A.y+A.h:t.y+t.h;return c<=a?0:(o-n)*(c-a)}static area(A){return A.w*A.h}static sort(A,t=1){return A.sort((o,a)=>{const c=t*((o.y??1e4)-(a.y??1e4));return c===0?t*((o.x??1e4)-(a.x??1e4)):c})}static find(A,t){return t?A.find(n=>n.id===t):void 0}static toBool(A){return typeof A=="boolean"?A:typeof A=="string"?(A=A.toLowerCase(),!(A===""||A==="no"||A==="false"||A==="0")):!!A}static toNumber(A){return A===null||A.length===0?void 0:Number(A)}static parseHeight(A){let t,n="px";if(typeof A=="string")if(A==="auto"||A==="")t=0;else{const o=A.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!o)throw new Error(`Invalid height val = ${A}`);n=o[2]||"px",t=parseFloat(o[1])}else t=A;return{h:t,unit:n}}static defaults(A,...t){return t.forEach(n=>{for(const o in n){if(!n.hasOwnProperty(o))return;A[o]===null||A[o]===void 0?A[o]=n[o]:typeof n[o]=="object"&&typeof A[o]=="object"&&Le.defaults(A[o],n[o])}}),A}static same(A,t){if(typeof A!="object")return A==t;if(typeof A!=typeof t||Object.keys(A).length!==Object.keys(t).length)return!1;for(const n in A)if(A[n]!==t[n])return!1;return!0}static copyPos(A,t,n=!1){return t.x!==void 0&&(A.x=t.x),t.y!==void 0&&(A.y=t.y),t.w!==void 0&&(A.w=t.w),t.h!==void 0&&(A.h=t.h),n&&(t.minW&&(A.minW=t.minW),t.minH&&(A.minH=t.minH),t.maxW&&(A.maxW=t.maxW),t.maxH&&(A.maxH=t.maxH)),A}static samePos(A,t){return A&&t&&A.x===t.x&&A.y===t.y&&(A.w||1)===(t.w||1)&&(A.h||1)===(t.h||1)}static sanitizeMinMax(A){A.minW||delete A.minW,A.minH||delete A.minH,A.maxW||delete A.maxW,A.maxH||delete A.maxH}static removeInternalAndSame(A,t){if(!(typeof A!="object"||typeof t!="object")&&!(Array.isArray(A)||Array.isArray(t)))for(let n in A){const o=A[n],a=t[n];n[0]==="_"||o===a?delete A[n]:o&&typeof o=="object"&&a!==void 0&&(Le.removeInternalAndSame(o,a),Object.keys(o).length||delete A[n])}}static removeInternalForSave(A,t=!0){for(let n in A)(n[0]==="_"||A[n]===null||A[n]===void 0)&&delete A[n];delete A.grid,t&&delete A.el,A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,A.locked||delete A.locked,(A.w===1||A.w===A.minW)&&delete A.w,(A.h===1||A.h===A.minH)&&delete A.h}static throttle(A,t){let n=!1;return(...o)=>{n||(n=!0,setTimeout(()=>{A(...o),n=!1},t))}}static removePositioningStyles(A){const t=A.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(A){if(!A)return document.scrollingElement||document.documentElement;const t=getComputedStyle(A);return/(auto|scroll)/.test(t.overflow+t.overflowY)?A:Le.getScrollElement(A.parentElement)}static updateScrollPosition(A,t,n){const o=Le.getScrollElement(A);if(!o)return;const a=A.getBoundingClientRect(),c=o.getBoundingClientRect(),d=window.innerHeight||document.documentElement.clientHeight,h=a.bottom-Math.min(c.bottom,d),g=a.top-Math.max(c.top,0),B=o.scrollTop;g<0&&n<0?A.offsetHeight>c.height?o.scrollTop+=n:o.scrollTop+=Math.abs(g)>Math.abs(n)?n:g:h>0&&n>0&&(A.offsetHeight>c.height?o.scrollTop+=n:o.scrollTop+=h>n?n:h),t.top+=o.scrollTop-B}static updateScrollResize(A,t,n){const o=Le.getScrollElement(t),a=o.clientHeight,c=o===Le.getScrollElement()?0:o.getBoundingClientRect().top,d=A.clientY-c,h=d<n,g=d>a-n;h?o.scrollBy({behavior:"smooth",top:d-n}):g&&o.scrollBy({behavior:"smooth",top:n-(a-d)})}static clone(A){return A==null||typeof A!="object"?A:A instanceof Array?[...A]:{...A}}static cloneDeep(A){const t=["parentGrid","el","grid","subGrid","engine"],n=Le.clone(A);for(const o in n)n.hasOwnProperty(o)&&typeof n[o]=="object"&&o.substring(0,2)!=="__"&&!t.find(a=>a===o)&&(n[o]=Le.cloneDeep(A[o]));return n}static cloneNode(A){const t=A.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(A,t){let n;typeof t=="string"?n=Le.getElement(t):n=t,n&&n.appendChild(A)}static addElStyles(A,t){if(t instanceof Object)for(const n in t)t.hasOwnProperty(n)&&(Array.isArray(t[n])?t[n].forEach(o=>{A.style[n]=o}):A.style[n]=t[n])}static initEvent(A,t){const n={type:t.type},o={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:A.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(a=>n[a]=A[a]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(a=>n[a]=A[a]),{...n,...o}}static simulateMouseEvent(A,t,n){const o=A,a=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:A.screenX,screenY:A.screenY,clientX:A.clientX,clientY:A.clientY,ctrlKey:o.ctrlKey??!1,altKey:o.altKey??!1,shiftKey:o.shiftKey??!1,metaKey:o.metaKey??!1,button:0,relatedTarget:A.target});(n||A.target).dispatchEvent(a)}static getValuesFromTransformedElement(A){const t=document.createElement("div");Le.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),A.appendChild(t);const n=t.getBoundingClientRect();return A.removeChild(t),t.remove(),{xScale:1/n.width,yScale:1/n.height,xOffset:n.left,yOffset:n.top}}static swap(A,t,n){if(!A)return;const o=A[t];A[t]=A[n],A[n]=o}static canBeRotated(A){return!(!A||A.w===A.h||A.locked||A.noResize||A.grid?.opts.disableResize||A.minW&&A.minW===A.maxW||A.minH&&A.minH===A.maxH)}},wi=class Bn{constructor(A={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=A.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=A.maxRow,this._float=A.float,this.nodes=A.nodes||[],this.onChange=A.onChange}batchUpdate(A=!0,t=!0){return!!this.batchMode===A?this:(this.batchMode=A,A?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(A,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!A._moving||A._skipDown||t.y<=A.y)}_fixCollisions(A,t=A,n,o={}){if(this.sortNodes(-1),n=n||this.collide(A,t),!n)return!1;if(A._moving&&!o.nested&&!this.float&&this.swap(A,n))return!0;let a=t;!this._loading&&this._useEntireRowArea(A,t)&&(a={x:0,w:this.column,y:t.y,h:t.h},n=this.collide(A,a,o.skip));let c=!1;const d={nested:!0,pack:!1};let h=0;for(;n=n||this.collide(A,a,o.skip);){if(h++>this.nodes.length*2)throw new Error("Infinite collide check");let g;if(n.locked||this._loading||A._moving&&!A._skipDown&&t.y>A.y&&!this.float&&(!this.collide(n,{...n,y:A.y},A)||!this.collide(n,{...n,y:t.y-n.h},A))){A._skipDown=A._skipDown||t.y>A.y;const B={...t,y:n.y+n.h,...d};g=this._loading&&q.samePos(A,B)?!0:this.moveNode(A,B),(n.locked||this._loading)&&g?q.copyPos(t,A):!n.locked&&g&&o.pack&&(this._packNodes(),t.y=n.y+n.h,q.copyPos(A,t)),c=c||g}else g=this.moveNode(n,{...n,y:t.y+t.h,skip:A,...d});if(!g)return c;n=void 0}return c}collide(A,t=A,n){const o=A._id,a=n?._id;return this.nodes.find(c=>c._id!==o&&c._id!==a&&q.isIntercepted(c,t))}collideAll(A,t=A,n){const o=A._id,a=n?._id;return this.nodes.filter(c=>c._id!==o&&c._id!==a&&q.isIntercepted(c,t))}directionCollideCoverage(A,t,n){if(!t.rect||!A._rect)return;const o=A._rect,a={...t.rect};a.y>o.y?(a.h+=a.y-o.y,a.y=o.y):a.h+=o.y-a.y,a.x>o.x?(a.w+=a.x-o.x,a.x=o.x):a.w+=o.x-a.x;let c,d=.5;for(let h of n){if(h.locked||!h._rect)break;const g=h._rect;let B=Number.MAX_VALUE,w=Number.MAX_VALUE;o.y<g.y?B=(a.y+a.h-g.y)/g.h:o.y+o.h>g.y+g.h&&(B=(g.y+g.h-a.y)/g.h),o.x<g.x?w=(a.x+a.w-g.x)/g.w:o.x+o.w>g.x+g.w&&(w=(g.x+g.w-a.x)/g.w);const m=Math.min(w,B);m>d&&(d=m,c=h)}return t.collide=c,c}cacheRects(A,t,n,o,a,c){return this.nodes.forEach(d=>d._rect={y:d.y*t+n,x:d.x*A+c,w:d.w*A-c-o,h:d.h*t-n-a}),this}swap(A,t){if(!t||t.locked||!A||A.locked)return!1;function n(){const a=t.x,c=t.y;return t.x=A.x,t.y=A.y,A.h!=t.h?(A.x=a,A.y=t.y+t.h):A.w!=t.w?(A.x=t.x+t.w,A.y=c):(A.x=a,A.y=c),A._dirty=t._dirty=!0,!0}let o;if(A.w===t.w&&A.h===t.h&&(A.x===t.x||A.y===t.y)&&(o=q.isTouching(A,t)))return n();if(o!==!1){if(A.w===t.w&&A.x===t.x&&(o||(o=q.isTouching(A,t)))){if(t.y<A.y){const a=A;A=t,t=a}return n()}if(o!==!1){if(A.h===t.h&&A.y===t.y&&(o||(o=q.isTouching(A,t)))){if(t.x<A.x){const a=A;A=t,t=a}return n()}return!1}}}isAreaEmpty(A,t,n,o){const a={x:A||0,y:t||0,w:n||1,h:o||1};return!this.collide(a)}compact(A="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const n=this.batchMode;n||this.batchUpdate();const o=this._inColumnResize;o||(this._inColumnResize=!0);const a=this.nodes;return this.nodes=[],a.forEach((c,d,h)=>{let g;c.locked||(c.autoPosition=!0,A==="list"&&d&&(g=h[d-1])),this.addNode(c,!1,g)}),o||delete this._inColumnResize,n||this.batchUpdate(!1),this}set float(A){this._float!==A&&(this._float=A||!1,A||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(A=1){return this.nodes=q.sort(this.nodes,A),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(A=>{if(A._updating||A._orig===void 0||A.y===A._orig.y)return;let t=A.y;for(;t>A._orig.y;)--t,this.collide(A,{x:A.x,y:t,w:A.w,h:A.h})||(A._dirty=!0,A.y=t)}):this.nodes.forEach((A,t)=>{if(!A.locked)for(;A.y>0;){const n=t===0?0:A.y-1;if(!(t===0||!this.collide(A,{x:A.x,y:n,w:A.w,h:A.h})))break;A._dirty=A.y!==n,A.y=n}}),this)}prepareNode(A,t){A._id=A._id??Bn._idSeq++;const n=A.id;if(n){let a=1;for(;this.nodes.find(c=>c.id===A.id&&c!==A);)A.id=n+"_"+a++}(A.x===void 0||A.y===void 0||A.x===null||A.y===null)&&(A.autoPosition=!0);const o={x:0,y:0,w:1,h:1};return q.defaults(A,o),A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,q.sanitizeMinMax(A),typeof A.x=="string"&&(A.x=Number(A.x)),typeof A.y=="string"&&(A.y=Number(A.y)),typeof A.w=="string"&&(A.w=Number(A.w)),typeof A.h=="string"&&(A.h=Number(A.h)),isNaN(A.x)&&(A.x=o.x,A.autoPosition=!0),isNaN(A.y)&&(A.y=o.y,A.autoPosition=!0),isNaN(A.w)&&(A.w=o.w),isNaN(A.h)&&(A.h=o.h),this.nodeBoundFix(A,t),A}nodeBoundFix(A,t){const n=A._orig||q.copyPos({},A);if(A.maxW&&(A.w=Math.min(A.w||1,A.maxW)),A.maxH&&(A.h=Math.min(A.h||1,A.maxH)),A.minW&&(A.w=Math.max(A.w||1,A.minW)),A.minH&&(A.h=Math.max(A.h||1,A.minH)),(A.x||0)+(A.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&A._id!=null&&this.findCacheLayout(A,this.defaultColumn)===-1){const o={...A};o.autoPosition||o.x===void 0?(delete o.x,delete o.y):o.x=Math.min(this.defaultColumn-1,o.x),o.w=Math.min(this.defaultColumn,o.w||1),this.cacheOneLayout(o,this.defaultColumn)}return A.w>this.column?A.w=this.column:A.w<1&&(A.w=1),this.maxRow&&A.h>this.maxRow?A.h=this.maxRow:A.h<1&&(A.h=1),A.x<0&&(A.x=0),A.y<0&&(A.y=0),A.x+A.w>this.column&&(t?A.w=this.column-A.x:A.x=this.column-A.w),this.maxRow&&A.y+A.h>this.maxRow&&(t?A.h=this.maxRow-A.y:A.y=this.maxRow-A.h),q.samePos(A,n)||(A._dirty=!0),this}getDirtyNodes(A){return A?this.nodes.filter(t=>t._dirty&&!q.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(A){if(this.batchMode||!this.onChange)return this;const t=(A||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(A=>{delete A._dirty,delete A._lastTried}),this)}saveInitial(){return this.nodes.forEach(A=>{A._orig=q.copyPos({},A),delete A._dirty}),this._hasLocked=this.nodes.some(A=>A.locked),this}restoreInitial(){return this.nodes.forEach(A=>{!A._orig||q.samePos(A,A._orig)||(q.copyPos(A,A._orig),A._dirty=!0)}),this._notify(),this}findEmptyPosition(A,t=this.nodes,n=this.column,o){const a=o?o.y*n+(o.x+o.w):0;let c=!1;for(let d=a;!c;++d){const h=d%n,g=Math.floor(d/n);if(h+A.w>n)continue;const B={x:h,y:g,w:A.w,h:A.h};t.find(w=>q.isIntercepted(B,w))||((A.x!==h||A.y!==g)&&(A._dirty=!0),A.x=h,A.y=g,delete A.autoPosition,c=!0)}return c}addNode(A,t=!1,n){const o=this.nodes.find(c=>c._id===A._id);if(o)return o;this._inColumnResize?this.nodeBoundFix(A):this.prepareNode(A),delete A._temporaryRemoved,delete A._removeDOM;let a;return A.autoPosition&&this.findEmptyPosition(A,this.nodes,this.column,n)&&(delete A.autoPosition,a=!0),this.nodes.push(A),t&&this.addedNodes.push(A),a||this._fixCollisions(A),this.batchMode||this._packNodes()._notify(),A}removeNode(A,t=!0,n=!1){return this.nodes.find(o=>o._id===A._id)?(n&&this.removedNodes.push(A),t&&(A._removeDOM=!0),this.nodes=this.nodes.filter(o=>o._id!==A._id),A._isAboutToRemove||this._packNodes(),this._notify([A]),this):this}removeAll(A=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;A&&this.nodes.forEach(o=>o._removeDOM=!0);const n=this.nodes;return this.removedNodes=t?n:[],this.nodes=[],this._notify(n)}moveNodeCheck(A,t){if(!this.changedPosConstrain(A,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(A,t);let n;const o=new Bn({column:this.column,float:this.float,nodes:this.nodes.map(c=>c._id===A._id?(n={...c},n):{...c})});if(!n)return!1;const a=o.moveNode(n,t)&&o.getRow()<=Math.max(this.getRow(),this.maxRow);if(!a&&!t.resizing&&t.collide){const c=t.collide.el.gridstackNode;if(this.swap(A,c))return this._notify(),!0}return a?(o.nodes.filter(c=>c._dirty).forEach(c=>{const d=this.nodes.find(h=>h._id===c._id);d&&(q.copyPos(d,c),d._dirty=!0)}),this._notify(),!0):!1}willItFit(A){if(delete A._willFitPos,!this.maxRow)return!0;const t=new Bn({column:this.column,float:this.float,nodes:this.nodes.map(o=>({...o}))}),n={...A};return this.cleanupNode(n),delete n.el,delete n._id,delete n.content,delete n.grid,t.addNode(n),t.getRow()<=this.maxRow?(A._willFitPos=q.copyPos({},n),!0):!1}changedPosConstrain(A,t){return t.w=t.w||A.w,t.h=t.h||A.h,A.x!==t.x||A.y!==t.y?!0:(A.maxW&&(t.w=Math.min(t.w,A.maxW)),A.maxH&&(t.h=Math.min(t.h,A.maxH)),A.minW&&(t.w=Math.max(t.w,A.minW)),A.minH&&(t.h=Math.max(t.h,A.minH)),A.w!==t.w||A.h!==t.h)}moveNode(A,t){if(!A||!t)return!1;let n;t.pack===void 0&&!this.batchMode&&(n=t.pack=!0),typeof t.x!="number"&&(t.x=A.x),typeof t.y!="number"&&(t.y=A.y),typeof t.w!="number"&&(t.w=A.w),typeof t.h!="number"&&(t.h=A.h);const o=A.w!==t.w||A.h!==t.h,a=q.copyPos({},A,!0);if(q.copyPos(a,t),this.nodeBoundFix(a,o),q.copyPos(t,a),!t.forceCollide&&q.samePos(A,t))return!1;const c=q.copyPos({},A),d=this.collideAll(A,a,t.skip);let h=!0;if(d.length){const g=A._moving&&!t.nested;let B=g?this.directionCollideCoverage(A,t,d):d[0];if(g&&B&&A.grid?.opts?.subGridDynamic&&!A.grid._isTemp){const w=q.areaIntercept(t.rect,B._rect),m=q.area(t.rect),y=q.area(B._rect);w/(m<y?m:y)>.8&&(B.grid.makeSubGrid(B.el,void 0,A),B=void 0)}B?h=!this._fixCollisions(A,a,B,t):(h=!1,n&&delete t.pack)}return h&&!q.samePos(A,a)&&(A._dirty=!0,q.copyPos(A,a)),t.pack&&this._packNodes()._notify(),!q.samePos(A,c)}getRow(){return this.nodes.reduce((A,t)=>Math.max(A,t.y+t.h),0)}beginUpdate(A){return A._updating||(A._updating=!0,delete A._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const A=this.nodes.find(t=>t._updating);return A&&(delete A._updating,delete A._skipDown),this}save(A=!0,t,n){const o=this._layouts?.length||0;let a;o&&(n?n!==this.column&&(a=this._layouts[n]):this.column!==o-1&&(a=this._layouts[o-1]));const c=[];return this.sortNodes(),this.nodes.forEach(d=>{const h=a?.find(B=>B._id===d._id),g={...d,...h||{}};q.removeInternalForSave(g,!A),t&&t(d,g),c.push(g)}),c}layoutsNodesChange(A){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,n)=>{if(!t||n===this.column)return this;if(n<this.column)this._layouts[n]=void 0;else{const o=n/this.column;A.forEach(a=>{if(!a._orig)return;const c=t.find(d=>d._id===a._id);c&&(c.y>=0&&a.y!==a._orig.y&&(c.y+=a.y-a._orig.y,c.y<0&&(c.y=0)),a.x!==a._orig.x&&(c.x=Math.round(a.x*o),c.x<0&&(c.x=0)),a.w!==a._orig.w&&(c.w=Math.round(a.w*o),c.w<1&&(c.w=1)))})}}),this)}columnChanged(A,t,n="moveScale"){if(!this.nodes.length||!t||A===t)return this;const o=n==="compact"||n==="list";o&&this.sortNodes(1),t<A&&this.cacheLayout(this.nodes,A),this.batchUpdate();let a=[],c=o?this.nodes:q.sort(this.nodes,-1);if(t>A&&this._layouts){const d=this._layouts[t]||[],h=this._layouts.length-1;!d.length&&A!==h&&this._layouts[h]?.length&&(A=h,this._layouts[h].forEach(g=>{const B=c.find(w=>w._id===g._id);B&&(!o&&!g.autoPosition&&(B.x=g.x??B.x,B.y=g.y??B.y),B.w=g.w??B.w,(g.x==null||g.y===void 0)&&(B.autoPosition=!0))})),d.forEach(g=>{const B=c.findIndex(w=>w._id===g._id);if(B!==-1){const w=c[B];if(o){w.w=g.w;return}(g.autoPosition||isNaN(g.x)||isNaN(g.y))&&this.findEmptyPosition(g,a),g.autoPosition||(w.x=g.x??w.x,w.y=g.y??w.y,w.w=g.w??w.w,a.push(w)),c.splice(B,1)}})}if(o)this.compact(n,!1);else{if(c.length)if(typeof n=="function")n(t,A,a,c);else{const d=o||n==="none"?1:t/A,h=n==="move"||n==="moveScale",g=n==="scale"||n==="moveScale";c.forEach(B=>{B.x=t===1?0:h?Math.round(B.x*d):Math.min(B.x,t-1),B.w=t===1||A===1?1:g?Math.round(B.w*d)||1:Math.min(B.w,t),a.push(B)}),c=[]}a=q.sort(a,-1),this._inColumnResize=!0,this.nodes=[],a.forEach(d=>{this.addNode(d,!1),delete d._orig})}return this.nodes.forEach(d=>delete d._orig),this.batchUpdate(!1,!o),delete this._inColumnResize,this}cacheLayout(A,t,n=!1){const o=[];return A.forEach((a,c)=>{a._id===void 0&&(a._id=(a.id?this.nodes.find(d=>d.id===a.id):void 0)?._id??Bn._idSeq++),o[c]={x:a.x,y:a.y,w:a.w,_id:a._id}}),this._layouts=n?[]:this._layouts||[],this._layouts[t]=o,this}cacheOneLayout(A,t){A._id=A._id??Bn._idSeq++;const n={x:A.x,y:A.y,w:A.w,_id:A._id};(A.autoPosition||A.x===void 0)&&(delete n.x,delete n.y,A.autoPosition&&(n.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const o=this.findCacheLayout(A,t);return o===-1?this._layouts[t].push(n):this._layouts[t][o]=n,this}findCacheLayout(A,t){return this._layouts?.[t]?.findIndex(n=>n._id===A._id)??-1}removeNodeFromLayoutCache(A){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const n=this.findCacheLayout(A,t);n!==-1&&this._layouts[t].splice(n,1)}}cleanupNode(A){for(const t in A)t[0]==="_"&&t!=="_id"&&delete A[t];return this}};wi._idSeq=0;var Ie={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},TA=class{},Ke=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),He=class{};function kr(e,A){e.touches.length>1||(e.cancelable&&e.preventDefault(),q.simulateMouseEvent(e.changedTouches[0],A))}function il(e,A){e.cancelable&&e.preventDefault(),q.simulateMouseEvent(e,A)}function Mr(e){He.touchHandled||(He.touchHandled=!0,kr(e,"mousedown"))}function Or(e){He.touchHandled&&kr(e,"mousemove")}function Kr(e){if(!He.touchHandled)return;He.pointerLeaveTimeout&&(window.clearTimeout(He.pointerLeaveTimeout),delete He.pointerLeaveTimeout);const A=!!TA.dragElement;kr(e,"mouseup"),A||kr(e,"click"),He.touchHandled=!1}function Rr(e){e.pointerType!=="mouse"&&e.target.releasePointerCapture(e.pointerId)}function sl(e){TA.dragElement&&e.pointerType!=="mouse"&&il(e,"mouseenter")}function al(e){TA.dragElement&&e.pointerType!=="mouse"&&(He.pointerLeaveTimeout=window.setTimeout(()=>{delete He.pointerLeaveTimeout,il(e,"mouseleave")},10))}var ll=class pu{constructor(A,t,n){this.host=A,this.dir=t,this.option=n,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(A){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",A)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${pu.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),Ke&&(this.el.addEventListener("touchstart",Mr),this.el.addEventListener("pointerdown",Rr)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),Ke&&(this.el.removeEventListener("touchstart",Mr),this.el.removeEventListener("pointerdown",Rr)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(A){this.mouseDownEvent=A,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),Ke&&(this.el.addEventListener("touchmove",Or),this.el.addEventListener("touchend",Kr)),A.stopPropagation(),A.preventDefault()}_mouseMove(A){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",A):Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",A),document.addEventListener("keydown",this._keyEvent)),A.stopPropagation()}_mouseUp(A){this.moving&&(this._triggerEvent("stop",A),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),Ke&&(this.el.removeEventListener("touchmove",Or),this.el.removeEventListener("touchend",Kr)),delete this.moving,delete this.mouseDownEvent,A.stopPropagation(),A.preventDefault()}_keyEvent(A){A.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(A,t){return this.option[A]&&this.option[A](t),this}};ll.prefix="ui-resizable-";var Ci=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,A){this._eventRegister[e]=A}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,A){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](A)}},cl=class ns extends Ci{constructor(A,t={}){super(),this.el=A,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const n=this.el.parentElement.getBoundingClientRect(),o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||o;return{position:{left:(a.left-n.left)*this.rectScale.x,top:(a.top-n.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(A){const t=A.handles&&A.handles!==this.option.handles,n=A.autoHide&&A.autoHide!==this.option.autoHide;return Object.keys(A).forEach(o=>this.option[o]=A[o]),t&&(this._removeHandlers(),this._setupHandlers()),n&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(A){return A?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),TA.overResizeElement===this&&delete TA.overResizeElement),this}_mouseOver(A){TA.overResizeElement||TA.dragElement||(TA.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(A){TA.overResizeElement===this&&(delete TA.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(A=>A.trim()).map(A=>new ll(this.el,A,{element:this.option.element,start:t=>this._resizeStart(t),stop:t=>this._resizeStop(t),move:t=>this._resizing(t,A)})),this}_resizeStart(A){this.sizeToContent=q.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=q.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=A,this._setupHelper(),this._applyChange();const t=q.initEvent(A,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(A,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(A,t),this._applyChange();const n=q.initEvent(A,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(n,this._ui()),this.triggerEvent("resize",n),this}_resizeStop(A){const t=q.initEvent(A,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=ns._originStyleProp.map(n=>this.el.style[n]),this.parentOriginStylePosition=this.el.parentElement.style.position;const A=this.el.parentElement,t=q.getValuesFromTransformedElement(A);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return ns._originStyleProp.forEach((A,t)=>{this.el.style[A]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(A,t){const n=this.startEvent,o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=A.clientX-n.clientX,c=this.sizeToContent?0:A.clientY-n.clientY;let d,h;t.indexOf("e")>-1?o.width+=a:t.indexOf("w")>-1&&(o.width-=a,o.left+=a,d=!0),t.indexOf("s")>-1?o.height+=c:t.indexOf("n")>-1&&(o.height-=c,o.top+=c,h=!0);const g=this._constrainSize(o.width,o.height,d,h);return Math.round(o.width)!==Math.round(g.width)&&(t.indexOf("w")>-1&&(o.left+=o.width-g.width),o.width=g.width),Math.round(o.height)!==Math.round(g.height)&&(t.indexOf("n")>-1&&(o.top+=o.height-g.height),o.height=g.height),o}_constrainSize(A,t,n,o){const a=this.option,c=(n?a.maxWidthMoveLeft:a.maxWidth)||Number.MAX_SAFE_INTEGER,d=a.minWidth/this.rectScale.x||A,h=(o?a.maxHeightMoveUp:a.maxHeight)||Number.MAX_SAFE_INTEGER,g=a.minHeight/this.rectScale.y||t;return{width:Math.min(c,Math.max(d,A)),height:Math.min(h,Math.max(g,t))}}_applyChange(){let A={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const{left:t,top:n}=this.el.parentElement.getBoundingClientRect();A={left:t,top:n,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const n=this.temporalRect[t],o=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(n-A[t])*o+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(A=>A.destroy()),delete this.handlers,this}};cl._originStyleProp=["width","height","position","left","top","opacity","zIndex"];var Dm='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',ul=class rs extends Ci{constructor(A,t={}){super(),this.el=A,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const n=t?.handle?.substring(1),o=A.gridstackNode;this.dragEls=!n||A.classList.contains(n)?[A]:o?.subGrid?[A.querySelector(t.handle)||A]:Array.from(A.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[A]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(A=>{A.addEventListener("mousedown",this._mouseDown),Ke&&(A.addEventListener("touchstart",Mr),A.addEventListener("pointerdown",Rr))}),this.el.classList.remove("ui-draggable-disabled"))}disable(A=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),Ke&&(t.removeEventListener("touchstart",Mr),t.removeEventListener("pointerdown",Rr))}),A||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(A){return Object.keys(A).forEach(t=>this.option[t]=A[t]),this}_mouseDown(A){if(He.touchHandled&&A.isTrusted&&(He.touchHandled=!1),!TA.mouseHandled)return A.button!==0||!this.dragEls.find(t=>t===A.target)&&A.target.closest(Dm)||this.option.cancel&&A.target.closest(this.option.cancel)||(this.mouseDownEvent=A,delete this.dragging,delete TA.dragElement,delete TA.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),Ke&&(A.currentTarget.addEventListener("touchmove",Or),A.currentTarget.addEventListener("touchend",Kr)),A.preventDefault(),document.activeElement&&document.activeElement.blur(),TA.mouseHandled=!0),!0}_callDrag(A){if(!this.dragging)return;const t=q.initEvent(A,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(A){const t=this.mouseDownEvent;if(this.lastDrag=A,this.dragging)if(this._dragFollow(A),TA.pauseDrag){const n=Number.isInteger(TA.pauseDrag)?TA.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(A),n)}else this._callDrag(A);else if(Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>3){this.dragging=!0,TA.dragElement=this;const n=this.el.gridstackNode?.grid;n?TA.dropElement=n.el.ddElement.ddDroppable:delete TA.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=q.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(A,this.el,this.helperContainment),this._setupHelperStyle(A);const o=q.initEvent(A,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(o,this.ui()),this.triggerEvent("dragstart",o),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(A){if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),Ke&&A.currentTarget&&(A.currentTarget.removeEventListener("touchmove",Or,!0),A.currentTarget.removeEventListener("touchend",Kr,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),TA.dropElement?.el===this.el.parentElement&&delete TA.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const t=q.initEvent(A,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(t),this.triggerEvent("dragstop",t),TA.dropElement&&TA.dropElement.drop(A)}delete this.helper,delete this.mouseDownEvent,delete TA.dragElement,delete TA.dropElement,delete TA.mouseHandled,A.preventDefault()}_keyEvent(A){const t=this.el.gridstackNode,n=t?.grid||TA.dropElement?.el?.gridstack;if(A.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),n?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&n&&(A.key==="r"||A.key==="R")){if(!q.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,n.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",q.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let A=this.el;return typeof this.option.helper=="function"?A=this.option.helper(this.el):this.option.helper==="clone"&&(A=q.cloneNode(this.el)),A.parentElement||q.appendTo(A,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=rs.originStyleProp.map(t=>this.el.style[t]),A}_setupHelperStyle(A){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(A),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){const A=this.helper,t=this.dragElementOriginStyle.transition||null;A.style.transition=this.dragElementOriginStyle.transition="none",rs.originStyleProp.forEach(n=>A.style[n]=this.dragElementOriginStyle[n]||null),setTimeout(()=>A.style.transition=t,50)}return delete this.dragElementOriginStyle,this}_dragFollow(A){const t={left:0,top:0},n=this.helper.style,o=this.dragOffset;n.left=(A.clientX+o.offsetLeft-t.left)*this.dragTransform.xScale+"px",n.top=(A.clientY+o.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(A,t,n){let o=0,a=0;n&&(o=this.dragTransform.xOffset,a=this.dragTransform.yOffset);const c=t.getBoundingClientRect();return{left:c.left,top:c.top,offsetLeft:-A.clientX+c.left-o,offsetTop:-A.clientY+c.top-a,width:c.width*this.dragTransform.xScale,height:c.height*this.dragTransform.yScale}}ui(){const A=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:(t.top-A.top)*this.dragTransform.yScale,left:(t.left-A.left)*this.dragTransform.xScale}}}};ul.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];var Nm=class extends Ci{constructor(e,A={}){super(),this.el=e,this.option=A,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,A){super.on(e,A)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),Ke&&(this.el.addEventListener("pointerenter",sl),this.el.addEventListener("pointerleave",al)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),Ke&&(this.el.removeEventListener("pointerenter",sl),this.el.removeEventListener("pointerleave",al)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(A=>this.option[A]=e[A]),this._setupAccept(),this}_mouseEnter(e){if(!TA.dragElement||He.touchHandled&&e.isTrusted||!this._canDrop(TA.dragElement.el))return;e.preventDefault(),e.stopPropagation(),TA.dropElement&&TA.dropElement!==this&&TA.dropElement._mouseLeave(e,!0),TA.dropElement=this;const A=q.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(A,this._ui(TA.dragElement)),this.triggerEvent("dropover",A),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,A=!1){if(!TA.dragElement||TA.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const t=q.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(t,this._ui(TA.dragElement)),this.triggerEvent("dropout",t),TA.dropElement===this&&(delete TA.dropElement,!A)){let n,o=this.el.parentElement;for(;!n&&o;)n=o.ddElement?.ddDroppable,o=o.parentElement;n&&n._mouseEnter(e)}}drop(e){e.preventDefault();const A=q.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(A,this._ui(TA.dragElement)),this.triggerEvent("drop",A)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}},Lm=class mu{static init(A){return A.ddElement||(A.ddElement=new mu(A)),A.ddElement}constructor(A){this.el=A}on(A,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.on(A,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.on(A,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.on(A,t),this}off(A){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.off(A):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.off(A):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.off(A),this}setupDraggable(A){return this.ddDraggable?this.ddDraggable.updateOption(A):this.ddDraggable=new ul(this.el,A),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(A){return this.ddResizable?this.ddResizable.updateOption(A):this.ddResizable=new cl(this.el,A),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(A){return this.ddDroppable?this.ddDroppable.updateOption(A):this.ddDroppable=new Nm(this.el,A),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},Tm=class{resizable(e,A,t,n){return this._getDDElements(e,A).forEach(o=>{if(A==="disable"||A==="enable")o.ddResizable&&o.ddResizable[A]();else if(A==="destroy")o.ddResizable&&o.cleanResizable();else if(A==="option")o.setupResizable({[t]:n});else{const a=o.el.gridstackNode.grid;let c=o.el.getAttribute("gs-resize-handles")||a.opts.resizable.handles||"e,s,se";c==="all"&&(c="n,e,s,w,se,sw,ne,nw");const d=!a.opts.alwaysShowResizeHandle;o.setupResizable({...a.opts.resizable,handles:c,autoHide:d,start:A.start,stop:A.stop,resize:A.resize})}}),this}draggable(e,A,t,n){return this._getDDElements(e,A).forEach(o=>{if(A==="disable"||A==="enable")o.ddDraggable&&o.ddDraggable[A]();else if(A==="destroy")o.ddDraggable&&o.cleanDraggable();else if(A==="option")o.setupDraggable({[t]:n});else{const a=o.el.gridstackNode.grid;o.setupDraggable({...a.opts.draggable,start:A.start,stop:A.stop,drag:A.drag})}}),this}dragIn(e,A){return this._getDDElements(e).forEach(t=>t.setupDraggable(A)),this}droppable(e,A,t,n){return typeof A.accept=="function"&&!A._accept&&(A._accept=A.accept,A.accept=o=>A._accept(o)),this._getDDElements(e,A).forEach(o=>{A==="disable"||A==="enable"?o.ddDroppable&&o.ddDroppable[A]():A==="destroy"?o.ddDroppable&&o.cleanDroppable():A==="option"?o.setupDroppable({[t]:n}):o.setupDroppable(A)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,A,t){return this._getDDElements(e).forEach(n=>n.on(A,o=>{t(o,TA.dragElement?TA.dragElement.el:o.target,TA.dragElement?TA.dragElement.helper:null)})),this}off(e,A){return this._getDDElements(e).forEach(t=>t.off(A)),this}_getDDElements(e,A){const t=e.gridstack||A!=="destroy"&&A!=="disable",n=q.getElements(e);return n.length?n.map(o=>o.ddElement||(t?Lm.init(o):null)).filter(o=>o):[]}},we=new Tm,en=class LA{static init(A={},t=".grid-stack"){if(typeof document>"u")return null;const n=LA.getGridElement(t);return n?(n.gridstack||(n.gridstack=new LA(n,q.cloneDeep(A))),n.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
27
27
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(A={},t=".grid-stack"){const n=[];return typeof document>"u"||(LA.getGridElements(t).forEach(o=>{o.gridstack||(o.gridstack=new LA(o,q.cloneDeep(A))),n.push(o.gridstack)}),n.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
28
- Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(A,t={}){if(!A)return null;let n=A;if(n.gridstack){const o=n.gridstack;return t&&(o.opts={...o.opts,...t}),t.children!==void 0&&o.load(t.children),o}return(!A.classList.contains("grid-stack")||LA.addRemoveCB)&&(LA.addRemoveCB?n=LA.addRemoveCB(A,t,!0,!0):n=q.createDiv(["grid-stack",t.class],A)),LA.init(t,n)}static registerEngine(A){LA.engineClass=A}get placeholder(){if(!this._placeholder){this._placeholder=q.createDiv([this.opts.placeholderClass,Ie.itemClass,this.opts.itemClass]);const A=q.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(A.textContent=this.opts.placeholderText)}return this._placeholder}constructor(A,t={}){this.el=A,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},A.gridstack=this,this.opts=t=t||{},A.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const n=q.toNumber(A.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const o=t.columnOpts;if(o){const h=o.breakpoints;!o.columnWidth&&!h?.length?delete t.columnOpts:(o.columnMax=o.columnMax||12,h?.length>1&&h.sort((g,B)=>(B.w||0)-(g.w||0)))}const a={...q.cloneDeep(Ie),column:q.toNumber(A.getAttribute("gs-column"))||Ie.column,minRow:n||q.toNumber(A.getAttribute("gs-min-row"))||Ie.minRow,maxRow:n||q.toNumber(A.getAttribute("gs-max-row"))||Ie.maxRow,staticGrid:q.toBool(A.getAttribute("gs-static"))||Ie.staticGrid,sizeToContent:q.toBool(A.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||Ie.draggable.handle},removableOptions:{accept:t.itemClass||Ie.removableOptions.accept,decline:Ie.removableOptions.decline}};A.getAttribute("gs-animate")&&(a.animate=q.toBool(A.getAttribute("gs-animate"))),t=q.defaults(t,a),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=A.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const c=this.el.closest("."+Ie.itemClass)?.gridstackNode;if(c&&(c.subGrid=this,this.parentGridNode=c,this.el.classList.add("grid-stack-nested"),c.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==Ie.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const h=t.cellHeight;delete t.cellHeight,this.cellHeight(h)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=Ke),this._setStaticClass();const d=t.engineClass||LA.engineClass||wi;if(this.engine=new d({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:h=>{h.forEach(g=>{const B=g.el;B&&(g._removeDOM?(B&&B.remove(),delete g._removeDOM):this._writePosAttr(B,g))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(h=>this._prepareElement(h)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const h=t.children;delete t.children,h.length&&this.load(h)}this.setAnimation(),t.subGridDynamic&&!TA.pauseDrag&&(TA.pauseDrag=!0),t.draggable?.pause!==void 0&&(TA.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(A=this.opts){this.el.classList.add("gs-"+A.column),typeof A.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/A.column}%`)}addWidget(A){if(!A)return;if(typeof A=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(A.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(A);let t,n=A;if(n.grid=this,n.el?t=n.el:LA.addRemoveCB?t=LA.addRemoveCB(this.el,A,!0,!1):t=this.createWidgetDivs(n),!t)return;if(n=t.gridstackNode,n&&t.parentElement===this.el&&this.engine.nodes.find(a=>a._id===n._id))return t;const o=this._readAttr(t);return q.defaults(A,o),this.engine.prepareNode(A),this.el.appendChild(t),this.makeWidget(t,A),t}createWidgetDivs(A){const t=q.createDiv(["grid-stack-item",this.opts.itemClass]),n=q.createDiv(["grid-stack-item-content"],t);return q.lazyLoad(A)?A.visibleObservable||(A.visibleObservable=new IntersectionObserver(([o])=>{o.isIntersecting&&(A.visibleObservable?.disconnect(),delete A.visibleObservable,LA.renderCB(n,A),A.grid?.prepareDragDrop(A.el))}),window.setTimeout(()=>A.visibleObservable?.observe(t))):LA.renderCB(n,A),t}makeSubGrid(A,t,n,o=!0){let a=A.gridstackNode;if(a||(a=this.makeWidget(A).gridstackNode),a.subGrid?.el)return a.subGrid;let c,d=this;for(;d&&!c;)c=d.opts?.subGridOpts,d=d.parentGridNode?.grid;t=q.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...c||{},...t||a.subGridOpts||{}}),a.subGridOpts=t;let h;t.column==="auto"&&(h=!0,t.column=Math.max(a.w||1,n?.w||1),delete t.columnOpts);let g=a.el.querySelector(".grid-stack-item-content"),B,w;if(o&&(this._removeDD(a.el),w={...a,x:0,y:0},q.removeInternalForSave(w),delete w.subGridOpts,a.content&&(w.content=a.content,delete a.content),LA.addRemoveCB?B=LA.addRemoveCB(this.el,w,!0,!1):(B=q.createDiv(["grid-stack-item"]),B.appendChild(g),g=q.createDiv(["grid-stack-item-content"],a.el)),this.prepareDragDrop(a.el)),n){const y=h?t.column:a.w,v=a.h+n.h,I=a.el.style;I.transition="none",this.update(a.el,{w:y,h:v}),setTimeout(()=>I.transition=null)}const m=a.subGrid=LA.addGrid(g,t);return n?._moving&&(m._isTemp=!0),h&&(m._autoColumn=!0),o&&m.makeWidget(B,w),n&&(n._moving?window.setTimeout(()=>q.simulateMouseEvent(n._event,"mouseenter",m.el),0):m.makeWidget(a.el,a)),this.resizeToContentCheck(!1,a),m}removeAsSubGrid(A){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(n=>{n.x+=this.parentGridNode.x,n.y+=this.parentGridNode.y,t.makeWidget(n.el,n)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,A&&window.setTimeout(()=>q.simulateMouseEvent(A._event,"mouseenter",t.el),0))}save(A=!0,t=!1,n=LA.saveCB,o){const a=this.engine.save(A,n,o);if(a.forEach(c=>{if(A&&c.el&&!c.subGrid&&!n)c.content=c.el.querySelector(".grid-stack-item-content")?.innerHTML,c.content||delete c.content;else if(!A&&!n&&delete c.content,c.subGrid?.el){const d=c.w||c.subGrid.getColumn(),h=c.subGrid.save(A,t,n,d);c.subGridOpts=t?h:{children:h},delete c.subGrid}delete c.el}),t){const c=q.cloneDeep(this.opts);c.marginBottom===c.marginTop&&c.marginRight===c.marginLeft&&c.marginTop===c.marginRight&&(c.margin=c.marginTop,delete c.marginTop,delete c.marginRight,delete c.marginBottom,delete c.marginLeft),c.rtl===(this.el.style.direction==="rtl")&&(c.rtl="auto"),this._isAutoCellHeight&&(c.cellHeight="auto"),this._autoColumn&&(c.column="auto");const d=c._alwaysShowResizeHandle;return delete c._alwaysShowResizeHandle,d!==void 0?c.alwaysShowResizeHandle=d:delete c.alwaysShowResizeHandle,q.removeInternalAndSame(c,Ie),c.children=a,c}return a}load(A,t=LA.addRemoveCB||!0){A=q.cloneDeep(A);const n=this.getColumn();A.forEach(B=>{B.w=B.w||B.minW||1,B.h=B.h||B.minH||1}),A=q.sort(A),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;A.forEach(B=>{o=Math.max(o,(B.x||0)+B.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o),o>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=A,this.engine.columnChanged(o,n,this.responseLayout),A=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(A,o,!0));const a=LA.addRemoveCB;typeof t=="function"&&(LA.addRemoveCB=t);const c=[];this.batchUpdate();const d=!this.engine.nodes.length,h=d&&this.opts.animate;h&&this.setAnimation(!1),!d&&t&&[...this.engine.nodes].forEach(B=>{B.id&&(q.find(A,B.id)||(LA.addRemoveCB&&LA.addRemoveCB(this.el,B,!1,!1),c.push(B),this.removeWidget(B.el,!0,!1)))}),this.engine._loading=!0;const g=[];return this.engine.nodes=this.engine.nodes.filter(B=>q.find(A,B.id)?(g.push(B),!1):!0),A.forEach(B=>{const w=q.find(g,B.id);if(w){if(q.shouldSizeToContent(w)&&(B.h=w.h),this.engine.nodeBoundFix(B),(B.autoPosition||B.x===void 0||B.y===void 0)&&(B.w=B.w||w.w,B.h=B.h||w.h,this.engine.findEmptyPosition(B)),this.engine.nodes.push(w),q.samePos(w,B)&&this.engine.nodes.length>1&&(this.moveNode(w,{...B,forceCollide:!0}),q.copyPos(B,w)),this.update(w.el,B),B.subGridOpts?.children){const m=w.el.querySelector(".grid-stack");m&&m.gridstack&&m.gridstack.load(B.subGridOpts.children)}}else t&&this.addWidget(B)}),delete this.engine._loading,this.engine.removedNodes=c,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,a?LA.addRemoveCB=a:delete LA.addRemoveCB,h&&this.setAnimation(!0,!0),this}batchUpdate(A=!0){return this.engine.batchUpdate(A),A||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(A=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!A||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const o=q.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/o)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(A){if(A!==void 0&&this._isAutoCellHeight!==(A==="auto")&&(this._isAutoCellHeight=A==="auto",this._updateResizeEvent()),(A==="initial"||A==="auto")&&(A=void 0),A===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;A=this.cellWidth()+n}const t=q.parseHeight(A);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(A=!1){return A&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const A=this.opts.columnOpts;if(!A||!A.columnWidth&&!A.breakpoints?.length)return!1;const t=this.getColumn();let n=t;const o=this._widthOrContainer(!0);if(A.columnWidth)n=Math.min(Math.round(o/A.columnWidth)||1,A.columnMax);else{n=A.columnMax;let a=0;for(;a<A.breakpoints.length&&o<=A.breakpoints[a].w;)n=A.breakpoints[a++].c||t}if(n!==t){const a=A.breakpoints?.find(c=>c.c===n);return this.column(n,a?.layout||A.layout),!0}return!1}compact(A="compact",t=!0){return this.engine.compact(A,t),this._triggerChangeEvent(),this}column(A,t="moveScale"){if(!A||A<1||this.opts.column===A)return this;const n=this.getColumn();return this.opts.column=A,this.engine?(this.engine.column=A,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,A,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(A=>A.matches("."+this.opts.itemClass)&&!A.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(A=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),A?this.el.parentNode.removeChild(this.el):(this.removeAll(A),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(A){return this.opts.float!==A&&(this.opts.float=this.engine.float=A,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(A,t=!1){const n=this.el.getBoundingClientRect();let o;t?o={top:n.top+document.documentElement.scrollTop,left:n.left}:o={top:this.el.offsetTop,left:this.el.offsetLeft};const a=A.left-o.left,c=A.top-o.top,d=n.width/this.getColumn(),h=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(a/d),y:Math.floor(c/h)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(A,t,n,o){return this.engine.isAreaEmpty(A,t,n,o)}makeWidget(A,t){const n=LA.getElement(A);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,t);const o=n.gridstackNode;this._updateContainerHeight(),o.subGridOpts&&this.makeSubGrid(n,o.subGridOpts,void 0,!1);let a;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(a=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),a&&delete this._ignoreLayoutsNodeChange,n}on(A,t){return A.indexOf(" ")!==-1?(A.split(" ").forEach(n=>this.on(n,t)),this):(A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable"?(A==="enable"||A==="disable"?this._gsEventHandler[A]=n=>t(n):this._gsEventHandler[A]=n=>{n.detail&&t(n,n.detail)},this.el.addEventListener(A,this._gsEventHandler[A])):A==="drag"||A==="dragstart"||A==="dragstop"||A==="resizestart"||A==="resize"||A==="resizestop"||A==="dropped"||A==="resizecontent"?this._gsEventHandler[A]=t:console.error("GridStack.on("+A+") event not supported"),this)}off(A){return A.indexOf(" ")!==-1?(A.split(" ").forEach(t=>this.off(t)),this):((A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable")&&this._gsEventHandler[A]&&this.el.removeEventListener(A,this._gsEventHandler[A]),delete this._gsEventHandler[A],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(A=>this.off(A)),this}removeWidget(A,t=!0,n=!0){return A?(LA.getElements(A).forEach(o=>{if(o.parentElement&&o.parentElement!==this.el)return;let a=o.gridstackNode;a||(a=this.engine.nodes.find(c=>o===c.el)),a&&(t&&LA.addRemoveCB&&LA.addRemoveCB(this.el,a,!1,!1),delete o.gridstackNode,this._removeDD(o),this.engine.removeNode(a,t,n),t&&o.parentElement&&o.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(A=!0,t=!0){return this.engine.nodes.forEach(n=>{A&&LA.addRemoveCB&&LA.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(A,t),t&&this._triggerRemoveEvent(),this}setAnimation(A=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(A)}):A?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=A,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(A,t=!0,n=!0){return!!this.opts.staticGrid===A?this:(A?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&n&&o.subGrid.setStatic(A,t,n)}),t&&this._setStaticClass(),this)}updateOptions(A){const t=this.opts;return A===t?this:(A.acceptWidgets!==void 0&&(t.acceptWidgets=A.acceptWidgets,this._setupAcceptWidget()),A.animate!==void 0&&this.setAnimation(A.animate),A.cellHeight&&this.cellHeight(A.cellHeight),A.class!==void 0&&A.class!==t.class&&(t.class&&this.el.classList.remove(t.class),A.class&&this.el.classList.add(A.class)),A.columnOpts?(this.opts.columnOpts=A.columnOpts,this.checkDynamicColumn()):A.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof A.column=="number"&&this.column(A.column),A.margin!==void 0&&this.margin(A.margin),A.staticGrid!==void 0&&this.setStatic(A.staticGrid),A.disableDrag!==void 0&&!A.staticGrid&&this.enableMove(!A.disableDrag),A.disableResize!==void 0&&!A.staticGrid&&this.enableResize(!A.disableResize),A.float!==void 0&&this.float(A.float),A.row!==void 0?(t.minRow=t.maxRow=t.row=A.row,this._updateContainerHeight()):(A.minRow!==void 0&&(t.minRow=A.minRow,this._updateContainerHeight()),A.maxRow!==void 0&&(t.maxRow=A.maxRow)),A.lazyLoad!==void 0&&(t.lazyLoad=A.lazyLoad),A.children?.length&&this.load(A.children),this)}update(A,t){return LA.getElements(A).forEach(n=>{const o=n?.gridstackNode;if(!o)return;const a={...q.copyPos({},o),...q.cloneDeep(t)};this.engine.nodeBoundFix(a),delete a.autoPosition;const c=["x","y","w","h"];let d;if(c.some(B=>a[B]!==void 0&&a[B]!==o[B])&&(d={},c.forEach(B=>{d[B]=a[B]!==void 0?a[B]:o[B],delete a[B]})),!d&&(a.minW||a.minH||a.maxW||a.maxH)&&(d={}),a.content!==void 0){const B=n.querySelector(".grid-stack-item-content");B&&B.textContent!==a.content&&(o.content=a.content,LA.renderCB(B,a),o.subGrid?.el&&(B.appendChild(o.subGrid.el),o.subGrid._updateContainerHeight())),delete a.content}let h=!1,g=!1;for(const B in a)B[0]!=="_"&&o[B]!==a[B]&&(o[B]=a[B],h=!0,g=g||!this.opts.staticGrid&&(B==="noResize"||B==="noMove"||B==="locked"));if(q.sanitizeMinMax(o),d){const B=d.w!==void 0&&d.w!==o.w;this.moveNode(o,d),B&&o.subGrid?o.subGrid.onResize(this.hasAnimationCSS()?o.w:void 0):this.resizeToContentCheck(B,o),delete o._orig}(d||h)&&this._writeAttr(n,o),g&&this.prepareDragDrop(o.el),LA.updateCB&&LA.updateCB(o)}),this}moveNode(A,t){const n=A._updating;n||this.engine.cleanNodes().beginUpdate(A),this.engine.moveNode(A,t),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(A){if(!A||(A.classList.remove("size-to-content-max"),!A.clientHeight))return;const t=A.gridstackNode;if(!t)return;const n=t.grid;if(!n||A.parentElement!==n.el)return;const o=n.getCellHeight(!0);if(!o)return;let a=t.h?t.h*o:A.clientHeight,c;if(t.resizeToContentParent&&(c=A.querySelector(t.resizeToContentParent)),c||(c=A.querySelector(LA.resizeToContentParent)),!c)return;const d=A.clientHeight-c.clientHeight,h=t.h?t.h*o-d:c.clientHeight;let g;if(t.subGrid){g=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const m=t.subGrid.el.getBoundingClientRect(),y=A.getBoundingClientRect();g+=m.top-y.top}else{if(t.subGridOpts?.children?.length)return;{const m=c.firstElementChild;if(!m){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${LA.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}g=m.getBoundingClientRect().height||h}}if(h===g)return;a+=g-h;let B=Math.ceil(a/o);const w=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;w&&B>w&&(B=w,A.classList.add("size-to-content-max")),t.minH&&B<t.minH?B=t.minH:t.maxH&&B>t.maxH&&(B=t.maxH),B!==t.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(t,{h:B}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(A){LA.resizeToContentCB?LA.resizeToContentCB(A):this.resizeToContent(A)}rotate(A,t){return LA.getElements(A).forEach(n=>{const o=n.gridstackNode;if(!q.canBeRotated(o))return;const a={w:o.h,h:o.w,minH:o.minW,minW:o.minH,maxH:o.maxW,maxW:o.maxH};if(t){const d=t.left>0?Math.floor(t.left/this.cellWidth()):0,h=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;a.x=o.x+d-(o.h-(h+1)),a.y=o.y+h-d}Object.keys(a).forEach(d=>{a[d]===void 0&&delete a[d]});const c=o._orig;this.update(n,a),o._orig=c}),this}margin(A){if(!(typeof A=="string"&&A.split(" ").length>1)){const t=q.parseHeight(A);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=A,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(A){return this.engine.willItFit(A)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const A=this.engine.getDirtyNodes(!0);return A&&A.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(A),this._triggerEvent("change",A)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(A,t){const n=t?new CustomEvent(A,{bubbles:!1,detail:t}):new Event(A);let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;return o.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const A=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!n)return this;if(!A&&!this.opts.minRow){const a=q.parseHeight(getComputedStyle(this.el).minHeight);if(a.h>0&&a.unit===o){const c=Math.floor(a.h/n);t<c&&(t=c)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[A?"minHeight":"height"]=t*n+o),A&&q.shouldSizeToContent(A)&&A.grid.resizeToContentCBCheck(A.el),this}_prepareElement(A,t=!1,n){n=n||this._readAttr(A),A.gridstackNode=n,n.el=A,n.grid=this,n=this.engine.addNode(n,t),this._writeAttr(A,n),A.classList.add(Ie.itemClass,this.opts.itemClass);const o=q.shouldSizeToContent(n);return o?A.classList.add("size-to-content"):A.classList.remove("size-to-content"),o&&this.resizeToContentCheck(!1,n),q.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(A,t){return(!t._moving&&!t._resizing||this._placeholder===A)&&(A.style.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,A.style.left=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,A.style.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,A.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),A.setAttribute("gs-x",String(t.x)),A.setAttribute("gs-y",String(t.y)),t.w>1?A.setAttribute("gs-w",String(t.w)):A.removeAttribute("gs-w"),t.h>1?A.setAttribute("gs-h",String(t.h)):A.removeAttribute("gs-h"),this}_writeAttr(A,t){if(!t)return this;this._writePosAttr(A,t);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const o in n)t[o]?A.setAttribute(n[o],String(t[o])):A.removeAttribute(n[o]);return this}_readAttr(A,t=!0){const n={};n.x=q.toNumber(A.getAttribute("gs-x")),n.y=q.toNumber(A.getAttribute("gs-y")),n.w=q.toNumber(A.getAttribute("gs-w")),n.h=q.toNumber(A.getAttribute("gs-h")),n.autoPosition=q.toBool(A.getAttribute("gs-auto-position")),n.noResize=q.toBool(A.getAttribute("gs-no-resize")),n.noMove=q.toBool(A.getAttribute("gs-no-move")),n.locked=q.toBool(A.getAttribute("gs-locked"));const o=A.getAttribute("gs-size-to-content");o&&(o==="true"||o==="false"?n.sizeToContent=q.toBool(o):n.sizeToContent=parseInt(o,10)),n.id=A.getAttribute("gs-id"),n.maxW=q.toNumber(A.getAttribute("gs-max-w")),n.minW=q.toNumber(A.getAttribute("gs-min-w")),n.maxH=q.toNumber(A.getAttribute("gs-max-h")),n.minH=q.toNumber(A.getAttribute("gs-min-h")),t&&(n.w===1&&A.removeAttribute("gs-w"),n.h===1&&A.removeAttribute("gs-h"),n.maxW&&A.removeAttribute("gs-max-w"),n.minW&&A.removeAttribute("gs-min-w"),n.maxH&&A.removeAttribute("gs-max-h"),n.minH&&A.removeAttribute("gs-min-h"));for(const a in n){if(!n.hasOwnProperty(a))return;!n[a]&&n[a]!==0&&a!=="sizeToContent"&&delete n[a]}return n}_setStaticClass(){const A=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...A),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...A),this.el.removeAttribute("gs-static")),this}onResize(A=this.el?.clientWidth){if(!A||this.prevWidth===A)return;this.prevWidth=A,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(n=>{n.subGrid&&n.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(A=!1,t=void 0){if(this.engine){if(A&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)q.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(n=>q.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(o=>{q.shouldSizeToContent(o)&&this.resizeToContentCBCheck(o.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(A=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!A&&t&&!this.resizeObserver?(this._sizeThrottle=q.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(A||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(A=".grid-stack-item"){return q.getElement(A)}static getElements(A=".grid-stack-item"){return q.getElements(A)}static getGridElement(A){return LA.getElement(A)}static getGridElements(A){return q.getElements(A)}_initMargin(){let A,t=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(A=q.parseHeight(this.opts.margin),this.opts.marginUnit=A.unit,t=this.opts.margin=A.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=t:(A=q.parseHeight(this.opts[a]),this.opts[a]=A.h,delete this.opts.margin)}),this.opts.marginUnit=A.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return we}static setupDragIn(A,t,n,o=document){t?.pause!==void 0&&(TA.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof A=="string"?q.getElements(A,o):A).forEach((a,c)=>{we.isDraggable(a)||we.dragIn(a,t),n?.[c]&&(a.gridstackNode=n[c])})}movable(A,t){return this.opts.staticGrid?this:(LA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noMove:o.noMove=!0,this.prepareDragDrop(o.el))}),this)}resizable(A,t){return this.opts.staticGrid?this:(LA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noResize:o.noResize=!0,this.prepareDragDrop(o.el))}),this)}disable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!1,A),this.enableResize(!1,A),this._triggerEvent("disable"),this}enable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!0,A),this.enableResize(!0,A),this._triggerEvent("enable"),this}enableMove(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableMove(A,t)}),this)}enableResize(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableResize(A,t)}),this)}cancelDrag(){const A=this._placeholder?.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&LA._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(A){return we.draggable(A,"destroy").resizable(A,"destroy"),A.gridstackNode&&delete A.gridstackNode._initDD,delete A.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return we.droppable(this.el,"destroy"),this;let A,t;const n=(o,a,c)=>{c=c||a;const d=c.gridstackNode;if(!d)return;if(!d.grid?.el){c.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const m=c.getBoundingClientRect();c.style.left=m.x+(this.dragTransform.xScale-1)*(o.clientX-m.x)/this.dragTransform.xScale+"px",c.style.top=m.y+(this.dragTransform.yScale-1)*(o.clientY-m.y)/this.dragTransform.yScale+"px",c.style.transformOrigin="0px 0px"}let{top:h,left:g}=c.getBoundingClientRect();const B=this.el.getBoundingClientRect();g-=B.left,h-=B.top;const w={position:{top:h*this.dragTransform.xScale,left:g*this.dragTransform.yScale}};if(d._temporaryRemoved){if(d.x=Math.max(0,Math.round(g/t)),d.y=Math.max(0,Math.round(h/A)),delete d.autoPosition,this.engine.nodeBoundFix(d),!this.engine.willItFit(d)){if(d.autoPosition=!0,!this.engine.willItFit(d)){we.off(a,"drag");return}d._willFitPos&&(q.copyPos(d,d._willFitPos),delete d._willFitPos)}this._onStartMoving(c,o,w,d,t,A)}else this._dragOrResize(c,o,w,d,t,A)};return we.droppable(this.el,{accept:o=>{const a=o.gridstackNode||this._readAttr(o,!1);if(a?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let c=!0;if(typeof this.opts.acceptWidgets=="function")c=this.opts.acceptWidgets(o);else{const d=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;c=o.matches(d)}if(c&&a&&this.opts.maxRow){const d={w:a.w,h:a.h,minW:a.minW,minH:a.minH};c=this.engine.willItFit(d)}return c}}).on(this.el,"dropover",(o,a,c)=>{let d=c?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._temporaryRemoved)return!1;if(d?._sidebarOrig&&(d.w=d._sidebarOrig.w,d.h=d._sidebarOrig.h),d?.grid&&d.grid!==this&&!d._temporaryRemoved&&d.grid._leave(a,c),c=c||a,t=this.cellWidth(),A=this.getCellHeight(!0),!d){const B=c.getAttribute("data-gs-widget")||c.getAttribute("gridstacknode");if(B){try{d=JSON.parse(B)}catch{console.error("Gridstack dropover: Bad JSON format: ",B)}c.removeAttribute("data-gs-widget"),c.removeAttribute("gridstacknode")}d||(d=this._readAttr(c)),d._sidebarOrig={w:d.w,h:d.h}}d.grid||(d.el||(d={...d}),d._isExternal=!0,c.gridstackNode=d);const h=d.w||Math.round(c.offsetWidth/t)||1,g=d.h||Math.round(c.offsetHeight/A)||1;return d.grid&&d.grid!==this?(a._gridstackNodeOrig||(a._gridstackNodeOrig=d),a.gridstackNode=d={...d,w:h,h:g,grid:this},delete d.x,delete d.y,this.engine.cleanupNode(d).nodeBoundFix(d),d._initDD=d._isExternal=d._temporaryRemoved=!0):(d.w=h,d.h=g,d._temporaryRemoved=!0),LA._itemRemoving(d.el,!1),we.on(a,"drag",n),n(o,a,c),!1}).on(this.el,"dropout",(o,a,c)=>{const d=c?.gridstackNode||a.gridstackNode;return d&&(!d.grid||d.grid===this)&&(this._leave(a,c),this._isTemp&&this.removeAsSubGrid(d)),!1}).on(this.el,"drop",(o,a,c)=>{const d=c?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._isExternal)return!1;const h=!!this.placeholder.parentElement,g=a!==c;this.placeholder.remove(),delete this.placeholder.gridstackNode,h&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const B=a._gridstackNodeOrig;if(delete a._gridstackNodeOrig,h&&B?.grid&&B.grid!==this){const m=B.grid;m.engine.removeNodeFromLayoutCache(B),m.engine.removedNodes.push(B),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!d||(h&&(this.engine.cleanupNode(d),d.grid=this),delete d.grid?._isTemp,we.off(a,"drag"),c!==a?(c.remove(),a=c):a.remove(),this._removeDD(a),!h))return!1;const w=d.subGrid?.el?.gridstack;return q.copyPos(d,this._readAttr(this.placeholder)),q.removePositioningStyles(a),g&&(d.content||d.subGridOpts||LA.addRemoveCB)?(delete d.el,a=this.addWidget(d)):(this._prepareElement(a,!0,d),this.el.appendChild(a),this.resizeToContentCheck(!1,d),w&&(w.parentGridNode=d),this._updateContainerHeight()),this.engine.addedNodes.push(d),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...o,type:"dropped"},B&&B.grid?B:void 0,d),!1}),this}static _itemRemoving(A,t){if(!A)return;const n=A?A.gridstackNode:void 0;!n?.grid||A.classList.contains(n.grid.opts.removableOptions.decline)||(t?n._isAboutToRemove=!0:delete n._isAboutToRemove,t?A.classList.add("grid-stack-item-removing"):A.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const A=document.querySelector(this.opts.removable);return A?(!this.opts.staticGrid&&!we.isDroppable(A)&&we.droppable(A,this.opts.removableOptions).on(A,"dropover",(t,n)=>LA._itemRemoving(n,!0)).on(A,"dropout",(t,n)=>LA._itemRemoving(n,!1)),this):this}prepareDragDrop(A,t=!1){const n=A?.gridstackNode;if(!n)return;const o=n.noMove||this.opts.disableDrag,a=n.noResize||this.opts.disableResize,c=this.opts.staticGrid||o&&a;if((t||c)&&(n._initDD&&(this._removeDD(A),delete n._initDD),c&&A.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!n._initDD){let d,h;const g=(m,y)=>{this.triggerEvent(m,m.target),d=this.cellWidth(),h=this.getCellHeight(!0),this._onStartMoving(A,m,y,n,d,h)},B=(m,y)=>{this._dragOrResize(A,m,y,n,d,h)},w=m=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const y=n.w!==n._orig.w,v=m.target;if(!(!v.gridstackNode||v.gridstackNode.grid!==this)){if(n.el=v,n._isAboutToRemove){const I=A.gridstackNode.grid;I._gsEventHandler[m.type]&&I._gsEventHandler[m.type](m,v),I.engine.nodes.push(n),I.removeWidget(A,!0,!0)}else q.removePositioningStyles(v),n._temporaryRemoved?(this._writePosAttr(v,n),this.engine.addNode(n)):this._writePosAttr(v,n),this.triggerEvent(m,v);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),m.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(y,n))}};we.draggable(A,{start:g,stop:w,drag:B}).resizable(A,{start:g,stop:w,resize:B}),n._initDD=!0}return we.draggable(A,o?"disable":"enable").resizable(A,a?"disable":"enable"),this}_onStartMoving(A,t,n,o,a,c){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=q.getValuesFromTransformedElement(A);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const d=this.placeholder.closest(".grid-stack");this.dragTransform=q.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=n.position,o._prevYPix=n.position.top,o._moving=t.type==="dragstart",o._resizing=t.type==="resizestart",delete o._lastTried,t.type==="dropover"&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(a,c,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const d=this.getColumn()-o.x,h=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;we.resizable(A,"option","minWidth",a*Math.min(o.minW||1,d)).resizable(A,"option","minHeight",c*Math.min(o.minH||1,h)).resizable(A,"option","maxWidth",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,d)).resizable(A,"option","maxWidthMoveLeft",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(A,"option","maxHeight",c*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,h)).resizable(A,"option","maxHeightMoveUp",c*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(A,t,n,o,a,c){const d={...o._orig};let h,g=this.opts.marginLeft,B=this.opts.marginRight,w=this.opts.marginTop,m=this.opts.marginBottom;const y=Math.round(c*.1),v=Math.round(a*.1);if(g=Math.min(g,v),B=Math.min(B,v),w=Math.min(w,y),m=Math.min(m,y),t.type==="drag"){if(o._temporaryRemoved)return;const L=n.position.top-o._prevYPix;o._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&q.updateScrollPosition(A,n.position,L);const k=n.position.left+(n.position.left>o._lastUiPosition.left?-B:g),V=n.position.top+(n.position.top>o._lastUiPosition.top?-m:w);d.x=Math.round(k/a),d.y=Math.round(V/c);const F=this._extraDragRow;if(this.engine.collide(o,d)){const M=this.getRow();let tA=Math.max(0,d.y+o.h-M);this.opts.maxRow&&M+tA>this.opts.maxRow&&(tA=Math.max(0,this.opts.maxRow-M)),this._extraDragRow=tA}else this._extraDragRow=0;if(this._extraDragRow!==F&&this._updateContainerHeight(),o.x===d.x&&o.y===d.y)return}else if(t.type==="resize"){if(d.x<0||(q.updateScrollResize(t,A,c),d.w=Math.round((n.size.width-g)/a),d.h=Math.round((n.size.height-w)/c),o.w===d.w&&o.h===d.h)||o._lastTried&&o._lastTried.w===d.w&&o._lastTried.h===d.h)return;const L=n.position.left+g,k=n.position.top+w;d.x=Math.round(L/a),d.y=Math.round(k/c),h=!0}o._event=t,o._lastTried=d;const I={x:n.position.left+g,y:n.position.top+w,w:(n.size?n.size.width:o.w*a)-g-B,h:(n.size?n.size.height:o.h*c)-w-m};if(this.engine.moveNodeCheck(o,{...d,cellWidth:a,cellHeight:c,rect:I,resizing:h})){o._lastUiPosition=n.position,this.engine.cacheRects(a,c,w,B,m,g),delete o._skipDown,h&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const L=t.target;o._sidebarOrig||this._writePosAttr(L,o),this.triggerEvent(t,L)}}triggerEvent(A,t){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[A.type]&&n._gsEventHandler[A.type](A,t)}_leave(A,t){t=t||A;const n=t.gridstackNode;if(!n||(t.style.transform=t.style.transformOrigin=null,we.off(A,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&t?t:A;const o=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=o,this.opts.removable===!0&&LA._itemRemoving(A,!0),A._gridstackNodeOrig?(A.gridstackNode=A._gridstackNodeOrig,delete A._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}};en.renderCB=(e,A)=>{e&&A?.content&&(e.textContent=A.content)},en.resizeToContentParent=".grid-stack-item-content",en.Utils=q,en.Engine=wi,en.GDRev="12.4.2";var km={class:"d-layout"},Mm=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-locked","gs-no-resize","gs-no-move","gs-min-w","gs-min-h","gs-max-w","gs-max-h"],Om=(0,r.defineComponent)({name:"DLayout",__name:"layout",props:{modelValue:{default:()=>[]},column:{default:24},cellHeight:{default:60},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},float:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removableOptions:{}},emits:["update:modelValue","added","removed","changed","dragStart","dragStop","resizeStart","resizeStop"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)();let c=null;const d=async()=>{a.value&&(await(0,r.nextTick)(),c&&c.destroy(!1),c=en.init({column:n.column,cellHeight:n.cellHeight,disableDrag:!(n.draggable&&!n.disable),disableResize:!(n.resizable&&!n.disable),animate:n.animate,float:n.float,removable:n.removable,removableOptions:n.removableOptions},a.value),c.on("added",(m,y)=>{const v=y[0];v&&(o("added",h(v)),B())}),c.on("removed",(m,y)=>{const v=y[0];v&&(o("removed",h(v)),B())}),c.on("change",()=>{B(),o("changed",(c?.save()||[]).map(m=>h(m)))}),c.on("dragstart",(m,y)=>{y&&o("dragStart",m,h(y.gridstackNode||y))}),c.on("dragstop",(m,y)=>{y&&o("dragStop",m,h(y.gridstackNode||y))}),c.on("resizestart",(m,y)=>{y&&o("resizeStart",m,h(y.gridstackNode||y))}),c.on("resizestop",(m,y)=>{y&&o("resizeStop",m,h(y.gridstackNode||y))}))},h=m=>({id:m.id||m.el?.getAttribute("gs-id")||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1,locked:m.locked||!1,noResize:m.noResize||!1,noMove:m.noMove||!1,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}),g=async()=>{if(!c||!a.value)return;await(0,r.nextTick)();const m=c.engine.nodes;new Set(m.map(v=>v.id));const y=new Set(n.modelValue.map(v=>v.id));m.forEach(v=>{if(!y.has(v.id||"")){const I=v.el;I&&c&&c.removeWidget(I,!1)}}),n.modelValue.forEach(v=>{const I=m.find(L=>L.id===v.id);if(I)I.el&&c&&c.update(I.el,{x:v.x,y:v.y,w:v.w,h:v.h,locked:v.locked,noResize:v.noResize,noMove:v.noMove,minW:v.minW,minH:v.minH,maxW:v.maxW,maxH:v.maxH});else{if(!a.value||!c)return;const L=a.value.querySelector(`[gs-id="${v.id}"]`);L&&c.makeWidget(L)}})},B=()=>{c&&o("update:modelValue",c.save().map(m=>{const y={id:m.id||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1},v=n.modelValue.find(I=>I.id===y.id);return v&&Object.keys(v).forEach(I=>{["id","x","y","w","h"].includes(I)||(y[I]=v[I])}),y}))},w=(0,r.computed)(()=>n.modelValue);return(0,r.watch)(()=>n.modelValue,async()=>{c&&(await(0,r.nextTick)(),g())},{deep:!0}),(0,r.watch)(()=>[n.column,n.cellHeight,n.draggable,n.resizable,n.disable,n.animate,n.float,n.removable],()=>{d()}),(0,r.onMounted)(()=>{d()}),(0,r.onBeforeUnmount)(()=>{c&&(c.destroy(!1),c=null)}),A({addItem:async m=>{if(c&&a.value){await(0,r.nextTick)();const y=a.value.querySelector(`[gs-id="${m.id}"]`);y&&(c.makeWidget(y),c.update(y,{x:m.x,y:m.y,w:m.w,h:m.h,locked:m.locked,noResize:m.noResize,noMove:m.noMove,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}))}},removeItem:m=>{if(c&&a.value){const y=a.value.querySelector(`[gs-id="${m}"]`);y&&c.removeWidget(y,!1)}},clear:()=>{c&&c.removeAll(!1)},getGrid:()=>c}),(m,y)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",km,[(0,r.createElementVNode)("div",{ref_key:"gridContainerRef",ref:a},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(w.value,v=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:v.id,"gs-id":v.id,"gs-x":v.x,"gs-y":v.y,"gs-w":v.w,"gs-h":v.h,"gs-locked":v.locked,"gs-no-resize":v.noResize,"gs-no-move":v.noMove,"gs-min-w":v.minW,"gs-min-h":v.minH,"gs-max-w":v.maxW,"gs-max-h":v.maxH,class:"d-layout-item"},[(0,r.renderSlot)(m.$slots,"item",{item:v})],8,Mm))),128))],512)]))}}),Km=Om,dl=ft(Km),WA=(e,A="",t=!1)=>t?`${e}pt`:A?`${e}${A}`:`${e}px`,ye=(e,A=0)=>e==null||isNaN(e)?0:Number(Number(e).toFixed(A)),Rm=e=>e*3/4,Vm=e=>e*4/3,Pm=["onMousedown"],Gm={key:2,class:"d-draggable__mask"},zm=(0,r.defineComponent)({name:"DDraggable",__name:"draggable",props:{index:{},mask:{type:Boolean,default:!0},scale:{default:1},readonly:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},step:{default:1},zIndex:{default:1},isActiveBgTransparent:{type:Boolean,default:!1},left:{default:0},top:{default:0},width:{},height:{},activeFlag:{type:Boolean,default:!1},isPt:{type:Boolean,default:!1}},emits:["focus","blur","over","out"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)(),c=(0,r.ref)(),d=(0,r.ref)(0),h=(0,r.ref)(0),g=(0,r.ref)(0),B=(0,r.ref)(0),w=(0,r.ref)(null),m=(0,r.ref)(!1),y=(0,r.ref)(!1),v=(0,r.ref)(!1),I=(0,r.ref)(!1),L=(0,r.ref)([{classname:"left"},{classname:"right"},{classname:"top"},{classname:"bottom"},{classname:"top-left"},{classname:"top-right"},{classname:"bottom-left"},{classname:"bottom-right"}]),k=(0,r.computed)(()=>n.scale),V=(0,r.computed)(()=>({left:WA(k.value,"",n.isPt)})),F=(0,r.computed)(()=>({left:WA(-k.value,"",n.isPt)})),M=(0,r.computed)(()=>({left:"auto",right:WA(-k.value,"",n.isPt)})),tA=(0,r.computed)(()=>({top:WA(-k.value,"",n.isPt)})),W=(0,r.computed)(()=>({top:"auto",bottom:WA(-k.value,"",n.isPt)})),aA=(0,r.computed)(()=>{const eA=8*k.value;return{width:WA(eA,"",n.isPt),height:WA(eA,"",n.isPt)}}),dA=(0,r.computed)(()=>({fontSize:WA(16*k.value,"",n.isPt)})),rA=(0,r.computed)(()=>Object.assign((()=>{if(I.value){const eA={zIndex:9999,...V.value};return n.isActiveBgTransparent&&(I.value||y.value)&&!n.readonly&&!n.disabled&&(eA.backgroundColor="color-mix(in srgb, var(--j-color-primary-bg) 60%, transparent)"),eA}return{zIndex:n.zIndex}})(),{top:WA(B.value,"",n.isPt),width:WA(d.value,"",n.isPt),height:WA(h.value,"",n.isPt),padding:WA(8*k.value,"",n.isPt),...V.value,left:WA(g.value,"",n.isPt)}));(0,r.watch)(()=>n.width,eA=>{d.value=ye(AA(eA))||(w.value?.offsetWidth??0)}),(0,r.watch)(()=>n.height,eA=>{h.value=ye(AA(eA))||(w.value?.offsetHeight??0)},{deep:!0}),(0,r.watch)(()=>n.left,eA=>{g.value=ye(AA(eA))}),(0,r.watch)(()=>n.top,eA=>{B.value=ye(AA(eA))}),(0,r.watch)(d,eA=>{a.value&&(a.value.style.width=WA(eA,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.width=WA(eA,"",n.isPt)))}),(0,r.watch)(h,eA=>{a.value&&(a.value.style.height=WA(eA,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.height=WA(eA,"",n.isPt)))}),(0,r.watch)(()=>n.activeFlag,eA=>{oA(eA)});const oA=eA=>{I.value=eA},AA=eA=>eA===void 0?0:n.isPt?Vm(eA):eA,O=()=>{c.value&&c.value.firstChild&&(w.value=c.value.firstChild,d.value=ye(AA(n.width))||(w.value?.offsetWidth??0),h.value=ye(AA(n.height))||(w.value?.offsetHeight??0),g.value=ye(AA(n.left)),B.value=ye(AA(n.top)),oA(n.activeFlag))},lA=eA=>{g.value=eA},_=eA=>{B.value=eA},Z=eA=>{const uA=8*k.value/2,Y={};return eA.split("-").forEach(cA=>{Y[cA]=WA(-uA,"",n.isPt)}),Y},U=eA=>{y.value=eA},x=eA=>n.isPt?Rm(eA):eA,G=()=>{m.value=!0,o("focus",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)})},R=()=>{m.value=!1,v.value=!1,o("blur",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)})},$=()=>{document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,R()}},J=(eA,uA)=>{if(n.disabled||n.readonly)return;let Y,cA,mA,yA,IA,fA;v.value=!0,G();let vA=eA.clientX,S=eA.clientY;document.onmousemove=H=>{m.value=!0,uA==="right"?(Y=!0,cA=!1):uA==="left"?(Y=!0,mA=!0,IA=!0,cA=!1):uA==="top"?(Y=!1,cA=!0,yA=!0,fA=!0):uA==="bottom"?(Y=!1,cA=!0):uA==="bottom-right"?(Y=!0,cA=!0):uA==="bottom-left"?(Y=!0,cA=!0,mA=!0,IA=!0):uA==="top-right"?(Y=!0,cA=!0,yA=!0,fA=!0):uA==="top-left"&&(Y=!0,cA=!0,mA=!0,IA=!0,yA=!0,fA=!0);const T=H.clientX-vA,D=H.clientY-S;if(vA=H.clientX,S=H.clientY,Y){let b=T*n.step;IA&&(b=-b),mA&&(g.value=ye(g.value-b)),d.value=ye(d.value+b)}if(cA){let b=D*n.step;fA&&(b=-b),yA&&(B.value=ye(B.value-b)),h.value=ye(h.value+b)}},$()},nA=()=>{y.value=!1,o("out",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)})},hA=()=>{n.disabled||n.readonly||(y.value=!0,o("over",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)}))},UA=eA=>{if(n.disabled||n.readonly)return;I.value=!0,G();let uA=eA.clientX,Y=eA.clientY;document.onmousemove=cA=>{const mA=cA.clientX-uA,yA=cA.clientY-Y;uA=cA.clientX,Y=cA.clientY,g.value=ye(g.value+mA*n.step),B.value=ye(B.value+yA*n.step)},$()};return(0,r.onMounted)(()=>{O()}),A({setActive:oA,setLeft:lA,setTop:_,setOverActive:U}),(eA,uA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["d-draggable",{"d-draggable--active":(I.value||y.value)&&!e.readonly&&!e.disabled},{"d-draggable--pt":e.isPt&&!e.readonly&&!e.disabled},{"d-draggable--move":m.value},{"d-draggable--click":e.disabled}]),onMousedown:(0,r.withModifiers)(UA,["stop"]),onMouseover:(0,r.withModifiers)(hA,["stop"]),onMouseout:(0,r.withModifiers)(nA,["stop"]),style:(0,r.normalizeStyle)(rA.value)},[(0,r.createElementVNode)("div",{class:"d-draggable__wrapper",ref_key:"wrapper",ref:a},[(I.value||y.value||m.value)&&!e.readonly&&!e.disabled?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...tA.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...F.value}),class:"d-draggable__line d-draggable__line--top"},null,4),e.isPt?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...tA.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...F.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...W.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...M.value}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...W.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...M.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4)],64)):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"d-draggable__line d-draggable__line--label",style:(0,r.normalizeStyle)(dA.value)},(0,r.toDisplayString)(g.value)+","+(0,r.toDisplayString)(B.value),5))],64)):(0,r.createCommentVNode)("",!0),!e.readonly&&!e.disabled?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(L.value,(Y,cA)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:cA},[I.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["d-draggable__range",`d-draggable__range--${Y.classname}`]),style:(0,r.normalizeStyle)([aA.value,Z(Y.classname)]),onMousedown:(0,r.withModifiers)(mA=>J(mA,Y.classname),["stop"])},null,46,Pm)):(0,r.createCommentVNode)("",!0)],64))),128)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",{class:"d-draggable__item",ref_key:"item",ref:c},[(0,r.renderSlot)(eA.$slots,"default")],512),!e.disabled&&e.mask?((0,r.openBlock)(),(0,r.createElementBlock)("div",Gm)):(0,r.createCommentVNode)("",!0)],512)],38))}}),$m=zm,fl=ft($m),gl=e=>{const A=Xm(e.components);return{formConfig:e.form,componentList:A}},hl=(e,A)=>{let t={},n=[];const o={},a=e;t=a.form;const c={};return a.components.forEach(d=>{const h=A[d.type];c[d.containerId]=c[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h?.dragType||"component",componentName:h?.componentName||"",runtimeType:h?.runtimeType,groupId:d.groupId,config:d.config,isInput:h?.isInput!==!1,containerId:d.containerId,level:d.level};h?.dragType==="container"&&(g.children=[]),o[g.id]=g,c[d.containerId].push(g)}),Object.keys(c).forEach(d=>{o[d]&&(o[d].children=c[d])}),n=c.form||[],{formConfig:t,componentList:n,componentDic:o}},Vr=(e,A)=>{const t={ver:"j1",form:{...e},components:[],db:{}};return Bl(A||[],t.components),t},Bl=(e,A)=>{e.forEach(t=>{if(t.type==="pkey")return;const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&Bl(t.children||[],A),A.push(n)})},Xm=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{rule:[]}};n.config&&Object.keys(n.config).forEach(a=>{if(a==="required"){n.config.required&&o.config?.rule?.push({required:!0,message:n.config.requiredMsg||"请输入"});return}if(a==="patterns"){n.config.patterns.forEach(c=>{c.reg&&c.msg&&o.config?.rule?.push({pattern:new RegExp(c.reg),message:`请输入${c.msg||""}`})});return}o.config[a]=n.config[a]}),n.type==="pkey"&&(o.config.isPkey=!0),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const c={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();c[h]||(c[h]=[]),delete d.slot,c[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=c[d._i]||[],g={label:d.label};d.active&&o.type==="j-collapse"&&(g.active=d.active);let B;if(o.type==="j-tabs"&&o.config?.tabKey&&o.config?.options.length>0){const m=o.config.options.find(y=>y.label===d._i);m&&(B=({formData:y})=>({display:m.value.includes(y[o.config?.tabKey||""])?m.display:!m.display}))}const w={config:g,children:h};return B&&(w.getCompConfig=B),w}),delete o.config.groups}else o.children=a}}),A.form},pl=(e,A,t,n,o,a,c,d)=>{const h=(0,r.ref)(),g=(0,r.reactive)({}),B=(0,r.computed)(()=>{const U=[];return Object.keys(g).forEach(x=>{const G=g[x];G.dragType==="component"&&G.type!=="pkey"&&U.push(G)}),U}),w=(U=[],x)=>{const G=A?.value?.init;typeof G=="function"&&G(U,x)},m=U=>o?o(U,{componentDic:g,components:B.value,configData:h.value.config}):{},y=(U,x)=>{if(h.value?.id===U)return;const G=g[U]||x;if(G?h.value=G:U===t.id?h.value=t:h.value=null,h.value){const R=a[h.value.type];R?(w(R,h.value.config),m(h.value.type)):w([])}else w([]);x&&ie("dragClick",{id:x.id})},v=()=>e.value.$el.getBoundingClientRect(),I=U=>U===t.id?t:g[U]||{},L=U=>{const x=[];if(U===t.id)x.push({id:U,name:t.name});else{const G=g[U];if(G){x.push({id:U,name:G.name});const R=L(G.containerId);x.push(...R)}}return x},k=(U,x)=>{const G=g[x];if(G===void 0)return!1;const R=G.containerId;return U===R?!0:R===t.id?!1:k(U,R)},V=U=>n?n(U)||{}:{},F=(U,x,G,R)=>{if(d){const $=I(U);return d(G.componentType,{container:$,groupId:x,configData:G},R)}return!1},M=({name:U,type:x,dragType:G,isInput:R,componentName:$,runtimeType:J},nA,hA,UA,eA=!1)=>{const uA=V(x);if(uA.id=gt(),uA.span=24,uA.componentType=x,tA(nA,uA.componentType))return;F(nA,UA,uA,!0);const Y={id:uA.id,name:U,type:x,runtimeType:J,componentName:$||"",dragType:G||"component",containerId:nA,isInput:!!R,level:g[nA]?g[nA].level+1:1,config:uA,isNewAdd:!eA,groupId:UA};return Y.dragType==="container"&&(Y.children=[]),g[Y.id]=Y,I(nA).children?.splice(hA,0,Y),Y},tA=(U,x)=>!!(I(U).config.componentType==="gridtable"&&["divider","label","text","textEditor","viewTable","card","collapse","tabs","qrcode","barcode","tableLayout"].includes(x)),W=(U,x,G=!1)=>{let R=null;const $=I(U).children,J=$?.findIndex(nA=>nA.id===x)||0;if(G&&$&&$.length>1){let nA=J+1;J>0&&(nA=J-1),R=$[nA]}return $?.splice(J,1),R?.id},aA=(U,x,G,R)=>{const $=I(x).children,J=U.containerId!==x;U.containerId=x,U.groupId=R,$?.splice(G,0,U),F(x,R,U.config,J)&&(lA(),y(U.id))},dA=U=>{let x="";const G=I(U);return G&&(G.children&&G.children.length>0&&G.children.forEach(R=>{dA(R.id)}),x=W(G.containerId,U,!0)||"",delete g[U]),h.value&&h.value.id===U&&(h.value=null,A.value.init([])),x},rA=(U,x=[])=>{const G=I(U);if(G&&G.children&&G.children.length>0){const R=[];G.children.forEach($=>{$.groupId&&x.includes($.groupId)&&R.push($.id)}),R.forEach($=>{dA($),delete g[$]})}},oA=(U,x)=>{const G=I(U);G&&(G.children&&G.children.length>0&&G.children.forEach(R=>{R.groupId===x&&dA(R.id)}),delete g[U])},AA=U=>{const x=pn(I(U));x.id=gt(),x.config.id=x.id,g[x.id]=x;const G=I(x.containerId).children,R=G?.findIndex($=>$.id===U)||0;G?.splice(R+1,0,x)},O=()=>{t.children=[],bu(g),h.value&&(ie("dragClick",{id:""}),h.value=null,A.value.init([]))},lA=()=>{h.value&&(ie("dragClick",{id:""}),h.value=null,A.value.init([]))},_=U=>{const x=h.value,G=I(x.containerId).children,R=G?.findIndex($=>$.id===x.id)||0;dA(x.id),(0,r.nextTick)(()=>{const $=c[U],J=V(U);J.id=x.id,J.span=x.config.span,J.componentType=U,J.table=x.config.table,J.field=x.config.field,x.config.isSubTable&&(J.isSubTable=x.config.isSubTable);const nA={id:J.id,name:$.name,type:U,runtimeType:$.runtimeType,componentName:$.componentName||"",dragType:x.dragType,groupId:x.groupId,containerId:x.containerId,isInput:x.isInput,level:x.level,config:J,isNewAdd:!0};g[nA.id]=nA,G?.splice(R,0,nA)})},Z=U=>{ie("dragAddByClick",U)};return(0,r.provide)("d-drag-design-provide",{activedComponent:h,getDesignLocals:v,getComponent:I,getParentComponents:L,isMyChildComponent:k,selectComponent:y,addComponent:M,deleteComponent:dA,copyComponent:AA,removeComponentFromContainer:W,addComponentToContainer:aA,top:t,deleteChildren:oA,deleteChildrens:rA}),{activedComponent:h,clearComponents:O,changeComponent:_,schemaComponentDic:g,clearSelect:lA,addComponent:M,addComponentByTable:Z,designComponentList:B}},Wm=(0,r.defineComponent)({__name:"importComponent",props:{componentList:{type:Array,default:()=>[]},tableList:{type:Array,default:()=>[]}},setup(e,{expose:A}){const t=e,n=(0,r.computed)(()=>t.tableList.map(g=>({label:g.comment?`${g.name}(${g.comment})`:g.name,value:g.name}))),o=(0,r.ref)(),a=[{id:"layout",type:"j-layout",config:{top:48,topMove:!1,autoSize:["default"]},children:[{id:"table",type:"j-select",slot:"top",config:{label:"表名选择",loadOptions:()=>n,allowClear:!1}},{id:"fields",type:"j-table",config:{editConfig:{isAddBtn:!1,isRemoveBtn:!1},height:"100%",isMultiple:!0},children:[{id:"name",type:"span",config:{label:"字段名"}},{id:"type",type:"j-select",config:{label:"组件选择",options:t.componentList,width:200}}]}]}],c=(g,B)=>{if(g.id==="table"){const w=t.tableList.find(m=>m.name===B.value);if(w){const m=w.columns.map(y=>({value:y.name,name:y.coment?`${y.name}(${y.coment})`:y.name,type:"input",label:y.coment||y.name,selected:!y.isPrimary}));o.value.setFormData({fields:m})}}};return(0,r.onMounted)(()=>{o.value.init(a)}),A({ok:()=>{const g=o.value.getFormData(!1);return{addList:g.fields.filter(B=>B.selected),table:g.table,containerId:g.containerId,isSubTable:g.isSubTable}},closed:()=>{}}),(g,B)=>{const w=(0,r.resolveComponent)("j-form");return(0,r.openBlock)(),(0,r.createBlock)(w,{ref_key:"formRef",ref:o,"form-config":{labelWidth:"72px"},onChange:c},null,512)}}}),Ym=Wm,Jm=(0,r.defineComponent)({props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){const{t:A}=(0,Te.useAppInject)();return{labelWidth:(0,r.computed)(()=>e.componentData.config?.notShowLabel?"0px":e.componentData.config?.labelWidth===void 0&&e.globalConfig.labelWidth!==void 0?`${e.globalConfig.labelWidth}px`:e.componentData.config?.labelWidth?`${e.componentData.config?.labelWidth}px`:void 0),inputConfig:(0,r.computed)(()=>{const t={...e.componentData?.config};return e.globalConfig.size===void 0&&(t.size=e.globalConfig.size),t.display=!0,t}),t:A}}}),Zm=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t};function jm(e,A,t,n,o,a){const c=(0,r.resolveComponent)("j-comp"),d=(0,r.resolveComponent)("el-form-item");return e.componentData.isInput?((0,r.openBlock)(),(0,r.createBlock)(d,{key:0,"label-width":e.labelWidth,label:e.t(e.componentData.config?.notShowLabel?"":e.componentData.config?.label||""),rules:e.componentData.config?.required?[{required:!0,message:""}]:[]},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(c,{type:e.componentData?.componentName||e.componentData?.type,config:e.inputConfig,modelValue:e.componentData?.config.defaultValue},null,8,["type","config","modelValue"])]),_:1},8,["label-width","label","rules"])):e.componentData?.children?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)({key:1},e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"])):((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.normalizeProps)((0,r.mergeProps)({key:2},e.componentData?.config)),null,16))}var ml=Zm(Jm,[["render",jm]]),qm={class:"d-form-design j-block"},Aw={class:"d-form-design-left"},ew={class:"d-form-design-component-list"},tw={class:"j-component-tool"},nw={class:"j-component-tool-name"},rw={class:"d-form-design-center"},ow={class:"d-form-design-container"},iw={key:0,class:"d-form-design-empty"},sw={class:"d-form-design-right"},aw={class:"d-form-design-panel-title"},lw={style:{margin:"0","font-size":"14px"}},cw={class:"d-form-design-panel"},uw=(0,r.defineComponent)({name:"DFormDesign",__name:"formDesign",props:{notBindTable:{type:Boolean,default:!1},components:{default:()=>[]},componentConfigs:{default:()=>({})},componentInit:{type:Function,default:void 0},containerAddComponent:{type:Function,default:void 0},componentConfigInit:{type:Function,default:void 0},componentConfigChange:{type:Function,default:void 0},componentConfigValidate:{type:Function,default:void 0},flowComponents:{default:()=>[]},flowInit:{type:Function,default:void 0},flowComponentConfigInit:{type:Function,default:void 0},flowComponentConfigChange:{type:Function,default:void 0},flowComponentConfigs:{default:()=>({})},actions:{}},setup(e,{expose:A}){const t=e,{t:n,warning:o,error:a}=(0,Te.useAppInject)(),c=(0,r.reactive)({name:"表单",id:"form",type:"form",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}}),d=(0,r.ref)([]),h=t.components.length;for(let D=0;D<h;D++)d.value.push(D);t.componentInit&&(c.config=t.componentInit("form")||{});const g=(0,r.ref)([]),B=(0,r.computed)(()=>g.value.map(D=>({label:D.comment?`${D.name}(${D.comment})`:D.name,value:D.name}))),w=(0,r.computed)(()=>{if(W.value){const D=tA.value.getFormData(!1);if(D.table){const b=g.value.find(z=>z.name===D.table);if(b)return b.columns.map(z=>({value:z.name,label:z.coment?`${z.name}(${z.coment})`:z.name,coment:z.coment}))}}return[]}),m=D=>{g.value=D},y={},v=[];t.components.forEach(({children:D})=>{D.forEach(b=>{y[b.type]=b,b.dragType=b.dragType||"component",b.isInput!==!1&&(b.isInput=!0,v.push({label:b.name,value:b.type}))})});const I=D=>{D.forEach(b=>{b.type==="d-input-flow"&&(b.config=b.config||{},b.config.flowComponents=t.flowComponents,b.config.flowInit=t.flowInit,b.config.flowComponentConfigInit=z=>{t.flowComponentConfigInit&&(z.designComponents=AA.value,z.component=W.value,t.flowComponentConfigInit(z))},b.config.flowComponentConfigs=t.flowComponentConfigs,b.config.flowComponentConfigChange=t.flowComponentConfigChange),b.children&&I(b.children)})},L={};Object.keys(t.componentConfigs||{}).forEach(D=>{const{hasBase:b,isInput:z,hasTwoPlaceholder:P,hasPlaceholder:gA,hasSpan:iA,hasLabel:SA,bindTable:xA,labelTitle:KA}=y[D]||{hasBase:!1},ne=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"componentType",type:"j-select",config:{label:"类型",allowClear:!1,display:z,options:v}},{id:"label",type:"j-input",config:{label:KA||"标题"},getCompConfig:({formData:PA})=>({display:SA!==!1&&!PA.notShowLabel})},{id:"notShowLabel",type:"j-switch",config:{label:"不显示"+(KA||"标题"),activeValue:!0,inactiveValue:!1},getCompConfig:({formData:PA})=>({display:SA!==!1&&!PA.isSubTable})},{id:"labelWidth",type:"j-number",config:{label:"标题宽度"},getCompConfig:({formData:PA})=>({display:z&&!PA.notShowLabel&&!PA.isSubTable})},{id:"placeholder",type:"j-input",config:{display:z&&!P&&gA!==!1,label:"占位提示"}},{id:"startPlaceholder",type:"j-input",config:{display:!!P,label:"开始占位"}},{id:"endPlaceholder",type:"j-input",config:{display:!!P,label:"结束占位"}},{id:"span",type:"j-slider",config:{label:"表单栅栏",min:6,max:24,showTooltip:!0,step:6,showStops:!0,defautValue:24},getCompConfig:({formData:PA})=>({display:iA!==!1&&!PA.isSubTable})},{id:"width",type:"j-number",config:{label:"单元格宽度",min:1},getCompConfig:({formData:PA})=>({display:!!PA.isSubTable})},{id:"isNotSave",type:"j-switch",config:{label:"不存表",display:z&&xA!==!1,activeValue:!0,inactiveValue:!1}},{id:"table",type:"j-select",config:{label:"数据表",loadOptions:()=>B},getCompConfig:({formData:PA})=>({display:(z&&xA!==!1||xA===!0)&&(!PA.isSubTable||xA===!0)&&!PA.isNotSave&&!t.notBindTable})},{id:"field",type:"j-select",config:{label:"表字段",loadOptions:()=>w},getCompConfig:({formData:PA})=>({display:z&&xA!==!1&&!PA.isNotSave&&!t.notBindTable})},{id:"csType",type:"j-select",config:{label:"字段类型",allowClear:!1,options:[{label:"短文本",value:"string"},{label:"长文本",value:"text"},{label:"整数",value:"int"},{label:"小数",value:"decimal"},{label:"时间日期",value:"DateTime"}]},getCompConfig:({formData:PA})=>({display:z&&xA!==!1&&!PA.isNotSave&&t.notBindTable})},{id:"fieldLen",type:"j-number",config:{label:"字段长度"},getCompConfig:({formData:PA})=>({display:z&&xA!==!1&&!PA.isNotSave&&t.notBindTable&&PA.csType==="string"})}],YA={type:"j-collapse",config:{defaultValue:[]},children:[]};b!==!1&&(YA.children?.push({config:{label:"基础信息"},children:[...ne]}),YA.config?.defaultValue.push("_collapse0")),YA.children?.push(...t.componentConfigs[D]),I(YA.children||[]),L[D]=[YA]});const k=D=>{const{value:b}=D||{};D.id==="componentType"&&dA(b),W.value&&t.componentConfigChange&&(D.id==="field"&&D.data?.coment&&(W.value.config.label=D.data?.coment),t.componentConfigChange(W.value.type,{configRef:tA,configData:W.value.config,...D})),D.id==="table"&&W.value&&W.value.type==="gridtable"&&(W.value.children||[]).forEach(z=>{z.isInput&&(z.config.table=b)})},V=(D,b)=>{y[D]?.isInput&&(t.notBindTable&&(b.configData.csType||tA.value.setFormData({main:{csType:y[D]?.csType,fieldLen:y[D]?.fieldLen}})),B.value.length===1&&tA.value.setFormData({main:{table:B.value[0].value}})),t.componentConfigInit&&t.componentConfigInit(D,{configRef:tA,...b,notBindTable:t.notBindTable})},F=(D,b,z)=>{let P=!1;const gA=y[D];return b.container.type==="gridtable"?(!b.configData.isSubTable||z)&&(b.configData.isSubTable=!0,gA.isInput&&(b.configData.table=b.container.config.table,b.configData.field=""),P=!0):b.configData.isSubTable&&(P=!0,b.configData.isSubTable=!1,gA.isInput&&(b.configData.table="")),t.containerAddComponent&&t.containerAddComponent(D,b),P},M=(0,r.ref)(),tA=(0,r.ref)(),{activedComponent:W,clearComponents:aA,changeComponent:dA,schemaComponentDic:rA,addComponentByTable:oA,designComponentList:AA}=pl(M,tA,c,t.componentInit,V,L,y,F),O=(0,r.computed)(()=>W.value?`【${W.value.name}】`:"");(0,r.provide)("dui-design-provide",{designItemName:ml});const lA=()=>{aA()},_=()=>{t.componentInit&&(c.config=t.componentInit("form")||{}),aA()},Z=()=>{let D=0;const b=Vr(c.config,c.children||[]);if(t.notBindTable){const z={};b.components.forEach(iA=>{const{isInput:SA,bindTable:xA}=y[iA.type]||{hasBase:!1};SA&&xA!==!1?iA.config.table&&!z.main&&(z.main={name:iA.config.table,comment:"主表",type:"main",pKey:"J_Id"}):xA&&(z[iA.id]={name:iA.config.table||"t"+new Date().getTime()+D,comment:`子表${iA.config.label}`,type:"chlid",field:"J_PId",relationField:"J_Id",pKey:"J_Id"},iA.config.table=z[iA.id].name,D++)}),z.main||(z.main={name:"t"+new Date().getTime()+D,comment:"主表",type:"main",pKey:"J_Id"},D++);let P=0;b.components.forEach(iA=>{const{isInput:SA,bindTable:xA}=y[iA.type]||{hasBase:!1};!iA.config.isNotSave&&SA&&xA!==!1&&(iA.config.csType||(iA.config.csType=y[iA.type]?.csType,iA.config.fieldLen=y[iA.type]?.fieldLen),iA.config.isSubTable?iA.config.table=z[iA.containerId].name:iA.config.table=z.main.name,iA.config.field=iA.config.field||`f${Math.floor(Date.now()/1e3)}${P}`,P++)});const gA=[];Object.keys(z).forEach(iA=>{z[iA].type==="chlid"&&(z[iA].relationName=z.main.name,z[iA].comment+=`,关联主表${z.main.name}`),gA.push(z[iA])}),b.db=gA}else{const z={};g.value.forEach(P=>{P.columns.forEach(gA=>{z[`${P.name}_${gA.name}`]=gA.csType})}),b.components.forEach(P=>{P.config.table&&P.config.field&&(P.config.csType=z[`${P.config.table}_${P.config.field}`])})}return t.notBindTable?b.db.forEach(z=>{if(!b.components.find(P=>P.config.table===z.name&&P.config.field==="J_Id")){const P=b.components.find(gA=>gA.config.table===z.name&&gA.config.field);P&&b.components.push({id:z.name+"_J_Id",name:z.name+"_J_Id",type:"pkey",runtimeType:"j-input",groupId:"",config:{display:!1,table:z.name,field:"J_Id",label:"主键"},containerId:P.containerId,level:P.level})}}):g.value.forEach(z=>{z.columns.forEach(P=>{if(P.isPrimary&&!b.components.find(gA=>gA.config.table===z.name&&gA.config.field===P.name)){const gA=b.components.find(iA=>iA.config.table===z.name&&iA.config.field);gA&&b.components.push({id:z.name+"_"+P.name,name:z.name+"_"+P.name,type:"pkey",runtimeType:"j-input",groupId:"",config:{display:!1,table:z.name,field:P.name,label:"主键"+P.name,isIdentity:P.isIdentity},containerId:gA.containerId,level:gA.level})}})}),b},U=D=>{const b=hl(D,y);c.config=b.formConfig,c.children?.push(...b.componentList),Object.keys(b.componentDic).forEach(z=>{rA[z]=b.componentDic[z]})},x=()=>R(Vr(c.config,c.children||[]).components,{},{}),G=D=>{const{isInput:b,bindTable:z}=y[D]||{hasBase:!1};if(!b&&z)return!0},R=(D,b,z)=>{if(!t.notBindTable)for(const P of D){const{isInput:gA,bindTable:iA}=y[P.type]||{hasBase:!1};if(!P.config.isNotSave&&P.type!=="pkey"){if(gA&&iA!==!1){if((0,Te.isNullOrEmpty)(P.config.table))return a&&a(`请【${P.config.label}】绑定数据表!`),!1;if(!P.config.isSubTable){if(z[P.config.table]&&G(z[P.config.table].type))return a&&a(`【${P.config.label}】和【${z[P.config.table].config.label}】重复绑定【${P.config.table}】表!`),!1;P.config.table&&(z[P.config.table]=P)}}else if(iA){if((0,Te.isNullOrEmpty)(P.config.table))return a&&a(`【${P.config.label}】请绑定数据表!`),!1;if(z[P.config.table])return a&&a(`【${P.config.label}】和【${z[P.config.table].config.label}】重复绑定【${P.config.table}】表!`),!1;P.config.table&&(z[P.config.table]=P)}}}for(const P of D){if(!t.notBindTable){const{isInput:gA,bindTable:iA}=y[P.type]||{hasBase:!1};if(!P.config.isNotSave&&gA&&iA!==!1){if((0,Te.isNullOrEmpty)(P.config.field))return a&&a(`请【${P.config.label}】绑定表字段!`),!1;if(b[`${P.config.table}-${P.config.field}`])return a&&a(`【${P.config.label}】和【${b[`${P.config.table}-${P.config.field}`].config.label}】重复绑定【${P.config.field}】字段!`),!1;b[`${P.config.table}-${P.config.field}`]=P}}if(t.componentConfigValidate&&!t.componentConfigValidate(P.type,{configData:P.config,errorTip:a}))return!1}return!0},$=(0,r.ref)(),J=(0,r.ref)(),nA=(0,r.reactive)({width:0,height:0,formConfig:{}});let hA=0;const UA=D=>{if(J.value)hA=0,J.value.init(D||[]);else{if(hA>600){console.warn("表单组件加载超时");return}hA++,setTimeout(()=>{UA(D)},100)}},eA=()=>{},uA=()=>{},Y=()=>{const D=Vr(c.config,c.children||[]);nA.width=D.form.width||800,nA.height=D.form.height||600,$.value.open("表单预览",D.form.layerType),(0,r.nextTick)(()=>{const{formConfig:b,componentList:z}=gl(D);nA.formConfig=b,UA(z)})},cA=(0,r.ref)(),mA=(0,r.ref)(),yA=()=>{const{addList:D,table:b}=mA.value?.ok()||{addList:[]};if(D.length<=0)o&&o("请选择字段!");else{if(W.value?.config.componentType==="gridtable"||W.value?.config.isSubTable)if(W.value.config.table){if(W.value.config.table!==b){o&&o("请设置相同的表和子表!");return}}else{let z=W.value;W.value.config.isSubTable&&(z=rA[W.value.containerId]),z.config.table=b,(z.children||[]).forEach(P=>{P.isInput&&(P.config.table=b)}),tA.value.setFormData({main:{table:b}})}D.forEach(z=>{const P=(0,Te.deepClone)(y[z.type]);P.config={table:b,field:z.value,label:z.label},oA(P)}),cA.value.close()}},IA=()=>{mA.value?.closed()};return A({setTables:D=>{m(D)},getSchema:()=>Z(),setSchema:D=>U(D),reset:()=>_(),validate:()=>x(),preview:Y,clear:lA}),(D,b)=>{const z=(0,r.resolveComponent)("j-icon"),P=(0,r.resolveComponent)("d-drag-tool"),gA=(0,r.resolveComponent)("el-collapse-item"),iA=(0,r.resolveComponent)("el-collapse"),SA=(0,r.resolveComponent)("d-drag-form-list"),xA=(0,r.resolveComponent)("el-row"),KA=(0,r.resolveComponent)("d-drag-container"),ne=(0,r.resolveComponent)("j-form"),YA=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",qm,[(0,r.createElementVNode)("div",Aw,[(0,r.createElementVNode)("div",ew,[(0,r.createVNode)(iA,{modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=PA=>d.value=PA)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(PA,Re)=>((0,r.openBlock)(),(0,r.createBlock)(gA,{key:Re,title:PA.name,name:Re},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(PA.children,(ve,Gr)=>((0,r.openBlock)(),(0,r.createBlock)(P,{key:Gr,config:ve},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",tw,[(0,r.createVNode)(z,{class:"j-component-tool-icon",icon:ve.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",nw,(0,r.toDisplayString)((0,r.unref)(n)(ve.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",rw,[(0,r.createElementVNode)("div",ow,[(0,r.createVNode)(KA,{ref_key:"dragContainer",ref:M,class:"d-form-design-drag-container","is-component-container":!1,"component-data":c},{default:(0,r.withCtx)(()=>[!c.children||c.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",iw,[...b[1]||(b[1]=[(0,r.createElementVNode)("div",null,"请从左侧拖拽组件到此处",-1)])])):((0,r.openBlock)(),(0,r.createBlock)(xA,{key:1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(SA,{"component-list":c.children,"global-config":c.config},null,8,["component-list","global-config"])]),_:1}))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",sw,[(0,r.createElementVNode)("div",aw,[(0,r.createElementVNode)("span",lw,(0,r.toDisplayString)(`${(0,r.unref)(n)("属性配置")}${O.value}`),1)]),(0,r.createElementVNode)("div",cw,[(0,r.createVNode)(ne,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:tA,onChange:k},null,512)])],512),[[r.vShow,(0,r.unref)(W)]]),(0,r.createVNode)(YA,{ref_key:"previewFormLayerRef",ref:$,width:nA.width,height:nA.height,onOk:eA,onClosed:uA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(ne,{config:nA.formConfig,"is-preview":!0,ref_key:"previewFormRef",ref:J,actions:e.actions},null,8,["config","actions"])]),_:1},8,["width","height"]),(0,r.createVNode)(YA,{ref_key:"importFormLayerRef",ref:cA,width:800,height:600,"btn-text":"确认",onOk:yA,onClosed:IA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Ym,{"component-list":v,"table-list":g.value,ref_key:"importComponentRef",ref:mA},null,8,["table-list"])]),_:1},512)])}}}),dw=uw,wl=ft(dw,[ml]),Cl=(e,A)=>{const t={ver:"V3",indexPage:{...e},components:[]};return yl(A||[],t.components),t},yl=(e,A)=>{e.forEach(t=>{const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&yl(t.children||[],A),A.push(n)})},fw=e=>{const A=gw(e.components);return{pageConfig:e.indexPage,componentList:A}},gw=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{}};n.config&&Object.keys(n.config).forEach(a=>{o.config[a]=n.config[a]}),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const c={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();c[h]||(c[h]=[]),delete d.slot,c[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=c[d._i]||[];return{config:{label:d.label},children:h}}),delete o.config.groups}else o.children=a}}),A.indexPage||[]},hw=(e,A)=>{let t={},n=[];const o={};if(e.ver==="V3"){const a=e;t=a.indexPage;const c={};a.components.forEach(d=>{const h=A[d.type];if(!h)return;c[d.containerId]=c[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h.dragType||"component",componentName:h.componentName||"",runtimeType:h.runtimeType,groupId:d.groupId,config:d.config,isInput:!1,containerId:d.containerId,level:d.level};o[g.id]=g,c[d.containerId].push(g),g.dragType==="container"&&(g.children=[])}),Object.keys(c).forEach(d=>{o[d]&&(o[d].children=c[d])}),n=c.indexPage||[]}return{pageConfig:t,componentList:n,componentDic:o}},Bw=(0,r.defineComponent)({name:"DIndexDesignItem",__name:"indexDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)(e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"]))}}),vl=Bw,pw={class:"d-index-design j-block"},mw={class:"d-index-design-left"},ww={class:"j-component-list"},Cw={class:"j-component-tool"},yw={class:"j-component-tool-name"},vw={class:"d-index-design-center"},Qw={class:"design-toolbar"},Ew={class:"design-container"},Fw={key:0,class:"j-block design-empty"},Uw={class:"d-index-design-right"},bw={class:"d-index-design-panel-title"},Iw={style:{margin:"0","font-size":"14px"}},Hw={class:"d-index-design-panel"},_w=(0,r.defineComponent)({name:"DIndexDesign",__name:"indexDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,containerAddComponent:Function,componentConfigInit:Function,componentConfigChange:Function,flowComponents:{type:Array,default:()=>[]},flowInit:Function,flowComponentConfigInit:Function,flowComponentConfigChange:Function,flowComponentConfigs:{type:Object,default:()=>({})},actions:{type:Object,default:()=>({})}},setup(e,{expose:A}){const{t}=(0,Te.useAppInject)(),n=e,o=U=>{U.forEach(x=>{x.type==="d-input-flow"&&(x.config=x.config||{},x.config.flowComponents=n.flowComponents,x.config.flowInit=n.flowInit,x.config.flowComponentConfigInit=G=>{n.flowComponentConfigInit&&(G.designComponents=L.value,G.component=y.value,n.flowComponentConfigInit(G))},x.config.flowComponentConfigs=n.flowComponentConfigs,x.config.flowComponentConfigChange=n.flowComponentConfigChange),x.children&&o(x.children)})},a=(0,r.reactive)({name:"页面",id:"indexPage",type:"indexPage",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}});n.componentInit&&(a.config=n.componentInit("indexPage")||{});const c={},d=[];n.components.forEach(({children:U})=>{U.forEach(x=>{c[x.type]=x,x.dragType=x.dragType||"component",d.push({label:x.name,value:x.type})})});const h={};Object.keys(n.componentConfigs).forEach(U=>{const{hasBase:x}=c[U]||{hasBase:!1},G=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],R={type:"j-collapse",config:{defaultValue:[]},children:[]};x!==!1&&(R.children?.push({config:{label:"基础信息"},children:[...G]}),R.config?.defaultValue.push("_collapse0")),R.children?.push(...n.componentConfigs[U]),o(R.children||[]),h[U]=[R]});const g=U=>{y.value&&n.componentConfigChange&&n.componentConfigChange(y.value.type,{configRef:m,configData:y.value.config,...U})},B=(U,x)=>{n.componentConfigInit&&n.componentConfigInit(U,{configRef:m,...x})},w=(0,r.ref)(),m=(0,r.ref)(),{activedComponent:y,clearComponents:v,schemaComponentDic:I,designComponentList:L}=pl(w,m,a,n.componentInit,B,h,c,n.containerAddComponent),k=(0,r.computed)(()=>y.value?`【${y.value.name}】`:""),V=(0,r.ref)([]),F=n.components.length;for(let U=0;U<F;U++)V.value.push(U);(0,r.provide)("dui-design-provide",{designItemName:vl});const M=()=>{v()},tA=()=>{n.componentInit&&(a.config=n.componentInit("indexPage")||{}),v()},W=()=>(console.log("pValidate"),!0),aA=()=>Cl(a.config,a.children||[]),dA=U=>{const x=hw(U,c);a.config=x.pageConfig,a.children?.push(...x.componentList),Object.keys(x.componentDic).forEach(G=>{I[G]=x.componentDic[G]})},rA=(0,r.ref)(),oA=(0,r.ref)();(0,r.ref)(""),(0,r.reactive)({formConfig:{}});let AA=0;const O=U=>{if(oA.value)AA=0,oA.value.init(U);else{if(AA>600){console.warn("组件加载超时");return}AA++,setTimeout(()=>{O(U)},100)}},lA=()=>{},_=()=>{},Z=()=>{const{componentList:U}=fw(Cl(a.config,a.children||[]));rA.value.open("页面预览","full"),(0,r.nextTick)(()=>{O(U)})};return A({reset:tA,validate:W,getSchema:aA,setSchema:dA}),(U,x)=>{const G=(0,r.resolveComponent)("j-icon"),R=(0,r.resolveComponent)("d-drag-tool"),$=(0,r.resolveComponent)("el-collapse-item"),J=(0,r.resolveComponent)("el-collapse"),nA=(0,r.resolveComponent)("j-button"),hA=(0,r.resolveComponent)("el-tooltip"),UA=(0,r.resolveComponent)("el-divider"),eA=(0,r.resolveComponent)("el-empty"),uA=(0,r.resolveComponent)("d-drag-index-list"),Y=(0,r.resolveComponent)("d-drag-container"),cA=(0,r.resolveComponent)("j-form"),mA=(0,r.resolveComponent)("j-page"),yA=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",pw,[(0,r.createElementVNode)("div",mw,[x[1]||(x[1]=(0,r.createElementVNode)("div",{class:"d-index-design-panel-title"},"组件库",-1)),(0,r.createElementVNode)("div",ww,[(0,r.createVNode)(J,{modelValue:V.value,"onUpdate:modelValue":x[0]||(x[0]=IA=>V.value=IA)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(IA,fA)=>((0,r.openBlock)(),(0,r.createBlock)($,{key:fA,title:IA.name,name:fA},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(IA.children,(vA,S)=>((0,r.openBlock)(),(0,r.createBlock)(R,{key:S,config:vA},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",Cw,[(0,r.createVNode)(G,{class:"j-component-tool-icon",icon:vA.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",yw,(0,r.toDisplayString)((0,r.unref)(t)(vA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",vw,[(0,r.createElementVNode)("div",Qw,[x[2]||(x[2]=(0,r.createElementVNode)("div",null,null,-1)),(0,r.createElementVNode)("div",null,[(0,r.createVNode)(hA,{content:(0,r.unref)(t)("清空")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(nA,{danger:"",type:"text",onClick:M,icon:"mdi:delete-outline"})]),_:1},8,["content"]),(0,r.createVNode)(UA,{direction:"vertical"}),(0,r.createVNode)(hA,{content:(0,r.unref)(t)("预览")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(nA,{type:"text",onClick:Z,icon:"mdi:play-circle-outline"})]),_:1},8,["content"])])]),(0,r.createElementVNode)("div",Ew,[(0,r.createVNode)(Y,{ref_key:"dragContainer",ref:w,class:"design-drag-container","is-component-container":!1,"component-data":a},{default:(0,r.withCtx)(()=>[!a.children||a.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",Fw,[(0,r.createVNode)(eA,{description:(0,r.unref)(t)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,r.openBlock)(),(0,r.createBlock)(uA,{key:1,"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"]))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Uw,[(0,r.createElementVNode)("div",bw,[(0,r.createElementVNode)("span",Iw,(0,r.toDisplayString)(`${(0,r.unref)(t)("属性配置")}${k.value}`),1)]),(0,r.createElementVNode)("div",Hw,[(0,r.createVNode)(cA,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:m,onChange:g},null,512)])],512),[[r.vShow,(0,r.unref)(y)&&h[(0,r.unref)(y).type]]]),(0,r.createVNode)(yA,{ref_key:"previewLayerRef",ref:rA,"has-btns":!1,onOk:lA,onClosed:_},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(mA,{ref_key:"previewRef",ref:oA,actions:e.actions},null,8,["actions"])]),_:1},512)])}}}),Sw=_w,Ql=ft(Sw,[vl]),ee=Fu({Vue:()=>r,Vue2:()=>{},del:()=>Nw,install:()=>xw,isVue2:()=>!1,isVue3:()=>!0,set:()=>Dw});Uu(ee,require("vue"));var yE=!1,vE=!0,QE=void 0;function xw(){}function Dw(e,A,t){return Array.isArray(e)?(e.length=Math.max(e.length,A),e.splice(A,1,t),t):(e[A]=t,t)}function Nw(e,A){if(Array.isArray(e)){e.splice(A,1);return}delete e[A]}var Pr=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Lw=(0,ee.defineComponent)({name:"LineRuler",props:{scale:Number,thick:Number,palette:Object,index:Number,start:Number,vertical:Boolean,value:Number,isShowReferLine:Boolean},emits:["onMouseDown","onRelease","onRemove"],setup(e,{emit:A}){const t=(0,ee.ref)(0),n=(0,ee.ref)(!0);(0,ee.onMounted)(()=>{t.value=e.value});const o=B=>{n.value=B>=0},a=(0,ee.computed)(()=>{const B=(t.value-e.start)*e.scale;o(B);const w=B+"px";return e.vertical?{top:w}:{left:w}}),c=(0,ee.computed)(()=>{var B;const w=`1px solid ${(B=e.palette)==null?void 0:B.lineColor}`,m=e.vertical?{borderTop:w}:{borderLeft:w};return{cursor:e.isShowReferLine?e.vertical?"ns-resize":"ew-resize":"none",...m}}),d=(0,ee.computed)(()=>e.vertical?{left:e.thick+"px"}:{top:e.thick+"px"});return{startValue:t,showLine:n,offset:a,borderCursor:c,actionStyle:d,handleDown:B=>{const w=e.vertical?B.clientY:B.clientX,m=t.value;A("onMouseDown");const y=I=>{const L=e.vertical?I.clientY:I.clientX;t.value=Math.round(m+(L-w)/e.scale)},v=()=>{A("onRelease",t.value,e.index),document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",v)},handleRemove:()=>{A("onRemove",e.index)}}}}),Tw={class:"value"};function kw(e,A,t,n,o,a){return(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"line",style:(0,r.normalizeStyle)([e.offset,e.borderCursor]),onMousedown:A[1]||(A[1]=(...c)=>e.handleDown&&e.handleDown(...c))},[(0,r.createElementVNode)("div",{class:"action",style:(0,r.normalizeStyle)(e.actionStyle)},[(0,r.createElementVNode)("span",{class:"del",onClick:A[0]||(A[0]=(...c)=>e.handleRemove&&e.handleRemove(...c))},"×"),(0,r.createElementVNode)("span",Tw,(0,r.toDisplayString)(e.startValue),1)],4)],36)),[[r.vShow,e.showLine]])}var Mw=Pr(Lw,[["render",kw],["__scopeId","data-v-074b3d94"]]),Ow=e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1,El=.83,Kw=(e,A,t,n,o,a)=>{const{scale:c,width:d,height:h,ratio:g,palette:B}=o,{bgColor:w,fontColor:m,shadowColor:y,longfgColor:v,shortfgColor:I}=B;if(e.scale(g,g),e.clearRect(0,0,d,h),e.fillStyle=w,e.fillRect(0,0,d,h),n){const rA=(t-A)*c,oA=n*c;e.fillStyle=y,a?e.fillRect(rA,0,oA,h*3/8):e.fillRect(0,rA,d*3/8,oA)}const L=Ow(c),k=L*c,V=L*10,F=V*c,M=Math.floor(A/L)*L,tA=Math.floor(A/V)*V,W=(M-A)/L*k,aA=(tA-A)/V*F,dA=A+Math.ceil((a?d:h)/c);e.beginPath(),e.fillStyle=m,e.strokeStyle=v;for(let rA=tA,oA=0;rA<dA;rA+=V,oA++){const AA=aA+oA*F+.5;a?e.moveTo(AA,0):e.moveTo(0,AA),e.save(),a?e.translate(AA,h*.4):e.translate(d*.4,AA),a||e.rotate(-Math.PI/2),e.scale(El/g,El/g),e.fillText(rA.toString(),4*g,7*g),e.restore(),a?e.lineTo(AA,h*9/16):e.lineTo(d*9/16,AA)}e.stroke(),e.closePath(),e.beginPath(),e.strokeStyle=I;for(let rA=M,oA=0;rA<dA;rA+=L,oA++){const AA=W+oA*k+.5;a?e.moveTo(AA,0):e.moveTo(0,AA),rA%V!==0&&(a?e.lineTo(AA,h*1/4):e.lineTo(d*1/4,AA))}e.stroke(),e.closePath(),e.setTransform(1,0,0,1,0,0)},Rw=(0,ee.defineComponent)({name:"CanvasRuler",props:{showIndicator:Boolean,valueNum:Number,scale:Number,ratio:Number,palette:Object,vertical:Boolean,start:Number,width:Number,height:Number,selectStart:Number,selectLength:Number},emits:["onAddLine","update:showIndicator","update:valueNum"],setup(e,{emit:A}){const t=(0,ee.reactive)({canvasContext:null});let n=1;const o=(0,ee.ref)(null);(0,ee.onMounted)(()=>{n=e.ratio||window.devicePixelRatio||1,a(),c(n),d(n)});const a=()=>{t.canvasContext=o.value&&o.value.getContext("2d")},c=g=>{if(o.value){o.value.width=e.width*g,o.value.height=e.height*g;const B=t.canvasContext;B&&(B.font=`${12*g}px -apple-system,
28
+ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(A,t={}){if(!A)return null;let n=A;if(n.gridstack){const o=n.gridstack;return t&&(o.opts={...o.opts,...t}),t.children!==void 0&&o.load(t.children),o}return(!A.classList.contains("grid-stack")||LA.addRemoveCB)&&(LA.addRemoveCB?n=LA.addRemoveCB(A,t,!0,!0):n=q.createDiv(["grid-stack",t.class],A)),LA.init(t,n)}static registerEngine(A){LA.engineClass=A}get placeholder(){if(!this._placeholder){this._placeholder=q.createDiv([this.opts.placeholderClass,Ie.itemClass,this.opts.itemClass]);const A=q.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(A.textContent=this.opts.placeholderText)}return this._placeholder}constructor(A,t={}){this.el=A,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},A.gridstack=this,this.opts=t=t||{},A.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const n=q.toNumber(A.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const o=t.columnOpts;if(o){const h=o.breakpoints;!o.columnWidth&&!h?.length?delete t.columnOpts:(o.columnMax=o.columnMax||12,h?.length>1&&h.sort((g,B)=>(B.w||0)-(g.w||0)))}const a={...q.cloneDeep(Ie),column:q.toNumber(A.getAttribute("gs-column"))||Ie.column,minRow:n||q.toNumber(A.getAttribute("gs-min-row"))||Ie.minRow,maxRow:n||q.toNumber(A.getAttribute("gs-max-row"))||Ie.maxRow,staticGrid:q.toBool(A.getAttribute("gs-static"))||Ie.staticGrid,sizeToContent:q.toBool(A.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||Ie.draggable.handle},removableOptions:{accept:t.itemClass||Ie.removableOptions.accept,decline:Ie.removableOptions.decline}};A.getAttribute("gs-animate")&&(a.animate=q.toBool(A.getAttribute("gs-animate"))),t=q.defaults(t,a),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=A.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const c=this.el.closest("."+Ie.itemClass)?.gridstackNode;if(c&&(c.subGrid=this,this.parentGridNode=c,this.el.classList.add("grid-stack-nested"),c.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==Ie.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const h=t.cellHeight;delete t.cellHeight,this.cellHeight(h)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=Ke),this._setStaticClass();const d=t.engineClass||LA.engineClass||wi;if(this.engine=new d({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:h=>{h.forEach(g=>{const B=g.el;B&&(g._removeDOM?(B&&B.remove(),delete g._removeDOM):this._writePosAttr(B,g))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(h=>this._prepareElement(h)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const h=t.children;delete t.children,h.length&&this.load(h)}this.setAnimation(),t.subGridDynamic&&!TA.pauseDrag&&(TA.pauseDrag=!0),t.draggable?.pause!==void 0&&(TA.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(A=this.opts){this.el.classList.add("gs-"+A.column),typeof A.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/A.column}%`)}addWidget(A){if(!A)return;if(typeof A=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(A.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(A);let t,n=A;if(n.grid=this,n.el?t=n.el:LA.addRemoveCB?t=LA.addRemoveCB(this.el,A,!0,!1):t=this.createWidgetDivs(n),!t)return;if(n=t.gridstackNode,n&&t.parentElement===this.el&&this.engine.nodes.find(a=>a._id===n._id))return t;const o=this._readAttr(t);return q.defaults(A,o),this.engine.prepareNode(A),this.el.appendChild(t),this.makeWidget(t,A),t}createWidgetDivs(A){const t=q.createDiv(["grid-stack-item",this.opts.itemClass]),n=q.createDiv(["grid-stack-item-content"],t);return q.lazyLoad(A)?A.visibleObservable||(A.visibleObservable=new IntersectionObserver(([o])=>{o.isIntersecting&&(A.visibleObservable?.disconnect(),delete A.visibleObservable,LA.renderCB(n,A),A.grid?.prepareDragDrop(A.el))}),window.setTimeout(()=>A.visibleObservable?.observe(t))):LA.renderCB(n,A),t}makeSubGrid(A,t,n,o=!0){let a=A.gridstackNode;if(a||(a=this.makeWidget(A).gridstackNode),a.subGrid?.el)return a.subGrid;let c,d=this;for(;d&&!c;)c=d.opts?.subGridOpts,d=d.parentGridNode?.grid;t=q.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...c||{},...t||a.subGridOpts||{}}),a.subGridOpts=t;let h;t.column==="auto"&&(h=!0,t.column=Math.max(a.w||1,n?.w||1),delete t.columnOpts);let g=a.el.querySelector(".grid-stack-item-content"),B,w;if(o&&(this._removeDD(a.el),w={...a,x:0,y:0},q.removeInternalForSave(w),delete w.subGridOpts,a.content&&(w.content=a.content,delete a.content),LA.addRemoveCB?B=LA.addRemoveCB(this.el,w,!0,!1):(B=q.createDiv(["grid-stack-item"]),B.appendChild(g),g=q.createDiv(["grid-stack-item-content"],a.el)),this.prepareDragDrop(a.el)),n){const y=h?t.column:a.w,v=a.h+n.h,I=a.el.style;I.transition="none",this.update(a.el,{w:y,h:v}),setTimeout(()=>I.transition=null)}const m=a.subGrid=LA.addGrid(g,t);return n?._moving&&(m._isTemp=!0),h&&(m._autoColumn=!0),o&&m.makeWidget(B,w),n&&(n._moving?window.setTimeout(()=>q.simulateMouseEvent(n._event,"mouseenter",m.el),0):m.makeWidget(a.el,a)),this.resizeToContentCheck(!1,a),m}removeAsSubGrid(A){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(n=>{n.x+=this.parentGridNode.x,n.y+=this.parentGridNode.y,t.makeWidget(n.el,n)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,A&&window.setTimeout(()=>q.simulateMouseEvent(A._event,"mouseenter",t.el),0))}save(A=!0,t=!1,n=LA.saveCB,o){const a=this.engine.save(A,n,o);if(a.forEach(c=>{if(A&&c.el&&!c.subGrid&&!n)c.content=c.el.querySelector(".grid-stack-item-content")?.innerHTML,c.content||delete c.content;else if(!A&&!n&&delete c.content,c.subGrid?.el){const d=c.w||c.subGrid.getColumn(),h=c.subGrid.save(A,t,n,d);c.subGridOpts=t?h:{children:h},delete c.subGrid}delete c.el}),t){const c=q.cloneDeep(this.opts);c.marginBottom===c.marginTop&&c.marginRight===c.marginLeft&&c.marginTop===c.marginRight&&(c.margin=c.marginTop,delete c.marginTop,delete c.marginRight,delete c.marginBottom,delete c.marginLeft),c.rtl===(this.el.style.direction==="rtl")&&(c.rtl="auto"),this._isAutoCellHeight&&(c.cellHeight="auto"),this._autoColumn&&(c.column="auto");const d=c._alwaysShowResizeHandle;return delete c._alwaysShowResizeHandle,d!==void 0?c.alwaysShowResizeHandle=d:delete c.alwaysShowResizeHandle,q.removeInternalAndSame(c,Ie),c.children=a,c}return a}load(A,t=LA.addRemoveCB||!0){A=q.cloneDeep(A);const n=this.getColumn();A.forEach(B=>{B.w=B.w||B.minW||1,B.h=B.h||B.minH||1}),A=q.sort(A),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;A.forEach(B=>{o=Math.max(o,(B.x||0)+B.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o),o>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=A,this.engine.columnChanged(o,n,this.responseLayout),A=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(A,o,!0));const a=LA.addRemoveCB;typeof t=="function"&&(LA.addRemoveCB=t);const c=[];this.batchUpdate();const d=!this.engine.nodes.length,h=d&&this.opts.animate;h&&this.setAnimation(!1),!d&&t&&[...this.engine.nodes].forEach(B=>{B.id&&(q.find(A,B.id)||(LA.addRemoveCB&&LA.addRemoveCB(this.el,B,!1,!1),c.push(B),this.removeWidget(B.el,!0,!1)))}),this.engine._loading=!0;const g=[];return this.engine.nodes=this.engine.nodes.filter(B=>q.find(A,B.id)?(g.push(B),!1):!0),A.forEach(B=>{const w=q.find(g,B.id);if(w){if(q.shouldSizeToContent(w)&&(B.h=w.h),this.engine.nodeBoundFix(B),(B.autoPosition||B.x===void 0||B.y===void 0)&&(B.w=B.w||w.w,B.h=B.h||w.h,this.engine.findEmptyPosition(B)),this.engine.nodes.push(w),q.samePos(w,B)&&this.engine.nodes.length>1&&(this.moveNode(w,{...B,forceCollide:!0}),q.copyPos(B,w)),this.update(w.el,B),B.subGridOpts?.children){const m=w.el.querySelector(".grid-stack");m&&m.gridstack&&m.gridstack.load(B.subGridOpts.children)}}else t&&this.addWidget(B)}),delete this.engine._loading,this.engine.removedNodes=c,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,a?LA.addRemoveCB=a:delete LA.addRemoveCB,h&&this.setAnimation(!0,!0),this}batchUpdate(A=!0){return this.engine.batchUpdate(A),A||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(A=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!A||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const o=q.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/o)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(A){if(A!==void 0&&this._isAutoCellHeight!==(A==="auto")&&(this._isAutoCellHeight=A==="auto",this._updateResizeEvent()),(A==="initial"||A==="auto")&&(A=void 0),A===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;A=this.cellWidth()+n}const t=q.parseHeight(A);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(A=!1){return A&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const A=this.opts.columnOpts;if(!A||!A.columnWidth&&!A.breakpoints?.length)return!1;const t=this.getColumn();let n=t;const o=this._widthOrContainer(!0);if(A.columnWidth)n=Math.min(Math.round(o/A.columnWidth)||1,A.columnMax);else{n=A.columnMax;let a=0;for(;a<A.breakpoints.length&&o<=A.breakpoints[a].w;)n=A.breakpoints[a++].c||t}if(n!==t){const a=A.breakpoints?.find(c=>c.c===n);return this.column(n,a?.layout||A.layout),!0}return!1}compact(A="compact",t=!0){return this.engine.compact(A,t),this._triggerChangeEvent(),this}column(A,t="moveScale"){if(!A||A<1||this.opts.column===A)return this;const n=this.getColumn();return this.opts.column=A,this.engine?(this.engine.column=A,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,A,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(A=>A.matches("."+this.opts.itemClass)&&!A.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(A=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),A?this.el.parentNode.removeChild(this.el):(this.removeAll(A),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(A){return this.opts.float!==A&&(this.opts.float=this.engine.float=A,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(A,t=!1){const n=this.el.getBoundingClientRect();let o;t?o={top:n.top+document.documentElement.scrollTop,left:n.left}:o={top:this.el.offsetTop,left:this.el.offsetLeft};const a=A.left-o.left,c=A.top-o.top,d=n.width/this.getColumn(),h=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(a/d),y:Math.floor(c/h)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(A,t,n,o){return this.engine.isAreaEmpty(A,t,n,o)}makeWidget(A,t){const n=LA.getElement(A);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,t);const o=n.gridstackNode;this._updateContainerHeight(),o.subGridOpts&&this.makeSubGrid(n,o.subGridOpts,void 0,!1);let a;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(a=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),a&&delete this._ignoreLayoutsNodeChange,n}on(A,t){return A.indexOf(" ")!==-1?(A.split(" ").forEach(n=>this.on(n,t)),this):(A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable"?(A==="enable"||A==="disable"?this._gsEventHandler[A]=n=>t(n):this._gsEventHandler[A]=n=>{n.detail&&t(n,n.detail)},this.el.addEventListener(A,this._gsEventHandler[A])):A==="drag"||A==="dragstart"||A==="dragstop"||A==="resizestart"||A==="resize"||A==="resizestop"||A==="dropped"||A==="resizecontent"?this._gsEventHandler[A]=t:console.error("GridStack.on("+A+") event not supported"),this)}off(A){return A.indexOf(" ")!==-1?(A.split(" ").forEach(t=>this.off(t)),this):((A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable")&&this._gsEventHandler[A]&&this.el.removeEventListener(A,this._gsEventHandler[A]),delete this._gsEventHandler[A],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(A=>this.off(A)),this}removeWidget(A,t=!0,n=!0){return A?(LA.getElements(A).forEach(o=>{if(o.parentElement&&o.parentElement!==this.el)return;let a=o.gridstackNode;a||(a=this.engine.nodes.find(c=>o===c.el)),a&&(t&&LA.addRemoveCB&&LA.addRemoveCB(this.el,a,!1,!1),delete o.gridstackNode,this._removeDD(o),this.engine.removeNode(a,t,n),t&&o.parentElement&&o.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(A=!0,t=!0){return this.engine.nodes.forEach(n=>{A&&LA.addRemoveCB&&LA.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(A,t),t&&this._triggerRemoveEvent(),this}setAnimation(A=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(A)}):A?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=A,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(A,t=!0,n=!0){return!!this.opts.staticGrid===A?this:(A?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&n&&o.subGrid.setStatic(A,t,n)}),t&&this._setStaticClass(),this)}updateOptions(A){const t=this.opts;return A===t?this:(A.acceptWidgets!==void 0&&(t.acceptWidgets=A.acceptWidgets,this._setupAcceptWidget()),A.animate!==void 0&&this.setAnimation(A.animate),A.cellHeight&&this.cellHeight(A.cellHeight),A.class!==void 0&&A.class!==t.class&&(t.class&&this.el.classList.remove(t.class),A.class&&this.el.classList.add(A.class)),A.columnOpts?(this.opts.columnOpts=A.columnOpts,this.checkDynamicColumn()):A.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof A.column=="number"&&this.column(A.column),A.margin!==void 0&&this.margin(A.margin),A.staticGrid!==void 0&&this.setStatic(A.staticGrid),A.disableDrag!==void 0&&!A.staticGrid&&this.enableMove(!A.disableDrag),A.disableResize!==void 0&&!A.staticGrid&&this.enableResize(!A.disableResize),A.float!==void 0&&this.float(A.float),A.row!==void 0?(t.minRow=t.maxRow=t.row=A.row,this._updateContainerHeight()):(A.minRow!==void 0&&(t.minRow=A.minRow,this._updateContainerHeight()),A.maxRow!==void 0&&(t.maxRow=A.maxRow)),A.lazyLoad!==void 0&&(t.lazyLoad=A.lazyLoad),A.children?.length&&this.load(A.children),this)}update(A,t){return LA.getElements(A).forEach(n=>{const o=n?.gridstackNode;if(!o)return;const a={...q.copyPos({},o),...q.cloneDeep(t)};this.engine.nodeBoundFix(a),delete a.autoPosition;const c=["x","y","w","h"];let d;if(c.some(B=>a[B]!==void 0&&a[B]!==o[B])&&(d={},c.forEach(B=>{d[B]=a[B]!==void 0?a[B]:o[B],delete a[B]})),!d&&(a.minW||a.minH||a.maxW||a.maxH)&&(d={}),a.content!==void 0){const B=n.querySelector(".grid-stack-item-content");B&&B.textContent!==a.content&&(o.content=a.content,LA.renderCB(B,a),o.subGrid?.el&&(B.appendChild(o.subGrid.el),o.subGrid._updateContainerHeight())),delete a.content}let h=!1,g=!1;for(const B in a)B[0]!=="_"&&o[B]!==a[B]&&(o[B]=a[B],h=!0,g=g||!this.opts.staticGrid&&(B==="noResize"||B==="noMove"||B==="locked"));if(q.sanitizeMinMax(o),d){const B=d.w!==void 0&&d.w!==o.w;this.moveNode(o,d),B&&o.subGrid?o.subGrid.onResize(this.hasAnimationCSS()?o.w:void 0):this.resizeToContentCheck(B,o),delete o._orig}(d||h)&&this._writeAttr(n,o),g&&this.prepareDragDrop(o.el),LA.updateCB&&LA.updateCB(o)}),this}moveNode(A,t){const n=A._updating;n||this.engine.cleanNodes().beginUpdate(A),this.engine.moveNode(A,t),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(A){if(!A||(A.classList.remove("size-to-content-max"),!A.clientHeight))return;const t=A.gridstackNode;if(!t)return;const n=t.grid;if(!n||A.parentElement!==n.el)return;const o=n.getCellHeight(!0);if(!o)return;let a=t.h?t.h*o:A.clientHeight,c;if(t.resizeToContentParent&&(c=A.querySelector(t.resizeToContentParent)),c||(c=A.querySelector(LA.resizeToContentParent)),!c)return;const d=A.clientHeight-c.clientHeight,h=t.h?t.h*o-d:c.clientHeight;let g;if(t.subGrid){g=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const m=t.subGrid.el.getBoundingClientRect(),y=A.getBoundingClientRect();g+=m.top-y.top}else{if(t.subGridOpts?.children?.length)return;{const m=c.firstElementChild;if(!m){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${LA.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}g=m.getBoundingClientRect().height||h}}if(h===g)return;a+=g-h;let B=Math.ceil(a/o);const w=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;w&&B>w&&(B=w,A.classList.add("size-to-content-max")),t.minH&&B<t.minH?B=t.minH:t.maxH&&B>t.maxH&&(B=t.maxH),B!==t.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(t,{h:B}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(A){LA.resizeToContentCB?LA.resizeToContentCB(A):this.resizeToContent(A)}rotate(A,t){return LA.getElements(A).forEach(n=>{const o=n.gridstackNode;if(!q.canBeRotated(o))return;const a={w:o.h,h:o.w,minH:o.minW,minW:o.minH,maxH:o.maxW,maxW:o.maxH};if(t){const d=t.left>0?Math.floor(t.left/this.cellWidth()):0,h=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;a.x=o.x+d-(o.h-(h+1)),a.y=o.y+h-d}Object.keys(a).forEach(d=>{a[d]===void 0&&delete a[d]});const c=o._orig;this.update(n,a),o._orig=c}),this}margin(A){if(!(typeof A=="string"&&A.split(" ").length>1)){const t=q.parseHeight(A);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=A,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(A){return this.engine.willItFit(A)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const A=this.engine.getDirtyNodes(!0);return A&&A.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(A),this._triggerEvent("change",A)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(A,t){const n=t?new CustomEvent(A,{bubbles:!1,detail:t}):new Event(A);let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;return o.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const A=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!n)return this;if(!A&&!this.opts.minRow){const a=q.parseHeight(getComputedStyle(this.el).minHeight);if(a.h>0&&a.unit===o){const c=Math.floor(a.h/n);t<c&&(t=c)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[A?"minHeight":"height"]=t*n+o),A&&q.shouldSizeToContent(A)&&A.grid.resizeToContentCBCheck(A.el),this}_prepareElement(A,t=!1,n){n=n||this._readAttr(A),A.gridstackNode=n,n.el=A,n.grid=this,n=this.engine.addNode(n,t),this._writeAttr(A,n),A.classList.add(Ie.itemClass,this.opts.itemClass);const o=q.shouldSizeToContent(n);return o?A.classList.add("size-to-content"):A.classList.remove("size-to-content"),o&&this.resizeToContentCheck(!1,n),q.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(A,t){return(!t._moving&&!t._resizing||this._placeholder===A)&&(A.style.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,A.style.left=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,A.style.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,A.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),A.setAttribute("gs-x",String(t.x)),A.setAttribute("gs-y",String(t.y)),t.w>1?A.setAttribute("gs-w",String(t.w)):A.removeAttribute("gs-w"),t.h>1?A.setAttribute("gs-h",String(t.h)):A.removeAttribute("gs-h"),this}_writeAttr(A,t){if(!t)return this;this._writePosAttr(A,t);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const o in n)t[o]?A.setAttribute(n[o],String(t[o])):A.removeAttribute(n[o]);return this}_readAttr(A,t=!0){const n={};n.x=q.toNumber(A.getAttribute("gs-x")),n.y=q.toNumber(A.getAttribute("gs-y")),n.w=q.toNumber(A.getAttribute("gs-w")),n.h=q.toNumber(A.getAttribute("gs-h")),n.autoPosition=q.toBool(A.getAttribute("gs-auto-position")),n.noResize=q.toBool(A.getAttribute("gs-no-resize")),n.noMove=q.toBool(A.getAttribute("gs-no-move")),n.locked=q.toBool(A.getAttribute("gs-locked"));const o=A.getAttribute("gs-size-to-content");o&&(o==="true"||o==="false"?n.sizeToContent=q.toBool(o):n.sizeToContent=parseInt(o,10)),n.id=A.getAttribute("gs-id"),n.maxW=q.toNumber(A.getAttribute("gs-max-w")),n.minW=q.toNumber(A.getAttribute("gs-min-w")),n.maxH=q.toNumber(A.getAttribute("gs-max-h")),n.minH=q.toNumber(A.getAttribute("gs-min-h")),t&&(n.w===1&&A.removeAttribute("gs-w"),n.h===1&&A.removeAttribute("gs-h"),n.maxW&&A.removeAttribute("gs-max-w"),n.minW&&A.removeAttribute("gs-min-w"),n.maxH&&A.removeAttribute("gs-max-h"),n.minH&&A.removeAttribute("gs-min-h"));for(const a in n){if(!n.hasOwnProperty(a))return;!n[a]&&n[a]!==0&&a!=="sizeToContent"&&delete n[a]}return n}_setStaticClass(){const A=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...A),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...A),this.el.removeAttribute("gs-static")),this}onResize(A=this.el?.clientWidth){if(!A||this.prevWidth===A)return;this.prevWidth=A,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(n=>{n.subGrid&&n.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(A=!1,t=void 0){if(this.engine){if(A&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)q.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(n=>q.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(o=>{q.shouldSizeToContent(o)&&this.resizeToContentCBCheck(o.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(A=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!A&&t&&!this.resizeObserver?(this._sizeThrottle=q.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(A||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(A=".grid-stack-item"){return q.getElement(A)}static getElements(A=".grid-stack-item"){return q.getElements(A)}static getGridElement(A){return LA.getElement(A)}static getGridElements(A){return q.getElements(A)}_initMargin(){let A,t=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(A=q.parseHeight(this.opts.margin),this.opts.marginUnit=A.unit,t=this.opts.margin=A.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=t:(A=q.parseHeight(this.opts[a]),this.opts[a]=A.h,delete this.opts.margin)}),this.opts.marginUnit=A.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return we}static setupDragIn(A,t,n,o=document){t?.pause!==void 0&&(TA.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof A=="string"?q.getElements(A,o):A).forEach((a,c)=>{we.isDraggable(a)||we.dragIn(a,t),n?.[c]&&(a.gridstackNode=n[c])})}movable(A,t){return this.opts.staticGrid?this:(LA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noMove:o.noMove=!0,this.prepareDragDrop(o.el))}),this)}resizable(A,t){return this.opts.staticGrid?this:(LA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noResize:o.noResize=!0,this.prepareDragDrop(o.el))}),this)}disable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!1,A),this.enableResize(!1,A),this._triggerEvent("disable"),this}enable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!0,A),this.enableResize(!0,A),this._triggerEvent("enable"),this}enableMove(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableMove(A,t)}),this)}enableResize(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableResize(A,t)}),this)}cancelDrag(){const A=this._placeholder?.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&LA._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(A){return we.draggable(A,"destroy").resizable(A,"destroy"),A.gridstackNode&&delete A.gridstackNode._initDD,delete A.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return we.droppable(this.el,"destroy"),this;let A,t;const n=(o,a,c)=>{c=c||a;const d=c.gridstackNode;if(!d)return;if(!d.grid?.el){c.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const m=c.getBoundingClientRect();c.style.left=m.x+(this.dragTransform.xScale-1)*(o.clientX-m.x)/this.dragTransform.xScale+"px",c.style.top=m.y+(this.dragTransform.yScale-1)*(o.clientY-m.y)/this.dragTransform.yScale+"px",c.style.transformOrigin="0px 0px"}let{top:h,left:g}=c.getBoundingClientRect();const B=this.el.getBoundingClientRect();g-=B.left,h-=B.top;const w={position:{top:h*this.dragTransform.xScale,left:g*this.dragTransform.yScale}};if(d._temporaryRemoved){if(d.x=Math.max(0,Math.round(g/t)),d.y=Math.max(0,Math.round(h/A)),delete d.autoPosition,this.engine.nodeBoundFix(d),!this.engine.willItFit(d)){if(d.autoPosition=!0,!this.engine.willItFit(d)){we.off(a,"drag");return}d._willFitPos&&(q.copyPos(d,d._willFitPos),delete d._willFitPos)}this._onStartMoving(c,o,w,d,t,A)}else this._dragOrResize(c,o,w,d,t,A)};return we.droppable(this.el,{accept:o=>{const a=o.gridstackNode||this._readAttr(o,!1);if(a?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let c=!0;if(typeof this.opts.acceptWidgets=="function")c=this.opts.acceptWidgets(o);else{const d=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;c=o.matches(d)}if(c&&a&&this.opts.maxRow){const d={w:a.w,h:a.h,minW:a.minW,minH:a.minH};c=this.engine.willItFit(d)}return c}}).on(this.el,"dropover",(o,a,c)=>{let d=c?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._temporaryRemoved)return!1;if(d?._sidebarOrig&&(d.w=d._sidebarOrig.w,d.h=d._sidebarOrig.h),d?.grid&&d.grid!==this&&!d._temporaryRemoved&&d.grid._leave(a,c),c=c||a,t=this.cellWidth(),A=this.getCellHeight(!0),!d){const B=c.getAttribute("data-gs-widget")||c.getAttribute("gridstacknode");if(B){try{d=JSON.parse(B)}catch{console.error("Gridstack dropover: Bad JSON format: ",B)}c.removeAttribute("data-gs-widget"),c.removeAttribute("gridstacknode")}d||(d=this._readAttr(c)),d._sidebarOrig={w:d.w,h:d.h}}d.grid||(d.el||(d={...d}),d._isExternal=!0,c.gridstackNode=d);const h=d.w||Math.round(c.offsetWidth/t)||1,g=d.h||Math.round(c.offsetHeight/A)||1;return d.grid&&d.grid!==this?(a._gridstackNodeOrig||(a._gridstackNodeOrig=d),a.gridstackNode=d={...d,w:h,h:g,grid:this},delete d.x,delete d.y,this.engine.cleanupNode(d).nodeBoundFix(d),d._initDD=d._isExternal=d._temporaryRemoved=!0):(d.w=h,d.h=g,d._temporaryRemoved=!0),LA._itemRemoving(d.el,!1),we.on(a,"drag",n),n(o,a,c),!1}).on(this.el,"dropout",(o,a,c)=>{const d=c?.gridstackNode||a.gridstackNode;return d&&(!d.grid||d.grid===this)&&(this._leave(a,c),this._isTemp&&this.removeAsSubGrid(d)),!1}).on(this.el,"drop",(o,a,c)=>{const d=c?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._isExternal)return!1;const h=!!this.placeholder.parentElement,g=a!==c;this.placeholder.remove(),delete this.placeholder.gridstackNode,h&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const B=a._gridstackNodeOrig;if(delete a._gridstackNodeOrig,h&&B?.grid&&B.grid!==this){const m=B.grid;m.engine.removeNodeFromLayoutCache(B),m.engine.removedNodes.push(B),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!d||(h&&(this.engine.cleanupNode(d),d.grid=this),delete d.grid?._isTemp,we.off(a,"drag"),c!==a?(c.remove(),a=c):a.remove(),this._removeDD(a),!h))return!1;const w=d.subGrid?.el?.gridstack;return q.copyPos(d,this._readAttr(this.placeholder)),q.removePositioningStyles(a),g&&(d.content||d.subGridOpts||LA.addRemoveCB)?(delete d.el,a=this.addWidget(d)):(this._prepareElement(a,!0,d),this.el.appendChild(a),this.resizeToContentCheck(!1,d),w&&(w.parentGridNode=d),this._updateContainerHeight()),this.engine.addedNodes.push(d),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...o,type:"dropped"},B&&B.grid?B:void 0,d),!1}),this}static _itemRemoving(A,t){if(!A)return;const n=A?A.gridstackNode:void 0;!n?.grid||A.classList.contains(n.grid.opts.removableOptions.decline)||(t?n._isAboutToRemove=!0:delete n._isAboutToRemove,t?A.classList.add("grid-stack-item-removing"):A.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const A=document.querySelector(this.opts.removable);return A?(!this.opts.staticGrid&&!we.isDroppable(A)&&we.droppable(A,this.opts.removableOptions).on(A,"dropover",(t,n)=>LA._itemRemoving(n,!0)).on(A,"dropout",(t,n)=>LA._itemRemoving(n,!1)),this):this}prepareDragDrop(A,t=!1){const n=A?.gridstackNode;if(!n)return;const o=n.noMove||this.opts.disableDrag,a=n.noResize||this.opts.disableResize,c=this.opts.staticGrid||o&&a;if((t||c)&&(n._initDD&&(this._removeDD(A),delete n._initDD),c&&A.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!n._initDD){let d,h;const g=(m,y)=>{this.triggerEvent(m,m.target),d=this.cellWidth(),h=this.getCellHeight(!0),this._onStartMoving(A,m,y,n,d,h)},B=(m,y)=>{this._dragOrResize(A,m,y,n,d,h)},w=m=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const y=n.w!==n._orig.w,v=m.target;if(!(!v.gridstackNode||v.gridstackNode.grid!==this)){if(n.el=v,n._isAboutToRemove){const I=A.gridstackNode.grid;I._gsEventHandler[m.type]&&I._gsEventHandler[m.type](m,v),I.engine.nodes.push(n),I.removeWidget(A,!0,!0)}else q.removePositioningStyles(v),n._temporaryRemoved?(this._writePosAttr(v,n),this.engine.addNode(n)):this._writePosAttr(v,n),this.triggerEvent(m,v);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),m.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(y,n))}};we.draggable(A,{start:g,stop:w,drag:B}).resizable(A,{start:g,stop:w,resize:B}),n._initDD=!0}return we.draggable(A,o?"disable":"enable").resizable(A,a?"disable":"enable"),this}_onStartMoving(A,t,n,o,a,c){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=q.getValuesFromTransformedElement(A);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const d=this.placeholder.closest(".grid-stack");this.dragTransform=q.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=n.position,o._prevYPix=n.position.top,o._moving=t.type==="dragstart",o._resizing=t.type==="resizestart",delete o._lastTried,t.type==="dropover"&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(a,c,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const d=this.getColumn()-o.x,h=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;we.resizable(A,"option","minWidth",a*Math.min(o.minW||1,d)).resizable(A,"option","minHeight",c*Math.min(o.minH||1,h)).resizable(A,"option","maxWidth",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,d)).resizable(A,"option","maxWidthMoveLeft",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(A,"option","maxHeight",c*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,h)).resizable(A,"option","maxHeightMoveUp",c*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(A,t,n,o,a,c){const d={...o._orig};let h,g=this.opts.marginLeft,B=this.opts.marginRight,w=this.opts.marginTop,m=this.opts.marginBottom;const y=Math.round(c*.1),v=Math.round(a*.1);if(g=Math.min(g,v),B=Math.min(B,v),w=Math.min(w,y),m=Math.min(m,y),t.type==="drag"){if(o._temporaryRemoved)return;const L=n.position.top-o._prevYPix;o._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&q.updateScrollPosition(A,n.position,L);const k=n.position.left+(n.position.left>o._lastUiPosition.left?-B:g),V=n.position.top+(n.position.top>o._lastUiPosition.top?-m:w);d.x=Math.round(k/a),d.y=Math.round(V/c);const F=this._extraDragRow;if(this.engine.collide(o,d)){const M=this.getRow();let tA=Math.max(0,d.y+o.h-M);this.opts.maxRow&&M+tA>this.opts.maxRow&&(tA=Math.max(0,this.opts.maxRow-M)),this._extraDragRow=tA}else this._extraDragRow=0;if(this._extraDragRow!==F&&this._updateContainerHeight(),o.x===d.x&&o.y===d.y)return}else if(t.type==="resize"){if(d.x<0||(q.updateScrollResize(t,A,c),d.w=Math.round((n.size.width-g)/a),d.h=Math.round((n.size.height-w)/c),o.w===d.w&&o.h===d.h)||o._lastTried&&o._lastTried.w===d.w&&o._lastTried.h===d.h)return;const L=n.position.left+g,k=n.position.top+w;d.x=Math.round(L/a),d.y=Math.round(k/c),h=!0}o._event=t,o._lastTried=d;const I={x:n.position.left+g,y:n.position.top+w,w:(n.size?n.size.width:o.w*a)-g-B,h:(n.size?n.size.height:o.h*c)-w-m};if(this.engine.moveNodeCheck(o,{...d,cellWidth:a,cellHeight:c,rect:I,resizing:h})){o._lastUiPosition=n.position,this.engine.cacheRects(a,c,w,B,m,g),delete o._skipDown,h&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const L=t.target;o._sidebarOrig||this._writePosAttr(L,o),this.triggerEvent(t,L)}}triggerEvent(A,t){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[A.type]&&n._gsEventHandler[A.type](A,t)}_leave(A,t){t=t||A;const n=t.gridstackNode;if(!n||(t.style.transform=t.style.transformOrigin=null,we.off(A,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&t?t:A;const o=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=o,this.opts.removable===!0&&LA._itemRemoving(A,!0),A._gridstackNodeOrig?(A.gridstackNode=A._gridstackNodeOrig,delete A._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}};en.renderCB=(e,A)=>{e&&A?.content&&(e.textContent=A.content)},en.resizeToContentParent=".grid-stack-item-content",en.Utils=q,en.Engine=wi,en.GDRev="12.4.2";var km={class:"d-layout"},Mm=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-locked","gs-no-resize","gs-no-move","gs-min-w","gs-min-h","gs-max-w","gs-max-h"],Om=(0,r.defineComponent)({name:"DLayout",__name:"layout",props:{modelValue:{default:()=>[]},column:{default:24},cellHeight:{default:60},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},float:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removableOptions:{}},emits:["update:modelValue","added","removed","changed","dragStart","dragStop","resizeStart","resizeStop"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)();let c=null;const d=async()=>{a.value&&(await(0,r.nextTick)(),c&&c.destroy(!1),c=en.init({column:n.column,cellHeight:n.cellHeight,disableDrag:!(n.draggable&&!n.disable),disableResize:!(n.resizable&&!n.disable),animate:n.animate,float:n.float,removable:n.removable,removableOptions:n.removableOptions},a.value),c.on("added",(m,y)=>{const v=y[0];v&&(o("added",h(v)),B())}),c.on("removed",(m,y)=>{const v=y[0];v&&(o("removed",h(v)),B())}),c.on("change",()=>{B(),o("changed",(c?.save()||[]).map(m=>h(m)))}),c.on("dragstart",(m,y)=>{y&&o("dragStart",m,h(y.gridstackNode||y))}),c.on("dragstop",(m,y)=>{y&&o("dragStop",m,h(y.gridstackNode||y))}),c.on("resizestart",(m,y)=>{y&&o("resizeStart",m,h(y.gridstackNode||y))}),c.on("resizestop",(m,y)=>{y&&o("resizeStop",m,h(y.gridstackNode||y))}))},h=m=>({id:m.id||m.el?.getAttribute("gs-id")||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1,locked:m.locked||!1,noResize:m.noResize||!1,noMove:m.noMove||!1,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}),g=async()=>{if(!c||!a.value)return;await(0,r.nextTick)();const m=c.engine.nodes;new Set(m.map(v=>v.id));const y=new Set(n.modelValue.map(v=>v.id));m.forEach(v=>{if(!y.has(v.id||"")){const I=v.el;I&&c&&c.removeWidget(I,!1)}}),n.modelValue.forEach(v=>{const I=m.find(L=>L.id===v.id);if(I)I.el&&c&&c.update(I.el,{x:v.x,y:v.y,w:v.w,h:v.h,locked:v.locked,noResize:v.noResize,noMove:v.noMove,minW:v.minW,minH:v.minH,maxW:v.maxW,maxH:v.maxH});else{if(!a.value||!c)return;const L=a.value.querySelector(`[gs-id="${v.id}"]`);L&&c.makeWidget(L)}})},B=()=>{c&&o("update:modelValue",c.save().map(m=>{const y={id:m.id||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1},v=n.modelValue.find(I=>I.id===y.id);return v&&Object.keys(v).forEach(I=>{["id","x","y","w","h"].includes(I)||(y[I]=v[I])}),y}))},w=(0,r.computed)(()=>n.modelValue);return(0,r.watch)(()=>n.modelValue,async()=>{c&&(await(0,r.nextTick)(),g())},{deep:!0}),(0,r.watch)(()=>[n.column,n.cellHeight,n.draggable,n.resizable,n.disable,n.animate,n.float,n.removable],()=>{d()}),(0,r.onMounted)(()=>{d()}),(0,r.onBeforeUnmount)(()=>{c&&(c.destroy(!1),c=null)}),A({addItem:async m=>{if(c&&a.value){await(0,r.nextTick)();const y=a.value.querySelector(`[gs-id="${m.id}"]`);y&&(c.makeWidget(y),c.update(y,{x:m.x,y:m.y,w:m.w,h:m.h,locked:m.locked,noResize:m.noResize,noMove:m.noMove,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}))}},removeItem:m=>{if(c&&a.value){const y=a.value.querySelector(`[gs-id="${m}"]`);y&&c.removeWidget(y,!1)}},clear:()=>{c&&c.removeAll(!1)},getGrid:()=>c}),(m,y)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",km,[(0,r.createElementVNode)("div",{ref_key:"gridContainerRef",ref:a},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(w.value,v=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:v.id,"gs-id":v.id,"gs-x":v.x,"gs-y":v.y,"gs-w":v.w,"gs-h":v.h,"gs-locked":v.locked,"gs-no-resize":v.noResize,"gs-no-move":v.noMove,"gs-min-w":v.minW,"gs-min-h":v.minH,"gs-max-w":v.maxW,"gs-max-h":v.maxH,class:"d-layout-item"},[(0,r.renderSlot)(m.$slots,"item",{item:v})],8,Mm))),128))],512)]))}}),Km=Om,dl=ft(Km),WA=(e,A="",t=!1)=>t?`${e}pt`:A?`${e}${A}`:`${e}px`,ye=(e,A=0)=>e==null||isNaN(e)?0:Number(Number(e).toFixed(A)),Rm=e=>e*3/4,Vm=e=>e*4/3,Pm=["onMousedown"],Gm={key:2,class:"d-draggable__mask"},zm=(0,r.defineComponent)({name:"DDraggable",__name:"draggable",props:{index:{},mask:{type:Boolean,default:!0},scale:{default:1},readonly:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},step:{default:1},zIndex:{default:1},isActiveBgTransparent:{type:Boolean,default:!1},left:{default:0},top:{default:0},width:{},height:{},activeFlag:{type:Boolean,default:!1},isPt:{type:Boolean,default:!1}},emits:["focus","blur","over","out"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)(),c=(0,r.ref)(),d=(0,r.ref)(0),h=(0,r.ref)(0),g=(0,r.ref)(0),B=(0,r.ref)(0),w=(0,r.ref)(null),m=(0,r.ref)(!1),y=(0,r.ref)(!1),v=(0,r.ref)(!1),I=(0,r.ref)(!1),L=(0,r.ref)([{classname:"left"},{classname:"right"},{classname:"top"},{classname:"bottom"},{classname:"top-left"},{classname:"top-right"},{classname:"bottom-left"},{classname:"bottom-right"}]),k=(0,r.computed)(()=>n.scale),V=(0,r.computed)(()=>({left:WA(k.value,"",n.isPt)})),F=(0,r.computed)(()=>({left:WA(-k.value,"",n.isPt)})),M=(0,r.computed)(()=>({left:"auto",right:WA(-k.value,"",n.isPt)})),tA=(0,r.computed)(()=>({top:WA(-k.value,"",n.isPt)})),W=(0,r.computed)(()=>({top:"auto",bottom:WA(-k.value,"",n.isPt)})),aA=(0,r.computed)(()=>{const eA=8*k.value;return{width:WA(eA,"",n.isPt),height:WA(eA,"",n.isPt)}}),dA=(0,r.computed)(()=>({fontSize:WA(16*k.value,"",n.isPt)})),rA=(0,r.computed)(()=>Object.assign((()=>{if(I.value){const eA={zIndex:9999,...V.value};return n.isActiveBgTransparent&&(I.value||y.value)&&!n.readonly&&!n.disabled&&(eA.backgroundColor="color-mix(in srgb, var(--j-color-primary-bg) 60%, transparent)"),eA}return{zIndex:n.zIndex}})(),{top:WA(B.value,"",n.isPt),width:WA(d.value,"",n.isPt),height:WA(h.value,"",n.isPt),padding:WA(8*k.value,"",n.isPt),...V.value,left:WA(g.value,"",n.isPt)}));(0,r.watch)(()=>n.width,eA=>{d.value=ye(AA(eA))||(w.value?.offsetWidth??0)}),(0,r.watch)(()=>n.height,eA=>{h.value=ye(AA(eA))||(w.value?.offsetHeight??0)},{deep:!0}),(0,r.watch)(()=>n.left,eA=>{g.value=ye(AA(eA))}),(0,r.watch)(()=>n.top,eA=>{B.value=ye(AA(eA))}),(0,r.watch)(d,eA=>{a.value&&(a.value.style.width=WA(eA,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.width=WA(eA,"",n.isPt)))}),(0,r.watch)(h,eA=>{a.value&&(a.value.style.height=WA(eA,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.height=WA(eA,"",n.isPt)))}),(0,r.watch)(()=>n.activeFlag,eA=>{oA(eA)});const oA=eA=>{I.value=eA},AA=eA=>eA===void 0?0:n.isPt?Vm(eA):eA,O=()=>{c.value&&c.value.firstChild&&(w.value=c.value.firstChild,d.value=ye(AA(n.width))||(w.value?.offsetWidth??0),h.value=ye(AA(n.height))||(w.value?.offsetHeight??0),g.value=ye(AA(n.left)),B.value=ye(AA(n.top)),oA(n.activeFlag))},lA=eA=>{g.value=eA},_=eA=>{B.value=eA},Z=eA=>{const uA=8*k.value/2,Y={};return eA.split("-").forEach(cA=>{Y[cA]=WA(-uA,"",n.isPt)}),Y},U=eA=>{y.value=eA},x=eA=>n.isPt?Rm(eA):eA,G=()=>{m.value=!0,o("focus",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)})},R=()=>{m.value=!1,v.value=!1,o("blur",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)})},$=()=>{document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,R()}},J=(eA,uA)=>{if(n.disabled||n.readonly)return;let Y,cA,mA,yA,IA,fA;v.value=!0,G();let vA=eA.clientX,S=eA.clientY;document.onmousemove=H=>{m.value=!0,uA==="right"?(Y=!0,cA=!1):uA==="left"?(Y=!0,mA=!0,IA=!0,cA=!1):uA==="top"?(Y=!1,cA=!0,yA=!0,fA=!0):uA==="bottom"?(Y=!1,cA=!0):uA==="bottom-right"?(Y=!0,cA=!0):uA==="bottom-left"?(Y=!0,cA=!0,mA=!0,IA=!0):uA==="top-right"?(Y=!0,cA=!0,yA=!0,fA=!0):uA==="top-left"&&(Y=!0,cA=!0,mA=!0,IA=!0,yA=!0,fA=!0);const T=H.clientX-vA,D=H.clientY-S;if(vA=H.clientX,S=H.clientY,Y){let b=T*n.step;IA&&(b=-b),mA&&(g.value=ye(g.value-b)),d.value=ye(d.value+b)}if(cA){let b=D*n.step;fA&&(b=-b),yA&&(B.value=ye(B.value-b)),h.value=ye(h.value+b)}},$()},nA=()=>{y.value=!1,o("out",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)})},hA=()=>{n.disabled||n.readonly||(y.value=!0,o("over",{index:n.index,width:x(d.value),height:x(h.value),left:x(g.value),top:x(B.value)}))},UA=eA=>{if(n.disabled||n.readonly)return;I.value=!0,G();let uA=eA.clientX,Y=eA.clientY;document.onmousemove=cA=>{const mA=cA.clientX-uA,yA=cA.clientY-Y;uA=cA.clientX,Y=cA.clientY,g.value=ye(g.value+mA*n.step),B.value=ye(B.value+yA*n.step)},$()};return(0,r.onMounted)(()=>{O()}),A({setActive:oA,setLeft:lA,setTop:_,setOverActive:U}),(eA,uA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["d-draggable",{"d-draggable--active":(I.value||y.value)&&!e.readonly&&!e.disabled},{"d-draggable--pt":e.isPt&&!e.readonly&&!e.disabled},{"d-draggable--move":m.value},{"d-draggable--click":e.disabled}]),onMousedown:(0,r.withModifiers)(UA,["stop"]),onMouseover:(0,r.withModifiers)(hA,["stop"]),onMouseout:(0,r.withModifiers)(nA,["stop"]),style:(0,r.normalizeStyle)(rA.value)},[(0,r.createElementVNode)("div",{class:"d-draggable__wrapper",ref_key:"wrapper",ref:a},[(I.value||y.value||m.value)&&!e.readonly&&!e.disabled?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...tA.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...F.value}),class:"d-draggable__line d-draggable__line--top"},null,4),e.isPt?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...tA.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...F.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...W.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...M.value}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...W.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...V.value,...M.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4)],64)):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"d-draggable__line d-draggable__line--label",style:(0,r.normalizeStyle)(dA.value)},(0,r.toDisplayString)(g.value)+","+(0,r.toDisplayString)(B.value),5))],64)):(0,r.createCommentVNode)("",!0),!e.readonly&&!e.disabled?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(L.value,(Y,cA)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:cA},[I.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["d-draggable__range",`d-draggable__range--${Y.classname}`]),style:(0,r.normalizeStyle)([aA.value,Z(Y.classname)]),onMousedown:(0,r.withModifiers)(mA=>J(mA,Y.classname),["stop"])},null,46,Pm)):(0,r.createCommentVNode)("",!0)],64))),128)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",{class:"d-draggable__item",ref_key:"item",ref:c},[(0,r.renderSlot)(eA.$slots,"default")],512),!e.disabled&&e.mask?((0,r.openBlock)(),(0,r.createElementBlock)("div",Gm)):(0,r.createCommentVNode)("",!0)],512)],38))}}),$m=zm,fl=ft($m),gl=e=>{const A=Xm(e.components);return{formConfig:e.form,componentList:A}},hl=(e,A)=>{let t={},n=[];const o={},a=e;t=a.form;const c={};return a.components.forEach(d=>{const h=A[d.type];c[d.containerId]=c[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h?.dragType||"component",componentName:h?.componentName||"",runtimeType:h?.runtimeType,groupId:d.groupId,config:d.config,isInput:h?.isInput!==!1,containerId:d.containerId,level:d.level};h?.dragType==="container"&&(g.children=[]),o[g.id]=g,c[d.containerId].push(g)}),Object.keys(c).forEach(d=>{o[d]&&(o[d].children=c[d])}),n=c.form||[],{formConfig:t,componentList:n,componentDic:o}},Vr=(e,A)=>{const t={ver:"j1",form:{...e},components:[],db:{}};return Bl(A||[],t.components),t},Bl=(e,A)=>{e.forEach(t=>{if(t.type==="pkey")return;const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&Bl(t.children||[],A),A.push(n)})},Xm=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{rule:[]}};n.config&&Object.keys(n.config).forEach(a=>{if(a==="required"){n.config.required&&o.config?.rule?.push({required:!0,message:n.config.requiredMsg||"请输入"});return}if(a==="patterns"){n.config.patterns.forEach(c=>{c.reg&&c.msg&&o.config?.rule?.push({pattern:new RegExp(c.reg),message:`请输入${c.msg||""}`})});return}o.config[a]=n.config[a]}),n.type==="pkey"&&(o.config.isPkey=!0),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const c={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();c[h]||(c[h]=[]),delete d.slot,c[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=c[d._i]||[],g={label:d.label};d.active&&o.type==="j-collapse"&&(g.active=d.active);let B;if(o.type==="j-tabs"&&o.config?.tabKey&&o.config?.options.length>0){const m=o.config.options.find(y=>y.label===d._i);m&&(B=({formData:y})=>({display:m.value.includes(y[o.config?.tabKey||""])?m.display:!m.display}))}const w={config:g,children:h};return B&&(w.getCompConfig=B),w}),delete o.config.groups}else o.children=a}}),A.form},pl=(e,A,t,n,o,a,c,d)=>{const h=(0,r.ref)(),g=(0,r.reactive)({}),B=(0,r.computed)(()=>{const U=[];return Object.keys(g).forEach(x=>{const G=g[x];G.dragType==="component"&&G.type!=="pkey"&&U.push(G)}),U}),w=(U=[],x)=>{const G=A?.value?.init;typeof G=="function"&&G(U,x)},m=U=>o?o(U,{componentDic:g,components:B.value,configData:h.value.config}):{},y=(U,x)=>{if(h.value?.id===U)return;const G=g[U]||x;if(G?h.value=G:U===t.id?h.value=t:h.value=null,h.value){const R=a[h.value.type];R?(w(R,h.value.config),m(h.value.type)):w([])}else w([]);x&&ie("dragClick",{id:x.id})},v=()=>e.value.$el.getBoundingClientRect(),I=U=>U===t.id?t:g[U]||{},L=U=>{const x=[];if(U===t.id)x.push({id:U,name:t.name});else{const G=g[U];if(G){x.push({id:U,name:G.name});const R=L(G.containerId);x.push(...R)}}return x},k=(U,x)=>{const G=g[x];if(G===void 0)return!1;const R=G.containerId;return U===R?!0:R===t.id?!1:k(U,R)},V=U=>n?n(U)||{}:{},F=(U,x,G,R)=>{if(d){const $=I(U);return d(G.componentType,{container:$,groupId:x,configData:G},R)}return!1},M=({name:U,type:x,dragType:G,isInput:R,componentName:$,runtimeType:J},nA,hA,UA,eA=!1)=>{const uA=V(x);if(uA.id=gt(),uA.span=24,uA.componentType=x,tA(nA,uA.componentType))return;F(nA,UA,uA,!0);const Y={id:uA.id,name:U,type:x,runtimeType:J,componentName:$||"",dragType:G||"component",containerId:nA,isInput:!!R,level:g[nA]?g[nA].level+1:1,config:uA,isNewAdd:!eA,groupId:UA};return Y.dragType==="container"&&(Y.children=[]),g[Y.id]=Y,I(nA).children?.splice(hA,0,Y),Y},tA=(U,x)=>!!(I(U).config.componentType==="gridtable"&&["divider","label","text","textEditor","viewTable","card","collapse","tabs","qrcode","barcode","tableLayout"].includes(x)),W=(U,x,G=!1)=>{let R=null;const $=I(U).children,J=$?.findIndex(nA=>nA.id===x)||0;if(G&&$&&$.length>1){let nA=J+1;J>0&&(nA=J-1),R=$[nA]}return $?.splice(J,1),R?.id},aA=(U,x,G,R)=>{const $=I(x).children,J=U.containerId!==x;U.containerId=x,U.groupId=R,$?.splice(G,0,U),F(x,R,U.config,J)&&(lA(),y(U.id))},dA=U=>{let x="";const G=I(U);return G&&(G.children&&G.children.length>0&&G.children.forEach(R=>{dA(R.id)}),x=W(G.containerId,U,!0)||"",delete g[U]),h.value&&h.value.id===U&&(h.value=null,A.value.init([])),x},rA=(U,x=[])=>{const G=I(U);if(G&&G.children&&G.children.length>0){const R=[];G.children.forEach($=>{$.groupId&&x.includes($.groupId)&&R.push($.id)}),R.forEach($=>{dA($),delete g[$]})}},oA=(U,x)=>{const G=I(U);G&&(G.children&&G.children.length>0&&G.children.forEach(R=>{R.groupId===x&&dA(R.id)}),delete g[U])},AA=U=>{const x=pn(I(U));x.id=gt(),x.config.id=x.id,g[x.id]=x;const G=I(x.containerId).children,R=G?.findIndex($=>$.id===U)||0;G?.splice(R+1,0,x)},O=()=>{t.children=[],bu(g),h.value&&(ie("dragClick",{id:""}),h.value=null,A.value.init([]))},lA=()=>{h.value&&(ie("dragClick",{id:""}),h.value=null,A.value.init([]))},_=U=>{const x=h.value,G=I(x.containerId).children,R=G?.findIndex($=>$.id===x.id)||0;dA(x.id),(0,r.nextTick)(()=>{const $=c[U],J=V(U);J.id=x.id,J.span=x.config.span,J.componentType=U,J.table=x.config.table,J.field=x.config.field,x.config.isSubTable&&(J.isSubTable=x.config.isSubTable);const nA={id:J.id,name:$.name,type:U,runtimeType:$.runtimeType,componentName:$.componentName||"",dragType:x.dragType,groupId:x.groupId,containerId:x.containerId,isInput:x.isInput,level:x.level,config:J,isNewAdd:!0};g[nA.id]=nA,G?.splice(R,0,nA)})},Z=U=>{ie("dragAddByClick",U)};return(0,r.provide)("d-drag-design-provide",{activedComponent:h,getDesignLocals:v,getComponent:I,getParentComponents:L,isMyChildComponent:k,selectComponent:y,addComponent:M,deleteComponent:dA,copyComponent:AA,removeComponentFromContainer:W,addComponentToContainer:aA,top:t,deleteChildren:oA,deleteChildrens:rA}),{activedComponent:h,clearComponents:O,changeComponent:_,schemaComponentDic:g,clearSelect:lA,addComponent:M,addComponentByTable:Z,designComponentList:B}},Wm=(0,r.defineComponent)({__name:"importComponent",props:{componentList:{type:Array,default:()=>[]},tableList:{type:Array,default:()=>[]}},setup(e,{expose:A}){const t=e,n=(0,r.computed)(()=>t.tableList.map(g=>({label:g.comment?`${g.name}(${g.comment})`:g.name,value:g.name}))),o=(0,r.ref)(),a=[{id:"layout",type:"j-layout",config:{top:48,topMove:!1,autoSize:["default"]},children:[{id:"table",type:"j-select",slot:"top",config:{label:"表名选择",loadOptions:()=>n,allowClear:!1}},{id:"fields",type:"j-table",config:{editConfig:{isAddBtn:!1,isRemoveBtn:!1},height:"100%",isMultiple:!0},children:[{id:"name",type:"span",config:{label:"字段名"}},{id:"type",type:"j-select",config:{label:"组件选择",options:t.componentList,width:200}}]}]}],c=(g,B)=>{if(g.id==="table"){const w=t.tableList.find(m=>m.name===B.value);if(w){const m=w.columns.map(y=>({value:y.name,name:y.coment?`${y.name}(${y.coment})`:y.name,type:"input",label:y.coment||y.name,selected:!y.isPrimary}));o.value.setFormData({fields:m})}}};return(0,r.onMounted)(()=>{o.value.init(a)}),A({ok:()=>{const g=o.value.getFormData(!1);return{addList:g.fields.filter(B=>B.selected),table:g.table,containerId:g.containerId,isSubTable:g.isSubTable}},closed:()=>{}}),(g,B)=>{const w=(0,r.resolveComponent)("j-form");return(0,r.openBlock)(),(0,r.createBlock)(w,{ref_key:"formRef",ref:o,"form-config":{labelWidth:"72px"},onChange:c},null,512)}}}),Ym=Wm,Jm=(0,r.defineComponent)({props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){const{t:A}=(0,Te.useAppInject)();return{labelWidth:(0,r.computed)(()=>e.componentData.config?.notShowLabel?"0px":e.componentData.config?.labelWidth===void 0&&e.globalConfig.labelWidth!==void 0?`${e.globalConfig.labelWidth}px`:e.componentData.config?.labelWidth?`${e.componentData.config?.labelWidth}px`:void 0),inputConfig:(0,r.computed)(()=>{const t={...e.componentData?.config};return e.globalConfig.size===void 0&&(t.size=e.globalConfig.size),t.display=!0,t}),t:A}}}),Zm=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t};function jm(e,A,t,n,o,a){const c=(0,r.resolveComponent)("j-comp"),d=(0,r.resolveComponent)("el-form-item");return e.componentData.isInput?((0,r.openBlock)(),(0,r.createBlock)(d,{key:0,"label-width":e.labelWidth,label:e.t(e.componentData.config?.notShowLabel?"":e.componentData.config?.label||""),rules:e.componentData.config?.required?[{required:!0,message:""}]:[]},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(c,{type:e.componentData?.componentName||e.componentData?.type,config:e.inputConfig,modelValue:e.componentData?.config.defaultValue},null,8,["type","config","modelValue"])]),_:1},8,["label-width","label","rules"])):e.componentData?.children?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)({key:1},e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"])):((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.normalizeProps)((0,r.mergeProps)({key:2},e.componentData?.config)),null,16))}var ml=Zm(Jm,[["render",jm]]),qm={class:"d-form-design j-block"},Aw={class:"d-form-design-left"},ew={class:"d-form-design-component-list"},tw={class:"j-component-tool"},nw={class:"j-component-tool-name"},rw={class:"d-form-design-center"},ow={class:"d-form-design-container"},iw={key:0,class:"d-form-design-empty"},sw={class:"d-form-design-right"},aw={class:"d-form-design-panel-title"},lw={style:{margin:"0","font-size":"14px"}},cw={class:"d-form-design-panel"},uw=(0,r.defineComponent)({name:"DFormDesign",__name:"formDesign",props:{notBindTable:{type:Boolean,default:!1},components:{default:()=>[]},componentConfigs:{default:()=>({})},componentInit:{type:Function,default:void 0},containerAddComponent:{type:Function,default:void 0},componentConfigInit:{type:Function,default:void 0},componentConfigChange:{type:Function,default:void 0},componentConfigValidate:{type:Function,default:void 0},flowComponents:{default:()=>[]},flowInit:{type:Function,default:void 0},flowComponentConfigInit:{type:Function,default:void 0},flowComponentConfigChange:{type:Function,default:void 0},flowComponentConfigs:{default:()=>({})},actions:{}},setup(e,{expose:A}){const t=e,{t:n,warning:o,error:a}=(0,Te.useAppInject)(),c=(0,r.reactive)({name:"表单",id:"form",type:"form",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}}),d=(0,r.ref)([]),h=t.components.length;for(let D=0;D<h;D++)d.value.push(D);t.componentInit&&(c.config=t.componentInit("form")||{});const g=(0,r.ref)([]),B=(0,r.computed)(()=>g.value.map(D=>({label:D.comment?`${D.name}(${D.comment})`:D.name,value:D.name}))),w=(0,r.computed)(()=>{if(W.value){const D=tA.value.getFormData(!1);if(D.table){const b=g.value.find(z=>z.name===D.table);if(b)return b.columns.map(z=>({value:z.name,label:z.coment?`${z.name}(${z.coment})`:z.name,coment:z.coment}))}}return[]}),m=D=>{g.value=D},y={},v=[];t.components.forEach(({children:D})=>{D.forEach(b=>{y[b.type]=b,b.dragType=b.dragType||"component",b.isInput!==!1&&(b.isInput=!0,v.push({label:b.name,value:b.type}))})});const I=D=>{D.forEach(b=>{b.type==="d-input-flow"&&(b.config=b.config||{},b.config.flowComponents=t.flowComponents,b.config.flowInit=t.flowInit,b.config.flowComponentConfigInit=z=>{t.flowComponentConfigInit&&(z.designComponents=AA.value,z.component=W.value,t.flowComponentConfigInit(z))},b.config.flowComponentConfigs=t.flowComponentConfigs,b.config.flowComponentConfigChange=t.flowComponentConfigChange),b.children&&I(b.children)})},L={};Object.keys(t.componentConfigs||{}).forEach(D=>{const{hasBase:b,isInput:z,hasTwoPlaceholder:P,hasPlaceholder:gA,hasSpan:iA,hasLabel:SA,bindTable:xA,labelTitle:KA}=y[D]||{hasBase:!1},ne=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"componentType",type:"j-select",config:{label:"类型",allowClear:!1,display:z,options:v}},{id:"label",type:"j-input",config:{label:KA||"标题"},getCompConfig:({formData:PA})=>({display:SA!==!1&&!PA.notShowLabel})},{id:"notShowLabel",type:"j-switch",config:{label:"不显示"+(KA||"标题"),activeValue:!0,inactiveValue:!1},getCompConfig:({formData:PA})=>({display:SA!==!1&&!PA.isSubTable})},{id:"labelWidth",type:"j-number",config:{label:"标题宽度"},getCompConfig:({formData:PA})=>({display:z&&!PA.notShowLabel&&!PA.isSubTable})},{id:"placeholder",type:"j-input",config:{display:z&&!P&&gA!==!1,label:"占位提示"}},{id:"startPlaceholder",type:"j-input",config:{display:!!P,label:"开始占位"}},{id:"endPlaceholder",type:"j-input",config:{display:!!P,label:"结束占位"}},{id:"span",type:"j-slider",config:{label:"表单栅栏",min:6,max:24,showTooltip:!0,step:6,showStops:!0,defautValue:24},getCompConfig:({formData:PA})=>({display:iA!==!1&&!PA.isSubTable})},{id:"width",type:"j-number",config:{label:"单元格宽度",min:1},getCompConfig:({formData:PA})=>({display:!!PA.isSubTable})},{id:"isNotSave",type:"j-switch",config:{label:"不存表",display:z&&xA!==!1,activeValue:!0,inactiveValue:!1}},{id:"table",type:"j-select",config:{label:"数据表",loadOptions:()=>B},getCompConfig:({formData:PA})=>({display:(z&&xA!==!1||xA===!0)&&(!PA.isSubTable||xA===!0)&&!PA.isNotSave&&!t.notBindTable})},{id:"field",type:"j-select",config:{label:"表字段",loadOptions:()=>w},getCompConfig:({formData:PA})=>({display:z&&xA!==!1&&!PA.isNotSave&&!t.notBindTable})},{id:"csType",type:"j-select",config:{label:"字段类型",allowClear:!1,options:[{label:"短文本",value:"string"},{label:"长文本",value:"text"},{label:"整数",value:"int"},{label:"小数",value:"decimal"},{label:"时间日期",value:"DateTime"}]},getCompConfig:({formData:PA})=>({display:z&&xA!==!1&&!PA.isNotSave&&t.notBindTable})},{id:"fieldLen",type:"j-number",config:{label:"字段长度"},getCompConfig:({formData:PA})=>({display:z&&xA!==!1&&!PA.isNotSave&&t.notBindTable&&PA.csType==="string"})}],YA={type:"j-collapse",config:{defaultValue:[]},children:[]};b!==!1&&(YA.children?.push({config:{label:"基础信息"},children:[...ne]}),YA.config?.defaultValue.push("_collapse0")),YA.children?.push(...t.componentConfigs[D]),I(YA.children||[]),L[D]=[YA]});const k=D=>{const{value:b}=D||{};D.id==="componentType"&&dA(b),W.value&&t.componentConfigChange&&(D.id==="field"&&D.data?.coment&&(W.value.config.label=D.data?.coment),t.componentConfigChange(W.value.type,{configRef:tA,configData:W.value.config,...D})),D.id==="table"&&W.value&&W.value.type==="gridtable"&&(W.value.children||[]).forEach(z=>{z.isInput&&(z.config.table=b)})},V=(D,b)=>{y[D]?.isInput&&(t.notBindTable&&(b.configData.csType||tA.value.setFormData({main:{csType:y[D]?.csType,fieldLen:y[D]?.fieldLen}})),B.value.length===1&&tA.value.setFormData({main:{table:B.value[0].value}})),t.componentConfigInit&&t.componentConfigInit(D,{configRef:tA,...b,notBindTable:t.notBindTable})},F=(D,b,z)=>{let P=!1;const gA=y[D];return b.container.type==="gridtable"?(!b.configData.isSubTable||z)&&(b.configData.isSubTable=!0,gA.isInput&&(b.configData.table=b.container.config.table,b.configData.field=""),P=!0):b.configData.isSubTable&&(P=!0,b.configData.isSubTable=!1,gA.isInput&&(b.configData.table="")),t.containerAddComponent&&t.containerAddComponent(D,b),P},M=(0,r.ref)(),tA=(0,r.ref)(),{activedComponent:W,clearComponents:aA,changeComponent:dA,schemaComponentDic:rA,addComponentByTable:oA,designComponentList:AA}=pl(M,tA,c,t.componentInit,V,L,y,F),O=(0,r.computed)(()=>W.value?`【${W.value.name}】`:"");(0,r.provide)("dui-design-provide",{designItemName:ml});const lA=()=>{aA()},_=()=>{t.componentInit&&(c.config=t.componentInit("form")||{}),aA()},Z=()=>{let D=0;const b=Vr(c.config,c.children||[]);if(t.notBindTable){const z={};b.components.forEach(iA=>{const{isInput:SA,bindTable:xA}=y[iA.type]||{hasBase:!1};SA&&xA!==!1?iA.config.table&&!z.main&&(z.main={name:iA.config.table,comment:"主表",type:"main",pKey:"J_Id"}):xA&&(z[iA.id]={name:iA.config.table||"t"+new Date().getTime()+D,comment:`子表${iA.config.label}`,type:"chlid",field:"J_PId",relationField:"J_Id",pKey:"J_Id"},iA.config.table=z[iA.id].name,D++)}),z.main||(z.main={name:"t"+new Date().getTime()+D,comment:"主表",type:"main",pKey:"J_Id"},D++);let P=0;b.components.forEach(iA=>{const{isInput:SA,bindTable:xA}=y[iA.type]||{hasBase:!1};!iA.config.isNotSave&&SA&&xA!==!1&&(iA.config.csType||(iA.config.csType=y[iA.type]?.csType,iA.config.fieldLen=y[iA.type]?.fieldLen),iA.config.isSubTable?iA.config.table=z[iA.containerId].name:iA.config.table=z.main.name,iA.config.field=iA.config.field||`f${Math.floor(Date.now()/1e3)}${P}`,P++)});const gA=[];Object.keys(z).forEach(iA=>{z[iA].type==="chlid"&&(z[iA].relationName=z.main.name,z[iA].comment+=`,关联主表${z.main.name}`),gA.push(z[iA])}),b.db=gA}else{const z={};g.value.forEach(P=>{P.columns.forEach(gA=>{z[`${P.name}_${gA.name}`]=gA.csType})}),b.components.forEach(P=>{P.config.table&&P.config.field&&(P.config.csType=z[`${P.config.table}_${P.config.field}`])})}return t.notBindTable?b.db.forEach(z=>{if(!b.components.find(P=>P.config.table===z.name&&P.config.field==="J_Id")){const P=b.components.find(gA=>gA.config.table===z.name&&gA.config.field);P&&b.components.push({id:z.name+"_J_Id",name:z.name+"_J_Id",type:"pkey",runtimeType:"j-input",groupId:"",config:{display:!1,table:z.name,field:"J_Id",label:"主键"},containerId:P.containerId,level:P.level})}}):g.value.forEach(z=>{z.columns.forEach(P=>{if(P.isPrimary&&!b.components.find(gA=>gA.config.table===z.name&&gA.config.field===P.name)){const gA=b.components.find(iA=>iA.config.table===z.name&&iA.config.field);gA&&b.components.push({id:z.name+"_"+P.name,name:z.name+"_"+P.name,type:"pkey",runtimeType:"j-input",groupId:"",config:{display:!1,table:z.name,field:P.name,label:"主键"+P.name,isIdentity:P.isIdentity},containerId:gA.containerId,level:gA.level})}})}),b},U=D=>{const b=hl(D,y);c.config=b.formConfig,c.children?.push(...b.componentList),Object.keys(b.componentDic).forEach(z=>{rA[z]=b.componentDic[z]})},x=()=>R(Vr(c.config,c.children||[]).components,{},{}),G=D=>{const{isInput:b,bindTable:z}=y[D]||{hasBase:!1};if(!b&&z)return!0},R=(D,b,z)=>{if(!t.notBindTable)for(const P of D){const{isInput:gA,bindTable:iA}=y[P.type]||{hasBase:!1};if(!P.config.isNotSave&&P.type!=="pkey"){if(gA&&iA!==!1){if((0,Te.isNullOrEmpty)(P.config.table))return a&&a(`请【${P.config.label}】绑定数据表!`),!1;if(!P.config.isSubTable){if(z[P.config.table]&&G(z[P.config.table].type))return a&&a(`【${P.config.label}】和【${z[P.config.table].config.label}】重复绑定【${P.config.table}】表!`),!1;P.config.table&&(z[P.config.table]=P)}}else if(iA){if((0,Te.isNullOrEmpty)(P.config.table))return a&&a(`【${P.config.label}】请绑定数据表!`),!1;if(z[P.config.table])return a&&a(`【${P.config.label}】和【${z[P.config.table].config.label}】重复绑定【${P.config.table}】表!`),!1;P.config.table&&(z[P.config.table]=P)}}}for(const P of D){if(!t.notBindTable){const{isInput:gA,bindTable:iA}=y[P.type]||{hasBase:!1};if(!P.config.isNotSave&&gA&&iA!==!1){if((0,Te.isNullOrEmpty)(P.config.field))return a&&a(`请【${P.config.label}】绑定表字段!`),!1;if(b[`${P.config.table}-${P.config.field}`])return a&&a(`【${P.config.label}】和【${b[`${P.config.table}-${P.config.field}`].config.label}】重复绑定【${P.config.field}】字段!`),!1;b[`${P.config.table}-${P.config.field}`]=P}}if(t.componentConfigValidate&&!t.componentConfigValidate(P.type,{configData:P.config,errorTip:a}))return!1}return!0},$=(0,r.ref)(),J=(0,r.ref)(),nA=(0,r.reactive)({width:0,height:0,formConfig:{}});let hA=0;const UA=D=>{if(J.value)hA=0,J.value.init(D||[]);else{if(hA>600){console.warn("表单组件加载超时");return}hA++,setTimeout(()=>{UA(D)},100)}},eA=()=>{},uA=()=>{},Y=()=>{const D=Vr(c.config,c.children||[]);nA.width=D.form.width||800,nA.height=D.form.height||600,$.value.open("表单预览",D.form.layerType),(0,r.nextTick)(()=>{const{formConfig:b,componentList:z}=gl(D);nA.formConfig=b,UA(z)})},cA=(0,r.ref)(),mA=(0,r.ref)(),yA=()=>{const{addList:D,table:b}=mA.value?.ok()||{addList:[]};if(D.length<=0)o&&o("请选择字段!");else{if(W.value?.config.componentType==="gridtable"||W.value?.config.isSubTable)if(W.value.config.table){if(W.value.config.table!==b){o&&o("请设置相同的表和子表!");return}}else{let z=W.value;W.value.config.isSubTable&&(z=rA[W.value.containerId]),z.config.table=b,(z.children||[]).forEach(P=>{P.isInput&&(P.config.table=b)}),tA.value.setFormData({main:{table:b}})}D.forEach(z=>{const P=(0,Te.deepClone)(y[z.type]);P.config={table:b,field:z.value,label:z.label},oA(P)}),cA.value.close()}},IA=()=>{mA.value?.closed()};return A({setTables:D=>{m(D)},getSchema:()=>Z(),setSchema:D=>U(D),reset:()=>_(),validate:()=>x(),preview:Y,clear:lA}),(D,b)=>{const z=(0,r.resolveComponent)("j-icon"),P=(0,r.resolveComponent)("d-drag-tool"),gA=(0,r.resolveComponent)("el-collapse-item"),iA=(0,r.resolveComponent)("el-collapse"),SA=(0,r.resolveComponent)("d-drag-form-list"),xA=(0,r.resolveComponent)("el-row"),KA=(0,r.resolveComponent)("d-drag-container"),ne=(0,r.resolveComponent)("j-form"),YA=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",qm,[(0,r.createElementVNode)("div",Aw,[(0,r.createElementVNode)("div",ew,[(0,r.createVNode)(iA,{modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=PA=>d.value=PA)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(PA,Re)=>((0,r.openBlock)(),(0,r.createBlock)(gA,{key:Re,title:PA.name,name:Re},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(PA.children,(ve,Gr)=>((0,r.openBlock)(),(0,r.createBlock)(P,{key:Gr,config:ve},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",tw,[(0,r.createVNode)(z,{class:"j-component-tool-icon",icon:ve.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",nw,(0,r.toDisplayString)((0,r.unref)(n)(ve.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",rw,[(0,r.createElementVNode)("div",ow,[(0,r.createVNode)(KA,{ref_key:"dragContainer",ref:M,class:"d-form-design-drag-container","is-component-container":!1,"component-data":c},{default:(0,r.withCtx)(()=>[!c.children||c.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",iw,[(0,r.createElementVNode)("div",null,(0,r.toDisplayString)((0,r.unref)(n)("请从左侧拖拽组件到此处")),1)])):((0,r.openBlock)(),(0,r.createBlock)(xA,{key:1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(SA,{"component-list":c.children,"global-config":c.config},null,8,["component-list","global-config"])]),_:1}))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",sw,[(0,r.createElementVNode)("div",aw,[(0,r.createElementVNode)("span",lw,(0,r.toDisplayString)(`${(0,r.unref)(n)("属性配置")}${O.value}`),1)]),(0,r.createElementVNode)("div",cw,[(0,r.createVNode)(ne,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:tA,onChange:k},null,512)])],512),[[r.vShow,(0,r.unref)(W)]]),(0,r.createVNode)(YA,{ref_key:"previewFormLayerRef",ref:$,width:nA.width,height:nA.height,onOk:eA,onClosed:uA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(ne,{config:nA.formConfig,"is-preview":!0,ref_key:"previewFormRef",ref:J,actions:e.actions},null,8,["config","actions"])]),_:1},8,["width","height"]),(0,r.createVNode)(YA,{ref_key:"importFormLayerRef",ref:cA,width:800,height:600,"btn-text":"确认",onOk:yA,onClosed:IA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Ym,{"component-list":v,"table-list":g.value,ref_key:"importComponentRef",ref:mA},null,8,["table-list"])]),_:1},512)])}}}),dw=uw,wl=ft(dw,[ml]),Cl=(e,A)=>{const t={ver:"V3",indexPage:{...e},components:[]};return yl(A||[],t.components),t},yl=(e,A)=>{e.forEach(t=>{const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&yl(t.children||[],A),A.push(n)})},fw=e=>{const A=gw(e.components);return{pageConfig:e.indexPage,componentList:A}},gw=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{}};n.config&&Object.keys(n.config).forEach(a=>{o.config[a]=n.config[a]}),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const c={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();c[h]||(c[h]=[]),delete d.slot,c[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=c[d._i]||[];return{config:{label:d.label},children:h}}),delete o.config.groups}else o.children=a}}),A.indexPage||[]},hw=(e,A)=>{let t={},n=[];const o={};if(e.ver==="V3"){const a=e;t=a.indexPage;const c={};a.components.forEach(d=>{const h=A[d.type];if(!h)return;c[d.containerId]=c[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h.dragType||"component",componentName:h.componentName||"",runtimeType:h.runtimeType,groupId:d.groupId,config:d.config,isInput:!1,containerId:d.containerId,level:d.level};o[g.id]=g,c[d.containerId].push(g),g.dragType==="container"&&(g.children=[])}),Object.keys(c).forEach(d=>{o[d]&&(o[d].children=c[d])}),n=c.indexPage||[]}return{pageConfig:t,componentList:n,componentDic:o}},Bw=(0,r.defineComponent)({name:"DIndexDesignItem",__name:"indexDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)(e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"]))}}),vl=Bw,pw={class:"d-index-design j-block"},mw={class:"d-index-design-left"},ww={class:"j-component-list"},Cw={class:"j-component-tool"},yw={class:"j-component-tool-name"},vw={class:"d-index-design-center"},Qw={class:"design-toolbar"},Ew={class:"design-container"},Fw={key:0,class:"j-block design-empty"},Uw={class:"d-index-design-right"},bw={class:"d-index-design-panel-title"},Iw={style:{margin:"0","font-size":"14px"}},Hw={class:"d-index-design-panel"},_w=(0,r.defineComponent)({name:"DIndexDesign",__name:"indexDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,containerAddComponent:Function,componentConfigInit:Function,componentConfigChange:Function,flowComponents:{type:Array,default:()=>[]},flowInit:Function,flowComponentConfigInit:Function,flowComponentConfigChange:Function,flowComponentConfigs:{type:Object,default:()=>({})},actions:{type:Object,default:()=>({})}},setup(e,{expose:A}){const{t}=(0,Te.useAppInject)(),n=e,o=U=>{U.forEach(x=>{x.type==="d-input-flow"&&(x.config=x.config||{},x.config.flowComponents=n.flowComponents,x.config.flowInit=n.flowInit,x.config.flowComponentConfigInit=G=>{n.flowComponentConfigInit&&(G.designComponents=L.value,G.component=y.value,n.flowComponentConfigInit(G))},x.config.flowComponentConfigs=n.flowComponentConfigs,x.config.flowComponentConfigChange=n.flowComponentConfigChange),x.children&&o(x.children)})},a=(0,r.reactive)({name:"页面",id:"indexPage",type:"indexPage",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}});n.componentInit&&(a.config=n.componentInit("indexPage")||{});const c={},d=[];n.components.forEach(({children:U})=>{U.forEach(x=>{c[x.type]=x,x.dragType=x.dragType||"component",d.push({label:x.name,value:x.type})})});const h={};Object.keys(n.componentConfigs).forEach(U=>{const{hasBase:x}=c[U]||{hasBase:!1},G=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],R={type:"j-collapse",config:{defaultValue:[]},children:[]};x!==!1&&(R.children?.push({config:{label:"基础信息"},children:[...G]}),R.config?.defaultValue.push("_collapse0")),R.children?.push(...n.componentConfigs[U]),o(R.children||[]),h[U]=[R]});const g=U=>{y.value&&n.componentConfigChange&&n.componentConfigChange(y.value.type,{configRef:m,configData:y.value.config,...U})},B=(U,x)=>{n.componentConfigInit&&n.componentConfigInit(U,{configRef:m,...x})},w=(0,r.ref)(),m=(0,r.ref)(),{activedComponent:y,clearComponents:v,schemaComponentDic:I,designComponentList:L}=pl(w,m,a,n.componentInit,B,h,c,n.containerAddComponent),k=(0,r.computed)(()=>y.value?`【${y.value.name}】`:""),V=(0,r.ref)([]),F=n.components.length;for(let U=0;U<F;U++)V.value.push(U);(0,r.provide)("dui-design-provide",{designItemName:vl});const M=()=>{v()},tA=()=>{n.componentInit&&(a.config=n.componentInit("indexPage")||{}),v()},W=()=>(console.log("pValidate"),!0),aA=()=>Cl(a.config,a.children||[]),dA=U=>{const x=hw(U,c);a.config=x.pageConfig,a.children?.push(...x.componentList),Object.keys(x.componentDic).forEach(G=>{I[G]=x.componentDic[G]})},rA=(0,r.ref)(),oA=(0,r.ref)();(0,r.ref)(""),(0,r.reactive)({formConfig:{}});let AA=0;const O=U=>{if(oA.value)AA=0,oA.value.init(U);else{if(AA>600){console.warn("组件加载超时");return}AA++,setTimeout(()=>{O(U)},100)}},lA=()=>{},_=()=>{},Z=()=>{const{componentList:U}=fw(Cl(a.config,a.children||[]));rA.value.open("页面预览","full"),(0,r.nextTick)(()=>{O(U)})};return A({reset:tA,validate:W,getSchema:aA,setSchema:dA}),(U,x)=>{const G=(0,r.resolveComponent)("j-icon"),R=(0,r.resolveComponent)("d-drag-tool"),$=(0,r.resolveComponent)("el-collapse-item"),J=(0,r.resolveComponent)("el-collapse"),nA=(0,r.resolveComponent)("j-button"),hA=(0,r.resolveComponent)("el-tooltip"),UA=(0,r.resolveComponent)("el-divider"),eA=(0,r.resolveComponent)("el-empty"),uA=(0,r.resolveComponent)("d-drag-index-list"),Y=(0,r.resolveComponent)("d-drag-container"),cA=(0,r.resolveComponent)("j-form"),mA=(0,r.resolveComponent)("j-page"),yA=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",pw,[(0,r.createElementVNode)("div",mw,[x[1]||(x[1]=(0,r.createElementVNode)("div",{class:"d-index-design-panel-title"},"组件库",-1)),(0,r.createElementVNode)("div",ww,[(0,r.createVNode)(J,{modelValue:V.value,"onUpdate:modelValue":x[0]||(x[0]=IA=>V.value=IA)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(IA,fA)=>((0,r.openBlock)(),(0,r.createBlock)($,{key:fA,title:IA.name,name:fA},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(IA.children,(vA,S)=>((0,r.openBlock)(),(0,r.createBlock)(R,{key:S,config:vA},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",Cw,[(0,r.createVNode)(G,{class:"j-component-tool-icon",icon:vA.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",yw,(0,r.toDisplayString)((0,r.unref)(t)(vA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",vw,[(0,r.createElementVNode)("div",Qw,[x[2]||(x[2]=(0,r.createElementVNode)("div",null,null,-1)),(0,r.createElementVNode)("div",null,[(0,r.createVNode)(hA,{content:(0,r.unref)(t)("清空")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(nA,{danger:"",type:"text",onClick:M,icon:"mdi:delete-outline"})]),_:1},8,["content"]),(0,r.createVNode)(UA,{direction:"vertical"}),(0,r.createVNode)(hA,{content:(0,r.unref)(t)("预览")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(nA,{type:"text",onClick:Z,icon:"mdi:play-circle-outline"})]),_:1},8,["content"])])]),(0,r.createElementVNode)("div",Ew,[(0,r.createVNode)(Y,{ref_key:"dragContainer",ref:w,class:"design-drag-container","is-component-container":!1,"component-data":a},{default:(0,r.withCtx)(()=>[!a.children||a.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",Fw,[(0,r.createVNode)(eA,{description:(0,r.unref)(t)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,r.openBlock)(),(0,r.createBlock)(uA,{key:1,"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"]))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Uw,[(0,r.createElementVNode)("div",bw,[(0,r.createElementVNode)("span",Iw,(0,r.toDisplayString)(`${(0,r.unref)(t)("属性配置")}${k.value}`),1)]),(0,r.createElementVNode)("div",Hw,[(0,r.createVNode)(cA,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:m,onChange:g},null,512)])],512),[[r.vShow,(0,r.unref)(y)&&h[(0,r.unref)(y).type]]]),(0,r.createVNode)(yA,{ref_key:"previewLayerRef",ref:rA,"has-btns":!1,onOk:lA,onClosed:_},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(mA,{ref_key:"previewRef",ref:oA,actions:e.actions},null,8,["actions"])]),_:1},512)])}}}),Sw=_w,Ql=ft(Sw,[vl]),ee=Fu({Vue:()=>r,Vue2:()=>{},del:()=>Nw,install:()=>xw,isVue2:()=>!1,isVue3:()=>!0,set:()=>Dw});Uu(ee,require("vue"));var yE=!1,vE=!0,QE=void 0;function xw(){}function Dw(e,A,t){return Array.isArray(e)?(e.length=Math.max(e.length,A),e.splice(A,1,t),t):(e[A]=t,t)}function Nw(e,A){if(Array.isArray(e)){e.splice(A,1);return}delete e[A]}var Pr=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Lw=(0,ee.defineComponent)({name:"LineRuler",props:{scale:Number,thick:Number,palette:Object,index:Number,start:Number,vertical:Boolean,value:Number,isShowReferLine:Boolean},emits:["onMouseDown","onRelease","onRemove"],setup(e,{emit:A}){const t=(0,ee.ref)(0),n=(0,ee.ref)(!0);(0,ee.onMounted)(()=>{t.value=e.value});const o=B=>{n.value=B>=0},a=(0,ee.computed)(()=>{const B=(t.value-e.start)*e.scale;o(B);const w=B+"px";return e.vertical?{top:w}:{left:w}}),c=(0,ee.computed)(()=>{var B;const w=`1px solid ${(B=e.palette)==null?void 0:B.lineColor}`,m=e.vertical?{borderTop:w}:{borderLeft:w};return{cursor:e.isShowReferLine?e.vertical?"ns-resize":"ew-resize":"none",...m}}),d=(0,ee.computed)(()=>e.vertical?{left:e.thick+"px"}:{top:e.thick+"px"});return{startValue:t,showLine:n,offset:a,borderCursor:c,actionStyle:d,handleDown:B=>{const w=e.vertical?B.clientY:B.clientX,m=t.value;A("onMouseDown");const y=I=>{const L=e.vertical?I.clientY:I.clientX;t.value=Math.round(m+(L-w)/e.scale)},v=()=>{A("onRelease",t.value,e.index),document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",v)},handleRemove:()=>{A("onRemove",e.index)}}}}),Tw={class:"value"};function kw(e,A,t,n,o,a){return(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"line",style:(0,r.normalizeStyle)([e.offset,e.borderCursor]),onMousedown:A[1]||(A[1]=(...c)=>e.handleDown&&e.handleDown(...c))},[(0,r.createElementVNode)("div",{class:"action",style:(0,r.normalizeStyle)(e.actionStyle)},[(0,r.createElementVNode)("span",{class:"del",onClick:A[0]||(A[0]=(...c)=>e.handleRemove&&e.handleRemove(...c))},"×"),(0,r.createElementVNode)("span",Tw,(0,r.toDisplayString)(e.startValue),1)],4)],36)),[[r.vShow,e.showLine]])}var Mw=Pr(Lw,[["render",kw],["__scopeId","data-v-074b3d94"]]),Ow=e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1,El=.83,Kw=(e,A,t,n,o,a)=>{const{scale:c,width:d,height:h,ratio:g,palette:B}=o,{bgColor:w,fontColor:m,shadowColor:y,longfgColor:v,shortfgColor:I}=B;if(e.scale(g,g),e.clearRect(0,0,d,h),e.fillStyle=w,e.fillRect(0,0,d,h),n){const rA=(t-A)*c,oA=n*c;e.fillStyle=y,a?e.fillRect(rA,0,oA,h*3/8):e.fillRect(0,rA,d*3/8,oA)}const L=Ow(c),k=L*c,V=L*10,F=V*c,M=Math.floor(A/L)*L,tA=Math.floor(A/V)*V,W=(M-A)/L*k,aA=(tA-A)/V*F,dA=A+Math.ceil((a?d:h)/c);e.beginPath(),e.fillStyle=m,e.strokeStyle=v;for(let rA=tA,oA=0;rA<dA;rA+=V,oA++){const AA=aA+oA*F+.5;a?e.moveTo(AA,0):e.moveTo(0,AA),e.save(),a?e.translate(AA,h*.4):e.translate(d*.4,AA),a||e.rotate(-Math.PI/2),e.scale(El/g,El/g),e.fillText(rA.toString(),4*g,7*g),e.restore(),a?e.lineTo(AA,h*9/16):e.lineTo(d*9/16,AA)}e.stroke(),e.closePath(),e.beginPath(),e.strokeStyle=I;for(let rA=M,oA=0;rA<dA;rA+=L,oA++){const AA=W+oA*k+.5;a?e.moveTo(AA,0):e.moveTo(0,AA),rA%V!==0&&(a?e.lineTo(AA,h*1/4):e.lineTo(d*1/4,AA))}e.stroke(),e.closePath(),e.setTransform(1,0,0,1,0,0)},Rw=(0,ee.defineComponent)({name:"CanvasRuler",props:{showIndicator:Boolean,valueNum:Number,scale:Number,ratio:Number,palette:Object,vertical:Boolean,start:Number,width:Number,height:Number,selectStart:Number,selectLength:Number},emits:["onAddLine","update:showIndicator","update:valueNum"],setup(e,{emit:A}){const t=(0,ee.reactive)({canvasContext:null});let n=1;const o=(0,ee.ref)(null);(0,ee.onMounted)(()=>{n=e.ratio||window.devicePixelRatio||1,a(),c(n),d(n)});const a=()=>{t.canvasContext=o.value&&o.value.getContext("2d")},c=g=>{if(o.value){o.value.width=e.width*g,o.value.height=e.height*g;const B=t.canvasContext;B&&(B.font=`${12*g}px -apple-system,
29
29
  "Helvetica Neue", ".SFNSText-Regular",
30
30
  "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB",
31
31
  "Microsoft YaHei", "WenQuanYi Zen Hei", sans-serif`,B.lineWidth=1,B.textBaseline="middle")}},d=g=>{const B={scale:e.scale,width:e.width,height:e.height,palette:e.palette,ratio:g};t.canvasContext&&Kw(t.canvasContext,e.start,e.selectStart,e.selectLength,B,!e.vertical)};return(0,ee.watch)(()=>e.start,()=>d(n)),(0,ee.watch)([()=>e.width,()=>e.height],()=>{c(n),d(n)}),{handle:(g,B)=>{const m=((y,v,I)=>Math.round(v+y/I))(e.vertical?g.offsetY:g.offsetX,e.start,e.scale);switch(B){case"click":A("onAddLine",m);break;case"enter":A("update:valueNum",m),A("update:showIndicator",!0);break;default:A("update:valueNum",m);break}},canvas:o}}});function Vw(e,A,t,n,o,a){return(0,r.openBlock)(),(0,r.createElementBlock)("canvas",{ref:"canvas",class:"ruler",onClick:A[0]||(A[0]=c=>e.handle(c,"click")),onMouseenter:A[1]||(A[1]=c=>e.handle(c,"enter")),onMousemove:A[2]||(A[2]=c=>e.handle(c,"move")),onMouseleave:A[3]||(A[3]=c=>e.$emit("update:showIndicator",!1))},null,544)}var Pw=(0,ee.defineComponent)({name:"RulerWrapper",components:{CanvasRuler:Pr(Rw,[["render",Vw]]),RulerLine:Mw},props:{scale:Number,ratio:Number,thick:Number,palette:Object,vertical:{type:Boolean,default:!0},width:{type:Number,default:200},height:{type:Number,default:200},start:{type:Number,default:0},lines:{type:Array,default:()=>[]},selectStart:{type:Number},selectLength:{type:Number},isShowReferLine:{type:Boolean}},setup(e){const A=(0,ee.ref)(!1),t=(0,ee.ref)(0),n=(0,ee.computed)(()=>e.vertical?"v-container":"h-container"),o=(0,ee.computed)(()=>{const g={width:`calc(100% - ${e.thick}px)`,height:`${e.thick+1}px`,left:`${e.thick}px`},B={width:`${e.thick&&e.thick+1}px`,height:`calc(100% - ${e.thick}px)`,top:`${e.thick}px`};return e.vertical?B:g}),a=(0,ee.computed)(()=>{var g;const B=(t.value-e.start)*e.scale;let w="top",m="borderLeft";return w=e.vertical?"top":"left",m=e.vertical?"borderBottom":"borderLeft",{[w]:B+"px",[m]:`1px solid ${(g=e.palette)==null?void 0:g.lineColor}`}}),c=g=>{e.lines.push(g)},d=(g,B)=>{const w=g-e.start,m=(e.vertical?e.height:e.width)/e.scale;w<0||w>m?h(B):e.lines[B]=g},h=g=>{e.lines.splice(g,1)};return{showIndicator:A,valueNum:t,rwClassName:n,rwStyle:o,indicatorStyle:a,handleNewLine:c,handleLineRelease:d,handleLineRemove:h}}}),Gw={class:"lines"},zw={class:"value"};function $w(e,A,t,n,o,a){const c=(0,r.resolveComponent)("CanvasRuler"),d=(0,r.resolveComponent)("RulerLine");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(e.rwClassName),style:(0,r.normalizeStyle)(e.rwStyle)},[(0,r.createVNode)(c,{vertical:e.vertical,scale:e.scale,width:e.width,height:e.height,start:e.start,ratio:e.ratio,"select-start":e.selectStart,"select-length":e.selectLength,palette:e.palette,valueNum:e.valueNum,"onUpdate:valueNum":A[0]||(A[0]=h=>e.valueNum=h),showIndicator:e.showIndicator,"onUpdate:showIndicator":A[1]||(A[1]=h=>e.showIndicator=h),onOnAddLine:e.handleNewLine},null,8,["vertical","scale","width","height","start","ratio","select-start","select-length","palette","valueNum","showIndicator","onOnAddLine"]),(0,r.withDirectives)((0,r.createElementVNode)("div",Gw,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.lines,(h,g)=>((0,r.openBlock)(),(0,r.createBlock)(d,{key:h+g,index:g,value:h>>0,scale:e.scale,start:e.start,thick:e.thick,palette:e.palette,vertical:e.vertical,"is-show-refer-line":e.isShowReferLine,onOnRemove:e.handleLineRemove,onOnRelease:e.handleLineRelease},null,8,["index","value","scale","start","thick","palette","vertical","is-show-refer-line","onOnRemove","onOnRelease"]))),128))],512),[[r.vShow,e.isShowReferLine]]),(0,r.withDirectives)((0,r.createElementVNode)("div",{class:"indicator",style:(0,r.normalizeStyle)(e.indicatorStyle)},[(0,r.createElementVNode)("div",zw,(0,r.toDisplayString)(e.valueNum),1)],4),[[r.vShow,e.showIndicator]])],6)}var Xw=Pr(Pw,[["render",$w],["__scopeId","data-v-5cc064d4"]]),Ww="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAopJREFUOE/FlE9IVEEc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Qt+GQLmGxPaBiGgYiMWWvXBHZUGoZhH3BERPYC+4F+4Keq/urt7b1RLpf/ZEBVHa9Wq0HWyg3QKIoGVPU8cA7wgK/pUtXPQJ8xZk+pVBpuNBqXUoUiEvi+P56fzTpo6+SbwHNg1lo7WzTITGEKXFlZeeB53tVCpa3CK8AFa+1cBgvD8LKIXAQOJkkyICJDeYVBEJS6u7s/qeoLa+1o+l9TqXNuBLhmjDlbqVQ+5ICjInIfOBPH8W9jzGCR5YmJiRNxHM+papgqzqDvgSlr7VTernPuO3An3c9bBt74vv+yrdaKyLDv+/1Sq9UGPc97nY9EVuycU2AQOA7cAm4Dr4D5TvVxHB9rKo2iaEFVp621Ln96FEUngaOqGmSxabVqsh3a2h+x1h5qQjNrae/yE4+iaCwDJkky73neTuBZe129Xk+H+BS4l7ZqLVIZ2BhzuFKpvMsDVXXWGPMxFdAedOfcKeCRqj7MYrUhpz09PfXl5eXrectFWXXODQHpOq2qd/95o/JXr6ura3J1dXU6SZIfwKKIHAD2tVYMPBGRx77vN10UXtO85fTkmZmZHUtLSzUR2QXsBhaAL6r6DXhbrVYXi1yss59GqOgub/bN3Z7v6X/tb9Zmp/q/kN8s+lJb8oEAAAAASUVORK5CYII=",Jw=(0,ee.defineComponent)({name:"SketchRule",components:{RulerWrapper:Xw},props:{eyeIcon:{type:String},closeEyeIcon:{type:String},scale:{type:Number,default:1},ratio:{type:Number},thick:{type:Number,default:16},palette:Object,startX:{type:Number},startY:{type:Number,default:0},width:{type:Number,default:200},height:{type:Number,default:200},shadow:{type:Object,default:()=>({x:0,y:0,width:0,height:0})},lines:{type:Object,default:()=>({h:[],v:[]})},isShowReferLine:{type:Boolean,default:!0}},emits:["onCornerClick","handleLine"],setup(e,{emit:A}){let t=(0,ee.ref)(!0);t.value=e.isShowReferLine;const n=(0,ee.computed)(()=>{function c(d,h){return Object.keys(d).forEach(g=>{g&&d.hasOwnProperty(g)&&(typeof h.key=="object"?d[g]=c(d[g],h[g]):h.hasOwnProperty(g)&&(d[g]=h[g]))}),d}return c({bgColor:"rgba(225,225,225, 0)",longfgColor:"#BABBBC",shortfgColor:"#C8CDD0",fontColor:"#7D8694",shadowColor:"#E8E8E8",lineColor:"#EB5648",borderColor:"#DADADC",cornerActiveColor:"rgb(235, 86, 72, 0.6)",menu:{bgColor:"#fff",dividerColor:"#DBDBDB",listItem:{textColor:"#415058",hoverTextColor:"#298DF8",disabledTextColor:"rgba(65, 80, 88, 0.4)",bgColor:"#fff",hoverBgColor:"#F2F2F2"}}},e.palette||{})}),o=(0,ee.computed)(()=>({backgroundImage:t.value?`url(${e.eyeIcon||Ww})`:`url(${e.closeEyeIcon||Yw})`,width:e.thick+"px",height:e.thick+"px",borderRight:`1px solid ${n.value.borderColor}`,borderBottom:`1px solid ${n.value.borderColor}`})),a=c=>{t.value=!t.value,A("handleCornerClick",t.value)};return(0,ee.watch)([()=>e.isShowReferLine],()=>{t.value=e.isShowReferLine}),{showReferLine:t,paletteCpu:n,cornerStyle:o,onCornerClick:a}}}),Zw={id:"mb-ruler",class:"style-ruler mb-ruler"};function jw(e,A,t,n,o,a){const c=(0,r.resolveComponent)("RulerWrapper");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Zw,[(0,r.createVNode)(c,{vertical:!1,width:e.width,height:e.thick,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startX,lines:e.lines.h,"select-start":e.shadow.x,"select-length":e.shadow.width,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,r.createVNode)(c,{vertical:!0,width:e.thick,height:e.height,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startY,lines:e.lines.v,"select-start":e.shadow.y,"select-length":e.shadow.height,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,r.createElementVNode)("a",{class:"corner",style:(0,r.normalizeStyle)(e.cornerStyle),onClick:A[0]||(A[0]=(...d)=>e.onCornerClick&&e.onCornerClick(...d))},null,4)])}var qw=Pr(Jw,[["render",jw]]),A0=Eu(((e,A)=>{(function(t,n){typeof e=="object"&&typeof A<"u"?A.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.html2canvas=n())})(e,(function(){"use strict";var t=function(s,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(u[f]=l[f])},t(s,i)};function n(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(s,i);function u(){this.constructor=s}s.prototype=i===null?Object.create(i):(u.prototype=i.prototype,new u)}var o=function(){return o=Object.assign||function(i){for(var u,l=1,f=arguments.length;l<f;l++){u=arguments[l];for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(i[p]=u[p])}return i},o.apply(this,arguments)};function a(s,i,u,l){function f(p){return p instanceof u?p:new u(function(C){C(p)})}return new(u||(u=Promise))(function(p,C){function Q(K){try{N(l.next(K))}catch(X){C(X)}}function E(K){try{N(l.throw(K))}catch(X){C(X)}}function N(K){K.done?p(K.value):f(K.value).then(Q,E)}N((l=l.apply(s,i||[])).next())})}function c(s,i){var u={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},l,f,p,C;return C={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function Q(N){return function(K){return E([N,K])}}function E(N){if(l)throw new TypeError("Generator is already executing.");for(;u;)try{if(l=1,f&&(p=N[0]&2?f.return:N[0]?f.throw||((p=f.return)&&p.call(f),0):f.next)&&!(p=p.call(f,N[1])).done)return p;switch(f=0,p&&(N=[N[0]&2,p.value]),N[0]){case 0:case 1:p=N;break;case 4:return u.label++,{value:N[1],done:!1};case 5:u.label++,f=N[1],N=[0];continue;case 7:N=u.ops.pop(),u.trys.pop();continue;default:if(p=u.trys,!(p=p.length>0&&p[p.length-1])&&(N[0]===6||N[0]===2)){u=0;continue}if(N[0]===3&&(!p||N[1]>p[0]&&N[1]<p[3])){u.label=N[1];break}if(N[0]===6&&u.label<p[1]){u.label=p[1],p=N;break}if(p&&u.label<p[2]){u.label=p[2],u.ops.push(N);break}p[2]&&u.ops.pop(),u.trys.pop();continue}N=i.call(s,u)}catch(K){N=[6,K],f=0}finally{l=p=0}if(N[0]&5)throw N[1];return{value:N[0]?N[1]:void 0,done:!0}}}function d(s,i,u){if(u||arguments.length===2)for(var l=0,f=i.length,p;l<f;l++)(p||!(l in i))&&(p||(p=Array.prototype.slice.call(i,0,l)),p[l]=i[l]);return s.concat(p||i)}for(var h=(function(){function s(i,u,l,f){this.left=i,this.top=u,this.width=l,this.height=f}return s.prototype.add=function(i,u,l,f){return new s(this.left+i,this.top+u,this.width+l,this.height+f)},s.fromClientRect=function(i,u){return new s(u.left+i.windowBounds.left,u.top+i.windowBounds.top,u.width,u.height)},s.fromDOMRectList=function(i,u){var l=Array.from(u).find(function(f){return f.width!==0});return l?new s(l.left+i.windowBounds.left,l.top+i.windowBounds.top,l.width,l.height):s.EMPTY},s.EMPTY=new s(0,0,0,0),s})(),g=function(s,i){return h.fromClientRect(s,i.getBoundingClientRect())},B=function(s){var i=s.body,u=s.documentElement;if(!i||!u)throw new Error("Unable to get document size");return new h(0,0,Math.max(Math.max(i.scrollWidth,u.scrollWidth),Math.max(i.offsetWidth,u.offsetWidth),Math.max(i.clientWidth,u.clientWidth)),Math.max(Math.max(i.scrollHeight,u.scrollHeight),Math.max(i.offsetHeight,u.offsetHeight),Math.max(i.clientHeight,u.clientHeight)))},w=function(s){for(var i=[],u=0,l=s.length;u<l;){var f=s.charCodeAt(u++);if(f>=55296&&f<=56319&&u<l){var p=s.charCodeAt(u++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),u--)}else i.push(f)}return i},m=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var u=s.length;if(!u)return"";for(var l=[],f=-1,p="";++f<u;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===u||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=typeof Uint8Array>"u"?[]:new Uint8Array(256),I=0;I<y.length;I++)v[y.charCodeAt(I)]=I;for(var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=typeof Uint8Array>"u"?[]:new Uint8Array(256),V=0;V<L.length;V++)k[L.charCodeAt(V)]=V;for(var F=function(s){var i=s.length*.75,u=s.length,l,f=0,p,C,Q,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var N=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),K=Array.isArray(N)?N:new Uint8Array(N);for(l=0;l<u;l+=4)p=k[s.charCodeAt(l)],C=k[s.charCodeAt(l+1)],Q=k[s.charCodeAt(l+2)],E=k[s.charCodeAt(l+3)],K[f++]=p<<2|C>>4,K[f++]=(C&15)<<4|Q>>2,K[f++]=(Q&3)<<6|E&63;return N},M=function(s){for(var i=s.length,u=[],l=0;l<i;l+=2)u.push(s[l+1]<<8|s[l]);return u},tA=function(s){for(var i=s.length,u=[],l=0;l<i;l+=4)u.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return u},W=5,aA=11,dA=2,rA=aA-W,oA=65536>>W,AA=(1<<W)-1,O=oA+(1024>>W)+32,lA=65536>>aA,_=(1<<rA)-1,Z=function(s,i,u){return s.slice?s.slice(i,u):new Uint16Array(Array.prototype.slice.call(s,i,u))},U=function(s,i,u){return s.slice?s.slice(i,u):new Uint32Array(Array.prototype.slice.call(s,i,u))},x=function(s,i){var u=F(s),l=Array.isArray(u)?tA(u):new Uint32Array(u),f=Array.isArray(u)?M(u):new Uint16Array(u),p=24,C=Z(f,p/2,l[4]/2),Q=l[5]===2?Z(f,(p+l[4])/2):U(l,Math.ceil((p+l[4])/4));return new G(l[0],l[1],l[2],l[3],C,Q)},G=(function(){function s(i,u,l,f,p,C){this.initialValue=i,this.errorValue=u,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var u;if(i>=0){if(i<55296||i>56319&&i<=65535)return u=this.index[i>>W],u=(u<<dA)+(i&AA),this.data[u];if(i<=65535)return u=this.index[oA+(i-55296>>W)],u=(u<<dA)+(i&AA),this.data[u];if(i<this.highStart)return u=O-lA+(i>>aA),u=this.index[u],u+=i>>W&_,u=this.index[u],u=(u<<dA)+(i&AA),this.data[u];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=typeof Uint8Array>"u"?[]:new Uint8Array(256),J=0;J<R.length;J++)$[R.charCodeAt(J)]=J;var nA="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGED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HLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIY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AAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8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sBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlI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bSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAK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QAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeA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AeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARAB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AB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB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AUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUA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sAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",hA=50,UA=1,eA=2,uA=3,Y=4,cA=5,mA=7,yA=8,IA=9,fA=10,vA=11,S=12,H=13,T=14,D=15,b=16,z=17,P=18,gA=19,iA=20,SA=21,xA=22,KA=23,ne=24,YA=25,PA=26,Re=27,ve=28,Gr=29,sA=30,pA=31,NA=32,MA=33,it=34,Mn=35,Tt=36,kt=37,On=38,tn=39,GA=40,Ve=41,st=42,H0=43,_0=[9001,65288],Hl="!",VA="×",zr="÷",yi=x(nA),at=[sA,Tt],vi=[UA,eA,uA,cA],_l=[fA,yA],Sl=[Re,PA],S0=vi.concat(_l),xl=[On,tn,GA,it,Mn],x0=[D,H],D0=function(s,i){i===void 0&&(i="strict");var u=[],l=[],f=[];return s.forEach(function(p,C){var Q=yi.get(p);if(Q>hA?(f.push(!0),Q-=hA):f.push(!1),["normal","auto","loose"].indexOf(i)!==-1&&[8208,8211,12316,12448].indexOf(p)!==-1)return l.push(C),u.push(b);if(Q===Y||Q===vA){if(C===0)return l.push(C),u.push(sA);var E=u[C-1];return S0.indexOf(E)===-1?(l.push(l[C-1]),u.push(E)):(l.push(C),u.push(sA))}if(l.push(C),Q===pA)return u.push(i==="strict"?SA:kt);if(Q===st||Q===Gr)return u.push(sA);if(Q===H0)return p>=131072&&p<=196605||p>=196608&&p<=262141?u.push(kt):u.push(sA);u.push(Q)}),[l,u,f]},Qi=function(s,i,u,l){var f=l[u];if(Array.isArray(s)?s.indexOf(f)!==-1:s===f)for(var p=u;p<=l.length;){p++;var C=l[p];if(C===i)return!0;if(C!==fA)break}if(f===fA)for(var p=u;p>0;){p--;var Q=l[p];if(Array.isArray(s)?s.indexOf(Q)!==-1:s===Q)for(var E=u;E<=l.length;){E++;var C=l[E];if(C===i)return!0;if(C!==fA)break}if(Q!==fA)break}return!1},Dl=function(s,i){for(var u=s;u>=0;){var l=i[u];if(l===fA)u--;else return l}return 0},N0=function(s,i,u,l,f){if(u[l]===0)return VA;var p=l-1;if(Array.isArray(f)&&f[p]===!0)return VA;var C=p-1,Q=p+1,E=i[p],N=C>=0?i[C]:0,K=i[Q];if(E===eA&&K===uA)return VA;if(vi.indexOf(E)!==-1)return Hl;if(vi.indexOf(K)!==-1||_l.indexOf(K)!==-1)return VA;if(Dl(p,i)===yA)return zr;if(yi.get(s[p])===vA||(E===NA||E===MA)&&yi.get(s[Q])===vA||E===mA||K===mA||E===IA||[fA,H,D].indexOf(E)===-1&&K===IA||[z,P,gA,ne,ve].indexOf(K)!==-1||Dl(p,i)===xA||Qi(KA,xA,p,i)||Qi([z,P],SA,p,i)||Qi(S,S,p,i))return VA;if(E===fA)return zr;if(E===KA||K===KA)return VA;if(K===b||E===b)return zr;if([H,D,SA].indexOf(K)!==-1||E===T||N===Tt&&x0.indexOf(E)!==-1||E===ve&&K===Tt||K===iA||at.indexOf(K)!==-1&&E===YA||at.indexOf(E)!==-1&&K===YA||E===Re&&[kt,NA,MA].indexOf(K)!==-1||[kt,NA,MA].indexOf(E)!==-1&&K===PA||at.indexOf(E)!==-1&&Sl.indexOf(K)!==-1||Sl.indexOf(E)!==-1&&at.indexOf(K)!==-1||[Re,PA].indexOf(E)!==-1&&(K===YA||[xA,D].indexOf(K)!==-1&&i[Q+1]===YA)||[xA,D].indexOf(E)!==-1&&K===YA||E===YA&&[YA,ve,ne].indexOf(K)!==-1)return VA;if([YA,ve,ne,z,P].indexOf(K)!==-1)for(var X=p;X>=0;){var j=i[X];if(j===YA)return VA;if([ve,ne].indexOf(j)!==-1)X--;else break}if([Re,PA].indexOf(K)!==-1)for(var X=[z,P].indexOf(E)!==-1?C:p;X>=0;){var j=i[X];if(j===YA)return VA;if([ve,ne].indexOf(j)!==-1)X--;else break}if(On===E&&[On,tn,it,Mn].indexOf(K)!==-1||[tn,it].indexOf(E)!==-1&&[tn,GA].indexOf(K)!==-1||[GA,Mn].indexOf(E)!==-1&&K===GA||xl.indexOf(E)!==-1&&[iA,PA].indexOf(K)!==-1||xl.indexOf(K)!==-1&&E===Re||at.indexOf(E)!==-1&&at.indexOf(K)!==-1||E===ne&&at.indexOf(K)!==-1||at.concat(YA).indexOf(E)!==-1&&K===xA&&_0.indexOf(s[Q])===-1||at.concat(YA).indexOf(K)!==-1&&E===P)return VA;if(E===Ve&&K===Ve){for(var CA=u[p],BA=1;CA>0&&(CA--,i[CA]===Ve);)BA++;if(BA%2!==0)return VA}return E===NA&&K===MA?VA:zr},L0=function(s,i){i||(i={lineBreak:"normal",wordBreak:"normal"});var u=D0(s,i.lineBreak),l=u[0],f=u[1],p=u[2];(i.wordBreak==="break-all"||i.wordBreak==="break-word")&&(f=f.map(function(Q){return[YA,sA,st].indexOf(Q)!==-1?kt:Q}));var C=i.wordBreak==="keep-all"?p.map(function(Q,E){return Q&&s[E]>=19968&&s[E]<=40959}):void 0;return[l,f,C]},T0=(function(){function s(i,u,l,f){this.codePoints=i,this.required=u===Hl,this.start=l,this.end=f}return s.prototype.slice=function(){return m.apply(void 0,this.codePoints.slice(this.start,this.end))},s})(),k0=function(s,i){var u=w(s),l=L0(u,i),f=l[0],p=l[1],C=l[2],Q=u.length,E=0,N=0;return{next:function(){if(N>=Q)return{done:!0,value:null};for(var K=VA;N<Q&&(K=N0(u,p,f,++N,C))===VA;);if(K!==VA||N===Q){var X=new T0(u,K,E,N);return E=N,{value:X,done:!1}}return{done:!0,value:null}}}},M0=1,O0=2,Kn=4,Nl=8,$r=10,Ll=47,Rn=92,K0=9,R0=32,Xr=34,Vn=61,V0=35,P0=36,G0=37,Wr=39,Yr=40,Pn=41,z0=95,Qe=45,$0=33,X0=60,W0=62,Y0=64,J0=91,Z0=93,j0=61,q0=123,Jr=63,AC=125,Tl=124,eC=126,tC=128,kl=65533,Ei=42,Mt=43,nC=44,rC=58,oC=59,Gn=46,iC=0,sC=8,aC=11,lC=14,cC=31,uC=127,Ye=-1,Ml=48,Ol=97,Kl=101,dC=102,fC=117,gC=122,Rl=65,Vl=69,Pl=70,hC=85,BC=90,me=function(s){return s>=Ml&&s<=57},pC=function(s){return s>=55296&&s<=57343},nn=function(s){return me(s)||s>=Rl&&s<=Pl||s>=Ol&&s<=dC},mC=function(s){return s>=Ol&&s<=gC},wC=function(s){return s>=Rl&&s<=BC},CC=function(s){return mC(s)||wC(s)},yC=function(s){return s>=tC},Zr=function(s){return s===$r||s===K0||s===R0},jr=function(s){return CC(s)||yC(s)||s===z0},Gl=function(s){return jr(s)||me(s)||s===Qe},vC=function(s){return s>=iC&&s<=sC||s===aC||s>=lC&&s<=cC||s===uC},wt=function(s,i){return s!==Rn?!1:i!==$r},qr=function(s,i,u){return s===Qe?jr(i)||wt(i,u):jr(s)?!0:!!(s===Rn&&wt(s,i))},Fi=function(s,i,u){return s===Mt||s===Qe?me(i)?!0:i===Gn&&me(u):me(s===Gn?i:s)},QC=function(s){var i=0,u=1;(s[i]===Mt||s[i]===Qe)&&(s[i]===Qe&&(u=-1),i++);for(var l=[];me(s[i]);)l.push(s[i++]);var f=l.length?parseInt(m.apply(void 0,l),10):0;s[i]===Gn&&i++;for(var p=[];me(s[i]);)p.push(s[i++]);var C=p.length,Q=C?parseInt(m.apply(void 0,p),10):0;(s[i]===Vl||s[i]===Kl)&&i++;var E=1;(s[i]===Mt||s[i]===Qe)&&(s[i]===Qe&&(E=-1),i++);for(var N=[];me(s[i]);)N.push(s[i++]);var K=N.length?parseInt(m.apply(void 0,N),10):0;return u*(f+Q*Math.pow(10,-C))*Math.pow(10,E*K)},EC={type:2},FC={type:3},UC={type:4},bC={type:13},IC={type:8},HC={type:21},_C={type:9},SC={type:10},xC={type:11},DC={type:12},NC={type:14},Ao={type:23},LC={type:1},TC={type:25},kC={type:24},MC={type:26},OC={type:27},KC={type:28},RC={type:29},VC={type:31},Ui={type:32},zl=(function(){function s(){this._value=[]}return s.prototype.write=function(i){this._value=this._value.concat(w(i))},s.prototype.read=function(){for(var i=[],u=this.consumeToken();u!==Ui;)i.push(u),u=this.consumeToken();return i},s.prototype.consumeToken=function(){var i=this.consumeCodePoint();switch(i){case Xr:return this.consumeStringToken(Xr);case V0:var u=this.peekCodePoint(0),l=this.peekCodePoint(1),f=this.peekCodePoint(2);if(Gl(u)||wt(l,f)){var p=qr(u,l,f)?O0:M0,C=this.consumeName();return{type:5,value:C,flags:p}}break;case P0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),bC;break;case Wr:return this.consumeStringToken(Wr);case Yr:return EC;case Pn:return FC;case Ei:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),NC;break;case Mt:if(Fi(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case nC:return UC;case Qe:var Q=i,E=this.peekCodePoint(0),N=this.peekCodePoint(1);if(Fi(Q,E,N))return this.reconsumeCodePoint(i),this.consumeNumericToken();if(qr(Q,E,N))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();if(E===Qe&&N===W0)return this.consumeCodePoint(),this.consumeCodePoint(),kC;break;case Gn:if(Fi(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case Ll:if(this.peekCodePoint(0)===Ei)for(this.consumeCodePoint();;){var K=this.consumeCodePoint();if(K===Ei&&(K=this.consumeCodePoint(),K===Ll))return this.consumeToken();if(K===Ye)return this.consumeToken()}break;case rC:return MC;case oC:return OC;case X0:if(this.peekCodePoint(0)===$0&&this.peekCodePoint(1)===Qe&&this.peekCodePoint(2)===Qe)return this.consumeCodePoint(),this.consumeCodePoint(),TC;break;case Y0:if(qr(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2))){var C=this.consumeName();return{type:7,value:C}}break;case J0:return KC;case Rn:if(wt(i,this.peekCodePoint(0)))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();break;case Z0:return RC;case j0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),IC;break;case q0:return xC;case AC:return DC;case fC:case hC:var X=this.peekCodePoint(0),j=this.peekCodePoint(1);return X===Mt&&(nn(j)||j===Jr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(i),this.consumeIdentLikeToken();case Tl:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),_C;if(this.peekCodePoint(0)===Tl)return this.consumeCodePoint(),HC;break;case eC:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),SC;break;case Ye:return Ui}return Zr(i)?(this.consumeWhiteSpace(),VC):me(i)?(this.reconsumeCodePoint(i),this.consumeNumericToken()):jr(i)?(this.reconsumeCodePoint(i),this.consumeIdentLikeToken()):{type:6,value:m(i)}},s.prototype.consumeCodePoint=function(){var i=this._value.shift();return typeof i>"u"?-1:i},s.prototype.reconsumeCodePoint=function(i){this._value.unshift(i)},s.prototype.peekCodePoint=function(i){return i>=this._value.length?-1:this._value[i]},s.prototype.consumeUnicodeRangeToken=function(){for(var i=[],u=this.consumeCodePoint();nn(u)&&i.length<6;)i.push(u),u=this.consumeCodePoint();for(var l=!1;u===Jr&&i.length<6;)i.push(u),u=this.consumeCodePoint(),l=!0;if(l){var f=parseInt(m.apply(void 0,i.map(function(E){return E===Jr?Ml:E})),16),p=parseInt(m.apply(void 0,i.map(function(E){return E===Jr?Pl:E})),16);return{type:30,start:f,end:p}}var C=parseInt(m.apply(void 0,i),16);if(this.peekCodePoint(0)===Qe&&nn(this.peekCodePoint(1))){this.consumeCodePoint(),u=this.consumeCodePoint();for(var Q=[];nn(u)&&Q.length<6;)Q.push(u),u=this.consumeCodePoint();var p=parseInt(m.apply(void 0,Q),16);return{type:30,start:C,end:p}}else return{type:30,start:C,end:C}},s.prototype.consumeIdentLikeToken=function(){var i=this.consumeName();return i.toLowerCase()==="url"&&this.peekCodePoint(0)===Yr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Yr?(this.consumeCodePoint(),{type:19,value:i}):{type:20,value:i}},s.prototype.consumeUrlToken=function(){var i=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ye)return{type:22,value:""};var u=this.peekCodePoint(0);if(u===Wr||u===Xr){var l=this.consumeStringToken(this.consumeCodePoint());return l.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ye||this.peekCodePoint(0)===Pn)?(this.consumeCodePoint(),{type:22,value:l.value}):(this.consumeBadUrlRemnants(),Ao)}for(;;){var f=this.consumeCodePoint();if(f===Ye||f===Pn)return{type:22,value:m.apply(void 0,i)};if(Zr(f))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ye||this.peekCodePoint(0)===Pn?(this.consumeCodePoint(),{type:22,value:m.apply(void 0,i)}):(this.consumeBadUrlRemnants(),Ao);if(f===Xr||f===Wr||f===Yr||vC(f))return this.consumeBadUrlRemnants(),Ao;if(f===Rn)if(wt(f,this.peekCodePoint(0)))i.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Ao;else i.push(f)}},s.prototype.consumeWhiteSpace=function(){for(;Zr(this.peekCodePoint(0));)this.consumeCodePoint()},s.prototype.consumeBadUrlRemnants=function(){for(;;){var i=this.consumeCodePoint();if(i===Pn||i===Ye)return;wt(i,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},s.prototype.consumeStringSlice=function(i){for(var u=5e4,l="";i>0;){var f=Math.min(u,i);l+=m.apply(void 0,this._value.splice(0,f)),i-=f}return this._value.shift(),l},s.prototype.consumeStringToken=function(i){var u="",l=0;do{var f=this._value[l];if(f===Ye||f===void 0||f===i)return u+=this.consumeStringSlice(l),{type:0,value:u};if(f===$r)return this._value.splice(0,l),LC;if(f===Rn){var p=this._value[l+1];p!==Ye&&p!==void 0&&(p===$r?(u+=this.consumeStringSlice(l),l=-1,this._value.shift()):wt(f,p)&&(u+=this.consumeStringSlice(l),u+=m(this.consumeEscapedCodePoint()),l=-1))}l++}while(!0)},s.prototype.consumeNumber=function(){var i=[],u=Kn,l=this.peekCodePoint(0);for((l===Mt||l===Qe)&&i.push(this.consumeCodePoint());me(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0);var f=this.peekCodePoint(1);if(l===Gn&&me(f))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),u=Nl;me(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0),f=this.peekCodePoint(1);var p=this.peekCodePoint(2);if((l===Vl||l===Kl)&&((f===Mt||f===Qe)&&me(p)||me(f)))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),u=Nl;me(this.peekCodePoint(0));)i.push(this.consumeCodePoint());return[QC(i),u]},s.prototype.consumeNumericToken=function(){var i=this.consumeNumber(),u=i[0],l=i[1],f=this.peekCodePoint(0);return qr(f,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:u,flags:l,unit:this.consumeName()}:f===G0?(this.consumeCodePoint(),{type:16,number:u,flags:l}):{type:17,number:u,flags:l}},s.prototype.consumeEscapedCodePoint=function(){var i=this.consumeCodePoint();if(nn(i)){for(var u=m(i);nn(this.peekCodePoint(0))&&u.length<6;)u+=m(this.consumeCodePoint());Zr(this.peekCodePoint(0))&&this.consumeCodePoint();var l=parseInt(u,16);return l===0||pC(l)||l>1114111?kl:l}return i===Ye?kl:i},s.prototype.consumeName=function(){for(var i="";;){var u=this.consumeCodePoint();if(Gl(u))i+=m(u);else if(wt(u,this.peekCodePoint(0)))i+=m(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(u),i}},s})(),$l=(function(){function s(i){this._tokens=i}return s.create=function(i){var u=new zl;return u.write(i),new s(u.read())},s.parseValue=function(i){return s.create(i).parseComponentValue()},s.parseValues=function(i){return s.create(i).parseComponentValues()},s.prototype.parseComponentValue=function(){for(var i=this.consumeToken();i.type===31;)i=this.consumeToken();if(i.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(i);var u=this.consumeComponentValue();do i=this.consumeToken();while(i.type===31);if(i.type===32)return u;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},s.prototype.parseComponentValues=function(){for(var i=[];;){var u=this.consumeComponentValue();if(u.type===32)return i;i.push(u),i.push()}},s.prototype.consumeComponentValue=function(){var i=this.consumeToken();switch(i.type){case 11:case 28:case 2:return this.consumeSimpleBlock(i.type);case 19:return this.consumeFunction(i)}return i},s.prototype.consumeSimpleBlock=function(i){for(var u={type:i,values:[]},l=this.consumeToken();;){if(l.type===32||GC(l,i))return u;this.reconsumeToken(l),u.values.push(this.consumeComponentValue()),l=this.consumeToken()}},s.prototype.consumeFunction=function(i){for(var u={name:i.value,values:[],type:18};;){var l=this.consumeToken();if(l.type===32||l.type===3)return u;this.reconsumeToken(l),u.values.push(this.consumeComponentValue())}},s.prototype.consumeToken=function(){var i=this._tokens.shift();return typeof i>"u"?Ui:i},s.prototype.reconsumeToken=function(i){this._tokens.unshift(i)},s})(),zn=function(s){return s.type===15},rn=function(s){return s.type===17},jA=function(s){return s.type===20},PC=function(s){return s.type===0},bi=function(s,i){return jA(s)&&s.value===i},Xl=function(s){return s.type!==31},on=function(s){return s.type!==31&&s.type!==4},Je=function(s){var i=[],u=[];return s.forEach(function(l){if(l.type===4){if(u.length===0)throw new Error("Error parsing function args, zero tokens for arg");i.push(u),u=[];return}l.type!==31&&u.push(l)}),u.length&&i.push(u),i},GC=function(s,i){return i===11&&s.type===12||i===28&&s.type===29?!0:i===2&&s.type===3},Ct=function(s){return s.type===17||s.type===15},ce=function(s){return s.type===16||Ct(s)},Wl=function(s){return s.length>1?[s[0],s[1]]:[s[0]]},he={type:17,number:0,flags:Kn},Ii={type:16,number:50,flags:Kn},yt={type:16,number:100,flags:Kn},$n=function(s,i,u){var l=s[0],f=s[1];return[Ae(l,i),Ae(typeof f<"u"?f:l,u)]},Ae=function(s,i){if(s.type===16)return s.number/100*i;if(zn(s))switch(s.unit){case"rem":case"em":return 16*s.number;default:return s.number}return s.number},Yl="deg",Jl="grad",Zl="rad",jl="turn",eo={name:"angle",parse:function(s,i){if(i.type===15)switch(i.unit){case Yl:return Math.PI*i.number/180;case Jl:return Math.PI/200*i.number;case Zl:return i.number;case jl:return Math.PI*2*i.number}throw new Error("Unsupported angle type")}},ql=function(s){return s.type===15&&(s.unit===Yl||s.unit===Jl||s.unit===Zl||s.unit===jl)},Ac=function(s){switch(s.filter(jA).map(function(i){return i.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[he,he];case"to top":case"bottom":return Se(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[he,yt];case"to right":case"left":return Se(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[yt,yt];case"to bottom":case"top":return Se(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[yt,he];case"to left":case"right":return Se(270)}return 0},Se=function(s){return Math.PI*s/180},vt={name:"color",parse:function(s,i){if(i.type===18){var u=zC[i.name];if(typeof u>"u")throw new Error('Attempting to parse an unsupported color function "'+i.name+'"');return u(s,i.values)}if(i.type===5){if(i.value.length===3){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3);return Et(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),1)}if(i.value.length===4){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3),C=i.value.substring(3,4);return Et(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),parseInt(C+C,16)/255)}if(i.value.length===6){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6);return Et(parseInt(l,16),parseInt(f,16),parseInt(p,16),1)}if(i.value.length===8){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6),C=i.value.substring(6,8);return Et(parseInt(l,16),parseInt(f,16),parseInt(p,16),parseInt(C,16)/255)}}if(i.type===20){var Q=lt[i.value.toUpperCase()];if(typeof Q<"u")return Q}return lt.TRANSPARENT}},Qt=function(s){return(255&s)===0},ge=function(s){var i=255&s,u=255&s>>8,l=255&s>>16,f=255&s>>24;return i<255?"rgba("+f+","+l+","+u+","+i/255+")":"rgb("+f+","+l+","+u+")"},Et=function(s,i,u,l){return(s<<24|i<<16|u<<8|Math.round(l*255)<<0)>>>0},ec=function(s,i){if(s.type===17)return s.number;if(s.type===16){var u=i===3?1:255;return i===3?s.number/100*u:Math.round(s.number/100*u)}return 0},tc=function(s,i){var u=i.filter(on);if(u.length===3){var l=u.map(ec),f=l[0],p=l[1],C=l[2];return Et(f,p,C,1)}if(u.length===4){var Q=u.map(ec),f=Q[0],p=Q[1],C=Q[2],E=Q[3];return Et(f,p,C,E)}return 0};function Hi(s,i,u){return u<0&&(u+=1),u>=1&&(u-=1),u<1/6?(i-s)*u*6+s:u<1/2?i:u<2/3?(i-s)*6*(2/3-u)+s:s}var nc=function(s,i){var u=i.filter(on),l=u[0],f=u[1],p=u[2],C=u[3],Q=(l.type===17?Se(l.number):eo.parse(s,l))/(Math.PI*2),E=ce(f)?f.number/100:0,N=ce(p)?p.number/100:0,K=typeof C<"u"&&ce(C)?Ae(C,1):1;if(E===0)return Et(N*255,N*255,N*255,1);var X=N<=.5?N*(E+1):N+E-N*E,j=N*2-X,CA=Hi(j,X,Q+1/3),BA=Hi(j,X,Q),wA=Hi(j,X,Q-1/3);return Et(CA*255,BA*255,wA*255,K)},zC={hsl:nc,hsla:nc,rgb:tc,rgba:tc},Xn=function(s,i){return vt.parse(s,$l.create(i).parseComponentValue())},lt={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},$C={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(u){if(jA(u))switch(u.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},XC={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},to=function(s,i){var u=vt.parse(s,i[0]),l=i[1];return l&&ce(l)?{color:u,stop:l}:{color:u,stop:null}},rc=function(s,i){var u=s[0],l=s[s.length-1];u.stop===null&&(u.stop=he),l.stop===null&&(l.stop=yt);for(var f=[],p=0,C=0;C<s.length;C++){var Q=s[C].stop;if(Q!==null){var E=Ae(Q,i);E>p?f.push(E):f.push(p),p=E}else f.push(null)}for(var N=null,C=0;C<f.length;C++){var K=f[C];if(K===null)N===null&&(N=C);else if(N!==null){for(var X=C-N,j=(K-f[N-1])/(X+1),CA=1;CA<=X;CA++)f[N+CA-1]=j*CA;N=null}}return s.map(function(BA,wA){return{color:BA.color,stop:Math.max(Math.min(1,f[wA]/i),0)}})},WC=function(s,i,u){var l=i/2,f=u/2,p=Ae(s[0],i)-l,C=f-Ae(s[1],u);return(Math.atan2(C,p)+Math.PI*2)%(Math.PI*2)},YC=function(s,i,u){var l=typeof s=="number"?s:WC(s,i,u),f=Math.abs(i*Math.sin(l))+Math.abs(u*Math.cos(l)),p=i/2,C=u/2,Q=f/2,E=Math.sin(l-Math.PI/2)*Q,N=Math.cos(l-Math.PI/2)*Q;return[f,p-N,p+N,C-E,C+E]},Pe=function(s,i){return Math.sqrt(s*s+i*i)},oc=function(s,i,u,l,f){return[[0,0],[0,i],[s,0],[s,i]].reduce(function(p,C){var Q=C[0],E=C[1],N=Pe(u-Q,l-E);return(f?N<p.optimumDistance:N>p.optimumDistance)?{optimumCorner:C,optimumDistance:N}:p},{optimumDistance:f?1/0:-1/0,optimumCorner:null}).optimumCorner},JC=function(s,i,u,l,f){var p=0,C=0;switch(s.size){case 0:s.shape===0?p=C=Math.min(Math.abs(i),Math.abs(i-l),Math.abs(u),Math.abs(u-f)):s.shape===1&&(p=Math.min(Math.abs(i),Math.abs(i-l)),C=Math.min(Math.abs(u),Math.abs(u-f)));break;case 2:if(s.shape===0)p=C=Math.min(Pe(i,u),Pe(i,u-f),Pe(i-l,u),Pe(i-l,u-f));else if(s.shape===1){var Q=Math.min(Math.abs(u),Math.abs(u-f))/Math.min(Math.abs(i),Math.abs(i-l)),E=oc(l,f,i,u,!0),N=E[0],K=E[1];p=Pe(N-i,(K-u)/Q),C=Q*p}break;case 1:s.shape===0?p=C=Math.max(Math.abs(i),Math.abs(i-l),Math.abs(u),Math.abs(u-f)):s.shape===1&&(p=Math.max(Math.abs(i),Math.abs(i-l)),C=Math.max(Math.abs(u),Math.abs(u-f)));break;case 3:if(s.shape===0)p=C=Math.max(Pe(i,u),Pe(i,u-f),Pe(i-l,u),Pe(i-l,u-f));else if(s.shape===1){var Q=Math.max(Math.abs(u),Math.abs(u-f))/Math.max(Math.abs(i),Math.abs(i-l)),X=oc(l,f,i,u,!1),N=X[0],K=X[1];p=Pe(N-i,(K-u)/Q),C=Q*p}break}return Array.isArray(s.size)&&(p=Ae(s.size[0],l),C=s.size.length===2?Ae(s.size[1],f):p),[p,C]},ZC=function(s,i){var u=Se(180),l=[];return Je(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&C.value==="to"){u=Ac(f);return}else if(ql(C)){u=eo.parse(s,C);return}}var Q=to(s,f);l.push(Q)}),{angle:u,stops:l,type:1}},no=function(s,i){var u=Se(180),l=[];return Je(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&["top","left","right","bottom"].indexOf(C.value)!==-1){u=Ac(f);return}else if(ql(C)){u=(eo.parse(s,C)+Se(270))%Se(360);return}}var Q=to(s,f);l.push(Q)}),{angle:u,stops:l,type:1}},jC=function(s,i){var u=Se(180),l=[],f=1,p=0,C=3,Q=[];return Je(i).forEach(function(E,N){var K=E[0];if(N===0){if(jA(K)&&K.value==="linear"){f=1;return}else if(jA(K)&&K.value==="radial"){f=2;return}}if(K.type===18){if(K.name==="from"){var X=vt.parse(s,K.values[0]);l.push({stop:he,color:X})}else if(K.name==="to"){var X=vt.parse(s,K.values[0]);l.push({stop:yt,color:X})}else if(K.name==="color-stop"){var j=K.values.filter(on);if(j.length===2){var X=vt.parse(s,j[1]),CA=j[0];rn(CA)&&l.push({stop:{type:16,number:CA.number*100,flags:CA.flags},color:X})}}}}),f===1?{angle:(u+Se(180))%Se(360),stops:l,type:f}:{size:C,shape:p,stops:l,position:Q,type:f}},ic="closest-side",sc="farthest-side",ac="closest-corner",lc="farthest-corner",cc="circle",uc="ellipse",dc="cover",fc="contain",qC=function(s,i){var u=0,l=3,f=[],p=[];return Je(i).forEach(function(C,Q){var E=!0;if(Q===0){var N=!1;E=C.reduce(function(X,j){if(N)if(jA(j))switch(j.value){case"center":return p.push(Ii),X;case"top":case"left":return p.push(he),X;case"right":case"bottom":return p.push(yt),X}else(ce(j)||Ct(j))&&p.push(j);else if(jA(j))switch(j.value){case cc:return u=0,!1;case uc:return u=1,!1;case"at":return N=!0,!1;case ic:return l=0,!1;case dc:case sc:return l=1,!1;case fc:case ac:return l=2,!1;case lc:return l=3,!1}else if(Ct(j)||ce(j))return Array.isArray(l)||(l=[]),l.push(j),!1;return X},E)}if(E){var K=to(s,C);f.push(K)}}),{size:l,shape:u,stops:f,position:p,type:2}},ro=function(s,i){var u=0,l=3,f=[],p=[];return Je(i).forEach(function(C,Q){var E=!0;if(Q===0?E=C.reduce(function(K,X){if(jA(X))switch(X.value){case"center":return p.push(Ii),!1;case"top":case"left":return p.push(he),!1;case"right":case"bottom":return p.push(yt),!1}else if(ce(X)||Ct(X))return p.push(X),!1;return K},E):Q===1&&(E=C.reduce(function(K,X){if(jA(X))switch(X.value){case cc:return u=0,!1;case uc:return u=1,!1;case fc:case ic:return l=0,!1;case sc:return l=1,!1;case ac:return l=2,!1;case dc:case lc:return l=3,!1}else if(Ct(X)||ce(X))return Array.isArray(l)||(l=[]),l.push(X),!1;return K},E)),E){var N=to(s,C);f.push(N)}}),{size:l,shape:u,stops:f,position:p,type:2}},Ay=function(s){return s.type===1},ey=function(s){return s.type===2},_i={name:"image",parse:function(s,i){if(i.type===22){var u={url:i.value,type:0};return s.cache.addImage(i.value),u}if(i.type===18){var l=gc[i.name];if(typeof l>"u")throw new Error('Attempting to parse an unsupported image function "'+i.name+'"');return l(s,i.values)}throw new Error("Unsupported image type "+i.type)}};function ty(s){return!(s.type===20&&s.value==="none")&&(s.type!==18||!!gc[s.name])}var gc={"linear-gradient":ZC,"-moz-linear-gradient":no,"-ms-linear-gradient":no,"-o-linear-gradient":no,"-webkit-linear-gradient":no,"radial-gradient":qC,"-moz-radial-gradient":ro,"-ms-radial-gradient":ro,"-o-radial-gradient":ro,"-webkit-radial-gradient":ro,"-webkit-gradient":jC},ny={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var u=i[0];return u.type===20&&u.value==="none"?[]:i.filter(function(l){return on(l)&&ty(l)}).map(function(l){return _i.parse(s,l)})}},ry={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(u){if(jA(u))switch(u.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},oy={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(s,i){return Je(i).map(function(u){return u.filter(ce)}).map(Wl)}},iy={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(s,i){return Je(i).map(function(u){return u.filter(jA).map(function(l){return l.value}).join(" ")}).map(sy)}},sy=function(s){switch(s){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},sn;(function(s){s.AUTO="auto",s.CONTAIN="contain",s.COVER="cover"})(sn||(sn={}));var ay={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(s,i){return Je(i).map(function(u){return u.filter(ly)})}},ly=function(s){return jA(s)||ce(s)},oo=function(s){return{name:"border-"+s+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},cy=oo("top"),uy=oo("right"),dy=oo("bottom"),fy=oo("left"),io=function(s){return{name:"border-radius-"+s,initialValue:"0 0",prefix:!1,type:1,parse:function(i,u){return Wl(u.filter(ce))}}},gy=io("top-left"),hy=io("top-right"),By=io("bottom-right"),py=io("bottom-left"),so=function(s){return{name:"border-"+s+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(i,u){switch(u){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},my=so("top"),wy=so("right"),Cy=so("bottom"),yy=so("left"),ao=function(s){return{name:"border-"+s+"-width",initialValue:"0",type:0,prefix:!1,parse:function(i,u){return zn(u)?u.number:0}}},vy=ao("top"),Qy=ao("right"),Ey=ao("bottom"),Fy=ao("left"),Uy={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},by={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(s,i){return i==="rtl"?1:0}},Iy={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(s,i){return i.filter(jA).reduce(function(u,l){return u|Hy(l.value)},0)}},Hy=function(s){switch(s){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},_y={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Sy={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(s,i){return i.type===20&&i.value==="normal"?0:i.type===17||i.type===15?i.number:0}},lo;(function(s){s.NORMAL="normal",s.STRICT="strict"})(lo||(lo={}));var xy={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="strict"?lo.STRICT:lo.NORMAL}},Dy={name:"line-height",initialValue:"normal",prefix:!1,type:4},hc=function(s,i){return jA(s)&&s.value==="normal"?1.2*i:s.type===17?i*s.number:ce(s)?Ae(s,i):i},Ny={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(s,i){return i.type===20&&i.value==="none"?null:_i.parse(s,i)}},Ly={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(s,i){return i==="inside"?0:1}},Si={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},co=function(s){return{name:"margin-"+s,initialValue:"0",prefix:!1,type:4}},Ty=co("top"),ky=co("right"),My=co("bottom"),Oy=co("left"),Ky={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(s,i){return i.filter(jA).map(function(u){switch(u.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},Ry={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="break-word"?"break-word":"normal"}},uo=function(s){return{name:"padding-"+s,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Vy=uo("top"),Py=uo("right"),Gy=uo("bottom"),zy=uo("left"),$y={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(s,i){switch(i){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Xy={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(s,i){switch(i){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Wy={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&bi(i[0],"none")?[]:Je(i).map(function(u){for(var l={color:lt.TRANSPARENT,offsetX:he,offsetY:he,blur:he},f=0,p=0;p<u.length;p++){var C=u[p];Ct(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:l.blur=C,f++):l.color=vt.parse(s,C)}return l})}},Yy={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Jy={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(s,i){if(i.type===20&&i.value==="none")return null;if(i.type===18){var u=qy[i.name];if(typeof u>"u")throw new Error('Attempting to parse an unsupported transform function "'+i.name+'"');return u(i.values)}return null}},Zy=function(s){var i=s.filter(function(u){return u.type===17}).map(function(u){return u.number});return i.length===6?i:null},jy=function(s){var i=s.filter(function(E){return E.type===17}).map(function(E){return E.number}),u=i[0],l=i[1];i[2],i[3];var f=i[4],p=i[5];i[6],i[7],i[8],i[9],i[10],i[11];var C=i[12],Q=i[13];return i[14],i[15],i.length===16?[u,l,f,p,C,Q]:null},qy={matrix:Zy,matrix3d:jy},Bc={type:16,number:50,flags:Kn},Av=[Bc,Bc],ev={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(s,i){var u=i.filter(ce);return u.length!==2?Av:[u[0],u[1]]}},tv={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Wn;(function(s){s.NORMAL="normal",s.BREAK_ALL="break-all",s.KEEP_ALL="keep-all"})(Wn||(Wn={}));for(var nv={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"break-all":return Wn.BREAK_ALL;case"keep-all":return Wn.KEEP_ALL;default:return Wn.NORMAL}}},rv={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(s,i){if(i.type===20)return{auto:!0,order:0};if(rn(i))return{auto:!1,order:i.number};throw new Error("Invalid z-index number parsed")}},pc={name:"time",parse:function(s,i){if(i.type===15)switch(i.unit.toLowerCase()){case"s":return 1e3*i.number;case"ms":return i.number}throw new Error("Unsupported time type")}},ov={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(s,i){return rn(i)?i.number:1}},iv={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},sv={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(s,i){return i.filter(jA).map(function(u){switch(u.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(u){return u!==0})}},av={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(s,i){var u=[],l=[];return i.forEach(function(f){switch(f.type){case 20:case 0:u.push(f.value);break;case 17:u.push(f.number.toString());break;case 4:l.push(u.join(" ")),u.length=0;break}}),u.length&&l.push(u.join(" ")),l.map(function(f){return f.indexOf(" ")===-1?f:"'"+f+"'"})}},lv={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},cv={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(s,i){return rn(i)?i.number:jA(i)&&i.value==="bold"?700:400}},uv={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.filter(jA).map(function(u){return u.value})}},dv={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},fe=function(s,i){return(s&i)!==0},fv={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var u=i[0];return u.type===20&&u.value==="none"?[]:i}},gv={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var u=i[0];if(u.type===20&&u.value==="none")return null;for(var l=[],f=i.filter(Xl),p=0;p<f.length;p++){var C=f[p],Q=f[p+1];if(C.type===20){var E=Q&&rn(Q)?Q.number:1;l.push({counter:C.value,increment:E})}}return l}},hv={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return[];for(var u=[],l=i.filter(Xl),f=0;f<l.length;f++){var p=l[f],C=l[f+1];if(jA(p)&&p.value!=="none"){var Q=C&&rn(C)?C.number:0;u.push({counter:p.value,reset:Q})}}return u}},Bv={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(s,i){return i.filter(zn).map(function(u){return pc.parse(s,u)})}},pv={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var u=i[0];if(u.type===20&&u.value==="none")return null;var l=[],f=i.filter(PC);if(f.length%2!==0)return null;for(var p=0;p<f.length;p+=2){var C=f[p].value,Q=f[p+1].value;l.push({open:C,close:Q})}return l}},mc=function(s,i,u){if(!s)return"";var l=s[Math.min(i,s.length-1)];return l?u?l.open:l.close:""},mv={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&bi(i[0],"none")?[]:Je(i).map(function(u){for(var l={color:255,offsetX:he,offsetY:he,blur:he,spread:he,inset:!1},f=0,p=0;p<u.length;p++){var C=u[p];bi(C,"inset")?l.inset=!0:Ct(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:f===2?l.blur=C:l.spread=C,f++):l.color=vt.parse(s,C)}return l})}},wv={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(s,i){var u=[0,1,2],l=[];return i.filter(jA).forEach(function(f){switch(f.value){case"stroke":l.push(1);break;case"fill":l.push(0);break;case"markers":l.push(2);break}}),u.forEach(function(f){l.indexOf(f)===-1&&l.push(f)}),l}},Cv={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},yv={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(s,i){return zn(i)?i.number:0}},vv=(function(){function s(i,u){var l,f;this.animationDuration=bA(i,Bv,u.animationDuration),this.backgroundClip=bA(i,$C,u.backgroundClip),this.backgroundColor=bA(i,XC,u.backgroundColor),this.backgroundImage=bA(i,ny,u.backgroundImage),this.backgroundOrigin=bA(i,ry,u.backgroundOrigin),this.backgroundPosition=bA(i,oy,u.backgroundPosition),this.backgroundRepeat=bA(i,iy,u.backgroundRepeat),this.backgroundSize=bA(i,ay,u.backgroundSize),this.borderTopColor=bA(i,cy,u.borderTopColor),this.borderRightColor=bA(i,uy,u.borderRightColor),this.borderBottomColor=bA(i,dy,u.borderBottomColor),this.borderLeftColor=bA(i,fy,u.borderLeftColor),this.borderTopLeftRadius=bA(i,gy,u.borderTopLeftRadius),this.borderTopRightRadius=bA(i,hy,u.borderTopRightRadius),this.borderBottomRightRadius=bA(i,By,u.borderBottomRightRadius),this.borderBottomLeftRadius=bA(i,py,u.borderBottomLeftRadius),this.borderTopStyle=bA(i,my,u.borderTopStyle),this.borderRightStyle=bA(i,wy,u.borderRightStyle),this.borderBottomStyle=bA(i,Cy,u.borderBottomStyle),this.borderLeftStyle=bA(i,yy,u.borderLeftStyle),this.borderTopWidth=bA(i,vy,u.borderTopWidth),this.borderRightWidth=bA(i,Qy,u.borderRightWidth),this.borderBottomWidth=bA(i,Ey,u.borderBottomWidth),this.borderLeftWidth=bA(i,Fy,u.borderLeftWidth),this.boxShadow=bA(i,mv,u.boxShadow),this.color=bA(i,Uy,u.color),this.direction=bA(i,by,u.direction),this.display=bA(i,Iy,u.display),this.float=bA(i,_y,u.cssFloat),this.fontFamily=bA(i,av,u.fontFamily),this.fontSize=bA(i,lv,u.fontSize),this.fontStyle=bA(i,dv,u.fontStyle),this.fontVariant=bA(i,uv,u.fontVariant),this.fontWeight=bA(i,cv,u.fontWeight),this.letterSpacing=bA(i,Sy,u.letterSpacing),this.lineBreak=bA(i,xy,u.lineBreak),this.lineHeight=bA(i,Dy,u.lineHeight),this.listStyleImage=bA(i,Ny,u.listStyleImage),this.listStylePosition=bA(i,Ly,u.listStylePosition),this.listStyleType=bA(i,Si,u.listStyleType),this.marginTop=bA(i,Ty,u.marginTop),this.marginRight=bA(i,ky,u.marginRight),this.marginBottom=bA(i,My,u.marginBottom),this.marginLeft=bA(i,Oy,u.marginLeft),this.opacity=bA(i,ov,u.opacity);var p=bA(i,Ky,u.overflow);this.overflowX=p[0],this.overflowY=p[p.length>1?1:0],this.overflowWrap=bA(i,Ry,u.overflowWrap),this.paddingTop=bA(i,Vy,u.paddingTop),this.paddingRight=bA(i,Py,u.paddingRight),this.paddingBottom=bA(i,Gy,u.paddingBottom),this.paddingLeft=bA(i,zy,u.paddingLeft),this.paintOrder=bA(i,wv,u.paintOrder),this.position=bA(i,Xy,u.position),this.textAlign=bA(i,$y,u.textAlign),this.textDecorationColor=bA(i,iv,(l=u.textDecorationColor)!==null&&l!==void 0?l:u.color),this.textDecorationLine=bA(i,sv,(f=u.textDecorationLine)!==null&&f!==void 0?f:u.textDecoration),this.textShadow=bA(i,Wy,u.textShadow),this.textTransform=bA(i,Yy,u.textTransform),this.transform=bA(i,Jy,u.transform),this.transformOrigin=bA(i,ev,u.transformOrigin),this.visibility=bA(i,tv,u.visibility),this.webkitTextStrokeColor=bA(i,Cv,u.webkitTextStrokeColor),this.webkitTextStrokeWidth=bA(i,yv,u.webkitTextStrokeWidth),this.wordBreak=bA(i,nv,u.wordBreak),this.zIndex=bA(i,rv,u.zIndex)}return s.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},s.prototype.isTransparent=function(){return Qt(this.backgroundColor)},s.prototype.isTransformed=function(){return this.transform!==null},s.prototype.isPositioned=function(){return this.position!==0},s.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},s.prototype.isFloating=function(){return this.float!==0},s.prototype.isInlineLevel=function(){return fe(this.display,4)||fe(this.display,33554432)||fe(this.display,268435456)||fe(this.display,536870912)||fe(this.display,67108864)||fe(this.display,134217728)},s})(),Qv=(function(){function s(i,u){this.content=bA(i,fv,u.content),this.quotes=bA(i,pv,u.quotes)}return s})(),wc=(function(){function s(i,u){this.counterIncrement=bA(i,gv,u.counterIncrement),this.counterReset=bA(i,hv,u.counterReset)}return s})(),bA=function(s,i,u){var l=new zl,f=u!==null&&typeof u<"u"?u.toString():i.initialValue;l.write(f);var p=new $l(l.read());switch(i.type){case 2:var C=p.parseComponentValue();return i.parse(s,jA(C)?C.value:i.initialValue);case 0:return i.parse(s,p.parseComponentValue());case 1:return i.parse(s,p.parseComponentValues());case 4:return p.parseComponentValue();case 3:switch(i.format){case"angle":return eo.parse(s,p.parseComponentValue());case"color":return vt.parse(s,p.parseComponentValue());case"image":return _i.parse(s,p.parseComponentValue());case"length":var Q=p.parseComponentValue();return Ct(Q)?Q:he;case"length-percentage":var E=p.parseComponentValue();return ce(E)?E:he;case"time":return pc.parse(s,p.parseComponentValue())}break}},Ev="data-html2canvas-debug",Fv=function(s){switch(s.getAttribute(Ev)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},xi=function(s,i){var u=Fv(s);return u===1||i===u},Ze=(function(){function s(i,u){if(this.context=i,this.textNodes=[],this.elements=[],this.flags=0,xi(u,3))debugger;this.styles=new vv(i,window.getComputedStyle(u,null)),$i(u)&&(this.styles.animationDuration.some(function(l){return l>0})&&(u.style.animationDuration="0s"),this.styles.transform!==null&&(u.style.transform="none")),this.bounds=g(this.context,u),xi(u,4)&&(this.flags|=16)}return s})(),Uv="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACA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BAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgAC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AOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yn=typeof Uint8Array>"u"?[]:new Uint8Array(256),fo=0;fo<Cc.length;fo++)Yn[Cc.charCodeAt(fo)]=fo;for(var bv=function(s){var i=s.length*.75,u=s.length,l,f=0,p,C,Q,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var N=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),K=Array.isArray(N)?N:new Uint8Array(N);for(l=0;l<u;l+=4)p=Yn[s.charCodeAt(l)],C=Yn[s.charCodeAt(l+1)],Q=Yn[s.charCodeAt(l+2)],E=Yn[s.charCodeAt(l+3)],K[f++]=p<<2|C>>4,K[f++]=(C&15)<<4|Q>>2,K[f++]=(Q&3)<<6|E&63;return N},Iv=function(s){for(var i=s.length,u=[],l=0;l<i;l+=2)u.push(s[l+1]<<8|s[l]);return u},Hv=function(s){for(var i=s.length,u=[],l=0;l<i;l+=4)u.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return u},Ot=5,Di=11,Ni=2,_v=Di-Ot,yc=65536>>Ot,Li=(1<<Ot)-1,Sv=yc+(1024>>Ot)+32,xv=65536>>Di,Dv=(1<<_v)-1,vc=function(s,i,u){return s.slice?s.slice(i,u):new Uint16Array(Array.prototype.slice.call(s,i,u))},Nv=function(s,i,u){return s.slice?s.slice(i,u):new Uint32Array(Array.prototype.slice.call(s,i,u))},Lv=function(s,i){var u=bv(s),l=Array.isArray(u)?Hv(u):new Uint32Array(u),f=Array.isArray(u)?Iv(u):new Uint16Array(u),p=24,C=vc(f,p/2,l[4]/2),Q=l[5]===2?vc(f,(p+l[4])/2):Nv(l,Math.ceil((p+l[4])/4));return new Tv(l[0],l[1],l[2],l[3],C,Q)},Tv=(function(){function s(i,u,l,f,p,C){this.initialValue=i,this.errorValue=u,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var u;if(i>=0){if(i<55296||i>56319&&i<=65535)return u=this.index[i>>Ot],u=(u<<Ni)+(i&Li),this.data[u];if(i<=65535)return u=this.index[yc+(i-55296>>Ot)],u=(u<<Ni)+(i&Li),this.data[u];if(i<this.highStart)return u=Sv-xv+(i>>Di),u=this.index[u],u+=i>>Ot&Dv,u=this.index[u],u=(u<<Ni)+(i&Li),this.data[u];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),Qc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kv=typeof Uint8Array>"u"?[]:new Uint8Array(256),go=0;go<Qc.length;go++)kv[Qc.charCodeAt(go)]=go;var Mv=1,Ti=2,ki=3,Ec=4,Fc=5,Ov=7,Uc=8,Mi=9,Oi=10,bc=11,Ic=12,Hc=13,_c=14,Ki=15,Kv=function(s){for(var i=[],u=0,l=s.length;u<l;){var f=s.charCodeAt(u++);if(f>=55296&&f<=56319&&u<l){var p=s.charCodeAt(u++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),u--)}else i.push(f)}return i},Rv=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var u=s.length;if(!u)return"";for(var l=[],f=-1,p="";++f<u;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===u||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},Vv=Lv(Uv),xe="×",Ri="÷",Pv=function(s){return Vv.get(s)},Gv=function(s,i,u){var l=u-2,f=i[l],p=i[u-1],C=i[u];if(p===Ti&&C===ki)return xe;if(p===Ti||p===ki||p===Ec||C===Ti||C===ki||C===Ec)return Ri;if(p===Uc&&[Uc,Mi,bc,Ic].indexOf(C)!==-1||(p===bc||p===Mi)&&(C===Mi||C===Oi)||(p===Ic||p===Oi)&&C===Oi||C===Hc||C===Fc||C===Ov||p===Mv)return xe;if(p===Hc&&C===_c){for(;f===Fc;)f=i[--l];if(f===_c)return xe}if(p===Ki&&C===Ki){for(var Q=0;f===Ki;)Q++,f=i[--l];if(Q%2===0)return xe}return Ri},zv=function(s){var i=Kv(s),u=i.length,l=0,f=0,p=i.map(Pv);return{next:function(){if(l>=u)return{done:!0,value:null};for(var C=xe;l<u&&(C=Gv(i,p,++l))===xe;);if(C!==xe||l===u){var Q=Rv.apply(null,i.slice(f,l));return f=l,{value:Q,done:!1}}return{done:!0,value:null}}}},$v=function(s){for(var i=zv(s),u=[],l;!(l=i.next()).done;)l.value&&u.push(l.value.slice());return u},Xv=function(s){var i=123;if(s.createRange){var u=s.createRange();if(u.getBoundingClientRect){var l=s.createElement("boundtest");l.style.height=i+"px",l.style.display="block",s.body.appendChild(l),u.selectNode(l);var f=u.getBoundingClientRect(),p=Math.round(f.height);if(s.body.removeChild(l),p===i)return!0}}return!1},Wv=function(s){var i=s.createElement("boundtest");i.style.width="50px",i.style.display="block",i.style.fontSize="12px",i.style.letterSpacing="0px",i.style.wordSpacing="0px",s.body.appendChild(i);var u=s.createRange();i.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var l=i.firstChild,f=w(l.data).map(function(E){return m(E)}),p=0,C={},Q=f.every(function(E,N){u.setStart(l,p),u.setEnd(l,p+E.length);var K=u.getBoundingClientRect();p+=E.length;var X=K.x>C.x||K.y>C.y;return C=K,N===0?!0:X});return s.body.removeChild(i),Q},Yv=function(){return typeof new Image().crossOrigin<"u"},Jv=function(){return typeof new XMLHttpRequest().responseType=="string"},Zv=function(s){var i=new Image,u=s.createElement("canvas"),l=u.getContext("2d");if(!l)return!1;i.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{l.drawImage(i,0,0),u.toDataURL()}catch{return!1}return!0},Sc=function(s){return s[0]===0&&s[1]===255&&s[2]===0&&s[3]===255},jv=function(s){var i=s.createElement("canvas"),u=100;i.width=u,i.height=u;var l=i.getContext("2d");if(!l)return Promise.reject(!1);l.fillStyle="rgb(0, 255, 0)",l.fillRect(0,0,u,u);var f=new Image,p=i.toDataURL();f.src=p;var C=Vi(u,u,0,0,f);return l.fillStyle="red",l.fillRect(0,0,u,u),xc(C).then(function(Q){l.drawImage(Q,0,0);var E=l.getImageData(0,0,u,u).data;l.fillStyle="red",l.fillRect(0,0,u,u);var N=s.createElement("div");return N.style.backgroundImage="url("+p+")",N.style.height=u+"px",Sc(E)?xc(Vi(u,u,0,0,N)):Promise.reject(!1)}).then(function(Q){return l.drawImage(Q,0,0),Sc(l.getImageData(0,0,u,u).data)}).catch(function(){return!1})},Vi=function(s,i,u,l,f){var p="http://www.w3.org/2000/svg",C=document.createElementNS(p,"svg"),Q=document.createElementNS(p,"foreignObject");return C.setAttributeNS(null,"width",s.toString()),C.setAttributeNS(null,"height",i.toString()),Q.setAttributeNS(null,"width","100%"),Q.setAttributeNS(null,"height","100%"),Q.setAttributeNS(null,"x",u.toString()),Q.setAttributeNS(null,"y",l.toString()),Q.setAttributeNS(null,"externalResourcesRequired","true"),C.appendChild(Q),Q.appendChild(f),C},xc=function(s){return new Promise(function(i,u){var l=new Image;l.onload=function(){return i(l)},l.onerror=u,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},Be={get SUPPORT_RANGE_BOUNDS(){var s=Xv(document);return Object.defineProperty(Be,"SUPPORT_RANGE_BOUNDS",{value:s}),s},get SUPPORT_WORD_BREAKING(){var s=Be.SUPPORT_RANGE_BOUNDS&&Wv(document);return Object.defineProperty(Be,"SUPPORT_WORD_BREAKING",{value:s}),s},get SUPPORT_SVG_DRAWING(){var s=Zv(document);return Object.defineProperty(Be,"SUPPORT_SVG_DRAWING",{value:s}),s},get SUPPORT_FOREIGNOBJECT_DRAWING(){var s=typeof Array.from=="function"&&typeof window.fetch=="function"?jv(document):Promise.resolve(!1);return Object.defineProperty(Be,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:s}),s},get SUPPORT_CORS_IMAGES(){var s=Yv();return Object.defineProperty(Be,"SUPPORT_CORS_IMAGES",{value:s}),s},get SUPPORT_RESPONSE_TYPE(){var s=Jv();return Object.defineProperty(Be,"SUPPORT_RESPONSE_TYPE",{value:s}),s},get SUPPORT_CORS_XHR(){var s="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Be,"SUPPORT_CORS_XHR",{value:s}),s},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var s=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Be,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:s}),s}},Jn=(function(){function s(i,u){this.text=i,this.bounds=u}return s})(),qv=function(s,i,u,l){var f=tQ(i,u),p=[],C=0;return f.forEach(function(Q){if(u.textDecorationLine.length||Q.trim().length>0)if(Be.SUPPORT_RANGE_BOUNDS){var E=Dc(l,C,Q.length).getClientRects();if(E.length>1){var N=Pi(Q),K=0;N.forEach(function(j){p.push(new Jn(j,h.fromDOMRectList(s,Dc(l,K+C,j.length).getClientRects()))),K+=j.length})}else p.push(new Jn(Q,h.fromDOMRectList(s,E)))}else{var X=l.splitText(Q.length);p.push(new Jn(Q,AQ(s,l))),l=X}else Be.SUPPORT_RANGE_BOUNDS||(l=l.splitText(Q.length));C+=Q.length}),p},AQ=function(s,i){var u=i.ownerDocument;if(u){var l=u.createElement("html2canvaswrapper");l.appendChild(i.cloneNode(!0));var f=i.parentNode;if(f){f.replaceChild(l,i);var p=g(s,l);return l.firstChild&&f.replaceChild(l.firstChild,l),p}}return h.EMPTY},Dc=function(s,i,u){var l=s.ownerDocument;if(!l)throw new Error("Node has no owner document");var f=l.createRange();return f.setStart(s,i),f.setEnd(s,i+u),f},Pi=function(s){if(Be.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(i.segment(s)).map(function(u){return u.segment})}return $v(s)},eQ=function(s,i){if(Be.SUPPORT_NATIVE_TEXT_SEGMENTATION){var u=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(u.segment(s)).map(function(l){return l.segment})}return rQ(s,i)},tQ=function(s,i){return i.letterSpacing!==0?Pi(s):eQ(s,i)},nQ=[32,160,4961,65792,65793,4153,4241],rQ=function(s,i){for(var u=k0(s,{lineBreak:i.lineBreak,wordBreak:i.overflowWrap==="break-word"?"break-word":i.wordBreak}),l=[],f,p=function(){if(f.value){var C=w(f.value.slice()),Q="";C.forEach(function(E){nQ.indexOf(E)===-1?Q+=m(E):(Q.length&&l.push(Q),l.push(m(E)),Q="")}),Q.length&&l.push(Q)}};!(f=u.next()).done;)p();return l},oQ=(function(){function s(i,u,l){this.text=iQ(u.data,l.textTransform),this.textBounds=qv(i,this.text,l,u)}return s})(),iQ=function(s,i){switch(i){case 1:return s.toLowerCase();case 3:return s.replace(sQ,aQ);case 2:return s.toUpperCase();default:return s}},sQ=/(^|\s|:|-|\(|\))([a-z])/g,aQ=function(s,i,u){return s.length>0?i+u.toUpperCase():s},Nc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.src=l.currentSrc||l.src,f.intrinsicWidth=l.naturalWidth,f.intrinsicHeight=l.naturalHeight,f.context.cache.addImage(f.src),f}return i})(Ze),Lc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.canvas=l,f.intrinsicWidth=l.width,f.intrinsicHeight=l.height,f}return i})(Ze),Tc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this,p=new XMLSerializer,C=g(u,l);return l.setAttribute("width",C.width+"px"),l.setAttribute("height",C.height+"px"),f.svg="data:image/svg+xml,"+encodeURIComponent(p.serializeToString(l)),f.intrinsicWidth=l.width.baseVal.value,f.intrinsicHeight=l.height.baseVal.value,f.context.cache.addImage(f.svg),f}return i})(Ze),kc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.value=l.value,f}return i})(Ze),Gi=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.start=l.start,f.reversed=typeof l.reversed=="boolean"&&l.reversed===!0,f}return i})(Ze),lQ=[{type:15,flags:0,unit:"px",number:3}],cQ=[{type:16,flags:0,number:50}],uQ=function(s){return s.width>s.height?new h(s.left+(s.width-s.height)/2,s.top,s.height,s.height):s.width<s.height?new h(s.left,s.top+(s.height-s.width)/2,s.width,s.width):s},dQ=function(s){var i=s.type===fQ?new Array(s.value.length+1).join("•"):s.value;return i.length===0?s.placeholder||"":i},ho="checkbox",Bo="radio",fQ="password",Mc=707406591,zi=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;switch(f.type=l.type.toLowerCase(),f.checked=l.checked,f.value=dQ(l),(f.type===ho||f.type===Bo)&&(f.styles.backgroundColor=3739148031,f.styles.borderTopColor=f.styles.borderRightColor=f.styles.borderBottomColor=f.styles.borderLeftColor=2779096575,f.styles.borderTopWidth=f.styles.borderRightWidth=f.styles.borderBottomWidth=f.styles.borderLeftWidth=1,f.styles.borderTopStyle=f.styles.borderRightStyle=f.styles.borderBottomStyle=f.styles.borderLeftStyle=1,f.styles.backgroundClip=[0],f.styles.backgroundOrigin=[0],f.bounds=uQ(f.bounds)),f.type){case ho:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=lQ;break;case Bo:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=cQ;break}return f}return i})(Ze),Oc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this,p=l.options[l.selectedIndex||0];return f.value=p&&p.text||"",f}return i})(Ze),Kc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.value=l.value,f}return i})(Ze),Rc=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;f.src=l.src,f.width=parseInt(l.width,10)||0,f.height=parseInt(l.height,10)||0,f.backgroundColor=f.styles.backgroundColor;try{if(l.contentWindow&&l.contentWindow.document&&l.contentWindow.document.documentElement){f.tree=Pc(u,l.contentWindow.document.documentElement);var p=l.contentWindow.document.documentElement?Xn(u,getComputedStyle(l.contentWindow.document.documentElement).backgroundColor):lt.TRANSPARENT,C=l.contentWindow.document.body?Xn(u,getComputedStyle(l.contentWindow.document.body).backgroundColor):lt.TRANSPARENT;f.backgroundColor=Qt(p)?Qt(C)?f.styles.backgroundColor:C:p}}catch{}return f}return i})(Ze),gQ=["OL","UL","MENU"],po=function(s,i,u,l){for(var f=i.firstChild,p=void 0;f;f=p)if(p=f.nextSibling,Gc(f)&&f.data.trim().length>0)u.textNodes.push(new oQ(s,f,u.styles));else if(an(f))if(Jc(f)&&f.assignedNodes)f.assignedNodes().forEach(function(Q){return po(s,Q,u,l)});else{var C=Vc(s,f);C.styles.isVisible()&&(hQ(f,C,l)?C.flags|=4:BQ(C.styles)&&(C.flags|=2),gQ.indexOf(f.tagName)!==-1&&(C.flags|=8),u.elements.push(C),f.slot,f.shadowRoot?po(s,f.shadowRoot,C,l):!wo(f)&&!zc(f)&&!Co(f)&&po(s,f,C,l))}},Vc=function(s,i){return Wi(i)?new Nc(s,i):$c(i)?new Lc(s,i):zc(i)?new Tc(s,i):pQ(i)?new kc(s,i):mQ(i)?new Gi(s,i):wQ(i)?new zi(s,i):Co(i)?new Oc(s,i):wo(i)?new Kc(s,i):Wc(i)?new Rc(s,i):new Ze(s,i)},Pc=function(s,i){var u=Vc(s,i);return u.flags|=4,po(s,i,u,u),u},hQ=function(s,i,u){return i.styles.isPositionedWithZIndex()||i.styles.opacity<1||i.styles.isTransformed()||Xi(s)&&u.styles.isTransparent()},BQ=function(s){return s.isPositioned()||s.isFloating()},Gc=function(s){return s.nodeType===Node.TEXT_NODE},an=function(s){return s.nodeType===Node.ELEMENT_NODE},$i=function(s){return an(s)&&typeof s.style<"u"&&!mo(s)},mo=function(s){return typeof s.className=="object"},pQ=function(s){return s.tagName==="LI"},mQ=function(s){return s.tagName==="OL"},wQ=function(s){return s.tagName==="INPUT"},CQ=function(s){return s.tagName==="HTML"},zc=function(s){return s.tagName==="svg"},Xi=function(s){return s.tagName==="BODY"},$c=function(s){return s.tagName==="CANVAS"},Xc=function(s){return s.tagName==="VIDEO"},Wi=function(s){return s.tagName==="IMG"},Wc=function(s){return s.tagName==="IFRAME"},Yc=function(s){return s.tagName==="STYLE"},yQ=function(s){return s.tagName==="SCRIPT"},wo=function(s){return s.tagName==="TEXTAREA"},Co=function(s){return s.tagName==="SELECT"},Jc=function(s){return s.tagName==="SLOT"},Zc=function(s){return s.tagName.indexOf("-")>0},vQ=(function(){function s(){this.counters={}}return s.prototype.getCounterValue=function(i){var u=this.counters[i];return u&&u.length?u[u.length-1]:1},s.prototype.getCounterValues=function(i){var u=this.counters[i];return u||[]},s.prototype.pop=function(i){var u=this;i.forEach(function(l){return u.counters[l].pop()})},s.prototype.parse=function(i){var u=this,l=i.counterIncrement,f=i.counterReset,p=!0;l!==null&&l.forEach(function(Q){var E=u.counters[Q.counter];E&&Q.increment!==0&&(p=!1,E.length||E.push(1),E[Math.max(0,E.length-1)]+=Q.increment)});var C=[];return p&&f.forEach(function(Q){var E=u.counters[Q.counter];C.push(Q.counter),E||(E=u.counters[Q.counter]=[]),E.push(Q.reset)}),C},s})(),jc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},qc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},QQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},EQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ln=function(s,i,u,l,f,p){return s<i||s>u?jn(s,f,p.length>0):l.integers.reduce(function(C,Q,E){for(;s>=Q;)s-=Q,C+=l.values[E];return C},"")+p},Au=function(s,i,u,l){var f="";do u||s--,f=l(s)+f,s/=i;while(s*i>=i);return f},se=function(s,i,u,l,f){var p=u-i+1;return(s<0?"-":"")+(Au(Math.abs(s),p,l,function(C){return m(Math.floor(C%p)+i)})+f)},Kt=function(s,i,u){u===void 0&&(u=". ");var l=i.length;return Au(Math.abs(s),l,!1,function(f){return i[Math.floor(f%l)]})+u},cn=1,Ft=2,Ut=4,Zn=8,ct=function(s,i,u,l,f,p){if(s<-9999||s>9999)return jn(s,4,f.length>0);var C=Math.abs(s),Q=f;if(C===0)return i[0]+Q;for(var E=0;C>0&&E<=4;E++){var N=C%10;N===0&&fe(p,cn)&&Q!==""?Q=i[N]+Q:N>1||N===1&&E===0||N===1&&E===1&&fe(p,Ft)||N===1&&E===1&&fe(p,Ut)&&s>100||N===1&&E>1&&fe(p,Zn)?Q=i[N]+(E>0?u[E-1]:"")+Q:N===1&&E>0&&(Q=u[E-1]+Q),C=Math.floor(C/10)}return(s<0?l:"")+Q},eu="十百千萬",tu="拾佰仟萬",nu="マイナス",Yi="마이너스",jn=function(s,i,u){var l=u?". ":"",f=u?"、":"",p=u?", ":"",C=u?" ":"";switch(i){case 0:return"•"+C;case 1:return"◦"+C;case 2:return"◾"+C;case 5:var Q=se(s,48,57,!0,l);return Q.length<4?"0"+Q:Q;case 4:return Kt(s,"〇一二三四五六七八九",f);case 6:return ln(s,1,3999,jc,3,l).toLowerCase();case 7:return ln(s,1,3999,jc,3,l);case 8:return se(s,945,969,!1,l);case 9:return se(s,97,122,!1,l);case 10:return se(s,65,90,!1,l);case 11:return se(s,1632,1641,!0,l);case 12:case 49:return ln(s,1,9999,qc,3,l);case 35:return ln(s,1,9999,qc,3,l).toLowerCase();case 13:return se(s,2534,2543,!0,l);case 14:case 30:return se(s,6112,6121,!0,l);case 15:return Kt(s,"子丑寅卯辰巳午未申酉戌亥",f);case 16:return Kt(s,"甲乙丙丁戊己庚辛壬癸",f);case 17:case 48:return ct(s,"零一二三四五六七八九",eu,"負",f,Ft|Ut|Zn);case 47:return ct(s,"零壹貳參肆伍陸柒捌玖",tu,"負",f,cn|Ft|Ut|Zn);case 42:return ct(s,"零一二三四五六七八九",eu,"负",f,Ft|Ut|Zn);case 41:return ct(s,"零壹贰叁肆伍陆柒捌玖",tu,"负",f,cn|Ft|Ut|Zn);case 26:return ct(s,"〇一二三四五六七八九","十百千万",nu,f,0);case 25:return ct(s,"零壱弐参四伍六七八九","拾百千万",nu,f,cn|Ft|Ut);case 31:return ct(s,"영일이삼사오육칠팔구","십백천만",Yi,p,cn|Ft|Ut);case 33:return ct(s,"零一二三四五六七八九","十百千萬",Yi,p,0);case 32:return ct(s,"零壹貳參四五六七八九","拾百千",Yi,p,cn|Ft|Ut);case 18:return se(s,2406,2415,!0,l);case 20:return ln(s,1,19999,EQ,3,l);case 21:return se(s,2790,2799,!0,l);case 22:return se(s,2662,2671,!0,l);case 22:return ln(s,1,10999,QQ,3,l);case 23:return Kt(s,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Kt(s,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return se(s,3302,3311,!0,l);case 28:return Kt(s,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",f);case 29:return Kt(s,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",f);case 34:return se(s,3792,3801,!0,l);case 37:return se(s,6160,6169,!0,l);case 38:return se(s,4160,4169,!0,l);case 39:return se(s,2918,2927,!0,l);case 40:return se(s,1776,1785,!0,l);case 43:return se(s,3046,3055,!0,l);case 44:return se(s,3174,3183,!0,l);case 45:return se(s,3664,3673,!0,l);case 46:return se(s,3872,3881,!0,l);default:return se(s,48,57,!0,l)}},ru="data-html2canvas-ignore",ou=(function(){function s(i,u,l){if(this.context=i,this.options=l,this.scrolledElements=[],this.referenceElement=u,this.counters=new vQ,this.quoteDepth=0,!u.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(u.ownerDocument.documentElement,!1)}return s.prototype.toIFrame=function(i,u){var l=this,f=FQ(i,u);if(!f.contentWindow)return Promise.reject("Unable to find iframe window");var p=i.defaultView.pageXOffset,C=i.defaultView.pageYOffset,Q=f.contentWindow,E=Q.document,N=IQ(f).then(function(){return a(l,void 0,void 0,function(){var K,X;return c(this,function(j){switch(j.label){case 0:return this.scrolledElements.forEach(xQ),Q&&(Q.scrollTo(u.left,u.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Q.scrollY!==u.top||Q.scrollX!==u.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Q.scrollX-u.left,Q.scrollY-u.top,0,0))),K=this.options.onclone,X=this.clonedReferenceElement,typeof X>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:E.fonts&&E.fonts.ready?[4,E.fonts.ready]:[3,2];case 1:j.sent(),j.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,bQ(E)]:[3,4];case 3:j.sent(),j.label=4;case 4:return typeof K=="function"?[2,Promise.resolve().then(function(){return K(E,X)}).then(function(){return f})]:[2,f]}})})});return E.open(),E.write(_Q(document.doctype)+"<html></html>"),SQ(this.referenceElement.ownerDocument,p,C),E.replaceChild(E.adoptNode(this.documentElement),E.documentElement),E.close(),N},s.prototype.createElementClone=function(i){if(xi(i,2))debugger;if($c(i))return this.createCanvasClone(i);if(Xc(i))return this.createVideoClone(i);if(Yc(i))return this.createStyleClone(i);var u=i.cloneNode(!1);return Wi(u)&&(Wi(i)&&i.currentSrc&&i.currentSrc!==i.src&&(u.src=i.currentSrc,u.srcset=""),u.loading==="lazy"&&(u.loading="eager")),Zc(u)?this.createCustomElementClone(u):u},s.prototype.createCustomElementClone=function(i){var u=document.createElement("html2canvascustomelement");return Ji(i.style,u),u},s.prototype.createStyleClone=function(i){try{var u=i.sheet;if(u&&u.cssRules){var l=[].slice.call(u.cssRules,0).reduce(function(p,C){return C&&typeof C.cssText=="string"?p+C.cssText:p},""),f=i.cloneNode(!1);return f.textContent=l,f}}catch(p){if(this.context.logger.error("Unable to access cssRules property",p),p.name!=="SecurityError")throw p}return i.cloneNode(!1)},s.prototype.createCanvasClone=function(i){var u;if(this.options.inlineImages&&i.ownerDocument){var l=i.ownerDocument.createElement("img");try{return l.src=i.toDataURL(),l}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",i)}}var f=i.cloneNode(!1);try{f.width=i.width,f.height=i.height;var p=i.getContext("2d"),C=f.getContext("2d");if(C)if(!this.options.allowTaint&&p)C.putImageData(p.getImageData(0,0,i.width,i.height),0,0);else{var Q=(u=i.getContext("webgl2"))!==null&&u!==void 0?u:i.getContext("webgl");if(Q){var E=Q.getContextAttributes();E?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",i)}C.drawImage(i,0,0)}return f}catch{this.context.logger.info("Unable to clone canvas as it is tainted",i)}return f},s.prototype.createVideoClone=function(i){var u=i.ownerDocument.createElement("canvas");u.width=i.offsetWidth,u.height=i.offsetHeight;var l=u.getContext("2d");try{return l&&(l.drawImage(i,0,0,u.width,u.height),this.options.allowTaint||l.getImageData(0,0,u.width,u.height)),u}catch{this.context.logger.info("Unable to clone video as it is tainted",i)}var f=i.ownerDocument.createElement("canvas");return f.width=i.offsetWidth,f.height=i.offsetHeight,f},s.prototype.appendChildNode=function(i,u,l){(!an(u)||!yQ(u)&&!u.hasAttribute(ru)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(u)))&&(!this.options.copyStyles||!an(u)||!Yc(u))&&i.appendChild(this.cloneNode(u,l))},s.prototype.cloneChildNodes=function(i,u,l){for(var f=this,p=i.shadowRoot?i.shadowRoot.firstChild:i.firstChild;p;p=p.nextSibling)if(an(p)&&Jc(p)&&typeof p.assignedNodes=="function"){var C=p.assignedNodes();C.length&&C.forEach(function(Q){return f.appendChildNode(u,Q,l)})}else this.appendChildNode(u,p,l)},s.prototype.cloneNode=function(i,u){if(Gc(i))return document.createTextNode(i.data);if(!i.ownerDocument)return i.cloneNode(!1);var l=i.ownerDocument.defaultView;if(l&&an(i)&&($i(i)||mo(i))){var f=this.createElementClone(i);f.style.transitionProperty="none";var p=l.getComputedStyle(i),C=l.getComputedStyle(i,":before"),Q=l.getComputedStyle(i,":after");this.referenceElement===i&&$i(f)&&(this.clonedReferenceElement=f),Xi(f)&&LQ(f);var E=this.counters.parse(new wc(this.context,p)),N=this.resolvePseudoContent(i,f,C,qn.BEFORE);Zc(i)&&(u=!0),Xc(i)||this.cloneChildNodes(i,f,u),N&&f.insertBefore(N,f.firstChild);var K=this.resolvePseudoContent(i,f,Q,qn.AFTER);return K&&f.appendChild(K),this.counters.pop(E),(p&&(this.options.copyStyles||mo(i))&&!Wc(i)||u)&&Ji(p,f),(i.scrollTop!==0||i.scrollLeft!==0)&&this.scrolledElements.push([f,i.scrollLeft,i.scrollTop]),(wo(i)||Co(i))&&(wo(f)||Co(f))&&(f.value=i.value),f}return i.cloneNode(!1)},s.prototype.resolvePseudoContent=function(i,u,l,f){var p=this;if(l){var C=l.content,Q=u.ownerDocument;if(!(!Q||!C||C==="none"||C==="-moz-alt-content"||l.display==="none")){this.counters.parse(new wc(this.context,l));var E=new Qv(this.context,l),N=Q.createElement("html2canvaspseudoelement");Ji(l,N),E.content.forEach(function(X){if(X.type===0)N.appendChild(Q.createTextNode(X.value));else if(X.type===22){var j=Q.createElement("img");j.src=X.value,j.style.opacity="1",N.appendChild(j)}else if(X.type===18){if(X.name==="attr"){var CA=X.values.filter(jA);CA.length&&N.appendChild(Q.createTextNode(i.getAttribute(CA[0].value)||""))}else if(X.name==="counter"){var BA=X.values.filter(on),wA=BA[0],RA=BA[1];if(wA&&jA(wA)){var DA=p.counters.getCounterValue(wA.value),_A=RA&&jA(RA)?Si.parse(p.context,RA.value):3;N.appendChild(Q.createTextNode(jn(DA,_A,!1)))}}else if(X.name==="counters"){var te=X.values.filter(on),wA=te[0],XA=te[1],RA=te[2];if(wA&&jA(wA)){var kA=p.counters.getCounterValues(wA.value),FA=RA&&jA(RA)?Si.parse(p.context,RA.value):3,zA=XA&&XA.type===0?XA.value:"",$A=kA.map(function(Ee){return jn(Ee,FA,!1)}).join(zA);N.appendChild(Q.createTextNode($A))}}}else if(X.type===20)switch(X.value){case"open-quote":N.appendChild(Q.createTextNode(mc(E.quotes,p.quoteDepth++,!0)));break;case"close-quote":N.appendChild(Q.createTextNode(mc(E.quotes,--p.quoteDepth,!1)));break;default:N.appendChild(Q.createTextNode(X.value))}}),N.className=Zi+" "+ji;var K=f===qn.BEFORE?" "+Zi:" "+ji;return mo(u)?u.className.baseValue+=K:u.className+=K,N}}},s.destroy=function(i){return i.parentNode?(i.parentNode.removeChild(i),!0):!1},s})(),qn;(function(s){s[s.BEFORE=0]="BEFORE",s[s.AFTER=1]="AFTER"})(qn||(qn={}));var FQ=function(s,i){var u=s.createElement("iframe");return u.className="html2canvas-container",u.style.visibility="hidden",u.style.position="fixed",u.style.left="-10000px",u.style.top="0px",u.style.border="0",u.width=i.width.toString(),u.height=i.height.toString(),u.scrolling="no",u.setAttribute(ru,"true"),s.body.appendChild(u),u},UQ=function(s){return new Promise(function(i){if(s.complete){i();return}if(!s.src){i();return}s.onload=i,s.onerror=i})},bQ=function(s){return Promise.all([].slice.call(s.images,0).map(UQ))},IQ=function(s){return new Promise(function(i,u){var l=s.contentWindow;if(!l)return u("No window assigned for iframe");var f=l.document;l.onload=s.onload=function(){l.onload=s.onload=null;var p=setInterval(function(){f.body.childNodes.length>0&&f.readyState==="complete"&&(clearInterval(p),i(s))},50)}})},HQ=["all","d","content"],Ji=function(s,i){for(var u=s.length-1;u>=0;u--){var l=s.item(u);HQ.indexOf(l)===-1&&i.style.setProperty(l,s.getPropertyValue(l))}return i},_Q=function(s){var i="";return s&&(i+="<!DOCTYPE ",s.name&&(i+=s.name),s.internalSubset&&(i+=s.internalSubset),s.publicId&&(i+='"'+s.publicId+'"'),s.systemId&&(i+='"'+s.systemId+'"'),i+=">"),i},SQ=function(s,i,u){s&&s.defaultView&&(i!==s.defaultView.pageXOffset||u!==s.defaultView.pageYOffset)&&s.defaultView.scrollTo(i,u)},xQ=function(s){var i=s[0],u=s[1],l=s[2];i.scrollLeft=u,i.scrollTop=l},DQ=":before",NQ=":after",Zi="___html2canvas___pseudoelement_before",ji="___html2canvas___pseudoelement_after",iu=`{