"+mxUtils.htmlEntities(t)+"").replace(/ /g," "),l.document.body.appendChild(n)}},alert:function(t){alert(t)},prompt:function(t,e){return prompt(t,e??"")},confirm:function(t){return confirm(t)},error:function(t,e,i,n){var r=document.createElement("div");r.style.padding="20px";var s=document.createElement("img");s.setAttribute("src",n||mxUtils.errorImage),s.setAttribute("valign","bottom"),s.style.verticalAlign="middle",r.appendChild(s),r.appendChild(document.createTextNode(" ")),r.appendChild(document.createTextNode(" ")),r.appendChild(document.createTextNode(" ")),mxUtils.write(r,t);var l=document.body.clientWidth,a=document.body.clientHeight||document.documentElement.clientHeight,o=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,r,(l-e)/2,a/4,e,null,!1,!0);if(i){mxUtils.br(r);var u=document.createElement("p"),p=document.createElement("button");mxClient.IS_IE?p.style.cssText="float:right":p.setAttribute("style","float:right"),mxEvent.addListener(p,"click",function(m){o.destroy()}),mxUtils.write(p,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),u.appendChild(p),r.appendChild(u),mxUtils.br(r),o.setClosable(!0)}return o.setVisible(!0),o},makeDraggable:function(t,e,i,n,r,s,l,a,o,u){var p=new mxDragSource(t,i);return p.dragOffset=new mxPoint(r??0,s??mxConstants.TOOLTIP_VERTICAL_OFFSET),p.autoscroll=l,p.setGuidesEnabled(!1),o!=null&&(p.highlightDropTargets=o),u!=null&&(p.getDropTarget=u),p.getGraphForEvent=function(m){return typeof e=="function"?e(m):e},n!=null&&(p.createDragElement=function(){return n.cloneNode(!0)},a&&(p.createPreviewElement=function(m){var d=n.cloneNode(!0),x=parseInt(d.style.width),f=parseInt(d.style.height);return d.style.width=Math.round(x*m.view.scale)+"px",d.style.height=Math.round(f*m.view.scale)+"px",d})),p}};__mxOutput.mxUtils=typeof mxUtils<"u"?mxUtils:void 0;var mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",VML_SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",OUTLINE_HIGHLIGHT_COLOR:"#00FF00",OUTLINE_HIGHLIGHT_STROKEWIDTH:5,HIGHLIGHT_STROKEWIDTH:3,HIGHLIGHT_SIZE:2,HIGHLIGHT_OPACITY:100,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_TERMINAL_HANDLE:"pointer",CURSOR_BEND_HANDLE:"crosshair",CURSOR_VIRTUAL_BEND_HANDLE:"crosshair",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:6,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,DEFAULT_TEXT_DIRECTION:"",LINE_HEIGHT:1.2,WORD_WRAP:"normal",ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:0,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,827,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,827),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_SOURCE_PORT_CONSTRAINT:"sourcePortConstraint",STYLE_TARGET_PORT_CONSTRAINT:"targetPortConstraint",STYLE_OPACITY:"opacity",STYLE_FILL_OPACITY:"fillOpacity",STYLE_STROKE_OPACITY:"strokeOpacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_TEXT_DIRECTION:"textDirection",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_DX:"exitDx",STYLE_EXIT_DY:"exitDy",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_DX:"entryDx",STYLE_ENTRY_DY:"entryDy",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_POINTER_EVENTS:"pointerEvents",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_WIDTH:"labelWidth",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_FIX_DASH:"fixDash",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_ABSOLUTE_ARCSIZE:"absoluteArcSize",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ANCHOR_POINT_DIRECTION:"anchorPointDirection",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BACKGROUND_OUTLINE:"backgroundOutline",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_RESIZE_WIDTH:"resizeWidth",STYLE_RESIZE_HEIGHT:"resizeHeight",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_JETTY_SIZE:"jettySize",STYLE_SOURCE_JETTY_SIZE:"sourceJettySize",STYLE_TARGET_JETTY_SIZE:"targetJettySize",STYLE_LOOP:"loopStyle",STYLE_ORTHOGONAL_LOOP:"orthogonalLoop",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_STRIKETHROUGH:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_ARROW_CONNECTOR:"arrowConnector",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_CLASSIC_THIN:"classicThin",ARROW_BLOCK:"block",ARROW_BLOCK_THIN:"blockThin",ARROW_OPEN:"open",ARROW_OPEN_THIN:"openThin",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",TEXT_DIRECTION_DEFAULT:"",TEXT_DIRECTION_AUTO:"auto",TEXT_DIRECTION_LTR:"ltr",TEXT_DIRECTION_RTL:"rtl",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_HEXAGON:"hexagonPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};__mxOutput.mxConstants=typeof mxConstants<"u"?mxConstants:void 0;function mxEventObject(t){this.name=t,this.properties=[];for(var e=1;e
0)this.root=t;else{var n=this.graph.findTreeRoots(t,!0,this.invert);if(n.length>0){for(var r=0;r m?new mxPoint(o,s):new mxPoint(o,s+a);if(u==m)return o>p?new mxPoint(r,u):new mxPoint(r+l,u);var d=o,x=u;return n&&(p>=r&&p<=r+l?d=p:m>=s&&m<=s+a&&(x=m)),p m,a=s.x=0&&(r=this.traverse(m,e,o[p],n,r,s,l))}}else if(r[a]==null)for(var p=0;p0&&t!=null){for(var n=Object(),r=0;rr+l&&m>s+a)&&(n=!1),n){if(T){if(p==o){if(m<=s)return new mxPoint(o,s);if(m>=s+a)return new mxPoint(o,s+a)}else if(ps+3*a/4&&(C=new mxPoint(r-Math.floor(.5*l),s+Math.floor(.5*a)),S=new mxPoint(r+l,s+Math.floor(1.25*a))):p>o&&(m>s+a/4&&ms+3*a/4&&(C=new mxPoint(r+Math.floor(1.5*l),s+Math.floor(.5*a)),S=new mxPoint(r,s+Math.floor(1.25*a))))}else{if(m==u){if(p<=r)return new mxPoint(r,s+a/2);if(p>=r+l)return new mxPoint(r+l,s+a/2)}else if(ms+a){if(p==r+l/4)return new mxPoint(r+l/4,s+a);if(p==r+3*l/4)return new mxPoint(r+3*l/4,s+a)}else if(m==s){if(p
")},mxCellEditor.prototype.getCurrentValue=function(t){return mxUtils.extractTextWithWhitespace(this.textarea.childNodes)},mxCellEditor.prototype.isCancelEditingKeyEvent=function(t){return this.escapeCancelsEditing||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)},mxCellEditor.prototype.installListeners=function(t){mxEvent.addListener(t,"dragstart",mxUtils.bind(this,function(s){this.graph.stopEditing(!1),mxEvent.consume(s)})),mxEvent.addListener(t,"blur",mxUtils.bind(this,function(s){this.blurEnabled&&this.focusLost(s)})),mxEvent.addListener(t,"keydown",mxUtils.bind(this,function(s){mxEvent.isConsumed(s)||(this.isStopEditingEvent(s)?(this.graph.stopEditing(!1),mxEvent.consume(s)):s.keyCode==27&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(s)),mxEvent.consume(s)))}));var e=mxUtils.bind(this,function(s){this.editingCell!=null&&this.clearOnChange&&t.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||s.keyCode!=8&&s.keyCode!=46)&&(this.clearOnChange=!1,t.innerHTML="")});mxEvent.addListener(t,"keypress",e),mxEvent.addListener(t,"paste",e);var i=mxUtils.bind(this,function(s){this.editingCell!=null&&(this.textarea.innerHTML.length==0||this.textarea.innerHTML=="
"?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=this.textarea.innerHTML.length>0):this.clearOnChange=!1)});mxEvent.addListener(t,!mxClient.IS_IE11&&!mxClient.IS_IE?"input":"keyup",i),mxEvent.addListener(t,"cut",i),mxEvent.addListener(t,"paste",i);var n=!mxClient.IS_IE11&&!mxClient.IS_IE?"input":"keydown",r=mxUtils.bind(this,function(s){this.editingCell!=null&&this.autoSize&&!mxEvent.isConsumed(s)&&(this.resizeThread!=null&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null,this.resize()}),0))});mxEvent.addListener(t,n,r),mxEvent.addListener(window,"resize",r),document.documentMode>=9?(mxEvent.addListener(t,"DOMNodeRemoved",r),mxEvent.addListener(t,"DOMNodeInserted",r)):(mxEvent.addListener(t,"cut",r),mxEvent.addListener(t,"paste",r))},mxCellEditor.prototype.isStopEditingEvent=function(t){return t.keyCode==113||this.graph.isEnterStopsCellEditing()&&t.keyCode==13&&!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)},mxCellEditor.prototype.isEventSource=function(t){return mxEvent.getSource(t)==this.textarea},mxCellEditor.prototype.resize=function(){var t=this.graph.getView().getState(this.editingCell);if(t==null)this.stopEditing(!0);else if(this.textarea!=null){var e=this.graph.getModel().isEdge(t.cell),i=this.graph.getView().scale,n=null;if(!this.autoSize||t.style[mxConstants.STYLE_OVERFLOW]=="fill")this.bounds=this.getEditorBounds(t),this.textarea.style.width=Math.round(this.bounds.width/i)+"px",this.textarea.style.height=Math.round(this.bounds.height/i)+"px",document.documentMode==8||mxClient.IS_QUIRKS?(this.textarea.style.left=Math.round(this.bounds.x)+"px",this.textarea.style.top=Math.round(this.bounds.y)+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x+1))+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y+1))+"px"),this.graph.isWrapping(t.cell)&&(this.bounds.width>=2||this.bounds.height>=2)&&this.textarea.innerHTML!=this.getEmptyLabelText()?(this.textarea.style.wordWrap=mxConstants.WORD_WRAP,this.textarea.style.whiteSpace="normal",t.style[mxConstants.STYLE_OVERFLOW]!="fill"&&(this.textarea.style.width=Math.round(this.bounds.width/i)+this.wordWrapPadding+"px")):(this.textarea.style.whiteSpace="nowrap",t.style[mxConstants.STYLE_OVERFLOW]!="fill"&&(this.textarea.style.width=""));else{var r=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_WIDTH,null);if(n=t.text!=null&&this.align==null?t.text.margin:null,n==null&&(n=mxUtils.getAlignmentAsPoint(this.align||mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))),e){if(this.bounds=new mxRectangle(t.absoluteOffset.x,t.absoluteOffset.y,0,0),r!=null){var s=(parseFloat(r)+2)*i;this.bounds.width=s,this.bounds.x+=n.x*s}}else{var l=mxRectangle.fromRectangle(t),a=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),o=mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);if(l=t.shape!=null&&a==mxConstants.ALIGN_CENTER&&o==mxConstants.ALIGN_MIDDLE?t.shape.getLabelBounds(l):l,r!=null&&(l.width=parseFloat(r)*i),!t.view.graph.cellRenderer.legacySpacing||t.style[mxConstants.STYLE_OVERFLOW]!="width"){var u=parseInt(t.style[mxConstants.STYLE_SPACING]||2)*i,p=(parseInt(t.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*i+u,m=(parseInt(t.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*i+u,d=(parseInt(t.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*i+u,x=(parseInt(t.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*i+u,a=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),o=mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);l=new mxRectangle(l.x+x,l.y+p,l.width-(a==mxConstants.ALIGN_CENTER&&r==null?x+m:0),l.height-(o==mxConstants.ALIGN_MIDDLE?p+d:0))}this.bounds=new mxRectangle(l.x+t.absoluteOffset.x,l.y+t.absoluteOffset.y,l.width,l.height)}if(this.graph.isWrapping(t.cell)&&(this.bounds.width>=2||this.bounds.height>=2)&&this.textarea.innerHTML!=this.getEmptyLabelText()){this.textarea.style.wordWrap=mxConstants.WORD_WRAP,this.textarea.style.whiteSpace="normal";var s=Math.round(this.bounds.width/(document.documentMode==8,i))+this.wordWrapPadding;this.textarea.style.position!="relative"?(this.textarea.style.width=s+"px",this.textarea.scrollWidth>s&&(this.textarea.style.width=this.textarea.scrollWidth+"px")):this.textarea.style.maxWidth=s+"px"}else this.textarea.style.whiteSpace="nowrap",this.textarea.style.width="";document.documentMode==8&&(this.textarea.style.zoom="1",this.textarea.style.height="auto");var f=this.textarea.scrollWidth,g=this.textarea.scrollHeight;document.documentMode==8?(this.textarea.style.left=Math.max(0,Math.ceil((this.bounds.x-n.x*(this.bounds.width-(f+1)*i)+f*(i-1)*0+(n.x+.5)*2)/i))+"px",this.textarea.style.top=Math.max(0,Math.ceil((this.bounds.y-n.y*(this.bounds.height-(g+.5)*i)+g*(i-1)*0+Math.abs(n.y+.5)*1)/i))+"px",this.textarea.style.width=Math.round(f*i)+"px",this.textarea.style.height=Math.round(g*i)+"px"):mxClient.IS_QUIRKS?(this.textarea.style.left=Math.max(0,Math.ceil(this.bounds.x-n.x*(this.bounds.width-(f+1)*i)+f*(i-1)*0+(n.x+.5)*2))+"px",this.textarea.style.top=Math.max(0,Math.ceil(this.bounds.y-n.y*(this.bounds.height-(g+.5)*i)+g*(i-1)*0+Math.abs(n.y+.5)*1))+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-n.x*(this.bounds.width-2))+1)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-n.y*(this.bounds.height-4)+(n.y==-1?3:0))+1)+"px")}mxClient.IS_VML?this.textarea.style.zoom=i:(mxUtils.setPrefixedStyle(this.textarea.style,"transformOrigin","0px 0px"),mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+i+","+i+")"+(n==null?"":" translate("+n.x*100+"%,"+n.y*100+"%)")))}},mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())},mxCellEditor.prototype.getBackgroundColor=function(t){return null},mxCellEditor.prototype.isLegacyEditor=function(){if(mxClient.IS_VML)return!0;var t=!1;if(mxClient.IS_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;if(e!=null){var i=mxUtils.getCurrentStyle(e);i!=null&&(t=i.position=="absolute")}}return!t},mxCellEditor.prototype.startEditing=function(t,e){this.stopEditing(!0),this.align=null,this.textarea==null&&this.init(),this.graph.tooltipHandler!=null&&this.graph.tooltipHandler.hideTooltip();var i=this.graph.getView().getState(t);if(i!=null){this.graph.getView().scale;var n=mxUtils.getValue(i.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),r=mxUtils.getValue(i.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),s=mxUtils.getValue(i.style,mxConstants.STYLE_FONTCOLOR,"black"),l=mxUtils.getValue(i.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),a=(mxUtils.getValue(i.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,o=(mxUtils.getValue(i.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,u=[];(mxUtils.getValue(i.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.push("underline"),(mxUtils.getValue(i.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&u.push("line-through"),this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(n*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,this.textarea.style.backgroundColor=this.getBackgroundColor(i),this.textarea.style.textDecoration=u.join(" "),this.textarea.style.fontWeight=a?"bold":"normal",this.textarea.style.fontStyle=o?"italic":"",this.textarea.style.fontSize=Math.round(n)+"px",this.textarea.style.zIndex=this.zIndex,this.textarea.style.fontFamily=r,this.textarea.style.textAlign=l,this.textarea.style.outline="none",this.textarea.style.color=s;var p=this.textDirection=mxUtils.getValue(i.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);p==mxConstants.TEXT_DIRECTION_AUTO&&i!=null&&i.text!=null&&i.text.dialect!=mxConstants.DIALECT_STRICTHTML&&!mxUtils.isNode(i.text.value)&&(p=i.text.getAutoDirection()),p==mxConstants.TEXT_DIRECTION_LTR||p==mxConstants.TEXT_DIRECTION_RTL?this.textarea.setAttribute("dir",p):this.textarea.removeAttribute("dir"),this.textarea.innerHTML=this.getInitialValue(i,e)||"",this.initialValue=this.textarea.innerHTML,this.textarea.innerHTML.length==0||this.textarea.innerHTML=="
"?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText(),this.graph.container.appendChild(this.textarea),this.editingCell=t,this.trigger=e,this.textNode=null,i.text!=null&&this.isHideLabel(i)&&(this.textNode=i.text.node,this.textNode.style.visibility="hidden"),this.autoSize&&(this.graph.model.isEdge(i.cell)||i.style[mxConstants.STYLE_OVERFLOW]!="fill")&&window.setTimeout(mxUtils.bind(this,function(){this.resize()}),0),this.resize();try{this.textarea.focus(),this.isSelectText()&&this.textarea.innerHTML.length>0&&(this.textarea.innerHTML!=this.getEmptyLabelText()||!this.clearOnChange)&&document.execCommand("selectAll",!1,null)}catch{}}},mxCellEditor.prototype.isSelectText=function(){return this.selectText},mxCellEditor.prototype.clearSelection=function(){var t=null;window.getSelection?t=window.getSelection():document.selection&&(t=document.selection),t!=null&&(t.empty?t.empty():t.removeAllRanges&&t.removeAllRanges())},mxCellEditor.prototype.stopEditing=function(t){if(t=t||!1,this.editingCell!=null){this.textNode!=null&&(this.textNode.style.visibility="visible",this.textNode=null);var e=t?null:this.graph.view.getState(this.editingCell),i=this.initialValue;if(this.initialValue=null,this.editingCell=null,this.trigger=null,this.bounds=null,this.textarea.blur(),this.clearSelection(),this.textarea.parentNode!=null&&this.textarea.parentNode.removeChild(this.textarea),this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.textarea.innerHTML="",this.clearOnChange=!1),e!=null&&(this.textarea.innerHTML!=i||this.align!=null)){this.prepareTextarea();var n=this.getCurrentValue(e);this.graph.getModel().beginUpdate();try{n!=null&&this.applyValue(e,n),this.align!=null&&this.graph.setCellStyles(mxConstants.STYLE_ALIGN,this.align,[e.cell])}finally{this.graph.getModel().endUpdate()}}mxEvent.release(this.textarea),this.textarea=null,this.align=null}},mxCellEditor.prototype.prepareTextarea=function(){this.textarea.lastChild!=null&&this.textarea.lastChild.nodeName=="BR"&&this.textarea.removeChild(this.textarea.lastChild)},mxCellEditor.prototype.isHideLabel=function(t){return!0},mxCellEditor.prototype.getMinimumSize=function(t){var e=this.graph.getView().scale;return new mxRectangle(0,0,t.text==null?30:t.text.size*e+20,this.textarea.style.textAlign=="left"?120:40)},mxCellEditor.prototype.getEditorBounds=function(t){var e=this.graph.getModel().isEdge(t.cell),i=this.graph.getView().scale,n=this.getMinimumSize(t),r=n.width,s=n.height,l=null;if(!e&&t.view.graph.cellRenderer.legacySpacing&&t.style[mxConstants.STYLE_OVERFLOW]=="fill")l=t.shape.getLabelBounds(mxRectangle.fromRectangle(t));else{var a=parseInt(t.style[mxConstants.STYLE_SPACING]||0)*i,o=(parseInt(t.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*i+a,u=(parseInt(t.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*i+a,p=(parseInt(t.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*i+a,m=(parseInt(t.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*i+a;l=new mxRectangle(t.x,t.y,Math.max(r,t.width-m-u),Math.max(s,t.height-o-p));var d=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),x=mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);if(l=t.shape!=null&&d==mxConstants.ALIGN_CENTER&&x==mxConstants.ALIGN_MIDDLE?t.shape.getLabelBounds(l):l,e?(l.x=t.absoluteOffset.x,l.y=t.absoluteOffset.y,t.text!=null&&t.text.boundingBox!=null&&(t.text.boundingBox.x>0&&(l.x=t.text.boundingBox.x),t.text.boundingBox.y>0&&(l.y=t.text.boundingBox.y))):t.text!=null&&t.text.boundingBox!=null&&(l.x=Math.min(l.x,t.text.boundingBox.x),l.y=Math.min(l.y,t.text.boundingBox.y)),l.x+=m,l.y+=o,t.text!=null&&t.text.boundingBox!=null&&(e?(l.width=Math.max(r,t.text.boundingBox.width),l.height=Math.max(s,t.text.boundingBox.height)):(l.width=Math.max(l.width,t.text.boundingBox.width),l.height=Math.max(l.height,t.text.boundingBox.height))),this.graph.getModel().isVertex(t.cell)){var f=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);f==mxConstants.ALIGN_LEFT?l.x-=t.width:f==mxConstants.ALIGN_RIGHT&&(l.x+=t.width);var g=mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);g==mxConstants.ALIGN_TOP?l.y-=t.height:g==mxConstants.ALIGN_BOTTOM&&(l.y+=t.height)}}return new mxRectangle(Math.round(l.x),Math.round(l.y),Math.round(l.width),Math.round(l.height))},mxCellEditor.prototype.getEmptyLabelText=function(t){return this.emptyLabelText},mxCellEditor.prototype.getEditingCell=function(){return this.editingCell},mxCellEditor.prototype.destroy=function(){this.textarea!=null&&(mxEvent.release(this.textarea),this.textarea.parentNode!=null&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null),this.changeHandler!=null&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null),this.zoomHandler&&(this.graph.view.removeListener(this.zoomHandler),this.zoomHandler=null)},__mxOutput.mxCellEditor=typeof mxCellEditor<"u"?mxCellEditor:void 0;function mxCellRenderer(){}mxCellRenderer.defaultShapes=new Object,mxCellRenderer.prototype.defaultEdgeShape=mxConnector,mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape,mxCellRenderer.prototype.defaultTextShape=mxText,mxCellRenderer.prototype.legacyControlPosition=!0,mxCellRenderer.prototype.legacySpacing=!0,mxCellRenderer.prototype.antiAlias=!0,mxCellRenderer.prototype.minSvgStrokeWidth=1,mxCellRenderer.prototype.forceControlClickHandler=!1,mxCellRenderer.registerShape=function(t,e){mxCellRenderer.defaultShapes[t]=e},mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape),mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse),mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus),mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder),mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector),mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor),mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle),mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon),mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud),mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine),mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow),mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW_CONNECTOR,mxArrowConnector),mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse),mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane),mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape),mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel),mxCellRenderer.prototype.initializeShape=function(t){t.shape.dialect=t.view.graph.dialect,this.configureShape(t),t.shape.init(t.view.getDrawPane())},mxCellRenderer.prototype.createShape=function(t){var e=null;if(t.style!=null){var i=mxStencilRegistry.getStencil(t.style[mxConstants.STYLE_SHAPE]);if(i!=null)e=new mxShape(i);else{var n=this.getShapeConstructor(t);e=new n}}return e},mxCellRenderer.prototype.createIndicatorShape=function(t){t.shape.indicatorShape=this.getShape(t.view.graph.getIndicatorShape(t))},mxCellRenderer.prototype.getShape=function(t){return t!=null?mxCellRenderer.defaultShapes[t]:null},mxCellRenderer.prototype.getShapeConstructor=function(t){var e=this.getShape(t.style[mxConstants.STYLE_SHAPE]);return e==null&&(e=t.view.graph.getModel().isEdge(t.cell)?this.defaultEdgeShape:this.defaultVertexShape),e},mxCellRenderer.prototype.configureShape=function(t){t.shape.apply(t),t.shape.image=t.view.graph.getImage(t),t.shape.indicatorColor=t.view.graph.getIndicatorColor(t),t.shape.indicatorStrokeColor=t.style[mxConstants.STYLE_INDICATOR_STROKECOLOR],t.shape.indicatorGradientColor=t.view.graph.getIndicatorGradientColor(t),t.shape.indicatorDirection=t.style[mxConstants.STYLE_INDICATOR_DIRECTION],t.shape.indicatorImage=t.view.graph.getIndicatorImage(t),this.postConfigureShape(t)},mxCellRenderer.prototype.postConfigureShape=function(t){t.shape!=null&&(this.resolveColor(t,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(t,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(t,"gradient",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(t,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(t,"fill",mxConstants.STYLE_FILLCOLOR))},mxCellRenderer.prototype.checkPlaceholderStyles=function(t){if(t.style!=null){for(var e=["inherit","swimlane","indicated"],i=[mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_FONTCOLOR],n=0;nc&&(P=c);var R=Math.sqrt(mxUtils.ptSegDistSq(o.x,o.y,u.x,u.y,e,i)),O=mxUtils.relativeCcw(o.x,o.y,u.x,u.y,e,i);return O==-1&&(R=-R),new mxPoint((l/2-x-P)/l*-2,R/this.scale)}}return new mxPoint},mxGraphView.prototype.updateEdgeLabelOffset=function(t){var e=t.absolutePoints;if(t.absoluteOffset.x=t.getCenterX(),t.absoluteOffset.y=t.getCenterY(),e!=null&&e.length>0&&t.segments!=null){var i=this.graph.getCellGeometry(t.cell);if(i.relative){var n=this.getPoint(t,i);n!=null&&(t.absoluteOffset=n)}else{var r=e[0],s=e[e.length-1];if(r!=null&&s!=null){var l=s.x-r.x,a=s.y-r.y,o=0,u=0,p=i.offset;p!=null&&(o=p.x,u=p.y);var m=r.x+l/2+o*this.scale,d=r.y+a/2+u*this.scale;t.absoluteOffset.x=m,t.absoluteOffset.y=d}}}},mxGraphView.prototype.getState=function(t,e){e=e||!1;var i=null;return t!=null&&(i=this.states.get(t),e&&(i==null||this.updateStyle)&&this.graph.isCellVisible(t)&&(i==null?(i=this.createState(t),this.states.put(t,i)):i.style=this.graph.getCellStyle(t))),i},mxGraphView.prototype.isRendering=function(){return this.rendering},mxGraphView.prototype.setRendering=function(t){this.rendering=t},mxGraphView.prototype.isAllowEval=function(){return this.allowEval},mxGraphView.prototype.setAllowEval=function(t){this.allowEval=t},mxGraphView.prototype.getStates=function(){return this.states},mxGraphView.prototype.setStates=function(t){this.states=t},mxGraphView.prototype.getCellStates=function(t){if(t==null)return this.states;for(var e=[],i=0;i
");var p=mxUtils.getSizeForString(u,s,r[mxConstants.STYLE_FONTFAMILY],e,r[mxConstants.STYLE_FONTSTYLE]),m=p.width+l,d=p.height+a;if(!mxUtils.getValue(r,mxConstants.STYLE_HORIZONTAL,!0)){var x=d;d=m,m=x}this.gridEnabled&&(m=this.snap(m+this.gridSize/2),d=this.snap(d+this.gridSize/2)),i=new mxRectangle(0,0,m,d)}else{var f=4*this.gridSize;i=new mxRectangle(0,0,f,f)}}}return i},mxGraph.prototype.resizeCell=function(t,e,i){return this.resizeCells([t],[e],i)[0]},mxGraph.prototype.resizeCells=function(t,e,i){i=i??this.isRecursiveResize(),this.model.beginUpdate();try{var n=this.cellsResized(t,e,i);this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",t,"bounds",e,"previous",n))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellsResized=function(t,e,i){i=i??!1;var n=[];if(t!=null&&e!=null&&t.length==e.length){this.model.beginUpdate();try{for(var r=0;r
")),r==null&&t.overlays!=null&&t.overlays.visit(function(l,a){r==null&&(e==a.node||e.parentNode==a.node)&&(r=a.overlay.toString())}),r==null){var s=this.selectionCellsHandler.getHandler(t.cell);s!=null&&typeof s.getTooltipForNode=="function"&&(r=s.getTooltipForNode(e))}r==null&&(r=this.getTooltipForCell(t.cell))}return r},mxGraph.prototype.getTooltipForCell=function(t){var e=null;return t!=null&&t.getTooltip!=null?e=t.getTooltip():e=this.convertValueToString(t),e},mxGraph.prototype.getLinkForCell=function(t){return null},mxGraph.prototype.getCursorForMouseEvent=function(t){return this.getCursorForCell(t.getCell())},mxGraph.prototype.getCursorForCell=function(t){return null},mxGraph.prototype.getStartSize=function(t,e){var i=new mxRectangle,n=this.getCurrentCellStyle(t,e),r=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return mxUtils.getValue(n,mxConstants.STYLE_HORIZONTAL,!0)?i.height=r:i.width=r,i},mxGraph.prototype.getSwimlaneDirection=function(t){var e=mxUtils.getValue(t,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST),i=mxUtils.getValue(t,mxConstants.STYLE_FLIPH,0)==1,n=mxUtils.getValue(t,mxConstants.STYLE_FLIPV,0)==1,r=mxUtils.getValue(t,mxConstants.STYLE_HORIZONTAL,!0),s=r?0:3;e==mxConstants.DIRECTION_NORTH?s--:e==mxConstants.DIRECTION_WEST?s+=2:e==mxConstants.DIRECTION_SOUTH&&(s+=1);var l=mxUtils.mod(s,2);return i&&l==1&&(s+=2),n&&l==0&&(s+=2),[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST][mxUtils.mod(s,4)]},mxGraph.prototype.getActualStartSize=function(t,e){var i=new mxRectangle;if(this.isSwimlane(t,e)){var n=this.getCurrentCellStyle(t,e),r=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),s=this.getSwimlaneDirection(n);s==mxConstants.DIRECTION_NORTH?i.y=r:s==mxConstants.DIRECTION_WEST?i.x=r:s==mxConstants.DIRECTION_SOUTH?i.height=r:i.width=r}return i},mxGraph.prototype.getImage=function(t){return t!=null&&t.style!=null?t.style[mxConstants.STYLE_IMAGE]:null},mxGraph.prototype.isTransparentState=function(t){var e=!1;if(t!=null){var i=mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),n=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e=i==mxConstants.NONE&&n==mxConstants.NONE&&this.getImage(t)==null}return e},mxGraph.prototype.getVerticalAlign=function(t){return t!=null&&t.style!=null?t.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null},mxGraph.prototype.getIndicatorColor=function(t){return t!=null&&t.style!=null?t.style[mxConstants.STYLE_INDICATOR_COLOR]:null},mxGraph.prototype.getIndicatorGradientColor=function(t){return t!=null&&t.style!=null?t.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null},mxGraph.prototype.getIndicatorShape=function(t){return t!=null&&t.style!=null?t.style[mxConstants.STYLE_INDICATOR_SHAPE]:null},mxGraph.prototype.getIndicatorImage=function(t){return t!=null&&t.style!=null?t.style[mxConstants.STYLE_INDICATOR_IMAGE]:null},mxGraph.prototype.getBorder=function(){return this.border},mxGraph.prototype.setBorder=function(t){this.border=t},mxGraph.prototype.isSwimlane=function(t,e){return t!=null&&this.model.getParent(t)!=this.model.getRoot()&&!this.model.isEdge(t)?this.getCurrentCellStyle(t,e)[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE:!1},mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer},mxGraph.prototype.setResizeContainer=function(t){this.resizeContainer=t},mxGraph.prototype.isEnabled=function(){return this.enabled},mxGraph.prototype.setEnabled=function(t){this.enabled=t},mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled},mxGraph.prototype.setEscapeEnabled=function(t){this.escapeEnabled=t},mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing},mxGraph.prototype.setInvokesStopCellEditing=function(t){this.invokesStopCellEditing=t},mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing},mxGraph.prototype.setEnterStopsCellEditing=function(t){this.enterStopsCellEditing=t},mxGraph.prototype.isCellLocked=function(t){var e=this.model.getGeometry(t);return this.isCellsLocked()||e!=null&&this.model.isVertex(t)&&e.relative},mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked},mxGraph.prototype.setCellsLocked=function(t){this.cellsLocked=t},mxGraph.prototype.getCloneableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,function(e){return this.isCellCloneable(e)}))},mxGraph.prototype.isCellCloneable=function(t){var e=this.getCurrentCellStyle(t);return this.isCellsCloneable()&&e[mxConstants.STYLE_CLONEABLE]!=0},mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable},mxGraph.prototype.setCellsCloneable=function(t){this.cellsCloneable=t},mxGraph.prototype.getExportableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,function(e){return this.canExportCell(e)}))},mxGraph.prototype.canExportCell=function(t){return this.exportEnabled},mxGraph.prototype.getImportableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,function(e){return this.canImportCell(e)}))},mxGraph.prototype.canImportCell=function(t){return this.importEnabled},mxGraph.prototype.isCellSelectable=function(t){return this.isCellsSelectable()},mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable},mxGraph.prototype.setCellsSelectable=function(t){this.cellsSelectable=t},mxGraph.prototype.getDeletableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,function(e){return this.isCellDeletable(e)}))},mxGraph.prototype.isCellDeletable=function(t){var e=this.getCurrentCellStyle(t);return this.isCellsDeletable()&&e[mxConstants.STYLE_DELETABLE]!=0},mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable},mxGraph.prototype.setCellsDeletable=function(t){this.cellsDeletable=t},mxGraph.prototype.isLabelMovable=function(t){return!this.isCellLocked(t)&&(this.model.isEdge(t)&&this.edgeLabelsMovable||this.model.isVertex(t)&&this.vertexLabelsMovable)},mxGraph.prototype.isCellRotatable=function(t){var e=this.getCurrentCellStyle(t);return e[mxConstants.STYLE_ROTATABLE]!=0},mxGraph.prototype.getMovableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,function(e){return this.isCellMovable(e)}))},mxGraph.prototype.isCellMovable=function(t){var e=this.getCurrentCellStyle(t);return this.isCellsMovable()&&!this.isCellLocked(t)&&e[mxConstants.STYLE_MOVABLE]!=0},mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable},mxGraph.prototype.setCellsMovable=function(t){this.cellsMovable=t},mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled},mxGraph.prototype.setGridEnabled=function(t){this.gridEnabled=t},mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled},mxGraph.prototype.setPortsEnabled=function(t){this.portsEnabled=t},mxGraph.prototype.getGridSize=function(){return this.gridSize},mxGraph.prototype.setGridSize=function(t){this.gridSize=t},mxGraph.prototype.getTolerance=function(){return this.tolerance},mxGraph.prototype.setTolerance=function(t){this.tolerance=t},mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable},mxGraph.prototype.setVertexLabelsMovable=function(t){this.vertexLabelsMovable=t},mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable},mxGraph.prototype.setEdgeLabelsMovable=function(t){this.edgeLabelsMovable=t},mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting},mxGraph.prototype.setSwimlaneNesting=function(t){this.swimlaneNesting=t},mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled},mxGraph.prototype.setSwimlaneSelectionEnabled=function(t){this.swimlaneSelectionEnabled=t},mxGraph.prototype.isMultigraph=function(){return this.multigraph},mxGraph.prototype.setMultigraph=function(t){this.multigraph=t},mxGraph.prototype.isAllowLoops=function(){return this.allowLoops},mxGraph.prototype.setAllowDanglingEdges=function(t){this.allowDanglingEdges=t},mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges},mxGraph.prototype.setConnectableEdges=function(t){this.connectableEdges=t},mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges},mxGraph.prototype.setCloneInvalidEdges=function(t){this.cloneInvalidEdges=t},mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges},mxGraph.prototype.setAllowLoops=function(t){this.allowLoops=t},mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove},mxGraph.prototype.setDisconnectOnMove=function(t){this.disconnectOnMove=t},mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled},mxGraph.prototype.setDropEnabled=function(t){this.dropEnabled=t},mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled},mxGraph.prototype.setSplitEnabled=function(t){this.splitEnabled=t},mxGraph.prototype.isCellResizable=function(t){var e=this.getCurrentCellStyle(t);return this.isCellsResizable()&&!this.isCellLocked(t)&&mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")!="0"},mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable},mxGraph.prototype.setCellsResizable=function(t){this.cellsResizable=t},mxGraph.prototype.isTerminalPointMovable=function(t,e){return!0},mxGraph.prototype.isCellBendable=function(t){var e=this.getCurrentCellStyle(t);return this.isCellsBendable()&&!this.isCellLocked(t)&&e[mxConstants.STYLE_BENDABLE]!=0},mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable},mxGraph.prototype.setCellsBendable=function(t){this.cellsBendable=t},mxGraph.prototype.isCellEditable=function(t){var e=this.getCurrentCellStyle(t);return this.isCellsEditable()&&!this.isCellLocked(t)&&e[mxConstants.STYLE_EDITABLE]!=0},mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable},mxGraph.prototype.setCellsEditable=function(t){this.cellsEditable=t},mxGraph.prototype.isCellDisconnectable=function(t,e,i){return this.isCellsDisconnectable()&&!this.isCellLocked(t)},mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable},mxGraph.prototype.setCellsDisconnectable=function(t){this.cellsDisconnectable=t},mxGraph.prototype.isValidSource=function(t){return t==null&&this.allowDanglingEdges||t!=null&&(!this.model.isEdge(t)||this.connectableEdges)&&this.isCellConnectable(t)},mxGraph.prototype.isValidTarget=function(t){return this.isValidSource(t)},mxGraph.prototype.isValidConnection=function(t,e){return this.isValidSource(t)&&this.isValidTarget(e)},mxGraph.prototype.setConnectable=function(t){this.connectionHandler.setEnabled(t)},mxGraph.prototype.isConnectable=function(){return this.connectionHandler.isEnabled()},mxGraph.prototype.setTooltips=function(t){this.tooltipHandler.setEnabled(t)},mxGraph.prototype.setPanning=function(t){this.panningHandler.panningEnabled=t},mxGraph.prototype.isEditing=function(t){if(this.cellEditor!=null){var e=this.cellEditor.getEditingCell();return t==null?e!=null:t==e}return!1},mxGraph.prototype.isAutoSizeCell=function(t){var e=this.getCurrentCellStyle(t);return this.isAutoSizeCells()||e[mxConstants.STYLE_AUTOSIZE]==1},mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells},mxGraph.prototype.setAutoSizeCells=function(t){this.autoSizeCells=t},mxGraph.prototype.isExtendParent=function(t){return!this.getModel().isEdge(t)&&this.isExtendParents()},mxGraph.prototype.isExtendParents=function(){return this.extendParents},mxGraph.prototype.setExtendParents=function(t){this.extendParents=t},mxGraph.prototype.isExtendParentsOnAdd=function(t){return this.extendParentsOnAdd},mxGraph.prototype.setExtendParentsOnAdd=function(t){this.extendParentsOnAdd=t},mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove},mxGraph.prototype.setExtendParentsOnMove=function(t){this.extendParentsOnMove=t},mxGraph.prototype.isRecursiveResize=function(t){return this.recursiveResize},mxGraph.prototype.setRecursiveResize=function(t){this.recursiveResize=t},mxGraph.prototype.isConstrainChild=function(t){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(t))},mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren},mxGraph.prototype.setConstrainChildren=function(t){this.constrainChildren=t},mxGraph.prototype.isConstrainRelativeChildren=function(){return this.constrainRelativeChildren},mxGraph.prototype.setConstrainRelativeChildren=function(t){this.constrainRelativeChildren=t},mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates},mxGraph.prototype.setAllowNegativeCoordinates=function(t){this.allowNegativeCoordinates=t},mxGraph.prototype.getOverlap=function(t){return this.isAllowOverlapParent(t)?this.defaultOverlap:0},mxGraph.prototype.isAllowOverlapParent=function(t){return!1},mxGraph.prototype.getFoldableCells=function(t,e){return this.model.filterCells(t,mxUtils.bind(this,function(i){return this.isCellFoldable(i,e)}))},mxGraph.prototype.isCellFoldable=function(t,e){var i=this.getCurrentCellStyle(t);return this.model.getChildCount(t)>0&&i[mxConstants.STYLE_FOLDABLE]!=0},mxGraph.prototype.isValidDropTarget=function(t,e,i){return t!=null&&(this.isSplitEnabled()&&this.isSplitTarget(t,e,i)||!this.model.isEdge(t)&&(this.isSwimlane(t)||this.model.getChildCount(t)>0&&!this.isCellCollapsed(t)))},mxGraph.prototype.isSplitTarget=function(t,e,i){if(this.model.isEdge(t)&&e!=null&&e.length==1&&this.isCellConnectable(e[0])&&this.getEdgeValidationError(t,this.model.getTerminal(t,!0),e[0])==null){var n=this.model.getTerminal(t,!0),r=this.model.getTerminal(t,!1);return!this.model.isAncestor(e[0],n)&&!this.model.isAncestor(e[0],r)}return!1},mxGraph.prototype.getDropTarget=function(t,e,i,n){if(!this.isSwimlaneNesting()){for(var r=0;r0||!i&&d==0&&m>0)&&n.push(u);var g=i?d-m:m-d;g>a&&(a=g,l=u)}}n.length==0&&l!=null&&n.push(l)}return n},mxGraph.prototype.traverse=function(t,e,i,n,r,s){if(i!=null&&t!=null&&(e=e??!0,s=s??!1,r=r||new mxDictionary,!r.get(t))){r.put(t,!0);var l=i(t,n);if(l==null||l){var a=this.model.getEdgeCount(t);if(a>0)for(var o=0;o0?n.cells[0]:null;n.cells.length>1&&n.clear();var s=r!=null?this.model.getParent(r):this.getDefaultParent(),l=this.model.getChildCount(s);if(r==null&&l>0){var a=this.model.getChildAt(s,0);this.setSelectionCell(a)}else if((r==null||e)&&this.view.getState(s)!=null&&this.model.getGeometry(s)!=null)this.getCurrentRoot()!=s&&this.setSelectionCell(s);else if(r!=null&&i){var o=this.model.getChildCount(r);if(o>0){var a=this.model.getChildAt(r,0);this.setSelectionCell(a)}}else if(l>0){var u=s.getIndex(r);if(t){u++;var a=this.model.getChildAt(s,u%l);this.setSelectionCell(a)}else{u--;var p=u<0?l-1:u,a=this.model.getChildAt(s,p);this.setSelectionCell(a)}}},mxGraph.prototype.selectAll=function(t,e){t=t||this.getDefaultParent();var i=e?this.model.filterDescendants(mxUtils.bind(this,function(n){return n!=t&&this.view.getState(n)!=null}),t):this.model.getChildren(t);i!=null&&this.setSelectionCells(i)},mxGraph.prototype.selectVertices=function(t,e){this.selectCells(!0,!1,t,e)},mxGraph.prototype.selectEdges=function(t){this.selectCells(!1,!0,t)},mxGraph.prototype.selectCells=function(t,e,i,n){i=i||this.getDefaultParent();var r=mxUtils.bind(this,function(l){return this.view.getState(l)!=null&&((n||this.model.getChildCount(l)==0)&&this.model.isVertex(l)&&t&&!this.model.isEdge(this.model.getParent(l))||this.model.isEdge(l)&&e)}),s=this.model.filterDescendants(r,i);s!=null&&this.setSelectionCells(s)},mxGraph.prototype.selectCellForEvent=function(t,e){var i=this.isCellSelected(t);this.isToggleEvent(e)?i?this.removeSelectionCell(t):this.addSelectionCell(t):(!i||this.getSelectionCount()!=1)&&this.setSelectionCell(t)},mxGraph.prototype.selectCellsForEvent=function(t,e){this.isToggleEvent(e)?this.addSelectionCells(t):this.setSelectionCells(t)},mxGraph.prototype.createHandler=function(t){var e=null;if(t!=null)if(this.model.isEdge(t.cell)){var i=t.getVisibleTerminalState(!0),n=t.getVisibleTerminalState(!1),r=this.getCellGeometry(t.cell),s=this.view.getEdgeStyle(t,r!=null?r.points:null,i,n);e=this.createEdgeHandler(t,s)}else e=this.createVertexHandler(t);return e},mxGraph.prototype.createVertexHandler=function(t){return new mxVertexHandler(t)},mxGraph.prototype.createEdgeHandler=function(t,e){var i=null;return e==mxEdgeStyle.Loop||e==mxEdgeStyle.ElbowConnector||e==mxEdgeStyle.SideToSide||e==mxEdgeStyle.TopToBottom?i=this.createElbowEdgeHandler(t):e==mxEdgeStyle.SegmentConnector||e==mxEdgeStyle.OrthConnector?i=this.createEdgeSegmentHandler(t):i=new mxEdgeHandler(t),i},mxGraph.prototype.createEdgeSegmentHandler=function(t){return new mxEdgeSegmentHandler(t)},mxGraph.prototype.createElbowEdgeHandler=function(t){return new mxElbowEdgeHandler(t)},mxGraph.prototype.addMouseListener=function(t){this.mouseListeners==null&&(this.mouseListeners=[]),this.mouseListeners.push(t)},mxGraph.prototype.removeMouseListener=function(t){if(this.mouseListeners!=null){for(var e=0;e
"),this.div.style.visibility="",mxUtils.fit(this.div)}},mxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),this.div!=null&&this.div.parentNode!=null&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)},__mxOutput.mxTooltipHandler=typeof mxTooltipHandler<"u"?mxTooltipHandler:void 0;function mxCellTracker(t,e,i){mxCellMarker.call(this,t,e),this.graph.addMouseListener(this),i!=null&&(this.getCell=i),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker),mxCellTracker.prototype.mouseDown=function(t,e){},mxCellTracker.prototype.mouseMove=function(t,e){this.isEnabled()&&this.process(e)},mxCellTracker.prototype.mouseUp=function(t,e){},mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))},__mxOutput.mxCellTracker=typeof mxCellTracker<"u"?mxCellTracker:void 0;function mxCellHighlight(t,e,i,n){t!=null&&(this.graph=t,this.highlightColor=e??mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=i??mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=n??!1,this.opacity=mxConstants.HIGHLIGHT_OPACITY,this.repaintHandler=mxUtils.bind(this,function(){if(this.state!=null){var r=this.graph.view.getState(this.state.cell);r==null?this.hide():(this.state=r,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1,mxCellHighlight.prototype.graph=null,mxCellHighlight.prototype.state=null,mxCellHighlight.prototype.spacing=2,mxCellHighlight.prototype.resetHandler=null,mxCellHighlight.prototype.setHighlightColor=function(t){this.highlightColor=t,this.shape!=null&&(this.shape.stroke=t)},mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape(),this.repaint(),!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)},mxCellHighlight.prototype.createShape=function(){var t=this.graph.cellRenderer.createShape(this.state);return t.svgStrokeTolerance=this.graph.tolerance,t.points=this.state.absolutePoints,t.apply(this.state),t.stroke=this.highlightColor,t.opacity=this.opacity,t.isDashed=this.dashed,t.isShadow=!1,t.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,t.init(this.graph.getView().getOverlayPane()),mxEvent.redirectMouseEvents(t.node,this.graph,this.state),this.graph.dialect!=mxConstants.DIALECT_SVG?t.pointerEvents=!1:t.svgPointerEvents="stroke",t},mxCellHighlight.prototype.getStrokeWidth=function(t){return this.strokeWidth},mxCellHighlight.prototype.repaint=function(){this.state!=null&&this.shape!=null&&(this.shape.scale=this.state.view.scale,this.graph.model.isEdge(this.state.cell)?(this.shape.strokewidth=this.getStrokeWidth(),this.shape.points=this.state.absolutePoints,this.shape.outline=!1):(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.shape.strokewidth=this.getStrokeWidth()/this.state.view.scale,this.shape.outline=!0),this.state.shape!=null&&this.shape.setCursor(this.state.shape.getCursor()),(mxClient.IS_QUIRKS||document.documentMode==8)&&(this.shape.stroke=="transparent"?(this.shape.stroke="white",this.shape.opacity=1):this.shape.opacity=this.opacity),this.shape.redraw())},mxCellHighlight.prototype.hide=function(){this.highlight(null)},mxCellHighlight.prototype.highlight=function(t){this.state!=t&&(this.shape!=null&&(this.shape.destroy(),this.shape=null),this.state=t,this.state!=null&&this.drawHighlight())},mxCellHighlight.prototype.isHighlightAt=function(t,e){var i=!1;if(this.shape!=null&&document.elementFromPoint!=null&&!mxClient.IS_QUIRKS)for(var n=document.elementFromPoint(t,e);n!=null;){if(n==this.shape.node){i=!0;break}n=n.parentNode}return i},mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler),this.graph.getView().removeListener(this.repaintHandler),this.graph.getModel().removeListener(this.repaintHandler),this.shape!=null&&(this.shape.destroy(),this.shape=null)},__mxOutput.mxCellHighlight=typeof mxCellHighlight<"u"?mxCellHighlight:void 0;function mxDefaultKeyHandler(t){if(t!=null){this.editor=t,this.handler=new mxKeyHandler(t.graph);var e=this.handler.escape;this.handler.escape=function(i){e.apply(this,arguments),t.hideProperties(),t.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",i))}}}mxDefaultKeyHandler.prototype.editor=null,mxDefaultKeyHandler.prototype.handler=null,mxDefaultKeyHandler.prototype.bindAction=function(t,e,i){var n=mxUtils.bind(this,function(){this.editor.execute(e)});i?this.handler.bindControlKey(t,n):this.handler.bindKey(t,n)},mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy(),this.handler=null},__mxOutput.mxDefaultKeyHandler=typeof mxDefaultKeyHandler<"u"?mxDefaultKeyHandler:void 0;function mxDefaultPopupMenu(t){this.config=t}mxDefaultPopupMenu.prototype.imageBasePath=null,mxDefaultPopupMenu.prototype.config=null,mxDefaultPopupMenu.prototype.createMenu=function(t,e,i,n){if(this.config!=null){var r=this.createConditions(t,i,n),s=this.config.firstChild;this.addItems(t,e,i,n,r,s,null)}},mxDefaultPopupMenu.prototype.addItems=function(t,e,i,n,r,s,l){for(var a=!1;s!=null;){if(s.nodeName=="add"){var o=s.getAttribute("if");if(o==null||r[o]){var u=s.getAttribute("as");u=mxResources.get(u)||u;var p=mxUtils.eval(mxUtils.getTextContent(s)),m=s.getAttribute("action"),d=s.getAttribute("icon"),x=s.getAttribute("iconCls"),f=s.getAttribute("enabled-if"),g=f==null||r[f];a&&(e.addSeparator(l),a=!1),d!=null&&this.imageBasePath&&(d=this.imageBasePath+d);var c=this.addAction(e,t,u,d,p,m,i,l,x,g);this.addItems(t,e,i,n,r,s.firstChild,c)}}else s.nodeName=="separator"&&(a=!0);s=s.nextSibling}},mxDefaultPopupMenu.prototype.addAction=function(t,e,i,n,r,s,l,a,o,u){var p=function(m){typeof r=="function"&&r.call(e,e,l,m),s!=null&&e.execute(s,l,m)};return t.addItem(i,n,p,a,o,u)},mxDefaultPopupMenu.prototype.createConditions=function(t,e,i){var n=t.graph.getModel(),r=n.getChildCount(e),s=[];s.nocell=e==null,s.ncells=t.graph.getSelectionCount()>1,s.notRoot=n.getRoot()!=n.getParent(t.graph.getDefaultParent()),s.cell=e!=null;var l=e!=null&&t.graph.getSelectionCount()==1;s.nonEmpty=l&&r>0,s.expandable=l&&t.graph.isCellFoldable(e,!1),s.collapsable=l&&t.graph.isCellFoldable(e,!0),s.validRoot=l&&t.graph.isValidRoot(e),s.emptyValidRoot=s.validRoot&&r==0,s.swimlane=l&&t.graph.isSwimlane(e);for(var a=this.config.getElementsByTagName("condition"),o=0;o