diff --git a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-HJ25IOPZ.min.js b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js similarity index 99% rename from templates/tabulareditor/public/architectureDiagram-3BPJPVTR-HJ25IOPZ.min.js rename to templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js index f0f03a66d..822c18c6c 100644 --- a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-HJ25IOPZ.min.js +++ b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js @@ -1,4 +1,4 @@ -import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-POJVOFUH.min.js";import{a as Qe}from"./chunk-CCNPHFNE.min.js";import"./chunk-IJMU45IO.min.js";import"./chunk-HWCHFEAH.min.js";import"./chunk-OH5PAVPX.min.js";import"./chunk-RN42Y33E.min.js";import"./chunk-XNJBVM5Z.min.js";import"./chunk-Q5YIQYCF.min.js";import"./chunk-4HQ5XQBY.min.js";import"./chunk-X6TCRES7.min.js";import"./chunk-P3KXGIV7.min.js";import"./chunk-NE3GILF7.min.js";import"./chunk-25XGUDQ5.min.js";import{b as ke,c as Ze,d as he,f as le}from"./chunk-3G5FAZF2.min.js";import{a as me}from"./chunk-G3CW6HDB.min.js";import{o as Be,s as $e}from"./chunk-AVP3GJKJ.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as Se,H as Fe,P as be,T as Pe,U as Ge,V as Ue,W as Ye,X as Xe,Y as He,Z as We,_ as se,r as Re}from"./chunk-JBDIJRTV.min.js";import{b as ct,d as ye,j as Ve}from"./chunk-BJGJ3C53.min.js";import{a as pe,c as ur}from"./chunk-MY7PHHTQ.min.js";var Te=pe((re,Ee)=>{(function(w,N){typeof re=="object"&&typeof Ee=="object"?Ee.exports=N():typeof define=="function"&&define.amd?define([],N):typeof re=="object"?re.layoutBase=N():w.layoutBase=N()})(re,function(){return(function(E){var w={};function N(u){if(w[u])return w[u].exports;var l=w[u]={i:u,l:!1,exports:{}};return E[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=E,N.c=w,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(E,w,N){"use strict";function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(8),a=N(9);function r(f,e,c){u.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(u.prototype);for(var n in u)r[n]=u[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var c=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(c.getOwner()==e)return c;if(c.getOwner()==t)break;c=c.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},E.exports=r}),(function(E,w,N){"use strict";function u(l){this.vGraphObject=l}E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(13),r=N(0),n=N(16),f=N(5);function e(t,i,h,g){h==null&&g==null&&(g=i),u.call(this,g),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=t,h!=null&&i!=null?this.rect=new a(i.x,i.y,h.width,h.height):this.rect=new a}e.prototype=Object.create(u.prototype);for(var c in u)e[c]=u[c];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,i){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(t,i){this.rect.x=t-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(t,i){this.rect.x=t,this.rect.y=i},e.prototype.moveBy=function(t,i){this.rect.x+=t,this.rect.y+=i},e.prototype.getEdgeListToNode=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(s.target==t){if(s.source!=g)throw"Incorrect edge source!";i.push(s)}}),i},e.prototype.getEdgesBetween=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(!(s.source==g||s.target==g))throw"Incorrect edge source and/or target";(s.target==t||s.source==t)&&i.push(s)}),i},e.prototype.getNeighborsList=function(){var t=new Set,i=this;return i.edges.forEach(function(h){if(h.source==i)t.add(h.target);else{if(h.target!=i)throw"Incorrect incidency!";t.add(h.source)}}),t},e.prototype.withChildren=function(){var t=new Set,i,h;if(t.add(this),this.child!=null)for(var g=this.child.getNodes(),s=0;si?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(h+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>h?(this.rect.y-=(this.labelHeight-h)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(h+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var i=this.rect.x;i>r.WORLD_BOUNDARY?i=r.WORLD_BOUNDARY:i<-r.WORLD_BOUNDARY&&(i=-r.WORLD_BOUNDARY);var h=this.rect.y;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var g=new f(i,h),s=t.inverseTransformPoint(g);this.setLocation(s.x,s.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},E.exports=e}),(function(E,w,N){"use strict";var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,E.exports=l}),(function(E,w,N){"use strict";function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(0),r=N(7),n=N(3),f=N(1),e=N(13),c=N(12),t=N(11);function i(g,s,L){u.call(this,L),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,s!=null&&s instanceof r?this.graphManager=s:s!=null&&s instanceof Layout&&(this.graphManager=s.graphManager)}i.prototype=Object.create(u.prototype);for(var h in u)i[h]=u[h];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(g,s,L){if(s==null&&L==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var p=g;if(!(this.getNodes().indexOf(s)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(!(s.owner==L.owner&&s.owner==this))throw"Both owners must be this graph!";return s.owner!=L.owner?null:(p.source=s,p.target=L,p.isInterGraph=!1,this.getEdges().push(p),s.edges.push(p),L!=s&&L.edges.push(p),p)}},i.prototype.remove=function(g){var s=g;if(g instanceof n){if(s==null)throw"Node is null!";if(!(s.owner!=null&&s.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=s.edges.slice(),y,p=L.length,C=0;C-1&&b>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(A,1),y.target!=y.source&&y.target.edges.splice(b,1);var R=y.source.owner.getEdges().indexOf(y);if(R==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var g=l.MAX_VALUE,s=l.MAX_VALUE,L,y,p,C=this.getNodes(),R=C.length,A=0;AL&&(g=L),s>y&&(s=y)}return g==l.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?p=C[0].getParent().paddingLeft:p=this.margin,this.left=s-p,this.top=g-p,new c(this.left,this.top))},i.prototype.updateBounds=function(g){for(var s=l.MAX_VALUE,L=-l.MAX_VALUE,y=l.MAX_VALUE,p=-l.MAX_VALUE,C,R,A,b,W,G=this.nodes,J=G.length,x=0;xC&&(s=C),LA&&(y=A),pC&&(s=C),LA&&(y=A),p=this.nodes.length){var J=0;L.forEach(function(x){x.owner==g&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},E.exports=i}),(function(E,w,N){"use strict";var u,l=N(1);function a(r){u=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),f=this.add(r,n);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,n,f,e,c){if(f==null&&e==null&&c==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}else{c=f,e=n,f=r;var t=e.getOwner(),i=c.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==i)return f.isInterGraph=!1,t.add(f,e,c);if(f.isInterGraph=!0,f.source=e,f.target=c,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof u){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(n==this.rootGraph||n.parent!=null&&n.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(n.getEdges());for(var e,c=f.length,t=0;t=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var c=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(c=1);var t=c*n[0],i=n[1]/c;n[0]t)return n[0]=f,n[1]=h,n[2]=c,n[3]=G,!1;if(ec)return n[0]=i,n[1]=e,n[2]=b,n[3]=t,!1;if(fc?(n[0]=s,n[1]=L,o=!0):(n[0]=g,n[1]=h,o=!0):d===v&&(f>c?(n[0]=i,n[1]=h,o=!0):(n[0]=y,n[1]=L,o=!0)),-T===v?c>f?(n[2]=W,n[3]=G,m=!0):(n[2]=b,n[3]=A,m=!0):T===v&&(c>f?(n[2]=R,n[3]=A,m=!0):(n[2]=J,n[3]=G,m=!0)),o&&m)return!1;if(f>c?e>t?(D=this.getCardinalDirection(d,v,4),O=this.getCardinalDirection(T,v,2)):(D=this.getCardinalDirection(-d,v,3),O=this.getCardinalDirection(-T,v,1)):e>t?(D=this.getCardinalDirection(-d,v,1),O=this.getCardinalDirection(-T,v,3)):(D=this.getCardinalDirection(d,v,2),O=this.getCardinalDirection(T,v,4)),!o)switch(D){case 1:S=h,P=f+-C/v,n[0]=P,n[1]=S;break;case 2:P=y,S=e+p*v,n[0]=P,n[1]=S;break;case 3:S=L,P=f+C/v,n[0]=P,n[1]=S;break;case 4:P=s,S=e+-p*v,n[0]=P,n[1]=S;break}if(!m)switch(O){case 1:Z=A,I=c+-z/v,n[2]=I,n[3]=Z;break;case 2:I=J,Z=t+x*v,n[2]=I,n[3]=Z;break;case 3:Z=G,I=c+z/v,n[2]=I,n[3]=Z;break;case 4:I=W,Z=t+-x*v,n[2]=I,n[3]=Z;break}}return!1},l.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},l.getIntersection=function(a,r,n,f){if(f==null)return this.getIntersection2(a,r,n);var e=a.x,c=a.y,t=r.x,i=r.y,h=n.x,g=n.y,s=f.x,L=f.y,y=void 0,p=void 0,C=void 0,R=void 0,A=void 0,b=void 0,W=void 0,G=void 0,J=void 0;return C=i-c,A=e-t,W=t*c-e*i,R=L-g,b=h-s,G=s*g-h*L,J=C*b-R*A,J===0?null:(y=(A*G-b*W)/J,p=(R*W-C*G)/J,new u(y,p))},l.angleOfVector=function(a,r,n,f){var e=void 0;return a!==n?(e=Math.atan((f-r)/(n-a)),n=0){var L=(-h+Math.sqrt(h*h-4*i*g))/(2*i),y=(-h-Math.sqrt(h*h-4*i*g))/(2*i),p=null;return L>=0&&L<=1?[L]:y>=0&&y<=1?[y]:p}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,E.exports=l}),(function(E,w,N){"use strict";function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},E.exports=u}),(function(E,w,N){"use strict";function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function e(c,t){for(var i=0;i"u"?"undefined":u(a);return a==null||r!="object"&&r!="function"},E.exports=l}),(function(E,w,N){"use strict";function u(h){if(Array.isArray(h)){for(var g=0,s=Array(h.length);g0&&g;){for(C.push(A[0]);C.length>0&&g;){var b=C[0];C.splice(0,1),p.add(b);for(var W=b.getEdges(),y=0;y-1&&A.splice(z,1)}p=new Set,R=new Map}}return h},i.prototype.createDummyNodesForBendpoints=function(h){for(var g=[],s=h.source,L=this.graphManager.calcLowestCommonAncestor(h.source,h.target),y=0;y0){for(var L=this.edgeToDummyNodes.get(s),y=0;y=0&&g.splice(G,1);var J=R.getNeighborsList();J.forEach(function(o){if(s.indexOf(o)<0){var m=L.get(o),d=m-1;d==1&&b.push(o),L.set(o,d)}})}s=s.concat(b),(g.length==1||g.length==2)&&(y=!0,p=g[0])}return p},i.prototype.setGraphManager=function(h){this.graphManager=h},E.exports=i}),(function(E,w,N){"use strict";function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},E.exports=u}),(function(E,w,N){"use strict";var u=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},l.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},l.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},l.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},l.prototype.inverseTransformPoint=function(a){var r=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},E.exports=l}),(function(E,w,N){"use strict";function u(t){if(Array.isArray(t)){for(var i=0,h=Array(t.length);ia.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),i,h=0;h0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h,g,s,L,y=this.getAllNodes(),p;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),p=new Set,h=0;hC||p>C)&&(t.gravitationForceX=-this.gravityConstant*s,t.gravitationForceY=-this.gravityConstant*L)):(C=i.getEstimatedSize()*this.compoundGravityRangeFactor,(y>C||p>C)&&(t.gravitationForceX=-this.gravityConstant*s*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*L*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=y.length||C>=y[0].length)){for(var R=0;Re}}]),n})();E.exports=r}),(function(E,w,N){"use strict";function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Dt){var Nt=function $t(Rt){if(Rt.length==0)return 0;for(var Xt=[],zt=0;zt0;)Nt.push(0);return Nt})(this.n),n=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(this.m),f=!0,e=!0,c=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),i=0;i=0;v--)if(this.s[v]!==0){for(var D=v+1;D=0;F--){if((function(Dt,Nt){return Dt&&Nt})(F0;){var Q=void 0,Ut=void 0;for(Q=m-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(r[Q])<=St+Lt*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){r[Q]=0;break}if(Q===m-2)Ut=4;else{var Mt=void 0;for(Mt=m-1;Mt>=Q&&Mt!==Q;Mt--){var at=(Mt!==m?Math.abs(r[Mt]):0)+(Mt!==Q+1?Math.abs(r[Mt-1]):0);if(Math.abs(this.s[Mt])<=St+Lt*at){this.s[Mt]=0;break}}Mt===Q?Ut=3:Mt===m-1?Ut=1:(Ut=2,Q=Mt)}switch(Q++,Ut){case 1:{var et=r[m-2];r[m-2]=0;for(var pt=m-2;pt>=Q;pt--){var mt=u.hypot(this.s[pt],et),Ct=this.s[pt]/mt,Et=et/mt;if(this.s[pt]=mt,pt!==Q&&(et=-Et*r[pt-1],r[pt-1]=Ct*r[pt-1]),e)for(var Tt=0;Tt=this.s[Q+1]);){var lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=lt,e&&QMath.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function r(n,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=n,this.sequence2=f,this.match_score=e,this.mismatch_penalty=c,this.gap_penalty=t,this.iMax=n.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var i=0;i=0;n--){var f=this.listeners[n];f.event===a&&f.callback===r&&this.listeners.splice(n,1)}},l.emit=function(a,r){for(var n=0;n{(function(w,N){typeof ie=="object"&&typeof Ne=="object"?Ne.exports=N(Te()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof ie=="object"?ie.coseBase=N(Te()):w.coseBase=N(w.layoutBase)})(ie,function(E){return(()=>{"use strict";var w={45:((a,r,n)=>{var f={};f.layoutBase=n(551),f.CoSEConstants=n(806),f.CoSEEdge=n(767),f.CoSEGraph=n(880),f.CoSEGraphManager=n(578),f.CoSELayout=n(765),f.CoSENode=n(991),f.ConstraintHandler=n(902),a.exports=f}),806:((a,r,n)=>{var f=n(551).FDLayoutConstants;function e(){}for(var c in f)e[c]=f[c];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e}),767:((a,r,n)=>{var f=n(551).FDLayoutEdge;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),880:((a,r,n)=>{var f=n(551).LGraph;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),578:((a,r,n)=>{var f=n(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),765:((a,r,n)=>{var f=n(551).FDLayout,e=n(578),c=n(880),t=n(991),i=n(767),h=n(806),g=n(902),s=n(551).FDLayoutConstants,L=n(551).LayoutConstants,y=n(551).Point,p=n(551).PointD,C=n(551).DimensionD,R=n(551).Layout,A=n(551).Integer,b=n(551).IGeometry,W=n(551).LGraph,G=n(551).Transform,J=n(551).LinkedList;function x(){f.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(f.prototype);for(var z in f)x[z]=f[z];x.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new c(null,this.graphManager,o)},x.prototype.newNode=function(o){return new t(this.graphManager,o)},x.prototype.newEdge=function(o){return new i(null,null,o)},x.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var o=L.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return m.has(D)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(T){return m.has(T)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(v){return o.has(v)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,T=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,T),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},d=0;d0&&this.updateDisplacements();for(var d=0;d0&&(T.fixedNodeWeight=D)}}if(this.constraints.relativePlacementConstraint){var O=new Map,P=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){o.fixedNodesOnHorizontal.add(M),o.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var S=this.constraints.alignmentConstraint.vertical,d=0;d=2*M.length/3;K--)Y=Math.floor(Math.random()*(K+1)),X=M[K],M[K]=M[Y],M[Y]=X;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;o.nodesInRelativeHorizontal.includes(Y)||(o.nodesInRelativeHorizontal.push(Y),o.nodeToRelativeConstraintMapHorizontal.set(Y,[]),o.dummyToNodeForVerticalAlignment.has(Y)?o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(Y).getCenterX())),o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:X,gap:M.gap}),o.nodeToRelativeConstraintMapHorizontal.get(X).push({left:Y,gap:M.gap})}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;o.nodesInRelativeVertical.includes(K)||(o.nodesInRelativeVertical.push(K),o.nodeToRelativeConstraintMapVertical.set(K,[]),o.dummyToNodeForHorizontalAlignment.has(K)?o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(K).getCenterY())),o.nodesInRelativeVertical.includes(st)||(o.nodesInRelativeVertical.push(st),o.nodeToRelativeConstraintMapVertical.set(st,[]),o.dummyToNodeForHorizontalAlignment.has(st)?o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(st)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(st).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(K).push({bottom:st,gap:M.gap}),o.nodeToRelativeConstraintMapVertical.get(st).push({top:K,gap:M.gap})}});else{var Z=new Map,tt=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;Z.has(Y)?Z.get(Y).push(X):Z.set(Y,[X]),Z.has(X)?Z.get(X).push(Y):Z.set(X,[Y])}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;tt.has(K)?tt.get(K).push(st):tt.set(K,[st]),tt.has(st)?tt.get(st).push(K):tt.set(st,[K])}});var F=function(Y,X){var K=[],st=[],Lt=new J,St=new Set,Q=0;return Y.forEach(function(Ut,Mt){if(!St.has(Mt)){K[Q]=[],st[Q]=!1;var at=Mt;for(Lt.push(at),St.add(at),K[Q].push(at);Lt.length!=0;){at=Lt.shift(),X.has(at)&&(st[Q]=!0);var et=Y.get(at);et.forEach(function(pt){St.has(pt)||(Lt.push(pt),St.add(pt),K[Q].push(pt))})}Q++}}),{components:K,isFixed:st}},_=F(Z,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=_.components,this.fixedComponentsOnHorizontal=_.isFixed;var B=F(tt,o.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var M=o.idToNodeMap.get(B.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d1){var P;for(P=0;PT&&(T=Math.floor(O.y)),D=Math.floor(O.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(L.WORLD_CENTER_X-O.x/2,L.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(o,m,d){var T=Math.max(this.maxDiagonalInTree(o),h.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,T);var v=W.calculateBounds(o),D=new G;D.setDeviceOrgX(v.getMinX()),D.setDeviceOrgY(v.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var O=0;O1;){var K=X[0];X.splice(0,1);var st=F.indexOf(K);st>=0&&F.splice(st,1),M--,_--}m!=null?Y=(F.indexOf(X[0])+1)%M:Y=0;for(var Lt=Math.abs(T-d)/_,St=Y;B!=_;St=++St%M){var Q=F[St].getOtherEnd(o);if(Q!=m){var Ut=(d+B*Lt)%360,Mt=(Ut+Lt)%360;x.branchRadialLayout(Q,o,Ut,Mt,v+D,D),B++}}},x.maxDiagonalInTree=function(o){for(var m=A.MIN_VALUE,d=0;dm&&(m=v)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],T=this.graphManager.getAllNodes(),v=0;v"u"&&(m[P]=[]),m[P]=m[P].concat(D)}Object.keys(m).forEach(function(S){if(m[S].length>1){var I="DummyCompound_"+S;o.memberGroups[I]=m[S];var Z=m[S][0].getParent(),tt=new t(o.graphManager);tt.id=I,tt.paddingLeft=Z.paddingLeft||0,tt.paddingRight=Z.paddingRight||0,tt.paddingBottom=Z.paddingBottom||0,tt.paddingTop=Z.paddingTop||0,o.idToDummyNode[I]=tt;var F=o.getGraphManager().add(o.newGraph(),tt),_=Z.getChild();_.add(tt);for(var B=0;Bv?(T.rect.x-=(T.labelWidth-v)/2,T.setWidth(T.labelWidth),T.labelMarginLeft=(T.labelWidth-v)/2):T.labelPosHorizontal=="right"&&T.setWidth(v+T.labelWidth)),T.labelHeight&&(T.labelPosVertical=="top"?(T.rect.y-=T.labelHeight,T.setHeight(D+T.labelHeight),T.labelMarginTop=T.labelHeight):T.labelPosVertical=="center"&&T.labelHeight>D?(T.rect.y-=(T.labelHeight-D)/2,T.setHeight(T.labelHeight),T.labelMarginTop=(T.labelHeight-D)/2):T.labelPosVertical=="bottom"&&T.setHeight(D+T.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],d=m.id,T=m.paddingLeft,v=m.paddingTop,D=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,T,v,D,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var T=o.idToDummyNode[d],v=T.paddingLeft,D=T.paddingTop,O=T.labelMarginLeft,P=T.labelMarginTop;o.adjustLocations(m[d],T.rect.x,T.rect.y,v,D,O,P)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=o.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var T=d.getNodes(),v=0;v0)return this.toBeTiled[m]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){for(var m=o.id,d=o.getEdges(),T=0,v=0;vZ&&(Z=F.rect.height)}d+=Z+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var d=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(T){var v=m[T];if(d.tiledMemberPack[T]=d.tileNodes(o[T],v.paddingLeft+v.paddingRight),v.rect.width=d.tiledMemberPack[T].width,v.rect.height=d.tiledMemberPack[T].height,v.setCenter(d.tiledMemberPack[T].centerX,d.tiledMemberPack[T].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var D=v.rect.width,O=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(D+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>D?(v.rect.x-=(v.labelWidth-D)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-D)/2):v.labelPosHorizontal=="right"&&v.setWidth(D+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(O+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>O?(v.rect.y-=(v.labelHeight-O)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-O)/2):v.labelPosVertical=="bottom"&&v.setHeight(O+v.labelHeight))}})},x.prototype.tileNodes=function(o,m){var d=this.tileNodesByFavoringDim(o,m,!0),T=this.tileNodesByFavoringDim(o,m,!1),v=this.getOrgRatio(d),D=this.getOrgRatio(T),O;return DP&&(P=B.getWidth())});var S=D/v,I=O/v,Z=Math.pow(d-T,2)+4*(S+T)*(I+d)*v,tt=(T-d+Math.sqrt(Z))/(2*(S+T)),F;m?(F=Math.ceil(tt),F==tt&&F++):F=Math.floor(tt);var _=F*(S+T)-T;return P>_&&(_=P),_+=T*2,_},x.prototype.tileNodesByFavoringDim=function(o,m,d){var T=h.TILING_PADDING_VERTICAL,v=h.TILING_PADDING_HORIZONTAL,D=h.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:T,horizontalPadding:v,centerX:0,centerY:0};D&&(O.idealRowWidth=this.calcIdealRowWidth(o,d));var P=function(M){return M.rect.width*M.rect.height},S=function(M,Y){return P(Y)-P(M)};o.sort(function(B,M){var Y=S;return O.idealRowWidth?(Y=D,Y(B.id,M.id)):Y(B,M)});for(var I=0,Z=0,tt=0;tt0&&(O+=o.horizontalPadding),o.rowWidth[d]=O,o.width0&&(P+=o.verticalPadding);var S=0;P>o.rowHeight[d]&&(S=o.rowHeight[d],o.rowHeight[d]=P,S=o.rowHeight[d]-S),o.height+=S,o.rows[d].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,d=Number.MAX_VALUE,T=0;Td&&(m=T,d=o.rowWidth[T]);return m},x.prototype.canAddHorizontal=function(o,m,d){if(o.idealRowWidth){var T=o.rows.length-1,v=o.rowWidth[T];return v+m+o.horizontalPadding<=o.idealRowWidth}var D=this.getShortestRowIndex(o);if(D<0)return!0;var O=o.rowWidth[D];if(O+o.horizontalPadding+m<=o.width)return!0;var P=0;o.rowHeight[D]0&&(P=d+o.verticalPadding-o.rowHeight[D]);var S;o.width-O>=m+o.horizontalPadding?S=(o.height+P)/(O+m+o.horizontalPadding):S=(o.height+P)/o.width,P=d+o.verticalPadding;var I;return o.widthD&&m!=d){T.splice(-1,1),o.rows[d].push(v),o.rowWidth[m]=o.rowWidth[m]-D,o.rowWidth[d]=o.rowWidth[d]+D,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,P=0;PO&&(O=T[P].height);m>0&&(O+=o.verticalPadding);var S=o.rowHeight[m]+o.rowHeight[d];o.rowHeight[m]=O,o.rowHeight[d]0)for(var _=v;_<=D;_++)F[0]+=this.grid[_][O-1].length+this.grid[_][O].length-1;if(D0)for(var _=O;_<=P;_++)F[3]+=this.grid[v-1][_].length+this.grid[v][_].length-1;for(var B=A.MAX_VALUE,M,Y,X=0;X{var f=n(551).FDLayoutNode,e=n(551).IMath;function c(i,h,g,s){f.call(this,i,h,g,s)}c.prototype=Object.create(f.prototype);for(var t in f)c[t]=f[t];c.prototype.calculateDisplacement=function(){var i=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementX=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementY=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},c.prototype.propogateDisplacementToChildren=function(i,h){for(var g=this.getChild().getNodes(),s,L=0;L{function f(g){if(Array.isArray(g)){for(var s=0,L=Array(g.length);s0){var dt=0;it.forEach(function(lt){V=="horizontal"?(q.set(lt,y.has(lt)?p[y.get(lt)]:k.get(lt)),dt+=q.get(lt)):(q.set(lt,y.has(lt)?C[y.get(lt)]:k.get(lt)),dt+=q.get(lt))}),dt=dt/it.length,ot.forEach(function(lt){$.has(lt)||q.set(lt,dt)})}else{var nt=0;ot.forEach(function(lt){V=="horizontal"?nt+=y.has(lt)?p[y.get(lt)]:k.get(lt):nt+=y.has(lt)?C[y.get(lt)]:k.get(lt)}),nt=nt/ot.length,ot.forEach(function(lt){q.set(lt,nt)})}});for(var rt=function(){var it=gt.shift(),dt=H.get(it);dt.forEach(function(nt){if(q.get(nt.id)lt&&(lt=Xt),ztFt&&(Ft=zt)}}catch(_t){Vt=!0,Dt=_t}finally{try{!xt&&Nt.return&&Nt.return()}finally{if(Vt)throw Dt}}var ce=(dt+lt)/2-(nt+Ft)/2,qt=!0,Jt=!1,Kt=void 0;try{for(var Qt=ot[Symbol.iterator](),oe;!(qt=(oe=Qt.next()).done);qt=!0){var jt=oe.value;q.set(jt,q.get(jt)+ce)}}catch(_t){Jt=!0,Kt=_t}finally{try{!qt&&Qt.return&&Qt.return()}finally{if(Jt)throw Kt}}})}return q},z=function(H){var V=0,$=0,k=0,j=0;if(H.forEach(function(ht){ht.left?p[y.get(ht.left)]-p[y.get(ht.right)]>=0?V++:$++:C[y.get(ht.top)]-C[y.get(ht.bottom)]>=0?k++:j++}),V>$&&k>j)for(var ut=0;ut$)for(var ft=0;ftj)for(var q=0;q1)s.fixedNodeConstraint.forEach(function(U,H){T[H]=[U.position.x,U.position.y],v[H]=[p[y.get(U.nodeId)],C[y.get(U.nodeId)]]}),D=!0;else if(s.alignmentConstraint)(function(){var U=0;if(s.alignmentConstraint.vertical){for(var H=s.alignmentConstraint.vertical,V=function(q){var ht=new Set;H[q].forEach(function(vt){ht.add(vt)});var gt=new Set([].concat(f(ht)).filter(function(vt){return P.has(vt)})),rt=void 0;gt.size>0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).x,H[q].forEach(function(vt){T[U]=[rt,C[y.get(vt)]],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},$=0;$0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).y,k[q].forEach(function(vt){T[U]=[p[y.get(vt)],rt],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},ut=0;uttt&&(tt=Z[_].length,F=_);if(tt0){var Ct={x:0,y:0};s.fixedNodeConstraint.forEach(function(U,H){var V={x:p[y.get(U.nodeId)],y:C[y.get(U.nodeId)]},$=U.position,k=G($,V);Ct.x+=k.x,Ct.y+=k.y}),Ct.x/=s.fixedNodeConstraint.length,Ct.y/=s.fixedNodeConstraint.length,p.forEach(function(U,H){p[H]+=Ct.x}),C.forEach(function(U,H){C[H]+=Ct.y}),s.fixedNodeConstraint.forEach(function(U){p[y.get(U.nodeId)]=U.position.x,C[y.get(U.nodeId)]=U.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Et=s.alignmentConstraint.vertical,Tt=function(H){var V=new Set;Et[H].forEach(function(j){V.add(j)});var $=new Set([].concat(f(V)).filter(function(j){return P.has(j)})),k=void 0;$.size>0?k=p[y.get($.values().next().value)]:k=J(V).x,V.forEach(function(j){P.has(j)||(p[y.get(j)]=k)})},Ot=0;Ot0?k=C[y.get($.values().next().value)]:k=J(V).y,V.forEach(function(j){P.has(j)||(C[y.get(j)]=k)})},Pt=0;Pt{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(45);return l})()})});var Je=pe((ne,Ce)=>{(function(w,N){typeof ne=="object"&&typeof Ce=="object"?Ce.exports=N(Le()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof ne=="object"?ne.cytoscapeFcose=N(Le()):w.cytoscapeFcose=N(w.coseBase)})(ne,function(E){return(()=>{"use strict";var w={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var n=arguments.length,f=Array(n>1?n-1:0),e=1;e{var f=(function(){function t(i,h){var g=[],s=!0,L=!1,y=void 0;try{for(var p=i[Symbol.iterator](),C;!(s=(C=p.next()).done)&&(g.push(C.value),!(h&&g.length===h));s=!0);}catch(R){L=!0,y=R}finally{try{!s&&p.return&&p.return()}finally{if(L)throw y}}return g}return function(i,h){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,h);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=n(140).layoutBase.LinkedList,c={};c.getTopMostNodes=function(t){for(var i={},h=0;h0&&D.merge(I)});for(var O=0;O1){C=y[0],R=C.connectedEdges().length,y.forEach(function(v){v.connectedEdges().length0&&g.set("dummy"+(g.size+1),W),G},c.relocateComponent=function(t,i,h){if(!h.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(h.quality=="draft"){var p=!0,C=!1,R=void 0;try{for(var A=i.nodeIndexes[Symbol.iterator](),b;!(p=(b=A.next()).done);p=!0){var W=b.value,G=f(W,2),J=G[0],x=G[1],z=h.cy.getElementById(J);if(z){var o=z.boundingBox(),m=i.xCoords[x]-o.w/2,d=i.xCoords[x]+o.w/2,T=i.yCoords[x]-o.h/2,v=i.yCoords[x]+o.h/2;ms&&(s=d),Ty&&(y=v)}}}catch(I){C=!0,R=I}finally{try{!p&&A.return&&A.return()}finally{if(C)throw R}}var D=t.x-(s+g)/2,O=t.y-(y+L)/2;i.xCoords=i.xCoords.map(function(I){return I+D}),i.yCoords=i.yCoords.map(function(I){return I+O})}else{Object.keys(i).forEach(function(I){var Z=i[I],tt=Z.getRect().x,F=Z.getRect().x+Z.getRect().width,_=Z.getRect().y,B=Z.getRect().y+Z.getRect().height;tts&&(s=F),_y&&(y=B)});var P=t.x-(s+g)/2,S=t.y-(y+L)/2;Object.keys(i).forEach(function(I){var Z=i[I];Z.setCenter(Z.getCenterX()+P,Z.getCenterY()+S)})}}},c.calcBoundingBox=function(t,i,h,g){for(var s=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,C=void 0,R=void 0,A=void 0,b=void 0,W=t.descendants().not(":parent"),G=W.length,J=0;JC&&(s=C),LA&&(y=A),p{var f=n(548),e=n(140).CoSELayout,c=n(140).CoSENode,t=n(140).layoutBase.PointD,i=n(140).layoutBase.DimensionD,h=n(140).layoutBase.LayoutConstants,g=n(140).layoutBase.FDLayoutConstants,s=n(140).CoSEConstants,L=function(p,C){var R=p.cy,A=p.eles,b=A.nodes(),W=A.edges(),G=void 0,J=void 0,x=void 0,z={};p.randomize&&(G=C.nodeIndexes,J=C.xCoords,x=C.yCoords);var o=function(I){return typeof I=="function"},m=function(I,Z){return o(I)?I(Z):I},d=f.calcParentsWithoutChildren(R,A),T=function S(I,Z,tt,F){for(var _=Z.length,B=0;B<_;B++){var M=Z[B],Y=null;M.intersection(d).length==0&&(Y=M.children());var X=void 0,K=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())X=I.add(new c(tt.graphManager,new t(J[G.get(M.id())]-K.w/2,x[G.get(M.id())]-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else{var st=f.calcBoundingBox(M,J,x,G);M.intersection(d).length==0?X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(st.width,st.height))):X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(parseFloat(K.w),parseFloat(K.h))))}else X=I.add(new c(tt.graphManager,new t(M.position("x")-K.w/2,M.position("y")-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else X=I.add(new c(this.graphManager));if(X.id=M.data("id"),X.nodeRepulsion=m(F.nodeRepulsion,M),X.paddingLeft=parseInt(M.css("padding")),X.paddingTop=parseInt(M.css("padding")),X.paddingRight=parseInt(M.css("padding")),X.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(X.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=M.css("text-valign"),X.labelPosHorizontal=M.css("text-halign")),z[M.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),Y!=null&&Y.length>0){var Lt=void 0;Lt=tt.getGraphManager().add(tt.newGraph(),X),S(Lt,Y,tt,F)}}},v=function(I,Z,tt){for(var F=0,_=0,B=0;B0?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=F/_:o(p.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=p.idealEdgeLength,s.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},D=function(I,Z){Z.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Z.fixedNodeConstraint),Z.alignmentConstraint&&(I.constraints.alignmentConstraint=Z.alignmentConstraint),Z.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Z.relativePlacementConstraint)};p.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.nestingFactor),p.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=p.gravity),p.numIter!=null&&(s.MAX_ITERATIONS=g.MAX_ITERATIONS=p.numIter),p.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=p.gravityRange),p.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.gravityCompound),p.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.gravityRangeCompound),p.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.initialEnergyOnIncremental),p.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=p.tilingCompareBy),p.quality=="proof"?h.QUALITY=2:h.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=p.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!p.randomize,s.ANIMATE=g.ANIMATE=h.ANIMATE=p.animate,s.TILE=p.tile,s.TILING_PADDING_VERTICAL=typeof p.tilingPaddingVertical=="function"?p.tilingPaddingVertical.call():p.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof p.tilingPaddingHorizontal=="function"?p.tilingPaddingHorizontal.call():p.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!p.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=p.uniformNodeDimensions,p.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),p.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),p.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),p.step=="all"&&(p.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),p.fixedNodeConstraint||p.alignmentConstraint||p.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,P=O.newGraphManager();return T(P.addRoot(),f.getTopMostNodes(b),O,p),v(O,P,W),D(O,p),O.runLayout(),z};a.exports={coseLayout:L}}),212:((a,r,n)=>{var f=(function(){function p(C,R){for(var A=0;A0)if(v){var P=t.getTopMostNodes(A.eles.nodes());if(o=t.connectComponents(b,A.eles,P),o.forEach(function(at){var et=at.boundingBox();m.push({x:et.x1+et.w/2,y:et.y1+et.h/2})}),A.randomize&&o.forEach(function(at){A.eles=at,G.push(h(A))}),A.quality=="default"||A.quality=="proof"){var S=b.collection();if(A.tile){var I=new Map,Z=[],tt=[],F=0,_={nodeIndexes:I,xCoords:Z,yCoords:tt},B=[];if(o.forEach(function(at,et){at.edges().length==0&&(at.nodes().forEach(function(pt,mt){S.merge(at.nodes()[mt]),pt.isParent()||(_.nodeIndexes.set(at.nodes()[mt].id(),F++),_.xCoords.push(at.nodes()[0].position().x),_.yCoords.push(at.nodes()[0].position().y))}),B.push(et))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),o.push(S),G.push(_);for(var Y=B.length-1;Y>=0;Y--)o.splice(B[Y],1),G.splice(B[Y],1),m.splice(B[Y],1)}}o.forEach(function(at,et){A.eles=at,z.push(s(A,G[et])),t.relocateComponent(m[et],z[et],A)})}else o.forEach(function(at,et){t.relocateComponent(m[et],G[et],A)});var X=new Set;if(o.length>1){var K=[],st=W.filter(function(at){return at.css("display")=="none"});o.forEach(function(at,et){var pt=void 0;if(A.quality=="draft"&&(pt=G[et].nodeIndexes),at.nodes().not(st).length>0){var mt={};mt.edges=[],mt.nodes=[];var Ct=void 0;at.nodes().not(st).forEach(function(Et){if(A.quality=="draft")if(!Et.isParent())Ct=pt.get(Et.id()),mt.nodes.push({x:G[et].xCoords[Ct]-Et.boundingbox().w/2,y:G[et].yCoords[Ct]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var Tt=t.calcBoundingBox(Et,G[et].xCoords,G[et].yCoords,pt);mt.nodes.push({x:Tt.topLeftX,y:Tt.topLeftY,width:Tt.width,height:Tt.height})}else z[et][Et.id()]&&mt.nodes.push({x:z[et][Et.id()].getLeft(),y:z[et][Et.id()].getTop(),width:z[et][Et.id()].getWidth(),height:z[et][Et.id()].getHeight()})}),at.edges().forEach(function(Et){var Tt=Et.source(),Ot=Et.target();if(Tt.css("display")!="none"&&Ot.css("display")!="none")if(A.quality=="draft"){var It=pt.get(Tt.id()),Wt=pt.get(Ot.id()),Pt=[],Yt=[];if(Tt.isParent()){var bt=t.calcBoundingBox(Tt,G[et].xCoords,G[et].yCoords,pt);Pt.push(bt.topLeftX+bt.width/2),Pt.push(bt.topLeftY+bt.height/2)}else Pt.push(G[et].xCoords[It]),Pt.push(G[et].yCoords[It]);if(Ot.isParent()){var U=t.calcBoundingBox(Ot,G[et].xCoords,G[et].yCoords,pt);Yt.push(U.topLeftX+U.width/2),Yt.push(U.topLeftY+U.height/2)}else Yt.push(G[et].xCoords[Wt]),Yt.push(G[et].yCoords[Wt]);mt.edges.push({startX:Pt[0],startY:Pt[1],endX:Yt[0],endY:Yt[1]})}else z[et][Tt.id()]&&z[et][Ot.id()]&&mt.edges.push({startX:z[et][Tt.id()].getCenterX(),startY:z[et][Tt.id()].getCenterY(),endX:z[et][Ot.id()].getCenterX(),endY:z[et][Ot.id()].getCenterY()})}),mt.nodes.length>0&&(K.push(mt),X.add(et))}});var Lt=T.packComponents(K,A.randomize).shifts;if(A.quality=="draft")G.forEach(function(at,et){var pt=at.xCoords.map(function(Ct){return Ct+Lt[et].dx}),mt=at.yCoords.map(function(Ct){return Ct+Lt[et].dy});at.xCoords=pt,at.yCoords=mt});else{var St=0;X.forEach(function(at){Object.keys(z[at]).forEach(function(et){var pt=z[at][et];pt.setCenter(pt.getCenterX()+Lt[St].dx,pt.getCenterY()+Lt[St].dy)}),St++})}}}else{var D=A.eles.boundingBox();if(m.push({x:D.x1+D.w/2,y:D.y1+D.h/2}),A.randomize){var O=h(A);G.push(O)}A.quality=="default"||A.quality=="proof"?(z.push(s(A,G[0])),t.relocateComponent(m[0],z[0],A)):t.relocateComponent(m[0],G[0],A)}var Q=function(et,pt){if(A.quality=="default"||A.quality=="proof"){typeof et=="number"&&(et=pt);var mt=void 0,Ct=void 0,Et=et.data("id");return z.forEach(function(Ot){Et in Ot&&(mt={x:Ot[Et].getRect().getCenterX(),y:Ot[Et].getRect().getCenterY()},Ct=Ot[Et])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?mt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(mt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?mt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(mt.y-=Ct.labelHeight/2))),mt==null&&(mt={x:et.position("x"),y:et.position("y")}),{x:mt.x,y:mt.y}}else{var Tt=void 0;return G.forEach(function(Ot){var It=Ot.nodeIndexes.get(et.id());It!=null&&(Tt={x:Ot.xCoords[It],y:Ot.yCoords[It]})}),Tt==null&&(Tt={x:et.position("x"),y:et.position("y")}),{x:Tt.x,y:Tt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Ut=t.calcParentsWithoutChildren(b,W),Mt=W.filter(function(at){return at.css("display")=="none"});A.eles=W.not(Mt),W.nodes().not(":parent").not(Mt).layoutPositions(R,A,Q),Ut.length>0&&Ut.forEach(function(at){at.position(Q(at))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),p})();a.exports=y}),657:((a,r,n)=>{var f=n(548),e=n(140).layoutBase.Matrix,c=n(140).layoutBase.SVD,t=function(h){var g=h.cy,s=h.eles,L=s.nodes(),y=s.nodes(":parent"),p=new Map,C=new Map,R=new Map,A=[],b=[],W=[],G=[],J=[],x=[],z=[],o=[],m=void 0,d=void 0,T=1e8,v=1e-9,D=h.piTol,O=h.samplingType,P=h.nodeSeparation,S=void 0,I=function(){for(var V=0,$=0,k=!1;$=ut;){q=j[ut++];for(var ot=A[q],it=0;itrt&&(rt=J[nt],vt=nt)}return vt},tt=function(V){var $=void 0;if(V){$=Math.floor(Math.random()*d),m=$;for(var j=0;j=1)break;rt=gt}for(var ot=0;ot=1)break;rt=gt}for(var dt=0;dt0&&($.isParent()?A[V].push(R.get($.id())):A[V].push($.id()))})});var Ut=function(V){var $=C.get(V),k=void 0;p.get(V).forEach(function(j){g.getElementById(j).isParent()?k=R.get(j):k=j,A[$].push(k),A[C.get(k)].push(V)})},Mt=!0,at=!1,et=void 0;try{for(var pt=p.keys()[Symbol.iterator](),mt;!(Mt=(mt=pt.next()).done);Mt=!0){var Ct=mt.value;Ut(Ct)}}catch(H){at=!0,et=H}finally{try{!Mt&&pt.return&&pt.return()}finally{if(at)throw et}}d=C.size;var Et=void 0;if(d>2){S=d{var f=n(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e}),140:(a=>{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(579);return l})()})});var ir=ur(Je(),1);var Ke={L:"left",R:"right",T:"top",B:"bottom"},je={L:ct(E=>`${E},${E/2} 0,${E} 0,0`,"L"),R:ct(E=>`0,${E/2} ${E},0 ${E},${E}`,"R"),T:ct(E=>`0,0 ${E},0 ${E/2},${E}`,"T"),B:ct(E=>`${E/2},0 ${E},${E} 0,${E}`,"B")},fe={L:ct((E,w)=>E-w+2,"L"),R:ct((E,w)=>E-2,"R"),T:ct((E,w)=>E-w+2,"T"),B:ct((E,w)=>E-2,"B")},dr=ct(function(E){return Ht(E)?E==="L"?"R":"L":E==="T"?"B":"T"},"getOppositeArchitectureDirection"),_e=ct(function(E){let w=E;return w==="L"||w==="R"||w==="T"||w==="B"},"isArchitectureDirection"),Ht=ct(function(E){let w=E;return w==="L"||w==="R"},"isArchitectureDirectionX"),Zt=ct(function(E){let w=E;return w==="T"||w==="B"},"isArchitectureDirectionY"),we=ct(function(E,w){let N=Ht(E)&&Zt(w),u=Zt(E)&&Ht(w);return N||u},"isArchitectureDirectionXY"),vr=ct(function(E){let w=E[0],N=E[1],u=Ht(w)&&Zt(N),l=Zt(w)&&Ht(N);return u||l},"isArchitecturePairXY"),pr=ct(function(E){return E!=="LL"&&E!=="RR"&&E!=="TT"&&E!=="BB"},"isValidArchitectureDirectionPair"),Ae=ct(function(E,w){let N=`${E}${w}`;return pr(N)?N:void 0},"getArchitectureDirectionPair"),yr=ct(function([E,w],N){let u=N[0],l=N[1];return Ht(u)?Zt(l)?[E+(u==="L"?-1:1),w+(l==="T"?1:-1)]:[E+(u==="L"?-1:1),w]:Ht(l)?[E+(l==="L"?1:-1),w+(u==="T"?1:-1)]:[E,w+(u==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mr=ct(function(E){return E==="LT"||E==="TL"?[1,1]:E==="BL"||E==="LB"?[1,-1]:E==="BR"||E==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=ct(function(E,w){return we(E,w)?"bend":Ht(E)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Tr=ct(function(E){return E.type==="service"},"isArchitectureService"),Nr=ct(function(E){return E.type==="junction"},"isArchitectureJunction"),tr=ct(E=>E.data(),"edgeData"),ee=ct(E=>E.data(),"nodeData"),Lr=Re.architecture,er=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ge,this.getAccTitle=Ue,this.setDiagramTitle=He,this.getDiagramTitle=We,this.getAccDescription=Xe,this.setAccDescription=Ye,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(E){this.diagramId=E}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Pe()}addService({id:E,icon:w,in:N,title:u,iconText:l}){if(this.registeredIds[E]!==void 0)throw new Error(`The service id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The service [${E}] cannot be placed within itself`);if(this.registeredIds[N]===void 0)throw new Error(`The service [${E}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[N]==="node")throw new Error(`The service [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"service",icon:w,iconText:l,title:u,edges:[],in:N}}getServices(){return Object.values(this.nodes).filter(Tr)}addJunction({id:E,in:w}){if(this.registeredIds[E]!==void 0)throw new Error(`The junction id [${E}] is already in use by another ${this.registeredIds[E]}`);if(w!==void 0){if(E===w)throw new Error(`The junction [${E}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The junction [${E}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[w]==="node")throw new Error(`The junction [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"junction",edges:[],in:w}}getJunctions(){return Object.values(this.nodes).filter(Nr)}getNodes(){return Object.values(this.nodes)}getNode(E){return this.nodes[E]??null}addGroup({id:E,icon:w,in:N,title:u}){if(this.registeredIds?.[E]!==void 0)throw new Error(`The group id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The group [${E}] cannot be placed within itself`);if(this.registeredIds?.[N]===void 0)throw new Error(`The group [${E}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[N]==="node")throw new Error(`The group [${E}]'s parent is not a group`)}this.registeredIds[E]="group",this.groups[E]={id:E,icon:w,title:u,in:N}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:E,rhsId:w,lhsDir:N,rhsDir:u,lhsInto:l,rhsInto:a,lhsGroup:r,rhsGroup:n,title:f}){if(!_e(N))throw new Error(`Invalid direction given for left hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(N)}`);if(!_e(u))throw new Error(`Invalid direction given for right hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(u)}`);if(this.nodes[E]===void 0&&this.groups[E]===void 0)throw new Error(`The left-hand id [${E}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[w]===void 0&&this.groups[w]===void 0)throw new Error(`The right-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);let e=this.nodes[E].in,c=this.nodes[w].in;if(r&&e&&c&&e==c)throw new Error(`The left-hand id [${E}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&c&&e==c)throw new Error(`The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let t={lhsId:E,lhsDir:N,lhsInto:l,lhsGroup:r,rhsId:w,rhsDir:u,rhsInto:a,rhsGroup:n,title:f};this.edges.push(t),this.nodes[E]&&this.nodes[w]&&(this.nodes[E].edges.push(this.edges[this.edges.length-1]),this.nodes[w].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let E={},w=Object.entries(this.nodes).reduce((n,[f,e])=>(n[f]=e.edges.reduce((c,t)=>{let i=this.getNode(t.lhsId)?.in,h=this.getNode(t.rhsId)?.in;if(i&&h&&i!==h){let g=Er(t.lhsDir,t.rhsDir);g!=="bend"&&(E[i]??={},E[i][h]=g,E[h]??={},E[h][i]=g)}if(t.lhsId===f){let g=Ae(t.lhsDir,t.rhsDir);g&&(c[g]=t.rhsId)}else{let g=Ae(t.rhsDir,t.lhsDir);g&&(c[g]=t.lhsId)}return c},{}),n),{}),N=Object.keys(w)[0],u={[N]:1},l=Object.keys(w).reduce((n,f)=>f===N?n:{...n,[f]:1},{}),a=ct(n=>{let f={[n]:[0,0]},e=[n];for(;e.length>0;){let c=e.shift();if(c){u[c]=1,delete l[c];let t=w[c],[i,h]=f[c];Object.entries(t).forEach(([g,s])=>{u[s]||(f[s]=yr([i,h],g),e.push(s))})}}return f},"BFS"),r=[a(N)];for(;Object.keys(l).length>0;)r.push(a(Object.keys(l)[0]));this.dataStructures={adjList:w,spatialMaps:r,groupAlignments:E}}return this.dataStructures}setElementForId(E,w){this.elements[E]=w}getElementById(E){return this.elements[E]}getConfig(){return Be({...Lr,...Se().architecture})}getConfigField(E){return this.getConfig()[E]}},Cr=ct((E,w)=>{qe(E,w),E.groups.map(N=>w.addGroup(N)),E.services.map(N=>w.addService({...N,type:"service"})),E.junctions.map(N=>w.addJunction({...N,type:"junction"})),E.edges.map(N=>w.addEdge(N))},"populateDb"),rr={parser:{yy:void 0},parse:ct(async E=>{let w=await Qe("architecture",E);ye.debug(w);let N=rr.parser?.yy;if(!(N instanceof er))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Cr(w,N)},"parse")},Ar=ct(E=>` +import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-MW7YERWN.min.js";import{a as Qe}from"./chunk-CCNPHFNE.min.js";import"./chunk-IJMU45IO.min.js";import"./chunk-HWCHFEAH.min.js";import"./chunk-OH5PAVPX.min.js";import"./chunk-RN42Y33E.min.js";import"./chunk-XNJBVM5Z.min.js";import"./chunk-Q5YIQYCF.min.js";import"./chunk-4HQ5XQBY.min.js";import"./chunk-X6TCRES7.min.js";import"./chunk-P3KXGIV7.min.js";import"./chunk-NE3GILF7.min.js";import"./chunk-25XGUDQ5.min.js";import{b as ke,c as Ze,d as he,f as le}from"./chunk-W44GZAG6.min.js";import{a as me}from"./chunk-G3CW6HDB.min.js";import{o as Be,s as $e}from"./chunk-YPRWTSV5.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as Se,H as Fe,P as be,T as Pe,U as Ge,V as Ue,W as Ye,X as Xe,Y as He,Z as We,_ as se,r as Re}from"./chunk-LXXU3C6C.min.js";import{b as ct,d as ye,j as Ve}from"./chunk-BJGJ3C53.min.js";import{a as pe,c as ur}from"./chunk-MY7PHHTQ.min.js";var Te=pe((re,Ee)=>{(function(w,N){typeof re=="object"&&typeof Ee=="object"?Ee.exports=N():typeof define=="function"&&define.amd?define([],N):typeof re=="object"?re.layoutBase=N():w.layoutBase=N()})(re,function(){return(function(E){var w={};function N(u){if(w[u])return w[u].exports;var l=w[u]={i:u,l:!1,exports:{}};return E[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=E,N.c=w,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(E,w,N){"use strict";function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(8),a=N(9);function r(f,e,c){u.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(u.prototype);for(var n in u)r[n]=u[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var c=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(c.getOwner()==e)return c;if(c.getOwner()==t)break;c=c.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},E.exports=r}),(function(E,w,N){"use strict";function u(l){this.vGraphObject=l}E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(13),r=N(0),n=N(16),f=N(5);function e(t,i,h,g){h==null&&g==null&&(g=i),u.call(this,g),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=t,h!=null&&i!=null?this.rect=new a(i.x,i.y,h.width,h.height):this.rect=new a}e.prototype=Object.create(u.prototype);for(var c in u)e[c]=u[c];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,i){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(t,i){this.rect.x=t-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(t,i){this.rect.x=t,this.rect.y=i},e.prototype.moveBy=function(t,i){this.rect.x+=t,this.rect.y+=i},e.prototype.getEdgeListToNode=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(s.target==t){if(s.source!=g)throw"Incorrect edge source!";i.push(s)}}),i},e.prototype.getEdgesBetween=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(!(s.source==g||s.target==g))throw"Incorrect edge source and/or target";(s.target==t||s.source==t)&&i.push(s)}),i},e.prototype.getNeighborsList=function(){var t=new Set,i=this;return i.edges.forEach(function(h){if(h.source==i)t.add(h.target);else{if(h.target!=i)throw"Incorrect incidency!";t.add(h.source)}}),t},e.prototype.withChildren=function(){var t=new Set,i,h;if(t.add(this),this.child!=null)for(var g=this.child.getNodes(),s=0;si?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(h+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>h?(this.rect.y-=(this.labelHeight-h)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(h+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var i=this.rect.x;i>r.WORLD_BOUNDARY?i=r.WORLD_BOUNDARY:i<-r.WORLD_BOUNDARY&&(i=-r.WORLD_BOUNDARY);var h=this.rect.y;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var g=new f(i,h),s=t.inverseTransformPoint(g);this.setLocation(s.x,s.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},E.exports=e}),(function(E,w,N){"use strict";var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,E.exports=l}),(function(E,w,N){"use strict";function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(0),r=N(7),n=N(3),f=N(1),e=N(13),c=N(12),t=N(11);function i(g,s,L){u.call(this,L),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,s!=null&&s instanceof r?this.graphManager=s:s!=null&&s instanceof Layout&&(this.graphManager=s.graphManager)}i.prototype=Object.create(u.prototype);for(var h in u)i[h]=u[h];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(g,s,L){if(s==null&&L==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var p=g;if(!(this.getNodes().indexOf(s)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(!(s.owner==L.owner&&s.owner==this))throw"Both owners must be this graph!";return s.owner!=L.owner?null:(p.source=s,p.target=L,p.isInterGraph=!1,this.getEdges().push(p),s.edges.push(p),L!=s&&L.edges.push(p),p)}},i.prototype.remove=function(g){var s=g;if(g instanceof n){if(s==null)throw"Node is null!";if(!(s.owner!=null&&s.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=s.edges.slice(),y,p=L.length,C=0;C-1&&b>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(A,1),y.target!=y.source&&y.target.edges.splice(b,1);var R=y.source.owner.getEdges().indexOf(y);if(R==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var g=l.MAX_VALUE,s=l.MAX_VALUE,L,y,p,C=this.getNodes(),R=C.length,A=0;AL&&(g=L),s>y&&(s=y)}return g==l.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?p=C[0].getParent().paddingLeft:p=this.margin,this.left=s-p,this.top=g-p,new c(this.left,this.top))},i.prototype.updateBounds=function(g){for(var s=l.MAX_VALUE,L=-l.MAX_VALUE,y=l.MAX_VALUE,p=-l.MAX_VALUE,C,R,A,b,W,G=this.nodes,J=G.length,x=0;xC&&(s=C),LA&&(y=A),pC&&(s=C),LA&&(y=A),p=this.nodes.length){var J=0;L.forEach(function(x){x.owner==g&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},E.exports=i}),(function(E,w,N){"use strict";var u,l=N(1);function a(r){u=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),f=this.add(r,n);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,n,f,e,c){if(f==null&&e==null&&c==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}else{c=f,e=n,f=r;var t=e.getOwner(),i=c.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==i)return f.isInterGraph=!1,t.add(f,e,c);if(f.isInterGraph=!0,f.source=e,f.target=c,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof u){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(n==this.rootGraph||n.parent!=null&&n.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(n.getEdges());for(var e,c=f.length,t=0;t=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var c=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(c=1);var t=c*n[0],i=n[1]/c;n[0]t)return n[0]=f,n[1]=h,n[2]=c,n[3]=G,!1;if(ec)return n[0]=i,n[1]=e,n[2]=b,n[3]=t,!1;if(fc?(n[0]=s,n[1]=L,o=!0):(n[0]=g,n[1]=h,o=!0):d===v&&(f>c?(n[0]=i,n[1]=h,o=!0):(n[0]=y,n[1]=L,o=!0)),-T===v?c>f?(n[2]=W,n[3]=G,m=!0):(n[2]=b,n[3]=A,m=!0):T===v&&(c>f?(n[2]=R,n[3]=A,m=!0):(n[2]=J,n[3]=G,m=!0)),o&&m)return!1;if(f>c?e>t?(D=this.getCardinalDirection(d,v,4),O=this.getCardinalDirection(T,v,2)):(D=this.getCardinalDirection(-d,v,3),O=this.getCardinalDirection(-T,v,1)):e>t?(D=this.getCardinalDirection(-d,v,1),O=this.getCardinalDirection(-T,v,3)):(D=this.getCardinalDirection(d,v,2),O=this.getCardinalDirection(T,v,4)),!o)switch(D){case 1:S=h,P=f+-C/v,n[0]=P,n[1]=S;break;case 2:P=y,S=e+p*v,n[0]=P,n[1]=S;break;case 3:S=L,P=f+C/v,n[0]=P,n[1]=S;break;case 4:P=s,S=e+-p*v,n[0]=P,n[1]=S;break}if(!m)switch(O){case 1:Z=A,I=c+-z/v,n[2]=I,n[3]=Z;break;case 2:I=J,Z=t+x*v,n[2]=I,n[3]=Z;break;case 3:Z=G,I=c+z/v,n[2]=I,n[3]=Z;break;case 4:I=W,Z=t+-x*v,n[2]=I,n[3]=Z;break}}return!1},l.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},l.getIntersection=function(a,r,n,f){if(f==null)return this.getIntersection2(a,r,n);var e=a.x,c=a.y,t=r.x,i=r.y,h=n.x,g=n.y,s=f.x,L=f.y,y=void 0,p=void 0,C=void 0,R=void 0,A=void 0,b=void 0,W=void 0,G=void 0,J=void 0;return C=i-c,A=e-t,W=t*c-e*i,R=L-g,b=h-s,G=s*g-h*L,J=C*b-R*A,J===0?null:(y=(A*G-b*W)/J,p=(R*W-C*G)/J,new u(y,p))},l.angleOfVector=function(a,r,n,f){var e=void 0;return a!==n?(e=Math.atan((f-r)/(n-a)),n=0){var L=(-h+Math.sqrt(h*h-4*i*g))/(2*i),y=(-h-Math.sqrt(h*h-4*i*g))/(2*i),p=null;return L>=0&&L<=1?[L]:y>=0&&y<=1?[y]:p}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,E.exports=l}),(function(E,w,N){"use strict";function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},E.exports=u}),(function(E,w,N){"use strict";function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function e(c,t){for(var i=0;i"u"?"undefined":u(a);return a==null||r!="object"&&r!="function"},E.exports=l}),(function(E,w,N){"use strict";function u(h){if(Array.isArray(h)){for(var g=0,s=Array(h.length);g0&&g;){for(C.push(A[0]);C.length>0&&g;){var b=C[0];C.splice(0,1),p.add(b);for(var W=b.getEdges(),y=0;y-1&&A.splice(z,1)}p=new Set,R=new Map}}return h},i.prototype.createDummyNodesForBendpoints=function(h){for(var g=[],s=h.source,L=this.graphManager.calcLowestCommonAncestor(h.source,h.target),y=0;y0){for(var L=this.edgeToDummyNodes.get(s),y=0;y=0&&g.splice(G,1);var J=R.getNeighborsList();J.forEach(function(o){if(s.indexOf(o)<0){var m=L.get(o),d=m-1;d==1&&b.push(o),L.set(o,d)}})}s=s.concat(b),(g.length==1||g.length==2)&&(y=!0,p=g[0])}return p},i.prototype.setGraphManager=function(h){this.graphManager=h},E.exports=i}),(function(E,w,N){"use strict";function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},E.exports=u}),(function(E,w,N){"use strict";var u=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},l.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},l.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},l.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},l.prototype.inverseTransformPoint=function(a){var r=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},E.exports=l}),(function(E,w,N){"use strict";function u(t){if(Array.isArray(t)){for(var i=0,h=Array(t.length);ia.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),i,h=0;h0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h,g,s,L,y=this.getAllNodes(),p;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),p=new Set,h=0;hC||p>C)&&(t.gravitationForceX=-this.gravityConstant*s,t.gravitationForceY=-this.gravityConstant*L)):(C=i.getEstimatedSize()*this.compoundGravityRangeFactor,(y>C||p>C)&&(t.gravitationForceX=-this.gravityConstant*s*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*L*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=y.length||C>=y[0].length)){for(var R=0;Re}}]),n})();E.exports=r}),(function(E,w,N){"use strict";function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Dt){var Nt=function $t(Rt){if(Rt.length==0)return 0;for(var Xt=[],zt=0;zt0;)Nt.push(0);return Nt})(this.n),n=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(this.m),f=!0,e=!0,c=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),i=0;i=0;v--)if(this.s[v]!==0){for(var D=v+1;D=0;F--){if((function(Dt,Nt){return Dt&&Nt})(F0;){var Q=void 0,Ut=void 0;for(Q=m-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(r[Q])<=St+Lt*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){r[Q]=0;break}if(Q===m-2)Ut=4;else{var Mt=void 0;for(Mt=m-1;Mt>=Q&&Mt!==Q;Mt--){var at=(Mt!==m?Math.abs(r[Mt]):0)+(Mt!==Q+1?Math.abs(r[Mt-1]):0);if(Math.abs(this.s[Mt])<=St+Lt*at){this.s[Mt]=0;break}}Mt===Q?Ut=3:Mt===m-1?Ut=1:(Ut=2,Q=Mt)}switch(Q++,Ut){case 1:{var et=r[m-2];r[m-2]=0;for(var pt=m-2;pt>=Q;pt--){var mt=u.hypot(this.s[pt],et),Ct=this.s[pt]/mt,Et=et/mt;if(this.s[pt]=mt,pt!==Q&&(et=-Et*r[pt-1],r[pt-1]=Ct*r[pt-1]),e)for(var Tt=0;Tt=this.s[Q+1]);){var lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=lt,e&&QMath.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function r(n,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=n,this.sequence2=f,this.match_score=e,this.mismatch_penalty=c,this.gap_penalty=t,this.iMax=n.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var i=0;i=0;n--){var f=this.listeners[n];f.event===a&&f.callback===r&&this.listeners.splice(n,1)}},l.emit=function(a,r){for(var n=0;n{(function(w,N){typeof ie=="object"&&typeof Ne=="object"?Ne.exports=N(Te()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof ie=="object"?ie.coseBase=N(Te()):w.coseBase=N(w.layoutBase)})(ie,function(E){return(()=>{"use strict";var w={45:((a,r,n)=>{var f={};f.layoutBase=n(551),f.CoSEConstants=n(806),f.CoSEEdge=n(767),f.CoSEGraph=n(880),f.CoSEGraphManager=n(578),f.CoSELayout=n(765),f.CoSENode=n(991),f.ConstraintHandler=n(902),a.exports=f}),806:((a,r,n)=>{var f=n(551).FDLayoutConstants;function e(){}for(var c in f)e[c]=f[c];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e}),767:((a,r,n)=>{var f=n(551).FDLayoutEdge;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),880:((a,r,n)=>{var f=n(551).LGraph;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),578:((a,r,n)=>{var f=n(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),765:((a,r,n)=>{var f=n(551).FDLayout,e=n(578),c=n(880),t=n(991),i=n(767),h=n(806),g=n(902),s=n(551).FDLayoutConstants,L=n(551).LayoutConstants,y=n(551).Point,p=n(551).PointD,C=n(551).DimensionD,R=n(551).Layout,A=n(551).Integer,b=n(551).IGeometry,W=n(551).LGraph,G=n(551).Transform,J=n(551).LinkedList;function x(){f.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(f.prototype);for(var z in f)x[z]=f[z];x.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new c(null,this.graphManager,o)},x.prototype.newNode=function(o){return new t(this.graphManager,o)},x.prototype.newEdge=function(o){return new i(null,null,o)},x.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var o=L.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return m.has(D)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(T){return m.has(T)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(v){return o.has(v)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,T=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,T),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},d=0;d0&&this.updateDisplacements();for(var d=0;d0&&(T.fixedNodeWeight=D)}}if(this.constraints.relativePlacementConstraint){var O=new Map,P=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){o.fixedNodesOnHorizontal.add(M),o.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var S=this.constraints.alignmentConstraint.vertical,d=0;d=2*M.length/3;K--)Y=Math.floor(Math.random()*(K+1)),X=M[K],M[K]=M[Y],M[Y]=X;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;o.nodesInRelativeHorizontal.includes(Y)||(o.nodesInRelativeHorizontal.push(Y),o.nodeToRelativeConstraintMapHorizontal.set(Y,[]),o.dummyToNodeForVerticalAlignment.has(Y)?o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(Y).getCenterX())),o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:X,gap:M.gap}),o.nodeToRelativeConstraintMapHorizontal.get(X).push({left:Y,gap:M.gap})}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;o.nodesInRelativeVertical.includes(K)||(o.nodesInRelativeVertical.push(K),o.nodeToRelativeConstraintMapVertical.set(K,[]),o.dummyToNodeForHorizontalAlignment.has(K)?o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(K).getCenterY())),o.nodesInRelativeVertical.includes(st)||(o.nodesInRelativeVertical.push(st),o.nodeToRelativeConstraintMapVertical.set(st,[]),o.dummyToNodeForHorizontalAlignment.has(st)?o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(st)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(st).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(K).push({bottom:st,gap:M.gap}),o.nodeToRelativeConstraintMapVertical.get(st).push({top:K,gap:M.gap})}});else{var Z=new Map,tt=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;Z.has(Y)?Z.get(Y).push(X):Z.set(Y,[X]),Z.has(X)?Z.get(X).push(Y):Z.set(X,[Y])}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;tt.has(K)?tt.get(K).push(st):tt.set(K,[st]),tt.has(st)?tt.get(st).push(K):tt.set(st,[K])}});var F=function(Y,X){var K=[],st=[],Lt=new J,St=new Set,Q=0;return Y.forEach(function(Ut,Mt){if(!St.has(Mt)){K[Q]=[],st[Q]=!1;var at=Mt;for(Lt.push(at),St.add(at),K[Q].push(at);Lt.length!=0;){at=Lt.shift(),X.has(at)&&(st[Q]=!0);var et=Y.get(at);et.forEach(function(pt){St.has(pt)||(Lt.push(pt),St.add(pt),K[Q].push(pt))})}Q++}}),{components:K,isFixed:st}},_=F(Z,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=_.components,this.fixedComponentsOnHorizontal=_.isFixed;var B=F(tt,o.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var M=o.idToNodeMap.get(B.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d1){var P;for(P=0;PT&&(T=Math.floor(O.y)),D=Math.floor(O.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(L.WORLD_CENTER_X-O.x/2,L.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(o,m,d){var T=Math.max(this.maxDiagonalInTree(o),h.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,T);var v=W.calculateBounds(o),D=new G;D.setDeviceOrgX(v.getMinX()),D.setDeviceOrgY(v.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var O=0;O1;){var K=X[0];X.splice(0,1);var st=F.indexOf(K);st>=0&&F.splice(st,1),M--,_--}m!=null?Y=(F.indexOf(X[0])+1)%M:Y=0;for(var Lt=Math.abs(T-d)/_,St=Y;B!=_;St=++St%M){var Q=F[St].getOtherEnd(o);if(Q!=m){var Ut=(d+B*Lt)%360,Mt=(Ut+Lt)%360;x.branchRadialLayout(Q,o,Ut,Mt,v+D,D),B++}}},x.maxDiagonalInTree=function(o){for(var m=A.MIN_VALUE,d=0;dm&&(m=v)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],T=this.graphManager.getAllNodes(),v=0;v"u"&&(m[P]=[]),m[P]=m[P].concat(D)}Object.keys(m).forEach(function(S){if(m[S].length>1){var I="DummyCompound_"+S;o.memberGroups[I]=m[S];var Z=m[S][0].getParent(),tt=new t(o.graphManager);tt.id=I,tt.paddingLeft=Z.paddingLeft||0,tt.paddingRight=Z.paddingRight||0,tt.paddingBottom=Z.paddingBottom||0,tt.paddingTop=Z.paddingTop||0,o.idToDummyNode[I]=tt;var F=o.getGraphManager().add(o.newGraph(),tt),_=Z.getChild();_.add(tt);for(var B=0;Bv?(T.rect.x-=(T.labelWidth-v)/2,T.setWidth(T.labelWidth),T.labelMarginLeft=(T.labelWidth-v)/2):T.labelPosHorizontal=="right"&&T.setWidth(v+T.labelWidth)),T.labelHeight&&(T.labelPosVertical=="top"?(T.rect.y-=T.labelHeight,T.setHeight(D+T.labelHeight),T.labelMarginTop=T.labelHeight):T.labelPosVertical=="center"&&T.labelHeight>D?(T.rect.y-=(T.labelHeight-D)/2,T.setHeight(T.labelHeight),T.labelMarginTop=(T.labelHeight-D)/2):T.labelPosVertical=="bottom"&&T.setHeight(D+T.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],d=m.id,T=m.paddingLeft,v=m.paddingTop,D=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,T,v,D,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var T=o.idToDummyNode[d],v=T.paddingLeft,D=T.paddingTop,O=T.labelMarginLeft,P=T.labelMarginTop;o.adjustLocations(m[d],T.rect.x,T.rect.y,v,D,O,P)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=o.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var T=d.getNodes(),v=0;v0)return this.toBeTiled[m]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){for(var m=o.id,d=o.getEdges(),T=0,v=0;vZ&&(Z=F.rect.height)}d+=Z+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var d=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(T){var v=m[T];if(d.tiledMemberPack[T]=d.tileNodes(o[T],v.paddingLeft+v.paddingRight),v.rect.width=d.tiledMemberPack[T].width,v.rect.height=d.tiledMemberPack[T].height,v.setCenter(d.tiledMemberPack[T].centerX,d.tiledMemberPack[T].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var D=v.rect.width,O=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(D+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>D?(v.rect.x-=(v.labelWidth-D)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-D)/2):v.labelPosHorizontal=="right"&&v.setWidth(D+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(O+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>O?(v.rect.y-=(v.labelHeight-O)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-O)/2):v.labelPosVertical=="bottom"&&v.setHeight(O+v.labelHeight))}})},x.prototype.tileNodes=function(o,m){var d=this.tileNodesByFavoringDim(o,m,!0),T=this.tileNodesByFavoringDim(o,m,!1),v=this.getOrgRatio(d),D=this.getOrgRatio(T),O;return DP&&(P=B.getWidth())});var S=D/v,I=O/v,Z=Math.pow(d-T,2)+4*(S+T)*(I+d)*v,tt=(T-d+Math.sqrt(Z))/(2*(S+T)),F;m?(F=Math.ceil(tt),F==tt&&F++):F=Math.floor(tt);var _=F*(S+T)-T;return P>_&&(_=P),_+=T*2,_},x.prototype.tileNodesByFavoringDim=function(o,m,d){var T=h.TILING_PADDING_VERTICAL,v=h.TILING_PADDING_HORIZONTAL,D=h.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:T,horizontalPadding:v,centerX:0,centerY:0};D&&(O.idealRowWidth=this.calcIdealRowWidth(o,d));var P=function(M){return M.rect.width*M.rect.height},S=function(M,Y){return P(Y)-P(M)};o.sort(function(B,M){var Y=S;return O.idealRowWidth?(Y=D,Y(B.id,M.id)):Y(B,M)});for(var I=0,Z=0,tt=0;tt0&&(O+=o.horizontalPadding),o.rowWidth[d]=O,o.width0&&(P+=o.verticalPadding);var S=0;P>o.rowHeight[d]&&(S=o.rowHeight[d],o.rowHeight[d]=P,S=o.rowHeight[d]-S),o.height+=S,o.rows[d].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,d=Number.MAX_VALUE,T=0;Td&&(m=T,d=o.rowWidth[T]);return m},x.prototype.canAddHorizontal=function(o,m,d){if(o.idealRowWidth){var T=o.rows.length-1,v=o.rowWidth[T];return v+m+o.horizontalPadding<=o.idealRowWidth}var D=this.getShortestRowIndex(o);if(D<0)return!0;var O=o.rowWidth[D];if(O+o.horizontalPadding+m<=o.width)return!0;var P=0;o.rowHeight[D]0&&(P=d+o.verticalPadding-o.rowHeight[D]);var S;o.width-O>=m+o.horizontalPadding?S=(o.height+P)/(O+m+o.horizontalPadding):S=(o.height+P)/o.width,P=d+o.verticalPadding;var I;return o.widthD&&m!=d){T.splice(-1,1),o.rows[d].push(v),o.rowWidth[m]=o.rowWidth[m]-D,o.rowWidth[d]=o.rowWidth[d]+D,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,P=0;PO&&(O=T[P].height);m>0&&(O+=o.verticalPadding);var S=o.rowHeight[m]+o.rowHeight[d];o.rowHeight[m]=O,o.rowHeight[d]0)for(var _=v;_<=D;_++)F[0]+=this.grid[_][O-1].length+this.grid[_][O].length-1;if(D0)for(var _=O;_<=P;_++)F[3]+=this.grid[v-1][_].length+this.grid[v][_].length-1;for(var B=A.MAX_VALUE,M,Y,X=0;X{var f=n(551).FDLayoutNode,e=n(551).IMath;function c(i,h,g,s){f.call(this,i,h,g,s)}c.prototype=Object.create(f.prototype);for(var t in f)c[t]=f[t];c.prototype.calculateDisplacement=function(){var i=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementX=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementY=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},c.prototype.propogateDisplacementToChildren=function(i,h){for(var g=this.getChild().getNodes(),s,L=0;L{function f(g){if(Array.isArray(g)){for(var s=0,L=Array(g.length);s0){var dt=0;it.forEach(function(lt){V=="horizontal"?(q.set(lt,y.has(lt)?p[y.get(lt)]:k.get(lt)),dt+=q.get(lt)):(q.set(lt,y.has(lt)?C[y.get(lt)]:k.get(lt)),dt+=q.get(lt))}),dt=dt/it.length,ot.forEach(function(lt){$.has(lt)||q.set(lt,dt)})}else{var nt=0;ot.forEach(function(lt){V=="horizontal"?nt+=y.has(lt)?p[y.get(lt)]:k.get(lt):nt+=y.has(lt)?C[y.get(lt)]:k.get(lt)}),nt=nt/ot.length,ot.forEach(function(lt){q.set(lt,nt)})}});for(var rt=function(){var it=gt.shift(),dt=H.get(it);dt.forEach(function(nt){if(q.get(nt.id)lt&&(lt=Xt),ztFt&&(Ft=zt)}}catch(_t){Vt=!0,Dt=_t}finally{try{!xt&&Nt.return&&Nt.return()}finally{if(Vt)throw Dt}}var ce=(dt+lt)/2-(nt+Ft)/2,qt=!0,Jt=!1,Kt=void 0;try{for(var Qt=ot[Symbol.iterator](),oe;!(qt=(oe=Qt.next()).done);qt=!0){var jt=oe.value;q.set(jt,q.get(jt)+ce)}}catch(_t){Jt=!0,Kt=_t}finally{try{!qt&&Qt.return&&Qt.return()}finally{if(Jt)throw Kt}}})}return q},z=function(H){var V=0,$=0,k=0,j=0;if(H.forEach(function(ht){ht.left?p[y.get(ht.left)]-p[y.get(ht.right)]>=0?V++:$++:C[y.get(ht.top)]-C[y.get(ht.bottom)]>=0?k++:j++}),V>$&&k>j)for(var ut=0;ut$)for(var ft=0;ftj)for(var q=0;q1)s.fixedNodeConstraint.forEach(function(U,H){T[H]=[U.position.x,U.position.y],v[H]=[p[y.get(U.nodeId)],C[y.get(U.nodeId)]]}),D=!0;else if(s.alignmentConstraint)(function(){var U=0;if(s.alignmentConstraint.vertical){for(var H=s.alignmentConstraint.vertical,V=function(q){var ht=new Set;H[q].forEach(function(vt){ht.add(vt)});var gt=new Set([].concat(f(ht)).filter(function(vt){return P.has(vt)})),rt=void 0;gt.size>0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).x,H[q].forEach(function(vt){T[U]=[rt,C[y.get(vt)]],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},$=0;$0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).y,k[q].forEach(function(vt){T[U]=[p[y.get(vt)],rt],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},ut=0;uttt&&(tt=Z[_].length,F=_);if(tt0){var Ct={x:0,y:0};s.fixedNodeConstraint.forEach(function(U,H){var V={x:p[y.get(U.nodeId)],y:C[y.get(U.nodeId)]},$=U.position,k=G($,V);Ct.x+=k.x,Ct.y+=k.y}),Ct.x/=s.fixedNodeConstraint.length,Ct.y/=s.fixedNodeConstraint.length,p.forEach(function(U,H){p[H]+=Ct.x}),C.forEach(function(U,H){C[H]+=Ct.y}),s.fixedNodeConstraint.forEach(function(U){p[y.get(U.nodeId)]=U.position.x,C[y.get(U.nodeId)]=U.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Et=s.alignmentConstraint.vertical,Tt=function(H){var V=new Set;Et[H].forEach(function(j){V.add(j)});var $=new Set([].concat(f(V)).filter(function(j){return P.has(j)})),k=void 0;$.size>0?k=p[y.get($.values().next().value)]:k=J(V).x,V.forEach(function(j){P.has(j)||(p[y.get(j)]=k)})},Ot=0;Ot0?k=C[y.get($.values().next().value)]:k=J(V).y,V.forEach(function(j){P.has(j)||(C[y.get(j)]=k)})},Pt=0;Pt{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(45);return l})()})});var Je=pe((ne,Ce)=>{(function(w,N){typeof ne=="object"&&typeof Ce=="object"?Ce.exports=N(Le()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof ne=="object"?ne.cytoscapeFcose=N(Le()):w.cytoscapeFcose=N(w.coseBase)})(ne,function(E){return(()=>{"use strict";var w={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var n=arguments.length,f=Array(n>1?n-1:0),e=1;e{var f=(function(){function t(i,h){var g=[],s=!0,L=!1,y=void 0;try{for(var p=i[Symbol.iterator](),C;!(s=(C=p.next()).done)&&(g.push(C.value),!(h&&g.length===h));s=!0);}catch(R){L=!0,y=R}finally{try{!s&&p.return&&p.return()}finally{if(L)throw y}}return g}return function(i,h){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,h);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=n(140).layoutBase.LinkedList,c={};c.getTopMostNodes=function(t){for(var i={},h=0;h0&&D.merge(I)});for(var O=0;O1){C=y[0],R=C.connectedEdges().length,y.forEach(function(v){v.connectedEdges().length0&&g.set("dummy"+(g.size+1),W),G},c.relocateComponent=function(t,i,h){if(!h.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(h.quality=="draft"){var p=!0,C=!1,R=void 0;try{for(var A=i.nodeIndexes[Symbol.iterator](),b;!(p=(b=A.next()).done);p=!0){var W=b.value,G=f(W,2),J=G[0],x=G[1],z=h.cy.getElementById(J);if(z){var o=z.boundingBox(),m=i.xCoords[x]-o.w/2,d=i.xCoords[x]+o.w/2,T=i.yCoords[x]-o.h/2,v=i.yCoords[x]+o.h/2;ms&&(s=d),Ty&&(y=v)}}}catch(I){C=!0,R=I}finally{try{!p&&A.return&&A.return()}finally{if(C)throw R}}var D=t.x-(s+g)/2,O=t.y-(y+L)/2;i.xCoords=i.xCoords.map(function(I){return I+D}),i.yCoords=i.yCoords.map(function(I){return I+O})}else{Object.keys(i).forEach(function(I){var Z=i[I],tt=Z.getRect().x,F=Z.getRect().x+Z.getRect().width,_=Z.getRect().y,B=Z.getRect().y+Z.getRect().height;tts&&(s=F),_y&&(y=B)});var P=t.x-(s+g)/2,S=t.y-(y+L)/2;Object.keys(i).forEach(function(I){var Z=i[I];Z.setCenter(Z.getCenterX()+P,Z.getCenterY()+S)})}}},c.calcBoundingBox=function(t,i,h,g){for(var s=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,C=void 0,R=void 0,A=void 0,b=void 0,W=t.descendants().not(":parent"),G=W.length,J=0;JC&&(s=C),LA&&(y=A),p{var f=n(548),e=n(140).CoSELayout,c=n(140).CoSENode,t=n(140).layoutBase.PointD,i=n(140).layoutBase.DimensionD,h=n(140).layoutBase.LayoutConstants,g=n(140).layoutBase.FDLayoutConstants,s=n(140).CoSEConstants,L=function(p,C){var R=p.cy,A=p.eles,b=A.nodes(),W=A.edges(),G=void 0,J=void 0,x=void 0,z={};p.randomize&&(G=C.nodeIndexes,J=C.xCoords,x=C.yCoords);var o=function(I){return typeof I=="function"},m=function(I,Z){return o(I)?I(Z):I},d=f.calcParentsWithoutChildren(R,A),T=function S(I,Z,tt,F){for(var _=Z.length,B=0;B<_;B++){var M=Z[B],Y=null;M.intersection(d).length==0&&(Y=M.children());var X=void 0,K=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())X=I.add(new c(tt.graphManager,new t(J[G.get(M.id())]-K.w/2,x[G.get(M.id())]-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else{var st=f.calcBoundingBox(M,J,x,G);M.intersection(d).length==0?X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(st.width,st.height))):X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(parseFloat(K.w),parseFloat(K.h))))}else X=I.add(new c(tt.graphManager,new t(M.position("x")-K.w/2,M.position("y")-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else X=I.add(new c(this.graphManager));if(X.id=M.data("id"),X.nodeRepulsion=m(F.nodeRepulsion,M),X.paddingLeft=parseInt(M.css("padding")),X.paddingTop=parseInt(M.css("padding")),X.paddingRight=parseInt(M.css("padding")),X.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(X.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=M.css("text-valign"),X.labelPosHorizontal=M.css("text-halign")),z[M.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),Y!=null&&Y.length>0){var Lt=void 0;Lt=tt.getGraphManager().add(tt.newGraph(),X),S(Lt,Y,tt,F)}}},v=function(I,Z,tt){for(var F=0,_=0,B=0;B0?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=F/_:o(p.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=p.idealEdgeLength,s.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},D=function(I,Z){Z.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Z.fixedNodeConstraint),Z.alignmentConstraint&&(I.constraints.alignmentConstraint=Z.alignmentConstraint),Z.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Z.relativePlacementConstraint)};p.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.nestingFactor),p.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=p.gravity),p.numIter!=null&&(s.MAX_ITERATIONS=g.MAX_ITERATIONS=p.numIter),p.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=p.gravityRange),p.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.gravityCompound),p.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.gravityRangeCompound),p.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.initialEnergyOnIncremental),p.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=p.tilingCompareBy),p.quality=="proof"?h.QUALITY=2:h.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=p.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!p.randomize,s.ANIMATE=g.ANIMATE=h.ANIMATE=p.animate,s.TILE=p.tile,s.TILING_PADDING_VERTICAL=typeof p.tilingPaddingVertical=="function"?p.tilingPaddingVertical.call():p.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof p.tilingPaddingHorizontal=="function"?p.tilingPaddingHorizontal.call():p.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!p.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=p.uniformNodeDimensions,p.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),p.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),p.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),p.step=="all"&&(p.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),p.fixedNodeConstraint||p.alignmentConstraint||p.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,P=O.newGraphManager();return T(P.addRoot(),f.getTopMostNodes(b),O,p),v(O,P,W),D(O,p),O.runLayout(),z};a.exports={coseLayout:L}}),212:((a,r,n)=>{var f=(function(){function p(C,R){for(var A=0;A0)if(v){var P=t.getTopMostNodes(A.eles.nodes());if(o=t.connectComponents(b,A.eles,P),o.forEach(function(at){var et=at.boundingBox();m.push({x:et.x1+et.w/2,y:et.y1+et.h/2})}),A.randomize&&o.forEach(function(at){A.eles=at,G.push(h(A))}),A.quality=="default"||A.quality=="proof"){var S=b.collection();if(A.tile){var I=new Map,Z=[],tt=[],F=0,_={nodeIndexes:I,xCoords:Z,yCoords:tt},B=[];if(o.forEach(function(at,et){at.edges().length==0&&(at.nodes().forEach(function(pt,mt){S.merge(at.nodes()[mt]),pt.isParent()||(_.nodeIndexes.set(at.nodes()[mt].id(),F++),_.xCoords.push(at.nodes()[0].position().x),_.yCoords.push(at.nodes()[0].position().y))}),B.push(et))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),o.push(S),G.push(_);for(var Y=B.length-1;Y>=0;Y--)o.splice(B[Y],1),G.splice(B[Y],1),m.splice(B[Y],1)}}o.forEach(function(at,et){A.eles=at,z.push(s(A,G[et])),t.relocateComponent(m[et],z[et],A)})}else o.forEach(function(at,et){t.relocateComponent(m[et],G[et],A)});var X=new Set;if(o.length>1){var K=[],st=W.filter(function(at){return at.css("display")=="none"});o.forEach(function(at,et){var pt=void 0;if(A.quality=="draft"&&(pt=G[et].nodeIndexes),at.nodes().not(st).length>0){var mt={};mt.edges=[],mt.nodes=[];var Ct=void 0;at.nodes().not(st).forEach(function(Et){if(A.quality=="draft")if(!Et.isParent())Ct=pt.get(Et.id()),mt.nodes.push({x:G[et].xCoords[Ct]-Et.boundingbox().w/2,y:G[et].yCoords[Ct]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var Tt=t.calcBoundingBox(Et,G[et].xCoords,G[et].yCoords,pt);mt.nodes.push({x:Tt.topLeftX,y:Tt.topLeftY,width:Tt.width,height:Tt.height})}else z[et][Et.id()]&&mt.nodes.push({x:z[et][Et.id()].getLeft(),y:z[et][Et.id()].getTop(),width:z[et][Et.id()].getWidth(),height:z[et][Et.id()].getHeight()})}),at.edges().forEach(function(Et){var Tt=Et.source(),Ot=Et.target();if(Tt.css("display")!="none"&&Ot.css("display")!="none")if(A.quality=="draft"){var It=pt.get(Tt.id()),Wt=pt.get(Ot.id()),Pt=[],Yt=[];if(Tt.isParent()){var bt=t.calcBoundingBox(Tt,G[et].xCoords,G[et].yCoords,pt);Pt.push(bt.topLeftX+bt.width/2),Pt.push(bt.topLeftY+bt.height/2)}else Pt.push(G[et].xCoords[It]),Pt.push(G[et].yCoords[It]);if(Ot.isParent()){var U=t.calcBoundingBox(Ot,G[et].xCoords,G[et].yCoords,pt);Yt.push(U.topLeftX+U.width/2),Yt.push(U.topLeftY+U.height/2)}else Yt.push(G[et].xCoords[Wt]),Yt.push(G[et].yCoords[Wt]);mt.edges.push({startX:Pt[0],startY:Pt[1],endX:Yt[0],endY:Yt[1]})}else z[et][Tt.id()]&&z[et][Ot.id()]&&mt.edges.push({startX:z[et][Tt.id()].getCenterX(),startY:z[et][Tt.id()].getCenterY(),endX:z[et][Ot.id()].getCenterX(),endY:z[et][Ot.id()].getCenterY()})}),mt.nodes.length>0&&(K.push(mt),X.add(et))}});var Lt=T.packComponents(K,A.randomize).shifts;if(A.quality=="draft")G.forEach(function(at,et){var pt=at.xCoords.map(function(Ct){return Ct+Lt[et].dx}),mt=at.yCoords.map(function(Ct){return Ct+Lt[et].dy});at.xCoords=pt,at.yCoords=mt});else{var St=0;X.forEach(function(at){Object.keys(z[at]).forEach(function(et){var pt=z[at][et];pt.setCenter(pt.getCenterX()+Lt[St].dx,pt.getCenterY()+Lt[St].dy)}),St++})}}}else{var D=A.eles.boundingBox();if(m.push({x:D.x1+D.w/2,y:D.y1+D.h/2}),A.randomize){var O=h(A);G.push(O)}A.quality=="default"||A.quality=="proof"?(z.push(s(A,G[0])),t.relocateComponent(m[0],z[0],A)):t.relocateComponent(m[0],G[0],A)}var Q=function(et,pt){if(A.quality=="default"||A.quality=="proof"){typeof et=="number"&&(et=pt);var mt=void 0,Ct=void 0,Et=et.data("id");return z.forEach(function(Ot){Et in Ot&&(mt={x:Ot[Et].getRect().getCenterX(),y:Ot[Et].getRect().getCenterY()},Ct=Ot[Et])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?mt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(mt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?mt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(mt.y-=Ct.labelHeight/2))),mt==null&&(mt={x:et.position("x"),y:et.position("y")}),{x:mt.x,y:mt.y}}else{var Tt=void 0;return G.forEach(function(Ot){var It=Ot.nodeIndexes.get(et.id());It!=null&&(Tt={x:Ot.xCoords[It],y:Ot.yCoords[It]})}),Tt==null&&(Tt={x:et.position("x"),y:et.position("y")}),{x:Tt.x,y:Tt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Ut=t.calcParentsWithoutChildren(b,W),Mt=W.filter(function(at){return at.css("display")=="none"});A.eles=W.not(Mt),W.nodes().not(":parent").not(Mt).layoutPositions(R,A,Q),Ut.length>0&&Ut.forEach(function(at){at.position(Q(at))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),p})();a.exports=y}),657:((a,r,n)=>{var f=n(548),e=n(140).layoutBase.Matrix,c=n(140).layoutBase.SVD,t=function(h){var g=h.cy,s=h.eles,L=s.nodes(),y=s.nodes(":parent"),p=new Map,C=new Map,R=new Map,A=[],b=[],W=[],G=[],J=[],x=[],z=[],o=[],m=void 0,d=void 0,T=1e8,v=1e-9,D=h.piTol,O=h.samplingType,P=h.nodeSeparation,S=void 0,I=function(){for(var V=0,$=0,k=!1;$=ut;){q=j[ut++];for(var ot=A[q],it=0;itrt&&(rt=J[nt],vt=nt)}return vt},tt=function(V){var $=void 0;if(V){$=Math.floor(Math.random()*d),m=$;for(var j=0;j=1)break;rt=gt}for(var ot=0;ot=1)break;rt=gt}for(var dt=0;dt0&&($.isParent()?A[V].push(R.get($.id())):A[V].push($.id()))})});var Ut=function(V){var $=C.get(V),k=void 0;p.get(V).forEach(function(j){g.getElementById(j).isParent()?k=R.get(j):k=j,A[$].push(k),A[C.get(k)].push(V)})},Mt=!0,at=!1,et=void 0;try{for(var pt=p.keys()[Symbol.iterator](),mt;!(Mt=(mt=pt.next()).done);Mt=!0){var Ct=mt.value;Ut(Ct)}}catch(H){at=!0,et=H}finally{try{!Mt&&pt.return&&pt.return()}finally{if(at)throw et}}d=C.size;var Et=void 0;if(d>2){S=d{var f=n(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e}),140:(a=>{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(579);return l})()})});var ir=ur(Je(),1);var Ke={L:"left",R:"right",T:"top",B:"bottom"},je={L:ct(E=>`${E},${E/2} 0,${E} 0,0`,"L"),R:ct(E=>`0,${E/2} ${E},0 ${E},${E}`,"R"),T:ct(E=>`0,0 ${E},0 ${E/2},${E}`,"T"),B:ct(E=>`${E/2},0 ${E},${E} 0,${E}`,"B")},fe={L:ct((E,w)=>E-w+2,"L"),R:ct((E,w)=>E-2,"R"),T:ct((E,w)=>E-w+2,"T"),B:ct((E,w)=>E-2,"B")},dr=ct(function(E){return Ht(E)?E==="L"?"R":"L":E==="T"?"B":"T"},"getOppositeArchitectureDirection"),_e=ct(function(E){let w=E;return w==="L"||w==="R"||w==="T"||w==="B"},"isArchitectureDirection"),Ht=ct(function(E){let w=E;return w==="L"||w==="R"},"isArchitectureDirectionX"),Zt=ct(function(E){let w=E;return w==="T"||w==="B"},"isArchitectureDirectionY"),we=ct(function(E,w){let N=Ht(E)&&Zt(w),u=Zt(E)&&Ht(w);return N||u},"isArchitectureDirectionXY"),vr=ct(function(E){let w=E[0],N=E[1],u=Ht(w)&&Zt(N),l=Zt(w)&&Ht(N);return u||l},"isArchitecturePairXY"),pr=ct(function(E){return E!=="LL"&&E!=="RR"&&E!=="TT"&&E!=="BB"},"isValidArchitectureDirectionPair"),Ae=ct(function(E,w){let N=`${E}${w}`;return pr(N)?N:void 0},"getArchitectureDirectionPair"),yr=ct(function([E,w],N){let u=N[0],l=N[1];return Ht(u)?Zt(l)?[E+(u==="L"?-1:1),w+(l==="T"?1:-1)]:[E+(u==="L"?-1:1),w]:Ht(l)?[E+(l==="L"?1:-1),w+(u==="T"?1:-1)]:[E,w+(u==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mr=ct(function(E){return E==="LT"||E==="TL"?[1,1]:E==="BL"||E==="LB"?[1,-1]:E==="BR"||E==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=ct(function(E,w){return we(E,w)?"bend":Ht(E)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Tr=ct(function(E){return E.type==="service"},"isArchitectureService"),Nr=ct(function(E){return E.type==="junction"},"isArchitectureJunction"),tr=ct(E=>E.data(),"edgeData"),ee=ct(E=>E.data(),"nodeData"),Lr=Re.architecture,er=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ge,this.getAccTitle=Ue,this.setDiagramTitle=He,this.getDiagramTitle=We,this.getAccDescription=Xe,this.setAccDescription=Ye,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(E){this.diagramId=E}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Pe()}addService({id:E,icon:w,in:N,title:u,iconText:l}){if(this.registeredIds[E]!==void 0)throw new Error(`The service id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The service [${E}] cannot be placed within itself`);if(this.registeredIds[N]===void 0)throw new Error(`The service [${E}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[N]==="node")throw new Error(`The service [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"service",icon:w,iconText:l,title:u,edges:[],in:N}}getServices(){return Object.values(this.nodes).filter(Tr)}addJunction({id:E,in:w}){if(this.registeredIds[E]!==void 0)throw new Error(`The junction id [${E}] is already in use by another ${this.registeredIds[E]}`);if(w!==void 0){if(E===w)throw new Error(`The junction [${E}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The junction [${E}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[w]==="node")throw new Error(`The junction [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"junction",edges:[],in:w}}getJunctions(){return Object.values(this.nodes).filter(Nr)}getNodes(){return Object.values(this.nodes)}getNode(E){return this.nodes[E]??null}addGroup({id:E,icon:w,in:N,title:u}){if(this.registeredIds?.[E]!==void 0)throw new Error(`The group id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The group [${E}] cannot be placed within itself`);if(this.registeredIds?.[N]===void 0)throw new Error(`The group [${E}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[N]==="node")throw new Error(`The group [${E}]'s parent is not a group`)}this.registeredIds[E]="group",this.groups[E]={id:E,icon:w,title:u,in:N}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:E,rhsId:w,lhsDir:N,rhsDir:u,lhsInto:l,rhsInto:a,lhsGroup:r,rhsGroup:n,title:f}){if(!_e(N))throw new Error(`Invalid direction given for left hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(N)}`);if(!_e(u))throw new Error(`Invalid direction given for right hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(u)}`);if(this.nodes[E]===void 0&&this.groups[E]===void 0)throw new Error(`The left-hand id [${E}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[w]===void 0&&this.groups[w]===void 0)throw new Error(`The right-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);let e=this.nodes[E].in,c=this.nodes[w].in;if(r&&e&&c&&e==c)throw new Error(`The left-hand id [${E}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&c&&e==c)throw new Error(`The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let t={lhsId:E,lhsDir:N,lhsInto:l,lhsGroup:r,rhsId:w,rhsDir:u,rhsInto:a,rhsGroup:n,title:f};this.edges.push(t),this.nodes[E]&&this.nodes[w]&&(this.nodes[E].edges.push(this.edges[this.edges.length-1]),this.nodes[w].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let E={},w=Object.entries(this.nodes).reduce((n,[f,e])=>(n[f]=e.edges.reduce((c,t)=>{let i=this.getNode(t.lhsId)?.in,h=this.getNode(t.rhsId)?.in;if(i&&h&&i!==h){let g=Er(t.lhsDir,t.rhsDir);g!=="bend"&&(E[i]??={},E[i][h]=g,E[h]??={},E[h][i]=g)}if(t.lhsId===f){let g=Ae(t.lhsDir,t.rhsDir);g&&(c[g]=t.rhsId)}else{let g=Ae(t.rhsDir,t.lhsDir);g&&(c[g]=t.lhsId)}return c},{}),n),{}),N=Object.keys(w)[0],u={[N]:1},l=Object.keys(w).reduce((n,f)=>f===N?n:{...n,[f]:1},{}),a=ct(n=>{let f={[n]:[0,0]},e=[n];for(;e.length>0;){let c=e.shift();if(c){u[c]=1,delete l[c];let t=w[c],[i,h]=f[c];Object.entries(t).forEach(([g,s])=>{u[s]||(f[s]=yr([i,h],g),e.push(s))})}}return f},"BFS"),r=[a(N)];for(;Object.keys(l).length>0;)r.push(a(Object.keys(l)[0]));this.dataStructures={adjList:w,spatialMaps:r,groupAlignments:E}}return this.dataStructures}setElementForId(E,w){this.elements[E]=w}getElementById(E){return this.elements[E]}getConfig(){return Be({...Lr,...Se().architecture})}getConfigField(E){return this.getConfig()[E]}},Cr=ct((E,w)=>{qe(E,w),E.groups.map(N=>w.addGroup(N)),E.services.map(N=>w.addService({...N,type:"service"})),E.junctions.map(N=>w.addJunction({...N,type:"junction"})),E.edges.map(N=>w.addEdge(N))},"populateDb"),rr={parser:{yy:void 0},parse:ct(async E=>{let w=await Qe("architecture",E);ye.debug(w);let N=rr.parser?.yy;if(!(N instanceof er))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Cr(w,N)},"parse")},Ar=ct(E=>` .edge { stroke-width: ${E.archEdgeWidth}; stroke: ${E.archEdgeColor}; @@ -34,4 +34,4 @@ import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-POJVOFU translate(${v*O.width/2}, ${D*O.height/2}) rotate(${-1*v*D*45}, 0, ${T.height/2}) `)}}}}}))},"drawEdges"),Or=ct(async function(E,w,N,u){let a=N.getConfigField("padding")*.75,r=N.getConfigField("fontSize"),f=N.getConfigField("iconSize")/2;await Promise.all(w.nodes().map(async e=>{let c=ee(e);if(c.type==="group"){let{h:t,w:i,x1:h,y1:g}=e.boundingBox(),s=E.append("rect");s.attr("id",`${u}-group-${c.id}`).attr("x",h+f).attr("y",g+f).attr("width",i).attr("height",t).attr("class","node-bkg");let L=E.append("g"),y=h,p=g;if(c.icon){let C=L.append("g");C.html(`${await he(c.icon,{height:a,width:a,fallbackPrefix:ae.prefix})}`),C.attr("transform","translate("+(y+f+1)+", "+(p+f+1)+")"),y+=a,p+=r/2-1-2}if(c.label){let C=L.append("g");await le(C,c.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},se()),C.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),C.attr("transform","translate("+(y+f+4)+", "+(p+f+2)+")")}N.setElementForId(c.id,s)}}))},"drawGroups"),Dr=ct(async function(E,w,N,u){let l=se();for(let a of N){let r=w.append("g"),n=E.getConfigField("iconSize");if(a.title){let t=r.append("g");await le(t,a.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},l),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+n/2+", "+n+")")}let f=r.append("g");if(a.icon)f.html(`${await he(a.icon,{height:n,width:n,fallbackPrefix:ae.prefix})}`);else if(a.iconText){f.html(`${await he("blank",{height:n,width:n,fallbackPrefix:ae.prefix})}`);let h=f.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(Fe(a.iconText,l)),g=parseInt(window.getComputedStyle(h.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;h.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/g)};`)}else f.append("path").attr("class","node-bkg").attr("id",`${u}-node-${a.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);r.attr("id",`${u}-service-${a.id}`).attr("class","architecture-service");let{width:e,height:c}=r.node().getBBox();a.width=e,a.height=c,E.setElementForId(a.id,r)}return 0},"drawServices"),xr=ct(function(E,w,N,u){N.forEach(l=>{let a=w.append("g"),r=E.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${u}-node-${l.id}`).attr("fill-opacity","0").attr("width",r).attr("height",r),a.attr("class","architecture-junction");let{width:f,height:e}=a._groups[0][0].getBBox();a.width=f,a.height=e,E.setElementForId(l.id,a)})},"drawJunctions");Ze([{name:ae.prefix,icons:ae}]);me.use(ir.default);function nr(E,w,N){E.forEach(u=>{w.add({group:"nodes",data:{type:"service",id:u.id,icon:u.icon,label:u.title,parent:u.in,width:N.getConfigField("iconSize"),height:N.getConfigField("iconSize")},classes:"node-service"})})}ct(nr,"addServices");function ar(E,w,N){E.forEach(u=>{w.add({group:"nodes",data:{type:"junction",id:u.id,parent:u.in,width:N.getConfigField("iconSize"),height:N.getConfigField("iconSize")},classes:"node-junction"})})}ct(ar,"addJunctions");function or(E,w){w.nodes().map(N=>{let u=ee(N);if(u.type==="group")return;u.x=N.position().x,u.y=N.position().y,E.getElementById(u.id).attr("transform","translate("+(u.x||0)+","+(u.y||0)+")")})}ct(or,"positionNodes");function sr(E,w){E.forEach(N=>{w.add({group:"nodes",data:{type:"group",id:N.id,icon:N.icon,label:N.title,parent:N.in},classes:"node-group"})})}ct(sr,"addGroups");function hr(E,w){E.forEach(N=>{let{lhsId:u,rhsId:l,lhsInto:a,lhsGroup:r,rhsInto:n,lhsDir:f,rhsDir:e,rhsGroup:c,title:t}=N,i=we(N.lhsDir,N.rhsDir)?"segments":"straight",h={id:`${u}-${l}`,label:t,source:u,sourceDir:f,sourceArrow:a,sourceGroup:r,sourceEndpoint:f==="L"?"0 50%":f==="R"?"100% 50%":f==="T"?"50% 0":"50% 100%",target:l,targetDir:e,targetArrow:n,targetGroup:c,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};w.add({group:"edges",data:h,classes:i})})}ct(hr,"addEdges");function lr(E,w,N){let u=ct((n,f)=>Object.entries(n).reduce((e,[c,t])=>{let i=0,h=Object.entries(t);if(h.length===1)return e[c]=h[0][1],e;for(let g=0;g{let f={},e={};return Object.entries(n).forEach(([c,[t,i]])=>{let h=E.getNode(c)?.in??"default";f[i]??={},f[i][h]??=[],f[i][h].push(c),e[t]??={},e[t][h]??=[],e[t][h].push(c)}),{horiz:Object.values(u(f,"horizontal")).filter(c=>c.length>1),vert:Object.values(u(e,"vertical")).filter(c=>c.length>1)}}),[a,r]=l.reduce(([n,f],{horiz:e,vert:c})=>[[...n,...e],[...f,...c]],[[],[]]);return{horizontal:a,vertical:r}}ct(lr,"getAlignments");function fr(E,w){let N=[],u=ct(a=>`${a[0]},${a[1]}`,"posToStr"),l=ct(a=>a.split(",").map(r=>parseInt(r)),"strToPos");return E.forEach(a=>{let r=Object.fromEntries(Object.entries(a).map(([c,t])=>[u(t),c])),n=[u([0,0])],f={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let c=n.shift();if(c){f[c]=1;let t=r[c];if(t){let i=l(c);Object.entries(e).forEach(([h,g])=>{let s=u([i[0]+g[0],i[1]+g[1]]),L=r[s];L&&!f[s]&&(n.push(s),N.push({[Ke[h]]:L,[Ke[dr(h)]]:t,gap:1.5*w.getConfigField("iconSize")}))})}}}}),N}ct(fr,"getRelativeConstraints");function cr(E,w,N,u,l,{spatialMaps:a,groupAlignments:r}){return new Promise(n=>{let f=Ve("body").append("div").attr("id","cy").attr("style","display:none"),e=me({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${l.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${l.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),sr(N,e),nr(E,e,l),ar(w,e,l),hr(u,e);let c=lr(l,a,r),t=fr(a,l),i=l.getConfigField("iconSize"),h=l.getConfigField("idealEdgeLengthMultiplier")*i,g=.5*i,s=l.getConfigField("edgeElasticity"),L=e.layout({name:"fcose",quality:"proof",randomize:l.getConfigField("randomize"),nodeSeparation:l.getConfigField("nodeSeparation"),numIter:l.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(y){let[p,C]=y.connectedNodes(),{parent:R}=ee(p),{parent:A}=ee(C);return R===A?h:g},edgeElasticity(y){let[p,C]=y.connectedNodes(),{parent:R}=ee(p),{parent:A}=ee(C);return R===A?s:.001},alignmentConstraint:c,relativePlacementConstraint:t});L.one("layoutstop",()=>{function y(p,C,R,A){let b,W,{x:G,y:J}=p,{x,y:z}=C;W=(A-J+(G-R)*(J-z)/(G-x))/Math.sqrt(1+Math.pow((J-z)/(G-x),2)),b=Math.sqrt(Math.pow(A-J,2)+Math.pow(R-G,2)-Math.pow(W,2));let o=Math.sqrt(Math.pow(x-G,2)+Math.pow(z-J,2));b=b/o;let m=(x-G)*(A-J)-(z-J)*(R-G);switch(!0){case m>=0:m=1;break;case m<0:m=-1;break}let d=(x-G)*(R-G)+(z-J)*(A-J);switch(!0){case d>=0:d=1;break;case d<0:d=-1;break}return W=Math.abs(W)*m,b=b*d,{distances:W,weights:b}}ct(y,"getSegmentWeights"),e.startBatch();for(let p of Object.values(e.edges()))if(p.data?.()){let{x:C,y:R}=p.source().position(),{x:A,y:b}=p.target().position();if(C!==A&&R!==b){let W=p.sourceEndpoint(),G=p.targetEndpoint(),{sourceDir:J}=tr(p),[x,z]=Zt(J)?[W.x,G.y]:[G.x,W.y],{weights:o,distances:m}=y(W,G,x,z);p.style("segment-distances",m),p.style("segment-weights",o)}}e.endBatch(),L.run()}),L.run(),e.ready(y=>{ye.info("Ready",y),n(e)})})}ct(cr,"layoutArchitecture");var Ir=ct(async(E,w,N,u)=>{let l=u.db;l.setDiagramId(w);let a=l.getServices(),r=l.getJunctions(),n=l.getGroups(),f=l.getEdges(),e=l.getDataStructures(),c=ze(w),t=c.append("g");t.attr("class","architecture-edges");let i=c.append("g");i.attr("class","architecture-services");let h=c.append("g");h.attr("class","architecture-groups"),await Dr(l,i,a,w),xr(l,i,r,w);let g=await cr(a,r,n,f,l,e);await Mr(t,g,l,w),await Or(h,g,l,w),or(l,g),be(void 0,c,l.getConfigField("padding"),l.getConfigField("useMaxWidth"))},"draw"),Rr={draw:Ir},Wr={parser:rr,get db(){return new er},renderer:Rr,styles:wr};export{Wr as diagram}; -//# sourceMappingURL=architectureDiagram-3BPJPVTR-HJ25IOPZ.min.js.map +//# sourceMappingURL=architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map diff --git a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-HJ25IOPZ.min.js.map b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map similarity index 100% rename from templates/tabulareditor/public/architectureDiagram-3BPJPVTR-HJ25IOPZ.min.js.map rename to templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map diff --git a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-IJWMOFAD.min.js b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js similarity index 99% rename from templates/tabulareditor/public/blockDiagram-GPEHLZMM-IJWMOFAD.min.js rename to templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js index 21773ba9d..60a07418d 100644 --- a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-IJWMOFAD.min.js +++ b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js @@ -1,4 +1,4 @@ -import{a as qt}from"./chunk-MZ3CL6N5.min.js";import{D as Gt}from"./chunk-7MS36IQK.min.js";import{a as tt,d as Ut}from"./chunk-AZ7QTF4J.min.js";import{a as Vt,b as Zt}from"./chunk-CRPZZTVK.min.js";import{f as lt}from"./chunk-3G5FAZF2.min.js";import{a as Xt,f as jt,p as et,r as kt}from"./chunk-AVP3GJKJ.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as $,F as M,H as wt,I as Ft,N as Pt,O as Wt,T as Yt,_ as C,a as At,b as Mt}from"./chunk-JBDIJRTV.min.js";import{J as Ht,N as Kt,b as g,d as L,j as _}from"./chunk-BJGJ3C53.min.js";import"./chunk-MY7PHHTQ.min.js";var Lt=(function(){var e=g(function(T,w,u,b){for(u=u||{},b=T.length;b--;u[T[b]]=w);return u},"o"),t=[1,15],a=[1,7],n=[1,13],s=[1,14],l=[1,19],r=[1,16],i=[1,17],c=[1,18],d=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],y=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,u,b,S,E,h,W){var f=h.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],w),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:let R=parseInt(h[f]),q=S.generateId();this.$={id:q,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);let V=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),ut=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),st=S.edgeStrToThickness(h[f-1].edgeTypeStr),pt=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:st,pattern:pt,directions:h[f].directions,arrowTypeEnd:V,arrowTypeStart:ut},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]);let z=S.generateId();this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);let Z=S.generateId();this.$={id:Z,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:n,29:s,31:l,39:r,43:i,46:c}),e(o,[2,16],{14:22,15:p,16:y}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,u){if(u.recoverable)this.trace(w);else{var b=new Error(w);throw b.hash=u,b}},"parseError"),parse:g(function(w){var u=this,b=[0],S=[],E=[null],h=[],W=this.table,f="",R=0,q=0,V=0,ut=2,st=1,pt=h.slice.call(arguments,1),z=Object.create(this.lexer),Z={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(Z.yy[ft]=this.yy[ft]);z.setInput(w,Z.yy),Z.yy.lexer=z,Z.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var xt=z.yylloc;h.push(xt);var De=z.options&&z.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(Y){b.length=b.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}g(Te,"popStack");function Rt(){var Y;return Y=S.pop()||z.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(S=Y,Y=S.pop()),Y=u.symbols_[Y]||Y),Y}g(Rt,"lex");for(var P,bt,J,K,ea,yt,Q={},it,G,zt,nt;;){if(J=b[b.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=Rt()),K=W[J]&&W[J][P]),typeof K>"u"||!K.length||!K[0]){var mt="";nt=[];for(it in W[J])this.terminals_[it]&&it>ut&&nt.push("'"+this.terminals_[it]+"'");z.showPosition?mt="Parse error on line "+(R+1)+`: +import{a as qt}from"./chunk-MZ3CL6N5.min.js";import{D as Gt}from"./chunk-7MS36IQK.min.js";import{a as tt,d as Ut}from"./chunk-AZ7QTF4J.min.js";import{a as Vt,b as Zt}from"./chunk-7XSRMU6L.min.js";import{f as lt}from"./chunk-W44GZAG6.min.js";import{a as Xt,f as jt,p as et,r as kt}from"./chunk-YPRWTSV5.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as $,F as M,H as wt,I as Ft,N as Pt,O as Wt,T as Yt,_ as C,a as At,b as Mt}from"./chunk-LXXU3C6C.min.js";import{J as Ht,N as Kt,b as g,d as L,j as _}from"./chunk-BJGJ3C53.min.js";import"./chunk-MY7PHHTQ.min.js";var Lt=(function(){var e=g(function(T,w,u,b){for(u=u||{},b=T.length;b--;u[T[b]]=w);return u},"o"),t=[1,15],a=[1,7],n=[1,13],s=[1,14],l=[1,19],r=[1,16],i=[1,17],c=[1,18],d=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],y=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,u,b,S,E,h,W){var f=h.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],w),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:let R=parseInt(h[f]),q=S.generateId();this.$={id:q,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);let V=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),ut=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),st=S.edgeStrToThickness(h[f-1].edgeTypeStr),pt=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:st,pattern:pt,directions:h[f].directions,arrowTypeEnd:V,arrowTypeStart:ut},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]);let z=S.generateId();this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);let Z=S.generateId();this.$={id:Z,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:n,29:s,31:l,39:r,43:i,46:c}),e(o,[2,16],{14:22,15:p,16:y}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,u){if(u.recoverable)this.trace(w);else{var b=new Error(w);throw b.hash=u,b}},"parseError"),parse:g(function(w){var u=this,b=[0],S=[],E=[null],h=[],W=this.table,f="",R=0,q=0,V=0,ut=2,st=1,pt=h.slice.call(arguments,1),z=Object.create(this.lexer),Z={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(Z.yy[ft]=this.yy[ft]);z.setInput(w,Z.yy),Z.yy.lexer=z,Z.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var xt=z.yylloc;h.push(xt);var De=z.options&&z.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(Y){b.length=b.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}g(Te,"popStack");function Rt(){var Y;return Y=S.pop()||z.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(S=Y,Y=S.pop()),Y=u.symbols_[Y]||Y),Y}g(Rt,"lex");for(var P,bt,J,K,ea,yt,Q={},it,G,zt,nt;;){if(J=b[b.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=Rt()),K=W[J]&&W[J][P]),typeof K>"u"||!K.length||!K[0]){var mt="";nt=[];for(it in W[J])this.terminals_[it]&&it>ut&&nt.push("'"+this.terminals_[it]+"'");z.showPosition?mt="Parse error on line "+(R+1)+`: `+z.showPosition()+` Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":mt="Parse error on line "+(R+1)+": Unexpected "+(P==st?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(mt,{text:z.match,token:this.terminals_[P]||P,line:z.yylineno,loc:xt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+P);switch(K[0]){case 1:b.push(P),E.push(z.yytext),h.push(z.yylloc),b.push(K[1]),P=null,bt?(P=bt,bt=null):(q=z.yyleng,f=z.yytext,R=z.yylineno,xt=z.yylloc,V>0&&V--);break;case 2:if(G=this.productions_[K[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},De&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),yt=this.performAction.apply(Q,[f,q,R,Z.yy,K[1],E,h].concat(pt)),typeof yt<"u")return yt;G&&(b=b.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),b.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),zt=W[b[b.length-2]][b[b.length-1]],b.push(zt);break;case 3:return!0}}return!0},"parse")},D=(function(){var T={EOF:1,parseError:g(function(u,b){if(this.yy.parser)this.yy.parser.parseError(u,b);else throw new Error(u)},"parseError"),setInput:g(function(w,u){return this.yy=u||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var u=w.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:g(function(w){var u=w.length,b=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===S.length?this.yylloc.first_column:0)+S[S.length-b.length].length-b[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),u=new Array(w.length+1).join("-");return w+this.upcomingInput()+` @@ -130,4 +130,4 @@ Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":mt="Parse error outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(a)} node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,s=e.y,l=Math.abs(n-a.x),r=e.width/2,i=a.xMath.abs(n-t.x)*c){let p=a.y{L.debug("abc88 cutPathAtIntersect",e,t);let a=[],n=e[0],s=!1;return e.forEach(l=>{if(!br(t,l)&&!s){let r=yr(t,n,l),i=!1;a.forEach(c=>{i=i||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),s=!0}else n=l,s||a.push(l)}),a},"cutPathAtIntersect"),mr=g(function(e,t,a,n,s,l,r){let i=a.points;L.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1,d=l.node(t.v);var o=l.node(t.w);o?.intersect&&d?.intersect&&(i=i.slice(1,a.points.length-1),i.unshift(d.intersect(i[0])),i.push(o.intersect(i[i.length-1]))),a.toCluster&&(L.debug("to cluster abc88",n[a.toCluster]),i=ee(a.points,n[a.toCluster].node),c=!0),a.fromCluster&&(L.debug("from cluster abc88",n[a.fromCluster]),i=ee(i.reverse(),n[a.fromCluster].node).reverse(),c=!0);let p=i.filter(w=>!Number.isNaN(w.y)),y=Kt;a.curve&&(s==="graph"||s==="flowchart")&&(y=a.curve);let{x,y:m}=Ut(a),v=Ht().x(x).y(m).curve(y),k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}let D=e.append("path").attr("d",v(p)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style),N="";(C().flowchart.arrowMarkerAbsolute||C().state.arrowMarkerAbsolute)&&(N=Ft(!0)),ur(D,a,N,r,s);let T={};return c&&(T.updatedPath=i),T.originalPath=a.points,T},"insertEdge"),wr=g(e=>{let t=new Set;for(let a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),kr=g((e,t,a,n)=>{let s=wr(e),l=2,r=t.height+2*a.padding,i=r/l,c=n??t.width+2*i+a.padding,d=a.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:c/2,y:2*d},{x:c-i,y:0},{x:c,y:0},{x:c,y:-r/3},{x:c+2*d,y:-r/2},{x:c,y:-2*r/3},{x:c,y:-r},{x:c-i,y:-r},{x:c/2,y:-r-2*d},{x:i,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*d,y:-r/2},{x:0,y:-r/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-r},{x:c-i,y:-r},{x:c,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:c,y:-i},{x:c,y:-r+i},{x:0,y:-r}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:c,y:0},{x:0,y:-i},{x:0,y:-r+i},{x:c,y:-r}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")&&s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:c,y:-i},{x:0,y:-r}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:c,y:0},{x:0,y:-r}]:s.has("left")&&s.has("up")?[{x:c,y:0},{x:0,y:-i},{x:c,y:-r}]:s.has("left")&&s.has("down")?[{x:c,y:0},{x:0,y:0},{x:c,y:-r}]:s.has("right")?[{x:i,y:-d},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r+d}]:s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")?[{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d}]:s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:[{x:0,y:0}]},"getArrowPoints");function fe(e,t){return e.intersect(t)}g(fe,"intersectNode");var Sr=fe;function xe(e,t,a,n){var s=e.x,l=e.y,r=s-n.x,i=l-n.y,c=Math.sqrt(t*t*i*i+a*a*r*r),d=Math.abs(t*a*r/c);n.x0}g(Dt,"sameSign");var vr=me,Er=we;function we(e,t,a){var n=e.x,s=e.y,l=[],r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){r=Math.min(r,m.x),i=Math.min(i,m.y)}):(r=Math.min(r,t.x),i=Math.min(i,t.y));for(var c=n-e.width/2-r,d=s-e.height/2-i,o=0;o1&&l.sort(function(m,v){var k=m.x-a.x,D=m.y-a.y,N=Math.sqrt(k*k+D*D),T=v.x-a.x,w=v.y-a.y,u=Math.sqrt(T*T+w*w);return N{var a=e.x,n=e.y,s=t.x-a,l=t.y-n,r=e.width/2,i=e.height/2,c,d;return Math.abs(l)*r>Math.abs(s)*i?(l<0&&(i=-i),c=l===0?0:i*s/l,d=i):(s<0&&(r=-r),c=r,d=s===0?0:r*l/s),{x:a+c,y:n+d}},"intersectRect"),Dr=_r,B={node:Sr,circle:Lr,ellipse:be,polygon:Er,rect:Dr},A=g(async(e,t,a,n)=>{let s=C(),l,r=t.useHtmlLabels||M(s);a?l=a:l="node default";let i=e.insert("g").attr("class",l).attr("id",t.domId||t.id),c=i.insert("g").attr("class","label").attr("style",t.labelStyle),d;t.labelText===void 0?d="":d=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o;t.labelType==="markdown"?o=lt(c,wt(kt(d),s),{useHtmlLabels:r,width:t.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):o=await U(c,wt(kt(d),s),t.labelStyle,!1,n);let p=o.getBBox(),y=t.padding/2;if(M(s)){let x=o.children[0],m=_(o);await Zt(x,d),p=x.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return r?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:i,bbox:p,halfPadding:y,label:c}},"labelHelper"),I=g((e,t)=>{let a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function j(e,t,a,n){return e.insert("polygon",":first-child").attr("points",n.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(j,"insertPolygonShape");var Tr=g(async(e,t)=>{t.useHtmlLabels||M(C())||(t.centerLabel=!0);let{shapeSvg:n,bbox:s,halfPadding:l}=await A(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);let r=n.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-s.width/2-l).attr("y",-s.height/2-l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),I(t,r),t.intersect=function(i){return B.rect(t,i)},n},"note"),Br=Tr,re=g(e=>e?" "+e:"","formatClass"),H=g((e,t)=>`${t||"node default"}${re(e.classes)} ${re(e.class)}`,"getClassesFromNode"),ae=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=s+l,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];L.info("Question main (Circle)");let c=j(a,r,r,i);return c.attr("style",t.style),I(t,c),t.intersect=function(d){return L.warn("Intersect called"),B.polygon(t,i,d)},a},"question"),Ir=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return a.insert("polygon",":first-child").attr("points",s.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),Nr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=4,l=t.positioned?t.height:n.height+t.padding,r=l/s,i=t.positioned?t.width:n.width+2*r+t.padding,c=[{x:r,y:0},{x:i-r,y:0},{x:i,y:-l/2},{x:i-r,y:-l},{x:r,y:-l},{x:0,y:-l/2}],d=j(a,i,l,c);return d.attr("style",t.style),I(t,d),t.intersect=function(o){return B.polygon(t,c,o)},a},"hexagon"),Cr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,void 0,!0),s=2,l=n.height+2*t.padding,r=l/s,i=n.width+2*r+t.padding,d=t.positioned&&(t.widthInColumns??1)>1&&t.width>i?t.width:i,o=kr(t.directions,n,t,d),p=j(a,d,l,o);return p.attr("style",t.style),I(t,p),t.intersect=function(y){return B.polygon(t,o,y)},a},"block_arrow"),Or=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}];return j(a,s,l,r).attr("style",t.style),t.width=s+l,t.height=l,t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_left_inv_arrow"),Rr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_right"),zr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_left"),Ar=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"trapezoid"),Mr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"inv_trapezoid"),Fr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s+l/2,y:0},{x:s,y:-l/2},{x:s+l/2,y:-l},{x:0,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_right_inv_arrow"),Pr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=s/2,r=l/(2.5+s/50),i=n.height+r+t.padding,c="M 0,"+r+" a "+l+","+r+" 0,0,0 "+s+" 0 a "+l+","+r+" 0,0,0 "+-s+" 0 l 0,"+i+" a "+l+","+r+" 0,0,0 "+s+" 0 l 0,"+-i,d=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-s/2+","+-(i/2+r)+")");return I(t,d),t.intersect=function(o){let p=B.rect(t,o),y=p.x-t.x;if(l!=0&&(Math.abs(y)t.height/2-r)){let x=r*r*(1-y*y/(l*l));x!=0&&(x=Math.sqrt(x)),x=r-x,o.y-t.y>0&&(x=-x),p.y+=x}return p},a},"cylinder"),Wr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes+" "+t.class,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"rect"),Yr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"composite"),Hr=g(async(e,t)=>{let{shapeSvg:a}=await A(e,t,"label",!0);L.trace("Classes = ",t.class);let n=a.insert("rect",":first-child"),s=0,l=0;if(n.attr("width",s).attr("height",l),a.attr("class","label edgeLabel"),t.props){let r=new Set(Object.keys(t.props));t.props.borders&&(dt(n,t.props.borders,s,l),r.delete("borders")),r.forEach(i=>{L.warn(`Unknown node property ${i}`)})}return I(t,n),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function dt(e,t,a,n){let s=[],l=g(i=>{s.push(i,0)},"addBorder"),r=g(i=>{s.push(0,i)},"skipBorder");t.includes("t")?(L.debug("add top border"),l(a)):r(a),t.includes("r")?(L.debug("add right border"),l(n)):r(n),t.includes("b")?(L.debug("add bottom border"),l(a)):r(a),t.includes("l")?(L.debug("add left border"),l(n)):r(n),e.attr("stroke-dasharray",s.join(" "))}g(dt,"applyNodePropertyBorders");var Kr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";let n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=n.insert("rect",":first-child"),l=n.insert("line"),r=n.insert("g").attr("class","label"),i=t.labelText.flat?t.labelText.flat():t.labelText,c="";typeof i=="object"?c=i[0]:c=i,L.info("Label text abc79",c,i,typeof i=="object");let d=await U(r,c,t.labelStyle,!0,!0),o={width:0,height:0};if(M(C())){let v=d.children[0],k=_(d);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}L.info("Text 2",i);let p=i.slice(1,i.length),y=d.getBBox(),x=await U(r,p.join?p.join("
"):p,t.labelStyle,!0,!0);if(M(C())){let v=x.children[0],k=_(x);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}let m=t.padding/2;return _(x).attr("transform","translate( "+(o.width>y.width?0:(y.width-o.width)/2)+", "+(y.height+m+5)+")"),_(d).attr("transform","translate( "+(o.width{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.height+t.padding,l=n.width+s/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return I(t,r),t.intersect=function(i){return B.rect(t,i)},a},"stadium"),Xr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=a.insert("circle",":first-child");return l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),I(t,l),t.intersect=function(r){return L.info("Circle intersect",t,n.width/2+s,r),B.circle(t,n.width/2+s,r)},a},"circle"),jr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=5,r=a.insert("g",":first-child"),i=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s+l).attr("width",n.width+t.padding+l*2).attr("height",n.height+t.padding+l*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),I(t,i),t.intersect=function(d){return L.info("DoubleCircle intersect",t,n.width/2+s+l,d),B.circle(t,n.width/2+s+l,d)},a},"doublecircle"),Vr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"subroutine"),Zr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,n),t.intersect=function(s){return B.circle(t,7,s)},a},"start"),se=g((e,t,a)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=70,l=10;a==="LR"&&(s=10,l=70);let r=n.append("rect").attr("x",-1*s/2).attr("y",-1*l/2).attr("width",s).attr("height",l).attr("class","fork-join");return I(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(i){return B.rect(t,i)},n},"forkJoin"),Gr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child"),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,s),t.intersect=function(l){return B.circle(t,7,l)},a},"end"),qr=g(async(e,t)=>{let a=t.padding/2,n=4,s=8,l;t.classes?l="node "+t.classes:l="node default";let r=e.insert("g").attr("class",l).attr("id",t.domId||t.id),i=r.insert("rect",":first-child"),c=r.insert("line"),d=r.insert("line"),o=0,p=n,y=r.insert("g").attr("class","label"),x=0,m=t.classData.annotations?.[0],v=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",k=await U(y,v,t.labelStyle,!0,!0),D=k.getBBox();if(M(C())){let E=k.children[0],h=_(k);D=E.getBoundingClientRect(),h.attr("width",D.width),h.attr("height",D.height)}t.classData.annotations[0]&&(p+=D.height+n,o+=D.width);let N=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(M(C())?N+="<"+t.classData.type+">":N+="<"+t.classData.type+">");let T=await U(y,N,t.labelStyle,!0,!0);_(T).attr("class","classTitle");let w=T.getBBox();if(M(C())){let E=T.children[0],h=_(T);w=E.getBoundingClientRect(),h.attr("width",w.width),h.attr("height",w.height)}p+=w.height+n,w.width>o&&(o=w.width);let u=[];t.classData.members.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(//g,">"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,u.push(f)}),p+=s;let b=[];if(t.classData.methods.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(//g,">"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,b.push(f)}),p+=s,m){let E=(o-D.width)/2;_(k).attr("transform","translate( "+(-1*o/2+E)+", "+-1*p/2+")"),x=D.height+n}let S=(o-w.width)/2;return _(T).attr("transform","translate( "+(-1*o/2+S)+", "+(-1*p/2+x)+")"),x+=w.height+n,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,u.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x+s/2)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),x+=s,d.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,b.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),i.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(p/2)-a).attr("width",o+t.padding).attr("height",p+t.padding),I(t,i),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),ie={rhombus:ae,composite:Yr,question:ae,rect:Wr,labelRect:Hr,rectWithTitle:Kr,choice:Ir,circle:Xr,doublecircle:jr,stadium:Ur,hexagon:Nr,block_arrow:Cr,rect_left_inv_arrow:Or,lean_right:Rr,lean_left:zr,trapezoid:Ar,inv_trapezoid:Mr,rect_right_inv_arrow:Fr,cylinder:Pr,start:Zr,end:Gr,note:Br,subroutine:Vr,fork:se,join:se,class_box:qr},ct={},ke=g(async(e,t,a)=>{let n,s;if(t.link){let l;C().securityLevel==="sandbox"?l="_top":t.linkTarget&&(l=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",l),s=await ie[t.shape](n,t,a)}else s=await ie[t.shape](e,t,a),n=s;return t.tooltip&&s.attr("title",t.tooltip),t.class&&s.attr("class","node default "+t.class),ct[t.id]=n,t.haveCallback&&ct[t.id].attr("class",ct[t.id].attr("class")+" clickable"),n},"insertNode"),Jr=g(e=>{let t=ct[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Ot(e,t,a=!1){let n=e,s="default";(n?.classes?.length||0)>0&&(s=(n?.classes??[]).join(" ")),s=s+" flowchart-label";let l=0,r="",i;switch(n.type){case"round":l=5,r="rect";break;case"composite":l=0,r="composite",i=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}let c=jt(n?.styles??[]),d=n.label,o=n.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:c.labelStyle,shape:r,labelText:d,rx:l,ry:l,class:s,style:c.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,directions:n.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:n.type,padding:i??$()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}g(Ot,"getNodeFromBlock");async function Se(e,t,a){let n=Ot(t,a,!1);if(n.type==="group")return;let s=$(),l=await ke(e,n,{config:s}),r=l.node().getBBox(),i=a.getBlock(n.id);i.size={width:r.width,height:r.height,x:0,y:0,node:l},a.setBlock(i),l.remove()}g(Se,"calculateBlockSize");async function Le(e,t,a){let n=Ot(t,a,!0);if(a.getBlock(n.id).type!=="space"){let l=$();await ke(e,n,{config:l}),t.intersect=n?.intersect,Jr(n)}}g(Le,"insertBlockPositioned");async function gt(e,t,a,n){for(let s of t)await n(e,s,a),s.children&&await gt(e,s.children,a,n)}g(gt,"performOperations");async function ve(e,t,a){await gt(e,t,a,Se)}g(ve,"calculateBlockSizes");async function Ee(e,t,a){await gt(e,t,a,Le)}g(Ee,"insertBlocks");async function _e(e,t,a,n,s){let l=new Gt({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of a)r.size&&l.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of t)if(r.start&&r.end){let i=n.getBlock(r.start),c=n.getBlock(r.end);if(i?.size&&c?.size){let d=i.size,o=c.size,p=[{x:d.x,y:d.y},{x:d.x+(o.x-d.x)/2,y:d.y+(o.y-d.y)/2},{x:o.x,y:o.y}],y=s?`${s}-${r.id}`:r.id,x=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${x} ${m} flowchart-link LS-a1 LE-b1`;mr(e,{v:r.start,w:r.end,name:y},{...r,id:y,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v},void 0,"block",l,s),r.label&&(await fr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v}),xr({...r,x:p[1].x,y:p[1].y},{originalPath:p}))}}}g(_e,"insertEdges");var Qr=g(function(e,t){return t.db.getClasses()},"getClasses"),$r=g(async function(e,t,a,n){let{securityLevel:s,block:l}=$(),r=n.db;r.setDiagramId(t);let i;s==="sandbox"&&(i=_("#i"+t));let c=s==="sandbox"?_(i.nodes()[0].contentDocument.body):_("body"),d=s==="sandbox"?c.select(`[id="${t}"]`):_(`[id="${t}"]`);hr(d,["point","circle","cross"],n.type,t);let p=r.getBlocks(),y=r.getBlocksFlat(),x=r.getEdges(),m=d.insert("g").attr("class","block");await ve(m,p,r);let v=pe(r);if(await Ee(m,p,r),await _e(m,x,y,r,t),v){let k=v,D=Math.max(1,Math.round(.125*(k.width/k.height))),N=k.height+D+10,T=k.width+10,{useMaxWidth:w}=l;Wt(d,N,T,!!w),L.debug("Here Bounds",v,k),d.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),ta={draw:$r,getClasses:Qr},xa={parser:Be,db:qe,renderer:ta,styles:Qe};export{xa as diagram}; -//# sourceMappingURL=blockDiagram-GPEHLZMM-IJWMOFAD.min.js.map +//# sourceMappingURL=blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map diff --git a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-IJWMOFAD.min.js.map b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map similarity index 100% rename from templates/tabulareditor/public/blockDiagram-GPEHLZMM-IJWMOFAD.min.js.map rename to templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map diff --git a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-CAIUPBOU.min.js b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js similarity index 99% rename from templates/tabulareditor/public/c4Diagram-AAUBKEIU-CAIUPBOU.min.js rename to templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js index 5c69bf5d1..a9c0393f4 100644 --- a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-CAIUPBOU.min.js +++ b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js @@ -1,4 +1,4 @@ -import{a as ke,f as Ee}from"./chunk-CDHWQHFE.min.js";import{i as ve,j as ee,k as Ct}from"./chunk-AVP3GJKJ.min.js";import{a as Fe}from"./chunk-HCOLC5CQ.min.js";import{H as te,N as Yt,O as be,U as ge,V as _e,W as xe,X as me,_ as Ot,o as ye}from"./chunk-JBDIJRTV.min.js";import{b as y,d as $t,j as Dt}from"./chunk-BJGJ3C53.min.js";import{c as Ue}from"./chunk-MY7PHHTQ.min.js";var Re=Ue(Fe(),1),Ut=(function(){var e=y(function(_t,x,v,k){for(v=v||{},k=_t.length;k--;v[_t[k]]=x);return v},"o"),t=[1,24],n=[1,25],o=[1,26],l=[1,27],s=[1,28],a=[1,63],r=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],b=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],rt=[1,46],nt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],bt=[1,59],gt=[1,60],wt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],ce=[12,14,33,42],It=[12,14,33,42,76,77,79,80],vt=[12,33],Qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,k,g,R,h,St){var f=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[f-3]);break;case 19:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:g.addContainer("container",...h[f]),this.$=h[f];break;case 48:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:g.addComponent("component",...h[f]),this.$=h[f];break;case 54:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:g.addRel("rel",...h[f]),this.$=h[f];break;case 61:g.addRel("birel",...h[f]),this.$=h[f];break;case 62:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let kt={};kt[h[f-1].trim()]=h[f].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{14:[1,74]},e(wt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(wt,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(wt,[2,36],{12:[1,77]}),e(Rt,[2,19]),e(Rt,[2,20]),{25:[1,78]},{27:[1,79]},e(Rt,[2,23]),{35:80,75:81,76:E,77:A,79:C,80:w},{35:86,75:81,76:E,77:A,79:C,80:w},{35:87,75:81,76:E,77:A,79:C,80:w},{35:88,75:81,76:E,77:A,79:C,80:w},{35:89,75:81,76:E,77:A,79:C,80:w},{35:90,75:81,76:E,77:A,79:C,80:w},{35:91,75:81,76:E,77:A,79:C,80:w},{35:92,75:81,76:E,77:A,79:C,80:w},{35:93,75:81,76:E,77:A,79:C,80:w},{35:94,75:81,76:E,77:A,79:C,80:w},{35:95,75:81,76:E,77:A,79:C,80:w},{35:96,75:81,76:E,77:A,79:C,80:w},{35:97,75:81,76:E,77:A,79:C,80:w},{35:98,75:81,76:E,77:A,79:C,80:w},{35:99,75:81,76:E,77:A,79:C,80:w},{35:100,75:81,76:E,77:A,79:C,80:w},{35:101,75:81,76:E,77:A,79:C,80:w},{35:102,75:81,76:E,77:A,79:C,80:w},{35:103,75:81,76:E,77:A,79:C,80:w},{35:104,75:81,76:E,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:E,77:A,79:C,80:w},{35:106,75:81,76:E,77:A,79:C,80:w},{35:107,75:81,76:E,77:A,79:C,80:w},{35:108,75:81,76:E,77:A,79:C,80:w},{35:109,75:81,76:E,77:A,79:C,80:w},{35:110,75:81,76:E,77:A,79:C,80:w},{35:111,75:81,76:E,77:A,79:C,80:w},{35:112,75:81,76:E,77:A,79:C,80:w},{35:113,75:81,76:E,77:A,79:C,80:w},{35:114,75:81,76:E,77:A,79:C,80:w},{35:115,75:81,76:E,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:C,80:w},{35:120,75:81,76:E,77:A,79:C,80:w},{35:121,75:81,76:E,77:A,79:C,80:w},{35:122,75:81,76:E,77:A,79:C,80:w},{35:123,75:81,76:E,77:A,79:C,80:w},{35:124,75:81,76:E,77:A,79:C,80:w},{35:125,75:81,76:E,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(wt,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:n,24:o,26:l,28:s}),e(wt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:o,26:l,28:s,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(Rt,[2,21]),e(Rt,[2,22]),e(T,[2,39]),e(ce,[2,71],{75:81,35:132,76:E,77:A,79:C,80:w}),e(It,[2,73]),{78:[1,133]},e(It,[2,75]),e(It,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(wt,[2,38]),e(ce,[2,72]),e(It,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=v,k}},"parseError"),parse:y(function(x){var v=this,k=[0],g=[],R=[null],h=[],St=this.table,f="",kt=0,he=0,ue=0,Le=2,de=1,Ne=h.slice.call(arguments,1),D=Object.create(this.lexer),Et={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Et.yy[qt]=this.yy[qt]);D.setInput(x,Et.yy),Et.yy.lexer=D,Et.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Gt=D.yylloc;h.push(Gt);var Ye=D.options&&D.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(L){k.length=k.length-2*L,R.length=R.length-L,h.length=h.length-L}y(je,"popStack");function fe(){var L;return L=g.pop()||D.lex()||de,typeof L!="number"&&(L instanceof Array&&(g=L,L=g.pop()),L=v.symbols_[L]||L),L}y(fe,"lex");for(var B,Kt,At,N,I0,Jt,Tt={},Lt,W,pe,Nt;;){if(At=k[k.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((B===null||typeof B>"u")&&(B=fe()),N=St[At]&&St[At][B]),typeof N>"u"||!N.length||!N[0]){var Zt="";Nt=[];for(Lt in St[At])this.terminals_[Lt]&&Lt>Le&&Nt.push("'"+this.terminals_[Lt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`: +import{a as ke,f as Ee}from"./chunk-CLGT2SZG.min.js";import{i as ve,j as ee,k as Ct}from"./chunk-YPRWTSV5.min.js";import{a as Fe}from"./chunk-HCOLC5CQ.min.js";import{H as te,N as Yt,O as be,U as ge,V as _e,W as xe,X as me,_ as Ot,o as ye}from"./chunk-LXXU3C6C.min.js";import{b as y,d as $t,j as Dt}from"./chunk-BJGJ3C53.min.js";import{c as Ue}from"./chunk-MY7PHHTQ.min.js";var Re=Ue(Fe(),1),Ut=(function(){var e=y(function(_t,x,v,k){for(v=v||{},k=_t.length;k--;v[_t[k]]=x);return v},"o"),t=[1,24],n=[1,25],o=[1,26],l=[1,27],s=[1,28],a=[1,63],r=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],b=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],rt=[1,46],nt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],bt=[1,59],gt=[1,60],wt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],ce=[12,14,33,42],It=[12,14,33,42,76,77,79,80],vt=[12,33],Qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,k,g,R,h,St){var f=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[f-3]);break;case 19:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:g.addContainer("container",...h[f]),this.$=h[f];break;case 48:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:g.addComponent("component",...h[f]),this.$=h[f];break;case 54:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:g.addRel("rel",...h[f]),this.$=h[f];break;case 61:g.addRel("birel",...h[f]),this.$=h[f];break;case 62:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let kt={};kt[h[f-1].trim()]=h[f].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{14:[1,74]},e(wt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(wt,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(wt,[2,36],{12:[1,77]}),e(Rt,[2,19]),e(Rt,[2,20]),{25:[1,78]},{27:[1,79]},e(Rt,[2,23]),{35:80,75:81,76:E,77:A,79:C,80:w},{35:86,75:81,76:E,77:A,79:C,80:w},{35:87,75:81,76:E,77:A,79:C,80:w},{35:88,75:81,76:E,77:A,79:C,80:w},{35:89,75:81,76:E,77:A,79:C,80:w},{35:90,75:81,76:E,77:A,79:C,80:w},{35:91,75:81,76:E,77:A,79:C,80:w},{35:92,75:81,76:E,77:A,79:C,80:w},{35:93,75:81,76:E,77:A,79:C,80:w},{35:94,75:81,76:E,77:A,79:C,80:w},{35:95,75:81,76:E,77:A,79:C,80:w},{35:96,75:81,76:E,77:A,79:C,80:w},{35:97,75:81,76:E,77:A,79:C,80:w},{35:98,75:81,76:E,77:A,79:C,80:w},{35:99,75:81,76:E,77:A,79:C,80:w},{35:100,75:81,76:E,77:A,79:C,80:w},{35:101,75:81,76:E,77:A,79:C,80:w},{35:102,75:81,76:E,77:A,79:C,80:w},{35:103,75:81,76:E,77:A,79:C,80:w},{35:104,75:81,76:E,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:E,77:A,79:C,80:w},{35:106,75:81,76:E,77:A,79:C,80:w},{35:107,75:81,76:E,77:A,79:C,80:w},{35:108,75:81,76:E,77:A,79:C,80:w},{35:109,75:81,76:E,77:A,79:C,80:w},{35:110,75:81,76:E,77:A,79:C,80:w},{35:111,75:81,76:E,77:A,79:C,80:w},{35:112,75:81,76:E,77:A,79:C,80:w},{35:113,75:81,76:E,77:A,79:C,80:w},{35:114,75:81,76:E,77:A,79:C,80:w},{35:115,75:81,76:E,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:C,80:w},{35:120,75:81,76:E,77:A,79:C,80:w},{35:121,75:81,76:E,77:A,79:C,80:w},{35:122,75:81,76:E,77:A,79:C,80:w},{35:123,75:81,76:E,77:A,79:C,80:w},{35:124,75:81,76:E,77:A,79:C,80:w},{35:125,75:81,76:E,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(wt,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:n,24:o,26:l,28:s}),e(wt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:o,26:l,28:s,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(Rt,[2,21]),e(Rt,[2,22]),e(T,[2,39]),e(ce,[2,71],{75:81,35:132,76:E,77:A,79:C,80:w}),e(It,[2,73]),{78:[1,133]},e(It,[2,75]),e(It,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(wt,[2,38]),e(ce,[2,72]),e(It,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=v,k}},"parseError"),parse:y(function(x){var v=this,k=[0],g=[],R=[null],h=[],St=this.table,f="",kt=0,he=0,ue=0,Le=2,de=1,Ne=h.slice.call(arguments,1),D=Object.create(this.lexer),Et={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Et.yy[qt]=this.yy[qt]);D.setInput(x,Et.yy),Et.yy.lexer=D,Et.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Gt=D.yylloc;h.push(Gt);var Ye=D.options&&D.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(L){k.length=k.length-2*L,R.length=R.length-L,h.length=h.length-L}y(je,"popStack");function fe(){var L;return L=g.pop()||D.lex()||de,typeof L!="number"&&(L instanceof Array&&(g=L,L=g.pop()),L=v.symbols_[L]||L),L}y(fe,"lex");for(var B,Kt,At,N,I0,Jt,Tt={},Lt,W,pe,Nt;;){if(At=k[k.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((B===null||typeof B>"u")&&(B=fe()),N=St[At]&&St[At][B]),typeof N>"u"||!N.length||!N[0]){var Zt="";Nt=[];for(Lt in St[At])this.terminals_[Lt]&&Lt>Le&&Nt.push("'"+this.terminals_[Lt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`: `+D.showPosition()+` Expecting `+Nt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Zt="Parse error on line "+(kt+1)+": Unexpected "+(B==de?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Gt,expected:Nt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+B);switch(N[0]){case 1:k.push(B),R.push(D.yytext),h.push(D.yylloc),k.push(N[1]),B=null,Kt?(B=Kt,Kt=null):(he=D.yyleng,f=D.yytext,kt=D.yylineno,Gt=D.yylloc,ue>0&&ue--);break;case 2:if(W=this.productions_[N[1]][1],Tt.$=R[R.length-W],Tt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Ye&&(Tt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(Tt,[f,he,kt,Et.yy,N[1],R,h].concat(Ne)),typeof Jt<"u")return Jt;W&&(k=k.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),k.push(this.productions_[N[1]][0]),R.push(Tt.$),h.push(Tt._$),pe=St[k[k.length-2]][k[k.length-1]],k.push(pe);break;case 3:return!0}}return!0},"parse")},Me=(function(){var _t={EOF:1,parseError:y(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,k=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===g.length?this.yylloc.first_column:0)+g[g.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` @@ -8,4 +8,4 @@ Expecting `+Nt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Zt="Parse error fill: ${e.personBkg}; } `,"getStyles"),B0=P0,U0={parser:Ve,db:ae,renderer:Ce,styles:B0,init:y(({c4:e,wrap:t})=>{Ce.setConf(e),ae.setWrap(t)},"init")};export{U0 as diagram}; -//# sourceMappingURL=c4Diagram-AAUBKEIU-CAIUPBOU.min.js.map +//# sourceMappingURL=c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map diff --git a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-CAIUPBOU.min.js.map b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map similarity index 100% rename from templates/tabulareditor/public/c4Diagram-AAUBKEIU-CAIUPBOU.min.js.map rename to templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map diff --git a/templates/tabulareditor/public/chunk-YKKTY4W7.min.js b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js similarity index 99% rename from templates/tabulareditor/public/chunk-YKKTY4W7.min.js rename to templates/tabulareditor/public/chunk-2WVNBDAO.min.js index a18776394..f34bf0fa3 100644 --- a/templates/tabulareditor/public/chunk-YKKTY4W7.min.js +++ b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js @@ -1,4 +1,4 @@ -import{a as v}from"./chunk-NTMILJIW.min.js";import{a as Zt,b as Bt,d as W,e as I}from"./chunk-NA2BXG52.min.js";import{a as Tt,b as Vt}from"./chunk-CRPZZTVK.min.js";import{d as Mt,f as nt}from"./chunk-3G5FAZF2.min.js";import{k as Pt,r as Dt,t as K}from"./chunk-AVP3GJKJ.min.js";import{B as wt,F as at,H as Lt,J as Wt,K as zt,_ as U,ba as Et,v as ut}from"./chunk-JBDIJRTV.min.js";import{b as $,d as z,j as Z}from"./chunk-BJGJ3C53.min.js";var O=$(async(u,t,o)=>{let h,l=t.useHtmlLabels||ut(U()?.htmlLabels);o?h=o:h="node default";let r=u.insert("g").attr("class",h).attr("id",t.domId||t.id),p=r.insert("g").attr("class","label").attr("style",K(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",s=await nt(p,Lt(Dt(i),U()),{useHtmlLabels:l,width:t.width||U().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},U()),a=s.getBBox(),g=(t?.padding??0)/2;if(l){let c=s.children[0],f=Z(s);await Vt(c,i),a=c.getBoundingClientRect(),f.attr("width",a.width),f.attr("height",a.height)}return l?p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):p.attr("transform","translate(0, "+-a.height/2+")"),t.centerLabel&&p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),p.insert("rect",":first-child"),{shapeSvg:r,bbox:a,halfPadding:g,label:p}},"labelHelper"),Xt=$(async(u,t,o)=>{let h=o.useHtmlLabels??at(U()),l=u.insert("g").attr("class","label").attr("style",o.labelStyle||""),r=await nt(l,Lt(Dt(t),U()),{useHtmlLabels:h,width:o.width||U()?.flowchart?.wrappingWidth,style:o.labelStyle,addSvgBackground:!!o.icon||!!o.img}),p=r.getBBox(),i=o.padding/2;if(at(U())){let n=r.children[0],e=Z(r);p=n.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return h?l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):l.attr("transform","translate(0, "+-p.height/2+")"),o.centerLabel&&l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:u,bbox:p,halfPadding:i,label:l}},"insertLabel"),T=$((u,t)=>{let o=t.node().getBBox();u.width=o.width,u.height=o.height},"updateNodeBounds"),Y=$((u,t)=>(u.look==="handDrawn"?"rough-node":"node")+" "+u.cssClasses+" "+(t||""),"getNodeClasses");function G(u){let t=u.map((o,h)=>`${h===0?"M":"L"}${o.x},${o.y}`);return t.push("Z"),t.join(" ")}$(G,"createPathFromPoints");function ft(u,t,o,h,l,r){let p=[],n=o-u,e=h-t,s=n/r,a=2*Math.PI/s,g=t+e/2;for(let c=0;c<=50;c++){let f=c/50,y=u+f*n,m=g+l*Math.sin(a*(y-u));p.push({x:y,y:m})}return p}$(ft,"generateFullSineWavePoints");function Ct(u,t,o,h,l,r){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;an.tagName==="path"),o=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");o.setAttribute("d",h);let l=t.find(n=>n.getAttribute("fill")!=="none"),r=t.find(n=>n.getAttribute("stroke")!=="none"),p=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(l){let n={fill:p(l,"fill"),"fill-opacity":p(l,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&o.setAttribute(e,s)})}if(r){let n={stroke:p(r,"stroke"),"stroke-width":p(r,"stroke-width")??"1","stroke-opacity":p(r,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&o.setAttribute(e,s)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(o),i}$(Yt,"mergePaths");var Ma=$((u,t)=>{var o=u.x,h=u.y,l=t.x-o,r=t.y-h,p=u.width/2,i=u.height/2,n,e;return Math.abs(r)*p>Math.abs(l)*i?(r<0&&(i=-i),n=r===0?0:i*l/r,e=i):(l<0&&(p=-p),n=p,e=l===0?0:p*r/l),{x:o+n,y:h+e}},"intersectRect"),$t=Ma,Na=$(async(u,t,o,h=!1,l=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);let p=U(),i=at(p);return await nt(u,r,{style:o,isTitle:h,useHtmlLabels:i,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},p)},"createLabel"),At=Na,yt=$((u,t,o,h,l)=>["M",u+l,t,"H",u+o-l,"A",l,l,0,0,1,u+o,t+l,"V",t+h-l,"A",l,l,0,0,1,u+o-l,t+h,"H",u+l,"A",l,l,0,0,1,u,t+h-l,"V",t+l,"A",l,l,0,0,1,u+l,t,"Z"].join(" "),"createRoundedRectPathD"),ns=$(async(u,t)=>{z.info("Creating subgraph rect for ",t.id,t);let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{clusterBkg:r,clusterBorder:p}=h,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=W(t),a=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=at(o),c=a.insert("g").attr("class","cluster-label "),f;t.labelType==="markdown"?f=await nt(c,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):f=await At(c,t.label,t.labelStyle||"",!1,!0);let y=f.getBBox();if(at(o)){let P=f.children[0],D=Z(f);y=P.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,w=t.x-m/2,x=t.y-d/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=v.svg(a),D=I(t,{roughness:.7,fill:r,stroke:p,fillWeight:3,seed:l}),B=P.path(yt(w,x,m,d,0),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:b}=Tt(o);if(c.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let k=S.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(P){return $t(t,P)},{cluster:a,labelBBox:y}},"rect"),Ca=$((u,t)=>{let o=u.insert("g").attr("class","note-cluster").attr("id",t.domId),h=o.insert("rect",":first-child"),l=0*t.padding,r=l/2;h.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let p=h.node().getBBox();return t.width=p.width,t.height=p.height,t.intersect=function(i){return $t(t,i)},{cluster:o,labelBBox:{width:0,height:0}}},"noteGroup"),Ra=$(async(u,t)=>{let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{altBackground:r,compositeBackground:p,compositeTitleBackground:i,nodeBorder:n}=h,e=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),s=e.insert("g",":first-child"),a=e.insert("g").attr("class","cluster-label"),g=e.append("rect"),c=await At(a,t.label,t.labelStyle,void 0,!0),f=c.getBBox();if(at(o)){let B=c.children[0],M=Z(c);f=B.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}let y=0*t.padding,m=y/2,d=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+y;t.width<=f.width+t.padding?t.diff=(d-t.width)/2-t.padding:t.diff=-t.padding;let w=t.height+y,x=t.height+y-f.height-6,S=t.x-d/2,b=t.y-w/2;t.width=d;let k=t.y-t.height/2-m+f.height+2,P;if(t.look==="handDrawn"){let B=t.cssClasses.includes("statediagram-cluster-alt"),M=v.svg(e),C=t.rx||t.ry?M.path(yt(S,b,d,w,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:l}):M.rectangle(S,b,d,w,{seed:l});P=e.insert(()=>C,":first-child");let X=M.rectangle(S,k,d,x,{fill:B?r:p,fillStyle:B?"hachure":"solid",stroke:n,seed:l});P=e.insert(()=>C,":first-child"),g=e.insert(()=>X)}else P=s.insert("rect",":first-child"),P.attr("class","outer").attr("x",S).attr("y",b).attr("width",d).attr("height",w).attr("data-look",t.look),g.attr("class","inner").attr("x",S).attr("y",k).attr("width",d).attr("height",x);a.attr("transform",`translate(${t.x-f.width/2}, ${b+1-(at(o)?0:3)})`);let D=P.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(B){return $t(t,B)},{cluster:e,labelBBox:f}},"roundedWithTitle"),Aa=$(async(u,t)=>{z.info("Creating subgraph rect for ",t.id,t);let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{clusterBkg:r,clusterBorder:p}=h,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=W(t),a=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=at(o),c=a.insert("g").attr("class","cluster-label "),f=await nt(c,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}),y=f.getBBox();if(at(o)){let P=f.children[0],D=Z(f);y=P.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,w=t.x-m/2,x=t.y-d/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=v.svg(a),D=I(t,{roughness:.7,fill:r,stroke:p,fillWeight:4,seed:l}),B=P.path(yt(w,x,m,d,t.rx),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:b}=Tt(o);if(c.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let k=S.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(P){return $t(t,P)},{cluster:a,labelBBox:y}},"kanbanSection"),Ha=$((u,t)=>{let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{nodeBorder:r}=h,p=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),i=p.insert("g",":first-child"),n=0*t.padding,e=t.width+n;t.diff=-t.padding;let s=t.height+n,a=t.x-e/2,g=t.y-s/2;t.width=e;let c;if(t.look==="handDrawn"){let m=v.svg(p).rectangle(a,g,e,s,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:l});c=p.insert(()=>m,":first-child")}else{c=i.insert("rect",":first-child");let y="outer";t.look,y="divider",c.attr("class",y).attr("x",a).attr("y",g).attr("width",e).attr("height",s).attr("data-look",t.look)}let f=c.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return $t(t,y)},{cluster:p,labelBBox:{}}},"divider"),Ia=ns,La={rect:ns,squareRect:Ia,roundedWithTitle:Ra,noteGroup:Ca,divider:Ha,kanbanSection:Aa},cs=new Map,ye=$(async(u,t)=>{let o=t.shape||"rect",h=await La[o](u,t);return cs.set(t.id,h),h},"insertCluster"),pe=$(()=>{cs=new Map},"clear");function os(u,t){return u.intersect(t)}$(os,"intersectNode");var Wa=os;function hs(u,t,o,h){var l=u.x,r=u.y,p=l-h.x,i=r-h.y,n=Math.sqrt(t*t*i*i+o*o*p*p),e=Math.abs(t*o*p/n);h.x0}$(Ot,"sameSign");var Ta=ys;function ps(u,t,o){let h=u.x,l=u.y,r=[],p=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){p=Math.min(p,s.x),i=Math.min(i,s.y)}):(p=Math.min(p,t.x),i=Math.min(i,t.y));let n=h-u.width/2-p,e=l-u.height/2-i;for(let s=0;s1&&r.sort(function(s,a){let g=s.x-o.x,c=s.y-o.y,f=Math.sqrt(g*g+c*c),y=a.x-o.x,m=a.y-o.y,d=Math.sqrt(y*y+m*m);return fs,":first-child");return a.attr("class","anchor").attr("style",K(i)),T(t,a),t.intersect=function(g){return z.info("Circle intersect",t,p,g),N.circle(t,p,g)},r}$(us,"anchor");function jt(u,t,o,h,l,r,p){let n=(u+o)/2,e=(t+h)/2,s=Math.atan2(h-t,o-u),a=(o-u)/2,g=(h-t)/2,c=a/l,f=g/r,y=Math.sqrt(c**2+f**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-y**2),d=n+m*r*Math.sin(s)*(p?-1:1),w=e-m*l*Math.cos(s)*(p?-1:1),x=Math.atan2((t-w)/r,(u-d)/l),b=Math.atan2((h-w)/r,(o-d)/l)-x;p&&b<0&&(b+=2*Math.PI),!p&&b>0&&(b-=2*Math.PI);let k=[];for(let P=0;P<20;P++){let D=P/19,B=x+D*b,M=d+l*Math.cos(B),C=w+r*Math.sin(B);k.push({x:M,y:C})}return k}$(jt,"generateArcPoints");function ds(u,t,o){let[h,l]=[t,o].sort((r,p)=>p-r);return l*(1-Math.sqrt(1-(u/h/2)**2))}$(ds,"calculateArcSagitta");async function ms(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=$(B=>B+p,"calcTotalHeight"),n=$(B=>{let M=B/2;return[M/(2.5+B/50),M]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await O(u,t,Y(t)),a=i(t?.height?t?.height:s.height),[g,c]=n(a),f=ds(a,g,c),m=(t?.width?t?.width:s.width)+r*2+f-f,d=a,{cssStyles:w}=t,x=[{x:m/2,y:-d/2},{x:-m/2,y:-d/2},...jt(-m/2,-d/2,-m/2,d/2,g,c,!1),{x:m/2,y:d/2},...jt(m/2,d/2,m/2,-d/2,g,c,!0)],S=v.svg(e),b=I(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=G(x),P=S.path(k,b),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),D.attr("transform",`translate(${g/2}, 0)`),T(t,D),t.intersect=function(B){return N.polygon(t,x,B)},e}$(ms,"bowTieRect");function ht(u,t,o,h){return u.insert("polygon",":first-child").attr("points",h.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+o/2+")")}$(ht,"insertPolygonShape");var Rt=12;async function ws(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?28:l,p=t.look==="neo"?24:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width??n.width)+(t.look==="neo"?r*2:r+Rt),s=(t?.height??n.height)+(t.look==="neo"?p*2:p),a=0,g=e,c=-s,f=0,y=[{x:a+Rt,y:c},{x:g,y:c},{x:g,y:f},{x:a,y:f},{x:a,y:c+Rt},{x:a+Rt,y:c}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let w=v.svg(i),x=I(t,{}),S=G(y),b=w.path(S,x);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),d&&m.attr("style",d)}else m=ht(i,e,s,y);return h&&m.attr("style",h),T(t,m),t.intersect=function(w){return N.polygon(t,y,w)},i}$(ws,"card");function xs(u,t){let{nodeStyles:o}=W(t);t.label="";let h=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),p=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],i=v.svg(h),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=G(p),s=i.path(e,n),a=h.insert(()=>s,":first-child");return l&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",l),o&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",o),t.width=28,t.height=28,t.intersect=function(g){return N.polygon(t,p,g)},h}$(xs,"choice");async function Gt(u,t,o){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{shapeSvg:r,bbox:p,halfPadding:i}=await O(u,t,Y(t)),n=16,e=o?.padding??i,s=t.look==="neo"?p.width/2+n*2:p.width/2+e,a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(r),f=I(t,{}),y=c.circle(0,0,s*2,f);a=r.insert(()=>y,":first-child"),a.attr("class","basic label-container").attr("style",K(g))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",s).attr("cx",0).attr("cy",0);return T(t,a),t.calcIntersect=function(c,f){let y=c.width/2;return N.circle(c,y,f)},t.intersect=function(c){return z.info("Circle intersect",t,s,c),N.circle(t,s,c)},r}$(Gt,"circle");function bs(u){let t=Math.cos(Math.PI/4),o=Math.sin(Math.PI/4),h=u*2,l={x:h/2*t,y:h/2*o},r={x:-(h/2)*t,y:h/2*o},p={x:-(h/2)*t,y:-(h/2)*o},i={x:h/2*t,y:-(h/2)*o};return`M ${r.x},${r.y} L ${i.x},${i.y} +import{a as v}from"./chunk-NTMILJIW.min.js";import{a as Zt,b as Bt,d as W,e as I}from"./chunk-WJCDRJGL.min.js";import{a as Tt,b as Vt}from"./chunk-7XSRMU6L.min.js";import{d as Mt,f as nt}from"./chunk-W44GZAG6.min.js";import{k as Pt,r as Dt,t as K}from"./chunk-YPRWTSV5.min.js";import{B as wt,F as at,H as Lt,J as Wt,K as zt,_ as U,ba as Et,v as ut}from"./chunk-LXXU3C6C.min.js";import{b as $,d as z,j as Z}from"./chunk-BJGJ3C53.min.js";var O=$(async(u,t,o)=>{let h,l=t.useHtmlLabels||ut(U()?.htmlLabels);o?h=o:h="node default";let r=u.insert("g").attr("class",h).attr("id",t.domId||t.id),p=r.insert("g").attr("class","label").attr("style",K(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",s=await nt(p,Lt(Dt(i),U()),{useHtmlLabels:l,width:t.width||U().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},U()),a=s.getBBox(),g=(t?.padding??0)/2;if(l){let c=s.children[0],f=Z(s);await Vt(c,i),a=c.getBoundingClientRect(),f.attr("width",a.width),f.attr("height",a.height)}return l?p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):p.attr("transform","translate(0, "+-a.height/2+")"),t.centerLabel&&p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),p.insert("rect",":first-child"),{shapeSvg:r,bbox:a,halfPadding:g,label:p}},"labelHelper"),Xt=$(async(u,t,o)=>{let h=o.useHtmlLabels??at(U()),l=u.insert("g").attr("class","label").attr("style",o.labelStyle||""),r=await nt(l,Lt(Dt(t),U()),{useHtmlLabels:h,width:o.width||U()?.flowchart?.wrappingWidth,style:o.labelStyle,addSvgBackground:!!o.icon||!!o.img}),p=r.getBBox(),i=o.padding/2;if(at(U())){let n=r.children[0],e=Z(r);p=n.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return h?l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):l.attr("transform","translate(0, "+-p.height/2+")"),o.centerLabel&&l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:u,bbox:p,halfPadding:i,label:l}},"insertLabel"),T=$((u,t)=>{let o=t.node().getBBox();u.width=o.width,u.height=o.height},"updateNodeBounds"),Y=$((u,t)=>(u.look==="handDrawn"?"rough-node":"node")+" "+u.cssClasses+" "+(t||""),"getNodeClasses");function G(u){let t=u.map((o,h)=>`${h===0?"M":"L"}${o.x},${o.y}`);return t.push("Z"),t.join(" ")}$(G,"createPathFromPoints");function ft(u,t,o,h,l,r){let p=[],n=o-u,e=h-t,s=n/r,a=2*Math.PI/s,g=t+e/2;for(let c=0;c<=50;c++){let f=c/50,y=u+f*n,m=g+l*Math.sin(a*(y-u));p.push({x:y,y:m})}return p}$(ft,"generateFullSineWavePoints");function Ct(u,t,o,h,l,r){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;an.tagName==="path"),o=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");o.setAttribute("d",h);let l=t.find(n=>n.getAttribute("fill")!=="none"),r=t.find(n=>n.getAttribute("stroke")!=="none"),p=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(l){let n={fill:p(l,"fill"),"fill-opacity":p(l,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&o.setAttribute(e,s)})}if(r){let n={stroke:p(r,"stroke"),"stroke-width":p(r,"stroke-width")??"1","stroke-opacity":p(r,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&o.setAttribute(e,s)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(o),i}$(Yt,"mergePaths");var Ma=$((u,t)=>{var o=u.x,h=u.y,l=t.x-o,r=t.y-h,p=u.width/2,i=u.height/2,n,e;return Math.abs(r)*p>Math.abs(l)*i?(r<0&&(i=-i),n=r===0?0:i*l/r,e=i):(l<0&&(p=-p),n=p,e=l===0?0:p*r/l),{x:o+n,y:h+e}},"intersectRect"),$t=Ma,Na=$(async(u,t,o,h=!1,l=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);let p=U(),i=at(p);return await nt(u,r,{style:o,isTitle:h,useHtmlLabels:i,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},p)},"createLabel"),At=Na,yt=$((u,t,o,h,l)=>["M",u+l,t,"H",u+o-l,"A",l,l,0,0,1,u+o,t+l,"V",t+h-l,"A",l,l,0,0,1,u+o-l,t+h,"H",u+l,"A",l,l,0,0,1,u,t+h-l,"V",t+l,"A",l,l,0,0,1,u+l,t,"Z"].join(" "),"createRoundedRectPathD"),ns=$(async(u,t)=>{z.info("Creating subgraph rect for ",t.id,t);let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{clusterBkg:r,clusterBorder:p}=h,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=W(t),a=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=at(o),c=a.insert("g").attr("class","cluster-label "),f;t.labelType==="markdown"?f=await nt(c,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):f=await At(c,t.label,t.labelStyle||"",!1,!0);let y=f.getBBox();if(at(o)){let P=f.children[0],D=Z(f);y=P.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,w=t.x-m/2,x=t.y-d/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=v.svg(a),D=I(t,{roughness:.7,fill:r,stroke:p,fillWeight:3,seed:l}),B=P.path(yt(w,x,m,d,0),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:b}=Tt(o);if(c.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let k=S.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(P){return $t(t,P)},{cluster:a,labelBBox:y}},"rect"),Ca=$((u,t)=>{let o=u.insert("g").attr("class","note-cluster").attr("id",t.domId),h=o.insert("rect",":first-child"),l=0*t.padding,r=l/2;h.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let p=h.node().getBBox();return t.width=p.width,t.height=p.height,t.intersect=function(i){return $t(t,i)},{cluster:o,labelBBox:{width:0,height:0}}},"noteGroup"),Ra=$(async(u,t)=>{let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{altBackground:r,compositeBackground:p,compositeTitleBackground:i,nodeBorder:n}=h,e=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),s=e.insert("g",":first-child"),a=e.insert("g").attr("class","cluster-label"),g=e.append("rect"),c=await At(a,t.label,t.labelStyle,void 0,!0),f=c.getBBox();if(at(o)){let B=c.children[0],M=Z(c);f=B.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}let y=0*t.padding,m=y/2,d=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+y;t.width<=f.width+t.padding?t.diff=(d-t.width)/2-t.padding:t.diff=-t.padding;let w=t.height+y,x=t.height+y-f.height-6,S=t.x-d/2,b=t.y-w/2;t.width=d;let k=t.y-t.height/2-m+f.height+2,P;if(t.look==="handDrawn"){let B=t.cssClasses.includes("statediagram-cluster-alt"),M=v.svg(e),C=t.rx||t.ry?M.path(yt(S,b,d,w,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:l}):M.rectangle(S,b,d,w,{seed:l});P=e.insert(()=>C,":first-child");let X=M.rectangle(S,k,d,x,{fill:B?r:p,fillStyle:B?"hachure":"solid",stroke:n,seed:l});P=e.insert(()=>C,":first-child"),g=e.insert(()=>X)}else P=s.insert("rect",":first-child"),P.attr("class","outer").attr("x",S).attr("y",b).attr("width",d).attr("height",w).attr("data-look",t.look),g.attr("class","inner").attr("x",S).attr("y",k).attr("width",d).attr("height",x);a.attr("transform",`translate(${t.x-f.width/2}, ${b+1-(at(o)?0:3)})`);let D=P.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(B){return $t(t,B)},{cluster:e,labelBBox:f}},"roundedWithTitle"),Aa=$(async(u,t)=>{z.info("Creating subgraph rect for ",t.id,t);let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{clusterBkg:r,clusterBorder:p}=h,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=W(t),a=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=at(o),c=a.insert("g").attr("class","cluster-label "),f=await nt(c,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}),y=f.getBBox();if(at(o)){let P=f.children[0],D=Z(f);y=P.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,w=t.x-m/2,x=t.y-d/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=v.svg(a),D=I(t,{roughness:.7,fill:r,stroke:p,fillWeight:4,seed:l}),B=P.path(yt(w,x,m,d,t.rx),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:b}=Tt(o);if(c.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let k=S.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(P){return $t(t,P)},{cluster:a,labelBBox:y}},"kanbanSection"),Ha=$((u,t)=>{let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{nodeBorder:r}=h,p=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),i=p.insert("g",":first-child"),n=0*t.padding,e=t.width+n;t.diff=-t.padding;let s=t.height+n,a=t.x-e/2,g=t.y-s/2;t.width=e;let c;if(t.look==="handDrawn"){let m=v.svg(p).rectangle(a,g,e,s,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:l});c=p.insert(()=>m,":first-child")}else{c=i.insert("rect",":first-child");let y="outer";t.look,y="divider",c.attr("class",y).attr("x",a).attr("y",g).attr("width",e).attr("height",s).attr("data-look",t.look)}let f=c.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return $t(t,y)},{cluster:p,labelBBox:{}}},"divider"),Ia=ns,La={rect:ns,squareRect:Ia,roundedWithTitle:Ra,noteGroup:Ca,divider:Ha,kanbanSection:Aa},cs=new Map,ye=$(async(u,t)=>{let o=t.shape||"rect",h=await La[o](u,t);return cs.set(t.id,h),h},"insertCluster"),pe=$(()=>{cs=new Map},"clear");function os(u,t){return u.intersect(t)}$(os,"intersectNode");var Wa=os;function hs(u,t,o,h){var l=u.x,r=u.y,p=l-h.x,i=r-h.y,n=Math.sqrt(t*t*i*i+o*o*p*p),e=Math.abs(t*o*p/n);h.x0}$(Ot,"sameSign");var Ta=ys;function ps(u,t,o){let h=u.x,l=u.y,r=[],p=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){p=Math.min(p,s.x),i=Math.min(i,s.y)}):(p=Math.min(p,t.x),i=Math.min(i,t.y));let n=h-u.width/2-p,e=l-u.height/2-i;for(let s=0;s1&&r.sort(function(s,a){let g=s.x-o.x,c=s.y-o.y,f=Math.sqrt(g*g+c*c),y=a.x-o.x,m=a.y-o.y,d=Math.sqrt(y*y+m*m);return fs,":first-child");return a.attr("class","anchor").attr("style",K(i)),T(t,a),t.intersect=function(g){return z.info("Circle intersect",t,p,g),N.circle(t,p,g)},r}$(us,"anchor");function jt(u,t,o,h,l,r,p){let n=(u+o)/2,e=(t+h)/2,s=Math.atan2(h-t,o-u),a=(o-u)/2,g=(h-t)/2,c=a/l,f=g/r,y=Math.sqrt(c**2+f**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-y**2),d=n+m*r*Math.sin(s)*(p?-1:1),w=e-m*l*Math.cos(s)*(p?-1:1),x=Math.atan2((t-w)/r,(u-d)/l),b=Math.atan2((h-w)/r,(o-d)/l)-x;p&&b<0&&(b+=2*Math.PI),!p&&b>0&&(b-=2*Math.PI);let k=[];for(let P=0;P<20;P++){let D=P/19,B=x+D*b,M=d+l*Math.cos(B),C=w+r*Math.sin(B);k.push({x:M,y:C})}return k}$(jt,"generateArcPoints");function ds(u,t,o){let[h,l]=[t,o].sort((r,p)=>p-r);return l*(1-Math.sqrt(1-(u/h/2)**2))}$(ds,"calculateArcSagitta");async function ms(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=$(B=>B+p,"calcTotalHeight"),n=$(B=>{let M=B/2;return[M/(2.5+B/50),M]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await O(u,t,Y(t)),a=i(t?.height?t?.height:s.height),[g,c]=n(a),f=ds(a,g,c),m=(t?.width?t?.width:s.width)+r*2+f-f,d=a,{cssStyles:w}=t,x=[{x:m/2,y:-d/2},{x:-m/2,y:-d/2},...jt(-m/2,-d/2,-m/2,d/2,g,c,!1),{x:m/2,y:d/2},...jt(m/2,d/2,m/2,-d/2,g,c,!0)],S=v.svg(e),b=I(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=G(x),P=S.path(k,b),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),D.attr("transform",`translate(${g/2}, 0)`),T(t,D),t.intersect=function(B){return N.polygon(t,x,B)},e}$(ms,"bowTieRect");function ht(u,t,o,h){return u.insert("polygon",":first-child").attr("points",h.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+o/2+")")}$(ht,"insertPolygonShape");var Rt=12;async function ws(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?28:l,p=t.look==="neo"?24:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width??n.width)+(t.look==="neo"?r*2:r+Rt),s=(t?.height??n.height)+(t.look==="neo"?p*2:p),a=0,g=e,c=-s,f=0,y=[{x:a+Rt,y:c},{x:g,y:c},{x:g,y:f},{x:a,y:f},{x:a,y:c+Rt},{x:a+Rt,y:c}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let w=v.svg(i),x=I(t,{}),S=G(y),b=w.path(S,x);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),d&&m.attr("style",d)}else m=ht(i,e,s,y);return h&&m.attr("style",h),T(t,m),t.intersect=function(w){return N.polygon(t,y,w)},i}$(ws,"card");function xs(u,t){let{nodeStyles:o}=W(t);t.label="";let h=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),p=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],i=v.svg(h),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=G(p),s=i.path(e,n),a=h.insert(()=>s,":first-child");return l&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",l),o&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",o),t.width=28,t.height=28,t.intersect=function(g){return N.polygon(t,p,g)},h}$(xs,"choice");async function Gt(u,t,o){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{shapeSvg:r,bbox:p,halfPadding:i}=await O(u,t,Y(t)),n=16,e=o?.padding??i,s=t.look==="neo"?p.width/2+n*2:p.width/2+e,a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(r),f=I(t,{}),y=c.circle(0,0,s*2,f);a=r.insert(()=>y,":first-child"),a.attr("class","basic label-container").attr("style",K(g))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",s).attr("cx",0).attr("cy",0);return T(t,a),t.calcIntersect=function(c,f){let y=c.width/2;return N.circle(c,y,f)},t.intersect=function(c){return z.info("Circle intersect",t,s,c),N.circle(t,s,c)},r}$(Gt,"circle");function bs(u){let t=Math.cos(Math.PI/4),o=Math.sin(Math.PI/4),h=u*2,l={x:h/2*t,y:h/2*o},r={x:-(h/2)*t,y:h/2*o},p={x:-(h/2)*t,y:-(h/2)*o},i={x:h/2*t,y:-(h/2)*o};return`M ${r.x},${r.y} L ${i.x},${i.y} M ${l.x},${l.y} L ${p.x},${p.y}`}$(bs,"createLine");function Ss(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o,t.label="";let l=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),r=Math.max(30,t?.width??0),{cssStyles:p}=t,i=v.svg(l),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=i.circle(0,0,r*2,n),s=bs(r),a=i.path(s,n),g=l.insert(()=>e,":first-child");return g.insert(()=>a),g.attr("class","outer-path"),p&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",h),T(t,g),t.intersect=function(c){return z.info("crossedCircle intersect",t,{radius:r,point:c}),N.circle(t,r,c)},l}$(Ss,"crossedCircle");function ct(u,t,o,h=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;ab,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${a}, 0)`),p.attr("transform",`translate(${-e/2+a-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),T(t,k),t.intersect=function(P){return N.polygon(t,f,P)},l}$($s,"curlyBraceLeft");function ot(u,t,o,h=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;ab,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${-a}, 0)`),p.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),T(t,k),t.intersect=function(P){return N.polygon(t,f,P)},l}$(vs,"curlyBraceRight");function tt(u,t,o,h=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;aB,":first-child").attr("stroke-opacity",0),M.insert(()=>S,":first-child"),M.insert(()=>P,":first-child"),M.attr("class","text"),g&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),M.attr("transform",`translate(${a-a/4}, 0)`),p.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),T(t,M),t.intersect=function(C){return N.polygon(t,y,C)},l}$(ks,"curlyBraces");async function Ps(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=20,n=5,{shapeSvg:e,bbox:s}=await O(u,t,Y(t)),a=Math.max(i,(s.width+r*2)*1.25,t?.width??0),g=Math.max(n,s.height+p*2,t?.height??0),c=g/2,{cssStyles:f}=t,y=v.svg(e),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=a,w=g,x=d-c,S=w/4,b=[{x,y:0},{x:S,y:0},{x:0,y:w/2},{x:S,y:w},{x,y:w},...Ct(-x,-w/2,c,50,270,90)],k=G(b),P=y.path(k,m),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",f),h&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",h),D.attr("transform",`translate(${-a/2}, ${-g/2})`),T(t,D),t.intersect=function(B){return N.polygon(t,b,B)},e}$(Ps,"curvedTrapezoid");var _a=$((u,t,o,h,l,r)=>[`M${u},${t+r}`,`a${l},${r} 0,0,0 ${o},0`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`].join(" "),"createCylinderPathD"),Ya=$((u,t,o,h,l,r)=>[`M${u},${t+r}`,`M${u+o},${t+r}`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`].join(" "),"createOuterCylinderPathD"),Oa=$((u,t,o,h,l,r)=>[`M${u-o/2},${-h/2}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createInnerCylinderPathD"),Jt=8,Qt=8;async function Ds(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?24:l,p=t.look==="neo"?24:l;if(t.width||t.height){let m=t.width??0;t.width=(t.width??0)-p,t.widthb,":first-child"),f=i.insert(()=>S,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{let m=_a(0,0,s,c,a,g);f=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",K(y)).attr("style",h)}return f.attr("label-offset-y",g),f.attr("transform",`translate(${-s/2}, ${-(c/2+g)})`),T(t,f),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(m){let d=N.rect(t,m),w=d.x-(t.x??0);if(a!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(d.y-(t.y??0))>(t.height??0)/2-g)){let x=g*g*(1-w*w/(a*a));x>0&&(x=Math.sqrt(x)),x=g-x,m.y-(t.y??0)>0&&(x=-x),d.y+=x}return d},i}$(Ds,"cylinder");async function vt(u,t,o){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{shapeSvg:r,bbox:p}=await O(u,t,Y(t)),i=Math.max(p.width+o.labelPaddingX*2,t?.width||0),n=Math.max(p.height+o.labelPaddingY*2,t?.height||0),e=-i/2,s=-n/2,a,{rx:g,ry:c}=t,{cssStyles:f}=t;if(o?.rx&&o.ry&&(g=o.rx,c=o.ry),t.look==="handDrawn"){let y=v.svg(r),m=I(t,{}),d=g||c?y.path(yt(e,s,i,n,g||0),m):y.rectangle(e,s,i,n,m);a=r.insert(()=>d,":first-child"),a.attr("class","basic label-container").attr("style",K(f))}else a=r.insert("rect",":first-child"),a.attr("class","basic label-container").attr("style",l).attr("rx",K(g)).attr("ry",K(c)).attr("x",e).attr("y",s).attr("width",i).attr("height",n);return T(t,a),t.calcIntersect=function(y,m){return N.rect(y,m)},t.intersect=function(y){return N.rect(t,y)},r}$(vt,"drawRect");async function Bs(u,t){let{cssClasses:o,labelPaddingX:h,labelPaddingY:l,padding:r,width:p,height:i}=t,n={rx:0,ry:0,classes:o??"",labelPaddingX:h??(r??0)*2,labelPaddingY:l??r??0},e=await vt(u,t,n);if(t.look==="handDrawn"){let c=v.svg(e),f=I(t,{}),y=e.select(".basic.label-container > path:nth-child(2)"),m=y.node();if(!m)return e;let d=null;if(m instanceof SVGGraphicsElement)d=m.getBBox();else return e;return e.insert(()=>c.line(d.x,d.y,d.x+d.width,d.y,f),".basic.label-container g.label"),e.insert(()=>c.line(d.x,d.y+d.height,d.x+d.width,d.y+d.height,f),".basic.label-container g.label"),y.remove(),e}let s=e.select(".basic.label-container"),a=(Number(s.attr("width"))||p)??0,g=(Number(s.attr("height"))||i)??0;return a>0&&g>0&&s.attr("stroke-dasharray",`${a} ${g}`),e}$(Bs,"datastore");async function Ms(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?16:t.padding??0,{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=i.width+l,s=i.height+r,a=s*.2,g=-e/2,c=-s/2-a/2,{cssStyles:f}=t,y=v.svg(p),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:g,y:c+a},{x:-g,y:c+a},{x:-g,y:-c},{x:g,y:-c},{x:g,y:c},{x:-g,y:c},{x:-g,y:c+a}],w=y.polygon(d.map(S=>[S.x,S.y]),m),x=p.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n.attr("transform",`translate(${g+(t.padding??0)/2-(i.x-(i.left??0))}, ${c+a+(t.padding??0)/2-(i.y-(i.top??0))})`),T(t,x),t.intersect=function(S){return N.rect(t,S)},p}$(Ms,"dividedRectangle");async function Ns(u,t){let{labelStyles:o,nodeStyles:h}=W(t),l=t.look==="neo"?12:5;t.labelStyle=o;let r=t.padding??0,p=t.look==="neo"?16:r,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width?t?.width/2:n.width/2)+(p??0),s=e-l,a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(i),f=I(t,{roughness:.2,strokeWidth:2.5}),y=I(t,{roughness:.2,strokeWidth:1.5}),m=c.circle(0,0,e*2,f),d=c.circle(0,0,s*2,y);a=i.insert("g",":first-child"),a.attr("class",K(t.cssClasses)).attr("style",K(g)),a.node()?.appendChild(m),a.node()?.appendChild(d)}else{a=i.insert("g",":first-child");let c=a.insert("circle",":first-child"),f=a.insert("circle");a.attr("class","basic label-container").attr("style",h),c.attr("class","outer-circle").attr("style",h).attr("r",e).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",h).attr("r",s).attr("cx",0).attr("cy",0)}return T(t,a),t.intersect=function(c){return z.info("DoubleCircle intersect",t,e,c),N.circle(t,e,c)},i}$(Ns,"doublecircle");function Cs(u,t,{config:{themeVariables:o}}){let{labelStyles:h,nodeStyles:l}=W(t);t.label="",t.labelStyle=h;let r=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),p=7,{cssStyles:i}=t,n=v.svg(r),{nodeBorder:e}=o,s=I(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(s.roughness=0);let a=n.circle(0,0,p*2,s),g=r.insert(()=>a,":first-child");return g.selectAll("path").attr("style",`fill: ${e} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",l),T(t,g),t.intersect=function(c){return z.info("filledCircle intersect",t,{radius:p,point:c}),N.circle(t,p,c)},r}$(Cs,"filledCircle");var Ut=10,Kt=10;async function Rs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?l*2:l;(t.width||t.height)&&(t.height=t?.height??0,t.heightd,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",h),t.width=e,t.height=s,T(t,w),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-s/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(x){return z.info("Triangle intersect",t,g,x),N.polygon(t,g,x)},p}$(Rs,"flippedTriangle");function As(u,t,{dir:o,config:{state:h,themeVariables:l}}){let{nodeStyles:r}=W(t);t.label="";let p=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,n=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);o==="LR"&&(n=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));let s=-1*n/2,a=-1*e/2,g=v.svg(p),c=I(t,{stroke:l.lineColor,fill:l.lineColor});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let f=g.rectangle(s,a,n,e,c),y=p.insert(()=>f,":first-child");i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",r),T(t,y);let m=h?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(d){return N.rect(t,d)},p}$(As,"forkJoin");async function Hs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=15,r=10,p=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.heightw,":first-child");return x.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),T(t,x),t.intersect=function(S){return z.info("Pill intersect",t,{radius:g,point:S}),N.polygon(t,m,S)},n}$(Hs,"halfRoundedRectangle");var ja=$((u,t,o,h,l)=>[`M${u+l},${t}`,`L${u+o-l},${t}`,`L${u+o},${t-h/2}`,`L${u+o-l},${t-h}`,`L${u+l},${t-h}`,`L${u},${t-h/2}`,"Z"].join(" "),"createHexagonPathD");async function Is(u,t){let{labelStyles:o,nodeStyles:h}=W(t),l=t.look==="neo"?3.5:4;t.labelStyle=o;let r=t.padding??0,p=70,i=32,n=t.look==="neo"?p:r,e=t.look==="neo"?i:r;if(t.width||t.height){let x=(t.height??0)/l;t.width=(t?.width??0)-2*x-e,t.height=(t.height??0)-n}let{shapeSvg:s,bbox:a}=await O(u,t,Y(t)),g=(t?.height?t?.height:a.height)+n,c=g/l,f=(t?.width?t?.width:a.width)+2*c+e,y=[{x:c,y:0},{x:f-c,y:0},{x:f,y:-g/2},{x:f-c,y:-g},{x:c,y:-g},{x:0,y:-g/2}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let w=v.svg(s),x=I(t,{}),S=ja(0,0,f,g,c),b=w.path(S,x);m=s.insert(()=>b,":first-child").attr("transform",`translate(${-f/2}, ${g/2})`),d&&m.attr("style",d)}else m=ht(s,f,g,y);return h&&m.attr("style",h),t.width=f,t.height=g,T(t,m),t.intersect=function(w){return N.polygon(t,y,w)},s}$(Is,"hexagon");async function Ls(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.label="",t.labelStyle=o;let{shapeSvg:l}=await O(u,t,Y(t)),r=Math.max(30,t?.width??0),p=Math.max(30,t?.height??0),{cssStyles:i}=t,n=v.svg(l),e=I(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");let s=[{x:0,y:0},{x:r,y:0},{x:0,y:p},{x:r,y:p}],a=G(s),g=n.path(a,e),c=l.insert(()=>g,":first-child");return c.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",i),h&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",h),c.attr("transform",`translate(${-r/2}, ${-p/2})`),T(t,c),t.intersect=function(f){return z.info("Pill intersect",t,{points:s}),N.polygon(t,s,f)},l}$(Ls,"hourglass");async function Ws(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,label:a}=await O(u,t,"icon-shape default"),g=t.pos==="t",c=i,f=i,{nodeBorder:y}=o,{stylesMap:m}=Bt(t),d=-f/2,w=-c/2,x=t.label?8:0,S=v.svg(e),b=I(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=S.rectangle(d,w,f,c,b),P=Math.max(f,s.width),D=c+s.height+x,B=S.rectangle(-P/2,-D/2,P,D,{...b,fill:"transparent",stroke:"none"}),M=e.insert(()=>k,":first-child"),C=e.insert(()=>B);if(t.icon){let X=e.append("g");X.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let R=X.node().getBBox(),L=R.width,H=R.height,A=R.x,E=R.y;X.attr("transform",`translate(${-L/2-A},${g?s.height/2+x/2-H/2-E:-s.height/2-x/2-H/2-E})`),X.attr("style",`color: ${m.get("stroke")??y};`)}return a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${g?-D/2:D/2-s.height})`),M.attr("transform",`translate(0,${g?s.height/2+x/2:-s.height/2-x/2})`),T(t,C),t.intersect=function(X){if(z.info("iconSquare intersect",t,X),!t.label)return N.rect(t,X);let R=t.x??0,L=t.y??0,H=t.height??0,A=[];return g?A=[{x:R-s.width/2,y:L-H/2},{x:R+s.width/2,y:L-H/2},{x:R+s.width/2,y:L-H/2+s.height+x},{x:R+f/2,y:L-H/2+s.height+x},{x:R+f/2,y:L+H/2},{x:R-f/2,y:L+H/2},{x:R-f/2,y:L-H/2+s.height+x},{x:R-s.width/2,y:L-H/2+s.height+x}]:A=[{x:R-f/2,y:L-H/2},{x:R+f/2,y:L-H/2},{x:R+f/2,y:L-H/2+c},{x:R+s.width/2,y:L-H/2+c},{x:R+s.width/2/2,y:L+H/2},{x:R-s.width/2,y:L+H/2},{x:R-s.width/2,y:L-H/2+c},{x:R-f/2,y:L-H/2+c}],N.polygon(t,A,X)},e}$(Ws,"icon");async function Es(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,label:a}=await O(u,t,"icon-shape default"),g=20,c=t.label?8:0,f=t.pos==="t",{nodeBorder:y,mainBkg:m}=o,{stylesMap:d}=Bt(t),w=v.svg(e),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let S=d.get("fill");x.stroke=S??m;let b=e.append("g");t.icon&&b.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let k=b.node().getBBox(),P=k.width,D=k.height,B=k.x,M=k.y,C=Math.max(P,D)*Math.SQRT2+g*2,X=w.circle(0,0,C,x),R=Math.max(C,s.width),L=C+s.height+c,H=w.rectangle(-R/2,-L/2,R,L,{...x,fill:"transparent",stroke:"none"}),A=e.insert(()=>X,":first-child"),E=e.insert(()=>H);return b.attr("transform",`translate(${-P/2-B},${f?s.height/2+c/2-D/2-M:-s.height/2-c/2-D/2-M})`),b.attr("style",`color: ${d.get("stroke")??y};`),a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${f?-L/2:L/2-s.height})`),A.attr("transform",`translate(0,${f?s.height/2+c/2:-s.height/2-c/2})`),T(t,E),t.intersect=function(_){return z.info("iconSquare intersect",t,_),N.rect(t,_)},e}$(Es,"iconCircle");async function Ts(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,halfPadding:a,label:g}=await O(u,t,"icon-shape default"),c=t.pos==="t",f=i+a*2,y=i+a*2,{nodeBorder:m,mainBkg:d}=o,{stylesMap:w}=Bt(t),x=-y/2,S=-f/2,b=t.label?8:0,k=v.svg(e),P=I(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=w.get("fill");P.stroke=D??d;let B=k.path(yt(x,S,y,f,5),P),M=Math.max(y,s.width),C=f+s.height+b,X=k.rectangle(-M/2,-C/2,M,C,{...P,fill:"transparent",stroke:"none"}),R=e.insert(()=>B,":first-child").attr("class","icon-shape2"),L=e.insert(()=>X);if(t.icon){let H=e.append("g");H.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let A=H.node().getBBox(),E=A.width,_=A.height,F=A.x,q=A.y;H.attr("transform",`translate(${-E/2-F},${c?s.height/2+b/2-_/2-q:-s.height/2-b/2-_/2-q})`),H.attr("style",`color: ${w.get("stroke")??m};`)}return g.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-C/2:C/2-s.height})`),R.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),T(t,L),t.intersect=function(H){if(z.info("iconSquare intersect",t,H),!t.label)return N.rect(t,H);let A=t.x??0,E=t.y??0,_=t.height??0,F=[];return c?F=[{x:A-s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2+s.height+b},{x:A+y/2,y:E-_/2+s.height+b},{x:A+y/2,y:E+_/2},{x:A-y/2,y:E+_/2},{x:A-y/2,y:E-_/2+s.height+b},{x:A-s.width/2,y:E-_/2+s.height+b}]:F=[{x:A-y/2,y:E-_/2},{x:A+y/2,y:E-_/2},{x:A+y/2,y:E-_/2+f},{x:A+s.width/2,y:E-_/2+f},{x:A+s.width/2/2,y:E+_/2},{x:A-s.width/2,y:E+_/2},{x:A-s.width/2,y:E-_/2+f},{x:A-y/2,y:E-_/2+f}],N.polygon(t,F,H)},e}$(Ts,"iconRounded");async function Xs(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,halfPadding:a,label:g}=await O(u,t,"icon-shape default"),c=t.pos==="t",f=i+a*2,y=i+a*2,{nodeBorder:m,mainBkg:d}=o,{stylesMap:w}=Bt(t),x=-y/2,S=-f/2,b=t.label?8:0,k=v.svg(e),P=I(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=w.get("fill");P.stroke=D??d;let B=k.path(yt(x,S,y,f,.1),P),M=Math.max(y,s.width),C=f+s.height+b,X=k.rectangle(-M/2,-C/2,M,C,{...P,fill:"transparent",stroke:"none"}),R=e.insert(()=>B,":first-child"),L=e.insert(()=>X);if(t.icon){let H=e.append("g");H.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let A=H.node().getBBox(),E=A.width,_=A.height,F=A.x,q=A.y;H.attr("transform",`translate(${-E/2-F},${c?s.height/2+b/2-_/2-q:-s.height/2-b/2-_/2-q})`),H.attr("style",`color: ${w.get("stroke")??m};`)}return g.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-C/2:C/2-s.height})`),R.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),T(t,L),t.intersect=function(H){if(z.info("iconSquare intersect",t,H),!t.label)return N.rect(t,H);let A=t.x??0,E=t.y??0,_=t.height??0,F=[];return c?F=[{x:A-s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2+s.height+b},{x:A+y/2,y:E-_/2+s.height+b},{x:A+y/2,y:E+_/2},{x:A-y/2,y:E+_/2},{x:A-y/2,y:E-_/2+s.height+b},{x:A-s.width/2,y:E-_/2+s.height+b}]:F=[{x:A-y/2,y:E-_/2},{x:A+y/2,y:E-_/2},{x:A+y/2,y:E-_/2+f},{x:A+s.width/2,y:E-_/2+f},{x:A+s.width/2/2,y:E+_/2},{x:A-s.width/2,y:E+_/2},{x:A-s.width/2,y:E-_/2+f},{x:A-y/2,y:E-_/2+f}],N.polygon(t,F,H)},e}$(Xs,"iconSquare");async function _s(u,t,{config:{flowchart:o}}){let h=new Image;h.src=t?.img??"",await h.decode();let l=Number(h.naturalWidth.toString().replace("px","")),r=Number(h.naturalHeight.toString().replace("px",""));t.imageAspectRatio=l/r;let{labelStyles:p}=W(t);t.labelStyle=p;let i=o?.wrappingWidth;t.defaultWidth=o?.wrappingWidth;let n=Math.max(t.label?i??0:0,t?.assetWidth??l),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,s=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??r;t.width=Math.max(e,i??0);let{shapeSvg:a,bbox:g,label:c}=await O(u,t,"image-shape default"),f=t.pos==="t",y=-e/2,m=-s/2,d=t.label?8:0,w=v.svg(a),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let S=w.rectangle(y,m,e,s,x),b=Math.max(e,g.width),k=s+g.height+d,P=w.rectangle(-b/2,-k/2,b,k,{...x,fill:"none",stroke:"none"}),D=a.insert(()=>S,":first-child"),B=a.insert(()=>P);if(t.img){let M=a.append("image");M.attr("href",t.img),M.attr("width",e),M.attr("height",s),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-e/2},${f?k/2-s:-k/2})`)}return c.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${f?-s/2-g.height/2-d/2:s/2-g.height/2+d/2})`),D.attr("transform",`translate(0,${f?g.height/2+d/2:-g.height/2-d/2})`),T(t,B),t.intersect=function(M){if(z.info("iconSquare intersect",t,M),!t.label)return N.rect(t,M);let C=t.x??0,X=t.y??0,R=t.height??0,L=[];return f?L=[{x:C-g.width/2,y:X-R/2},{x:C+g.width/2,y:X-R/2},{x:C+g.width/2,y:X-R/2+g.height+d},{x:C+e/2,y:X-R/2+g.height+d},{x:C+e/2,y:X+R/2},{x:C-e/2,y:X+R/2},{x:C-e/2,y:X-R/2+g.height+d},{x:C-g.width/2,y:X-R/2+g.height+d}]:L=[{x:C-e/2,y:X-R/2},{x:C+e/2,y:X-R/2},{x:C+e/2,y:X-R/2+s},{x:C+g.width/2,y:X-R/2+s},{x:C+g.width/2/2,y:X+R/2},{x:C-g.width/2,y:X+R/2},{x:C-g.width/2,y:X-R/2+s},{x:C-e/2,y:X-R/2+s}],N.polygon(t,L,M)},a}$(_s,"imageSquare");async function Ys(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=Math.max(n.width+(p??0)*2,t?.width??0),s=Math.max(n.height+(r??0)*2,t?.height??0),a=[{x:0,y:0},{x:e,y:0},{x:e+3*s/6,y:-s},{x:-3*s/6,y:-s}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),c&&g.attr("style",c)}else g=ht(i,e,s,a);return h&&g.attr("style",h),t.width=e,t.height=s,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(Ys,"inv_trapezoid");async function Os(u,t){let{shapeSvg:o,bbox:h,label:l}=await O(u,t,"label"),r=o.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),o.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),T(t,r),t.intersect=function(n){return N.rect(t,n)},o}$(Os,"labelRect");async function js(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:0,y:0},{x:s+3*e/6,y:0},{x:s,y:-e},{x:-(3*e)/6,y:-e}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&g.attr("style",c)}else g=ht(i,s,e,a);return h&&g.attr("style",h),t.width=s,t.height=e,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(js,"lean_left");async function Gs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:-3*e/6,y:0},{x:s,y:0},{x:s+3*e/6,y:-e},{x:0,y:-e}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&g.attr("style",c)}else g=ht(i,s,e,a);return h&&g.attr("style",h),t.width=s,t.height=e,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(Gs,"lean_right");function Fs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.label="",t.labelStyle=o;let l=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,p=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,e=[{x:p,y:0},{x:0,y:i+n/2},{x:p-2*n,y:i+n/2},{x:0,y:2*i},{x:p,y:i-n/2},{x:2*n,y:i-n/2}],s=v.svg(l),a=I(t,{});t.look!=="handDrawn"&&(a.roughness=0,a.fillStyle="solid");let g=G(e),c=s.path(g,a),f=l.insert(()=>c,":first-child");return f.attr("class","outer-path"),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),h&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",h),f.attr("transform",`translate(-${p/2},${-i})`),T(t,f),t.intersect=function(y){return z.info("lightningBolt intersect",t,y),N.polygon(t,e,y)},l}$(Fs,"lightningBolt");var Ga=$((u,t,o,h,l,r,p)=>[`M${u},${t+r}`,`a${l},${r} 0,0,0 ${o},0`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`,`M${u},${t+r+p}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createCylinderPathD"),Fa=$((u,t,o,h,l,r,p)=>[`M${u},${t+r}`,`M${u+o},${t+r}`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`,`M${u},${t+r+p}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createOuterCylinderPathD"),qa=$((u,t,o,h,l,r)=>[`M${u-o/2},${-h/2}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createInnerCylinderPathD"),ts=10,ss=10;async function qs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?24:l;if(t.width||t.height){let d=t.width??0;t.width=(t.width??0)-r,t.widthk,":first-child").attr("class","line"),y=i.insert(()=>b,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{let d=Ga(0,0,s,c,a,g,f);y=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",K(m)).attr("style",h)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-s/2}, ${-(c/2+g)})`),T(t,y),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+g-(n.y-(n.top??0))})`),t.intersect=function(d){let w=N.rect(t,d),x=w.x-(t.x??0);if(a!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-g)){let S=g*g*(1-x*x/(a*a));S>0&&(S=Math.sqrt(S)),S=g-S,d.y-(t.y??0)>0&&(S=-S),w.y+=S}return w},i}$(qs,"linedCylinder");async function zs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;if(t.width||t.height){let S=t.width;t.width=(S??0)*10/11-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-p*2,t.height<10&&(t.height=10)}let{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=(t?.width?t?.width:n.width)+(r??0)*2,a=(t?.height?t?.height:n.height)+(p??0)*2,g=t.look==="neo"?a/4:a/8,c=a+g,{cssStyles:f}=t,y=v.svg(i),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...ft(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,g,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],w=y.polygon(d.map(S=>[S.x,S.y]),m),x=i.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),x.attr("transform",`translate(0,${-g/2})`),e.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-a/2+(t.padding??0)-g/2-(n.y-(n.top??0))})`),T(t,x),t.intersect=function(S){return N.polygon(t,d,S)},i}$(zs,"linedWaveEdgedRect");async function Vs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2-2*i,10),t.height=Math.max((t?.height??0)-p*2-2*i,10));let{shapeSvg:n,bbox:e,label:s}=await O(u,t,Y(t)),a=(t?.width?t?.width:e.width)+r*2+2*i,g=(t?.height?t?.height:e.height)+p*2+2*i,c=a-2*i,f=g-2*i,y=-c/2,m=-f/2,{cssStyles:d}=t,w=v.svg(n),x=I(t,{}),S=[{x:y-i,y:m+i},{x:y-i,y:m+f+i},{x:y+c-i,y:m+f+i},{x:y+c-i,y:m+f},{x:y+c,y:m+f},{x:y+c,y:m+f-i},{x:y+c+i,y:m+f-i},{x:y+c+i,y:m-i},{x:y+i,y:m-i},{x:y+i,y:m},{x:y,y:m},{x:y,y:m+i}],b=[{x:y,y:m+i},{x:y+c-i,y:m+i},{x:y+c-i,y:m+f},{x:y+c,y:m+f},{x:y+c,y:m},{x:y,y:m}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=G(S),P=w.path(k,x),D=G(b),B=w.path(D,x);t.look!=="handDrawn"&&(P=Yt(P),B=Yt(B));let M=n.insert("g",":first-child");return M.insert(()=>P),M.insert(()=>B),M.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),s.attr("transform",`translate(${-(e.width/2)-i-(e.x-(e.left??0))}, ${-(e.height/2)+i-(e.y-(e.top??0))})`),T(t,M),t.intersect=function(C){return N.polygon(t,S,C)},n}$(Vs,"multiRect");async function Zs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,label:p}=await O(u,t,Y(t)),i=t.padding??0,n=t.look==="neo"?16:i,e=t.look==="neo"?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-e*3);let a=Math.max(r.width,t?.width??0)+n*2,g=Math.max(r.height,t?.height??0)+e*3,c=t.look==="neo"?g/4:g/8,f=g+(s?c/2:-c/2),y=-a/2,m=-f/2,d=10,{cssStyles:w}=t,x=ft(y-d,m+f+d,y+a-d,m+f+d,c,.8),S=x?.[x.length-1],b=[{x:y-d,y:m+d},{x:y-d,y:m+f+d},...x,{x:y+a-d,y:S.y-d},{x:y+a,y:S.y-d},{x:y+a,y:S.y-2*d},{x:y+a+d,y:S.y-2*d},{x:y+a+d,y:m-d},{x:y+d,y:m-d},{x:y+d,y:m},{x:y,y:m},{x:y,y:m+d}],k=[{x:y,y:m+d},{x:y+a-d,y:m+d},{x:y+a-d,y:S.y-d},{x:y+a,y:S.y-d},{x:y+a,y:m},{x:y,y:m}],P=v.svg(l),D=I(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let B=G(b),M=P.path(B,D),C=G(k),X=P.path(C,D),R=l.insert(()=>M,":first-child");return R.insert(()=>X),R.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",h),R.attr("transform",`translate(0,${-c/2})`),p.attr("transform",`translate(${-(r.width/2)-d-(r.x-(r.left??0))}, ${-(r.height/2)+d-c/2-(r.y-(r.top??0))})`),T(t,R),t.intersect=function(L){return N.polygon(t,b,L)},l}$(Zs,"multiWaveEdgedRectangle");async function Js(u,t,{config:{themeVariables:o}}){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h,t.useHtmlLabels||at(wt())||(t.centerLabel=!0);let{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=Math.max(i.width+(t.padding??0)*2,t?.width??0),s=Math.max(i.height+(t.padding??0)*2,t?.height??0),a=-e/2,g=-s/2,{cssStyles:c}=t,f=v.svg(p),y=I(t,{fill:o.noteBkgColor,stroke:o.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=f.rectangle(a,g,e,s,y),d=p.insert(()=>m,":first-child");return d.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),c&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",c),l&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",l),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),T(t,d),t.intersect=function(w){return N.rect(t,w)},p}$(Js,"note");var za=$((u,t,o)=>[`M${u+o/2},${t}`,`L${u+o},${t-o/2}`,`L${u+o/2},${t-o}`,`L${u},${t-o/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r}=await O(u,t,Y(t)),p=r.width+(t.padding??0),i=r.height+(t.padding??0),n=p+i,e=.5,s=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(l),f=I(t,{}),y=za(0,0,n),m=c.path(y,f);a=l.insert(()=>m,":first-child").attr("transform",`translate(${-n/2+e}, ${n/2})`),g&&a.attr("style",g)}else a=ht(l,n,n,s),a.attr("transform",`translate(${-n/2+e}, ${n/2})`);return h&&a.attr("style",h),T(t,a),t.calcIntersect=function(c,f){let y=c.width,m=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],d=N.polygon(c,m,f);return{x:d.x-.5,y:d.y-.5}},t.intersect=function(c){return this.calcIntersect(t,c)},l}$(Qs,"question");async function Us(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?21:l??0,p=t.look==="neo"?12:l??0,{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=(t?.width??n.width)+(t.look==="neo"?r*2:r),a=(t?.height??n.height)+(t.look==="neo"?p*2:p),g=-s/2,c=-a/2,f=c/2,y=[{x:g+f,y:c},{x:g,y:0},{x:g+f,y:-c},{x:-g,y:-c},{x:-g,y:c}],{cssStyles:m}=t,d=v.svg(i),w=I(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let x=G(y),S=d.path(x,w),b=i.insert(()=>S,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),b.attr("transform",`translate(${-f/2},0)`),e.attr("transform",`translate(${-f/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),T(t,b),t.intersect=function(k){return N.polygon(t,y,k)},i}$(Us,"rect_left_inv_arrow");async function Ks(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l;t.cssClasses?l="node "+t.cssClasses:l="node default";let r=u.insert("g").attr("class",l).attr("id",t.domId||t.id),p=r.insert("g"),i=r.insert("g").attr("class","label").attr("style",h),n=t.description,e=t.label,s=await At(i,e,t.labelStyle,!0,!0),a={width:0,height:0};if(at(U())){let D=s.children[0],B=Z(s);a=D.getBoundingClientRect(),B.attr("width",a.width),B.attr("height",a.height)}z.info("Text 2",n);let g=n||[],c=s.getBBox(),f=await At(i,Array.isArray(g)?g.join("
"):g,t.labelStyle,!0,!0),y=f.children[0],m=Z(f);a=y.getBoundingClientRect(),m.attr("width",a.width),m.attr("height",a.height);let d=(t.padding||0)/2;Z(f).attr("transform","translate( "+(a.width>c.width?0:(c.width-a.width)/2)+", "+(c.height+d+5)+")"),Z(s).attr("transform","translate( "+(a.width(z.debug("Rough node insert CXC",M),C),":first-child"),k=r.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child")}else k=p.insert("rect",":first-child"),P=p.insert("line"),k.attr("class","outer title-state").attr("style",h).attr("x",-a.width/2-d).attr("y",-a.height/2-d).attr("width",a.width+(t.padding||0)).attr("height",a.height+(t.padding||0)),P.attr("class","divider").attr("x1",-a.width/2-d).attr("x2",a.width/2+d).attr("y1",-a.height/2-d+c.height+d).attr("y2",-a.height/2-d+c.height+d);return T(t,k),t.intersect=function(D){return N.rect(t,D)},r}$(Ks,"rectWithTitle");async function ta(u,t,{config:{themeVariables:o}}){let h=o?.radius??5,l={rx:h,ry:h,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return vt(u,t,l)}$(ta,"roundedRect");var dt=8;async function sa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0,{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=(t?.width??i.width)+l*2+(t.look==="neo"?dt:dt*2),s=(t?.height??i.height)+r*2,a=e-dt,g=s,c=dt-e/2,f=-s/2,{cssStyles:y}=t,m=v.svg(p),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let w=[{x:c,y:f},{x:c+a,y:f},{x:c+a,y:f+g},{x:c-dt,y:f+g},{x:c-dt,y:f},{x:c,y:f},{x:c,y:f+g}],x=m.polygon(w.map(b=>[b.x,b.y]),d),S=p.insert(()=>x,":first-child");return S.attr("class","basic label-container outer-path").attr("style",K(y)),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n.attr("transform",`translate(${dt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),T(t,S),t.intersect=function(b){return N.rect(t,b)},p}$(sa,"shadedProcess");async function aa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2,10),t.height=Math.max((t?.height??0)/1.5-p*2,10));let{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=(t?.width?t?.width:n.width)+r*2,a=((t?.height?t?.height:n.height)+p*2)*1.5,g=s,c=a/1.5,f=-g/2,y=-c/2,{cssStyles:m}=t,d=v.svg(i),w=I(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let x=[{x:f,y},{x:f,y:y+c},{x:f+g,y:y+c},{x:f+g,y:y-c/2}],S=G(x),b=d.path(S,w),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),h&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",h),k.attr("transform",`translate(0, ${c/4})`),e.attr("transform",`translate(${-g/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),T(t,k),t.intersect=function(P){return N.polygon(t,x,P)},i}$(aa,"slopedRect");async function ea(u,t){let o=t.padding??0,h=t.look==="neo"?16:o*2,l=t.look==="neo"?12:o,r={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??h,labelPaddingY:l};return vt(u,t,r)}$(ea,"squareRect");async function ia(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?20:l,p=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=n.height+(t.look==="neo"?p*2:p),s=n.width+e/4+(t.look==="neo"?r*2:r),a=e/2,{cssStyles:g}=t,c=v.svg(i),f=I(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let y=[{x:-s/2+a,y:-e/2},{x:s/2-a,y:-e/2},...Ct(-s/2+a,0,a,50,90,270),{x:s/2-a,y:e/2},...Ct(s/2-a,0,a,50,270,450)],m=G(y),d=c.path(m,f),w=i.insert(()=>d,":first-child");return w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),h&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",h),T(t,w),t.intersect=function(x){return N.polygon(t,y,x)},i}$(ia,"stadium");async function ra(u,t){let o={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return vt(u,t,o)}$(ra,"state");function la(u,t,{config:{themeVariables:o}}){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{cssStyles:r}=t,{lineColor:p,stateBorder:i,nodeBorder:n,nodeShadow:e}=o;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let s=u.insert("g").attr("class","node default").attr("id",t.domId??t.id),a=v.svg(s),g=I(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let c=a.circle(0,0,t.width,{...g,stroke:p,strokeWidth:2}),f=i??n,y=(t.width??0)*5/14,m=a.circle(0,0,y,{...g,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),d=s.insert(()=>c,":first-child");if(d.insert(()=>m),t.look!=="handDrawn"&&d.attr("class","outer-path"),r&&d.selectAll("path").attr("style",r),l&&d.selectAll("path").attr("style",l),t.width<25&&e&&t.look!=="handDrawn"){let w=u.node()?.ownerSVGElement?.id??"",x=w?`${w}-drop-shadow-small`:"drop-shadow-small";d.attr("style",`filter:url(#${x})`)}return T(t,d),t.intersect=function(w){return N.circle(t,(t.width??0)/2,w)},s}$(la,"stateEnd");function na(u,t,{config:{themeVariables:o}}){let{lineColor:h,nodeShadow:l}=o;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let r=u.insert("g").attr("class","node default").attr("id",t.domId||t.id),p;if(t.look==="handDrawn"){let n=v.svg(r).circle(0,0,t.width,Zt(h));p=r.insert(()=>n),p.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else p=r.insert("circle",":first-child"),p.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&l&&t.look!=="handDrawn"){let i=u.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";p.attr("style",`filter:url(#${n})`)}return T(t,p),t.intersect=function(i){return N.circle(t,(t.width??7)/2,i)},r}$(na,"stateStart");var xt=8;async function ca(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t?.padding??8,r=t.look==="neo"?28:l,p=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width??n.width)+2*xt+r,s=(t?.height??n.height)+p,a=e-2*xt,g=s,c=-e/2,f=-s/2,y=[{x:0,y:0},{x:a,y:0},{x:a,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){let m=v.svg(i),d=I(t,{}),w=m.rectangle(c,f,a+16,g,d),x=m.line(c+xt,f,c+xt,f+g,d),S=m.line(c+xt+a,f,c+xt+a,f+g,d);i.insert(()=>x,":first-child"),i.insert(()=>S,":first-child");let b=i.insert(()=>w,":first-child"),{cssStyles:k}=t;b.attr("class","basic label-container").attr("style",K(k)),T(t,b)}else{let m=ht(i,a,g,y);h&&m.attr("style",h),T(t,m)}return t.intersect=function(m){return N.polygon(t,y,m)},i}$(ca,"subroutine");var _t=.2;async function oa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-p*2,10),t.width=Math.max((t?.width??0)-r*2-_t*(t.height+p*2),10));let{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height?t?.height:n.height)+p*2,s=_t*e,a=_t*e,c=(t?.width?t?.width:n.width)+r*2+s-s,f=e,y=-c/2,m=-f/2,{cssStyles:d}=t,w=v.svg(i),x=I(t,{}),S=[{x:y-s/2,y:m},{x:y+c+s/2,y:m},{x:y+c+s/2,y:m+f},{x:y-s/2,y:m+f}],b=[{x:y+c-s/2,y:m+f},{x:y+c+s/2,y:m+f},{x:y+c+s/2,y:m+f-a}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=G(S),P=w.path(k,x),D=G(b),B=w.path(D,{...x,fillStyle:"solid"}),M=i.insert(()=>B,":first-child");return M.insert(()=>P,":first-child"),M.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),T(t,M),t.intersect=function(C){return N.polygon(t,S,C)},i}$(oa,"taggedRect");async function ha(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,label:p}=await O(u,t,Y(t)),i=Math.max(r.width+(t.padding??0)*2,t?.width??0),n=Math.max(r.height+(t.padding??0)*2,t?.height??0),e=n/8,s=.2*i,a=.2*n,g=n+e,{cssStyles:c}=t,f=v.svg(l),y=I(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-i/2-i/2*.1,y:g/2},...ft(-i/2-i/2*.1,g/2,i/2+i/2*.1,g/2,e,.8),{x:i/2+i/2*.1,y:-g/2},{x:-i/2-i/2*.1,y:-g/2}],d=-i/2+i/2*.1,w=-g/2-a*.4,x=[{x:d+i-s,y:(w+n)*1.3},{x:d+i,y:w+n-a},{x:d+i,y:(w+n)*.9},...ft(d+i,(w+n)*1.25,d+i-s,(w+n)*1.3,-n*.02,.5)],S=G(m),b=f.path(S,y),k=G(x),P=f.path(k,{...y,fillStyle:"solid"}),D=l.insert(()=>P,":first-child");return D.insert(()=>b,":first-child"),D.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),D.attr("transform",`translate(0,${-e/2})`),p.attr("transform",`translate(${-i/2+(t.padding??0)-(r.x-(r.left??0))},${-n/2+(t.padding??0)-e/2-(r.y-(r.top??0))})`),T(t,D),t.intersect=function(B){return N.polygon(t,m,B)},l}$(ha,"taggedWaveEdgedRectangle");async function ga(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r}=await O(u,t,Y(t)),p=Math.max(r.width+(t.padding??0),t?.width||0),i=Math.max(r.height+(t.padding??0),t?.height||0),n=-p/2,e=-i/2,s=l.insert("rect",":first-child");return s.attr("class","text").attr("style",h).attr("rx",0).attr("ry",0).attr("x",n).attr("y",e).attr("width",p).attr("height",i),T(t,s),t.intersect=function(a){return N.rect(t,a)},l}$(ga,"text");var Va=$((u,t,o,h,l,r)=>`M${u},${t} a${l},${r} 0,0,1 0,${-h} l${o},0 @@ -60,4 +60,4 @@ import{a as v}from"./chunk-NTMILJIW.min.js";import{a as Zt,b as Bt,d as W,e as I q${-s},0 ${-s},${-s} Z `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let g=l.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",h).attr("d",a);return l.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",e/2).attr("x2",n/2).attr("y2",e/2),i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`),l.append(()=>i.node()),T(t,g),t.calcIntersect=function(c,f){return N.rect(c,f)},t.intersect=function(c){return N.rect(t,c)},l}$(Pa,"defaultMindmapNode");async function Da(u,t){let o={padding:t.padding??0};return Gt(u,t,o)}$(Da,"mindmapCircle");var Ka=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ea},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ta},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ia},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ca},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ds},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Bs},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Gt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:va},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ka},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Qs},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Is},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Gs},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:js},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ya},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ys},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ns},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ga},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ws},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:sa},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:na},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:la},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:As},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ls},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$s},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:vs},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ks},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Fs},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:da},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Hs},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:fa},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:qs},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Ps},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ms},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ua},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:wa},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Cs},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:pa},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Rs},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:aa},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Zs},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Vs},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ms},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ss},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ha},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:oa},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ma},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Us},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:zs}],te=$(()=>{let t=[...Object.entries({state:ra,choice:xs,note:Js,rectWithTitle:Ks,labelRect:Os,iconSquare:Xs,iconCircle:Es,icon:Ws,iconRounded:Ts,imageSquare:_s,anchor:us,kanbanItem:$a,mindmapCircle:Da,defaultMindmapNode:Pa,classBox:ba,erBox:Ft,requirementBox:Sa}),...Ka.flatMap(o=>[o.shortName,..."aliases"in o?o.aliases:[],..."internalAliases"in o?o.internalAliases:[]].map(l=>[l,o.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Ba=te();function se(u){return u in Ba}$(se,"isValidShape");var Ht=new Map;async function ae(u,t,o){let h,l;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let r=t.shape?Ba[t.shape]:void 0;if(!r)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let p;o.config.securityLevel==="sandbox"?p="_top":t.linkTarget&&(p=t.linkTarget||"_blank"),h=u.insert("svg:a").attr("xlink:href",t.link).attr("target",p??null),l=await r(h,t,o)}else l=await r(u,t,o),h=l;return h.attr("data-look",K(t.look)),t.tooltip&&l.attr("title",t.tooltip),Ht.set(t.id,h),t.haveCallback&&h.attr("class",h.attr("class")+" clickable"),h}$(ae,"insertNode");var Pi=$((u,t)=>{Ht.set(t.id,u)},"setNodeElem"),Di=$(()=>{Ht.clear()},"clear"),Bi=$(u=>{let t=Ht.get(u.id);z.trace("Transforming node",u.diff,u,"translate("+(u.x-u.width/2-5)+", "+u.width/2+")");let o=8,h=u.diff||0;return u.clusterNode?t.attr("transform","translate("+(u.x+h-u.width/2)+", "+(u.y-u.height/2-o)+")"):t.attr("transform","translate("+u.x+", "+u.y+")"),h},"positionNode");export{O as a,T as b,At as c,ye as d,pe as e,se as f,ae as g,Pi as h,Di as i,Bi as j}; -//# sourceMappingURL=chunk-YKKTY4W7.min.js.map +//# sourceMappingURL=chunk-2WVNBDAO.min.js.map diff --git a/templates/tabulareditor/public/chunk-YKKTY4W7.min.js.map b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js.map similarity index 100% rename from templates/tabulareditor/public/chunk-YKKTY4W7.min.js.map rename to templates/tabulareditor/public/chunk-2WVNBDAO.min.js.map diff --git a/templates/tabulareditor/public/chunk-GFGWOWNB.min.js b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js similarity index 99% rename from templates/tabulareditor/public/chunk-GFGWOWNB.min.js rename to templates/tabulareditor/public/chunk-5JDMXW2E.min.js index 2b17f93ac..51f770364 100644 --- a/templates/tabulareditor/public/chunk-GFGWOWNB.min.js +++ b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js @@ -1,4 +1,4 @@ -import{a as lt}from"./chunk-MZ3CL6N5.min.js";import{a as ct}from"./chunk-INAAVCJQ.min.js";import{a as ot}from"./chunk-BT7FBF3C.min.js";import{b as rt,c as nt}from"./chunk-WVPFQPJS.min.js";import{h as ut}from"./chunk-CDHWQHFE.min.js";import{p as Ae,s as at}from"./chunk-AVP3GJKJ.min.js";import{H as He,J as P,N as v,T as Je,U as Ze,V as $e,W as et,X as tt,Y as st,Z as it,_ as F,g as qe}from"./chunk-JBDIJRTV.min.js";import{b,d as pe,j as Z}from"./chunk-BJGJ3C53.min.js";var Ve=(function(){var t=b(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],k=[1,25],f=[1,32],N=[1,33],fe=[1,34],m=[1,45],ke=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],C=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],$=[1,58],ee=[1,59],te=[1,60],se=[1,61],ie=[1,62],_e=[1,63],Se=[1,64],_=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ae=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],re=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ue=[12,39],Ne=[1,8,9,39,41,44,46],le=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:b(function(o,h,p,u,g,e,J){var s=e.length-1;switch(g){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:$,69:ee,70:te,71:se,72:ie,73:_e,74:Se}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:m,86:C,100:E,102:T},{16:39,17:40,19:70,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:71,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:72,60:m,86:C,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:m,86:C,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:m,86:C,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:87,60:m,86:C,100:E,102:T,103:y},t(ae,[2,133]),t(ae,[2,134]),t(ae,[2,135]),t(ae,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:m,86:C,100:E,102:T,103:y},{53:92,66:56,67:57,68:$,69:ee,70:te,71:se,72:ie,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(re,[2,83],{66:94,68:$,69:ee,70:te,71:se,72:ie}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:f,56:N},{16:100,60:m,86:C,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:m,86:C,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Me,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Ge,[2,74]),{16:39,17:40,19:126,60:m,86:C,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(ue,[2,9],{16:85,17:86,15:130,18:[1,129],60:m,86:C,100:E,102:T,103:y}),t(ue,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(le,[2,67]),{16:39,17:40,19:133,60:m,86:C,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:m,86:C,100:E,102:T,103:y},t(re,[2,82],{66:136,68:$,69:ee,70:te,71:se,72:ie}),t(re,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:f,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:m,86:C,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:m,86:C,100:E,102:T,103:y},t(ue,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(le,[2,69]),t(le,[2,68]),{16:39,17:40,19:158,60:m,86:C,100:E,102:T,103:y},t(re,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:f,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:f,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:f,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(ue,[2,11]),t(le,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(Ne,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:b(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:b(function(o){var h=this,p=[0],u=[],g=[null],e=[],J=this.table,s="",oe=0,Ke=0,We=0,bt=2,Qe=1,ft=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(w.yy[xe]=this.yy[xe]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var kt=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(S){p.length=p.length-2*S,g.length=g.length-S,e.length=e.length-S}b(gt,"popStack");function je(){var S;return S=u.pop()||D.lex()||Qe,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}b(je,"lex");for(var B,Ie,V,L,yt,Oe,G={},he,I,Xe,de;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=je()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var we="";de=[];for(he in J[V])this.terminals_[he]&&he>bt&&de.push("'"+this.terminals_[he]+"'");D.showPosition?we="Parse error on line "+(oe+1)+`: +import{a as lt}from"./chunk-MZ3CL6N5.min.js";import{a as ct}from"./chunk-INAAVCJQ.min.js";import{a as ot}from"./chunk-B7ZLSGB4.min.js";import{b as rt,c as nt}from"./chunk-PNGYEUMH.min.js";import{h as ut}from"./chunk-CLGT2SZG.min.js";import{p as Ae,s as at}from"./chunk-YPRWTSV5.min.js";import{H as He,J as P,N as v,T as Je,U as Ze,V as $e,W as et,X as tt,Y as st,Z as it,_ as F,g as qe}from"./chunk-LXXU3C6C.min.js";import{b,d as pe,j as Z}from"./chunk-BJGJ3C53.min.js";var Ve=(function(){var t=b(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],k=[1,25],f=[1,32],N=[1,33],fe=[1,34],m=[1,45],ke=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],C=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],$=[1,58],ee=[1,59],te=[1,60],se=[1,61],ie=[1,62],_e=[1,63],Se=[1,64],_=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ae=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],re=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ue=[12,39],Ne=[1,8,9,39,41,44,46],le=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:b(function(o,h,p,u,g,e,J){var s=e.length-1;switch(g){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:$,69:ee,70:te,71:se,72:ie,73:_e,74:Se}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:m,86:C,100:E,102:T},{16:39,17:40,19:70,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:71,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:72,60:m,86:C,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:m,86:C,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:m,86:C,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:87,60:m,86:C,100:E,102:T,103:y},t(ae,[2,133]),t(ae,[2,134]),t(ae,[2,135]),t(ae,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:m,86:C,100:E,102:T,103:y},{53:92,66:56,67:57,68:$,69:ee,70:te,71:se,72:ie,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(re,[2,83],{66:94,68:$,69:ee,70:te,71:se,72:ie}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:f,56:N},{16:100,60:m,86:C,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:m,86:C,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Me,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Ge,[2,74]),{16:39,17:40,19:126,60:m,86:C,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(ue,[2,9],{16:85,17:86,15:130,18:[1,129],60:m,86:C,100:E,102:T,103:y}),t(ue,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(le,[2,67]),{16:39,17:40,19:133,60:m,86:C,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:m,86:C,100:E,102:T,103:y},t(re,[2,82],{66:136,68:$,69:ee,70:te,71:se,72:ie}),t(re,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:f,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:m,86:C,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:m,86:C,100:E,102:T,103:y},t(ue,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(le,[2,69]),t(le,[2,68]),{16:39,17:40,19:158,60:m,86:C,100:E,102:T,103:y},t(re,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:f,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:f,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:f,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(ue,[2,11]),t(le,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(Ne,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:b(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:b(function(o){var h=this,p=[0],u=[],g=[null],e=[],J=this.table,s="",oe=0,Ke=0,We=0,bt=2,Qe=1,ft=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(w.yy[xe]=this.yy[xe]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var kt=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(S){p.length=p.length-2*S,g.length=g.length-S,e.length=e.length-S}b(gt,"popStack");function je(){var S;return S=u.pop()||D.lex()||Qe,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}b(je,"lex");for(var B,Ie,V,L,yt,Oe,G={},he,I,Xe,de;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=je()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var we="";de=[];for(he in J[V])this.terminals_[he]&&he>bt&&de.push("'"+this.terminals_[he]+"'");D.showPosition?we="Parse error on line "+(oe+1)+`: `+D.showPosition()+` Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":we="Parse error on line "+(oe+1)+": Unexpected "+(B==Qe?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(we,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:ve,expected:de})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),g.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ie?(B=Ie,Ie=null):(Ke=D.yyleng,s=D.yytext,oe=D.yylineno,ve=D.yylloc,We>0&&We--);break;case 2:if(I=this.productions_[L[1]][1],G.$=g[g.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},kt&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Oe=this.performAction.apply(G,[s,Ke,oe,w.yy,L[1],g,e].concat(ft)),typeof Oe<"u")return Oe;I&&(p=p.slice(0,-1*I*2),g=g.slice(0,-1*I),e=e.slice(0,-1*I)),p.push(this.productions_[L[1]][0]),g.push(G.$),e.push(G._$),Xe=J[p[p.length-2]][p[p.length-1]],p.push(Xe);break;case 3:return!0}}return!0},"parse")},At=(function(){var O={EOF:1,parseError:b(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:b(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:b(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===u.length?this.yylloc.first_column:0)+u[u.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(o){this.unput(this.match.slice(o))},"less"),pastInput:b(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` @@ -204,4 +204,4 @@ g.classGroup line { } ${lt()} `,"getStyles"),Vt=mt,Ct=b((t,i="TB")=>{if(!t.doc)return i;let a=i;for(let r of t.doc)r.stmt==="dir"&&(a=r.value);return a},"getDir"),Et=b(function(t,i){return i.db.getClasses()},"getClasses"),Tt=b(async function(t,i,a,r){pe.info("REF0:"),pe.info("Drawing class diagram (v3)",i);let{securityLevel:n,state:c,layout:l}=F();r.db.setDiagramId(i);let d=r.db.getData(),k=ct(i,n);d.type=r.type,d.layoutAlgorithm=nt(l),d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["aggregation","extension","composition","dependency","lollipop"],d.diagramId=i,await rt(d,k);let f=8;Ae.insertTitle(k,"classDiagramTitleText",c?.titleTopMargin??25,r.db.getDiagramTitle()),ot(k,f,"classDiagram",c?.useMaxWidth??!0)},"draw"),Pt={getClasses:Et,draw:Tt,getDir:Ct};export{vt as a,wt as b,Vt as c,Pt as d}; -//# sourceMappingURL=chunk-GFGWOWNB.min.js.map +//# sourceMappingURL=chunk-5JDMXW2E.min.js.map diff --git a/templates/tabulareditor/public/chunk-GFGWOWNB.min.js.map b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js.map similarity index 100% rename from templates/tabulareditor/public/chunk-GFGWOWNB.min.js.map rename to templates/tabulareditor/public/chunk-5JDMXW2E.min.js.map diff --git a/templates/tabulareditor/public/chunk-CRPZZTVK.min.js b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js similarity index 82% rename from templates/tabulareditor/public/chunk-CRPZZTVK.min.js rename to templates/tabulareditor/public/chunk-7XSRMU6L.min.js index f61b3bf4a..0adf8af27 100644 --- a/templates/tabulareditor/public/chunk-CRPZZTVK.min.js +++ b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js @@ -1,2 +1,2 @@ -import{n as p}from"./chunk-AVP3GJKJ.min.js";import{_ as s,r as g}from"./chunk-JBDIJRTV.min.js";import{b as a}from"./chunk-BJGJ3C53.min.js";var h=a(({flowchart:o})=>{let n=o?.subGraphTitleMargin?.top??0,t=o?.subGraphTitleMargin?.bottom??0,r=n+t;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:t,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins");async function d(o,n){let t=o.getElementsByTagName("img");if(!t||t.length===0)return;let r=n.replace(/]*>/g,"").trim()==="";await Promise.all([...t].map(e=>new Promise(m=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",r){let u=s().fontSize?s().fontSize:window.getComputedStyle(document.body).fontSize,f=5,[c=g.fontSize]=p(u),l=c*f+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";m(e)}a(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}a(d,"configureLabelImages");export{h as a,d as b}; -//# sourceMappingURL=chunk-CRPZZTVK.min.js.map +import{n as p}from"./chunk-YPRWTSV5.min.js";import{_ as s,r as g}from"./chunk-LXXU3C6C.min.js";import{b as a}from"./chunk-BJGJ3C53.min.js";var h=a(({flowchart:o})=>{let n=o?.subGraphTitleMargin?.top??0,t=o?.subGraphTitleMargin?.bottom??0,r=n+t;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:t,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins");async function d(o,n){let t=o.getElementsByTagName("img");if(!t||t.length===0)return;let r=n.replace(/]*>/g,"").trim()==="";await Promise.all([...t].map(e=>new Promise(m=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",r){let u=s().fontSize?s().fontSize:window.getComputedStyle(document.body).fontSize,f=5,[c=g.fontSize]=p(u),l=c*f+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";m(e)}a(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}a(d,"configureLabelImages");export{h as a,d as b}; +//# sourceMappingURL=chunk-7XSRMU6L.min.js.map diff --git a/templates/tabulareditor/public/chunk-CRPZZTVK.min.js.map b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js.map similarity index 100% rename from templates/tabulareditor/public/chunk-CRPZZTVK.min.js.map rename to templates/tabulareditor/public/chunk-7XSRMU6L.min.js.map diff --git a/templates/tabulareditor/public/chunk-BT7FBF3C.min.js b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js similarity index 80% rename from templates/tabulareditor/public/chunk-BT7FBF3C.min.js rename to templates/tabulareditor/public/chunk-B7ZLSGB4.min.js index e5bd5cc1c..7b9d995ce 100644 --- a/templates/tabulareditor/public/chunk-BT7FBF3C.min.js +++ b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js @@ -1,2 +1,2 @@ -import{O as w}from"./chunk-JBDIJRTV.min.js";import{b as r,d as c}from"./chunk-BJGJ3C53.min.js";var g=r((t,e,i,h)=>{t.attr("class",i);let{width:o,height:n,x,y:u}=s(t,e);w(t,n,o,h);let a=m(x,u,o,n,e);t.attr("viewBox",a),c.debug(`viewBox configured: ${a} with padding: ${e}`)},"setupViewPortForSVG"),s=r((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),m=r((t,e,i,h,o)=>`${t-o} ${e-o} ${i} ${h}`,"createViewBox");export{g as a}; -//# sourceMappingURL=chunk-BT7FBF3C.min.js.map +import{O as w}from"./chunk-LXXU3C6C.min.js";import{b as r,d as c}from"./chunk-BJGJ3C53.min.js";var g=r((t,e,i,h)=>{t.attr("class",i);let{width:o,height:n,x,y:u}=s(t,e);w(t,n,o,h);let a=m(x,u,o,n,e);t.attr("viewBox",a),c.debug(`viewBox configured: ${a} with padding: ${e}`)},"setupViewPortForSVG"),s=r((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),m=r((t,e,i,h,o)=>`${t-o} ${e-o} ${i} ${h}`,"createViewBox");export{g as a}; +//# sourceMappingURL=chunk-B7ZLSGB4.min.js.map diff --git a/templates/tabulareditor/public/chunk-BT7FBF3C.min.js.map b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js.map similarity index 100% rename from templates/tabulareditor/public/chunk-BT7FBF3C.min.js.map rename to templates/tabulareditor/public/chunk-B7ZLSGB4.min.js.map diff --git a/templates/tabulareditor/public/chunk-CDHWQHFE.min.js b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js similarity index 94% rename from templates/tabulareditor/public/chunk-CDHWQHFE.min.js rename to templates/tabulareditor/public/chunk-CLGT2SZG.min.js index 029d5c90f..80fa39008 100644 --- a/templates/tabulareditor/public/chunk-CDHWQHFE.min.js +++ b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js @@ -1,2 +1,2 @@ -import{a as x}from"./chunk-HCOLC5CQ.min.js";import{G as d}from"./chunk-JBDIJRTV.min.js";import{b as i,j as o}from"./chunk-BJGJ3C53.min.js";import{c as p}from"./chunk-MY7PHHTQ.min.js";var l=p(x(),1);var c=i((r,t)=>{let e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),f=i((r,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(r,e).lower()},"drawBackgroundRect"),h=i((r,t)=>{let e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);let a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),w=i((r,t,e,s)=>{let a=r.append("image");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",n)},"drawImage"),k=i((r,t,e,s)=>{let a=r.append("use");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),v=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),E=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),R=i(()=>{let r=o(".mermaidTooltip");return r.empty()&&(r=o("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{c as a,f as b,h as c,w as d,k as e,v as f,E as g,R as h}; -//# sourceMappingURL=chunk-CDHWQHFE.min.js.map +import{a as x}from"./chunk-HCOLC5CQ.min.js";import{G as d}from"./chunk-LXXU3C6C.min.js";import{b as i,j as o}from"./chunk-BJGJ3C53.min.js";import{c as p}from"./chunk-MY7PHHTQ.min.js";var l=p(x(),1);var c=i((r,t)=>{let e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),f=i((r,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(r,e).lower()},"drawBackgroundRect"),h=i((r,t)=>{let e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);let a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),w=i((r,t,e,s)=>{let a=r.append("image");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",n)},"drawImage"),k=i((r,t,e,s)=>{let a=r.append("use");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),v=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),E=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),R=i(()=>{let r=o(".mermaidTooltip");return r.empty()&&(r=o("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{c as a,f as b,h as c,w as d,k as e,v as f,E as g,R as h}; +//# sourceMappingURL=chunk-CLGT2SZG.min.js.map diff --git a/templates/tabulareditor/public/chunk-CDHWQHFE.min.js.map b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js.map similarity index 100% rename from templates/tabulareditor/public/chunk-CDHWQHFE.min.js.map rename to templates/tabulareditor/public/chunk-CLGT2SZG.min.js.map diff --git a/templates/tabulareditor/public/chunk-JBDIJRTV.min.js.map b/templates/tabulareditor/public/chunk-JBDIJRTV.min.js.map deleted file mode 100644 index 33212c95e..000000000 --- a/templates/tabulareditor/public/chunk-JBDIJRTV.min.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../node_modules/khroma/dist/utils/channel.js", "../../node_modules/khroma/dist/utils/lang.js", "../../node_modules/khroma/dist/utils/unit.js", "../../node_modules/khroma/dist/utils/index.js", "../../node_modules/khroma/dist/constants.js", "../../node_modules/khroma/dist/channels/type.js", "../../node_modules/khroma/dist/channels/index.js", "../../node_modules/khroma/dist/channels/reusable.js", "../../node_modules/khroma/dist/color/hex.js", "../../node_modules/khroma/dist/color/hsl.js", "../../node_modules/khroma/dist/color/keyword.js", "../../node_modules/khroma/dist/color/rgb.js", "../../node_modules/khroma/dist/color/index.js", "../../node_modules/khroma/dist/methods/change.js", "../../node_modules/khroma/dist/methods/rgba.js", "../../node_modules/khroma/dist/methods/channel.js", "../../node_modules/khroma/dist/methods/luminance.js", "../../node_modules/khroma/dist/methods/is_light.js", "../../node_modules/khroma/dist/methods/is_dark.js", "../../node_modules/khroma/dist/methods/adjust_channel.js", "../../node_modules/khroma/dist/methods/lighten.js", "../../node_modules/khroma/dist/methods/darken.js", "../../node_modules/khroma/dist/methods/transparentize.js", "../../node_modules/khroma/dist/methods/adjust.js", "../../node_modules/khroma/dist/methods/mix.js", "../../node_modules/khroma/dist/methods/invert.js", "../../node_modules/dompurify/src/utils.ts", "../../node_modules/dompurify/src/tags.ts", "../../node_modules/dompurify/src/attrs.ts", "../../node_modules/dompurify/src/regexp.ts", "../../node_modules/dompurify/src/purify.ts", "../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-CSCIHK7Q.mjs"], - "sourcesContent": ["/* IMPORT */\n/* MAIN */\nconst Channel = {\n /* CLAMP */\n min: {\n r: 0,\n g: 0,\n b: 0,\n s: 0,\n l: 0,\n a: 0\n },\n max: {\n r: 255,\n g: 255,\n b: 255,\n h: 360,\n s: 100,\n l: 100,\n a: 1\n },\n clamp: {\n r: (r) => r >= 255 ? 255 : (r < 0 ? 0 : r),\n g: (g) => g >= 255 ? 255 : (g < 0 ? 0 : g),\n b: (b) => b >= 255 ? 255 : (b < 0 ? 0 : b),\n h: (h) => h % 360,\n s: (s) => s >= 100 ? 100 : (s < 0 ? 0 : s),\n l: (l) => l >= 100 ? 100 : (l < 0 ? 0 : l),\n a: (a) => a >= 1 ? 1 : (a < 0 ? 0 : a)\n },\n /* CONVERSION */\n //SOURCE: https://planetcalc.com/7779\n toLinear: (c) => {\n const n = c / 255;\n return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n },\n //SOURCE: https://gist.github.com/mjackson/5311256\n hue2rgb: (p, q, t) => {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n },\n hsl2rgb: ({ h, s, l }, channel) => {\n if (!s)\n return l * 2.55; // Achromatic\n h /= 360;\n s /= 100;\n l /= 100;\n const q = (l < .5) ? l * (1 + s) : (l + s) - (l * s);\n const p = 2 * l - q;\n switch (channel) {\n case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n case 'g': return Channel.hue2rgb(p, q, h) * 255;\n case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n }\n },\n rgb2hsl: ({ r, g, b }, channel) => {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n if (channel === 'l')\n return l * 100;\n if (max === min)\n return 0; // Achromatic\n const d = max - min;\n const s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n if (channel === 's')\n return s * 100;\n switch (max) {\n case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n case g: return ((b - r) / d + 2) * 60;\n case b: return ((r - g) / d + 4) * 60;\n default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n }\n }\n};\n/* EXPORT */\nexport default Channel;\n", "/* MAIN */\nconst Lang = {\n /* API */\n clamp: (number, lower, upper) => {\n if (lower > upper)\n return Math.min(lower, Math.max(upper, number));\n return Math.min(upper, Math.max(lower, number));\n },\n round: (number) => {\n return Math.round(number * 10000000000) / 10000000000;\n }\n};\n/* EXPORT */\nexport default Lang;\n", "/* MAIN */\nconst Unit = {\n /* API */\n dec2hex: (dec) => {\n const hex = Math.round(dec).toString(16);\n return hex.length > 1 ? hex : `0${hex}`;\n }\n};\n/* EXPORT */\nexport default Unit;\n", "/* IMPORT */\nimport channel from './channel.js';\nimport lang from './lang.js';\nimport unit from './unit.js';\n/* MAIN */\nconst Utils = {\n channel,\n lang,\n unit\n};\n/* EXPORT */\nexport default Utils;\n", "/* IMPORT */\nimport _ from './utils/index.js';\n/* MAIN */\nconst DEC2HEX = {};\nfor (let i = 0; i <= 255; i++)\n DEC2HEX[i] = _.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\nconst TYPE = {\n ALL: 0,\n RGB: 1,\n HSL: 2\n};\n/* EXPORT */\nexport { DEC2HEX, TYPE };\n", "/* IMPORT */\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Type {\n constructor() {\n /* VARIABLES */\n this.type = TYPE.ALL;\n }\n /* API */\n get() {\n return this.type;\n }\n set(type) {\n if (this.type && this.type !== type)\n throw new Error('Cannot change both RGB and HSL channels at the same time');\n this.type = type;\n }\n reset() {\n this.type = TYPE.ALL;\n }\n is(type) {\n return this.type === type;\n }\n}\n/* EXPORT */\nexport default Type;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Type from './type.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Channels {\n /* CONSTRUCTOR */\n constructor(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type = new Type();\n }\n /* API */\n set(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type.type = TYPE.ALL;\n return this;\n }\n /* HELPERS */\n _ensureHSL() {\n const data = this.data;\n const { h, s, l } = data;\n if (h === undefined)\n data.h = _.channel.rgb2hsl(data, 'h');\n if (s === undefined)\n data.s = _.channel.rgb2hsl(data, 's');\n if (l === undefined)\n data.l = _.channel.rgb2hsl(data, 'l');\n }\n _ensureRGB() {\n const data = this.data;\n const { r, g, b } = data;\n if (r === undefined)\n data.r = _.channel.hsl2rgb(data, 'r');\n if (g === undefined)\n data.g = _.channel.hsl2rgb(data, 'g');\n if (b === undefined)\n data.b = _.channel.hsl2rgb(data, 'b');\n }\n /* GETTERS */\n get r() {\n const data = this.data;\n const r = data.r;\n if (!this.type.is(TYPE.HSL) && r !== undefined)\n return r;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'r');\n }\n get g() {\n const data = this.data;\n const g = data.g;\n if (!this.type.is(TYPE.HSL) && g !== undefined)\n return g;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'g');\n }\n get b() {\n const data = this.data;\n const b = data.b;\n if (!this.type.is(TYPE.HSL) && b !== undefined)\n return b;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'b');\n }\n get h() {\n const data = this.data;\n const h = data.h;\n if (!this.type.is(TYPE.RGB) && h !== undefined)\n return h;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'h');\n }\n get s() {\n const data = this.data;\n const s = data.s;\n if (!this.type.is(TYPE.RGB) && s !== undefined)\n return s;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 's');\n }\n get l() {\n const data = this.data;\n const l = data.l;\n if (!this.type.is(TYPE.RGB) && l !== undefined)\n return l;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'l');\n }\n get a() {\n return this.data.a;\n }\n /* SETTERS */\n set r(r) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.r = r;\n }\n set g(g) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.g = g;\n }\n set b(b) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.b = b;\n }\n set h(h) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.h = h;\n }\n set s(s) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.s = s;\n }\n set l(l) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.l = l;\n }\n set a(a) {\n this.changed = true;\n this.data.a = a;\n }\n}\n/* EXPORT */\nexport default Channels;\n", "/* IMPORT */\nimport Channels from './/index.js';\n/* MAIN */\nconst channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexport default channels;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport { DEC2HEX } from '../constants.js';\n/* MAIN */\nconst Hex = {\n /* VARIABLES */\n re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n /* API */\n parse: (color) => {\n if (color.charCodeAt(0) !== 35)\n return; // '#'\n const match = color.match(Hex.re);\n if (!match)\n return;\n const hex = match[1];\n const dec = parseInt(hex, 16);\n const length = hex.length;\n const hasAlpha = length % 4 === 0;\n const isFullLength = length > 4;\n const multiplier = isFullLength ? 1 : 17;\n const bits = isFullLength ? 8 : 4;\n const bitsOffset = hasAlpha ? 0 : -1;\n const mask = isFullLength ? 255 : 15;\n return ChannelsReusable.set({\n r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // #RRGGBBAA\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;\n }\n else { // #RRGGBB\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;\n }\n }\n};\n/* EXPORT */\nexport default Hex;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst HSL = {\n /* VARIABLES */\n re: /^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,\n hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n /* HELPERS */\n _hue2deg: (hue) => {\n const match = hue.match(HSL.hueRe);\n if (match) {\n const [, number, unit] = match;\n switch (unit) {\n case 'grad': return _.channel.clamp.h(parseFloat(number) * .9);\n case 'rad': return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n case 'turn': return _.channel.clamp.h(parseFloat(number) * 360);\n }\n }\n return _.channel.clamp.h(parseFloat(hue));\n },\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 104 && charCode !== 72)\n return; // 'h'/'H'\n const match = color.match(HSL.re);\n if (!match)\n return;\n const [, h, s, l, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n h: HSL._hue2deg(h),\n s: _.channel.clamp.s(parseFloat(s)),\n l: _.channel.clamp.l(parseFloat(l)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { h, s, l, a } = channels;\n if (a < 1) { // HSLA\n return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`;\n }\n else { // HSL\n return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`;\n }\n }\n};\n/* EXPORT */\nexport default HSL;\n", "/* IMPORT */\nimport Hex from './hex.js';\n/* MAIN */\nconst Keyword = {\n /* VARIABLES */\n colors: {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyanaqua: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n transparent: '#00000000',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n },\n /* API */\n parse: (color) => {\n color = color.toLowerCase();\n const hex = Keyword.colors[color];\n if (!hex)\n return;\n return Hex.parse(hex);\n },\n stringify: (channels) => {\n const hex = Hex.stringify(channels);\n for (const name in Keyword.colors) {\n if (Keyword.colors[name] === hex)\n return name;\n }\n return;\n }\n};\n/* EXPORT */\nexport default Keyword;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst RGB = {\n /* VARIABLES */\n re: /^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 114 && charCode !== 82)\n return; // 'r'/'R'\n const match = color.match(RGB.re);\n if (!match)\n return;\n const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // RGBA\n return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`;\n }\n else { // RGB\n return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`;\n }\n }\n};\n/* EXPORT */\nexport default RGB;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Hex from './hex.js';\nimport HSL from './hsl.js';\nimport Keyword from './keyword.js';\nimport RGB from './rgb.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nconst Color = {\n /* VARIABLES */\n format: {\n keyword: Keyword,\n hex: Hex,\n rgb: RGB,\n rgba: RGB,\n hsl: HSL,\n hsla: HSL\n },\n /* API */\n parse: (color) => {\n if (typeof color !== 'string')\n return color;\n const channels = Hex.parse(color) || RGB.parse(color) || HSL.parse(color) || Keyword.parse(color); // Color providers ordered with performance in mind\n if (channels)\n return channels;\n throw new Error(`Unsupported color format: \"${color}\"`);\n },\n stringify: (channels) => {\n // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n if (!channels.changed && channels.color)\n return channels.color;\n if (channels.type.is(TYPE.HSL) || channels.data.r === undefined) {\n return HSL.stringify(channels);\n }\n else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n return RGB.stringify(channels);\n }\n else {\n return Hex.stringify(channels);\n }\n }\n};\n/* EXPORT */\nexport default Color;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst change = (color, channels) => {\n const ch = Color.parse(color);\n for (const c in channels) {\n ch[c] = _.channel.clamp[c](channels[c]);\n }\n return Color.stringify(ch);\n};\n/* EXPORT */\nexport default change;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst rgba = (r, g, b = 0, a = 1) => {\n if (typeof r !== 'number')\n return change(r, { a: g });\n const channels = ChannelsReusable.set({\n r: _.channel.clamp.r(r),\n g: _.channel.clamp.g(g),\n b: _.channel.clamp.b(b),\n a: _.channel.clamp.a(a)\n });\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default rgba;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst channel = (color, channel) => {\n return _.lang.round(Color.parse(color)[channel]);\n};\n/* EXPORT */\nexport default channel;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n const { r, g, b } = Color.parse(color);\n const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n", "/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n", "/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst adjustChannel = (color, channel, amount) => {\n const channels = Color.parse(color);\n const amountCurrent = channels[channel];\n const amountNext = _.channel.clamp[channel](amountCurrent + amount);\n if (amountCurrent !== amountNext)\n channels[channel] = amountNext;\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default adjustChannel;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst lighten = (color, amount) => {\n return adjustChannel(color, 'l', amount);\n};\n/* EXPORT */\nexport default lighten;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst darken = (color, amount) => {\n return adjustChannel(color, 'l', -amount);\n};\n/* EXPORT */\nexport default darken;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst transparentize = (color, amount) => {\n return adjustChannel(color, 'a', -amount);\n};\n/* EXPORT */\nexport default transparentize;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst adjust = (color, channels) => {\n const ch = Color.parse(color);\n const changes = {};\n for (const c in channels) {\n if (!channels[c])\n continue;\n changes[c] = ch[c] + channels[c];\n }\n return change(color, changes);\n};\n/* EXPORT */\nexport default adjust;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport rgba from './rgba.js';\n/* MAIN */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nconst mix = (color1, color2, weight = 50) => {\n const { r: r1, g: g1, b: b1, a: a1 } = Color.parse(color1);\n const { r: r2, g: g2, b: b2, a: a2 } = Color.parse(color2);\n const weightScale = weight / 100;\n const weightNormalized = (weightScale * 2) - 1;\n const alphaDelta = a1 - a2;\n const weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);\n const weight1 = (weight1combined + 1) / 2;\n const weight2 = 1 - weight1;\n const r = (r1 * weight1) + (r2 * weight2);\n const g = (g1 * weight1) + (g2 * weight2);\n const b = (b1 * weight1) + (b2 * weight2);\n const a = (a1 * weightScale) + (a2 * (1 - weightScale));\n return rgba(r, g, b, a);\n};\n/* EXPORT */\nexport default mix;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport mix from './mix.js';\n/* MAIN */\nconst invert = (color, weight = 100) => {\n const inverse = Color.parse(color);\n inverse.r = 255 - inverse.r;\n inverse.g = 255 - inverse.g;\n inverse.b = 255 - inverse.b;\n return mix(inverse, color, weight);\n};\n/* EXPORT */\nexport default invert;\n", "const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n freeze = function (x: T): T {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x: T): T {\n return x;\n };\n}\n\nif (!apply) {\n apply = function (\n func: (thisArg: any, ...args: any[]) => T,\n thisArg: any,\n ...args: any[]\n ): T {\n return func.apply(thisArg, args);\n };\n}\n\nif (!construct) {\n construct = function (Func: new (...args: any[]) => T, ...args: any[]): T {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString =\n typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\nconst symbolToString =\n typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\n\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(\n func: (thisArg: any, ...args: any[]) => T\n): (thisArg: any, ...args: any[]) => T {\n return (thisArg: any, ...args: any[]): T => {\n if (thisArg instanceof RegExp) {\n thisArg.lastIndex = 0;\n }\n\n return apply(func, thisArg, args);\n };\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(\n Func: new (...args: any[]) => T\n): (...args: any[]) => T {\n return (...args: any[]): T => construct(Func, args);\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(\n set: Record,\n array: readonly unknown[],\n transformCaseFunc: ReturnType> = stringToLowerCase\n): Record {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n if (!arrayIsArray(array)) {\n return set;\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n (array as unknown[])[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element as string] = true;\n }\n\n return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array: T[]): Array {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n\n return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone>(object: T): T {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n\n if (isPropertyExist) {\n if (arrayIsArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (\n value &&\n typeof value === 'object' &&\n value.constructor === Object\n ) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n\n return newObject;\n}\n\n/**\n * Convert non-node values into strings without depending on direct property access.\n *\n * @param value - The value to stringify.\n * @returns A string representation of the provided value.\n */\nfunction stringifyValue(value: unknown): string {\n switch (typeof value) {\n case 'string': {\n return value;\n }\n\n case 'number': {\n return numberToString(value);\n }\n\n case 'boolean': {\n return booleanToString(value);\n }\n\n case 'bigint': {\n return bigintToString ? bigintToString(value) : '0';\n }\n\n case 'symbol': {\n return symbolToString ? symbolToString(value) : 'Symbol()';\n }\n\n case 'undefined': {\n return objectToString(value);\n }\n\n case 'function':\n case 'object': {\n if (value === null) {\n return objectToString(value);\n }\n\n const valueAsRecord = value as Record;\n const valueToString = lookupGetter(valueAsRecord, 'toString');\n\n if (typeof valueToString === 'function') {\n const stringified = valueToString(valueAsRecord);\n\n return typeof stringified === 'string'\n ? stringified\n : objectToString(stringified);\n }\n\n return objectToString(value);\n }\n\n default: {\n return objectToString(value);\n }\n }\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter>(\n object: T,\n prop: string\n): ReturnType> | (() => null) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(): null {\n return null;\n }\n\n return fallbackValue;\n}\n\nfunction isRegex(value: unknown): value is RegExp {\n try {\n regExpTest(value as RegExp, '');\n return true;\n } catch {\n return false;\n }\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayIsArray,\n arrayLastIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n arraySplice,\n // Object\n entries,\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n isFrozen,\n setPrototypeOf,\n seal,\n clone,\n create,\n objectHasOwnProperty,\n objectToString,\n // RegExp\n regExpTest,\n isRegex,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Other conversion\n stringifyValue,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n addToSet,\n // Reflect\n unapply,\n unconstruct,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'search',\n 'section',\n 'select',\n 'shadow',\n 'slot',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n] as const);\n\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'enterkeyhint',\n 'exportparts',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'inputmode',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'part',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n] as const);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n] as const);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n] as const);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n 'mprescripts',\n] as const);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n] as const);\n\nexport const text = freeze(['#text'] as const);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'command',\n 'commandfor',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'exportparts',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inert',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'part',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'popover',\n 'popovertarget',\n 'popovertargetaction',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'slot',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'wrap',\n 'xmlns',\n] as const);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'amplitude',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'exponent',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'intercept',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'mask-type',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'slope',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'tablevalues',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n] as const);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnalign',\n 'columnlines',\n 'columnspacing',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lquote',\n 'lspace',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n] as const);\n", "import { seal } from './utils.js';\n\nexport const MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n// Markup-significant character probes used by _sanitizeElements.\n// Shared module-level instances are safe despite the sticky /g flags:\n// unapply() resets lastIndex for RegExp receivers before every call.\nexport const ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nexport const COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nexport const FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nexport const SELF_CLOSING_TAG = seal(/\\/>/i);\n", "import type { Config, UseProfilesConfig } from './config';\nimport type { DOMPurify, HooksMap, HookFunction, WindowLike } from './types';\nimport * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n entries,\n freeze,\n seal,\n arrayForEach,\n arrayIsArray,\n arrayLastIndexOf,\n arrayPop,\n arrayPush,\n arraySplice,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n regExpTest,\n isRegex,\n typeErrorCreate,\n lookupGetter,\n create,\n objectHasOwnProperty,\n stringifyValue,\n} from './utils.js';\n\nexport type { Config } from './config';\n\nexport type {\n DOMPurify,\n RemovedElement,\n RemovedAttribute,\n HookName,\n NodeHook,\n ElementHook,\n DocumentFragmentHook,\n UponSanitizeElementHook,\n UponSanitizeAttributeHook,\n UponSanitizeElementHookEvent,\n UponSanitizeAttributeHookEvent,\n WindowLike,\n} from './types';\n\ndeclare const VERSION: string;\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5, // Deprecated\n entityNode: 6, // Deprecated\n processingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12, // Deprecated\n};\n\nconst getGlobal = function (): WindowLike {\n return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (\n trustedTypes: TrustedTypePolicyFactory,\n purifyHostElement: HTMLScriptElement\n) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nconst _createHooksMap = function (): HooksMap {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: [],\n };\n};\n\n/**\n * Resolve a set-valued configuration option: a fresh set built from\n * cfg[key] when it is an own array property (seeded with a clone of\n * options.base when given, case-normalized via options.transform),\n * the fallback set otherwise.\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param fallback the set to use when the option is absent or not an array\n * @param options transform and optional base set to merge into\n * @returns the resolved set\n */\nconst _resolveSetOption = function (\n cfg: Config,\n key: keyof Config,\n fallback: Record,\n options: {\n transform: Parameters[2];\n base?: Record;\n }\n): Record {\n return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key])\n ? addToSet(\n options.base ? clone(options.base) : {},\n cfg[key] as readonly unknown[],\n options.transform\n )\n : fallback;\n};\n\nfunction createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {\n const DOMPurify: DOMPurify = (root: WindowLike) => createDOMPurify(root);\n\n DOMPurify.version = VERSION;\n\n DOMPurify.removed = [];\n\n if (\n !window ||\n !window.document ||\n window.document.nodeType !== NODE_TYPE.document ||\n !window.Element\n ) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n let { document } = window;\n\n const originalDocument = document;\n const currentScript: HTMLScriptElement =\n originalDocument.currentScript as HTMLScriptElement;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || (window as any).MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n const getNodeType =\n Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n const getNodeName =\n Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n\n // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n // `TRUSTED_TYPES_POLICY`, this is created at most once \u2014 Trusted Types throws\n // on duplicate policy names \u2014 and is the only policy allowed to persist\n // across configurations and survive `clearConfig()`.\n let defaultTrustedTypesPolicy;\n let defaultTrustedTypesPolicyResolved = false;\n\n // Tracks whether we are already inside a call to the configured Trusted Types\n // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n // re-enter the policy and recurse until the stack overflows. We detect that\n // re-entry and throw a clear, actionable error instead. The guard is shared\n // across both callbacks, because either one re-entering `sanitize` triggers\n // the same unbounded recursion.\n let IN_TRUSTED_TYPES_POLICY = 0;\n const _assertNotInTrustedTypesPolicy = function (): void {\n if (IN_TRUSTED_TYPES_POLICY > 0) {\n throw typeErrorCreate(\n 'A configured TRUSTED_TYPES_POLICY callback (createHTML or ' +\n 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' +\n 'infinite recursion. Do not pass a policy whose callbacks wrap ' +\n 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' +\n 'Types\" section of the README.'\n );\n }\n };\n\n const _createTrustedHTML = function (html: string): string {\n _assertNotInTrustedTypesPolicy();\n\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createHTML(html);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n\n const _createTrustedScriptURL = function (scriptUrl: string): string {\n _assertNotInTrustedTypesPolicy();\n\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createScriptURL(scriptUrl);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n\n // Lazily resolve (and cache) the instance's internal default policy.\n // Resolution is attempted at most once: a successful `createPolicy` cannot be\n // repeated (Trusted Types throws on duplicate names), and a failed or\n // unsupported attempt must not be retried on every parse.\n const _getDefaultTrustedTypesPolicy = function () {\n if (!defaultTrustedTypesPolicyResolved) {\n defaultTrustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n currentScript\n );\n defaultTrustedTypesPolicyResolved = true;\n }\n\n return defaultTrustedTypesPolicy;\n };\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let hooks = _createHooksMap();\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof entries === 'function' &&\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n const EXTRA_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n })\n );\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Pristine allowlist bindings captured at setConfig() time. On the\n * persistent-config path sanitize() restores the sets from these before\n * the per-walk hook clone-guard, so a hook's in-call widening cannot\n * carry across calls. Null until setConfig() is called; reset by\n * clearConfig(). */\n let SET_CONFIG_ALLOWED_TAGS = null;\n let SET_CONFIG_ALLOWED_ATTR = null;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (\u00A77.3.3)\n * - DOM Tree Accessors (\u00A73.1.5)\n * - Form Element Parent-Child Relations (\u00A74.10.3)\n * - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n * - HTMLCollection (\u00A74.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES: UseProfilesConfig | false = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n // mirrors the selected