From ff0b4e7ae8adc83b106be9a2ddf0077fdc029500 Mon Sep 17 00:00:00 2001 From: "David Benson [draw.io]" <david@jgraph.com> Date: Tue, 5 May 2020 01:17:55 +0100 Subject: [PATCH] 13.0.7 release --- ChangeLog | 4 + VERSION | 2 +- etc/license-worker/license.js | 6 + etc/mxgraph/mxClient.js | 8 +- .../connect/confluence/macroEditor-1-4-8.html | 2 +- src/main/webapp/js/app.min.js | 841 +++++---- src/main/webapp/js/diagramly/vsdx/importer.js | 180 +- src/main/webapp/js/extensions.min.js | 645 +++---- src/main/webapp/js/mxgraph/Editor.js | 45 +- src/main/webapp/js/mxgraph/EditorUi.js | 16 + src/main/webapp/js/mxgraph/Graph.js | 221 +-- src/main/webapp/js/viewer.min.js | 1647 ++++++++--------- src/main/webapp/service-worker.js | 4 +- 13 files changed, 1864 insertions(+), 1757 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfb816e1c..0b4180ac0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +05-MAY-2020: 13.0.7 + +- Uses mxGraph 4.1.2 beta 6 + 03-MAY-2020: 13.0.6 - Disables deltas for OneDrive real time diff --git a/VERSION b/VERSION index b5f62cdfa..aac9a035b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -13.0.6 \ No newline at end of file +13.0.7 \ No newline at end of file diff --git a/etc/license-worker/license.js b/etc/license-worker/license.js index f29259f18..452eb6137 100644 --- a/etc/license-worker/license.js +++ b/etc/license-worker/license.js @@ -38,6 +38,12 @@ async function handleRequest(request) let url = "https://log.diagrams.net/" + msg; fetch(url); } + else if (domain != null) + { + let msg = encodeURIComponent(('license:atlas-cloud:' + domain)); + let url = "https://log.diagrams.net/" + msg; + fetch(url); + } if (domain != null) { diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 2b98dfb51..b8224cb78 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -722,8 +722,8 @@ y)));this.limitX=Math.max(this.limitX,y);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankT q.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}}; mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)}; mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null; -mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots)for(var d=a.roots,c=[],e=0;e<d.length;e++)mxCellPath.create(d[e]),c[e]=a.vertexMapper.get(d[e]);a.visit(function(a,c,d,e,m){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);m=null!=a&&null!=d&&a.swimlaneIndex<c.swimlaneIndex&&d.source==c;e?(d.invert(),mxUtils.remove(d,a.connectsAsSource),c.connectsAsSource.push(d),a.connectsAsTarget.push(d),mxUtils.remove(d, -c.connectsAsTarget)):m&&(d.invert(),mxUtils.remove(d,a.connectsAsTarget),c.connectsAsTarget.push(d),a.connectsAsSource.push(d),mxUtils.remove(d,c.connectsAsSource));a=mxCellPath.create(c.cell);delete b[a]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout; +mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots)for(var d=a.roots,c=[],e=0;e<d.length;e++)c[e]=a.vertexMapper.get(d[e]);a.visit(function(a,c,d,e,m){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);m=null!=a&&null!=d&&a.swimlaneIndex<c.swimlaneIndex&&d.source==c;e?(d.invert(),mxUtils.remove(d,a.connectsAsSource),c.connectsAsSource.push(d),a.connectsAsTarget.push(d),mxUtils.remove(d,c.connectsAsTarget)): +m&&(d.invert(),mxUtils.remove(d,a.connectsAsTarget),c.connectsAsTarget.push(d),a.connectsAsSource.push(d),mxUtils.remove(d,c.connectsAsSource));a=mxCellPath.create(c.cell);delete b[a]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout; mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!1;mxHierarchicalLayout.prototype.maintainParentLocation=!1;mxHierarchicalLayout.prototype.moveParent=!1;mxHierarchicalLayout.prototype.parentBorder=0;mxHierarchicalLayout.prototype.intraCellSpacing=30;mxHierarchicalLayout.prototype.interRankCellSpacing=100;mxHierarchicalLayout.prototype.interHierarchySpacing=60; mxHierarchicalLayout.prototype.parallelEdgeSpacing=10;mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxHierarchicalLayout.prototype.fineTuning=!0;mxHierarchicalLayout.prototype.tightenToSource=!0;mxHierarchicalLayout.prototype.disableEdgeStyle=!0;mxHierarchicalLayout.prototype.traverseAncestors=!0;mxHierarchicalLayout.prototype.model=null;mxHierarchicalLayout.prototype.edgesCache=null;mxHierarchicalLayout.prototype.edgeSourceTermCache=null; mxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxHierarchicalLayout.prototype.getModel=function(){return this.model}; @@ -1394,11 +1394,11 @@ mxGraphHandler.prototype.start=function(a,b,c,d){this.cell=a;this.first=mxUtils. var e=this.graph.model.getParent(a),f=2>this.graph.model.getChildCount(e),g=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||g.get(c)||g.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(a){var b=this.graph.model.getParent(a.cell);return null!=a.cell&&(!this.cloning&&this.isCellMoving(a.cell)||a.cell!=(this.target||e)&&!f&&!g.get(a)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&& b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)}; mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.graph.isConstrainedEvent(a.getEvent()):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a}; -mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a}; +mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a,b){return this.graph.model.getParent(this.cell)!=a}; mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))}; mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(b.isConsumed()||!c.isMouseDown||null==this.cell||null==this.first||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||c.isMouseDown||(d=c.getCursorForMouseEvent(b),null==d&&c.isEnabled()&&c.isCellMovable(b.getCell())&&(d=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!= d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=c.tolerance;if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>e||Math.abs(d.y)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));var e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=c.isGridEnabledEvent(b.getEvent()),g=b.getCell(),k=!0,l=null;this.cloning=e;c.isDropEnabled()&& -this.highlightEnabled&&(l=c.getDropTarget(this.cells,b.getEvent(),g,e));var m=c.getView().getState(l),n=!1;null!=m&&(e||this.isValidDropTarget(l))?(this.target!=l&&(this.target=l,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),n=!0):(this.target=null,this.connectOnDrop&&null!=g&&1==this.cells.length&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&(m=c.getView().getState(g),null!=m&&(g=null==c.getEdgeValidationError(null,this.cell,g)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR, +this.highlightEnabled&&(l=c.getDropTarget(this.cells,b.getEvent(),g,e));var m=c.getView().getState(l),n=!1;null!=m&&(e||this.isValidDropTarget(l,b))?(this.target!=l&&(this.target=l,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),n=!0):(this.target=null,this.connectOnDrop&&null!=g&&1==this.cells.length&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&(m=c.getView().getState(g),null!=m&&(g=null==c.getEdgeValidationError(null,this.cell,g)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR, this.setHighlightColor(g),n=!0)));null!=m&&n?this.highlight.highlight(m):this.highlight.hide();null!=this.guide&&this.useGuidesForEvent(b)?(d=this.guide.move(this.bounds,d,f,e),k=!1):d=this.graph.snapDelta(d,this.bounds,!f,!1,!1);null!=this.guide&&k&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(d.x)>Math.abs(d.y)?d.y=0:d.x=0);this.checkPreview();if(this.currentDx!=d.x||this.currentDy!=d.y)this.currentDx=d.x,this.currentDy=d.y,this.updatePreview()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE, b);mxEvent.consume(b.getEvent())}};mxGraphHandler.prototype.updatePreview=function(a){this.livePreviewUsed&&!a?null!=this.cells&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1),this.updateLivePreview(this.currentDx,this.currentDy)):this.updatePreviewShape()}; mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&null!=this.pBounds&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx),Math.round(this.pBounds.y+this.currentDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())}; diff --git a/src/main/webapp/connect/confluence/macroEditor-1-4-8.html b/src/main/webapp/connect/confluence/macroEditor-1-4-8.html index c77edda30..9006176bf 100644 --- a/src/main/webapp/connect/confluence/macroEditor-1-4-8.html +++ b/src/main/webapp/connect/confluence/macroEditor-1-4-8.html @@ -46,7 +46,7 @@ var script = document.createElement('script'); script.setAttribute('data-options', 'resize:false;margin:false'); - if (!licenseValid && license != null && xdm_e != null) + if (license != null && xdm_e != null) { if (license == 'none') { diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 8ac074966..9ae9a2f34 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -866,8 +866,8 @@ y)));this.limitX=Math.max(this.limitX,y);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankT q.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}}; mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)}; mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null; -mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots)for(var d=a.roots,c=[],e=0;e<d.length;e++)mxCellPath.create(d[e]),c[e]=a.vertexMapper.get(d[e]);a.visit(function(a,c,d,e,m){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);m=null!=a&&null!=d&&a.swimlaneIndex<c.swimlaneIndex&&d.source==c;e?(d.invert(),mxUtils.remove(d,a.connectsAsSource),c.connectsAsSource.push(d),a.connectsAsTarget.push(d),mxUtils.remove(d, -c.connectsAsTarget)):m&&(d.invert(),mxUtils.remove(d,a.connectsAsTarget),c.connectsAsTarget.push(d),a.connectsAsSource.push(d),mxUtils.remove(d,c.connectsAsSource));a=mxCellPath.create(c.cell);delete b[a]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout; +mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots)for(var d=a.roots,c=[],e=0;e<d.length;e++)c[e]=a.vertexMapper.get(d[e]);a.visit(function(a,c,d,e,m){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);m=null!=a&&null!=d&&a.swimlaneIndex<c.swimlaneIndex&&d.source==c;e?(d.invert(),mxUtils.remove(d,a.connectsAsSource),c.connectsAsSource.push(d),a.connectsAsTarget.push(d),mxUtils.remove(d,c.connectsAsTarget)): +m&&(d.invert(),mxUtils.remove(d,a.connectsAsTarget),c.connectsAsTarget.push(d),a.connectsAsSource.push(d),mxUtils.remove(d,c.connectsAsSource));a=mxCellPath.create(c.cell);delete b[a]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout; mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!1;mxHierarchicalLayout.prototype.maintainParentLocation=!1;mxHierarchicalLayout.prototype.moveParent=!1;mxHierarchicalLayout.prototype.parentBorder=0;mxHierarchicalLayout.prototype.intraCellSpacing=30;mxHierarchicalLayout.prototype.interRankCellSpacing=100;mxHierarchicalLayout.prototype.interHierarchySpacing=60; mxHierarchicalLayout.prototype.parallelEdgeSpacing=10;mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxHierarchicalLayout.prototype.fineTuning=!0;mxHierarchicalLayout.prototype.tightenToSource=!0;mxHierarchicalLayout.prototype.disableEdgeStyle=!0;mxHierarchicalLayout.prototype.traverseAncestors=!0;mxHierarchicalLayout.prototype.model=null;mxHierarchicalLayout.prototype.edgesCache=null;mxHierarchicalLayout.prototype.edgeSourceTermCache=null; mxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxHierarchicalLayout.prototype.getModel=function(){return this.model}; @@ -1538,11 +1538,11 @@ mxGraphHandler.prototype.start=function(a,b,c,d){this.cell=a;this.first=mxUtils. var e=this.graph.model.getParent(a),f=2>this.graph.model.getChildCount(e),g=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||g.get(c)||g.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(a){var b=this.graph.model.getParent(a.cell);return null!=a.cell&&(!this.cloning&&this.isCellMoving(a.cell)||a.cell!=(this.target||e)&&!f&&!g.get(a)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&& b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)}; mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.graph.isConstrainedEvent(a.getEvent()):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a}; -mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a}; +mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a,b){return this.graph.model.getParent(this.cell)!=a}; mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))}; mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(b.isConsumed()||!c.isMouseDown||null==this.cell||null==this.first||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||c.isMouseDown||(d=c.getCursorForMouseEvent(b),null==d&&c.isEnabled()&&c.isCellMovable(b.getCell())&&(d=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!= d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=c.tolerance;if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>e||Math.abs(d.y)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));var e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=c.isGridEnabledEvent(b.getEvent()),g=b.getCell(),k=!0,l=null;this.cloning=e;c.isDropEnabled()&& -this.highlightEnabled&&(l=c.getDropTarget(this.cells,b.getEvent(),g,e));var m=c.getView().getState(l),n=!1;null!=m&&(e||this.isValidDropTarget(l))?(this.target!=l&&(this.target=l,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),n=!0):(this.target=null,this.connectOnDrop&&null!=g&&1==this.cells.length&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&(m=c.getView().getState(g),null!=m&&(g=null==c.getEdgeValidationError(null,this.cell,g)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR, +this.highlightEnabled&&(l=c.getDropTarget(this.cells,b.getEvent(),g,e));var m=c.getView().getState(l),n=!1;null!=m&&(e||this.isValidDropTarget(l,b))?(this.target!=l&&(this.target=l,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),n=!0):(this.target=null,this.connectOnDrop&&null!=g&&1==this.cells.length&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&(m=c.getView().getState(g),null!=m&&(g=null==c.getEdgeValidationError(null,this.cell,g)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR, this.setHighlightColor(g),n=!0)));null!=m&&n?this.highlight.highlight(m):this.highlight.hide();null!=this.guide&&this.useGuidesForEvent(b)?(d=this.guide.move(this.bounds,d,f,e),k=!1):d=this.graph.snapDelta(d,this.bounds,!f,!1,!1);null!=this.guide&&k&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(d.x)>Math.abs(d.y)?d.y=0:d.x=0);this.checkPreview();if(this.currentDx!=d.x||this.currentDy!=d.y)this.currentDx=d.x,this.currentDy=d.y,this.updatePreview()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE, b);mxEvent.consume(b.getEvent())}};mxGraphHandler.prototype.updatePreview=function(a){this.livePreviewUsed&&!a?null!=this.cells&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1),this.updateLivePreview(this.currentDx,this.currentDy)):this.updatePreviewShape()}; mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&null!=this.pBounds&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx),Math.round(this.pBounds.y+this.currentDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())}; @@ -2045,11 +2045,9 @@ Editor=function(a,c,d,b,f){mxEventSource.call(this);this.chromeless=null!=a?a:th function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+ -"/move.png"; -Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+ -"/help.png"; -Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+ -"/checkmark.gif";Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC"; +"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/help.png"; +Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=": +IMAGE_PATH+"/checkmark.gif";Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC"; Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC"; Editor.layersImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAaVBMVEUAAAAgICAICAgdHR0PDw8WFhYICAgLCwsXFxcvLy8ODg4uLi4iIiIqKiokJCQYGBgKCgonJycFBQUCAgIqKiocHBwcHBwODg4eHh4cHBwnJycJCQkUFBQqKiojIyMuLi4ZGRkgICAEBATOWYXAAAAAGnRSTlMAD7+fnz8/H7/ff18/77+vr5+fn39/b28fH2xSoKsAAACQSURBVBjTrYxJEsMgDARZZMAY73sgCcn/HxnhKtnk7j6oRq0psfuoyndZ/SuODkHPLzfVT6KeyPePnJ7KrnkRjWMXTn4SMnN8mXe2SSM3ts8L/ZUxxrbAULSYJJULE0Iw9pjpenoICcgcX61mGgTgtCv9Be99pzCoDhNQWQnchD1mup5++CYGcoQexajZbfwAj/0MD8ZOaUgAAAAASUVORK5CYII="; Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAh0lEQVQ4je3UsQnCUBCA4U8hpa1NsoEjpHQJS0dxADdwEMuMIJkgA1hYChbGQgMi+JC8q4L/AB/vDu7x74cWWEZhJU44RmA1zujR5GIbXF9YNrjD/Q0bDRY4fEBZ4P4LlgTnCbAf84pUM8/9hY08tMUtEoQ1LpEgrNBFglChFXR6Q6GfwwR6AGKJMF74Vtt3AAAAAElFTkSuQmCC";Editor.nextImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAi0lEQVQ4jeXUIQ7CUAwA0MeGxWI2yylwnALJUdBcgYvM7QYLmjOQIAkIPmJZghiIvypoUtX0tfnJL38X5ZfaEgUeUcManFBHgS0SLlhHggk3bCPBhCf2keCQR8wjwYTDp6YiZxJmOU1jGw7vGALescuBxsArNlOwd/CM1VSM/ut1qCIw+uOwiMJ+OF4CQzBCXm3hyAAAAABJRU5ErkJggg=="; @@ -2083,11 +2081,11 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,d){c.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,c){var d=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<d.length){a.getModel();for(var f=[],g=0;g< d.length;g++)null!=a.view.getState(d[g])&&f.push(d[g]);a.setSelectionCells(f)}};c.addListener(mxEvent.UNDO,d);c.addListener(mxEvent.REDO,d);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()}; OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,c,d,b,f,e,h,g,k,l,m){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);d+=n;b+=n;var p=d,q=b,v=mxUtils.getDocumentSize();null!=window.innerHeight&&(v.height=window.innerHeight);var u=v.height,r=Math.max(1,Math.round((v.width-d-64)/2)),w=Math.max(1,Math.round((u-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,u-64);0<a.dialogs.length&&(this.zIndex+= -2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";r+=v.x;w+=v.y;f&&document.body.appendChild(this.bg);var t=a.createDiv(k?"geTransDialog": -"geDialog");f=this.getPosition(r,w,d,b);r=f.x;w=f.y;t.style.width=d+"px";t.style.height=b+"px";t.style.left=r+"px";t.style.top=w+"px";t.style.zIndex=this.zIndex;t.appendChild(c);document.body.appendChild(t);!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=r+d+38-n+"px",e.style.zIndex= -this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){y=!0}),null,mxUtils.bind(this,function(b){y&&(a.hideDialog(!0),y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(p=d=e.w,q=b=e.h)}e=mxUtils.getDocumentSize();u=e.height;this.bg.style.height=u+"px";r=Math.max(1,Math.round((e.width-d-64)/2));w=Math.max(1, -Math.round((u-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-64):p;b=Math.min(q,u-64);e=this.getPosition(r,w,d,b);r=e.x;w=e.y;t.style.left=r+"px";t.style.top=w+"px";t.style.width=d+"px";t.style.height=b+"px";!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=r+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container= +function Dialog(a,c,d,b,f,e,h,g,k,l,m){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);d+=n;b+=n;var p=d,r=b,u=mxUtils.getDocumentSize();null!=window.innerHeight&&(u.height=window.innerHeight);var v=u.height,q=Math.max(1,Math.round((u.width-d-64)/2)),w=Math.max(1,Math.round((v-b-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");d=null!=document.body?Math.min(d,document.body.scrollWidth-64):d;b=Math.min(b,v-64);0<a.dialogs.length&&(this.zIndex+= +2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=v+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";q+=u.x;w+=u.y;f&&document.body.appendChild(this.bg);var t=a.createDiv(k?"geTransDialog": +"geDialog");f=this.getPosition(q,w,d,b);q=f.x;w=f.y;t.style.width=d+"px";t.style.height=b+"px";t.style.left=q+"px";t.style.top=w+"px";t.style.zIndex=this.zIndex;t.appendChild(c);document.body.appendChild(t);!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=w+14+"px",e.style.left=q+d+38-n+"px",e.style.zIndex= +this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){y=!0}),null,mxUtils.bind(this,function(b){y&&(a.hideDialog(!0),y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var e=l();null!=e&&(p=d=e.w,r=b=e.h)}e=mxUtils.getDocumentSize();v=e.height;this.bg.style.height=v+"px";q=Math.max(1,Math.round((e.width-d-64)/2));w=Math.max(1, +Math.round((v-b-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-64):p;b=Math.min(r,v-64);e=this.getPosition(q,w,d,b);q=e.x;w=e.y;t.style.left=q+"px";t.style.top=w+"px";t.style.width=d+"px";t.style.height=b+"px";!g&&c.clientHeight>t.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=q+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=h;this.container= t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; @@ -2098,8 +2096,8 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; var ErrorDialog=function(a,c,d,b,f,e,h,g,k,l,m){k=null!=k?k:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);n.appendChild(p)}c= -document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;n.appendChild(c);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",d.appendChild(c),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var q=mxUtils.button(b,function(){k&&a.hideDialog();null!=f&&f()}); -q.className="geBtn";d.appendChild(q);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=g&&g()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,c){this.create(a,c)}; +document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=d;n.appendChild(c);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",d.appendChild(c),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var r=mxUtils.button(b,function(){k&&a.hideDialog();null!=f&&f()}); +r.className="geBtn";d.appendChild(r);null!=h&&(b=mxUtils.button(h,function(){k&&a.hideDialog();null!=g&&g()}),b.className="geBtn gePrimaryBtn",d.appendChild(b));this.init=function(){r.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,c){this.create(a,c)}; PrintDialog.prototype.create=function(a){function c(a){var b=g.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var h=g.checked?1:parseInt(m.value);isNaN(h)||(f=mxUtils.getScaleForPageCount(h,d,e))}d.getGraphBounds();var k=h=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),h-=c.x*e.width,k-=c.y*e.height): b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,h,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,b,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var h=document.createElement("tbody");b=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage")); f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;l.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){l.checked=!g.checked});b.appendChild(f);h.appendChild(b);b=b.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(l);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");f.appendChild(k);mxEvent.addListener(k, @@ -2109,30 +2107,30 @@ f.style.paddingTop="20px";f.setAttribute("align","right");k=mxUtils.button(mxRes f.appendChild(k);b.appendChild(f);h.appendChild(b);e.appendChild(h);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(d){}}; PrintDialog.createPrintPreview=function(a,c,d,b,f,e,h){c=new mxPrintPreview(a,c,d,b,f,e);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=h;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var g=c.writeHead;c.writeHead=function(a){g.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==q?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",q.src),p.style.fontSize="11px",p.innerHTML=q.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width= +var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){null==r?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",r.src),p.style.fontSize="11px",p.innerHTML=r.src.substring(0,42)+"...")}var b=a.editor.graph,f,e,h=document.createElement("table");h.style.width= "100%";h.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",b.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td"); mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="18px";l.style.height="18px";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";var m=b.background;c();mxEvent.addListener(l,"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)}); e.appendChild(l);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=b.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?b.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+ -":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var q=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){q=a;d()});mxEvent.consume(b)});d();e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var v= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&e.appendChild(v);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||b.model.execute(c)});u.className="geBtn gePrimaryBtn";e.appendChild(u);a.editor.cancelFirst||e.appendChild(v);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h}; -PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<v.length;b++)c=v[b],t?"custom"==c.key&&(g.value=c.key,t=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&& +":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var r=b.backgroundImage;mxEvent.addListener(p,"click",function(b){a.showBackgroundImageDialog(function(a){r=a;d()});mxEvent.consume(b)});d();e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var u= +mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&e.appendChild(u);var v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,r,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=r?r.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&& +c.ignoreColor&&c.ignoreImage||b.model.execute(c)});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(u);f.appendChild(e);g.appendChild(f);h.appendChild(g);this.container=h}; +PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<u.length;b++)c=u[b],t?"custom"==c.key&&(g.value=c.key,t=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&& d.height==c.format.height?(g.value=c.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,e.setAttribute("checked","checked"), g.value="custom",k.style.display="none",m.style.display="")}}c="format-"+c;var e=document.createElement("input");e.setAttribute("name",c);e.setAttribute("type","radio");e.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft="4px";k.style.width="210px"; k.style.height="24px";e.style.marginRight="6px";k.appendChild(e);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input"); -n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},v=PageSetupDialog.getFormats(),u=0;u<v.length;u++){var r=v[u];q[r.key]=r;var w=document.createElement("option");w.setAttribute("value",r.key);mxUtils.write(w,r.title);g.appendChild(w)}var t=!1;f();a.appendChild(g);mxUtils.br(a); -a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0, +n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var r={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var q=u[v];r[q.key]=q;var w=document.createElement("option");w.setAttribute("value",q.key);mxUtils.write(w,q.title);g.appendChild(w)}var t=!1;f();a.appendChild(g);mxUtils.br(a); +a.appendChild(k);a.appendChild(m);var y=d,x=function(a,c){var e=r[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(e=new mxRectangle(0,0, e.height,e.width));c&&t||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y))};mxEvent.addListener(c,"click",function(a){e.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(e,"change",x);mxEvent.addListener(g,"change",function(a){t="custom"==g.value; x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m,n){k=null!=k?k:!0;var p,q,v=document.createElement("table"),u=document.createElement("tbody");v.style.marginTop="8px";p=document.createElement("tr");q=document.createElement("td");q.style.whiteSpace="nowrap";q.style.fontSize="10pt";q.style.width=m?"80px":"120px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var r=document.createElement("input");r.setAttribute("value",c||"");r.style.marginLeft="4px";r.style.width=null!=n?n+ -"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(r.value))k&&a.hideDialog(),b(r.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(r.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=v.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()}); -mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=r,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),w.click());a.stopPropagation();a.preventDefault()}))}}};q=document.createElement("td"); -q.style.whiteSpace="nowrap";q.appendChild(r);p.appendChild(q);if(null!=f||null==h)u.appendChild(p),null!=m&&(null!=a.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(a,r,a.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="74px",q.appendChild(p),r.style.width=null!=n?n-40+"px":"140px"),q.appendChild(FilenameDialog.createTypeHint(a,r,m)));null!=h&&(p=document.createElement("tr"),q=document.createElement("td"),q.colSpan=2,q.appendChild(h),p.appendChild(q),u.appendChild(p));p= -document.createElement("tr");q=document.createElement("td");q.colSpan=2;q.style.paddingTop="20px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&q.appendChild(m);null!=g&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),n.className="geBtn",q.appendChild(n));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&w.click()}); -q.appendChild(w);a.editor.cancelFirst||q.appendChild(m);p.appendChild(q);u.appendChild(p);v.appendChild(u);this.container=v};FilenameDialog.filenameHelpLink=null; +var FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,m,n){k=null!=k?k:!0;var p,r,u=document.createElement("table"),v=document.createElement("tbody");u.style.marginTop="8px";p=document.createElement("tr");r=document.createElement("td");r.style.whiteSpace="nowrap";r.style.fontSize="10pt";r.style.width=m?"80px":"120px";mxUtils.write(r,(f||mxResources.get("filename"))+":");p.appendChild(r);var q=document.createElement("input");q.setAttribute("value",c||"");q.style.marginLeft="4px";q.style.width=null!=n?n+ +"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(q.value))k&&a.hideDialog(),b(q.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=u.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()}); +mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=q,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),w.click());a.stopPropagation();a.preventDefault()}))}}};r=document.createElement("td"); +r.style.whiteSpace="nowrap";r.appendChild(q);p.appendChild(r);if(null!=f||null==h)v.appendChild(p),null!=m&&(null!=a.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(a,q,a.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="74px",r.appendChild(p),q.style.width=null!=n?n-40+"px":"140px"),r.appendChild(FilenameDialog.createTypeHint(a,q,m)));null!=h&&(p=document.createElement("tr"),r=document.createElement("td"),r.colSpan=2,r.appendChild(h),p.appendChild(r),v.appendChild(p));p= +document.createElement("tr");r=document.createElement("td");r.colSpan=2;r.style.paddingTop="20px";r.style.whiteSpace="nowrap";r.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&r.appendChild(m);null!=g&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(g)}),n.className="geBtn",r.appendChild(n));mxEvent.addListener(q,"keypress",function(a){13==a.keyCode&&w.click()}); +r.appendChild(w);a.editor.cancelFirst||r.appendChild(m);p.appendChild(r);v.appendChild(p);u.appendChild(v);this.container=u};FilenameDialog.filenameHelpLink=null; FilenameDialog.createTypeHint=function(a,c,d){var b=document.createElement("img");b.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(b,70);var f=function(){b.setAttribute("src",Editor.helpImage);b.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&c.value.toLowerCase().substring(c.value.length-d[a].ext.length-1)=="."+d[a].ext){b.setAttribute("src", mxClient.imageBasePath+"/warning.png");b.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(c,"keyup",f);mxEvent.addListener(c,"change",f);mxEvent.addListener(b,"click",function(c){var d=b.getAttribute("title");b.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=d&&a.showError(null,d,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90); mxEvent.consume(c)});f();return b}; @@ -2152,35 +2150,35 @@ var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.protot !0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),h=Math.floor(Math.min(0, c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+h*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-h)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,e,h){var g=f.apply(this,arguments);null==h||h||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=e.apply(this,arguments),c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),f=c.getParent(b); -if(null==d||d!=b&&d!=f)for(;!(this.graph.isCellSelected(b)||this.graph.isCellSelected(f)||this.graph.isContainer(f)&&!this.graph.isPart(b))&&c.isVertex(f);)b=f,f=this.graph.getModel().getParent(b);return b};var h=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=h.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed= -function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(!(null!=c&&a.isSource(c.control)||this.graph.isToggleEvent(a.getEvent())))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&& -!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,c,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var b=this.editor.graph;b.lightbox=d;b.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); +if(null==d||d!=b&&d!=f)for(;!(this.graph.isCellSelected(b)||this.graph.isCellSelected(f)||this.graph.isContainer(f)&&!this.graph.isPart(b))&&c.isVertex(f);)b=f,f=this.graph.getModel().getParent(b);return b};var h=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(this.graph.cellEditor.getEditingCell()==a)return!1;var c=h.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c= +!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(!(null!=c&&a.isSource(c.control)||this.graph.isToggleEvent(a.getEvent())))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent= +function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,c,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var b=this.editor.graph;b.lightbox=d;b.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!b.standalone){this.createDivs();this.createUi();this.refresh();var f=mxUtils.bind(this,function(a){null==a&&(a=window.event);return b.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart= f,this.menubarContainer.onmousedown=f,this.toolbarContainer.onselectstart=f,this.toolbarContainer.onmousedown=f,this.diagramContainer.onselectstart=f,this.diagramContainer.onmousedown=f,this.sidebarContainer.onselectstart=f,this.sidebarContainer.onmousedown=f,this.formatContainer.onselectstart=f,this.formatContainer.onmousedown=f,this.footerContainer.onselectstart=f,this.footerContainer.onmousedown=f,null!=this.tabContainer&&(this.tabContainer.onselectstart=f));!this.editor.chromeless||this.editor.editable? (c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return f(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);mxClient.IS_SVG&&null!=b.view.getDrawPane()&&(c=b.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position= -"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var e=!1,h=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent= -function(a,b){return e||h.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||b.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(e=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup", -this.keyupHandler);var g=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&& -mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=b.isZoomWheelEvent;b.isZoomWheelEvent=function(){return e||l.apply(this,arguments)};var m=!1,n=null,p=null,q=null,v=mxUtils.bind(this,function(){if(null!=this.toolbar&&m!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu; -d=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var e=0;e<q.length;e++)this.toolbar.container.appendChild(q[e]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=p}m=b.cellEditor.isContentEditing();n=a;p=d;q=c}}),u=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);v();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c= -c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));u.toolbar.setFontName(d);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w= -b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{w.apply(this,arguments),v()}catch(G){u.handleError(G)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(F){}var t=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod= -mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var y="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d= -a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(L){this.handleError(L)}}; -this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var C=["fontFamily","fontSize","fontColor"],B="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"], -["fillColor","gradientColor"],C,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)y.push(D[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(y,x[a])&&y.push(x[a]);var A=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=y.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p=m.substring(0,n),q=mxUtils.indexOf(g, -p);0<=q&&g.splice(q,1);for(var v=0;v<D.length;v++){var r=D[v];if(0<=mxUtils.indexOf(r,p))for(var u=0;u<r.length;u++){var t=mxUtils.indexOf(g,r[u]);0<=t&&g.splice(t,1)}}}}}for(var w=d.isEdge(f),C=w?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(f),l=0;l<g.length;l++){var p=g[l],A=C[p];null==A||"shape"==p&&!w||w&&!(0>mxUtils.indexOf(x,p))||(B=mxUtils.setStyle(B,p,A))}d.setStyle(f,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});b.addListener("textInserted", -function(a,b){A(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));A(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"), -g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(C,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(x,d[g]))f||0<=mxUtils.indexOf(B,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(y,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(y,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(B,d[g]))null== -h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle|| -"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"), -null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW], -mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(b.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=b.currentVertexStyle.fontFamily||"Helvetica",c=String(b.currentVertexStyle.fontSize||"12"),d=b.getView().getState(b.getSelectionCell()); -null!=d&&(a=d.style[mxConstants.STYLE_FONTFAMILY]||a,c=d.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),b.getSelectionModel().addListener(mxEvent.CHANGE,a),b.getModel().addListener(mxEvent.CHANGE,a));b.addListener(mxEvent.CELLS_ADDED,function(a,c){var d=c.getProperty("cells"),e=c.getProperty("parent");b.getModel().isLayer(e)&&!b.isCellVisible(e)&&null!=d&&0<d.length&&b.getModel().setVisible(e,!0)});this.gestureHandler= -mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange", -this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){b.view.validateBackground()})); -b.addListener("gridSizeChanged",mxUtils.bind(this,function(){b.isGridEnabled()&&b.view.validateBackground()}));this.editor.resetGraph()}this.init();b.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28; -EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; +"absolute"));this.hoverIcons=this.createHoverIcons();if(null!=b.graphHandler){var e=b.graphHandler.start;b.graphHandler.start=function(){null!=q.hoverIcons&&q.hoverIcons.reset();e.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title", +mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var h=!1,g=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return h||g.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||b.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(h=!0,this.hoverIcons.reset(),b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container||mxEvent.consume(a))});mxEvent.addListener(document, +"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){b.container.style.cursor="";h=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var k=b.panningHandler.isForcePanningEvent;b.panningHandler.isForcePanningEvent=function(a){return k.apply(this,arguments)||h||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))}; +var l=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return l.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var m=b.isZoomWheelEvent;b.isZoomWheelEvent=function(){return h||m.apply(this,arguments)};var n=!1,p=null,r=null,u=null,v=mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild, +c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==u)this.toolbar.createTextToolbar();else{for(var e=0;e<u.length;e++)this.toolbar.container.appendChild(u[e]);this.toolbar.fontMenu=p;this.toolbar.sizeMenu=r}n=b.cellEditor.isContentEditing();p=a;r=d;u=c}}),q=this,w=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){w.apply(this,arguments);v();if(b.cellEditor.isContentEditing()){var a= +!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=q.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));q.toolbar.setFontName(d);q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea, +"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{t.apply(this,arguments),v()}catch(J){q.handleError(J)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(I){}var y=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&& +this.container.focus();y.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var x="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),C="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" "); +this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged", +"keys",d,"values",a,"cells",[c.cell]))}}catch(X){this.handleError(X)}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var B=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),A=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "), +["strokeColor","strokeWidth"],["fillColor","gradientColor"],B,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)x.push(A[a][c]);for(a=0;a<C.length;a++)0>mxUtils.indexOf(x,C[a])&&x.push(C[a]);var F=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=x.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p= +m.substring(0,n),r=mxUtils.indexOf(g,p);0<=r&&g.splice(r,1);for(var u=0;u<A.length;u++){var q=A[u];if(0<=mxUtils.indexOf(q,p))for(var v=0;v<q.length;v++){var t=mxUtils.indexOf(g,q[v]);0<=t&&g.splice(t,1)}}}}}for(var w=d.isEdge(f),G=w?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(f),l=0;l<g.length;l++){var p=g[l],y=G[p];null==y||"shape"==p&&!w||w&&!(0>mxUtils.indexOf(C,p))||(B=mxUtils.setStyle(B,p,y))}d.setStyle(f,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){F(b.getProperty("cells"))}); +b.addListener("textInserted",function(a,b){F(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));F(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"), +h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(B,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(C,d[g]))f||0<=mxUtils.indexOf(D,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(x,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(x,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k|| +0<=mxUtils.indexOf(D,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved": +"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"): +"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape, +b.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(b.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(b.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=b.currentVertexStyle.fontFamily||"Helvetica",c=String(b.currentVertexStyle.fontSize|| +"12"),d=b.getView().getState(b.getSelectionCell());null!=d&&(a=d.style[mxConstants.STYLE_FONTFAMILY]||a,c=d.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),b.getSelectionModel().addListener(mxEvent.CHANGE,a),b.getModel().addListener(mxEvent.CHANGE,a));b.addListener(mxEvent.CELLS_ADDED,function(a,c){var d=c.getProperty("cells"),e=c.getProperty("parent");b.getModel().isLayer(e)&&!b.isCellVisible(e)&&null!=d&&0<d.length&& +b.getModel().setVisible(e,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()}); +mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){b.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this, +function(){b.view.validateBackground()}));b.addListener("gridSizeChanged",mxUtils.bind(this,function(){b.isGridEnabled()&&b.view.validateBackground()}));this.editor.resetGraph()}this.init();b.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38; +EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var b=a.getRubberband();null!=b&&b.cancel()}));mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)})); mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){c.apply(this,arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct; this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.onKeyDown=function(a){var c=this.editor.graph;9!=a.which||!c.isEnabled()||mxEvent.isAltDown(a)||c.isEditing()&&mxEvent.isShiftDown(a)||(c.isEditing()?c.stopEditing(!1):c.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))}; @@ -2196,8 +2194,8 @@ EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipb var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width, this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(f); -l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),q=Math.max(q,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b, -Math.floor(c-l.x),Math.floor(q-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView", +l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var r=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b, +Math.floor(c-l.x),Math.floor(r-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView", mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden"; this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var e=mxUtils.bind(this,function(){var b= mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var h=0,e=mxUtils.bind(this,function(a,b,c){h++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title", @@ -2205,16 +2203,16 @@ c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute(" k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontFamily="Helvetica,Arial";k.style.marginTop="8px";k.style.fontSize="14px";k.style.color="#ffffff";this.chromelessToolbar.appendChild(k);var l=e(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(k.innerHTML="",mxUtils.write(k,mxUtils.indexOf(this.pages, this.currentPage)+1+" / "+this.pages.length))});g.style.paddingLeft="0px";g.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",g.style.display="",k.style.display="inline-block"):(l.style.display="none",g.style.display="none",k.style.display="none");m()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",m);e(mxUtils.bind(this, function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage, -mxResources.get("fit"));var p=null,q=null,v=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=q&&(window.clearTimeout(q), -fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=e(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog= -null}));var c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ -this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){r.style.display=1<w.getChildCount(w.root)?"":"none"})}this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(b){null!= +mxResources.get("fit"));var p=null,r=null,u=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=r&&(window.clearTimeout(r),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;r=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";r=null}),600)}),a||200)}),v=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=r&&(window.clearTimeout(r), +fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=e(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog= +null}));var c=q.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ +this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),w=a.getModel();w.addListener(mxEvent.CHANGE,function(){q.style.display=1<w.getChildCount(w.root)?"":"none"})}this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(b){null!= this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var t=this.lightboxToolbarActions[n];e(t.fn,t.icon,t.tooltip)}null!=f.refreshBtn&&e(mxUtils.bind(this,function(a){f.refreshBtn.url?window.location.href=f.refreshBtn.url: window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=f.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(b){f.fullscreenBtn.url?a.openLink(f.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(f.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this, function(a){"1"==urlParams.close||f.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)|| -u(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?v():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?v():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)|| -u(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())< -y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?v():u(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange= +v(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)|| +v(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())< +y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange= function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0= b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var B=a.view.getBackgroundPane(),D=a.view.getDrawPane();a.cumulativeZoomFactor=1;var A=null,F=null,I=null,G=null,J=function(b){null!=A&&window.clearTimeout(A);window.setTimeout(function(){a.isMouseDown||(A=window.setTimeout(mxUtils.bind(this, function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),D.style.transformOrigin="",B.style.transformOrigin="",mxClient.IS_SF?(D.style.transform="scale(1)",B.style.transform="scale(1)",window.setTimeout(function(){D.style.transform="";B.style.transform=""},0)):(D.style.transform= @@ -2319,7 +2317,7 @@ this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.g b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltip.style.width=l+"px";var m=l;if(this.tooltipTitles&&null!=f&&0<f.length){null==this.tooltipTitle? (this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="";this.tooltipTitle.style.display="";mxUtils.write(this.tooltipTitle,f);var m=Math.min(this.maxTooltipWidth, Math.max(l,this.tooltipTitle.scrollWidth+4)),n=this.tooltipTitle.offsetHeight+10,g=g+n;mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-n+"px":(g-=6,this.tooltipTitle.style.top=g-n+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>l&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder)+(m>l?(m-l)/2:0),h=-Math.round(h.y-this.tooltipBorder),n=document.body,p=document.documentElement, -q=this.getTooltipOffset(),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+q.x,g=Math.min(Math.max(n.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+q.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top= +r=this.getTooltipOffset(),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+r.x,g=Math.min(Math.max(n.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+r.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top= h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=m+"px";this.tooltip.style.top=g+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null)}; Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))}; Sidebar.prototype.addEntries=function(a){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var b=a.data,c=null!=a.title?a.title:"";null!=a.tags&&(c+=" "+a.tags);null!=b&&0<c.length?this.addEntry(c,mxUtils.bind(this,function(){b=this.editorUi.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&0<c.length&&this.addEntry(c, @@ -2330,9 +2328,9 @@ null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var d=document.createElement("div");d.className="geSidebar";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.width="100%";d.style.padding="8px";d.style.paddingTop="14px";d.style.paddingBottom="0px";a||(d.style.display="none");var b=document.createElement("div");b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.paddingBottom="8px"; b.style.cursor="default";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("searchShapes"));f.setAttribute("type","text");f.style.fontSize="12px";f.style.overflow="hidden";f.style.boxSizing="border-box";f.style.border="solid 1px #d5d5d5";f.style.borderRadius="4px";f.style.width="100%";f.style.outline="none";f.style.padding="6px";f.style.paddingRight="20px";b.appendChild(f);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title", mxResources.get("search"));e.style.position="relative";e.style.left="-18px";mxClient.IS_QUIRKS?(f.style.height="28px",e.style.top="-4px"):e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";var h;b.appendChild(e);d.appendChild(b);var g=document.createElement("center"),k=mxUtils.button(mxResources.get("moreResults"),function(){h()});k.style.display="none";k.style.lineHeight="normal";k.style.marginTop="4px";k.style.marginBottom="8px";g.style.paddingTop="4px";g.style.paddingBottom= -"4px";g.appendChild(k);d.appendChild(g);var l="",m=!1,n=!1,p=0,q={},v=12,u=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",u());f.focus()});h=mxUtils.bind(this, -function(){v=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(u(),l=f.value,q={},n=!1,p=0),!m&&!n)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,v,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,v,p,b,c,e,f); -0==b.length&&1==p&&(l="");null!=g.parentNode&&g.parentNode.removeChild(g);for(c=0;c<b.length;c++)try{var h=b[c]();null==q[h.innerHTML]&&(q[h.innerHTML]="1",d.appendChild(h))}catch(B){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",n=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else u(),l=f.value="",q={},k.style.display="none",n=!1,f.focus()});mxEvent.addListener(f, +"4px";g.appendChild(k);d.appendChild(g);var l="",m=!1,n=!1,p=0,r={},u=12,v=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var c=a.nextSibling;a!=b&&a!=g&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),k.style.display="none",l=f.value="",v());f.focus()});h=mxUtils.bind(this, +function(){u=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=f.value){if(null!=g.parentNode&&(l!=f.value&&(v(),l=f.value,r={},n=!1,p=0),!m&&!n)){k.setAttribute("disabled","true");k.style.display="";k.style.cursor="wait";k.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,u,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,u,p,b,c,e,f); +0==b.length&&1==p&&(l="");null!=g.parentNode&&g.parentNode.removeChild(g);for(c=0;c<b.length;c++)try{var h=b[c]();null==r[h.innerHTML]&&(r[h.innerHTML]="1",d.appendChild(h))}catch(B){}e?(k.removeAttribute("disabled"),k.innerHTML=mxResources.get("moreResults")):(k.innerHTML=mxResources.get("reset"),k.style.display="none",n=!0);k.style.cursor="";d.appendChild(g)}}),mxUtils.bind(this,function(){k.style.cursor=""}))}}else v(),l=f.value="",r={},k.style.display="none",n=!1,f.focus()});mxEvent.addListener(f, "keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(h(),mxEvent.consume(a))}));mxEvent.addListener(f,"keyup",mxUtils.bind(this,function(a){""==f.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==f.value?(n=!0,k.style.display="none"):f.value!=l?(k.style.display="none",n=!1):m||(k.style.display=n?"none":"")}));mxEvent.addListener(f, "mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(f,"selectstart",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[c,a]}; Sidebar.prototype.insertSearchHint=function(a,c,d,b,f,e,h,g){0==f.length&&1==b&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[c])),a.appendChild(d))}; @@ -2453,11 +2451,11 @@ Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b= d.getModel().isEdge(k)==d.getModel().isEdge(a)){var l=d.getCurrentCellStyle(c[g]);d.getModel().setStyle(k,e);if("1"==mxUtils.getValue(l,"composite","0"))for(var m=d.model.getChildCount(k);0<=m;m--)d.model.remove(d.model.getChildAt(k,m));"umlLifeline"==l[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k]));for(m=0;m<h.length;m++){var n=l[h[m]];null!=n&&d.setCellStyles(h[m], n,[k])}f.push(k)}}}finally{d.model.endUpdate()}return f}; Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(f,e,h,g,k,l){for(l=l?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&f.isEnabled()){a=f.getImportableCells(a);if(0<a.length){f.stopEditing();l=null==h||mxEvent.isAltDown(e)?!1:f.isValidDropTarget(h,a,e);var m=null;null==h||l||(h=null);if(!f.isCellLocked(h|| -f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var n=f.cloneCells(a);f.splitEdge(h,n,null,g-b.width/2,k-b.height/2);m=n}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var p=f.layoutManager.getLayout(h);if(null!=p){var q=f.view.scale,v=f.view.translate,u=(g+v.x)*q,r=(k+v.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],u,r)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!= +f.getDefaultParent())){f.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&f.isSplitTarget(h,a,e)){var n=f.cloneCells(a);f.splitEdge(h,n,null,g-b.width/2,k-b.height/2);m=n}else 0<a.length&&(m=f.importCells(a,g,k,h));if(null!=f.layoutManager){var p=f.layoutManager.getLayout(h);if(null!=p){var r=f.view.scale,u=f.view.translate,v=(g+u.x)*r,q=(k+u.y)*r;for(h=0;h<m.length;h++)p.moveCell(m[h],v,q)}}!d||null!=e&&mxEvent.isShiftDown(e)||f.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(w){this.editorUi.handleError(w)}finally{f.model.endUpdate()}null!= m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=m&&1==m.length&&window.setTimeout(function(){f.startEditing(m[0])},0)}}mxEvent.consume(e)}})};Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border=this.dragPreviewBorder;d.style.width=a+"px";d.style.height=c+"px";return d}; -Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var q=g.layoutManager.getLayout(n);if(null!=q&&q.constructor==mxStackLayout&&(p=!1,h=g.view.getState(n),null!=h)){var v=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+= -v.x;e.y+=v.y;var u=e.getTerminalPoint(!1);null!=u&&(u.x+=v.x,u.y+=v.y)}}var r=m.x,w=m.y;g.model.isEdge(c[b])&&(w=r=0);var t=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(t?r:0),e.y-(t?w:0),t?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(t&&g.model.isVertex(n)){var x= -g.view.getState(n),v=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,v.x,v.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),r=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,r,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)|| +Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var r=g.layoutManager.getLayout(n);if(null!=r&&r.constructor==mxStackLayout&&(p=!1,h=g.view.getState(n),null!=h)){var u=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+= +u.x;e.y+=u.y;var v=e.getTerminalPoint(!1);null!=v&&(v.x+=u.x,v.y+=u.y)}}var q=m.x,w=m.y;g.model.isEdge(c[b])&&(w=q=0);var t=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(t?q:0),e.y-(t?w:0),t?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(t&&g.model.isVertex(n)){var x= +g.view.getState(n),u=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,u.x,u.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),q=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,q,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)|| g.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(C){this.editorUi.handleError(C)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h}; Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a), g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+ @@ -2466,26 +2464,26 @@ b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mx 2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};Sidebar.prototype.isDropStyleEnabled=function(a,c){var d=!0;if(null!=c&&1==a.length){var b=this.graph.getCellStyle(a[c]);null!=b&&(d=mxUtils.getValue(b,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(b,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return d};Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)}; Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS? "inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==A?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])? -m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(b,m),v=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&E==A){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!= -b&&null!=E&&null!=r&&E!=A?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,J,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){v.isActive()&&v.reset()});var u=v.mouseDown;v.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),u.apply(this,arguments))};var r=null,w= -null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),C=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),F=null,I=e(this.roundDrop),G=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,E=null,O=v.createPreviewElement;v.createPreviewElement=function(a){var b=O.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth= -b.style.width;this.previewElementHeight=b.style.height;return b};var U=v.dragEnter;v.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");U.apply(this,arguments)};var R=v.dragExit;v.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");R.apply(this,arguments)};v.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&E==A)this.previewElement.style.display= -a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=r&&null!=E){var e=a.model.isEdge(r.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(r.cell,b[e],J,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(r.cell),q=d.translate.x*d.scale,u=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&& -p!=d.currentRoot&&(u=d.getState(p),q=u.x,u=u.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+q+"px";this.previewElement.style.top=(g.y-k)*d.scale+u+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=v.currentHighlight.state&&a.model.isEdge(v.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)- -f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var K=(new Date).getTime(),H=0,L=null,ca=this.editorUi.editor.graph.getCellStyle(b[0]);v.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f= -this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=E=null;L!=k?(L=k,K=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(L=k,v.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-K;if(q&&2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!= -mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!= +m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var r=this.isDropStyleEnabled(b,m),u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&E==A){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!= +b&&null!=E&&null!=q&&E!=A?(h=a.model.isEdge(q.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(q.cell,b,J,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var v=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var q=null,w= +null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),C=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),F=null,I=e(this.roundDrop),G=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,E=null,M=u.createPreviewElement;u.createPreviewElement=function(a){var b=M.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth= +b.style.width;this.previewElementHeight=b.style.height;return b};var R=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");R.apply(this,arguments)};var S=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");S.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&E==A)this.previewElement.style.display= +a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=q&&null!=E){var e=a.model.isEdge(q.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(q.cell,b[e],J,b),h=a.model.isEdge(q.cell)?null:a.getCellGeometry(q.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(q.cell),r=d.translate.x*d.scale,v=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&& +p!=d.currentRoot&&(v=d.getState(p),r=v.x,v=v.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+r+"px";this.previewElement.style.top=(g.y-k)*d.scale+v+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)- +f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var K=(new Date).getTime(),H=0,L=null,X=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f= +this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=E=null;L!=k?(L=k,K=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(L=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-K;if(r&&2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!= +mxUtils.getValue(X,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(X,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!= m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){t=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);A.style.left=Math.floor(l.x)+"px";A.style.top=Math.floor(l.y)+"px";null==F&&(a.container.appendChild(A),F=A.parentNode);h(c,d,l,A)}else null==t||!mxUtils.contains(t,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(t=null,null!=F&&(A.parentNode.removeChild(A), -F=null)):null!=t&&null!=F&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=r&&!mxEvent.isAltDown(e)&&null==E){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var n=r.absolutePoints;null!=I.parentNode&&(l=n[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width, -this.roundDrop.height),I)));null!=G.parentNode&&(n=n[n.length-1],f.add(h(c,d,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(r.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/ -2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),f.add(h(c,d,new mxRectangle(l.x+l.width,r.getCenterY()-this.triangleRight.height/2,this.triangleRight.width, -this.triangleRight.height),C)),f.add(h(c,d,new mxRectangle(r.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,r.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=f&&f.grow(10)}J=mxConstants.DIRECTION_NORTH;E==C?J=mxConstants.DIRECTION_EAST:E==B||E==G?J=mxConstants.DIRECTION_SOUTH:E==D&&(J=mxConstants.DIRECTION_WEST);null!=t&&E==A&&(k=t); -l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=r&&5E3<=H||r!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==E&&l))if(y=!1,r=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=r&&l){f=[I,G,x,C,B,D];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(n=k.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),I.style.left=Math.floor(l.x- +F=null)):null!=t&&null!=F&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=q&&!mxEvent.isAltDown(e)&&null==E){f=mxRectangle.fromRectangle(q);if(a.model.isEdge(q.cell)){var n=q.absolutePoints;null!=I.parentNode&&(l=n[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width, +this.roundDrop.height),I)));null!=G.parentNode&&(n=n[n.length-1],f.add(h(c,d,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else l=mxRectangle.fromRectangle(q),null!=q.shape&&null!=q.shape.boundingBox&&(l=mxRectangle.fromRectangle(q.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(q.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/ +2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),f.add(h(c,d,new mxRectangle(l.x+l.width,q.getCenterY()-this.triangleRight.height/2,this.triangleRight.width, +this.triangleRight.height),C)),f.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,q.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=f&&f.grow(10)}J=mxConstants.DIRECTION_NORTH;E==C?J=mxConstants.DIRECTION_EAST:E==B||E==G?J=mxConstants.DIRECTION_SOUTH:E==D&&(J=mxConstants.DIRECTION_WEST);null!=t&&E==A&&(k=t); +l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=q&&5E3<=H||q!=k&&(null==f||!mxUtils.contains(f,c,d)||500<H&&null==E&&l))if(y=!1,q=5E3>H&&H>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=q&&l){f=[I,G,x,C,B,D];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(n=k.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),I.style.left=Math.floor(l.x- this.roundDrop.width/2)+"px",I.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",G.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",G.style.top=Math.floor(n.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(I),null==a.model.getTerminal(g,!1)&&a.container.appendChild(G))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing), n=this.graph.selectionCellsHandler.getHandler(k.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),x.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(l.y-this.triangleUp.height)+ "px",C.style.left=Math.floor(l.x+l.width)+"px",C.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",B.style.left=x.style.left,B.style.top=Math.floor(l.y+l.height)+"px",D.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",D.style.top=C.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(B)),a.container.appendChild(C),a.container.appendChild(D));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&& w.setHandlesVisible(!1));y=!0}else for(f=[I,G,x,C,B,D],l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);y||null==w||w.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=t&&E==A?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=E||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);null!=g&&(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)|| -a.isCellLocked(g)||f.isEdge(g)||!a.isValidDropTarget(g,b,e))&&(g=null)}return g});v.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[I,G,A,x,C,B,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=r&&null!=w&&w.reset();E=F=t=r=w=null};return v}; +a.isCellLocked(g)||f.isEdge(g)||!a.isValidDropTarget(g,b,e))&&(g=null)}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[I,G,A,x,C,B,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=q&&null!=w&&w.reset();E=F=t=q=w=null};return u}; Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST: mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=mxEvent.isAltDown(d)?b.getFreeInsertPoint():b.getCenterInsertPoint(b.getBoundingBoxFromGeometry(a,!0)),c.drop(b,d,null,a.x,a.y,!0))}; Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))> @@ -2519,16 +2517,16 @@ b.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text& n<d.length-1&&0<=n&&(e=0==Math.round(d[n].x-d[n+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){l=h=g=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0); this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=1;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= -function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.getCompositeParent(b[e]);null==f||c.get(f)|| -(c.put(f,!0),d.push(f))}return d};var q=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){a=this.graph.getCompositeParent(a);q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var u=(new Date).getTime(),r=0,w=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove= -function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(u=(new Date).getTime(),r=0):r=(new Date).getTime()-u};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this, -arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this, -function(){this.isEnabled()&&(C=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=C)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b|| -a.isConsumed())return B.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())}; +function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.isTableRow(b[e])&&this.graph.isCellSelected(b[e])? +b[e]:this.graph.getCompositeParent(b[e]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}return d};var r=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){a=this.graph.getCompositeParent(a);r.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var v=(new Date).getTime(),q=0,w=this.connectionHandler.mouseMove; +this.connectionHandler.mouseMove=function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),q=0):q=(new Date).getTime()-v};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent= +function(a){return y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START, +mxUtils.bind(this,function(){this.isEnabled()&&(C=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=C)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& +!b||a.isConsumed())return B.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())}; var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e= -g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var q=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(p=mxUtils.getBoundingBox(p,q));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var r=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(p=mxUtils.getBoundingBox(p,r));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();F=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null: -this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),v.start(c.x,c.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b|| +this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),u.start(c.x,c.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b|| a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var I=this.updateMouseEvent;this.updateMouseEvent=function(a){a=I.apply(this, arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487"; @@ -2566,8 +2564,8 @@ Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);ret Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c}; Graph.prototype.formatDate=function(a,c,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,f=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),v=a[g+"Seconds"](),g=a[g+"Milliseconds"](),u=d?0:a.getTimezoneOffset(),r={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+ -12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:v,ss:h(v),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<u?"-":"+")+h(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in r?r[a]:a.slice(1, +/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),r=a[g+"Minutes"](),u=a[g+"Seconds"](),g=a[g+"Milliseconds"](),v=d?0:a.getTimezoneOffset(),q={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+ +12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:r,MM:h(r),s:u,ss:h(u),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0<v?"-":"+")+h(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in q?q[a]:a.slice(1, a.length-1)})}; Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var f=document.createElement("input");f.style.display="inline-block";f.setAttribute("type","checkbox");c.isVisible(b)&&(f.setAttribute("checked","checked"), f.defaultChecked=!0);d.appendChild(f);var g=this.convertValueToString(b)||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(f,"click",function(){null!=f.getAttribute("checked")?f.removeAttribute("checked"):f.setAttribute("checked","checked");c.setVisible(b,f.checked)})})(c.getChildAt(c.root,b));return a}; @@ -2578,8 +2576,8 @@ Graph.prototype.connectVertex=function(a,c,d,b,f,e){if(a.geometry.relative&&this d),h.y+=a.geometry.height/2);d=this.view.getState(this.model.getParent(a));var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;null!=d&&this.model.isVertex(d.cell)&&(l=d.x,k=d.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(h.x+=a.parent.geometry.x,h.y+=a.parent.geometry.y);e=e||mxEvent.isControlDown(b)&&!f?null:this.getCellAt(l+h.x*g,k+h.y*g);this.model.isAncestor(e,a)&&(e=null);for(d=e;null!=d;){if(this.isCellLocked(d)){e=null;break}d=this.model.getParent(d)}null!=e&&(d=this.view.getState(a), g=this.view.getState(e),null!=d&&null!=g&&mxUtils.intersects(d,g)&&(e=null));if(f=!mxEvent.isShiftDown(b)||f)c==mxConstants.DIRECTION_NORTH?h.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?h.y+=a.geometry.height/2:h.x=c==mxConstants.DIRECTION_WEST?h.x-a.geometry.width/2:h.x+a.geometry.width/2;null==e||this.isCellConnectable(e)||(d=this.getModel().getParent(e),this.getModel().isVertex(d)&&this.isCellConnectable(d)&&(e=d));if(e==a||this.model.isEdge(e)||!this.isCellConnectable(e))e=null;d=[]; this.model.beginUpdate();try{var m=null!=e&&this.isSwimlane(e),g=m?null:e;if(null==g&&f){for(var l=a,n=this.getCellGeometry(a);null!=n&&n.relative;)l=this.getModel().getParent(l),n=this.getCellGeometry(l);l=this.getCompositeParent(l);g=this.duplicateCells([l],!1)[0];n=this.getCellGeometry(g);null!=n&&(n.x=h.x-n.width/2,n.y=h.y-n.height/2);m&&(this.addCells([g],e,null,null,null,!0),e=null)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(b)&& -f||null==e&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=p.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==p.parent&&(q=b.parent.getIndex(b),this.model.add(b.parent,p,q))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&& -(q=a.parent.getIndex(a),this.model.add(a.parent,g,q));null!=p&&d.push(p);null==e&&null!=g&&d.push(g);null==g&&null!=p&&p.geometry.setTerminalPoint(h,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}return d}; +f||null==e&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,g,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var r=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=p.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==p.parent&&(r=b.parent.getIndex(b),this.model.add(b.parent,p,r))}null==e&&null!=g&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&& +(r=a.parent.getIndex(a),this.model.add(a.parent,g,r));null!=p&&d.push(p);null==e&&null!=g&&d.push(g);null==g&&null!=p&&p.geometry.setTerminalPoint(h,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}return d}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.getLabel(d),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&c.push(d);return c.join(" ")}; Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),d=a,b=null;null==b&&null!=d;)null!=d.value&&"object"==typeof d.value&&(b=d.hasAttribute(c)?null!=d.getAttribute(c)?d.getAttribute(c):"":null),d=this.model.getParent(d);return b||""}return c.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; @@ -2631,16 +2629,16 @@ HoverIcons.prototype.update=function(a,c,d){if(!this.graph.connectionArrowsEnabl this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,c,d))}),this.updateDelay+10))):null!=this.startTime&&(b=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,d)?this.reset(!1):(null!=this.currentState||b>this.activationDelay)&&this.currentState!=a&&(b>this.updateDelay&&null!=a||null==this.bbox||null==c||null==d||!mxUtils.contains(this.bbox, c,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,d,b,f){a=this.cloneCell(a);for(var e=0;e<d;e++){var h=this.cloneCell(c),g=this.getCellGeometry(h);null!=g&&(g.x+=e*b,g.y+=e*f);a.insert(h)}return a}; -Graph.prototype.createTable=function(a,c,d,b){d=null!=d?d:40;b=null!=b?b:30;return this.createParent(this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;"),this.createParent(this.createVertex(null,null,"",0,0,c*d,b,"html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;"), -this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;"),c,d,0),a,0,b)}; +Graph.prototype.createTable=function(a,c,d,b){d=null!=d?d:40;b=null!=b?b:30;return this.createParent(this.createVertex(null,null,"",0,0,c*d,a*b,"swimlane;startSize=0;html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;"),this.createParent(this.createVertex(null,null,"",0,0,c*d,b,"shape=partialRectangle;html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;strokeColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;"), +this.createVertex(null,null,"",0,0,d,b,"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;left=0;top=0;"),c,d,0),a,0,b)}; Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;b=null!=b?b:120;var f=this.createVertex(null,null,"",0,0,c*d,a*b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;containerType=table;container=0;dropTarget=0;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),e=mxUtils.getValue(this.getCellStyle(f),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);f.geometry.width+=e;f.geometry.height+=e;var h=this.createVertex(null, null,"",0,e,c*d+e,b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;resizeLast=1;resizeParent=0;container=0;");f.insert(this.createParent(h,this.createVertex(null,null,"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),c,d,0));return 1<a?(h.geometry.y=b+e,this.createParent(f,this.createParent(h,this.createVertex(null,null,"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"), -c,d,0),a-1,0,b)):f};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType}; +c,d,0),a-1,0,b)):f};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType}; Graph.prototype.updateTableRowHeight=function(a,c){var d=this.getModel();d.beginUpdate();try{var b=this.getCellGeometry(a);if(null!=b){b=b.clone();b.height+=c;d.setGeometry(a,b);var f=d.getParent(a),e=this.getCellGeometry(f);null!=e&&(e=e.clone(),e.height+=c,d.setGeometry(f,e))}}finally{d.endUpdate()}}; Graph.prototype.updateTableColumnWidth=function(a,c){var d=this.getModel(),b=d.getParent(a),f=d.getParent(b),e=b.getIndex(a);d.beginUpdate();try{for(var h=0;h<d.getChildCount(f);h++)if(b=d.getChildAt(f,h),d.isVertex(b)){var g=d.getChildAt(b,e);if(d.isVertex(g)){var k=this.getCellGeometry(g);null!=k&&(k=k.clone(),k.width+=c,d.setGeometry(g,k))}e<d.getChildCount(b)-1&&(g=d.getChildAt(b,e+1),d.isVertex(g)&&(k=this.getCellGeometry(g),null!=k&&(k=k.clone(),k.x+=c,k.width-=c,d.setGeometry(g,k))))}}finally{d.endUpdate()}}; -function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.getLayout=function(a,c){for(var d=this.graph.getModel(),b=[],f=0,e=0;e<d.getChildCount(a);e++){var h=d.getChildAt(a,e);if(!this.isVertexIgnored(h)){var g=this.graph.getCellGeometry(h);null!=g&&(f+=c?g.height:g.width,b.push(h))}}return[b,f]}; -TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a),d=this.graph.getCellGeometry(a),b=this.graph.getModel();b.beginUpdate();try{var f=this.getLayout(a,!0),e=f[0],h=f[1],g=c.y;for(a=0;a<e.length;a++){var k=d.height-c.y-c.height,l=this.graph.getCellGeometry(e[a]),l=l.clone();l.height=l.height/h*k;l.width=d.width;l.x=c.x;l.y=g;b.setGeometry(e[a],l);for(var g=g+l.height,m=this.graph.getActualStartSize(e[a]),n=this.getLayout(e[a],!1),p=n[0],q=n[1],v=m.x,f=0;f<p.length;f++){var u= -this.graph.getCellGeometry(p[f]),r=l.width-m.x-m.width,u=u.clone();u.width=u.width/q*r;u.height=l.height;u.y=0;u.x=v;b.setGeometry(p[f],u);v+=u.width}}}finally{b.endUpdate()}}}; +function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.getLayout=function(a,c){for(var d=this.graph.getModel(),b=[],f=0,e=0;e<d.getChildCount(a);e++){var h=d.getChildAt(a,e);if(!this.isVertexIgnored(h)){var g=this.graph.getCellGeometry(h);null!=g&&(f+=c?g.height:g.width,b.push(h))}}return[b,f]}; +TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a),d=this.graph.getCellGeometry(a),b=this.graph.getModel();b.beginUpdate();try{var f=this.getLayout(a,!0),e=f[0],h=f[1],g=c.y;for(a=0;a<e.length;a++){var k=d.height-c.y-c.height,l=this.graph.getCellGeometry(e[a]),l=l.clone();l.x=c.x;l.y=Math.round(g);l.width=d.width;var m=l.height/h*k,g=g+m;l.height=Math.round(g)-l.y;b.setGeometry(e[a],l);for(var n=this.graph.getActualStartSize(e[a]),p=this.getLayout(e[a],!1), +r=p[0],u=p[1],v=n.x,f=0;f<r.length;f++){var q=this.graph.getCellGeometry(r[f]),w=l.width-n.x-n.width,q=q.clone();q.x=Math.round(v);q.y=0;q.height=Math.round(m);v+=q.width/u*w;q.width=Math.round(v)-q.x;b.setGeometry(r[f],q)}}}finally{b.endUpdate()}}}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this, arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&& 1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h= @@ -2675,13 +2673,13 @@ e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<c.length;e++){var f=this.view.getSta var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],h=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var c=0;c<this.model.getChildCount(b);c++)h(this.model.getChildAt(b,c))});h(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+ (a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var h=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,c,d,e,f,g){g=null!=g?g:{};var k=h.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),k);return k};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var c=[];this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.isTableCell(a[d])||this.isTableRow(a[d])?this.labelChanged(a[d],""):c.push(a[d]);c=g.apply(this, [c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=b[c]&&this.updateCustomLinksForCell(a,b[c])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]: -!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(va){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge= +!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(ka){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge= function(a){if(null!=a){var b=this.getCurrentCellStyle(a),b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)}; Graph.prototype.isValidDropTarget=function(a){var b=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(b,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this, arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate(); -try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),N=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(N,!0);c.setGeometry(f,k);var m=this.view.getState(f),n=this.view.getState(g),T=this.view.getState(h);if(null!=m){var p=null!=n?this.getConnectionConstraint(m,n,!0):null,q= -null!=T?this.getConnectionConstraint(m,T,!1):null;this.setConnectionConstraint(f,g,!0,q);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var v=k.width;k.width=k.height;k.height=v;c.setGeometry(f,k);var r=this.view.getState(f);if(null!=r){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],u=mxUtils.getValue(r.style, -mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,u)+(b?-1:1),t.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments); +try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),N=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(N,!0);c.setGeometry(f,k);var m=this.view.getState(f),n=this.view.getState(g),V=this.view.getState(h);if(null!=m){var p=null!=n?this.getConnectionConstraint(m,n,!0):null,r= +null!=V?this.getConnectionConstraint(m,V,!1):null;this.setConnectionConstraint(f,g,!0,r);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var u=k.width;k.width=k.height;k.height=u;c.setGeometry(f,k);var q=this.view.getState(f);if(null!=q){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(q.style, +mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,v)+(b?-1:1),t.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments); a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}}; Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"), e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"), @@ -2708,11 +2706,11 @@ document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsB !this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a? b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent= function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var n=f||d? -this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,N=mxUtils.createXmlDocument(),q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"svg"):N.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==N.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/", -"xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var Q=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),v=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",Q+"px");q.setAttribute("height",v+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+Q+" "+v);N.appendChild(q);var T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"g"):N.createElement("g");q.appendChild(T);var P=this.createSvgCanvas(T);P.foOffset=e?-.5:0;P.textOffset=e?-.5:0;P.imageOffset= -e?-.5:0;P.translate(Math.floor((c/b-n.x)/p),Math.floor((c/b-n.y)/p));var r=document.createElement("div"),t=P.getAlternateText;P.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,z){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(r.innerHTML=f,f=mxUtils.extractTextWithWhitespace(r.childNodes));for(var pa=Math.ceil(2*d/this.state.fontSize),ha=[],qa=0,Ca=0;(0==pa||qa<pa)&&Ca<f.length;){var p=f.charCodeAt(Ca);if(10==p||13==p){if(0<qa)break}else ha.push(f.charAt(Ca)),255>p&&qa++; -Ca++}ha.length<f.length&&1<f.length-ha.length&&(f=mxUtils.trim(ha.join(""))+"...");return f}catch(Ta){return t.apply(this,arguments)}else return t.apply(this,arguments)};var u=this.backgroundImage;if(null!=u){b=p/b;var x=this.view.translate,C=new mxRectangle(x.x*b,x.y*b,u.width*b,u.height*b);mxUtils.intersects(n,C)&&P.image(x.x,x.y,u.width,u.height,u.src,!0)}P.scale(a);P.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var V=h.drawCellState,w=h.getLinkForCellState;h.getLinkForCellState=function(a, -b){var c=w.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&V.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),P);this.updateSvgLinks(q,k,!0);this.addForeignObjectWarning(P,q);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning= +this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var N=this.view.scale,p=mxUtils.createXmlDocument(),r=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=r.style?r.style.backgroundColor=a:r.setAttribute("style","background-color:"+a));null==p.createElementNS?(r.setAttribute("xmlns",mxConstants.NS_SVG),r.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):r.setAttributeNS("http://www.w3.org/2000/xmlns/", +"xmlns:xlink",mxConstants.NS_XLINK);a=b/N;var u=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),V=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);r.setAttribute("version","1.1");r.setAttribute("width",u+"px");r.setAttribute("height",V+"px");r.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+u+" "+V);p.appendChild(r);var fa=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");r.appendChild(fa);var q=this.createSvgCanvas(fa);q.foOffset=e?-.5:0;q.textOffset=e?-.5:0;q.imageOffset= +e?-.5:0;q.translate(Math.floor((c/b-n.x)/N),Math.floor((c/b-n.y)/N));var t=document.createElement("div"),v=q.getAlternateText;q.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(t.innerHTML=f,f=mxUtils.extractTextWithWhitespace(t.childNodes));for(var N=Math.ceil(2*d/this.state.fontSize),z=[],na=0,U=0;(0==N||na<N)&&U<f.length;){var qa=f.charCodeAt(U);if(10==qa||13==qa){if(0<na)break}else z.push(f.charAt(U)),255>qa&&na++;U++}z.length< +f.length&&1<f.length-z.length&&(f=mxUtils.trim(z.join(""))+"...");return f}catch(Sa){return v.apply(this,arguments)}else return v.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){b=N/b;var x=this.view.translate,C=new mxRectangle(x.x*b,x.y*b,P.width*b,P.height*b);mxUtils.intersects(n,C)&&q.image(x.x,x.y,P.width,P.height,P.src,!0)}q.scale(a);q.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var w=h.drawCellState,T=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=T.apply(this, +arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&w.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),q);this.updateSvgLinks(r,k,!0);this.addForeignObjectWarning(q,r);return r}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning= function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href", Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href"); null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement()); @@ -2730,7 +2728,7 @@ null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwim c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea, function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange(); -return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(V){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update; +return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(T){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update; mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var m=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){m.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!= c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px": "":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var n=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b= @@ -2746,70 +2744,69 @@ null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this. Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth- this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",p.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue= function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML, -!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var q=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();q.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(N){}};var v=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, -b){this.graph.getModel().beginUpdate();try{v.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, -mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var u=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);u.apply(this,arguments)};mxGraphView.prototype.formatUnitText= -function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+ -Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var r=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=r.apply(this,arguments),c= -new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var w=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=w.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var t=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b= -t.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var y=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:y.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition= -function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style, -"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var x=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return x.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? -this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var C=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return C.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var B=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||B.apply(this,arguments)&& -(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var D=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=D.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var A=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b= -this.graph,c=b.model,d=b.getActualStartSize(this.state.cell),e=c.getChildAt(this.state.cell,0),f=this.state;null==a&&(a=[]);for(var g=0;g<c.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(d){if(null!=d&&c.isVertex(d.cell)){var e=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);d=new mxHandle(d,"row-resize",null,e);d.tableHandle=!0;var f=0;d.shape.node.parentNode.insertBefore(d.shape.node,d.shape.node.parentNode.firstChild);d.redraw=function(){null!=this.shape&&null!= -this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+f,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};d.setPosition=function(a,b,c){f=b.y-a.y-a.height};d.execute=function(){b.updateTableRowHeight(this.state.cell,f);f=0};a.push(d)}})(this.graph.view.getState(c.getChildAt(this.state.cell,g)));for(g=0;g<c.getChildCount(e)-1;g++)mxUtils.bind(this,function(b){if(null!=b){var c=new mxLine(new mxRectangle, -mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);b=new mxHandle(b,"col-resize",null,c);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+e,this.shape.bounds.width=1,this.shape.bounds.y=f.y+d.y,this.shape.bounds.height=f.height-d.y-d.height,this.shape.redraw())};b.setPosition=function(a,b,c){e=b.x-a.x-a.width};b.execute=function(){this.graph.updateTableColumnWidth(this.state.cell, -e);e=0};a.push(b)}})(this.graph.view.getState(c.getChildAt(e,g)))}return a};var F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){F.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.visibility=a?"":"hidden")};mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())}; -mxVertexHandler.prototype.isTableHandler=function(){return this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTable(this.state.cell)};var I=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell; -if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x= -this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=I.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/ -b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display= -"")};var G=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){G.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var J=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){J.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint= -function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML= -"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ -HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): -new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+ -'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5, -5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle; -mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop= -HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src= -HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled= -!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH|| -0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)|| -mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){E.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null== -a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled= -!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&& -this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c], -l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null== -this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)), -this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+ -"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var O=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!= -this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var U=(new Date).getTime(),R=0,K=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){K.apply(this,arguments);c!=this.currentTerminalState?(U=(new Date).getTime(),R=0):R=(new Date).getTime()-U;this.currentTerminalState=c};var H=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!= -this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&H.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor== -mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; -var L=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return L.apply(this,arguments)};var ca=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&& -null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return ca.apply(this,arguments)};var da=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=da.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var ia=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds= -function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):ia.apply(this,arguments)};var X=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell), -e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&X.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&& -b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){Y.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"), -null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){ea.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var W=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init= -function(){W.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor= -"pointer",this.rowMoveHandle.style.width="24px",this.rowMoveHandle.style.height="24px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var b=mxUtils.bind(this,function(){null!= -this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler= -mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), +!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var r=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();r.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(N){}};var u=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, +b){this.graph.getModel().beginUpdate();try{u.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, +mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,b){return mxGraphHandlerIsValidDropTarget.apply(this, +arguments)&&!mxEvent.isAltDown(b.getEvent)&&(1<this.cells.length||!this.graph.isTableRow(this.cells[0])||this.graph.isTable(a))};mxGraphView.prototype.formatUnitText=function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/ +e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var v=mxSelectionCellsHandler.prototype.getHandledSelectionCells; +mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=v.apply(this,arguments),c=new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var q=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=q.apply(this,arguments);b.stroke= +"#C0C0C0";b.strokewidth=1;return b};var w=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=w.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing- +a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())}; +var t=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return t.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var y=mxVertexHandler.prototype.isParentHighlightVisible; +mxVertexHandler.prototype.isParentHighlightVisible=function(){return y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var x=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||x.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var C=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds= +function(){var a=C.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-2):this.graph.isTableCell(this.state.cell)&&a.grow(-3);return a};var B=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,c=b.model,d=b.getActualStartSize(this.state.cell),e=c.getChildAt(this.state.cell,0),f=this.state;null==a&&(a=[]);for(var g=0;g<c.getChildCount(this.state.cell)- +1;g++)mxUtils.bind(this,function(d){if(null!=d&&c.isVertex(d.cell)){var e=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);d=new mxHandle(d,"row-resize",null,e);d.tableHandle=!0;var f=0;d.shape.node.parentNode.insertBefore(d.shape.node,d.shape.node.parentNode.firstChild);d.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+f*this.graph.view.scale,this.shape.bounds.height= +1,this.shape.redraw())};d.setPosition=function(a,b,c){f=b.y-a.y-a.height};d.execute=function(){b.updateTableRowHeight(this.state.cell,f);f=0};a.push(d)}})(this.graph.view.getState(c.getChildAt(this.state.cell,g)));for(g=0;g<c.getChildCount(e)-1;g++)mxUtils.bind(this,function(b){if(null!=b){var c=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);b=new mxHandle(b,"col-resize",null,c);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild); +b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+e*this.graph.view.scale,this.shape.bounds.width=1,this.shape.bounds.y=f.y+d.y*this.graph.view.scale,this.shape.bounds.height=f.height-(d.height+d.y)*this.graph.view.scale,this.shape.redraw())};b.setPosition=function(a,b,c){e=b.x-a.x-a.width};b.execute=function(){this.graph.updateTableColumnWidth(this.state.cell,e);e=0};a.push(b)}})(this.graph.view.getState(c.getChildAt(e,g)))}return null!= +a?a.reverse():null};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){D.apply(this,arguments);if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())};var A=mxVertexHandler.prototype.getHandlePadding; +mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g= +e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=A.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint= +a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width- +this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var F=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){F.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&& +"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var I=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){I.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/ +f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top= +Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'): +new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'): +new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>', +24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage= +HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft, +Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src, +(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop= +!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent= +function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger= +function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var G=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){G.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b= +a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&& +(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)< +this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k= +this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c],l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y; +var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width= +0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv= +this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), +this.secondDiv=null)),b.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var E=(new Date).getTime(),M=0,R=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){R.apply(this,arguments);c!=this.currentTerminalState?(E=(new Date).getTime(),M=0):M=(new Date).getTime()-E;this.currentTerminalState= +c};var S=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<M||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&S.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!= +a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE; +this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var K=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return K.apply(this,arguments)};var H=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= +function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return H.apply(this,arguments)};var L=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=L.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!= +mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var X=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))): +X.apply(this,arguments)};var da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&da.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR, +mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var ia=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a, +b){ia.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Z=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){Z.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()? +"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){aa.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell)){var b=this.graph.model;this.moveHandles=[];for(var c=0;c<b.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(a){if(null!=a&&b.isVertex(a.cell)){var c= +mxUtils.createImage(Editor.rowMoveImage);c.style.position="absolute";c.style.cursor="move";c.style.width="7px";c.style.height="4px";c.rowState=a;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),[a.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);this.graph.isMouseDown=!0;mxEvent.consume(b)}));this.moveHandles.push(c);this.graph.container.appendChild(c)}})(this.graph.view.getState(b.getChildAt(this.state.cell, +c)))}var d=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE, +this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),e=this.graph.getLinksForState(this.state);this.updateLinkHint(c,e);if(null!=c||null!=e&&0<e.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title", mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var f=document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d]))); -this.linkHint.appendChild(f)}}}catch(Q){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Z=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display= +this.linkHint.appendChild(f)}}}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ea=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ea.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display= this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state); -if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var ja=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ja.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=this.rowState.x+this.rowState.width+ -"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");aa.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+ -22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+Editor.hintOffset)+"px"}}; -var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){S.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null); -null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var fa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(fa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/ -2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ga=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ga.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), -this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" "); +if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var Y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+ +this.moveHandles[a].rowState.width+10+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+3*this.moveHandles[a].rowState.height/4+"px";null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ba.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x, +this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+ +this.verticalOffset/2+Editor.hintOffset)+"px"}};var ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ja.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler), +this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ca=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ca.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds)); +this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var Q=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Q.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ha=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), +this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" "); Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()})); this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c}; Format.prototype.initSelectionState=function(){return{vertices:[],edges:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,comic:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,movable:!0,rotatable:!0}}; @@ -2829,9 +2826,9 @@ mxEvent.addListener(a,"click",d);mxEvent.addListener(a,mxClient.IS_POINTER?"poin if(f)k.style.borderLeftWidth="0px";else{b.style.borderLeftWidth="0px";mxUtils.write(b,mxResources.get("style"));d.appendChild(b);var m=d.cloneNode(!1);m.style.display="none";this.panels.push(new StyleFormatPanel(this,a,m));this.container.appendChild(m);c(b,m,g++)}mxUtils.write(k,mxResources.get("text"));d.appendChild(k);b=d.cloneNode(!1);b.style.display="none";this.panels.push(new TextFormatPanel(this,a,b));this.container.appendChild(b);mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l); d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white"; BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var f=a.view.getState(c[b]);if(null!=f&&(f=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null),null!=f))if(null==d)d=f;else if(d!=f)return null}return d}; -BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=g?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(f,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+e, -n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var u=l.getSelectionCells();l.setCellStyles(c,q,u);c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=q+"px";a.removeAttribute("size")});for(var r=0;r<u.length;r++)0==l.model.getChildCount(u[r])&&l.autoSizeCell(u[r],!1);k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",u))}finally{l.getModel().endUpdate()}}a.value= -q+e;mxEvent.consume(p)});h&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p}; +BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,f,e,h,g){e=null!=e?e:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;f=null!=f?f:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var r=g?parseFloat(a.value):parseInt(a.value);isNaN(r)||c!=mxConstants.STYLE_ROTATION||(r=mxUtils.mod(Math.round(100*r),36E3)/100);r=Math.min(f,Math.max(b,isNaN(r)?d:r));if(l.cellEditor.isContentEditing()&&h)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(r),a.value=r+e, +n=!1);else if(r!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var v=l.getSelectionCells();l.setCellStyles(c,r,v);c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(l.getSelectionCells(),function(a){a.style.fontSize=r+"px";a.removeAttribute("size")});for(var q=0;q<v.length;q++)0==l.model.getChildCount(v[q])&&l.autoSizeCell(v[q],!1);k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[r],"cells",v))}finally{l.getModel().endUpdate()}}a.value= +r+e;mxEvent.consume(p)});h&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p}; BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 18px";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c}; BaseFormatPanel.prototype.createStepper=function(a,c,d,b,f,e,h){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var g=document.createElement("div");mxUtils.setPrefixedStyle(g.style,"borderRadius","3px");g.style.border="1px solid rgb(192, 192, 192)";g.style.position="absolute";var k=document.createElement("div");k.style.borderBottom="1px solid rgb(192, 192, 192)";k.style.position="relative";k.style.height=b+"px";k.style.width="10px";k.className= "geBtnUp";g.appendChild(k);var l=k.cloneNode(!1);l.style.border="none";l.style.height=b+"px";l.className="geBtnDown";g.appendChild(l);mxEvent.addListener(l,"click",function(b){""==a.value&&(a.value=e||"2");var f=h?parseFloat(a.value):parseInt(a.value);isNaN(f)||(a.value=f-d,null!=c&&c(b));mxEvent.consume(b)});mxEvent.addListener(k,"click",function(b){""==a.value&&(a.value=e||"0");var f=h?parseFloat(a.value):parseInt(a.value);isNaN(f)||(a.value=f+d,null!=c&&c(b));mxEvent.consume(b)});if(f){var m=null; @@ -2840,10 +2837,10 @@ BaseFormatPanel.prototype.createOption=function(a,c,d,b){var f=document.createEl "checked"),e.defaultChecked=!0,e.checked=!0):(e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1),k!=a&&(k=a,c()!=k&&d(k)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=e.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)e.checked=!e.checked;l(e.checked)}});l(k);null!=b&&(b.install(l),this.listeners.push(b));return f}; BaseFormatPanel.prototype.createCellOption=function(a,c,d,b,f,e,h,g){b=null!=b?"null"==b?null:b:"1";f=null!=f?"null"==f?null:f:"0";var k=this.editorUi,l=k.editor.graph;return this.createOption(a,function(){var a=l.view.getState(l.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,d)!=f:null},function(a){g&&l.stopEditing();if(null!=h)h.funct();else{l.getModel().beginUpdate();try{a=a?b:f,l.setCellStyles(c,a,l.getSelectionCells()),null!=e&&e(l.getSelectionCells(),a),k.fireEvent(new mxEventObject("styleChanged", "keys",[c],"values",[a],"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}},{install:function(a){this.listener=function(){var b=l.view.getState(l.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,d)!=f)};l.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){l.getModel().removeListener(this.listener)}})}; -BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=c(),n=!1,p=null,q=function(a,f,g){if(!n){n= +BaseFormatPanel.prototype.createColorOption=function(a,c,d,b,f,e,h){var g=document.createElement("div");g.style.padding="6px 0px 1px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height=mxClient.IS_QUIRKS?"27px":"18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="0px 6px 0px 0px";h||g.appendChild(k);var l=document.createElement("span");mxUtils.write(l,a);g.appendChild(l);var m=c(),n=!1,p=null,r=function(a,f,g){if(!n){n= !0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:b;p.innerHTML='<div style="width:'+(mxClient.IS_QUIRKS?"30":"36")+"px;height:12px;margin:3px;border:1px solid black;background-color:"+mxUtils.htmlEntities(null!=a&&a!=mxConstants.NONE?a:b)+';"></div>';if(mxClient.IS_QUIRKS||8==document.documentMode)p.firstChild.style.margin="0px";null!=a&&a!=mxConstants.NONE?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1);p.style.display=k.checked|| -h?"":"none";null!=e&&e(a);f||(m=a,(g||h||c()!=m)&&d(m));n=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){q(a,null,!0)});mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=k.checked||h?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked= -!k.checked),k.checked||null==m||m==mxConstants.NONE||b==mxConstants.NONE||(b=m),q(k.checked?b:mxConstants.NONE)});q(m,!0);null!=f&&(f.install(q),this.listeners.push(f));return g}; +h?"":"none";null!=e&&e(a);f||(m=a,(g||h||c()!=m)&&d(m));n=!1}},p=mxUtils.button("",mxUtils.bind(this,function(a){this.editorUi.pickColor(m,function(a){r(a,null,!0)});mxEvent.consume(a)}));p.style.position="absolute";p.style.marginTop="-4px";p.style.right=mxClient.IS_QUIRKS?"0px":"20px";p.style.height="22px";p.className="geColorBtn";p.style.display=k.checked||h?"":"none";g.appendChild(p);mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==k||"INPUT"!=a.nodeName)a!=k&&(k.checked= +!k.checked),k.checked||null==m||m==mxConstants.NONE||b==mxConstants.NONE||(b=m),r(k.checked?b:mxConstants.NONE)});r(m,!0);null!=f&&(f.install(r),this.listeners.push(f));return g}; BaseFormatPanel.prototype.createCellColorOption=function(a,c,d,b,f){var e=this.editorUi,h=e.editor.graph;return this.createColorOption(a,function(){var a=h.view.getState(h.getSelectionCell());return null!=a?mxUtils.getValue(a.style,c,null):null},function(a){h.getModel().beginUpdate();try{null!=f&&f(a),h.setCellStyles(c,a,h.getSelectionCells()),e.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",h.getSelectionCells()))}finally{h.getModel().endUpdate()}},d||mxConstants.NONE, {install:function(a){this.listener=function(){var b=h.view.getState(h.getSelectionCell());null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},b)}; BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.style.padding="6px";d.style.paddingRight="4px";var b=10-c;2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px";d.style.height=c+"px";d.style.borderLeft="1px solid #a0a0a0";d.innerHTML='<img border="0" src="'+(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHBJREFUeNpidHB2ZyAGsACxDRBPIKCuA6TwCBB/h2rABu4A8SYmKCcXiP/iUFgAxL9gCi8A8SwsirZCMQMTkmANEH9E4v+CmsaArvAdyNFI/FlQ92EoBIE+qCRIUz168DBgsU4OqhinQpgHMABAgAEALY4XLIsJ20oAAAAASUVORK5CYII=": @@ -2884,77 +2881,77 @@ a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),e.value=isN BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS}; BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5}}; ArrangePanel.prototype.addGeometry=function(a){var c=this,d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel();e.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));e.appendChild(h);var g,k,l,m,n=this.addUnitInput(e,this.getUnit(),84,44,function(){g.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()), -p=this.addUnitInput(e,this.getUnit(),20,44,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),q=document.createElement("div");q.className="geSprite geSprite-fit";q.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");q.style.position="relative";q.style.cursor="pointer";q.style.marginTop="-3px";q.style.border="0px";q.style.left="52px";mxUtils.setOpacity(q,50);mxEvent.addListener(q,"mouseenter",function(){mxUtils.setOpacity(q, -100)});mxEvent.addListener(q,"mouseleave",function(){mxUtils.setOpacity(q,50)});mxEvent.addListener(q,"click",function(){d.actions.get("autosize").funct()});e.appendChild(q);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign="right";var v=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT, -null,"fixed","null");v.style.width="100%";h.appendChild(v);e.appendChild(h);var u=v.getElementsByTagName("input")[0];this.addKeyHandler(n,y);this.addKeyHandler(p,y);g=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),u.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,c.fromUnit(b)),u.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});f.resizable&&a.appendChild(e); -var r=this.createPanel();r.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));r.appendChild(h);var w=this.addUnitInput(r,this.getUnit(),84,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),t=this.addUnitInput(r,this.getUnit(),20,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()); -mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();if(f.containsLabel||f.vertices.length!=b.getSelectionCount()||null==f.width||null==f.height)e.style.display="none";else{e.style.display="";if(d||document.activeElement!=n)n.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(d||document.activeElement!=p)p.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length== -b.getSelectionCount()&&null!=f.x&&null!=f.y){r.style.display="";if(d||document.activeElement!=w)w.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());if(d||document.activeElement!=t)t.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else r.style.display="none"});this.addKeyHandler(w,y);this.addKeyHandler(t,y);b.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){b.getModel().removeListener(y)}});y();l=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative? -a.offset.x=b:a.x=b});m=this.addGeometryHandler(t,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});f.movable&&a.appendChild(r)}; +p=this.addUnitInput(e,this.getUnit(),20,44,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="52px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r, +100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){d.actions.get("autosize").funct()});e.appendChild(r);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign="right";var u=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT, +null,"fixed","null");u.style.width="100%";h.appendChild(u);e.appendChild(h);var v=u.getElementsByTagName("input")[0];this.addKeyHandler(n,y);this.addKeyHandler(p,y);g=this.addGeometryHandler(n,function(a,b){0<a.width&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.height=Math.round(a.height*b*100/a.width)/100),a.width=b)});k=this.addGeometryHandler(p,function(a,b){0<a.height&&(b=Math.max(1,c.fromUnit(b)),v.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});f.resizable&&a.appendChild(e); +var q=this.createPanel();q.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));q.appendChild(h);var w=this.addUnitInput(q,this.getUnit(),84,44,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),t=this.addUnitInput(q,this.getUnit(),20,44,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()); +mxUtils.br(q);this.addLabel(q,mxResources.get("left"),84);this.addLabel(q,mxResources.get("top"),20);var y=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState();if(f.containsLabel||f.vertices.length!=b.getSelectionCount()||null==f.width||null==f.height)e.style.display="none";else{e.style.display="";if(d||document.activeElement!=n)n.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(d||document.activeElement!=p)p.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length== +b.getSelectionCount()&&null!=f.x&&null!=f.y){q.style.display="";if(d||document.activeElement!=w)w.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());if(d||document.activeElement!=t)t.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else q.style.display="none"});this.addKeyHandler(w,y);this.addKeyHandler(t,y);b.getModel().addListener(mxEvent.CHANGE,y);this.listeners.push({destroy:function(){b.getModel().removeListener(y)}});y();l=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative? +a.offset.x=b:a.x=b});m=this.addGeometryHandler(t,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});f.movable&&a.appendChild(q)}; ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var g=parseFloat(a.value);if(isNaN(g))a.value=f+" "+e.getUnit();else if(g!=f){b.getModel().beginUpdate();try{for(var h=b.getSelectionCells(),l=0;l<h.length;l++)if(b.getModel().isVertex(h[l])){var m=b.getCellGeometry(h[l]);if(null!=m){m=m.clone();c(m,g);var n=b.view.getState(h[l]);null!=n&&b.isRecursiveVertexResize(n)&&b.resizeChildCells(h[l],m);b.getModel().setGeometry(h[l],m);b.constrainChildCells(h[l])}}}finally{b.getModel().endUpdate()}f= g;a.value=g+" "+e.getUnit()}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null,e=this;mxEvent.addListener(a,"blur",d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d}; ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function d(d){if(""!=a.value){var e=parseFloat(a.value);if(isNaN(e))a.value=f+" pt";else if(e!=f){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isEdge(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,e),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}f=e;a.value=e+" pt"}}mxEvent.consume(d)}var b=this.editorUi.editor.graph,f=null;mxEvent.addListener(a,"blur", d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){f=a.value});return d}; ArrangePanel.prototype.addEdgeGeometry=function(a){function c(a){var c=parseInt(n.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)&&(b.setCellStyles("width",c,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",b.getSelectionCells())));n.value=c+" pt";mxEvent.consume(a)}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createPanel(), h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));e.appendChild(h);var g,k,l,m,n=this.addUnitInput(e,"pt",20,44,function(){c.apply(this,arguments)});mxUtils.br(e);this.addKeyHandler(n,t);mxEvent.addListener(n,"blur",c);mxEvent.addListener(n,"change",c);a.appendChild(e);var p=this.createPanel();p.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute"; -h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");p.appendChild(h);var q=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),v=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(q,t);this.addKeyHandler(v,t);var u=this.createPanel();u.style.paddingBottom="30px";h=document.createElement("div"); -h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");u.appendChild(h);var r=this.addUnitInput(u,"pt",84,44,function(){g.apply(this,arguments)}),w=this.addUnitInput(u,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),84);this.addLabel(u,mxResources.get("top"),20);a.appendChild(u);this.addKeyHandler(r,t);this.addKeyHandler(w,t);var t=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState(); -a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=n)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=d.sourcePoint.x,v.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a, -!1)?(r.value=d.targetPoint.x,w.value=d.targetPoint.y):u.style.display="none"):(p.style.display="none",u.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(v,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(r,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,t);this.listeners.push({destroy:function(){b.getModel().removeListener(t)}}); +h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"Start");p.appendChild(h);var r=this.addUnitInput(p,"pt",84,44,function(){l.apply(this,arguments)}),u=this.addUnitInput(p,"pt",20,44,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),84);this.addLabel(p,mxResources.get("top"),20);a.appendChild(p);this.addKeyHandler(r,t);this.addKeyHandler(u,t);var v=this.createPanel();v.style.paddingBottom="30px";h=document.createElement("div"); +h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,"End");v.appendChild(h);var q=this.addUnitInput(v,"pt",84,44,function(){g.apply(this,arguments)}),w=this.addUnitInput(v,"pt",20,44,function(){k.apply(this,arguments)});mxUtils.br(v);this.addLabel(v,mxResources.get("left"),84);this.addLabel(v,mxResources.get("top"),20);a.appendChild(v);this.addKeyHandler(q,t);this.addKeyHandler(w,t);var t=mxUtils.bind(this,function(a,c,d){f=this.format.getSelectionState(); +a=b.getSelectionCell();if("link"==f.style.shape||"flexArrow"==f.style.shape){if(e.style.display="",d||document.activeElement!=n)d=mxUtils.getValue(f.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=d+" pt"}else e.style.display="none";1==b.getSelectionCount()&&b.model.isEdge(a)?(d=b.model.getGeometry(a),null!=d.sourcePoint&&null==b.model.getTerminal(a,!0)?(r.value=d.sourcePoint.x,u.value=d.sourcePoint.y):p.style.display="none",null!=d.targetPoint&&null==b.model.getTerminal(a, +!1)?(q.value=d.targetPoint.x,w.value=d.targetPoint.y):v.style.display="none"):(p.style.display="none",v.style.display="none")});l=this.addEdgeGeometryHandler(r,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(u,function(a,b){a.sourcePoint.y=b});g=this.addEdgeGeometryHandler(q,function(a,b){a.targetPoint.x=b});k=this.addEdgeGeometryHandler(w,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,t);this.listeners.push({destroy:function(){b.getModel().removeListener(t)}}); t()};TextFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)}; TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#c5ecff', EndColorStr='#87d4fb', GradientType=0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,b=d.editor.graph,f=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";e.style.paddingBottom= "6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(b.cellEditor.isContentEditing()){var h=e.cloneNode(),g=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h,null,!0);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow= "hidden";g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px";g=g.getElementsByTagName("div")[0];g.style.cssFloat="right";a.appendChild(h)}a.appendChild(e);h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.style.paddingBottom="6px";var k=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow= "hidden";k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";g=e.cloneNode(!1);g.style.marginLeft="-3px";var l=this.editorUi.toolbar.addItems(["bold","italic","underline"],g,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+ -")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=e.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], -[mxConstants.ALIGN_LEFT])),n),v=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),u=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], -[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,v,u]);if(b.cellEditor.isContentEditing()){var r=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([r]);r.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; -r.firstChild.style.backgroundPosition="2px 2px";r.firstChild.style.backgroundSize="18px 18px";this.styleButtons([r])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),t=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),y=this.editorUi.toolbar.addButton("geSprite-bottom", +")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=e.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], +[mxConstants.ALIGN_LEFT])),n),u=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], +[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([r,u,v]);if(b.cellEditor.isContentEditing()){var q=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([q]);q.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; +q.firstChild.style.backgroundPosition="2px 2px";q.firstChild.style.backgroundSize="18px 18px";this.styleButtons([q])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),t=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),y=this.editorUi.toolbar.addButton("geSprite-bottom", mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,t,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,C,B,D,A,F,I;b.cellEditor.isContentEditing()?(w.style.display="none",t.style.display="none",y.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==B.style.opacity&&document.execCommand("justifyfull", !1,null)},n),B.style.marginRight="9px",B.style.opacity=1,this.styleButtons([B,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist", mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent", -!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",u.style.marginRight="9px");n=e.cloneNode(!1);n.style.marginLeft= -"0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.style.marginTop="-2px";for(var r="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP, +!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",v.style.marginRight="9px");n=e.cloneNode(!1);n.style.marginLeft= +"0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.style.marginTop="-2px";for(var q="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP, mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT, -mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<r.length;p++){var E=document.createElement("option");E.setAttribute("value",r[p]);mxUtils.write(E,mxResources.get(r[p]));G.appendChild(E)}n.appendChild(G);r=e.cloneNode(!1);r.style.marginLeft="0px";r.style.paddingTop= -"4px";r.style.paddingBottom="4px";r.style.fontWeight="normal";mxUtils.write(r,mxResources.get("writingDirection"));var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var E=["automatic","leftToRight","rightToLeft"],U={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<E.length;p++){var R=document.createElement("option");R.setAttribute("value",E[p]);mxUtils.write(R, -mxResources.get(E[p]));O.appendChild(R)}r.appendChild(O);b.isEditing()||(a.appendChild(n),mxEvent.addListener(G,"change",function(a){b.getModel().beginUpdate();try{var c=J[G.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}), -a.appendChild(r),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[O.value],b.getSelectionCells());mxEvent.consume(a)}));var K=document.createElement("input");K.style.textAlign="right";K.style.marginTop="4px";mxClient.IS_QUIRKS||(K.style.position="absolute",K.style.right="32px");K.style.width="46px";K.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(K);var H=null,n=this.installInputHandler(K,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize, +mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<q.length;p++){var E=document.createElement("option");E.setAttribute("value",q[p]);mxUtils.write(E,mxResources.get(q[p]));G.appendChild(E)}n.appendChild(G);q=e.cloneNode(!1);q.style.marginLeft="0px";q.style.paddingTop= +"4px";q.style.paddingBottom="4px";q.style.fontWeight="normal";mxUtils.write(q,mxResources.get("writingDirection"));var M=document.createElement("select");M.style.position="absolute";M.style.right="20px";M.style.width="97px";M.style.marginTop="-2px";for(var E=["automatic","leftToRight","rightToLeft"],R={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<E.length;p++){var S=document.createElement("option");S.setAttribute("value",E[p]);mxUtils.write(S, +mxResources.get(E[p]));M.appendChild(S)}q.appendChild(M);b.isEditing()||(a.appendChild(n),mxEvent.addListener(G,"change",function(a){b.getModel().beginUpdate();try{var c=J[G.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}), +a.appendChild(q),mxEvent.addListener(M,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,R[M.value],b.getSelectionCells());mxEvent.consume(a)}));var K=document.createElement("input");K.style.textAlign="right";K.style.marginTop="4px";mxClient.IS_QUIRKS||(K.style.position="absolute",K.style.right="32px");K.style.width="46px";K.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(K);var H=null,n=this.installInputHandler(K,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize, 1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer: b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(e=0;e<f.length;e++)c(f[e])}K.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement(): (d=window.getSelection(),0<d.rangeCount&&(f=d.getRangeAt(0).commonAncestorContainer)),null!=f&&c(b.cellEditor.textarea,f))for(H=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=H+"px";window.setTimeout(function(){K.value=H+" pt";H=null},0);break}},!0),n=this.createStepper(K,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=K.style.display;n.style.marginTop= -"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var L=null,ca="#ffffff",da=null,ia="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ca},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"), -mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var Y=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");Y.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ia},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"), +"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var L=null,X="#ffffff",da=null,ia="#000000",Z=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return X},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"), +mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});Z.style.fontWeight="bold";var aa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");aa.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ia},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"), d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var f=c.nextSibling;a[e].appendChild(c); -c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){da=a},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";Y.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL, -null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(Y);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize|| -0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var ea,W,Z, -ja,aa,S=this.addUnitInput(g,"pt",91,44,function(){ea.apply(this,arguments)}),fa=this.addUnitInput(g,"pt",20,44,function(){W.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var ba=this.addUnitInput(g,"pt",162,44,function(){Z.apply(this,arguments)}),ga=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),N=this.addUnitInput(g,"pt",20,44,function(){aa.apply(this,arguments)});mxUtils.br(g); -this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var T=null,P=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=T&&(b.cellEditor.restoreSelection(T),T=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode; -null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){P=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(T=b.cellEditor.saveSelection())}); +c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){da=a},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){Z.style.display=null==a||a==mxConstants.NONE?"none":"";aa.style.display=Z.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL, +null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(Z);b.cellEditor.isContentEditing()||h.appendChild(aa);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize|| +0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var ea,Y,ba, +ja,ca,Q=this.addUnitInput(g,"pt",91,44,function(){ea.apply(this,arguments)}),ha=this.addUnitInput(g,"pt",20,44,function(){Y.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var N=this.addUnitInput(g,"pt",162,44,function(){ba.apply(this,arguments)}),V=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),fa=this.addUnitInput(g,"pt",20,44,function(){ca.apply(this,arguments)});mxUtils.br(g); +this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var T=null,ga=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=T&&(b.cellEditor.restoreSelection(T),T=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode; +null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ga=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(T=b.cellEditor.saveSelection())}); mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(T=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"), !1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!= -A&&b.insertColumn(A,null!=F?F.cellIndex:0)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=F?F.cellIndex+1:-1)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=F&&b.deleteColumn(A,F.cellIndex)}catch(Q){this.editorUi.handleError(Q)}}), -g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex+1)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), -mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.deleteRow(A,I.sectionRowIndex)}catch(Q){this.editorUi.handleError(Q)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"), +A&&b.insertColumn(A,null!=F?F.cellIndex:0)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=F?F.cellIndex+1:-1)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=F&&b.deleteColumn(A,F.cellIndex)}catch(P){this.editorUi.handleError(P)}}), +g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex+1)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), +mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.deleteRow(A,I.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"), mxUtils.bind(this,function(a){if(null!=A){var c=A.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==F||null!=a&&mxEvent.isShiftDown(a)?A:F;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse= ""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=A){var c=A.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c, function(c){var d=null==F||null!=a&&mxEvent.isShiftDown(a)?A:F;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=A){var a=A.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?A.setAttribute("cellPadding",a):A.removeAttribute("cellPadding")}),mxResources.get("spacing")); d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=A&&A.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=A&&A.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=A&&A.setAttribute("align","right")},e)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&& -(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var V=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE); -k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=K)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),K.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(v,a==mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_RIGHT); +(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var W=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE); +k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=K)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),K.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_LEFT);c(u,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT); a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(t,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);G.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&& -b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR? -O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=N)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),N.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= -ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ba.value=isNaN(a)?"":a+" pt"});W=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");ea=this.installInputHandler(S,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");aa=this.installInputHandler(N,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(ga, -mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");Z=this.installInputHandler(ba,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(K,V);this.addKeyHandler(fa,V);this.addKeyHandler(S,V);this.addKeyHandler(N,V);this.addKeyHandler(ga,V);this.addKeyHandler(ba,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var la=!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var a= +b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?M.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR? +M.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(M.value="automatic");if(d||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ha.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= +V)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),V.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=N)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),N.value=isNaN(a)?"":a+" pt"});Y=this.installInputHandler(ha,mxConstants.STYLE_SPACING,2,-999,999," pt");ea=this.installInputHandler(Q,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ca=this.installInputHandler(fa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(V, +mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(N,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(K,W);this.addKeyHandler(ha,W);this.addKeyHandler(Q,W);this.addKeyHandler(fa,W);this.addKeyHandler(V,W);this.addKeyHandler(N,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();if(b.cellEditor.isContentEditing()){var ka=!1,e=function(){ka||(ka=!0,window.setTimeout(function(){for(var a= b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length- 2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a), -n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<r.length;w++)if(t.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(C,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B, -d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(v,d(m.textAlign,"center")),c(u,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(q,!1),c(v,!1),c(u,!1)):(c(B,!1),c(q,e==mxConstants.ALIGN_LEFT),c(v,e==mxConstants.ALIGN_CENTER),c(u,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),I=null==A?null:b.getParentByName(a,"TR",A),F=null== -A?null:b.getParentByNames(a,["TD","TH"],A),D.style.display=null!=A?"":"none",document.activeElement!=K&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=H?(a.removeAttribute("size"),a.style.fontSize=H+" pt",H=null):K.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?P.value="100 %":P.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+ -Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=da&&(ia="#"==d.charAt(0)?d:"#000000",da(ia,!0)),null!=L&&(ca="#"==n.charAt(0)?n:null,L(ca,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'== -m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}la=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}}); +n=g(m),p=h(n,m,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<q.length;w++)if(t.containsNode(q[w],!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),y=h(n,temp,q[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(C,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B, +d(m.textAlign,"justify")),c(r,d(m.textAlign,"left")),c(u,d(m.textAlign,"center")),c(v,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(r,!1),c(u,!1),c(v,!1)):(c(B,!1),c(r,e==mxConstants.ALIGN_LEFT),c(u,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),I=null==A?null:b.getParentByName(a,"TR",A),F=null== +A?null:b.getParentByNames(a,["TD","TH"],A),D.style.display=null!=A?"":"none",document.activeElement!=K&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=H?(a.removeAttribute("size"),a.style.fontSize=H+" pt",H=null):K.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ga.value="100 %":ga.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+ +("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=da&&(ia="#"==d.charAt(0)?d:"#000000",da(ia,!0)),null!=L&&(X="#"==n.charAt(0)?n:null,L(X,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'== +m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}ka=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}}); e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black"; StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())), a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))}; @@ -2970,19 +2967,19 @@ null==a||a==mxConstants.NONE?"none":""}),e="image"==d.style.shape?mxConstants.ST e=0;e<g.length;e++){var k=document.createElement("option");k.setAttribute("value",g[e]);mxUtils.write(k,mxResources.get(g[e]));b.appendChild(k)}f.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);f.style.display=!d.fill||d.containsImage|| null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?"none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(f);h=this.getCustomColors();for(e=0;e<h.length;e++)a.appendChild(this.createCellColorOption(h[e].title,h[e].key,h[e].defaultValue)); return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];"swimlane"==this.format.getSelectionState().style.shape&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return a}; -StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(r.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));r.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1: +StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(q.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));q.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1: c));c!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(f.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,f.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",f.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,f=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight= "bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){f.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]: "curved"==g.value&&(d=[null,"1"]);for(var e=0;e<c.length;e++)f.setCellStyles(c[e],d[e],f.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var n="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k="image"==e.style.shape?mxResources.get("border"):mxResources.get("line"),k=this.createCellColorOption(k, -n,"#000000");k.appendChild(g);h.appendChild(k);var p=h.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop= -"6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1", -null]).setAttribute("title",mxResources.get("dashed"));q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),v=p.cloneNode(!1), -u=this.editorUi.toolbar.addMenuFunctionInContainer(v,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"], +n,"#000000");k.appendChild(g);h.appendChild(k);var p=h.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var r=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop= +"6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){r(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));r(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1", +null]).setAttribute("title",mxResources.get("dashed"));r(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");r(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");r(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),u=p.cloneNode(!1), +v=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"], ["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null, -null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(v,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")); -q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),r=document.createElement("input");r.style.textAlign="right"; -r.style.marginTop="2px";r.style.width="41px";r.setAttribute("title",mxResources.get("linewidth"));p.appendChild(r);var w=r.cloneNode(!0);v.appendChild(w);var t=this.createStepper(r,c,1,9);t.style.display=r.style.display;t.style.marginTop="2px";p.appendChild(t);var y=this.createStepper(w,d,1,9);y.style.display=w.style.display;y.style.marginTop="2px";v.appendChild(y);mxClient.IS_QUIRKS?(r.style.height="17px",w.style.height="17px"):(r.style.position="absolute",r.style.right="32px",r.style.height="15px", -t.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",y.style.right="20px");mxEvent.addListener(r,"blur",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"", +null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){r(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));r(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")); +r(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");r(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");r(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),q=document.createElement("input");q.style.textAlign="right"; +q.style.marginTop="2px";q.style.width="41px";q.setAttribute("title",mxResources.get("linewidth"));p.appendChild(q);var w=q.cloneNode(!0);u.appendChild(w);var t=this.createStepper(q,c,1,9);t.style.display=q.style.display;t.style.marginTop="2px";p.appendChild(t);var y=this.createStepper(w,d,1,9);y.style.display=w.style.display;y.style.marginTop="2px";u.appendChild(y);mxClient.IS_QUIRKS?(q.style.height="17px",w.style.height="17px"):(q.style.position="absolute",q.style.right="32px",q.style.height="15px", +t.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",y.style.right="20px");mxEvent.addListener(q,"blur",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"", [mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a, "",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title", @@ -3010,21 +3007,21 @@ null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menu null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],"geIcon geSprite geSvgSprite geFlipSprite geSprite-box",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],"geIcon geSprite geSvgSprite geFlipSprite geSprite-halfCircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW, "endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1), -this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(u, +this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v, 8);this.addArrow(x);this.addArrow(C);this.addArrow(B);t=this.addArrow(l,9);t.className="geIcon";t.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";t.appendChild(D);var A=document.createElement("div");A.style.width="23px";A.style.height="1px";A.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.marginBottom= -"9px";y.appendChild(A);l.style.height="15px";m.style.height="15px";u.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(v);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight= -"normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var F,I,G=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),J=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var E,O,U=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),R=this.addUnitInput(l, -"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop= +"9px";y.appendChild(A);l.style.height="15px";m.style.height="15px";v.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(u);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight= +"normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var F,I,G=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),J=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var E,M,R=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),S=this.addUnitInput(l, +"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop= "1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var K,H=this.addUnitInput(h,"pt",20,41,function(){K.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var L=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0]; -d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=r)a=parseInt(mxUtils.getValue(e.style, -mxConstants.STYLE_STROKEWIDTH,1)),r.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)? +d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=q)a=parseInt(mxUtils.getValue(e.style, +mxConstants.STYLE_STROKEWIDTH,1)),q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)? null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style, mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"): -"geSprite geSprite-orthogonal";u.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(v.style.display="",p.style.display="none"):(v.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start"); +"geSprite geSprite-orthogonal";v.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start"); c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),B,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(B, -30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)? -"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=H)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(R,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(J, -mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(H,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(r,L);this.addKeyHandler(R,L);this.addKeyHandler(U,L);this.addKeyHandler(J,L);this.addKeyHandler(G,L);this.addKeyHandler(H,L);f.getModel().addListener(mxEvent.CHANGE,L);this.listeners.push({destroy:function(){f.getModel().removeListener(L)}}); +30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)? +"":a+" pt";if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=H)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(S,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(R,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(J, +mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(H,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(q,L);this.addKeyHandler(S,L);this.addKeyHandler(R,L);this.addKeyHandler(J,L);this.addKeyHandler(G,L);this.addKeyHandler(H,L);f.getModel().addListener(mxEvent.CHANGE,L);this.listeners.push({destroy:function(){f.getModel().removeListener(L)}}); L();return a}; StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px"; e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}); @@ -3050,17 +3047,17 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,d=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var b=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(c,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(b.widthInput,function(){b.set(d.pageFormat)});this.addKeyHandler(b.heightInput, function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){c.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a}; DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()})); -c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function v(a,b){this.canvas= -a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,v.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,v.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,v.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,v.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function r(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)} -function F(){mxEllipse.call(this)}function I(){mxShape.call(this)}function G(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function O(){mxShape.call(this)}function U(){mxShape.call(this)}function R(){mxShape.call(this)}function K(){mxShape.call(this)}function H(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function ca(){mxRectangleShape.call(this)}function da(){mxDoubleEllipse.call(this)}function ia(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this); -this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ja(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function fa(){mxActor.call(this)}function ba(){mxActor.call(this)}function ga(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function P(){mxActor.call(this)}function V(){mxEllipse.call(this)} -function la(){mxEllipse.call(this)}function Q(){mxEllipse.call(this)}function va(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ia(a,b,c,d,e,f,g,h,k,l){g+=k;var z=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(z.x- +c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function u(a,b){this.canvas= +a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; +this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function q(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)} +function F(){mxEllipse.call(this)}function I(){mxShape.call(this)}function G(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function M(){mxShape.call(this)}function R(){mxShape.call(this)}function S(){mxShape.call(this)}function K(){mxShape.call(this)}function H(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function da(){mxDoubleEllipse.call(this)}function ia(){mxDoubleEllipse.call(this)}function Z(){mxArrowConnector.call(this); +this.spacing=0}function aa(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function Y(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function Q(){mxActor.call(this)}function ha(){mxActor.call(this)}function N(){mxActor.call(this)}function V(){mxActor.call(this)}function fa(){mxActor.call(this)}function T(){mxActor.call(this)}function ga(){mxActor.call(this)}function W(){mxEllipse.call(this)} +function ka(){mxEllipse.call(this)}function P(){mxEllipse.call(this)}function Ba(){mxRhombus.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Ha(a,b,c,d,e,f,g,h,k,l){g+=k;var z=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(z.x- e-g,z.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),z=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=z&&(a.setFillAlpha(Math.abs(z)),a.setFillColor(0>z?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f), -a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ga=Math.tan(mxUtils.toRadians(30)),oa=(.5-Ga)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d, -e/Ga);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*oa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-oa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ga));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-oa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-oa)*b),a.lineTo(.5*b,(1-oa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*oa), -a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-oa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0, +a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Fa=Math.tan(mxUtils.toRadians(30)),pa=(.5-Fa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d, +e/Fa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*pa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-pa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Fa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-pa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-pa)*b),a.lineTo(.5*b,(1-pa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*pa), +a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-pa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0, 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d, Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()), a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0, @@ -3068,21 +3065,21 @@ Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card", g);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size", this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))* -a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ma=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0, -Math.min(1,e)):Ma.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style, +a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0, +Math.min(1,e)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b, -e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);v.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas, -arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};v.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};v.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};v.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f}; -v.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};v.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),z=this.defaultVariation;5>g&&(g=5,z/=3);for(var h=c(a-this.lastX)* -d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*z;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};v.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo; -this.canvas.arcTo=this.originalArcTo};var Na=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new v(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Na.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Oa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed= -function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Oa.apply(this,arguments)};var Ra=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ra.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!= +e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);u.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas, +arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};u.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};u.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};u.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f}; +u.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};u.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),z=this.defaultVariation;5>g&&(g=5,z/=3);for(var h=c(a-this.lastX)* +d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*z;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo; +this.canvas.arcTo=this.originalArcTo};var Oa=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new u(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Oa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Pa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed= +function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Pa.apply(this,arguments)};var Qa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Qa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!= mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b, -c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style, +c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ra=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ra.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a}; -u.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process", -u);mxUtils.extend(r,mxRectangleShape);r.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};r.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",r);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable= +v.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process", +v);mxUtils.extend(q,mxRectangleShape);q.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};q.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",q);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable= function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),z=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+z),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",w);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style, "size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath= @@ -3090,14 +3087,14 @@ function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.s b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ka=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ka.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ka.apply(this,[a,b,c,d,e]))}};mxUtils.extend(C,mxRectangleShape);C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2, this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};C.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+ -f]];if(null!=g){var h=this.style["symbol"+f+"Align"],z=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],pa=this.style["symbol"+f+"Spacing"]||0,qa=this.style["symbol"+f+"VSpacing"]||pa,m=this.style["symbol"+f+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),pa+=m,qa+=m);var m=b,ha=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-pa):m+pa,ha=z==mxConstants.ALIGN_MIDDLE?ha+(e-l)/2:z== -mxConstants.ALIGN_BOTTOM?ha+(e-l-qa):ha+qa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,m,ha,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message", -B);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(A,mxShape);A.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};A.prototype.paintBackground= -function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",A);mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", -F);mxUtils.extend(I,mxShape);I.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(G,mxShape);G.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};G.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0, -e/8,d,7*e/8);a.fillAndStroke()};G.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",G);mxUtils.extend(J,mxRectangleShape);J.prototype.size=40;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};J.prototype.paintBackground= -function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=J&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};J.prototype.paintForeground= -function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",J);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, +f]];if(null!=g){var h=this.style["symbol"+f+"Align"],z=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],na=this.style["symbol"+f+"Spacing"]||0,qa=this.style["symbol"+f+"VSpacing"]||na,U=this.style["symbol"+f+"ArcSpacing"];null!=U&&(U*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),na+=U,qa+=U);var U=b,m=c,U=h==mxConstants.ALIGN_CENTER?U+(d-k)/2:h==mxConstants.ALIGN_RIGHT?U+(d-k-na):U+na,m=z==mxConstants.ALIGN_MIDDLE?m+(e-l)/2:z==mxConstants.ALIGN_BOTTOM? +m+(e-l-qa):m+qa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,U,m,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",B);mxUtils.extend(D,mxShape); +D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(A,mxShape);A.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};A.prototype.paintBackground=function(a, +b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",A);mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",F);mxUtils.extend(I, +mxShape);I.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(G,mxShape);G.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};G.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()}; +G.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",G);mxUtils.extend(J,mxRectangleShape);J.prototype.size=40;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};J.prototype.paintBackground=function(a,b,c,d, +e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=J&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};J.prototype.paintForeground=function(a, +b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",J);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, "height",this.height)*this.scale))};E.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=J.prototype.size; null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter); @@ -3111,131 +3108,131 @@ Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),n Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+z),new mxPoint(g+e,h+z),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(z,f)):z*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+z),new mxPoint(l,h+z-e),new mxPoint(g,h+z),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(z,f)):z*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(l,h+e),new mxPoint(g+ k,h),new mxPoint(g+k,h+z-e),new mxPoint(l,h+z),new mxPoint(g,h+z-e),new mxPoint(g,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,z=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(z,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(z,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(z,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);z=new mxPoint(z,a);d&&(c.x<f||c.x>f+ -h?z.y=c.y:z.x=c.x);return mxUtils.getPerimeterPoint(g,z,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(U,mxShape);U.prototype.size= -10;U.prototype.inset=2;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",U);mxUtils.extend(R,mxShape);R.prototype.paintBackground= -function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",R);mxUtils.extend(K,mxShape);K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", +h?z.y=c.y:z.x=c.x);return mxUtils.getPerimeterPoint(g,z,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(M,mxShape);M.prototype.size=10;M.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",M);mxUtils.extend(R,mxShape);R.prototype.size= +10;R.prototype.inset=2;R.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(S,mxShape);S.prototype.paintBackground= +function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",S);mxUtils.extend(K,mxShape);K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", K);mxUtils.extend(H,mxCylinder);H.prototype.jettyWidth=20;H.prototype.jettyHeight=10;H.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,e-b),k=Math.min(h+2*b,e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d, e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",H);mxUtils.extend(L,mxCylinder);L.prototype.jettyWidth=32;L.prototype.jettyHeight=12;L.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/ -2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",L);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ca);mxUtils.extend(da,mxDoubleEllipse);da.prototype.outerStroke=!0;da.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2* -f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",da);mxUtils.extend(ia,da);ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ia);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded}; -mxCellRenderer.registerShape("link",X);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ -Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Y);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput", -ea);mxUtils.extend(W,mxRectangleShape);W.prototype.dx=20;W.prototype.dy=20;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e, -parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",W);mxUtils.extend(Z,mxActor);Z.prototype.dx=20;Z.prototype.dy=20;Z.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style, -"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",Z);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar", -ja);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+ -b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",aa);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f, -g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));b=d*Math.max(0, -Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",fa);mxUtils.extend(ba,mxActor);ba.prototype.size= -.1;ba.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ba);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ga);mxUtils.extend(N,mxActor);N.prototype.redrawPath= -function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",N);mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d- -b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",T);mxUtils.extend(P,mxActor);P.prototype.size=.375;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d, -0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",P);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",V);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this, -arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",la);mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+ -.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",Q);mxUtils.extend(va,mxRhombus);va.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",va);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke(); -a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension", -Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+ -e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse", -wa);mxUtils.extend(xa,mxActor);xa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",xa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g, -0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",ra);mxUtils.extend(sa,mxActor);sa.prototype.size=.25;sa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()}; -mxCellRenderer.registerShape("display",sa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),na.prototype.origPaintEdgeShape.apply(this, -[a,b,c])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1);return function(){a.begin(); -a.moveTo(d.x-m/2-z/2,d.y-z/2+m/2);a.lineTo(d.x+z/2-3*m/2,d.y-3*z/2-m/2);a.stroke()}});mxMarker.addMarker("box",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1),n=d.x+m/2,p=d.y+z/2;d.x-=m;d.y-=z;return function(){a.begin();a.moveTo(n-m/2-z/2,p-z/2+m/2);a.lineTo(n-m/2+z/2,p-z/2-m/2);a.lineTo(n+z/2-3*m/2,p-3*z/2-m/2);a.lineTo(n-z/2-3*m/2,p-3*z/2+m/2);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1);return function(){a.begin(); -a.moveTo(d.x-m/2-z/2,d.y-z/2+m/2);a.lineTo(d.x+z/2-3*m/2,d.y-3*z/2-m/2);a.moveTo(d.x-m/2+z/2,d.y-z/2-m/2);a.lineTo(d.x-z/2-3*m/2,d.y-3*z/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ia);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),z=Ia.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){z.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}}); -mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1),n=d.clone();d.x-=m;d.y-=z;return function(){a.begin();a.moveTo(n.x-z,n.y+m);a.quadTo(d.x-z,d.y+m,d.x,d.y);a.quadTo(d.x+z,d.y-m,n.x+z,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2); -a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var z=e.clone();return function(){b.begin();b.moveTo(z.x,z.y);k?b.lineTo(z.x-f-g/a,z.y-g+f/a):b.lineTo(z.x+g/a-f,z.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var La=function(a,b,c){return ua(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+ -e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ua=function(a,b,c,d,e){return M(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]: -g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,z=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,z,h/z,m/z,l,g,d,f)})},ma=function(a){return function(b){return[M(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth= -Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ha=function(a,b,c){return function(d){var e=[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style, -mxConstants.STYLE_ROUNDED,!1)&&e.push(ka(d));return e}},ya=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[M(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/ -a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ka(f));return g}},Ja=function(a){return function(b){var c=[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null, -!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b}},ka=function(a,b){return M(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/ -2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50, -Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[La(a,!0,10),La(a,!1,10)]},flexArrow:function(a){var b= -a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c* -b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))< -b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c= -Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])- -parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style, -mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]= -a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/ -5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]= -a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[M(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style, -mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style, -mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ka(a,c/2))}return b},label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height, -b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner, -Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1, -mxUtils.getValue(this.state.style,"size",ra.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width- -b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a)); -return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style, -"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2))); -return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+ -d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style, -"dy",W.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b},module:function(a){return[M(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",H.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height, -mxUtils.getValue(this.state.style,"jettyHeight",H.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Z.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style, -"dy",Z.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a, -b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style, -"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style, -"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a, -["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ya(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ya(y.prototype.size,!0,.5,!0),curlyBracket:ya(p.prototype.size,!1),display:ya(sa.prototype.size,!1),cube:Ha(1,a.prototype.size,!1),card:Ha(.5,g.prototype.size,!0),loopLimit:Ha(.5, -T.prototype.size,!0),trapezoid:Ja(.5),parallelogram:Ja(1)};Graph.createHandle=M;Graph.handleFactory=za;var Pa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Pa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);b=za[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&& -(b=za[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Aa=new mxPoint(1,0),Ba=new mxPoint(1,0),ma=mxUtils.toRadians(-30),Aa=mxUtils.getRotatedPoint(Aa, -Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),Ba=mxUtils.getRotatedPoint(Ba,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=Aa.x,l=Aa.y,m=Ba.x,n=Ba.y,p="horizontal"==mxUtils.getValue(a.style,"elbow", -"horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler; -Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Qa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style, -"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25, -0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25, -1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0, -.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b, -c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b, -.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b, -parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};W.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints= -mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};H.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",H.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a, -"jettyHeight",H.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b), -new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));c>15* -a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};T.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0, -1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1, -.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75, -.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, -.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25, -1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5, -1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0), -new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, +2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",L);mxUtils.extend(X,mxRectangleShape);X.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",X);mxUtils.extend(da,mxDoubleEllipse);da.prototype.outerStroke=!0;da.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2* +f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",da);mxUtils.extend(ia,da);ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ia);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=4;Z.prototype.isOpenEnded=function(){return!0};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Z.prototype.isArrowRounded=function(){return this.isRounded}; +mxCellRenderer.registerShape("link",Z);mxUtils.extend(aa,mxArrowConnector);aa.prototype.defaultWidth=10;aa.prototype.defaultArrowWidth=20;aa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};aa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ +Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",aa);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput", +ea);mxUtils.extend(Y,mxRectangleShape);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e, +parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",Y);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))); +parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",ba);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d, +e/2);a.end()};mxCellRenderer.registerShape("crossbar",ja);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0, +0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(Q,mxActor);Q.prototype.arrowWidth=.3;Q.prototype.arrowSize=.2;Q.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",Q);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth", +Q.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Q.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow", +ha);mxUtils.extend(N,mxActor);N.prototype.size=.1;N.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",N);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or", +V);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",fa);mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",T);mxUtils.extend(ga,mxActor);ga.prototype.size=.375;ga.prototype.isRoundable=function(){return!0};ga.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ga);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a, +b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke(); +a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",P);mxUtils.extend(Ba,mxRhombus);Ba.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c); +a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5); +a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")? +a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b, +c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",va);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",wa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style, +"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",ra);mxUtils.extend(sa,mxActor);sa.prototype.size=.25;sa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c, +0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",sa);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&& +(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),oa.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"}); +return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var z=e*(g+k+1),m=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-z/2-m/2,d.y-m/2+z/2);a.lineTo(d.x+m/2-3*z/2,d.y-3*m/2-z/2);a.stroke()}});mxMarker.addMarker("box",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1),n=d.x+m/2,p=d.y+z/2;d.x-=m;d.y-=z;return function(){a.begin();a.moveTo(n-m/2-z/2,p-z/2+m/2);a.lineTo(n-m/2+z/2,p-z/2-m/2);a.lineTo(n+z/2-3*m/2,p-3*z/2-m/2);a.lineTo(n-z/2-3*m/2,p-3*z/2+m/2);a.close();l?a.fillAndStroke(): +a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-z/2,d.y-z/2+m/2);a.lineTo(d.x+z/2-3*m/2,d.y-3*z/2-m/2);a.moveTo(d.x-m/2+z/2,d.y-z/2-m/2);a.lineTo(d.x-z/2-3*m/2,d.y-3*z/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ha);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),z=Ha.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){z.apply(this,arguments);a.begin();a.moveTo(m.x- +e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1),n=d.clone();d.x-=m;d.y-=z;return function(){a.begin();a.moveTo(n.x-z,n.y+m);a.quadTo(d.x-z,d.y+m,d.x,d.y);a.quadTo(d.x+z,d.y-m,n.x+z,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+= +1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var z=e.clone();return function(){b.begin();b.moveTo(z.x,z.y);k?b.lineTo(z.x-f-g/a,z.y-g+f/a):b.lineTo(z.x+g/a-f,z.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ia=function(a, +b,c){return ta(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ta=function(a,b,c,d,e){return O(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/ +g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,z=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,z,h/z,m/z,l,g,d,f)})},ma=function(a){return function(b){return[O(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Q.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",Q.prototype.arrowSize))); +return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ga=function(a,b,c){return function(d){var e=[O(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0, +Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},xa=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[O(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style, +"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(la(f));return g}},Ja=function(a){return function(b){var c=[O(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size= +Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(la(b));return c}},ua=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b}},la=function(a,b){return O(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]= +Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},O=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ia(a,!0,10), +Ia(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+ +d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])- +parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ta(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth* +a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())|| +(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()- +a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2* +c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ta(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)* +a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/ +a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c}, +swimlane:function(a){var b=[O(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0, +Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(la(a,c/2))}return b},label:ua(),ext:ua(),rectangle:ua(),triangle:ua(),rhombus:ua(),umlLifeline:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(), +a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[O(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner, +Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},cross:function(a){return[O(a, +["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ra.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style, +"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style, +mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},dataStorage:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[O(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))), +c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["position2"],function(a){var b=Math.max(0,Math.min(1, +mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style, +"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},internalStorage:function(a){var b=[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style, +"dx",Y.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},module:function(a){return[O(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style, +"jettyWidth",H.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",H.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))), +c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy))); +return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),folder:function(a){return[O(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight", +h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[O(a,["size"], +function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0, +Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ga.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:xa(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:xa(y.prototype.size,!0,.5,!0),curlyBracket:xa(p.prototype.size,!1),display:xa(sa.prototype.size, +!1),cube:Ga(1,a.prototype.size,!1),card:Ga(.5,g.prototype.size,!0),loopLimit:Ga(.5,T.prototype.size,!0),trapezoid:Ja(.5),parallelogram:Ja(1)};Graph.createHandle=O;Graph.handleFactory=ya;var Ma=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ma.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE); +b=ya[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=ya[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ya[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0), +Aa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY())); +var k=za.x,l=za.y,m=Aa.x,n=Aa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(r=new mxPoint(r.x+k*b,r.y+l*b),e.push(r)),r=new mxPoint(r.x+m*a,r.y+n*a)):(c&&(r=new mxPoint(r.x+m*a,r.y+n*a),e.push(r)),r=new mxPoint(r.x+k*b,r.y+l*b));e.push(r)};var r=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle", +mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Na.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, +"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0), +new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b, +Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1, +1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1, +.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a}; +h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Y.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints; +P.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};H.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a, +"jettyWidth",H.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",H.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};T.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, +.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75, +.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0, +.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0, +.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25, +.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, +.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0, +.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1, +.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375, +1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, .95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, -0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;aa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, +0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ca.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, "dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};Z.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};ba.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -1),!1));return a};ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];S.prototype.getConstraints= +1),!1));return a};ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Q.prototype.getConstraints= function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};fa.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ha.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Q.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Q.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0, .5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};ra.prototype.getConstraints= function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};J.prototype.constraints=null;ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, -.9),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};J.prototype.constraints=null;V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, +.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.selectParentAfterDelete?b.model.getParents(c):null;b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...", function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ ": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container, 620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN? Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(b)}catch(g){c.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate(); -try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,h=e.y,e=null;if(1==c.length&&a){var v=b.getCellGeometry(c[0]);null!=v&&(e=v.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var u=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),r=Math.round(b.snap(b.popupMenuHandler.triggerY/f-h));b.cellsMoved(c,u-e.x,r-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize", +try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,h=e.y,e=null;if(1==c.length&&a){var u=b.getCellGeometry(c[0]);null!=u&&(e=u.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,a);if(null!=e){var v=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),q=Math.round(b.snap(b.popupMenuHandler.triggerY/f-h));b.cellsMoved(c,v-e.x,q-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize", function(a){a=b.getSelectionCell();b.isEnabled()&&null!=a&&b.getModel().isVertex(a)&&(a=b.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(b.isEnabled()&&!b.isSelectionEmpty()&&null!=c.copiedSize){b.getModel().beginUpdate();try{var d=b.getSelectionCells();for(a=0;a<d.length;a++)if(b.getModel().isVertex(d[a])){var e=b.getCellGeometry(d[a]);null!=e&&(e=e.clone(),e.width=c.copiedSize.width,e.height= c.copiedSize.height,b.getModel().setGeometry(d[a],e))}}finally{b.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{b.setSelectionCells(b.duplicateCells())}catch(g){c.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"), function(a){b.turnShapes(b.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){b.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){b.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){b.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){b.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A"); @@ -3247,7 +3244,7 @@ this.addAction("edit",function(){b.isEnabled()&&b.startEditingAtCell()},null,nul null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(b.clearSelection(),c.actions.get("image").funct())})).isEnabled=f;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&c.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var d=null,e=b.getLinkTitle(a);null!=c&&0<c.length&&(d=c[0].iconUrl, e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));var f=b.getFreeInsertPoint(),d=new mxCell(e,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;b.setLinkForCell(d,a);b.cellSizeUpdated(d,!0);b.getModel().beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells", [d]))}finally{b.getModel().endUpdate()}b.setSelectionCell(d);b.scrollCellToVisible(b.getSelectionCell())}})})).isEnabled=f;this.addAction("link...",mxUtils.bind(this,function(){var a=c.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var b=a.getSelectedElement(),d=a.getParentByName(b,"A",a.cellEditor.textarea),e="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var f=b.getElementsByTagName("a"),h=0;h<f.length&&null==d;h++)f[h].textContent==b.textContent&&(d=f[h]);null!=d&& -"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var q=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(q);null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().getChildCount(d))b.updateGroupBounds([d], +"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var r=a.cellEditor.saveSelection();c.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(b){a.cellEditor.restoreSelection(r);null!=b&&a.insertLink(b)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=b.getSelectionCells();if(null!=a){b.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var d=a[c];if(b.getModel().getChildCount(d))b.updateGroupBounds([d], 20);else{var e=b.view.getState(d),f=b.getCellGeometry(d);b.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=f&&b.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/b.view.scale,b.getModel().setGeometry(d,f)):b.updateCellSize(d)}}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=b.getView().getState(b.getSelectionCell());if(null!=a){b.stopEditing();a="1"==a.style.html?null:"1";b.getModel().beginUpdate();try{for(var d= b.getSelectionCells(),e=0;e<d.length;e++)if(state=b.getView().getState(d[e]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==a){var h=b.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=h;h=mxUtils.extractTextWithWhitespace(p.childNodes);b.cellLabelChanged(state.cell,h);b.setCellStyles("html",a,[d[e]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(b.convertValueToString(state.cell), !1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"<br/>")),b.cellLabelChanged(state.cell,b.sanitizeHtml(h)),b.setCellStyles("html",a,[d[e]]))}c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",d))}finally{b.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=b.getView().getState(b.getSelectionCell()),c="wrap";b.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);b.setCellStyles(mxConstants.STYLE_WHITE_SPACE, @@ -3310,9 +3307,9 @@ Menus.prototype.addMenu=function(a,c,d){var b=this.get(a);null!=b&&(c.showDisabl Menus.prototype.addInsertTableItem=function(a,c){function d(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}c=null!=c?c:mxUtils.bind(this,function(a,b,c){var e=this.editorUi.editor.graph;a=e.getParentByName(mxEvent.getSource(a),"TD");if(null!=a&&null!=e.cellEditor.textarea){e.getParentByName(a,"TR");var f=e.cellEditor.textarea.getElementsByTagName("table");a=[];for(var g=0;g<f.length;g++)a.push(f[g]); e.container.focus();e.pasteHtmlAtCaret(d(b,c));b=e.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){e.selectNode(b[g].rows[0].cells[0]);break}}});var b=this.editorUi.editor.graph,f=null,e=null,h=a.addItem("",null,mxUtils.bind(this,function(a){null!=e&&null!=f&&c(a,f.sectionRowIndex+1,e.cellIndex+1)})),g='<img src="'+mxClient.imageBasePath+'/transparent.gif" width="16" height="16"/>';h.firstChild.innerHTML="";var k=function(a, b){var c=document.createElement("table");c.setAttribute("border","1");c.style.borderCollapse="collapse";c.style.borderStyle="solid";mxClient.IS_QUIRKS||c.setAttribute("cellPadding","8");for(var d=0;d<a;d++)for(var e=c.insertRow(d),f=0;f<b;f++){var h=e.insertCell(-1);mxClient.IS_QUIRKS&&(h.innerHTML=g)}return c}(5,5);h.firstChild.appendChild(k);var l=document.createElement("div");l.style.padding="4px";l.style.fontSize=Menus.prototype.defaultFontSize+"px";l.innerHTML="1x1";h.firstChild.appendChild(l); -mxEvent.addListener(k,"mouseover",function(a){e=b.getParentByName(mxEvent.getSource(a),"TD");if(null!=e){f=b.getParentByName(e,"TR");for(var c=Math.min(20,f.sectionRowIndex+2),d=Math.min(20,e.cellIndex+2),h=k.rows.length;h<c;h++)for(var m=k.insertRow(h),u=0;u<k.rows[0].cells.length;u++){var r=m.insertCell(-1);mxClient.IS_QUIRKS&&(r.innerHTML=g)}for(h=0;h<k.rows.length;h++)for(m=k.rows[h],u=m.cells.length;u<d;u++)r=m.insertCell(-1),mxClient.IS_QUIRKS&&(r.innerHTML=g);l.innerHTML=e.cellIndex+1+"x"+ +mxEvent.addListener(k,"mouseover",function(a){e=b.getParentByName(mxEvent.getSource(a),"TD");if(null!=e){f=b.getParentByName(e,"TR");for(var c=Math.min(20,f.sectionRowIndex+2),d=Math.min(20,e.cellIndex+2),h=k.rows.length;h<c;h++)for(var m=k.insertRow(h),v=0;v<k.rows[0].cells.length;v++){var q=m.insertCell(-1);mxClient.IS_QUIRKS&&(q.innerHTML=g)}for(h=0;h<k.rows.length;h++)for(m=k.rows[h],v=m.cells.length;v<d;v++)q=m.insertCell(-1),mxClient.IS_QUIRKS&&(q.innerHTML=g);l.innerHTML=e.cellIndex+1+"x"+ (f.sectionRowIndex+1);for(c=0;c<k.rows.length;c++)for(d=k.rows[c],h=0;h<d.cells.length;h++)d.cells[h].style.backgroundColor=c<=f.sectionRowIndex&&h<=e.cellIndex?"blue":"transparent";mxEvent.consume(a)}})}; -Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var n=c[f];if(a.getModel().isEdge(n)){if(h){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var q=0;q<d.length;q++)a.setCellStyles(d[q],b[q],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged", +Menus.prototype.edgeStyleChange=function(a,c,d,b,f,e,h){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),e=[],f=0;f<c.length;f++){var n=c[f];if(a.getModel().isEdge(n)){if(h){var p=a.getCellGeometry(n);null!=p&&(p=p.clone(),p.points=null,a.getModel().setGeometry(n,p))}for(var r=0;r<d.length;r++)a.setCellStyles(d[r],b[r],[n]);e.push(n)}}this.editorUi.fireEvent(new mxEventObject("styleChanged", "keys",d,"values",b,"cells",e))}finally{a.getModel().endUpdate()}}),e,f)};Menus.prototype.styleChange=function(a,c,d,b,f,e,h,g){var k=this.createStyleChangeFunction(d,b);return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=h&&a.cellEditor.isContentEditing()?h():k(g)}),e,f)}; Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(d){var b=this.editorUi.editor.graph;b.stopEditing(!1);b.getModel().beginUpdate();try{for(var f=b.getSelectionCells(),e=0;e<a.length;e++)if(b.setCellStyles(a[e],c[e],f),a[e]==mxConstants.STYLE_ALIGN&&b.updateLabelElements(f,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[e]==mxConstants.STYLE_FONTFAMILY)for(e=0;e<f.length;e++)0==b.model.getChildCount(f[e])&&b.autoSizeCell(f[e],!1);null!=d&&d(); this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",f))}finally{b.getModel().endUpdate()}})}; @@ -3384,8 +3381,8 @@ Toolbar.prototype.createLabel=function(a,c){var d=document.createElement("a");d. Toolbar.prototype.addMenuHandler=function(a,c,d,b){if(null!=d){var f=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if(h&&(null==a.enabled||a.enabled)){f.popupMenuHandler.hideMenu();e=new mxPopupMenu(d);e.div.className+=" geToolbarMenu";e.showDisabled=b;e.labels=c;e.autoExpand=!0;var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px"); e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}h=!0;mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){h=this.currentElt!=a;b.preventDefault()}))}}; Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog= -function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),q=0;q<b;q++)(function(a){var b= -document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+q]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")), +function(a,c,d,b){function f(){var a=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}function e(a,b,c,d){b=null!=b?b:12;var e=document.createElement("table");e.style.borderCollapse="collapse";e.setAttribute("cellspacing","0");e.style.marginBottom="20px";e.style.cellSpacing="0px";var k=document.createElement("tbody");e.appendChild(k);for(var m=a.length/b,n=0;n<m;n++){for(var p=document.createElement("tr"),r=0;r<b;r++)(function(a){var b= +document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);"none"==a?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor="#"+a;p.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),h.value="none"):g.fromString(a)}))})(a[n*b+r]);k.appendChild(p)}d&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")), a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height="16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",p.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();e.parentNode.replaceChild(f(),e)}));l.appendChild(e);return e}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px"; h.style.width="216px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));this.init=function(){mxClient.IS_TOUCH||h.focus()};var g=new mxJSColor.color(h);g.pickerOnfocus=!1;g.showPicker();var k=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";k.appendChild(mxJSColor.picker.box);var l=document.createElement("center");k.appendChild(h); mxUtils.br(k);f();var m=e(this.presetColors);m.style.marginBottom="8px";m=e(this.defaultColors);m.style.marginBottom="16px";k.appendChild(l);m=document.createElement("div");m.style.textAlign="right";m.style.whiteSpace="nowrap";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var p=null!=d?d:this.createApplyFunction();d=mxUtils.button(mxResources.get("apply"),function(){var b=h.value;/(^#?[a-zA-Z0-9]*$)/.test(b)? @@ -3394,44 +3391,44 @@ this.container=k};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[]; ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");c.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(d);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);d=document.createElement("a");d.setAttribute("href", -"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,n,p,q){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var v,u,r=document.createElement("table"),w=document.createElement("tbody");v=document.createElement("tr");u=document.createElement("td"); -u.style.fontSize="10pt";u.style.width="100px";mxUtils.write(u,c);v.appendChild(u);w.appendChild(v);v=document.createElement("tr");u=document.createElement("td");var t=document.createElement("textarea");m&&t.setAttribute("wrap","off");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");mxUtils.write(t,d||"");t.style.resize="none";t.style.width=h+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus(); -t.scrollTop=0};u.appendChild(t);v.appendChild(u);w.appendChild(v);v=document.createElement("tr");u=document.createElement("td");u.style.paddingTop="14px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");null!=p&&(c=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),c.className="geBtn",u.appendChild(c));if(null!=q)for(c=0;c<q.length;c++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,t)});c.className="geBtn";u.appendChild(c)})(q[c][0],q[c][1]);e=mxUtils.button(e|| -mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});e.className="geBtn";a.editor.cancelFirst&&u.appendChild(e);null!=k&&k(u,t);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(t.value)}),k.className="geBtn gePrimaryBtn",u.appendChild(k));a.editor.cancelFirst||u.appendChild(e);v.appendChild(u);w.appendChild(v);r.appendChild(w);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea"); +"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");c.appendChild(d);mxUtils.br(c);mxUtils.br(c);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";c.appendChild(d);this.container=c},TextareaDialog=function(a,c,d,b,f,e,h,g,k,l,m,n,p,r){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var u,v,q=document.createElement("table"),w=document.createElement("tbody");u=document.createElement("tr");v=document.createElement("td"); +v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,c);u.appendChild(v);w.appendChild(u);u=document.createElement("tr");v=document.createElement("td");var t=document.createElement("textarea");m&&t.setAttribute("wrap","off");t.setAttribute("spellcheck","false");t.setAttribute("autocorrect","off");t.setAttribute("autocomplete","off");t.setAttribute("autocapitalize","off");mxUtils.write(t,d||"");t.style.resize="none";t.style.width=h+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus(); +t.scrollTop=0};v.appendChild(t);u.appendChild(v);w.appendChild(u);u=document.createElement("tr");v=document.createElement("td");v.style.paddingTop="14px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");null!=p&&(c=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),c.className="geBtn",v.appendChild(c));if(null!=r)for(c=0;c<r.length;c++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,t)});c.className="geBtn";v.appendChild(c)})(r[c][0],r[c][1]);e=mxUtils.button(e|| +mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});e.className="geBtn";a.editor.cancelFirst&&v.appendChild(e);null!=k&&k(v,t);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(t.value)}),k.className="geBtn gePrimaryBtn",v.appendChild(k));a.editor.cancelFirst||v.appendChild(e);u.appendChild(v);w.appendChild(u);q.appendChild(w);this.container=q},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea"); d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()}, !1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var f=document.createElement("select");f.style.width="180px";f.className="geBtn";if(a.editor.graph.isEnabled()){var e= document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));f.appendChild(e)}e=document.createElement("option");e.setAttribute("value","new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&f.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),f.appendChild(e));c.appendChild(f); e=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==f.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==f.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==f.value){a.editor.graph.model.beginUpdate();try{var e=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(e)).decode(e.documentElement, l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0; -var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),v.setAttribute("disabled","true"),y.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),v.removeAttribute("disabled"),y.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled"); -"png"===n.value?(u.removeAttribute("disabled"),r.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),r.setAttribute("disabled","disabled"))}function d(){q.style.backgroundColor=q.value*v.value>MAX_AREA||0>=q.value?"red":"";v.style.backgroundColor=q.value*v.value>MAX_AREA||0>=v.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding", +var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),r.setAttribute("disabled","true"),u.setAttribute("disabled","true"),y.setAttribute("disabled","true")):(p.removeAttribute("disabled"),r.removeAttribute("disabled"),u.removeAttribute("disabled"),y.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled"); +"png"===n.value?(v.removeAttribute("disabled"),q.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"))}function d(){r.style.backgroundColor=r.value*u.value>MAX_AREA||0>=r.value?"red":"";u.style.backgroundColor=r.value*u.value>MAX_AREA||0>=u.value?"red":""}var b=a.editor.graph,f=b.getGraphBounds(),e=b.view.scale,h=Math.ceil(f.width/e),g=Math.ceil(f.height/e),k,e=document.createElement("table"),l=document.createElement("tbody");e.setAttribute("cellpadding", mxClient.IS_SF?"0":"2");f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");f.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+ ":");f.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option"); k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));n.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));n.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),n.appendChild(k));k=document.createElement("td");k.appendChild(n);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td"); -k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");f.appendChild(k);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var q=document.createElement("input");q.setAttribute("value", -h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var v=document.createElement("input");v.setAttribute("value",g);v.style.width="180px";k=document.createElement("td");k.appendChild(v);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize= -"10pt";mxUtils.write(k,mxResources.get("dpi")+":");f.appendChild(k);var u=document.createElement("select");u.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value", -"400");mxUtils.write(k,"400dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));u.appendChild(k);var r=document.createElement("input");r.style.width="180px";r.style.display="none";r.setAttribute("value","100");r.setAttribute("type","number");r.setAttribute("min","50");r.setAttribute("step","50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",r.style.display="",r.focus()): -(r.value=this.value,w||(p.value=this.value))});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value);isNaN(a)||0>=a?r.style.backgroundColor="red":(r.style.backgroundColor="",w||(p.value=a))});k=document.createElement("td");k.appendChild(u);k.appendChild(r);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("type", +k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");f.appendChild(k);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");f.appendChild(k);var r=document.createElement("input");r.setAttribute("value", +h);r.style.width="180px";k=document.createElement("td");k.appendChild(r);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");f.appendChild(k);var u=document.createElement("input");u.setAttribute("value",g);u.style.width="180px";k=document.createElement("td");k.appendChild(u);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize= +"10pt";mxUtils.write(k,mxResources.get("dpi")+":");f.appendChild(k);var v=document.createElement("select");v.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value", +"400");mxUtils.write(k,"400dpi");v.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));v.appendChild(k);var q=document.createElement("input");q.style.width="180px";q.style.display="none";q.setAttribute("value","100");q.setAttribute("type","number");q.setAttribute("min","50");q.setAttribute("step","50");var w=!1;mxEvent.addListener(v,"change",function(){"custom"==this.value?(this.style.display="none",q.style.display="",q.focus()): +(q.value=this.value,w||(p.value=this.value))});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value);isNaN(a)||0>=a?q.style.backgroundColor="red":(q.style.backgroundColor="",w||(p.value=a))});k=document.createElement("td");k.appendChild(v);k.appendChild(q);f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");f.appendChild(k);var t=document.createElement("input");t.setAttribute("type", "checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value",ExportDialog.lastBorderValue);y.style.width="180px"; -k=document.createElement("td");k.appendChild(y);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),v.value=Math.floor(g*a)):(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),v.value=Math.floor(g*a)): -(p.value="100",q.value=h,v.value=g);d()});mxEvent.addListener(v,"change",function(){var a=parseInt(v.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,v.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c= -m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(y.value)),g=b.background,h=Math.max(1,parseInt(r.value));if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(k.appendChild(C),k.appendChild(x)):(k.appendChild(x), +k=document.createElement("td");k.appendChild(y);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(r.value=Math.floor(h*a),u.value=Math.floor(g*a)):(p.value="100",r.value=h,u.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(g*a)): +(p.value="100",r.value=h,u.value=g);d()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(h*a)):(p.value="100",r.value=h,u.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c= +m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(y.value)),g=b.background,h=Math.max(1,parseInt(q.value));if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(k.appendChild(C),k.appendChild(x)):(k.appendChild(x), k.appendChild(C));f.appendChild(k);l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,c,d,b,f,e,h){var g=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(g.getSvg(b,f,e)),c,d);else{var k=g.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/f-k.x)/g.view.scale),Math.floor((e/f-k.y)/g.view.scale));l.scale(f/g.view.scale);(new mxImageExport).drawState(g.getView().getState(g.model.root), l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*f/g.view.scale+2*e);f=Math.ceil(k.height*f/g.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+l+"&h="+f+"&"+m+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}}; ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))}; var EditDataDialog=function(a,c){function d(){0<w.value.length?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}var b=document.createElement("div"),f=a.editor.graph,e=f.getModel().getValue(c);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var g=new mxForm("properties");g.table.style.width="100%";for(var k=e.attributes,l=[],m=[],n=0,p=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a, -c):null,q=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin= -"0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=p?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[n]+":",c,2);m[a].style.width="100%";0<c.indexOf("\n")&&m[a].setAttribute("rows","2");q(m[a],b)},v=[],u=f.getModel().getParent(c)== -f.getModel().getRoot(),r=0;r<k.length;r++)!u&&"label"==k[r].nodeName||"placeholders"==k[r].nodeName||v.push({name:k[r].nodeName,value:k[r].nodeValue});v.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=p&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,p),g.addField(mxResources.get("id")+":",k));for(r=0;r<v.length;r++)h(n,v[r].name,v[r].value),n++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;"; -h.appendChild(g.table);v=document.createElement("div");v.style.boxSizing="border-box";v.style.paddingRight="160px";v.style.whiteSpace="nowrap";v.style.marginTop="6px";v.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";v.appendChild(w);h.appendChild(v);b.appendChild(h); -var t=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);q(c,a);c.focus()}t.setAttribute("disabled","disabled");w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init= -function(){0<m.length?m[0].focus():w.focus()};t.setAttribute("title",mxResources.get("addProperty"));t.setAttribute("disabled","disabled");t.style.textOverflow="ellipsis";t.style.position="absolute";t.style.overflow="hidden";t.style.width="144px";t.style.right="0px";t.className="geBtn";v.appendChild(t);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments); -e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(B){mxUtils.alert(B)}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)|| -a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";r=document.createElement("input");r.setAttribute("type","checkbox");r.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(r.setAttribute("checked","checked"),r.defaultChecked=!0);mxEvent.addListener(r,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});u.appendChild(r);mxUtils.write(u,mxResources.get("placeholders"));if(null!= -EditDataDialog.placeholderHelpLink){r=document.createElement("a");r.setAttribute("href",EditDataDialog.placeholderHelpLink);r.setAttribute("title",mxResources.get("help"));r.setAttribute("target","_blank");r.style.marginLeft="8px";r.style.cursor="help";var y=document.createElement("img");mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage); -r.appendChild(y);u.appendChild(r)}k.appendChild(u)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(v)):(k.appendChild(v),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null; +c):null,r=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin= +"0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=p?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[n]+":",c,2);m[a].style.width="100%";0<c.indexOf("\n")&&m[a].setAttribute("rows","2");r(m[a],b)},u=[],v=f.getModel().getParent(c)== +f.getModel().getRoot(),q=0;q<k.length;q++)!v&&"label"==k[q].nodeName||"placeholders"==k[q].nodeName||u.push({name:k[q].nodeName,value:k[q].nodeValue});u.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=p&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,p),g.addField(mxResources.get("id")+":",k));for(q=0;q<u.length;q++)h(n,u[q].name,u[q].value),n++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;"; +h.appendChild(g.table);u=document.createElement("div");u.style.boxSizing="border-box";u.style.paddingRight="160px";u.style.whiteSpace="nowrap";u.style.marginTop="6px";u.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";u.appendChild(w);h.appendChild(u);b.appendChild(h); +var t=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);r(c,a);c.focus()}t.setAttribute("disabled","disabled");w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init= +function(){0<m.length?m[0].focus():w.focus()};t.setAttribute("title",mxResources.get("addProperty"));t.setAttribute("disabled","disabled");t.style.textOverflow="ellipsis";t.style.position="absolute";t.style.overflow="hidden";t.style.width="144px";t.style.right="0px";t.className="geBtn";u.appendChild(t);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments); +e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(B){mxUtils.alert(B)}});u.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)|| +a.editor.graph.getModel().isEdge(c)){v=document.createElement("span");v.style.marginRight="10px";q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(q.setAttribute("checked","checked"),q.defaultChecked=!0);mxEvent.addListener(q,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});v.appendChild(q);mxUtils.write(v,mxResources.get("placeholders"));if(null!= +EditDataDialog.placeholderHelpLink){q=document.createElement("a");q.setAttribute("href",EditDataDialog.placeholderHelpLink);q.setAttribute("title",mxResources.get("help"));q.setAttribute("target","_blank");q.style.marginLeft="8px";q.style.cursor="help";var y=document.createElement("img");mxUtils.setOpacity(y,50);y.style.height="16px";y.style.width="16px";y.setAttribute("border","0");y.setAttribute("valign","middle");y.style.marginTop=mxClient.IS_IE11?"0px":"-4px";y.setAttribute("src",Editor.helpImage); +q.appendChild(y);v.appendChild(q)}k.appendChild(v)}a.editor.cancelFirst?(k.appendChild(h),k.appendChild(u)):(k.appendChild(u),k.appendChild(h));b.appendChild(k);this.container=b};EditDataDialog.getDisplayIdForCell=function(a,c){var d=null;null!=a.editor.graph.getModel().getParent(c)&&(d=c.getId());return d};EditDataDialog.placeholderHelpLink=null; var LinkDialog=function(a,c,d,b){var f=document.createElement("div");mxUtils.write(f,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type", "text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML? 0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});e.appendChild(h);e.appendChild(c);f.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(), @@ -3444,22 +3441,22 @@ m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=h.pageScale;b.pageFormat=h. function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==l.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&(b?n.funct():p.funct())})}},LayersWindow=function(a,c,d,b,f){function e(b){if(g.isEnabled()&&null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"), mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var f=document.createElement("div");f.className="geToolbarContainer";f.style.overflow="hidden";f.style.position="relative";f.style.padding="4px";f.style.height="22px";f.style.display="block";f.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;f.style.borderWidth="0px 0px 1px 0px";f.style.borderColor= "#c3c3c3";f.style.borderStyle="solid";f.style.whiteSpace="nowrap";f.setAttribute("title",b);var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(f,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(f,"dragstart",function(a){n=f;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(f,"dragend", -function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var r=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(r,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&& -(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(r,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")])); +function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var q=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(q,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&& +(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(q,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")])); l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);f.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign= "right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="▼",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&& -a<q-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="▲",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable", -"true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",v=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q- -1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(v)||mxResources.get("background");r.setAttribute("title",mxResources.get("removeIt",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));t.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect= +a<r-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="▲",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),f.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(f.setAttribute("draggable", +"true"),f.style.cursor="move")}mxEvent.addListener(f,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(e(c),mxEvent.consume(a))});g.getDefaultParent()==c?(f.style.background="white"==Dialog.backdropColor?"#e6eff8":"#505759",f.style.fontWeight=g.isEnabled()?"bold":"",u=c):mxEvent.addListener(f,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),h())});m.appendChild(f)}r=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=r- +1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));var c=g.convertValueToString(u)||mxResources.get("background");q.setAttribute("title",mxResources.get("removeIt",[c]));y.setAttribute("title",mxResources.get("duplicateIt",[c]));t.setAttribute("title",mxResources.get("editData"));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect= "none";k.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="white"==Dialog.backdropColor?"#dcdcdc":Dialog.backdropColor;m.style.position="absolute";m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px"; -k.appendChild(m);var n=null,p=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,v=null,u=document.createElement("div");u.className="geToolbarContainer";u.style.position="absolute";u.style.bottom="0px";u.style.left="0px";u.style.right="0px";u.style.height=l;u.style.overflow="hidden";u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px": -"1px";u.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;u.style.borderWidth="1px 0px 0px 0px";u.style.borderColor="#c3c3c3";u.style.borderStyle="solid";u.style.display="block";u.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(u.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var r=l.cloneNode();r.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(r, -"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(v);g.removeCells([v],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(r.className="geButton mxDisabled");u.appendChild(r);var w=l.cloneNode();w.setAttribute("title", -mxUtils.trim(mxResources.get("moveSelectionTo",[""])));w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=q-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(), -0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(w);c.popup(d.x,d.y+w.offsetHeight,null,b);a.setCurrentMenu(c)}});u.appendChild(w);var t=l.cloneNode();t.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>'; -t.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(t,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(t.className="geButton mxDisabled");u.appendChild(t);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(v),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0), -a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(y.className="geButton mxDisabled");u.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root); -g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");u.appendChild(l);k.appendChild(u);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); +k.appendChild(m);var n=null,p=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var r=null,u=null,v=document.createElement("div");v.className="geToolbarContainer";v.style.position="absolute";v.style.bottom="0px";v.style.left="0px";v.style.right="0px";v.style.height=l;v.style.overflow="hidden";v.style.padding=EditorUi.compactUi?"4px 0px 3px 0px": +"1px";v.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;v.style.borderWidth="1px 0px 0px 0px";v.style.borderColor="#c3c3c3";v.style.borderStyle="solid";v.style.display="block";v.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(v.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var q=l.cloneNode();q.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';mxEvent.addListener(q, +"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(u);g.removeCells([u],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(q.className="geButton mxDisabled");v.appendChild(q);var w=l.cloneNode();w.setAttribute("title", +mxUtils.trim(mxResources.get("moveSelectionTo",[""])));w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(b){if(g.isEnabled()&&!g.isSelectionEmpty()){a.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=r-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(), +0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}));c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var d=mxUtils.getOffset(w);c.popup(d.x,d.y+w.offsetHeight,null,b);a.setCurrentMenu(c)}});v.appendChild(w);var t=l.cloneNode();t.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>'; +t.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(t,"click",function(b){g.isEnabled()&&a.showDataDialog(u);mxEvent.consume(b)});g.isEnabled()||(t.className="geButton mxDisabled");v.appendChild(t);var y=l.cloneNode();y.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(y,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCell(u),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0), +a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(y.className="geButton mxDisabled");v.appendChild(y);l=l.cloneNode();l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root); +g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");v.appendChild(l);k.appendChild(v);h();g.model.addListener(mxEvent.CHANGE,function(){h()});g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,f,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){m.scrollTop=m.scrollHeight-m.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth)); b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var x=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",x);this.destroy=function(){mxEvent.removeListener(window,"resize",x);this.window.destroy()}}; (function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P"; @@ -9078,7 +9075,7 @@ k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.classNa "print":"ok"),function(){a.hideDialog();c(!0)});x.className="geBtn gePrimaryBtn";m.appendChild(x);a.editor.cancelFirst||m.appendChild(k);g.appendChild(m);this.container=g};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&& (this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible), this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var H=document.createElement("canvas"),F=new Image;F.onload=function(){try{H.getContext("2d").drawImage(F,0,0);var a=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};F.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(J){}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.0.6";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars= +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.0.7";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars= "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&& !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4, topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&& diff --git a/src/main/webapp/js/diagramly/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js index 6ccfa1fab..6436f687b 100644 --- a/src/main/webapp/js/diagramly/vsdx/importer.js +++ b/src/main/webapp/js/diagramly/vsdx/importer.js @@ -305,7 +305,7 @@ var com; var filename = zipEntry.name; var name = filename.toLowerCase(); var nameLen = name.length; - if (name.indexOf('.xml') == nameLen - 4 || name.indexOf('.xml.rels') == nameLen - 9) //xml files + if (name.indexOf('.xml') == nameLen - 4 || name.indexOf('.rels') == nameLen - 5) //xml files { filesCount++; zipEntry.async("string").then(function (str) @@ -8852,10 +8852,72 @@ var com; } else { return o1 === o2; - } })(childName, "ForeignData")) { + } })(childName, "ForeignData")) + { + function getForeignRel(elem, filename) + { + var fdChild = elem.firstChild; + + while (fdChild != null) + { + if (fdChild.nodeType == 1) + { + var fdElem = fdChild; + var grandchildName = fdElem.nodeName; + + if (grandchildName.toLowerCase() == "rel") + { + var rid = fdElem.getAttribute("r:id"); + + if (rid != null && !(rid.length === 0)) + { + var index = filename.lastIndexOf('/'); + var pre = ""; + var post = ""; + + try + { + pre = filename.substring(0, index); + post = filename.substring(index, filename.length); + } + catch (e) + { + return; + } + + var relElem = model.getRelationship(rid, pre + "/_rels" + post + ".rels"); + + if (relElem != null) + { + var target = relElem.getAttribute("Target") || ""; + var type = relElem.getAttribute("Type"); + index = target.lastIndexOf('/'); + + try + { + target = target.substring(index + 1, target.length); + } + catch (e) + { + return; + } + + return {type: type, target: target}; + } + + return; + } + } + } + fdChild = fdChild.nextSibling; + } + } + var filename = elem.ownerDocument.vsdxFileName; //was getDocumentURI() var iType = elem.getAttribute("ForeignType"); var compression = elem.getAttribute("CompressionType") || ""; + var typeTarget = null; + if ((function (o1, o2) { if (o1 && o1.equals) { return o1.equals(o2); } @@ -8885,70 +8947,66 @@ var com; } })(iType, "EnhMetaFile")) { compression = "png"; //we convert emf files to png } + else if (iType == "Object") //This is a very basic support for embedded visio objects by looking for associated image + { + typeTarget = getForeignRel(elem, filename); + + if (typeTarget.type.indexOf('/oleObject') > 0) + { + var relElem = model.getRelationship("rId1", "visio/embeddings/_rels/" + typeTarget.target + ".rels"); + + if (relElem != null) + { + var target = relElem.getAttribute("Target"); + var type = relElem.getAttribute("Type"); + + try + { + var index = target.lastIndexOf('/'); + target = target.substring(index + 1, target.length); + } + catch (e) + { + return; + } + + compression = "png"; + typeTarget = {type: type, target: target}; + } + else + { + return; + } + } + } else { return; } - var fdChild = elem.firstChild; - if (fdChild != null) { - if (fdChild != null && (fdChild.nodeType == 1)) { - var fdElem = fdChild; - var grandchildName = fdElem.nodeName; - if ((function (o1, o2) { if (o1 && o1.equals) { - return o1.equals(o2); - } - else { - return o1 === o2; - } })(grandchildName.toLowerCase(), "rel")) { - var rid = fdElem.getAttribute("r:id"); - if (rid != null && !(rid.length === 0)) { - var index = filename.lastIndexOf('/'); - var pre = ""; - var post = ""; - try { - pre = filename.substring(0, index); - post = filename.substring(index, filename.length); - } - catch (e) { - return; - } - ; - var relElem = model.getRelationship(rid, pre + "/_rels" + post + ".rels"); - if (relElem != null) { - var target = relElem.getAttribute("Target") || ""; - var type = relElem.getAttribute("Type"); - index = target.lastIndexOf('/'); - try { - target = target.substring(index + 1, target.length); - } - catch (e) { - return; - } - ; - if (type != null && (function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(type, "image")) { - this.imageData = ({}); - var iData = model.getMedia(com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder + "/media/" + target); - if (!iData) - { - /* put */ (this.imageData["iData"] = Shape.ERROR_IMAGE); - /* put */ (this.imageData["iType"] = 'svg+xml'); - } - else - { - /* put */ (this.imageData["iData"] = iData); - if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(target.toLowerCase(), ".bmp")) { - compression = "jpg"; - } - /* put */ (this.imageData["iType"] = compression); - } - } - } - else { - } - return; - } + + if (typeTarget == null) + { + typeTarget = getForeignRel(elem, filename); + } + + var type = typeTarget.type, target = typeTarget.target; + + if (type != null && (function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(type, "image")) + { + this.imageData = ({}); + var iData = model.getMedia(com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder + "/media/" + target); + if (!iData) + { + /* put */ (this.imageData["iData"] = Shape.ERROR_IMAGE); + /* put */ (this.imageData["iType"] = 'svg+xml'); + } + else + { + /* put */ (this.imageData["iData"] = iData); + if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(target.toLowerCase(), ".bmp")) { + compression = "jpg"; } + /* put */ (this.imageData["iType"] = compression); } - fdChild = fdChild.nextSibling; } } else if ((function (o1, o2) { if (o1 && o1.equals) { diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js index f8560e26f..a726d9d59 100644 --- a/src/main/webapp/js/extensions.min.js +++ b/src/main/webapp/js/extensions.min.js @@ -1,43 +1,43 @@ LucidImporter={}; -(function(){function f(a,b){function d(a,b){var d="",n=0,c=a.t;if(a.lk){var h=a.lk;null!=h.v&&0<h.v.length&&"ext"==h.v[0].tp&&(d+='<a href="'+h.v[0].url+'">',g.push("a"),n++)}if(b)if(h=a.l||{},null==c||0!=q&&q==c.v&&e==h.v)null==c&&(q&&(d+=k(),q=!1),d+='<div style="',g.push("div"),n++);else{q&&(d+=k());q=c.v;e=h.v;"ul"==c.v?(d+="<ul ",g.push("ul")):(d+="<ol ",g.push("ol"));z.push(1);d+='style="margin: 0px; text-align:'+(a.a?a.a.v:"left")+"; list-style-type:";if("hl"==c.v)d+="upper-roman";else switch(h.v){case "auto":d+= -"disc";break;case "inv":d+="circle";break;case "disc":d+="circle";break;case "trib":d+="square";break;case "square":d+="square";break;case "dash":d+="square";break;case "heart":d+="disc";break;default:d+="decimal"}d+='">'}else q&&!wa&&(d+=k(),q=!1),d+='<span style="',g.push("span"),n++;b&&null!=c&&(wa=!0,d+="<li>",g.push("li"),n++,d+='<span style="',g.push("span"),n++);a.s&&(d+="font-size:"+Math.round(.6*a.s.v)+"px;");a.c&&(c=a.c.v,null!=c&&("#"!=c.charAt(0)&&(c="#"+c),c=c.substring(0,7),d+="color:"+ -c+";"));if(a.b&&a.b.v||a.fc&&a.fc.v&&0==a.fc.v.indexOf("Bold"))d+="font-weight: bold;";a.i&&a.i.v&&(d+="font-style: italic;");a.u&&a.u.v&&(d+="text-decoration: underline;");q||(d+="text-align: "+(a.a?a.a.v:"center")+";");a.il&&(d+="margin-left: "+Math.round(.6*a.il.v-(q?21:0))+"px;");a.ir&&(d+="margin-right: "+Math.round(.6*a.ir.v)+"px;");a.mt&&(d+="margin-top: "+Math.round(.6*a.mt.v)+"px;");a.mb&&(d+="margin-bottom: "+Math.round(.6*a.mb.v)+"px;");d+='">';z.push(n);return d}function k(a,b,d,k){a= +(function(){function f(a,b){function d(a,b){var d="",n=0,c=a.t;if(a.lk){var h=a.lk;null!=h.v&&0<h.v.length&&"ext"==h.v[0].tp&&(d+='<a href="'+h.v[0].url+'">',g.push("a"),n++)}if(b)if(h=a.l||{},null==c||0!=p&&p==c.v&&e==h.v)null==c&&(p&&(d+=k(),p=!1),d+='<div style="',g.push("div"),n++);else{p&&(d+=k());p=c.v;e=h.v;"ul"==c.v?(d+="<ul ",g.push("ul")):(d+="<ol ",g.push("ol"));z.push(1);d+='style="margin: 0px; text-align:'+(a.a?a.a.v:"left")+"; list-style-type:";if("hl"==c.v)d+="upper-roman";else switch(h.v){case "auto":d+= +"disc";break;case "inv":d+="circle";break;case "disc":d+="circle";break;case "trib":d+="square";break;case "square":d+="square";break;case "dash":d+="square";break;case "heart":d+="disc";break;default:d+="decimal"}d+='">'}else p&&!wa&&(d+=k(),p=!1),d+='<span style="',g.push("span"),n++;b&&null!=c&&(wa=!0,d+="<li>",g.push("li"),n++,d+='<span style="',g.push("span"),n++);a.s&&(d+="font-size:"+Math.round(.6*a.s.v)+"px;");a.c&&(c=a.c.v,null!=c&&("#"!=c.charAt(0)&&(c="#"+c),c=c.substring(0,7),d+="color:"+ +c+";"));if(a.b&&a.b.v||a.fc&&a.fc.v&&0==a.fc.v.indexOf("Bold"))d+="font-weight: bold;";a.i&&a.i.v&&(d+="font-style: italic;");a.u&&a.u.v&&(d+="text-decoration: underline;");p||(d+="text-align: "+(a.a?a.a.v:"center")+";");a.il&&(d+="margin-left: "+Math.round(.6*a.il.v-(p?21:0))+"px;");a.ir&&(d+="margin-right: "+Math.round(.6*a.ir.v)+"px;");a.mt&&(d+="margin-top: "+Math.round(.6*a.mt.v)+"px;");a.mb&&(d+="margin-bottom: "+Math.round(.6*a.mb.v)+"px;");d+='">';z.push(n);return d}function k(a,b,d,k){a= a?a.substring(b,d):"";"\n"==a&&(a="");a=a.replace(/</g,"<").replace(/>/g,">");do for(b=z.pop(),d=0;d<b;d++){var n=g.pop();"li"==n&&(wa=!1);a+="</"+n+">"}while(k&&0<g.length);return a}for(var n=[],c=-1,f="";-1<(c=a.indexOf("\n",c+1));)n.push(c+1);b.sort(function(a,b){return a.s-b.s});for(var w={},c=[],l=0;l<b.length;l++){var y=b[l];if(null==w[y.s]){for(var A=0;A<n.length;A++)if(n[A]>y.s){w[y.s]=n[A];break}null==w[y.s]&&(w[y.s]=a.length)}null==y.e&&(y.e=w[y.s]);c.push(y)}c.sort(function(a,b){return a.e- -b.e});for(var A=l=0,n={},g=[],z=[],q=!1,e,wa=!1,y=w=0;l>=A&&(l<b.length||A<c.length);){var B=b[l],C=c[A];if(B&&C&&B.s<C.e){w=B.s;C=!1;for(0<w-y&&(f+=d(n,C)+k(a,y,w));null!=B&&B.s==w;){if("a"==B.n||"il"==B.n||"ir"==B.n||"mt"==B.n||"mb"==B.n||"t"==B.n)C=!0;n[B.n]=B;B=b[++l]}f+=d(n,C)}else if(C){y=C.e;do delete n[C.n],C=c[++A];while(null!=C&&C.e==y);f+=k(a,w,y);w=y}}return f+=k(null,null,null,!0)}function g(a){x=!1;var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!= -a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas?null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value):null==b&&null!=a.t0&&null!=a.t0.t&&(b=a.t0);if(null!=b){if(null!=b.t){a=b.t;b=b.m;try{for(var d=0;d<b.length;d++)if(0<b[d].s){x=!0;break}if(x)return f(a,b)}catch(na){console.log(na)}a=a.replace(/</g,"<");return a=a.replace(/>/g, -">")}if(null!=b.Value&&null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"<"),b.Value.t=b.Value.t.replace(/>/g,">"),b.Value.t}return""}function q(a){return null!=a.Action?a.Action:a}function e(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else{if(null!=a.m)return a.m;if(null!=a.Title&&null!=a.Title.m)return a.Title.m}return null} +b.e});for(var A=l=0,n={},g=[],z=[],p=!1,e,wa=!1,y=w=0;l>=A&&(l<b.length||A<c.length);){var B=b[l],C=c[A];if(B&&C&&B.s<C.e){w=B.s;C=!1;for(0<w-y&&(f+=d(n,C)+k(a,y,w));null!=B&&B.s==w;){if("a"==B.n||"il"==B.n||"ir"==B.n||"mt"==B.n||"mb"==B.n||"t"==B.n)C=!0;n[B.n]=B;B=b[++l]}f+=d(n,C)}else if(C){y=C.e;do delete n[C.n],C=c[++A];while(null!=C&&C.e==y);f+=k(a,w,y);w=y}}return f+=k(null,null,null,!0)}function g(a){x=!1;var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!= +a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas?null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value):null==b&&null!=a.t0&&null!=a.t0.t&&(b=a.t0);if(null!=b){if(null!=b.t){a=b.t;b=b.m;try{for(var d=0;d<b.length;d++)if(0<b[d].s){x=!0;break}if(x)return f(a,b)}catch(ma){console.log(ma)}a=a.replace(/</g,"<");return a=a.replace(/>/g, +">")}if(null!=b.Value&&null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"<"),b.Value.t=b.Value.t.replace(/>/g,">"),b.Value.t}return""}function p(a){return null!=a.Action?a.Action:a}function e(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else{if(null!=a.m)return a.m;if(null!=a.Title&&null!=a.Title.m)return a.Title.m}return null} function l(b,n){return(n?"overflow=width;html=1;":a(b)+d(b)+k(b)+w(b)+y(b)+A(b)+z(b)+B(b))+C(b)+E(b)}function c(a,d,k,n,c){var h="";null!=a&&""!=a&&";"!=a.charAt(a.length-1)&&(h=";");return h+=(c?"overflow=width;html=1;":b(mxConstants.STYLE_FONTSIZE,a,d,k,n)+b(mxConstants.STYLE_FONTCOLOR,a,d,k,n)+b(mxConstants.STYLE_FONTSTYLE,a,d,k,n)+b(mxConstants.STYLE_ALIGN,a,d,k,n)+b(mxConstants.STYLE_SPACING_LEFT,a,d,k,n)+b(mxConstants.STYLE_SPACING_RIGHT,a,d,k,n)+b(mxConstants.STYLE_SPACING_TOP,a,d,k,n)+b(mxConstants.STYLE_SPACING_BOTTOM, a,d,k,n))+b(mxConstants.STYLE_SPACING,a,d,k,n)+b(mxConstants.STYLE_VERTICAL_ALIGN,a,d,k,n)+b(mxConstants.STYLE_STROKECOLOR,a,d,k,n)+b(mxConstants.STYLE_OPACITY,a,d,k,n)+b(mxConstants.STYLE_ROUNDED,a,d,k,n)+b(mxConstants.STYLE_ROTATION,a,d,k,n)+b(mxConstants.STYLE_FLIPH,a,d,k,n)+b(mxConstants.STYLE_FLIPV,a,d,k,n)+b(mxConstants.STYLE_SHADOW,a,d,k,n)+b(mxConstants.STYLE_FILLCOLOR,a,d,k,n)+b(mxConstants.STYLE_DASHED,a,d,k,n)+b(mxConstants.STYLE_STROKEWIDTH,a,d,k,n)+b(mxConstants.STYLE_IMAGE,a,d,k,n)} function b(b,n,c,f,h){a:{if(null!=n&&null!=b){if(n.includes(";"+b+"=")){n=!0;break a}if(n.substring(0,b.length+1)==b+"="){n=!0;break a}}n=!1}if(!n)switch(b){case mxConstants.STYLE_FONTSIZE:return a(c);case mxConstants.STYLE_FONTCOLOR:return d(c);case mxConstants.STYLE_FONTSTYLE:return k(c);case mxConstants.STYLE_ALIGN:return w(c);case mxConstants.STYLE_SPACING_LEFT:return y(c);case mxConstants.STYLE_SPACING_RIGHT:return A(c);case mxConstants.STYLE_SPACING_TOP:return z(c);case mxConstants.STYLE_SPACING_BOTTOM:return B(c); case mxConstants.STYLE_SPACING:return C(c);case mxConstants.STYLE_VERTICAL_ALIGN:return E(c);case mxConstants.STYLE_STROKECOLOR:return D(c,f);case mxConstants.STYLE_OPACITY:return M(c,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&!h.style.includes("rounded")&&null!=c.Rounding&&0<c.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*c.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return b="",null!=c.Rotation&&(c=mxUtils.toDegree(parseFloat(c.Rotation)),n=!0,0!=c&&("UMLSwimLaneBlockV2"== f.Class||(0<=f.Class.indexOf("Rotated")||-90==c||270==c)&&(0<=f.Class.indexOf("Pool")||0<=f.Class.indexOf("SwimLane")))?(c+=90,h.geometry.rotate90(),n=!1):0<=mxUtils.indexOf(Pc,f.Class)?(c-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(Qc,f.Class)&&(c+=180),0!=c&&(b+="rotation="+c+";"),n||(b+="horizontal=0;")),b;case mxConstants.STYLE_FLIPH:return f=c.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=c.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return X(c);case mxConstants.STYLE_FILLCOLOR:return O(c, -f);case mxConstants.STYLE_DASHED:return ma(c);case mxConstants.STYLE_STROKEWIDTH:return ia(c);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+c.URL+";":"UserImage2Block"==f.Class&&null!=c.ImageFillProps&&null!=c.ImageFillProps.url?"image="+c.ImageFillProps.url+";":"",f}return""}function a(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function d(a){a=e(a);if(null!=a)for(var b= +f);case mxConstants.STYLE_DASHED:return na(c);case mxConstants.STYLE_STROKEWIDTH:return ia(c);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+c.URL+";":"UserImage2Block"==f.Class&&null!=c.ImageFillProps&&null!=c.ImageFillProps.url?"image="+c.ImageFillProps.url+";":"",f}return""}function a(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function d(a){a=e(a);if(null!=a)for(var b= 0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function k(a){return n(e(a))}function n(a){if(null!=a){var b=0,d=!1;if(null!=a)for(var k=0;!d&&k<a.length;){var n=a[k];"b"==n.n?null!=n.v&&n.v&&(d=!0,b+=1):"fc"==n.n&&"Bold"==n.v&&(d=!0,b+=1);k++}d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"i"==n.n&&null!=n.v&&n.v&&(d=!0,b+=2),k++;d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"u"==n.n&& null!=n.v&&n.v&&(d=!0,b+=4),k++;if(0<b)return"fontStyle="+b+";"}return""}function w(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function y(a){var b=e(a);if(null!=b)for(var d=0;d<b.length;){var k=b[d];if(null!=k.v){if("il"==k.n)return"spacingLeft="+.6*k.v+";";w(a)}d++}return""}function A(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function z(a){a=e(a); if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function B(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"===typeof a.InsetMargin?"spacing="+Math.max(0,Math.round(.6*parseInt(a.InsetMargin)))+";":""}function E(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":null!=a.Title_VAlign&&"string"=== typeof a.Title_VAlign?"verticalAlign="+a.Title_VAlign+";":nb(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function D(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":nb(mxConstants.STYLE_STROKECOLOR,ba(a.LineColor),"#000000")}function G(a){return null!=a?mxConstants.STYLE_FILLCOLOR+"="+ba(a)+";":""}function T(a){return null!=a?"swimlaneFillColor="+ba(a)+";":""}function M(a,b,d){b="";if("string"===typeof a.LineColor&&7<a.LineColor.length){var k="0x"+a.LineColor.substring(a.LineColor.length- 2,a.LineColor.length);d.style.includes("strokeOpacity")||(b+="strokeOpacity="+Math.round(parseInt(k)/2.55)+";")}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function X(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function ba(a){return a?a.substring(0,7):null}function ea(a,b){return a&&7<a.length?b+"="+Math.round(parseInt("0x"+ -a.substr(7))/2.55)+";":""}function O(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return nb(mxConstants.STYLE_FILLCOLOR,ba(a.FillColor.cs[0].c))+nb(mxConstants.STYLE_GRADIENTCOLOR,ba(a.FillColor.cs[1].c))}else return"string"===typeof a.FillColor?nb(mxConstants.STYLE_FILLCOLOR,ba(a.FillColor),"#FFFFFF"):nb(mxConstants.STYLE_FILLCOLOR,"none");return""}function ma(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle? -"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 2;":"longdash"==a.StrokeStyle?"dashed=1;dashPattern=16 6;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function ia(a){return nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(a.LineWidth)),"1")}function Z(a,b,d,k){for(var n=b,c=0;null!=k.getAttributeForCell(a,n);)c++,n=b+"_"+c;k.setAttributeForCell(a,n,null!=d?d:"")}function Fb(a,b,d,k,n,f){var h=q(b);if(null!=h){var w=Gb[h.Class]; +a.substr(7))/2.55)+";":""}function O(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return nb(mxConstants.STYLE_FILLCOLOR,ba(a.FillColor.cs[0].c))+nb(mxConstants.STYLE_GRADIENTCOLOR,ba(a.FillColor.cs[1].c))}else return"string"===typeof a.FillColor?nb(mxConstants.STYLE_FILLCOLOR,ba(a.FillColor),"#FFFFFF"):nb(mxConstants.STYLE_FILLCOLOR,"none");return""}function na(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle? +"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 2;":"longdash"==a.StrokeStyle?"dashed=1;dashPattern=16 6;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function ia(a){return nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(a.LineWidth)),"1")}function Z(a,b,d,k){for(var n=b,c=0;null!=k.getAttributeForCell(a,n);)c++,n=b+"_"+c;k.setAttributeForCell(a,n,null!=d?d:"")}function Fb(a,b,d,k,n,f){var h=p(b);if(null!=h){var w=Gb[h.Class]; null!=w&&(a.style+=w+";");w=null!=h.Properties?h.Properties:h;if(null!=w){a.value=f?"":g(w);a.style+=c(a.style,w,h,a,x);a.style.includes("strokeColor")||(a.style+=D(w,h));if(null!=w.Link&&0<w.Link.length&&"ext"==w.Link[0].tp)d.setAttributeForCell(a,"link",w.Link[0].url);else if(null!=w.Text){a:{f=e(w.Text);if(null!=f)for(h=0;h<f.length;h++)if(f[h].n=null!=f[h].v&&0<f[h].v.length&&"ext"==f[h].v[0].tp){f=f[h].v[0].url;break a}f=null}null!=f&&d.setAttributeForCell(a,"link",f)}f=[];var h=d.convertValueToString(a), l=!1;if(null!=h){for(var y=0;match=Rc.exec(h);){var A=match[0],l=!0;if(2<A.length){var z=A.substring(2,A.length-2);"documentName"==z?z="filename":"date:"==z.substring(0,5)?z="date{"+z.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==z.substring(0,9)&&(z="date{"+z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");z="%"+z+"%";f.push(h.substring(y,match.index)+(null!=z?z:A));y=match.index+A.length}}l&&(f.push(h.substring(y)),d.setAttributeForCell(a, -"label",f.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var na in w)if(w.hasOwnProperty(na)&&na.toString().startsWith("ShapeData_"))try{var B=w[na],C=mxUtils.trim(B.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Z(a,C,B.Value,d)}catch(Id){window.console&&console.log("Ignored "+na+":",Id)}if(a.edge){a.style=null!=w.Rounding&&"diagonal"!=w.Shape?a.style+("rounded=1;arcSize="+w.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=w.Shape)if(null!=w.ElbowPoints)for(a.geometry.points= -[],na=0;na<w.ElbowPoints.length;na++)a.geometry.points.push(new mxPoint(Math.round(.6*w.ElbowPoints[na].x+vb),Math.round(.6*w.ElbowPoints[na].y+wb)));else"elbow"==w.Shape?a.style=null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==w.Shape&&(a.style+="curved=1;"));null!=w.Endpoint1.Style&&(null!=xb[w.Endpoint1.Style]?a.style+= -"startArrow="+xb[w.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint1.Style));null!=w.Endpoint2.Style&&(null!=xb[w.Endpoint2.Style]?a.style+="endArrow="+xb[w.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint2.Style));B=w.ElbowControlPoints||w.Joints;if(null!=B)for(a.geometry.points=[],na=0;na<B.length;na++)C=B[na],a.geometry.points.push(new mxPoint(Math.round(.6*C.x+vb),Math.round(.6*C.y+wb))); -na=!1;null==w.ElbowPoints&&null!=w.Endpoint1.Block&&w.Endpoint1.Block==w.Endpoint2.Block&&null==w.ElbowControlPoints&&null!=k&&null!=n&&(k=new mxPoint(Math.round(k.geometry.x+k.geometry.width*w.Endpoint1.LinkX),Math.round(k.geometry.y+k.geometry.height*w.Endpoint1.LinkY)),n=new mxPoint(Math.round(n.geometry.x+n.geometry.width*w.Endpoint2.LinkX),Math.round(n.geometry.y+n.geometry.height*w.Endpoint2.LinkY)),vb=k.x==n.x?20:0,wb=0,a.geometry.points=[new mxPoint(k.x+vb,k.y+wb),new mxPoint(n.x+vb,n.y+wb)], -implicitX=k.y==n.y,na=k.x==n.x);pa(a,w.Endpoint1,!0,na);pa(a,w.Endpoint2,!1,na)}}}null!=b.id&&Z(a,"lucidchartObjectId",b.id,d)}function da(a,b){var d=q(a).Properties,d=d.BoundingBox;null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+vb),Math.round(.6*d.y+wb),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;Fb(v,a,b);if(null!=v&&0<=v.style.indexOf(";grIcon=")){var k= -new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;whiteSpace=wrap;");k.vertex=!0;var n=q(a);null!=n&&(d=null!=n.Properties?n.Properties:n,null!=d&&(k.style+=c(k.style,d,n,k)));v.geometry.x=0;v.geometry.y=0;v.style+="part=1;";k.insert(v);v=k}return v}function Va(a,b,d){var k=2*(parseFloat(a.Location)-.5);isNaN(k)&&null!=a.Text&&null!=a.Text.Location&&(k=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var c=g(a),k=new mxGeometry(isNaN(k)?0:k,0,0,0),f="11", +"label",f.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var ma in w)if(w.hasOwnProperty(ma)&&ma.toString().startsWith("ShapeData_"))try{var B=w[ma],C=mxUtils.trim(B.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Z(a,C,B.Value,d)}catch(Id){window.console&&console.log("Ignored "+ma+":",Id)}if(a.edge){a.style=null!=w.Rounding&&"diagonal"!=w.Shape?a.style+("rounded=1;arcSize="+w.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=w.Shape)if(null!=w.ElbowPoints)for(a.geometry.points= +[],ma=0;ma<w.ElbowPoints.length;ma++)a.geometry.points.push(new mxPoint(Math.round(.6*w.ElbowPoints[ma].x+vb),Math.round(.6*w.ElbowPoints[ma].y+wb)));else"elbow"==w.Shape?a.style=null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==w.Shape&&(a.style+="curved=1;"));null!=w.Endpoint1.Style&&(null!=xb[w.Endpoint1.Style]?a.style+= +"startArrow="+xb[w.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint1.Style));null!=w.Endpoint2.Style&&(null!=xb[w.Endpoint2.Style]?a.style+="endArrow="+xb[w.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint2.Style));B=w.ElbowControlPoints||w.Joints;if(null!=B)for(a.geometry.points=[],ma=0;ma<B.length;ma++)C=B[ma],a.geometry.points.push(new mxPoint(Math.round(.6*C.x+vb),Math.round(.6*C.y+wb))); +ma=!1;null==w.ElbowPoints&&null!=w.Endpoint1.Block&&w.Endpoint1.Block==w.Endpoint2.Block&&null==w.ElbowControlPoints&&null!=k&&null!=n&&(k=new mxPoint(Math.round(k.geometry.x+k.geometry.width*w.Endpoint1.LinkX),Math.round(k.geometry.y+k.geometry.height*w.Endpoint1.LinkY)),n=new mxPoint(Math.round(n.geometry.x+n.geometry.width*w.Endpoint2.LinkX),Math.round(n.geometry.y+n.geometry.height*w.Endpoint2.LinkY)),vb=k.x==n.x?20:0,wb=0,a.geometry.points=[new mxPoint(k.x+vb,k.y+wb),new mxPoint(n.x+vb,n.y+wb)], +implicitX=k.y==n.y,ma=k.x==n.x);pa(a,w.Endpoint1,!0,ma);pa(a,w.Endpoint2,!1,ma)}}}null!=b.id&&Z(a,"lucidchartObjectId",b.id,d)}function da(a,b){var d=p(a).Properties,d=d.BoundingBox;null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+vb),Math.round(.6*d.y+wb),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;Fb(v,a,b);if(null!=v&&0<=v.style.indexOf(";grIcon=")){var k= +new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;whiteSpace=wrap;");k.vertex=!0;var n=p(a);null!=n&&(d=null!=n.Properties?n.Properties:n,null!=d&&(k.style+=c(k.style,d,n,k)));v.geometry.x=0;v.geometry.y=0;v.style+="part=1;";k.insert(v);v=k}return v}function Va(a,b,d){var k=2*(parseFloat(a.Location)-.5);isNaN(k)&&null!=a.Text&&null!=a.Text.Location&&(k=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var c=g(a),k=new mxGeometry(isNaN(k)?0:k,0,0,0),f="11", w="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var w=n(a.Value.m),l=0;l<a.Value.m.length;l++)if("s"==a.Value.m[l].n)f=.6*parseFloat(a.Value.m[l].v);else if("c"==a.Value.m[l].n){var y=a.Value.m[l].v;null!=y&&("#"!=y.charAt(0)&&(y="#"+y),y=y.substring(0,7));w+="fontColor="+y+";"}a=new d(c,k,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(w+";fontSize="+f+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function nb(a,b,d,k){null!=b&&null!= k&&(b=k(b));return null!=b&&b!=d?a+"="+b+";":""}function pa(a,b,d,k,n){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(k?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(n?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function bc(a,b){try{var d=new mxCell("",new mxGeometry,"group;dropTarget=0;");d.vertex=!0;var k=Infinity,n=Infinity,c=-Infinity,f=-Infinity,w=a.Members||a.Action.Properties.Members,l;for(l in w){var y=b[l];null!=y&&(k=Math.min(k,y.geometry.x),n=Math.min(n, y.geometry.y),c=Math.max(c,y.geometry.x+y.geometry.width),f=Math.max(f,y.geometry.y+y.geometry.height));y.parent=d;d.insert(y)}d.geometry.x=k;d.geometry.y=n;d.geometry.width=c-k;d.geometry.height=f-n;for(c=0;c<d.children.length;c++){var A=d.children[c].geometry;A.x-=k;A.y-=n}return d}catch(Hd){console.log(Hd)}}function fa(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){var k=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,n=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,c;c=new mxCell("", -new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;Fb(c,b,a,k,n,!0);var h=q(b).Properties,l=null!=h?h.TextAreas:b.TextAreas;if(null!=l){for(var y=0;null!=l["t"+y];){var A=l["t"+y];c=Va(A,c);y++}for(y=0;null!=l["m"+y]||1>y;)A=l["m"+y],null!=A&&(c=Va(A,c,b)),y++;null!=l.Text&&(c=Va(l.Text,c,b));l=null!=h?h.TextAreas:b.TextAreas;null!=l.Message&&(c=Va(l.Message,c,b))}null==k&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6* +new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;Fb(c,b,a,k,n,!0);var h=p(b).Properties,l=null!=h?h.TextAreas:b.TextAreas;if(null!=l){for(var y=0;null!=l["t"+y];){var A=l["t"+y];c=Va(A,c);y++}for(y=0;null!=l["m"+y]||1>y;)A=l["m"+y],null!=A&&(c=Va(A,c,b)),y++;null!=l.Text&&(c=Va(l.Text,c,b));l=null!=h?h.TextAreas:b.TextAreas;null!=l.Message&&(c=Va(l.Message,c,b))}null==k&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6* d.Endpoint1.y)),!0);null==n&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);f.push(a.addCell(c,null,null,k,n))},f=[],w={},l=[],y=[],A=0;if(null!=b.Groups)for(var g in b.Groups){var z=b.Groups[g];z.id=g;if(1==z.Hidden&&null!=z.Members){0>mxUtils.indexOf(y,g)&&y.push(g);for(var e in z.Members)y=cc(e,b.Groups,y)}}if(null!=b.Blocks)for(g in b.Blocks)z=b.Blocks[g],z.id=g,0>mxUtils.indexOf(y,g)&&(e=!1,null!=Gb[z.Class]&&"mxCompositeShape"== -Gb[z.Class]&&(w[z.id]=dc(z,f,a),l.push(z),e=!0),e||(w[z.id]=da(z,a),l.push(z)));else{for(A=0;A<b.Objects.length;A++)z=b.Objects[A],null!=z.Action&&"mxCompositeShape"==Gb[z.Action.Class]?w[z.id]=dc(z,f,a):z.IsBlock&&null!=z.Action&&null!=z.Action.Properties&&(w[z.id]=da(z,a)),l.push(z);for(A=0;A<b.Objects.length;A++)if(z=b.Objects[A],z.IsGroup){var B=bc(z,w);B&&(w[z.id]=B,l.push(z))}}if(null!=b.Groups)try{for(g in b.Groups)if(z=b.Groups[g],z.id=g,0==z.Hidden&&null!=z.Members&&(B=bc(z,w)))w[z.id]=B, -l.push(z)}catch(Pb){console.log(Pb)}if(null!=b.Lines)for(g in b.Lines)0>mxUtils.indexOf(y,g)&&(z=b.Lines[g],z.id=g,l.push(z));l.sort(function(a,b){a=q(a);b=q(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=k?d-k:0});for(A=0;A<l.length;A++){var z=l[A],na=w[z.id];null!=na?null==na.parent&&f.push(a.addCell(na)):z.IsLine&&null!=z.Action&&null!=z.Action.Properties?h(z,z.Action.Properties):null!=z.StrokeStyle&&h(z,z)}if(n&& +Gb[z.Class]&&(w[z.id]=dc(z,f,a),l.push(z),e=!0),e||(w[z.id]=da(z,a),l.push(z)));else{for(A=0;A<b.Objects.length;A++)z=b.Objects[A],null!=z.Action&&"mxCompositeShape"==Gb[z.Action.Class]?w[z.id]=dc(z,f,a):z.IsBlock&&null!=z.Action&&null!=z.Action.Properties&&(w[z.id]=da(z,a)),l.push(z);for(A=0;A<b.Objects.length;A++)if(z=b.Objects[A],z.IsGroup){var ma=bc(z,w);ma&&(w[z.id]=ma,l.push(z))}}if(null!=b.Groups)try{for(g in b.Groups)if(z=b.Groups[g],z.id=g,0==z.Hidden&&null!=z.Members&&(ma=bc(z,w)))w[z.id]= +ma,l.push(z)}catch(Pb){console.log(Pb)}if(null!=b.Lines)for(g in b.Lines)0>mxUtils.indexOf(y,g)&&(z=b.Lines[g],z.id=g,l.push(z));l.sort(function(a,b){a=p(a);b=p(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=k?d-k:0});for(A=0;A<l.length;A++){var z=l[A],B=w[z.id];null!=B?null==B.parent&&f.push(a.addCell(B)):z.IsLine&&null!=z.Action&&null!=z.Action.Properties?h(z,z.Action.Properties):null!=z.StrokeStyle&&h(z,z)}if(n&& null!=d&&null!=k){a.isGridEnabled()&&(d=a.snap(d),k=a.snap(k));var C=a.getBoundingBoxFromGeometry(f,!0);null!=C&&a.moveCells(f,d-C.x,k-C.y)}c||a.setSelectionCells(f)}finally{a.getModel().endUpdate()}}function Oa(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function ob(a,b,d,k,n,c,f,w){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a); c=[a];d=d.clone();w.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);k.push(n.addCell(d,null,null,null,null))}function sa(a,b,d,k,n,c,f,w,l){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;l.insert(a);d=new mxCell("",new mxGeometry(d,k,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;l.insert(d);w=[d];n=n.clone();a.insertEdge(n,!0);d.insertEdge(n,!1);w.push(n);c.push(f.addCell(n,null,null,null,null))}function ga(a,b,d,k,n,f){k.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;"; k.style+=c(k.style,n,f,k);b=g(n);k.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+=c(a.style,n,f,a,x);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;k.insert(a)}function ka(a,b,d,k,n,f,w,l){n="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+ -"=";f.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";f.style+=c(f.style,w,l,f);f.value=g(w);f.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*k*b,.7*k*d),n+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*k*.35,10+(1-d)*k*.35);a.vertex=!0;a.style+=c(a.style,w,l,a,x);f.insert(a)}function dc(b,n,f){var e=q(b),h=e.Properties,Z=h.BoundingBox,t=Math.round(.6* +"=";f.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";f.style+=c(f.style,w,l,f);f.value=g(w);f.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*k*b,.7*k*d),n+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*k*.35,10+(1-d)*k*.35);a.vertex=!0;a.style+=c(a.style,w,l,a,x);f.insert(a)}function dc(b,n,f){var e=p(b),h=e.Properties,Z=h.BoundingBox,t=Math.round(.6* Z.w),r=Math.round(.6*Z.h),da=Math.round(.6*Z.x+vb),pa=Math.round(.6*Z.y+wb);null==b.Class||"GCPInputDatabase"!==b.Class&&"GCPInputRecord"!==b.Class&&"GCPInputPayment"!==b.Class&&"GCPInputGateway"!==b.Class&&"GCPInputLocalCompute"!==b.Class&&"GCPInputBeacon"!==b.Class&&"GCPInputStorage"!==b.Class&&"GCPInputList"!==b.Class&&"GCPInputStream"!==b.Class&&"GCPInputMobileDevices"!==b.Class&&"GCPInputCircuitBoard"!==b.Class&&"GCPInputLive"!==b.Class&&"GCPInputUsers"!==b.Class&&"GCPInputLaptop"!==b.Class&& "GCPInputApplication"!==b.Class&&"GCPInputLightbulb"!==b.Class&&"GCPInputGame"!==b.Class&&"GCPInputDesktop"!==b.Class&&"GCPInputDesktopAndMobile"!==b.Class&&"GCPInputWebcam"!==b.Class&&"GCPInputSpeaker"!==b.Class&&"GCPInputRetail"!==b.Class&&"GCPInputReport"!==b.Class&&"GCPInputPhone"!==b.Class&&"GCPInputBlank"!==b.Class||(r+=20);v=new mxCell("",new mxGeometry(da,pa,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;var Va=null!=b.Class?b.Class:null!=e?e.Class:null;switch(Va){case "BraceNoteBlock":case "UI2BraceNoteBlock":var bc= !1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(bc=!0);var Oa=null,fa=null;bc?(Oa=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),fa=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(Oa=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),fa=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e, @@ -107,139 +107,139 @@ new mxCell("",new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spaci new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);oa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);break;case "DetailIndicator":oa=new mxCell("",new mxGeometry(.87* t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";U=new mxCell("",new mxGeometry(0,0,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;"); U.vertex=!0;v.insert(U);U.value=g(h.text);U.style+=x?"html=1;":a(h.text)+d(h.text)+k(h.text);Ea=new mxCell("",new mxGeometry(0,.6*r,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");Ea.vertex=!0;v.insert(Ea);Ea.value=g(h["bottom-text"]);Ea.style+=x?"html=1;":a(h["bottom-text"])+d(h["bottom-text"])+k(h["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=g(h.text);v.style+=x?"":a(h.text)+d(h.text)+ -k(h.text);v.style+=c(v.style,h,e,v,x);break;case "SMPage":if(h.Group){v.style+="strokeColor=none;fillColor=none;";var p=new mxCell("",new mxGeometry(0,0,.9*t,.9*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=D(h,e)+O(h,e)+M(h,e,p)+X(h)+ia(h);var u=new mxCell("",new mxGeometry(.1*t,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=D(h,e)+O(h,e)+M(h,e,u)+X(h)+ia(h)+l(h,x);h.Future&&(p.style+="dashed=1;",u.style+="dashed=1;")}else h.Future&&(v.style+="dashed=1;"),v.value= -g(h.Text),v.style+=D(h,e)+O(h,e)+M(h,e,v)+X(h)+ia(h)+l(h,x);v.style+=c(v.style,h,e,v,x);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":p=null;switch(b.Class){case "SMHome":p=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMPrint":p=new mxCell("",new mxGeometry(.5*t-.4*r,.19*r,.8*r,.62*r),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":p=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSettings":p=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMSitemap":p=new mxCell("",new mxGeometry(.5*t-.35*r,.2*r,.7*r,.6*r),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":p=new mxCell("",new mxGeometry(.5*t-.3*r,.25*r,.6*r,.5*r),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMVideo":p=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMAudio":p=new mxCell("",new mxGeometry(.5*t-.3*r,.2*r,.6*r,.6*r),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":p=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var I=O(h,e),I=""==I?"#ffffff;":I.replace("fillColor=",""),p=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+ -I);break;case "SMCloud":p=new mxCell("",new mxGeometry(.5*t-.4*r,.27*r,.8*r,.46*r),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":p=new mxCell("",new mxGeometry(.5*t-.25*r,.15*r,.5*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":p=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); -break;case "SMGame":p=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":p=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}p.vertex=!0;v.insert(p);p.value=g(h.Text);p.style+=l(h,x);v.style+=c(v.style,h,e,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;"; -p=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "UMLConstraintBlock":var tb=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");tb.vertex=!0;v.insert(tb);var ub=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");ub.vertex= +k(h.text);v.style+=c(v.style,h,e,v,x);break;case "SMPage":if(h.Group){v.style+="strokeColor=none;fillColor=none;";var q=new mxCell("",new mxGeometry(0,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=D(h,e)+O(h,e)+M(h,e,q)+X(h)+ia(h);var u=new mxCell("",new mxGeometry(.1*t,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=D(h,e)+O(h,e)+M(h,e,u)+X(h)+ia(h)+l(h,x);h.Future&&(q.style+="dashed=1;",u.style+="dashed=1;")}else h.Future&&(v.style+="dashed=1;"),v.value= +g(h.Text),v.style+=D(h,e)+O(h,e)+M(h,e,v)+X(h)+ia(h)+l(h,x);v.style+=c(v.style,h,e,v,x);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":q=null;switch(b.Class){case "SMHome":q=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMPrint":q=new mxCell("",new mxGeometry(.5*t-.4*r,.19*r,.8*r,.62*r),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":q=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSettings":q=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMSitemap":q=new mxCell("",new mxGeometry(.5*t-.35*r,.2*r,.7*r,.6*r),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":q=new mxCell("",new mxGeometry(.5*t-.3*r,.25*r,.6*r,.5*r),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMVideo":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMAudio":q=new mxCell("",new mxGeometry(.5*t-.3*r,.2*r,.6*r,.6*r),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":q=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var I=O(h,e),I=""==I?"#ffffff;":I.replace("fillColor=",""),q=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+ +I);break;case "SMCloud":q=new mxCell("",new mxGeometry(.5*t-.4*r,.27*r,.8*r,.46*r),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":q=new mxCell("",new mxGeometry(.5*t-.25*r,.15*r,.5*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":q=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); +break;case "SMGame":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}q.vertex=!0;v.insert(q);q.value=g(h.Text);q.style+=l(h,x);v.style+=c(v.style,h,e,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;"; +q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);u=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "UMLConstraintBlock":var tb=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");tb.vertex=!0;v.insert(tb);var ub=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");ub.vertex= !0;v.insert(ub);fa=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");fa.vertex=!0;fa.value=g(h);v.insert(fa);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);tb.style+=M(h,e,tb);ub.style+=M(h,e,ub);fa.style+=d(h,fa);tb.style+=c(tb.style,h,e,tb);ub.style+=c(ub.style,h,e,ub);fa.style+=c(fa.style,h,e,fa,x);break;case "UMLTextBlock":v.value=g(h.Text);v.style+="strokeColor=none;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);break;case "BPMNActivity":v.value= -g(h.Text);switch(h.bpmnActivityType){case 1:v.style+=l(h.Text,x);break;case 2:v.style+="shape=ext;double=1;"+l(h.Text,x);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+l(h.Text,x);break;case 4:v.style+="shape=ext;strokeWidth=2;"+l(h.Text,x)}if(0!=h.bpmnTaskType){switch(h.bpmnTaskType){case 1:p=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");p.geometry.offset=new mxPoint(4,7);break;case 2:p=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");p.geometry.offset=new mxPoint(4, -7);break;case 3:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");p.geometry.offset=new mxPoint(4,5);break;case 4:p=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");p.geometry.offset=new mxPoint(4,7);break;case 5:p=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");p.geometry.offset=new mxPoint(4,7);break;case 6:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");p.geometry.offset=new mxPoint(4, -5);break;case 7:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),p.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Kb=O(h,e),I=D(h,e),I=I.replace("strokeColor","fillColor"),Kb=Kb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Kb&&(Kb="strokeColor=#ffffff;");p.style+=Kb+I+"part=1;"}else p.style+=O(h,e)+D(h,e)+"part=1;";p.geometry.relative=!0;p.vertex=!0;v.insert(p)}var uc=0;0!=h.bpmnActivityMarker1&&uc++;0!=h.bpmnActivityMarker2&&uc++; -var Fa=0;1==uc?Fa=-7.5:2==uc&&(Fa=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 2:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 3:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(Fa, --20);p.style+=O(h,e)+D(h,e);break;case 4:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 5:p=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");p.geometry.offset=new mxPoint(Fa,-17);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");p.style+=I;break;case 6:p=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"), -p.geometry.offset=new mxPoint(Fa,-18),p.style+=O(h,e)+D(h,e)}p.geometry.relative=!0;p.vertex=!0;v.insert(p)}2==uc&&(Fa=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 2:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 3:p=new mxCell("",new mxGeometry(.5, -1,15,15),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 4:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=O(h,e)+D(h,e);break;case 5:p=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");p.geometry.offset=new mxPoint(Fa,-17);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;"); -p.style+=I;break;case 6:p=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),p.geometry.offset=new mxPoint(Fa,-18),p.style+=O(h,e)+D(h,e)}p.geometry.relative=!0;p.vertex=!0;v.insert(p)}v.style+=c(v.style,h,e,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break; +g(h.Text);switch(h.bpmnActivityType){case 1:v.style+=l(h.Text,x);break;case 2:v.style+="shape=ext;double=1;"+l(h.Text,x);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+l(h.Text,x);break;case 4:v.style+="shape=ext;strokeWidth=2;"+l(h.Text,x)}if(0!=h.bpmnTaskType){switch(h.bpmnTaskType){case 1:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset=new mxPoint(4,7);break;case 2:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset=new mxPoint(4, +7);break;case 3:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");q.geometry.offset=new mxPoint(4,5);break;case 4:q=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");q.geometry.offset=new mxPoint(4,7);break;case 5:q=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");q.geometry.offset=new mxPoint(4,7);break;case 6:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");q.geometry.offset=new mxPoint(4, +5);break;case 7:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),q.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Kb=O(h,e),I=D(h,e),I=I.replace("strokeColor","fillColor"),Kb=Kb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Kb&&(Kb="strokeColor=#ffffff;");q.style+=Kb+I+"part=1;"}else q.style+=O(h,e)+D(h,e)+"part=1;";q.geometry.relative=!0;q.vertex=!0;v.insert(q)}var uc=0;0!=h.bpmnActivityMarker1&&uc++;0!=h.bpmnActivityMarker2&&uc++; +var Fa=0;1==uc?Fa=-7.5:2==uc&&(Fa=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 3:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Fa, +-20);q.style+=O(h,e)+D(h,e);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Fa,-17);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"), +q.geometry.offset=new mxPoint(Fa,-18),q.style+=O(h,e)+D(h,e)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}2==uc&&(Fa=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 3:q=new mxCell("",new mxGeometry(.5, +1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Fa,-20);q.style+=O(h,e)+D(h,e);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Fa,-17);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;"); +q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),q.geometry.offset=new mxPoint(Fa,-18),q.style+=O(h,e)+D(h,e)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}v.style+=c(v.style,h,e,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break; case 2:v.style+="outline=end;"}else switch(h.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(h.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;"; -break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=c(v.style,h,e,v,x);break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=g(h.Text);v.style=0==h.bpmnConversationType?v.style+ia(h):v.style+"strokeWidth=2;";h.bpmnIsSubConversation&&(p=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),p.geometry.offset=new mxPoint(-6, --17),p.style+=O(h,e)+D(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p));v.style+=c(v.style,h,e,v,x);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;";switch(h.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;"; -break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=c(v.style,h,e,v);break;case "BPMNData":v.style+="shape=note;size=14;";switch(h.bpmnDataType){case 1:p=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(-6,-15);p.style+=O(h,e)+D(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);break;case 2:p=new mxCell("",new mxGeometry(0, -0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");p.geometry.offset=new mxPoint(3,3);p.style+=O(h,e)+D(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";U=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");U.geometry.offset=new mxPoint(0,14);U.geometry.relative=!0;U.vertex=!0;v.insert(U);U.value=g(h.Text);U.style+=l(h,x);break;case 3:p=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"), -p.geometry.offset=new mxPoint(3,3),p.style+=D(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),p.style+=I,U=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),U.geometry.offset=new mxPoint(0,14),U.geometry.relative=!0,U.vertex=!0,v.insert(U),U.value=g(h.Text),U.style+=l(h,x)}v.style+=c(v.style,h,e,v);break;case "BPMNBlackPool":v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0, -0,t,r),"fillColor=#000000;strokeColor=none;opacity=30;");p.vertex=!0;v.insert(p);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,.95*t,.95*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.05*t,.05*r,.95*t,.95*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "GSDFDDataStoreBlock":v.value=g(h.Text); -v.style+="shape=partialRectangle;right=0;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");p.vertex=!0;v.insert(p);p.value=g(h.Number);p.style+=l(h.Number,x);p.style+=c(p.style,h,e,p,x);break;case "DefaultTableBlock":try{for(var Hb=h.RowHeights.length,Ib=h.ColWidths.length,Gc=[],vc=[],m=0;m<Hb;m++)Gc[m]=.6*h.RowHeights[m];for(Q=0;Q<Ib;Q++)vc[Q]=.6*h.ColWidths[Q];v.style="group;dropTarget=0;";var Zc=h.BandedColor1,$c=h.BandedColor2,Nd=h.BandedRows,rd=h.BandedCols, +break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=c(v.style,h,e,v,x);break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=g(h.Text);v.style=0==h.bpmnConversationType?v.style+ia(h):v.style+"strokeWidth=2;";h.bpmnIsSubConversation&&(q=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),q.geometry.offset=new mxPoint(-6, +-17),q.style+=O(h,e)+D(h,e),q.geometry.relative=!0,q.vertex=!0,v.insert(q));v.style+=c(v.style,h,e,v,x);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;";switch(h.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;"; +break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=c(v.style,h,e,v);break;case "BPMNData":v.style+="shape=note;size=14;";switch(h.bpmnDataType){case 1:q=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(-6,-15);q.style+=O(h,e)+D(h,e);q.geometry.relative=!0;q.vertex=!0;v.insert(q);break;case 2:q=new mxCell("",new mxGeometry(0, +0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");q.geometry.offset=new mxPoint(3,3);q.style+=O(h,e)+D(h,e);q.geometry.relative=!0;q.vertex=!0;v.insert(q);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";U=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");U.geometry.offset=new mxPoint(0,14);U.geometry.relative=!0;U.vertex=!0;v.insert(U);U.value=g(h.Text);U.style+=l(h,x);break;case 3:q=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"), +q.geometry.offset=new mxPoint(3,3),q.style+=D(h,e),q.geometry.relative=!0,q.vertex=!0,v.insert(q),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),q.style+=I,U=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),U.geometry.offset=new mxPoint(0,14),U.geometry.relative=!0,U.vertex=!0,v.insert(U),U.value=g(h.Text),U.style+=l(h,x)}v.style+=c(v.style,h,e,v);break;case "BPMNBlackPool":v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0, +0,t,r),"fillColor=#000000;strokeColor=none;opacity=30;");q.vertex=!0;v.insert(q);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);q=new mxCell("",new mxGeometry(0,0,.95*t,.95*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);u=new mxCell("",new mxGeometry(.05*t,.05*r,.95*t,.95*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "GSDFDDataStoreBlock":v.value=g(h.Text); +v.style+="shape=partialRectangle;right=0;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");q.vertex=!0;v.insert(q);q.value=g(h.Number);q.style+=l(h.Number,x);q.style+=c(q.style,h,e,q,x);break;case "DefaultTableBlock":try{for(var Hb=h.RowHeights.length,Ib=h.ColWidths.length,Gc=[],vc=[],m=0;m<Hb;m++)Gc[m]=.6*h.RowHeights[m];for(Q=0;Q<Ib;Q++)vc[Q]=.6*h.ColWidths[Q];v.style="group;dropTarget=0;";var Zc=h.BandedColor1,$c=h.BandedColor2,Nd=h.BandedRows,rd=h.BandedCols, Hc=h.HideH,Od=h.HideV,sd=h.TextVAlign,td=h.FillColor,ud=h.StrokeStyle;delete h.StrokeStyle;for(var Pd=ea(td,"fillOpacity"),vd=h.LineColor,Qd=ea(vd,"strokeOpacity"),pa=0,wc={},m=0;m<Hb;m++){da=0;r=Gc[m];for(Q=0;Q<Ib;Q++){var Ma=m+","+Q;if(wc[Ma])da+=vc[Q];else{for(var Ic=h["CellFill_"+Ma],ad=h["NoBand_"+Ma],Jc=h["CellSize_"+Ma],mb=h["Cell_"+Ma],wd=h["Cell_"+Ma+"_VAlign"],Rd=h["Cell_"+Ma+"_TRotation"],Sd=h["CellBorderWidthH_"+Ma],Td=h["CellBorderColorH_"+Ma],Ud=h["CellBorderStrokeStyleH_"+Ma],Vd=h["CellBorderWidthV_"+ Ma],Wd=h["CellBorderColorV_"+Ma],Xd=h["CellBorderStrokeStyleV_"+Ma],xd=Hc?Wd:Td,yd=ea(xd,"strokeOpacity"),zd=Hc?Vd:Sd,Ad=Hc?Xd:Ud,Ic=Nd&&!ad?0==m%2?Zc:rd&&!ad?0==Q%2?Zc:$c:$c:rd&&!ad?0==Q%2?Zc:$c:Ic,Yd=ea(Ic,"fillOpacity")||Pd,t=vc[Q],Bd=r,Qb=t,Ta=m+1;Ta<m+Jc.h;Ta++)if(null!=Gc[Ta]){Bd+=Gc[Ta];wc[Ta+","+Q]=!0;for(var Lb=Q+1;Lb<Q+Jc.w;Lb++)wc[Lb+","+Q]=!0}for(Ta=Q+1;Ta<Q+Jc.w;Ta++)if(null!=vc[Ta])for(Qb+=vc[Ta],wc[m+","+Ta]=!0,Lb=m+1;Lb<m+Jc.h;Lb++)wc[Lb+","+Ta]=!0;var R=new mxCell("",new mxGeometry(da, -pa,Qb,Bd),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Od?"left=0;right=0;":"")+(Hc?"top=0;bottom=0;":"")+nb(mxConstants.STYLE_FILLCOLOR,ba(Ic),ba(td))+nb(mxConstants.STYLE_STROKECOLOR,ba(xd),ba(vd))+(null!=zd?nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(zd)),"1"):"")+(yd?yd:Qd)+Yd+"verticalAlign="+(wd?wd:sd?sd:"middle")+";"+ma({StrokeStyle:Ad?Ad:ud?ud:"solid"})+(Rd?"horizontal=0;":""));R.vertex=!0;R.value=g(mb);R.style+=c(R.style,h,e,R,x)+(x?"":a(mb)+d(mb)+k(mb)+w(mb, -R)+y(mb)+A(mb)+z(mb)+B(mb))+C(mb)+E(mb);v.insert(R);da+=t}}pa+=r}}catch(Jd){}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==b.Class?v.value=g(h.Text):"VSMProductionControlBlock"==b.Class&&(v.value=g(h.Resources));v.style+=c(v.style,h,e,v,x);"VSMDedicatedProcessBlock"==b.Class&&(p=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),p.geometry.relative= -!0,p.geometry.offset=new mxPoint(4,-13),p.vertex=!0,v.insert(p),p.style+=c(p.style,h,e,p));U=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");U.vertex=!0;v.insert(U);U.value=g(h.Title);U.style+=l(h.Title,x);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);U=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");U.vertex=!0;v.insert(U); +pa,Qb,Bd),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Od?"left=0;right=0;":"")+(Hc?"top=0;bottom=0;":"")+nb(mxConstants.STYLE_FILLCOLOR,ba(Ic),ba(td))+nb(mxConstants.STYLE_STROKECOLOR,ba(xd),ba(vd))+(null!=zd?nb(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(zd)),"1"):"")+(yd?yd:Qd)+Yd+"verticalAlign="+(wd?wd:sd?sd:"middle")+";"+na({StrokeStyle:Ad?Ad:ud?ud:"solid"})+(Rd?"horizontal=0;":""));R.vertex=!0;R.value=g(mb);R.style+=c(R.style,h,e,R,x)+(x?"":a(mb)+d(mb)+k(mb)+w(mb, +R)+y(mb)+A(mb)+z(mb)+B(mb))+C(mb)+E(mb);v.insert(R);da+=t}}pa+=r}}catch(Jd){}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==b.Class?v.value=g(h.Text):"VSMProductionControlBlock"==b.Class&&(v.value=g(h.Resources));v.style+=c(v.style,h,e,v,x);"VSMDedicatedProcessBlock"==b.Class&&(q=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),q.geometry.relative= +!0,q.geometry.offset=new mxPoint(4,-13),q.vertex=!0,v.insert(q),q.style+=c(q.style,h,e,q));U=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");U.vertex=!0;v.insert(U);U.value=g(h.Title);U.style+=l(h.Title,x);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);U=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");U.vertex=!0;v.insert(U); U.value=g(h.Resource);U.style+=l(h.Resource,x);U.style+=c(U.style,h,e,U,x);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);var Ca=r,Za=parseInt(h.Cells),N=c("part=1;",h,e,v);0<Za&&(Ca/=Za);H=[];qa=[];for(m=1;m<=Za;m++)H[m]=new mxCell("",new mxGeometry(0,(m-1)* Ca,t,Ca),N),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["cell_"+m]),H[m].style+=l(h["cell_"+m],x);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);Ca=r;Za=parseInt(h.Cells);N=c("part=1;fillColor=none;",h,e,v);0<Za&&(Ca/=Za);H=[];Sa=[];for(m=1;m<=Za;m++)H[m]=new mxCell("",new mxGeometry(.5* t,(m-1)*Ca,.5*t,Ca),"shape=partialRectangle;left=0;"+N),H[m].vertex=!0,v.insert(H[m]),Sa[m]=new mxCell("",new mxGeometry(0,(m-1)*Ca,t,Ca),"strokeColor=none;fillColor=none;part=1;"),Sa[m].vertex=!0,v.insert(Sa[m]),Sa[m].value=g(h["cell_"+m]),Sa[m].style+=l(h["cell_"+m],x);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=c(v.style,h,e,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;";v.value=g(h.Text); -v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";N="shape=card;size=18;flipH=1;part=1;";p=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);p.vertex=!0;v.insert(p);p.style+= -c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);var F=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+N);F.vertex=!0;v.insert(F);F.value=g(h.Text);F.style+=c(F.style,h,e,F,x);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;"; -h.Spotfleet?(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Beanstalk? -(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.EC2?(p=new mxCell("", -new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Subnet?(p=new mxCell("",new mxGeometry(0, -0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.VPC?(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"), -p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.AWS?(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset= -new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Corporate?(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0, -20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=g(h.Title),v.style+=c(v.style,h,e,v,x));break;case "AWSElasticComputeCloudBlock2":v.style+= +v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";N="shape=card;size=18;flipH=1;part=1;";q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);q.vertex=!0;v.insert(q);q.style+= +c(q.style,h,e,q);u=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);var F=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+N);F.vertex=!0;v.insert(F);F.value=g(h.Text);F.style+=c(F.style,h,e,F,x);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;"; +h.Spotfleet?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Beanstalk? +(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.EC2?(q=new mxCell("", +new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Subnet?(q=new mxCell("",new mxGeometry(0, +0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.VPC?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"), +q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.AWS?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset= +new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Corporate?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0, +20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.value=g(h.Title),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=g(h.Title),v.style+=c(v.style,h,e,v,x));break;case "AWSElasticComputeCloudBlock2":v.style+= "strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=g(h.Title); v.style+=c(v.style,h,e,v,x);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";R=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");R.vertex=!0;v.insert(R);var ca=[R];R.style+=O(h,e);var V=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");V.geometry.relative=!0;V.edge=!0;ob(.5*t,0,V,n,f,ca,v,R);ob(.855*t,.145* r,V,n,f,ca,v,R);ob(t,.5*r,V,n,f,ca,v,R);ob(.855*t,.855*r,V,n,f,ca,v,R);ob(.5*t,r,V,n,f,ca,v,R);ob(.145*t,.855*r,V,n,f,ca,v,R);ob(0,.5*r,V,n,f,ca,v,R);ob(.145*t,.145*r,V,n,f,ca,v,R);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";R=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");R.vertex=!0;v.insert(R);ca=[R]; V=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");V.geometry.relative=!0;V.edge=!0;for(var ca=[R],xc=t/h.NumTopNodes,m=0;m<h.NumTopNodes;m++)ob(.5*xc+m*xc,0,V,n,f,ca,v,R);xc=t/h.NumBottomNodes;for(m=0;m<h.NumBottomNodes;m++)ob(.5*xc+m*xc,r,V,n,f,ca,v,R);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);h.ToggleCharge&&(v.style+="flipV=1;");break; -case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);"EIMessageChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIDatatypeChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5, -.5,.9*t,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIInvalidMessageChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIDeadLetterChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIGuaranteedDeliveryBlock"== -b.Class&&(p=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(-10,-7));p.geometry.relative=!0;p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);V=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");V.geometry.relative=!0;V.edge=!0;sa(.15*t,.25*r,.85*t,.25*r,V,n,f,ca,v,R);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; -v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,.07*r,.21*t,.86*r),"fillColor=#FFFF33;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.26*t,.09*r,.2*t,.82*r),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(1,.5,.35*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");F.geometry.relative=!0;F.geometry.offset=new mxPoint(.4* --t,-10);F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!0);u.insertEdge(K,!1);K.style+=D(h,e);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;"); -J.geometry.relative=!0;J.edge=!0;u.insertEdge(J,!0);F.insertEdge(J,!1);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var yc= +case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);"EIMessageChannelBlock"==b.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIDatatypeChannelBlock"==b.Class?(q=new mxCell("",new mxGeometry(.5, +.5,.9*t,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIInvalidMessageChannelBlock"==b.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIDeadLetterChannelBlock"==b.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIGuaranteedDeliveryBlock"== +b.Class&&(q=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(-10,-7));q.geometry.relative=!0;q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);V=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");V.geometry.relative=!0;V.edge=!0;sa(.15*t,.25*r,.85*t,.25*r,V,n,f,ca,v,R);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; +v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0,.07*r,.21*t,.86*r),"fillColor=#FFFF33;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);u=new mxCell("",new mxGeometry(.26*t,.09*r,.2*t,.82*r),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(1,.5,.35*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");F.geometry.relative=!0;F.geometry.offset=new mxPoint(.4* +-t,-10);F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;q.insertEdge(K,!0);u.insertEdge(K,!1);K.style+=D(h,e);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;"); +J.geometry.relative=!0;J.edge=!0;u.insertEdge(J,!0);F.insertEdge(J,!1);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);for(var yc= h.Messages,bd=(r-17)/yc,u=[],V=[],m=0;m<yc;m++){var zc=bd*(m+1)-3;u[m]=new mxCell("",new mxGeometry(t-20,zc,20,20),"part=1;");u[m].vertex=!0;v.insert(u[m]);switch(b.Class){case "EIMessageBlock":u[m].value=g(h["message_"+(m+1)]);u.style+=l(h["message_"+(m+1)],x);break;case "EICommandMessageBlock":u[m].value="C";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":u[m].value="D";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":u[m].value="E",u[m].style+= -"fontStyle=1;fontSize=11;"}u[m].style+=c(u[m].style,h,e,u[m]);V[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");V[m].geometry.relative=!0;V[m].edge=!0;p.insertEdge(V[m],!1);u[m].insertEdge(V[m],!0);V[m].style+=c(V[m].style,h,e,V[m]);var Bb=[];Bb.push(new mxPoint(da+8.5,pa+zc+10));V[m].geometry.points=Bb;n.push(f.addCell(V[m],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; -v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);V=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");V.geometry.relative=!0;V.edge=!0;sa(0,.5*r,.4*t,.5*r,V,n,f,ca,v,R);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; +"fontStyle=1;fontSize=11;"}u[m].style+=c(u[m].style,h,e,u[m]);V[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");V[m].geometry.relative=!0;V[m].edge=!0;q.insertEdge(V[m],!1);u[m].insertEdge(V[m],!0);V[m].style+=c(V[m].style,h,e,V[m]);var Bb=[];Bb.push(new mxPoint(da+8.5,pa+zc+10));V[m].geometry.points=Bb;n.push(f.addCell(V[m],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; +v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);V=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");V.geometry.relative=!0;V.edge=!0;sa(0,.5*r,.4*t,.5*r,V,n,f,ca,v,R);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;sa(.05*t,.5*r,.85*t,.5*r,K,n,f,ca,v,R);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.05*t,.5*r,.85*t,.15* r,J,n,f,ca,v,R);var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");S.geometry.relative=!0;S.edge=!0;sa(.05*t,.5*r,.85*t,.85*r,S,n,f,ca,v,R);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); K.geometry.relative=!0;K.edge=!0;K.style+=D(h,e);sa(.05*t,.5*r,.95*t,.5*r,K,n,f,ca,v,R);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");J.geometry.relative=!0;J.edge=!0;J.style+=D(h,e);sa(.3*t,.1*r,.3*t,.5*r,J,n,f,ca,v,R);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); S.geometry.relative=!0;S.edge=!0;S.style+=D(h,e);sa(.7*t,.1*r,.7*t,.5*r,S,n,f,ca,v,R);var la=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");la.geometry.relative=!0;la.edge=!0;la.style+=D(h,e);sa(.5*t,.5*r,.5*t,.9*r,la,n,f,ca,v,R);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v, -x);p=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;sa(.45*t,.33*r,.8*t,.33*r,K,n,f,ca,v,R);u=new mxCell("",new mxGeometry(.64*t,.55*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);J= -new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.55*t,.67*r,.2*t,.67*r,J,n,f,ca,v,R);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");p.vertex=!0;v.insert(p);p.style+= -c(p.style,h,e,p);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.04*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.2*t,.56*r,.2*t,.32*r),"part=1;");u.vertex=!0;v.insert(u);u.value="A";u.style+="fontStyle=1;fontSize=11;";p.style+=c(p.style,h,e,p);K=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!1);u.insertEdge(K,!0);K.style+=c(K.style,h,e,K);Bb=[];Bb.push(new mxPoint(da+.13*t,pa+.72*r));K.geometry.points=Bb;n.push(f.addCell(K,null,null,null,null));F=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");F.vertex=!0;v.insert(F);F.style+=D(h,e)+ia(h);F.style+=c(F.style,h,e,F);P=new mxCell("",new mxGeometry(.76* -t,.56*r,.2*t,.32*r),"part=1;");P.vertex=!0;v.insert(P);P.style+=D(h,e)+M(h,e,P)+ia(h)+ma(h);P.value="B";P.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";P.style+=c(P.style,h,e,P);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;F.insertEdge(J,!1);P.insertEdge(J,!0);J.style+=c(J.style,h,e,J);var Cd=[];Cd.push(new mxPoint(da+.69*t,pa+.72*r));J.geometry.points=Cd;n.push(f.addCell(J, -null,null,null,null));S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");S.geometry.relative=!0;S.edge=!0;p.insertEdge(S,!1);F.insertEdge(S,!0);S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("1",new mxGeometry(.2*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;"); -p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("2",new mxGeometry(.45*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.geometry.points= +x);q=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;sa(.45*t,.33*r,.8*t,.33*r,K,n,f,ca,v,R);u=new mxCell("",new mxGeometry(.64*t,.55*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);J= +new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.55*t,.67*r,.2*t,.67*r,J,n,f,ca,v,R);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");q.vertex=!0;v.insert(q);q.style+= +c(q.style,h,e,q);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.04*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);u=new mxCell("",new mxGeometry(.2*t,.56*r,.2*t,.32*r),"part=1;");u.vertex=!0;v.insert(u);u.value="A";u.style+="fontStyle=1;fontSize=11;";q.style+=c(q.style,h,e,q);K=new mxCell("",new mxGeometry(0, +0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");K.geometry.relative=!0;K.edge=!0;q.insertEdge(K,!1);u.insertEdge(K,!0);K.style+=c(K.style,h,e,K);Bb=[];Bb.push(new mxPoint(da+.13*t,pa+.72*r));K.geometry.points=Bb;n.push(f.addCell(K,null,null,null,null));F=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");F.vertex=!0;v.insert(F);F.style+=D(h,e)+ia(h);F.style+=c(F.style,h,e,F);P=new mxCell("",new mxGeometry(.76* +t,.56*r,.2*t,.32*r),"part=1;");P.vertex=!0;v.insert(P);P.style+=D(h,e)+M(h,e,P)+ia(h)+na(h);P.value="B";P.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";P.style+=c(P.style,h,e,P);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;F.insertEdge(J,!1);P.insertEdge(J,!0);J.style+=c(J.style,h,e,J);var Cd=[];Cd.push(new mxPoint(da+.69*t,pa+.72*r));J.geometry.points=Cd;n.push(f.addCell(J, +null,null,null,null));S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");S.geometry.relative=!0;S.edge=!0;q.insertEdge(S,!1);F.insertEdge(S,!0);S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("1",new mxGeometry(.2*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;"); +q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);u=new mxCell("2",new mxGeometry(.45*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");q.insertEdge(K,!1);u.insertEdge(K,!0);K.geometry.points= [new mxPoint(da+.375*t,pa+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");u.insertEdge(J,!1);F.insertEdge(J,!0);J.geometry.points=[new mxPoint(da+.675*t,pa+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; -v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.38*t,.42*r,.24*t,.16*r),"part=1;fillColor=#aefe7d;");p.vertex=!0;v.insert(p);p.style+= -c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(.76*t,.23*r,.24*t,.16*r),"");F.vertex=!0;v.insert(F);F.style=u.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=u.style;var Kc=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Kc.vertex=!0;v.insert(Kc);Kc.style=u.style;var Lc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),""); -Lc.vertex=!0;v.insert(Lc);Lc.style=u.style;var Mc=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");Mc.vertex=!0;v.insert(Mc);Mc.style=u.style;K=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(J,!1);F.insertEdge(J,!0);J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null)); -S=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(S,!1);P.insertEdge(S,!0);S.edge=!0;S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));la=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(la,!1);Kc.insertEdge(la,!0);la.edge=!0;la.style+=c(la.style,h,e,la);n.push(f.addCell(la,null,null,null,null));var Cb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(Cb,!1);Lc.insertEdge(Cb,!0);Cb.edge=!0;Cb.style+= -c(Cb.style,h,e,Cb);n.push(f.addCell(Cb,null,null,null,null));var Db=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(Db,!1);Mc.insertEdge(Db,!0);Db.edge=!0;Db.style+=c(Db.style,h,e,Db);n.push(f.addCell(Db,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;"); -K.geometry.relative=!0;K.edge=!0;sa(.05*t,.5*r,.6*t,.25*r,K,n,f,ca,v,R);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.05*t,.5*r,.6*t,.75*r,J,n,f,ca,v,R);p=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; -v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);F=new mxCell("", -new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S.geometry.relative=!0;S.edge=!0;p.insertEdge(S,!1);F.insertEdge(S,!0);S.style+=c(S.style,h,e,S);S.geometry.points=[new mxPoint(da+8.5,pa+40)];n.push(f.addCell(S,null,null,null,null));P=new mxCell("",new mxGeometry(t-45,r-20,20, -20),"part=1;");P.vertex=!0;v.insert(P);P.value=g(h.message_0);P.style+=l(h.message_0,x);P.style+=c(P.style,h,e,P,x);la=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");la.geometry.relative=!0;la.edge=!0;p.insertEdge(la,!1);P.insertEdge(la,!0);la.style+=c(la.style,h,e,la);la.geometry.points=[new mxPoint(da+8.5,pa+r-10)];n.push(f.addCell(la,null,null,null,null));yc=h.HistoryMessages;bd=(r-75)/yc;u=[];V=[];for(m=0;m<yc;m++)zc= +v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.38*t,.42*r,.24*t,.16*r),"part=1;fillColor=#aefe7d;");q.vertex=!0;v.insert(q);q.style+= +c(q.style,h,e,q);u=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(.76*t,.23*r,.24*t,.16*r),"");F.vertex=!0;v.insert(F);F.style=u.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=u.style;var Kc=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Kc.vertex=!0;v.insert(Kc);Kc.style=u.style;var Lc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),""); +Lc.vertex=!0;v.insert(Lc);Lc.style=u.style;var Mc=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");Mc.vertex=!0;v.insert(Mc);Mc.style=u.style;K=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(K,!1);u.insertEdge(K,!0);K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(J,!1);F.insertEdge(J,!0);J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null)); +S=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(S,!1);P.insertEdge(S,!0);S.edge=!0;S.style+=c(S.style,h,e,S);n.push(f.addCell(S,null,null,null,null));la=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(la,!1);Kc.insertEdge(la,!0);la.edge=!0;la.style+=c(la.style,h,e,la);n.push(f.addCell(la,null,null,null,null));var Cb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(Cb,!1);Lc.insertEdge(Cb,!0);Cb.edge=!0;Cb.style+= +c(Cb.style,h,e,Cb);n.push(f.addCell(Cb,null,null,null,null));var Db=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(Db,!1);Mc.insertEdge(Db,!0);Db.edge=!0;Db.style+=c(Db.style,h,e,Db);n.push(f.addCell(Db,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;"); +K.geometry.relative=!0;K.edge=!0;sa(.05*t,.5*r,.6*t,.25*r,K,n,f,ca,v,R);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;sa(.05*t,.5*r,.6*t,.75*r,J,n,f,ca,v,R);q=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; +v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);F=new mxCell("", +new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S.geometry.relative=!0;S.edge=!0;q.insertEdge(S,!1);F.insertEdge(S,!0);S.style+=c(S.style,h,e,S);S.geometry.points=[new mxPoint(da+8.5,pa+40)];n.push(f.addCell(S,null,null,null,null));P=new mxCell("",new mxGeometry(t-45,r-20,20, +20),"part=1;");P.vertex=!0;v.insert(P);P.value=g(h.message_0);P.style+=l(h.message_0,x);P.style+=c(P.style,h,e,P,x);la=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");la.geometry.relative=!0;la.edge=!0;q.insertEdge(la,!1);P.insertEdge(la,!0);la.style+=c(la.style,h,e,la);la.geometry.points=[new mxPoint(da+8.5,pa+r-10)];n.push(f.addCell(la,null,null,null,null));yc=h.HistoryMessages;bd=(r-75)/yc;u=[];V=[];for(m=0;m<yc;m++)zc= bd*(m+1)+30,u[m]=new mxCell("",new mxGeometry(t-20,zc,20,20),"part=1;"),u[m].vertex=!0,u[m].value=g(h["message_"+(m+1)]),u.style+=l(h["message_"+(m+1)],x),v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m],x),V[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),V[m].geometry.relative=!0,V[m].edge=!0,F.insertEdge(V[m],!1),u[m].insertEdge(V[m],!0),V[m].style+=c(V[m].style,h,e,V[m]),Bb=[],Bb.push(new mxPoint(da+t-30,pa+zc+ -10)),V[m].geometry.points=Bb,n.push(f.addCell(V[m],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");p.vertex= -!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var u=[],Dd=.02*t,cd=(t-2*Dd)/h.LightCount,Ed=.8*cd,m=0;m<h.LightCount;m++)u[m]=new mxCell("",new mxGeometry(Dd+cd*m+(cd-Ed)/2,.25*r,Ed,.75*r),"part=1;shape=ellipse;"),u[m].vertex=!0,v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);for(var p=[],Fd=t/h.SinkCount,m=0;m<h.SinkCount;m++)p[m]=new mxCell("",new mxGeometry(Fd*m,0,Fd,r),"part=1;shape=mxgraph.floorplan.sink_2;"), -p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ga=.1*t/h.StallCount,p=new mxCell("",new mxGeometry(0,0,Ga,r),"fillColor=#000000;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var Na=(t-Ga)/h.StallCount,dd=[],Ac=[],Bc=[],Cc=[],I=D(h,e),I=""==I?"#000000;":I.replace("stokreColor=",""),Nc="part=1;fillColor="+I,Nc=Nc+c(Nc,h,e,v),ed=c("",h,e,v),m=0;m<h.StallCount;m++)dd[m]=new mxCell("",new mxGeometry((m+ +10)),V[m].geometry.points=Bb,n.push(f.addCell(V[m],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);q=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");q.vertex= +!0;v.insert(q);q.style+=c(q.style,h,e,q);for(var u=[],Dd=.02*t,cd=(t-2*Dd)/h.LightCount,Ed=.8*cd,m=0;m<h.LightCount;m++)u[m]=new mxCell("",new mxGeometry(Dd+cd*m+(cd-Ed)/2,.25*r,Ed,.75*r),"part=1;shape=ellipse;"),u[m].vertex=!0,v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);for(var q=[],Fd=t/h.SinkCount,m=0;m<h.SinkCount;m++)q[m]=new mxCell("",new mxGeometry(Fd*m,0,Fd,r),"part=1;shape=mxgraph.floorplan.sink_2;"), +q[m].vertex=!0,v.insert(q[m]),q[m].style+=c(q[m].style,h,e,q[m]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ga=.1*t/h.StallCount,q=new mxCell("",new mxGeometry(0,0,Ga,r),"fillColor=#000000;part=1;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);for(var Na=(t-Ga)/h.StallCount,dd=[],Ac=[],Bc=[],Cc=[],I=D(h,e),I=""==I?"#000000;":I.replace("stokreColor=",""),Nc="part=1;fillColor="+I,Nc=Nc+c(Nc,h,e,v),ed=c("",h,e,v),m=0;m<h.StallCount;m++)dd[m]=new mxCell("",new mxGeometry((m+ 1)*Na,0,Ga,r),Nc),dd[m].vertex=!0,v.insert(dd[m]),Bc[m]=new mxCell("",new mxGeometry(Ga+m*Na+.05*(Na-Ga),r-.92*(Na-Ga),.9*(Na-Ga),.92*(Na-Ga)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Bc[m].vertex=!0,v.insert(Bc[m]),Bc[m].style+=ed,Ac[m]=new mxCell("",new mxGeometry(Ga+m*Na+.2*(Na-Ga),0,.6*(Na-Ga),.8*(Na-Ga)),"shape=mxgraph.floorplan.toilet;part=1;"),Ac[m].vertex=!0,v.insert(Ac[m]),Ac[m].style+=ed,Cc[m]=new mxCell("",new mxGeometry(Ga+m*Na,.42*r,.15*(Na-Ga),.12*(Na-Ga)),"part=1;"),Cc[m].vertex= !0,v.insert(Cc[m]),Cc[m].style+=ed;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Ua="edgeStyle=none;endArrow=none;part=1;";Ua.style+=c(Ua.style,h,e,Ua);var I=D(h,e),I=""==I?"#000000;":I.replace("strokeColor=",""),Eb="shape=triangle;part=1;fillColor="+I,Eb=Eb+c(Eb,h,e,v),K=new mxCell("",new mxGeometry(0,0,0,0),Ua);K.geometry.relative=!0;K.edge=!0;sa(0,.5*r,.65*t,.5*r,K,n,f,ca,v,R);for(var L=r/h.numLines,J=[],Mb=[],m=0;m<h.numLines;m++)J[m]=new mxCell("",new mxGeometry(0, 0,0,0),Ua),J[m].geometry.relative=!0,J[m].edge=!0,sa(.65*t,.5*r,.96*t,(m+.5)*L,J[m],n,f,ca,v,R),Mb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),Eb),Mb[m].vertex=!0,v.insert(Mb[m]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Ua="edgeStyle=none;endArrow=none;part=1;";Ua.style+=c(Ua.style,h,e,Ua);I=D(h,e);I=""==I?"#000000;":I.replace("strokeColor=","");Eb="shape=triangle;part=1;fillColor="+I;Eb+=c(Eb,h,e,v);L=r/h.numLines;J=[];Mb=[];for(m=0;m<h.numLines;m++)J[m]= new mxCell("",new mxGeometry(0,0,0,0),Ua),J[m].geometry.relative=!0,J[m].edge=!0,sa(0,(m+.5)*L,.96*t,(m+.5)*L,J[m],n,f,ca,v,R),Mb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),Eb),Mb[m].vertex=!0,v.insert(Mb[m]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);switch(h.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+= c(v.style,h,e,v,x);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);1==h.peakedRoof&&0==h.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==h.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=c(v.style,h,e,v,x);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style=0==h.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+ -"shape=mxgraph.pid.vessels.tank;";v.style+=c(v.style,h,e,v,x);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,.2*r,t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=N;p.style+=c(p.style,h,e,p);N="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge= -!0,K.style+=N,K.style+=c(K.style,h,e,K),sa(0,0,0,.2*r,K,n,f,ca,v,R),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=c(J.style,h,e,J),sa(t,.67*r,t,r,J,n,f,ca,v,R)):(p.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=N,K.style+=c(K.style,h,e,K),sa(0,0,0,.33*r,K,n,f,ca,v,R),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=c(J.style,h,e,J),sa(t,.8*r,t, -r,J,n,f,ca,v,R));1==h.centerLineType&&(S=new mxCell("",new mxGeometry(0,0,0,0),""),S.geometry.relative=!0,S.edge=!0,S.style+=N,S.style+=c(S.style,h,e,S),sa(.2*t,.5*r,.8*t,.5*r,S,n,f,ca,v,R));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(b.Class){case "PEIndicatorBlock":v.style+= +"shape=mxgraph.pid.vessels.tank;";v.style+=c(v.style,h,e,v,x);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0,.2*r,t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");q.vertex=!0;v.insert(q);q.style+=N;q.style+=c(q.style,h,e,q);N="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge= +!0,K.style+=N,K.style+=c(K.style,h,e,K),sa(0,0,0,.2*r,K,n,f,ca,v,R),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=c(J.style,h,e,J),sa(t,.67*r,t,r,J,n,f,ca,v,R)):(q.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=N,K.style+=c(K.style,h,e,K),sa(0,0,0,.33*r,K,n,f,ca,v,R),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=c(J.style,h,e,J),sa(t,.8*r,t, +r,J,n,f,ca,v,R));1==h.centerLineType&&(S=new mxCell("",new mxGeometry(0,0,0,0),""),S.geometry.relative=!0,S.edge=!0,S.style+=N,S.style+=c(S.style,h,e,S),sa(.2*t,.5*r,.8*t,.5*r,S,n,f,ca,v,R));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");q.vertex=!0;v.insert(q);q.style+=c(q.style,h,e,q);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(b.Class){case "PEIndicatorBlock":v.style+= "shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=c(v.style,h,e,v);"PEIndicator2Block"== -b.Class||"PESharedIndicator2Block"==b.Class?(p=new mxCell("",new mxGeometry(0,0,t,.5*t),"part=1;strokeColor=none;fillColor=none;"),p.vertex=!0,v.insert(p),p.value=g(h.TopText),p.style+=l(h.TopText,x),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(p=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),p.vertex=!0,v.insert(p),p.value=g(h.TopText),p.style+=l(h.TopText,x),p.style+=c(p.style,h,e,p,x), +b.Class||"PESharedIndicator2Block"==b.Class?(q=new mxCell("",new mxGeometry(0,0,t,.5*t),"part=1;strokeColor=none;fillColor=none;"),q.vertex=!0,v.insert(q),q.value=g(h.TopText),q.style+=l(h.TopText,x),q.style+=c(q.style,h,e,q,x),u=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(q=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),q.vertex=!0,v.insert(q),q.value=g(h.TopText),q.style+=l(h.TopText,x),q.style+=c(q.style,h,e,q,x), u=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));u.vertex=!0;v.insert(u);u.value=g(h.BotText);u.style+=l(h.BotText,x);u.style+=c(u.style,h,e,u,x);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var fd= -!1;"PEPoweredValveBlock"==b.Class?1!=h.poweredHandOperated&&(fd=!0):1!=h.handOperated&&(fd=!0);if(fd){var h=q(b).Properties,Z=h.BoundingBox,Zd=Z.h;Z.h="PEAngleValveBlock"==b.Class||"PEAngleGlobeValveBlock"==b.Class?.7*Z.h:.6*Z.h;v=new mxCell("",new mxGeometry(Math.round(.6*Z.x+vb),Math.round(.6*(Z.y+Zd-Z.h)+wb),Math.round(.6*Z.w),Math.round(.6*Z.h)),"");v.vertex=!0;Fb(v,b,f)}if("PEPoweredValveBlock"==b.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;", -v.style+=c(v.style,h,e,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",p=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35*r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),p.vertex=!0,v.insert(p),p.value=g(h.PoweredText),p.style+=(x?"":"fontSize=6;"+d(h.PoweredText)+k(h.PoweredText)+w(h.PoweredText)+y(h.PoweredText)+A(h.PoweredText)+B(h.PoweredText)+C(h.PoweredText))+E(h.PoweredText),p.style+=c(p.style,h,e,p,x)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;"; +!1;"PEPoweredValveBlock"==b.Class?1!=h.poweredHandOperated&&(fd=!0):1!=h.handOperated&&(fd=!0);if(fd){var h=p(b).Properties,Z=h.BoundingBox,Zd=Z.h;Z.h="PEAngleValveBlock"==b.Class||"PEAngleGlobeValveBlock"==b.Class?.7*Z.h:.6*Z.h;v=new mxCell("",new mxGeometry(Math.round(.6*Z.x+vb),Math.round(.6*(Z.y+Zd-Z.h)+wb),Math.round(.6*Z.w),Math.round(.6*Z.h)),"");v.vertex=!0;Fb(v,b,f)}if("PEPoweredValveBlock"==b.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;", +v.style+=c(v.style,h,e,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",q=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35*r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),q.vertex=!0,v.insert(q),q.value=g(h.PoweredText),q.style+=(x?"":"fontSize=6;"+d(h.PoweredText)+k(h.PoweredText)+w(h.PoweredText)+y(h.PoweredText)+A(h.PoweredText)+B(h.PoweredText)+C(h.PoweredText))+E(h.PoweredText),q.style+=c(q.style,h,e,q,x)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;"; v.value=g(h.Text);switch(b.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==h.handOperated&&(v.style+="actuator=man;")}v.style+=c(v.style,h,e,v,x);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1, 0,20,r-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,110),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=c(v.style,h,e,v);break;case "UI2WindowBlock":v.value=g(h.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(x?"":a(h.Title)+d(h.Title)+k(h.Title));1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): new mxCell("",new mxGeometry(1,0,20,r-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,30),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), -P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=c(v.style,h,e,v,x);break;case "UI2DialogBlock":v.value=g(h.Text);v.style+=l(h.Text,x);p=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");p.vertex=!0;v.insert(p);p.value=g(h.Title);p.style+=l(h.Title,x);p.style+=c(p.style,h,e,p,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative=!0;u.geometry.offset= -new mxPoint(-25,-10);u.vertex=!0;p.insert(u);1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,30),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("", -new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=c(v.style,h,e,v);break;case "UI2AccordionBlock":p=[];L=25;for(m=0;m<=h.Panels-1;m++)p[m]=m<h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"): -m==h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,r-(h.Panels-h.Selected)*L+(m-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Panel_"+(m+1)]),p[m].style+=l(h["Panel_"+(m+1)],x),0>p[m].style.indexOf(";align=")&&(p[m].style+="align=left;spacingLeft=5;");var ja=D(h,e),ja=ja.replace("strokeColor","fillColor2");""==ja&&(ja="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("", +P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=c(v.style,h,e,v,x);break;case "UI2DialogBlock":v.value=g(h.Text);v.style+=l(h.Text,x);q=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");q.vertex=!0;v.insert(q);q.value=g(h.Title);q.style+=l(h.Title,x);q.style+=c(q.style,h,e,q,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative=!0;u.geometry.offset= +new mxPoint(-25,-10);u.vertex=!0;q.insert(u);1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,30),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("", +new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=c(v.style,h,e,v);break;case "UI2AccordionBlock":q=[];L=25;for(m=0;m<=h.Panels-1;m++)q[m]=m<h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"): +m==h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,r-(h.Panels-h.Selected)*L+(m-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["Panel_"+(m+1)]),q[m].style+=l(h["Panel_"+(m+1)],x),0>q[m].style.indexOf(";align=")&&(q[m].style+="align=left;spacingLeft=5;");var ja=D(h,e),ja=ja.replace("strokeColor","fillColor2");""==ja&&(ja="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("", new mxGeometry(1,0,20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,h.Selected*L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ja,u.style+=c(u.style,h,e,u));1==h.hScroll&& (F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20-(h.Panels-h.Selected)*L),F.vertex=!0,v.insert(F),F.style+=ja,F.style+=c(F.style,h,e,F));P=1==h.vScroll?new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-20-(h.Panels-h.Selected)*L), -"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;");P.vertex=!0;v.insert(P);P.value=g(h.Content_1);P.style+=l(h.Content_1,x);!x&&0>P.style.indexOf(";align=")&&(P.style+="align=left;spacingLeft=5;");v.style+=c(v.style,h,e,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var p=[],u=[],L=25,Ja=3,W=(t+Ja)/(h.Tabs+1),ta=new mxCell("",new mxGeometry(0, -L,t,r-L),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=c(ta.style,h,e,ta);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(10+m*W,0,W-Ja,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(10+m*W,0,W-Ja,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,W-Ja,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+= +"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;");P.vertex=!0;v.insert(P);P.value=g(h.Content_1);P.style+=l(h.Content_1,x);!x&&0>P.style.indexOf(";align=")&&(P.style+="align=left;spacingLeft=5;");v.style+=c(v.style,h,e,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var q=[],u=[],L=25,Ja=3,W=(t+Ja)/(h.Tabs+1),ta=new mxCell("",new mxGeometry(0, +L,t,r-L),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=c(ta.style,h,e,ta);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(10+m*W,0,W-Ja,L),""),u[m].vertex=!0,v.insert(u[m])):(q[m]=new mxCell("",new mxGeometry(10+m*W,0,W-Ja,L),"strokeColor=none;"),q[m].vertex=!0,v.insert(q[m]),q[m].style+=q[m].style+=c(q[m].style,h,e,q[m]),u[m]=new mxCell("",new mxGeometry(0,0,W-Ja,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,q[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+= l(h["Tab_"+(m+1)],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ja=D(h,e);ja=ja.replace("strokeColor","fillColor2");""==ja&&(ja="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"), u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ja,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+= -ja,F.style+=c(F.style,h,e,F));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";p=[];u=[];L=25;Ja=3;W=(t+Ja)/h.Tabs;ta=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=c(ta.style,h,e,ta);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*W,0,W-Ja,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(m*W,0,W-Ja,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style, -h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,W-Ja,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;");ja=D(h,e);ja=ja.replace("strokeColor","fillColor2");""==ja&&(ja="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): +ja,F.style+=c(F.style,h,e,F));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];u=[];L=25;Ja=3;W=(t+Ja)/h.Tabs;ta=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=c(ta.style,h,e,ta);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*W,0,W-Ja,L),""),u[m].vertex=!0,v.insert(u[m])):(q[m]=new mxCell("",new mxGeometry(m*W,0,W-Ja,L),"strokeColor=none;"),q[m].vertex=!0,v.insert(q[m]),q[m].style+=c(q[m].style, +h,e,q[m]),u[m]=new mxCell("",new mxGeometry(0,0,W-Ja,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,q[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;");ja=D(h,e);ja=ja.replace("strokeColor","fillColor2");""==ja&&(ja="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ja,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), -F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ja,F.style+=c(F.style,h,e,F));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";p=[];u=[];Ja=3;L=25+Ja;W=80;rb=10;ta=new mxCell("",new mxGeometry(W,0,t-W,r),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=c(ta.style,h,e,ta);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,rb+m*L,W,L-Ja),""),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]), -u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x)):(p[m]=new mxCell("",new mxGeometry(0,rb+m*L,W,L-Ja),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,W,L-Ja),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x)),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ja= +F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ja,F.style+=c(F.style,h,e,F));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];u=[];Ja=3;L=25+Ja;W=80;rb=10;ta=new mxCell("",new mxGeometry(W,0,t-W,r),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=c(ta.style,h,e,ta);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,rb+m*L,W,L-Ja),""),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]), +u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x)):(q[m]=new mxCell("",new mxGeometry(0,rb+m*L,W,L-Ja),"strokeColor=none;"),q[m].vertex=!0,v.insert(q[m]),q[m].style+=c(q[m].style,h,e,q[m]),u[m]=new mxCell("",new mxGeometry(0,0,W,L-Ja),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,q[m].insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x)),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ja= D(h,e);ja=ja.replace("strokeColor","fillColor2");""==ja&&(ja="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,0),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+= ja,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(W,1,t-20-W,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(W,1,t-W,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ja,F.style+=c(F.style,h,e,F));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options; -p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"), -u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";W=t/h.Options;p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(m*W,.5*r-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e, -p[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), -p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected&&h.Selected==m+1&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";W=t/h.Options;p=[];u= -[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(m*W,.5*r-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected&&h.Selected==m+1&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"), -u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==b.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*h.ScrollVal+";";v.style+=c(v.style,h,e,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";p=new mxCell("",new mxGeometry(0,0,.6*t,r),"part=1;");p.vertex=!0;v.insert(p); -p.value=g(h.Date);p.style+=l(h.Date,x);v.style+=c(v.style,h,e,v);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");u=new mxCell("",new mxGeometry(.75*t,0,.25*t,r),"part=1;shape=mxgraph.gmdl.calendar;");u.vertex=!0;v.insert(u);u.style+=I;u.style+=c(u.style,h,e,u);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(h.Search)+d(h.Search)+k(h.Search);v.value=g(h.Search);v.style+=c(v.style,h,e,v,x);break; -case "UI2NumericStepperBlock":I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+I+a(h.Number)+d(h.Number)+k(h.Number);v.value=g(h.Number);v.style+=c(v.style,h,e,v,x);break;case "UI2ButtonBarBlock":v.style+=c(v.style,h,e,v);p=[];u=[];W=t/h.Buttons;for(m=0;m<=h.Buttons-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),""), -u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,W,r),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Button_"+(m+1)]),u[m].style+=l(h["Button_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,h,e,v);p=[];u=[];L=r/h.Buttons;for(m=0;m<=h.Buttons- -1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,m*L,t,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(0,m*L,t,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,t,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Button_"+(m+1)]),u[m].style+=l(h["Button_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;"; -v.style+=c(v.style,h,e,v);p=[];u=[];W=t/h.Links;for(m=0;m<h.Links;m++)0!=m?(u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),u[m].style+=c(u[m].style,h,e,u[m])):u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"fillColor=none;strokeColor=none;"),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Link_"+(m+1)]),u[m].style+=l(h["Link_"+(m+1)],x);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v); -p=[];u=[];W=t/h.Links;for(m=0;m<h.Links;m++)p[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"fillColor=none;strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Link_"+(m+1)]),p[m].style+=l(h["Link_"+(m+1)],x);for(m=1;m<h.Links;m++)u[m]=new mxCell("",new mxGeometry(m/h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),u[m].geometry.relative=!0,u[m].geometry.offset=new mxPoint(-3,-5),u[m].vertex=!0,v.insert(u[m]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style, -h,e,v);p=[];W=t/(h.Buttons+1);for(m=0;m<=h.Buttons-1;m++)p[m]=m!=h.Selected-1?new mxCell("",new mxGeometry(0,0,W,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,W,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),p[m].geometry.relative=!0,p[m].geometry.offset=new mxPoint(m*W,0),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["MenuItem_"+(m+1)]),p[m].style+=l(h["MenuItem_"+(m+1)],x);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+ +q=[];u=[];for(m=0;m<h.Options;m++)q[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["Option_"+(m+1)]),q[m].style+=l(h["Option_"+(m+1)],x),q[m].style+=c(q[m].style,h,e,q[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"), +u[m].vertex=!0,q[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";W=t/h.Options;q=[];u=[];for(m=0;m<h.Options;m++)q[m]=new mxCell("",new mxGeometry(m*W,.5*r-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["Option_"+(m+1)]),q[m].style+=l(h["Option_"+(m+1)],x),q[m].style+=c(q[m].style,h,e, +q[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),u[m].vertex=!0,q[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;q=[];u=[];for(m=0;m<h.Options;m++)q[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), +q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["Option_"+(m+1)]),q[m].style+=l(h["Option_"+(m+1)],x),q[m].style+=c(q[m].style,h,e,q[m],x),null!=h.Selected&&h.Selected==m+1&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),u[m].vertex=!0,q[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";W=t/h.Options;q=[];u= +[];for(m=0;m<h.Options;m++)q[m]=new mxCell("",new mxGeometry(m*W,.5*r-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["Option_"+(m+1)]),q[m].style+=l(h["Option_"+(m+1)],x),q[m].style+=c(q[m].style,h,e,q[m],x),null!=h.Selected&&h.Selected==m+1&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"), +u[m].vertex=!0,q[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==b.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*h.ScrollVal+";";v.style+=c(v.style,h,e,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";q=new mxCell("",new mxGeometry(0,0,.6*t,r),"part=1;");q.vertex=!0;v.insert(q); +q.value=g(h.Date);q.style+=l(h.Date,x);v.style+=c(v.style,h,e,v);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");u=new mxCell("",new mxGeometry(.75*t,0,.25*t,r),"part=1;shape=mxgraph.gmdl.calendar;");u.vertex=!0;v.insert(u);u.style+=I;u.style+=c(u.style,h,e,u);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(h.Search)+d(h.Search)+k(h.Search);v.value=g(h.Search);v.style+=c(v.style,h,e,v,x);break; +case "UI2NumericStepperBlock":I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+I+a(h.Number)+d(h.Number)+k(h.Number);v.value=g(h.Number);v.style+=c(v.style,h,e,v,x);break;case "UI2ButtonBarBlock":v.style+=c(v.style,h,e,v);q=[];u=[];W=t/h.Buttons;for(m=0;m<=h.Buttons-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),""), +u[m].vertex=!0,v.insert(u[m])):(q[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"strokeColor=none;"),q[m].vertex=!0,v.insert(q[m]),q[m].style+=q[m].style+=c(q[m].style,h,e,q[m]),u[m]=new mxCell("",new mxGeometry(0,0,W,r),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,q[m].insert(u[m])),u[m].value=g(h["Button_"+(m+1)]),u[m].style+=l(h["Button_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,h,e,v);q=[];u=[];L=r/h.Buttons;for(m=0;m<=h.Buttons- +1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,m*L,t,L),""),u[m].vertex=!0,v.insert(u[m])):(q[m]=new mxCell("",new mxGeometry(0,m*L,t,L),"strokeColor=none;"),q[m].vertex=!0,v.insert(q[m]),q[m].style+=c(q[m].style,h,e,q[m]),u[m]=new mxCell("",new mxGeometry(0,0,t,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,q[m].insert(u[m])),u[m].value=g(h["Button_"+(m+1)]),u[m].style+=l(h["Button_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;"; +v.style+=c(v.style,h,e,v);q=[];u=[];W=t/h.Links;for(m=0;m<h.Links;m++)0!=m?(u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),u[m].style+=c(u[m].style,h,e,u[m])):u[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"fillColor=none;strokeColor=none;"),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Link_"+(m+1)]),u[m].style+=l(h["Link_"+(m+1)],x);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v); +q=[];u=[];W=t/h.Links;for(m=0;m<h.Links;m++)q[m]=new mxCell("",new mxGeometry(m*W,0,W,r),"fillColor=none;strokeColor=none;"),q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["Link_"+(m+1)]),q[m].style+=l(h["Link_"+(m+1)],x);for(m=1;m<h.Links;m++)u[m]=new mxCell("",new mxGeometry(m/h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),u[m].geometry.relative=!0,u[m].geometry.offset=new mxPoint(-3,-5),u[m].vertex=!0,v.insert(u[m]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style, +h,e,v);q=[];W=t/(h.Buttons+1);for(m=0;m<=h.Buttons-1;m++)q[m]=m!=h.Selected-1?new mxCell("",new mxGeometry(0,0,W,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,W,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),q[m].geometry.relative=!0,q[m].geometry.offset=new mxPoint(m*W,0),q[m].vertex=!0,v.insert(q[m]),q[m].value=g(h["MenuItem_"+(m+1)]),q[m].style+=l(h["MenuItem_"+(m+1)],x);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+ l(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(h.Text_prev);v.value=g(h.Text_prev)+" ";for(m=0;m<h.Links;m++)v.value+=g(h["Link_"+(m+1)])+" ";v.value+=g(h.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,h,e,v);for(var H=[],pb=[],$b=[],L=r/h.Lines,N=null,m=0;m<h.Lines;m++)null!=h["Item_"+(m+1)]&&(null==N&&(N=""+a(h["Item_"+(m+1)])+d(h["Item_"+(m+1)])+k(h["Item_"+(m+1)])),H[m]= new mxCell("",new mxGeometry(0,m*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N,H[m].value=g(h["Item_"+(m+1)])),null!=h.Icons[m+1]&&null!=H[m]&&("dot"==h.Icons[m+1]?(pb[m]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),pb[m].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[m+1]&&(pb[m]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),pb[m].geometry.offset= new mxPoint(6.5,-4)),null!=pb[m]&&(pb[m].geometry.relative=!0,pb[m].vertex=!0,H[m].insert(pb[m]),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),pb[m].style+=I)),null!=h["Shortcut_"+(m+1)]&&(null==N&&(N=""+a(h["Shortcut_"+(m+1)])+d(h["Shortcut_"+(m+1)])+k(h["Shortcut_"+(m+1)])),$b[m]=new mxCell("",new mxGeometry(.6*t,m*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),$b[m].vertex=!0,v.insert($b[m]),$b[m].style+=N,$b[m].value=g(h["Shortcut_"+ (m+1)])),null!=h.Dividers[m+1]&&(H[m]=new mxCell("",new mxGeometry(.05*t,m*r/h.Lines,.9*t,L),"shape=line;strokeWidth=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=D(h,e));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.value=g(h.Tip);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+h.RoundCorners+";"+l(h.Tip,x);v.style+=c(v.style, -h,e,v,x);break;case "UI2CalloutBlock":v.value=g(h.Txt);v.style+="shape=ellipse;"+l(h.Txt,x);v.style+=c(v.style,h,e,v,x);break;case "UI2AlertBlock":v.value=g(h.Txt);v.style+=l(h.Txt,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");p.vertex=!0;v.insert(p);p.value=g(h.Title);p.style+=l(h.Title,x);p.style+=c(p.style,h,e,p,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative= -!0;u.geometry.offset=new mxPoint(-25,-10);u.vertex=!0;p.insert(u);for(var $d=45*h.Buttons+(10*h.Buttons-1),F=[],m=0;m<h.Buttons;m++)F[m]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),F[m].geometry.relative=!0,F[m].geometry.offset=new mxPoint(.5*-$d+55*m,-40),F[m].vertex=!0,v.insert(F[m]),F[m].value=g(h["Button_"+(m+1)]),F[m].style+=l(h["Button_"+(m+1)],x),F[m].style+=c(F[m].style,h,e,F[m],x);break;case "UMLClassBlock":if(0==h.Simple){var N=O(h,e),Ha=Math.round(.6*h.TitleHeight)||25,N= +h,e,v,x);break;case "UI2CalloutBlock":v.value=g(h.Txt);v.style+="shape=ellipse;"+l(h.Txt,x);v.style+=c(v.style,h,e,v,x);break;case "UI2AlertBlock":v.value=g(h.Txt);v.style+=l(h.Txt,x);v.style+=c(v.style,h,e,v,x);q=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");q.vertex=!0;v.insert(q);q.value=g(h.Title);q.style+=l(h.Title,x);q.style+=c(q.style,h,e,q,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative= +!0;u.geometry.offset=new mxPoint(-25,-10);u.vertex=!0;q.insert(u);for(var $d=45*h.Buttons+(10*h.Buttons-1),F=[],m=0;m<h.Buttons;m++)F[m]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),F[m].geometry.relative=!0,F[m].geometry.offset=new mxPoint(.5*-$d+55*m,-40),F[m].vertex=!0,v.insert(F[m]),F[m].value=g(h["Button_"+(m+1)]),F[m].style+=l(h["Button_"+(m+1)],x),F[m].style+=c(F[m].style,h,e,F[m],x);break;case "UMLClassBlock":if(0==h.Simple){var N=O(h,e),Ha=Math.round(.6*h.TitleHeight)||25,N= N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Title,x);v.style+=c(v.style,h,e,v,x);for(var H=[],gd=[],Da=Ha/r,m=0;m<=h.Attributes;m++)0<m&&(gd[m]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"), gd[m].vertex=!0,v.insert(gd[m])),L=0,0==h.Attributes?L=m=1:m<h.Attributes?(L=h["Text"+(m+1)+"Percent"],Da+=L):L=1-Da,H[m]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ha)*L)+(h.ExtraHeightSet&&1==m?.6*h.ExtraHeight:0)),"part=1;html=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+M(h,e,H[m])+a(h["Text"+(m+1)])+ d(h["Text"+(m+1)])+k(h["Text"+(m+1)]),H[m].value=g(h["Text"+(m+1)])}else v.value=g(h.Title),v.style+=l(h.Title,x),v.style+=c(v.style,h,e,v,x);break;case "ERDEntityBlock":N=O(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Name,x);v.style+=c(v.style, @@ -903,84 +903,84 @@ mxUtils.htmlEntities(k[c].Properties.Title)+'"');d.push(' id="'+c+'"');fa(a,k[c] "visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>", "visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>", "visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"}, -k;for(k in d)if(1<b&&k==D.CONTENT_TYPES_XML){for(var n=mxUtils.parseXml(d[k]),c=n.documentElement,f=c.children,w=null,e=0;e<f.length;e++){var l=f[e];"/visio/pages/page1.xml"==l.getAttribute(D.PART_NAME)&&(w=l)}for(e=2;e<=b;e++)f=w.cloneNode(),f.setAttribute(D.PART_NAME,"/visio/pages/page"+e+".xml"),c.appendChild(f);B(a,k,n,!0)}else a.file(k,d[k])}function q(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function e(a){var b=T[a];null==b&&(b=M++,T[a]=b);return b}function l(a){var b= +k;for(k in d)if(1<b&&k==D.CONTENT_TYPES_XML){for(var n=mxUtils.parseXml(d[k]),c=n.documentElement,f=c.children,w=null,e=0;e<f.length;e++){var l=f[e];"/visio/pages/page1.xml"==l.getAttribute(D.PART_NAME)&&(w=l)}for(e=2;e<=b;e++)f=w.cloneNode(),f.setAttribute(D.PART_NAME,"/visio/pages/page"+e+".xml"),c.appendChild(f);B(a,k,n,!0)}else a.file(k,d[k])}function p(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function e(a){var b=T[a];null==b&&(b=M++,T[a]=b);return b}function l(a){var b= {};try{var d=a.getGraphBounds().clone(),k=a.view.scale,n=a.view.translate,c=Math.round(d.x/k)-n.x,f=Math.round(d.y/k)-n.y,w=a.pageFormat.width,e=a.pageFormat.height;0>c&&(c+=Math.ceil((n.x-d.x/k)/w)*w);0>f&&(f+=Math.ceil((n.y-d.y/k)/e)*e);var l=Math.max(1,Math.ceil((d.width/k+c)/w)),y=Math.max(1,Math.ceil((d.height/k+f)/e));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width* -l;b.pageHeight=a.pageFormat.height*y;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(pa){}return b}function c(a,d,k,n){return b(a,d/D.CONVERSION_FACTOR,k,n)}function b(a,b,d,k){d=q(d,D.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);k&&d.setAttribute("F",k);return d}function a(a,b,d,k,n){var f=q(n,D.XMLNS,"Row");f.setAttribute("T",a);f.setAttribute("IX",b);f.appendChild(c("X",d,n));f.appendChild(c("Y",k,n));return f}function d(a,d,k){var n= +l;b.pageHeight=a.pageFormat.height*y;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(pa){}return b}function c(a,d,k,n){return b(a,d/D.CONVERSION_FACTOR,k,n)}function b(a,b,d,k){d=p(d,D.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);k&&d.setAttribute("F",k);return d}function a(a,b,d,k,n){var f=p(n,D.XMLNS,"Row");f.setAttribute("T",a);f.setAttribute("IX",b);f.appendChild(c("X",d,n));f.appendChild(c("Y",k,n));return f}function d(a,d,k){var n= a.style[mxConstants.STYLE_FILLCOLOR];if(n&&"none"!=n){if(d.appendChild(b("FillForegnd",n,k)),(n=a.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=n){d.appendChild(b("FillBkgnd",n,k));var n=a.style[mxConstants.STYLE_GRADIENT_DIRECTION],f=28;if(n)switch(n){case mxConstants.DIRECTION_EAST:f=25;break;case mxConstants.DIRECTION_WEST:f=27;break;case mxConstants.DIRECTION_NORTH:f=30}d.appendChild(b("FillPattern",f,k))}}else d.appendChild(b("FillPattern",0,k));(n=a.style[mxConstants.STYLE_STROKECOLOR])&& "none"!=n?d.appendChild(b("LineColor",n,k)):d.appendChild(b("LinePattern",0,k));(n=a.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(c("LineWeight",n,k));(f=a.style[mxConstants.STYLE_OPACITY])?n=f:(n=a.style[mxConstants.STYLE_FILL_OPACITY],f=a.style[mxConstants.STYLE_STROKE_OPACITY]);n&&d.appendChild(b("FillForegndTrans",1-parseInt(n)/100,k));f&&d.appendChild(b("LineColorTrans",1-parseInt(f)/100,k));if(1==a.style[mxConstants.STYLE_DASHED]){n=a.style[mxConstants.STYLE_DASH_PATTERN];f=9;if(n)switch(n){case "1 1":f= 10;break;case "1 2":f=3;break;case "1 4":f=17}d.appendChild(b("LinePattern",f,k))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,k)),d.appendChild(b("ShdwForegnd","#000000",k)),d.appendChild(b("ShdwForegndTrans",.6,k)),d.appendChild(b("ShapeShdwType",1,k)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",k)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",k)),d.appendChild(b("ShapeShdwScaleFactor","1",k)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555", -k)),d.appendChild(b("ShapeShdwShow",2,k)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,k));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,k));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(c("Rounding",.1*a.cell.geometry.width,k));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,k))}function k(a,d,k,n,f,w){var e=q(n,D.XMLNS,"Shape");e.setAttribute("ID",a);e.setAttribute("NameU","Shape"+a);e.setAttribute("LineStyle","0");e.setAttribute("FillStyle", +k)),d.appendChild(b("ShapeShdwShow",2,k)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,k));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,k));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(c("Rounding",.1*a.cell.geometry.width,k));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,k))}function k(a,d,k,n,f,w){var e=p(n,D.XMLNS,"Shape");e.setAttribute("ID",a);e.setAttribute("NameU","Shape"+a);e.setAttribute("LineStyle","0");e.setAttribute("FillStyle", "0");e.setAttribute("TextStyle","0");a=d.width/2;var l=d.height/2;e.appendChild(c("PinX",d.x+a+(w?0:G.shiftX),n));e.appendChild(c("PinY",f-d.y-l-(w?0:G.shiftY),n));e.appendChild(c("Width",d.width,n));e.appendChild(c("Height",d.height,n));e.appendChild(c("LocPinX",a,n));e.appendChild(c("LocPinY",l,n));e.appendChild(b("LayerMember",k+"",n));return e}function n(a,b){var d=D.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function w(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a? -3:9>=a?4:22>=a?5:6}function y(k,f,l,y,A,g){var z=l.view.getState(k,!0);if(null==z||null==z.absolutePoints||null==z.cellBounds)return null;l=q(y,D.XMLNS,"Shape");var B=e(k.id);l.setAttribute("ID",B);l.setAttribute("NameU","Dynamic connector."+B);l.setAttribute("Name","Dynamic connector."+B);l.setAttribute("Type","Shape");l.setAttribute("Master","4");var C=G.state,B=z.absolutePoints,E=z.cellBounds,T=E.width/2,X=E.height/2;l.appendChild(c("PinX",E.x+T,y));l.appendChild(c("PinY",A-E.y-X,y));l.appendChild(c("Width", +3:9>=a?4:22>=a?5:6}function y(k,f,l,y,A,g){var z=l.view.getState(k,!0);if(null==z||null==z.absolutePoints||null==z.cellBounds)return null;l=p(y,D.XMLNS,"Shape");var B=e(k.id);l.setAttribute("ID",B);l.setAttribute("NameU","Dynamic connector."+B);l.setAttribute("Name","Dynamic connector."+B);l.setAttribute("Type","Shape");l.setAttribute("Master","4");var C=G.state,B=z.absolutePoints,E=z.cellBounds,T=E.width/2,X=E.height/2;l.appendChild(c("PinX",E.x+T,y));l.appendChild(c("PinY",A-E.y-X,y));l.appendChild(c("Width", E.width,y));l.appendChild(c("Height",E.height,y));l.appendChild(c("LocPinX",T,y));l.appendChild(c("LocPinY",X,y));G.newEdge(l,z,y);T=function(a,b){var d=a.x,k=a.y,d=d*C.scale-E.x+C.dx+(g?0:G.shiftX),k=(b?0:E.height)-k*C.scale+E.y-C.dy-(g?0:G.shiftY);return{x:d,y:k}};X=T(B[0],!0);l.appendChild(c("BeginX",E.x+X.x,y,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));l.appendChild(c("BeginY",A-E.y+X.y,y,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));X=T(B[B.length-1],!0);l.appendChild(c("EndX", E.x+X.x,y,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));l.appendChild(c("EndY",A-E.y+X.y,y,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));l.appendChild(b("BegTrigger","2",y,k.source?"_XFTRIGGER(Sheet."+e(k.source.id)+"!EventXFMod)":null));l.appendChild(b("EndTrigger","2",y,k.target?"_XFTRIGGER(Sheet."+e(k.target.id)+"!EventXFMod)":null));l.appendChild(b("ConFixedCode","6",y));l.appendChild(b("LayerMember",f+"",y));d(z,l,y);f=z.style[mxConstants.STYLE_STARTSIZE];k=n(z.style[mxConstants.STYLE_STARTARROW], -z.style[mxConstants.STYLE_STARTFILL]);l.appendChild(b("BeginArrow",k,y));l.appendChild(b("BeginArrowSize",w(f),y));f=z.style[mxConstants.STYLE_ENDSIZE];k=n(z.style[mxConstants.STYLE_ENDARROW],z.style[mxConstants.STYLE_ENDFILL]);l.appendChild(b("EndArrow",k,y));l.appendChild(b("EndArrowSize",w(f),y));null!=z.text&&z.text.checkBounds()&&(G.save(),z.text.paint(G),G.restore());z=q(y,D.XMLNS,"Section");z.setAttribute("N","Geometry");z.setAttribute("IX","0");for(k=0;k<B.length;k++)f=T(B[k]),z.appendChild(a(0== -k?"MoveTo":"LineTo",k+1,f.x,f.y,y));z.appendChild(b("NoFill","1",y));z.appendChild(b("NoLine","0",y));l.appendChild(z);return l}function A(a,b,n,c,f,w,l){var g=a.geometry;if(null!=g){g.relative&&w&&(g=g.clone(),g.x*=w.width,g.y*=w.height,g.relative=0);w=e(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){f=k(w+"10000",g,b,c,f,l);f.setAttribute("Type","Group");l=q(c,D.XMLNS,"Shapes");G.save();G.translate(-g.x,-g.y);w=g.clone();w.x=0;w.y=0;a.setGeometry(w);a.treatAsSingle=!0;w=A(a,b,n,c,g.height,g,!0); +z.style[mxConstants.STYLE_STARTFILL]);l.appendChild(b("BeginArrow",k,y));l.appendChild(b("BeginArrowSize",w(f),y));f=z.style[mxConstants.STYLE_ENDSIZE];k=n(z.style[mxConstants.STYLE_ENDARROW],z.style[mxConstants.STYLE_ENDFILL]);l.appendChild(b("EndArrow",k,y));l.appendChild(b("EndArrowSize",w(f),y));null!=z.text&&z.text.checkBounds()&&(G.save(),z.text.paint(G),G.restore());z=p(y,D.XMLNS,"Section");z.setAttribute("N","Geometry");z.setAttribute("IX","0");for(k=0;k<B.length;k++)f=T(B[k]),z.appendChild(a(0== +k?"MoveTo":"LineTo",k+1,f.x,f.y,y));z.appendChild(b("NoFill","1",y));z.appendChild(b("NoLine","0",y));l.appendChild(z);return l}function A(a,b,n,c,f,w,l){var g=a.geometry;if(null!=g){g.relative&&w&&(g=g.clone(),g.x*=w.width,g.y*=w.height,g.relative=0);w=e(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){f=k(w+"10000",g,b,c,f,l);f.setAttribute("Type","Group");l=p(c,D.XMLNS,"Shapes");G.save();G.translate(-g.x,-g.y);w=g.clone();w.x=0;w.y=0;a.setGeometry(w);a.treatAsSingle=!0;w=A(a,b,n,c,g.height,g,!0); a.treatAsSingle=!1;a.setGeometry(g);null!=w&&l.appendChild(w);for(var z=0;z<a.getChildCount();z++)w=A(a.children[z],b,n,c,g.height,g,!0),null!=w&&l.appendChild(w);f.appendChild(l);G.restore();return f}return a.vertex?(f=k(w,g,b,c,f,l),a=n.view.getState(a,!0),d(a,f,c),G.newShape(f,a,c),null!=a.text&&a.text.checkBounds()&&(G.save(),a.text.paint(G),G.restore()),null!=a.shape&&a.shape.checkBounds()&&(G.save(),a.shape.paint(G),G.restore()),f.appendChild(G.getShapeGeo()),G.endShape(),f.setAttribute("Type", -G.getShapeType()),f):y(a,b,n,c,f,l)}return null}function z(a,b){var d=mxUtils.createXmlDocument(),k=q(d,D.XMLNS,"PageContents");k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var n=q(d,D.XMLNS,"Shapes");k.appendChild(n);var c=a.model,f=a.view.translate,w=a.view.scale,l=a.getGraphBounds();G.shiftX=0;G.shiftY=0;if(l.x/w<f.x||l.y/w<f.y)G.shiftX=Math.ceil((f.x-l.x/w)/a.pageFormat.width)*a.pageFormat.width,G.shiftY= -Math.ceil((f.y-l.y/w)/a.pageFormat.height)*a.pageFormat.height;G.save();G.translate(-f.x,-f.y);G.scale(1/w);G.newPage();w=a.model.getChildCells(a.model.root);f={};for(l=0;l<w.length;l++)f[w[l].id]=l;for(var y in c.cells)w=c.cells[y],l=null!=w.parent?f[w.parent.id]:null,null!=l&&(w=A(w,l,a,d,b.pageHeight),null!=w&&n.appendChild(w));n=q(d,D.XMLNS,"Connects");k.appendChild(n);for(y in c.cells)w=c.cells[y],w.edge&&(w.source&&(f=q(d,D.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell", -"BeginX"),f.setAttribute("ToSheet",e(w.source.id)),n.appendChild(f)),w.target&&(f=q(d,D.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell","EndX"),f.setAttribute("ToSheet",e(w.target.id)),n.appendChild(f)));d.appendChild(k);G.restore();return d}function B(a,b,d,k){a.file(b,(k?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d,"\n"))}function C(a,d,k,n){var f=mxUtils.createXmlDocument(),w=mxUtils.createXmlDocument(),l=q(f,D.XMLNS,"Pages");l.setAttributeNS("http://www.w3.org/2000/xmlns/", -"xmlns",D.XMLNS);l.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var e=q(w,D.RELS_XMLNS,"Relationships"),y=1,A;for(A in d){var g="page"+y+".xml",z=q(f,D.XMLNS,"Page");z.setAttribute("ID",y-1);z.setAttribute("NameU",A);z.setAttribute("Name",A);var C=q(f,D.XMLNS,"PageSheet"),E=n[A];C.appendChild(c("PageWidth",E.pageWidth,f));C.appendChild(c("PageHeight",E.pageHeight,f));C.appendChild(b("PageScale",E.pageScale,f));C.appendChild(b("DrawingScale",1,f));E=q(f,D.XMLNS,"Rel");E.setAttributeNS(D.XMLNS_R, -"r:id","rId"+y);var T=q(f,D.XMLNS,"Section");T.setAttribute("N","Layer");for(var X=k[A],G=0;G<X.length;G++){var M=q(f,D.XMLNS,"Row");M.setAttribute("IX",G+"");T.appendChild(M);M.appendChild(b("Name",X[G].name,f));M.appendChild(b("Color","255",f));M.appendChild(b("Status","0",f));M.appendChild(b("Visible",X[G].visible?"1":"0",f));M.appendChild(b("Print","1",f));M.appendChild(b("Active","0",f));M.appendChild(b("Lock",X[G].locked?"1":"0",f));M.appendChild(b("Snap","1",f));M.appendChild(b("Glue","1", -f));M.appendChild(b("NameUniv",X[G].name,f));M.appendChild(b("ColorTrans","0",f))}C.appendChild(T);z.appendChild(C);z.appendChild(E);l.appendChild(z);z=q(w,D.RELS_XMLNS,"Relationship");z.setAttribute("Id","rId"+y);z.setAttribute("Type",D.PAGES_TYPE);z.setAttribute("Target",g);e.appendChild(z);B(a,D.VISIO_PAGES+g,d[A]);y++}f.appendChild(l);w.appendChild(e);B(a,D.VISIO_PAGES+"pages.xml",f);B(a,D.VISIO_PAGES+"_rels/pages.xml.rels",w)}function E(a,b){var d=D.VISIO_PAGES_RELS+"page"+b+".xml.rels",k=mxUtils.createXmlDocument(), -n=q(k,D.RELS_XMLNS,"Relationships"),c=q(k,D.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");n.appendChild(c);var f=G.images;if(0<f.length)for(var w=0;w<f.length;w++)c=q(k,D.RELS_XMLNS,"Relationship"),c.setAttribute("Type",D.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(w+2)),c.setAttribute("Target","../media/"+f[w]),n.appendChild(c);k.appendChild(n);B(a,d,k)} +G.getShapeType()),f):y(a,b,n,c,f,l)}return null}function z(a,b){var d=mxUtils.createXmlDocument(),k=p(d,D.XMLNS,"PageContents");k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var n=p(d,D.XMLNS,"Shapes");k.appendChild(n);var c=a.model,f=a.view.translate,w=a.view.scale,l=a.getGraphBounds();G.shiftX=0;G.shiftY=0;if(l.x/w<f.x||l.y/w<f.y)G.shiftX=Math.ceil((f.x-l.x/w)/a.pageFormat.width)*a.pageFormat.width,G.shiftY= +Math.ceil((f.y-l.y/w)/a.pageFormat.height)*a.pageFormat.height;G.save();G.translate(-f.x,-f.y);G.scale(1/w);G.newPage();w=a.model.getChildCells(a.model.root);f={};for(l=0;l<w.length;l++)f[w[l].id]=l;for(var y in c.cells)w=c.cells[y],l=null!=w.parent?f[w.parent.id]:null,null!=l&&(w=A(w,l,a,d,b.pageHeight),null!=w&&n.appendChild(w));n=p(d,D.XMLNS,"Connects");k.appendChild(n);for(y in c.cells)w=c.cells[y],w.edge&&(w.source&&(f=p(d,D.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell", +"BeginX"),f.setAttribute("ToSheet",e(w.source.id)),n.appendChild(f)),w.target&&(f=p(d,D.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell","EndX"),f.setAttribute("ToSheet",e(w.target.id)),n.appendChild(f)));d.appendChild(k);G.restore();return d}function B(a,b,d,k){a.file(b,(k?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d,"\n"))}function C(a,d,k,n){var f=mxUtils.createXmlDocument(),w=mxUtils.createXmlDocument(),l=p(f,D.XMLNS,"Pages");l.setAttributeNS("http://www.w3.org/2000/xmlns/", +"xmlns",D.XMLNS);l.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var e=p(w,D.RELS_XMLNS,"Relationships"),y=1,A;for(A in d){var g="page"+y+".xml",z=p(f,D.XMLNS,"Page");z.setAttribute("ID",y-1);z.setAttribute("NameU",A);z.setAttribute("Name",A);var C=p(f,D.XMLNS,"PageSheet"),E=n[A];C.appendChild(c("PageWidth",E.pageWidth,f));C.appendChild(c("PageHeight",E.pageHeight,f));C.appendChild(b("PageScale",E.pageScale,f));C.appendChild(b("DrawingScale",1,f));E=p(f,D.XMLNS,"Rel");E.setAttributeNS(D.XMLNS_R, +"r:id","rId"+y);var T=p(f,D.XMLNS,"Section");T.setAttribute("N","Layer");for(var X=k[A],G=0;G<X.length;G++){var M=p(f,D.XMLNS,"Row");M.setAttribute("IX",G+"");T.appendChild(M);M.appendChild(b("Name",X[G].name,f));M.appendChild(b("Color","255",f));M.appendChild(b("Status","0",f));M.appendChild(b("Visible",X[G].visible?"1":"0",f));M.appendChild(b("Print","1",f));M.appendChild(b("Active","0",f));M.appendChild(b("Lock",X[G].locked?"1":"0",f));M.appendChild(b("Snap","1",f));M.appendChild(b("Glue","1", +f));M.appendChild(b("NameUniv",X[G].name,f));M.appendChild(b("ColorTrans","0",f))}C.appendChild(T);z.appendChild(C);z.appendChild(E);l.appendChild(z);z=p(w,D.RELS_XMLNS,"Relationship");z.setAttribute("Id","rId"+y);z.setAttribute("Type",D.PAGES_TYPE);z.setAttribute("Target",g);e.appendChild(z);B(a,D.VISIO_PAGES+g,d[A]);y++}f.appendChild(l);w.appendChild(e);B(a,D.VISIO_PAGES+"pages.xml",f);B(a,D.VISIO_PAGES+"_rels/pages.xml.rels",w)}function E(a,b){var d=D.VISIO_PAGES_RELS+"page"+b+".xml.rels",k=mxUtils.createXmlDocument(), +n=p(k,D.RELS_XMLNS,"Relationships"),c=p(k,D.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");n.appendChild(c);var f=G.images;if(0<f.length)for(var w=0;w<f.length;w++)c=p(k,D.RELS_XMLNS,"Relationship"),c.setAttribute("Type",D.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(w+2)),c.setAttribute("Target","../media/"+f[w]),n.appendChild(c);k.appendChild(n);B(a,d,k)} var D=this,G=new mxVsdxCanvas2D,T={},M=1;this.exportCurrentDiagrams=function(){try{if(f.spinner.spin(document.body,mxResources.get("exporting"))){var a=function(a,b){var d=a.model.getChildCells(a.model.root);k[b]=[];for(var n=0;n<d.length;n++)d[n].visible&&k[b].push({name:d[n].value||"Background",visible:d[n].visible,locked:d[n].style&&0<=d[n].style.indexOf("locked=1")})},b=new JSZip;G.init(b);T={};M=1;var d={},k={},n={},c=null!=f.pages?f.pages.length:1;if(null!=f.pages){for(var w=f.editor.graph.getSelectionCells(), -e=f.currentPage,y=0;y<f.pages.length;y++){var A=f.pages[y];f.currentPage!=A&&f.selectPage(A,!0);var q=A.getName(),B=f.editor.graph,D=null;null!=B.themes&&"darkTheme"==B.defaultThemeName&&(D=B.stylesheet,B.stylesheet=B.getDefaultStylesheet(),B.refresh());try{var fa=l(B);d[q]=z(B,fa);a(B,q);E(b,y+1);n[q]=fa}finally{null!=D&&(B.stylesheet=D,B.refresh())}}e!=f.currentPage&&f.selectPage(e,!0);f.editor.graph.setSelectionCells(w)}else B=f.editor.graph,fa=l(B),q="Page1",d[q]=z(B,fa),a(B,q),E(b,1),n[q]=fa; +e=f.currentPage,y=0;y<f.pages.length;y++){var A=f.pages[y];f.currentPage!=A&&f.selectPage(A,!0);var p=A.getName(),B=f.editor.graph,D=null;null!=B.themes&&"darkTheme"==B.defaultThemeName&&(D=B.stylesheet,B.stylesheet=B.getDefaultStylesheet(),B.refresh());try{var fa=l(B);d[p]=z(B,fa);a(B,p);E(b,y+1);n[p]=fa}finally{null!=D&&(B.stylesheet=D,B.refresh())}}e!=f.currentPage&&f.selectPage(e,!0);f.editor.graph.setSelectionCells(w)}else B=f.editor.graph,fa=l(B),p="Page1",d[p]=z(B,fa),a(B,p),E(b,1),n[p]=fa; g(b,c);C(b,d,k,n);a=function(){b.generateAsync({type:"base64"}).then(function(a){f.spinner.stop();var b=f.getBaseFilename();f.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<G.filesLoading?G.onFilesLoaded=a:a()}return!0}catch(Oa){return console.log(Oa),f.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships"; VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml"; VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/"; VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(f){this.filesLoading=0;this.zip=f};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(f){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,f):this.xmlDoc.createElement(f)}; -mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var f=this.createElt("Section");f.setAttribute("N","Geometry");f.setAttribute("IX",this.geoIndex++);this.geoSec=f;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(f,g,q){this.geoIndex=0;this.shape=f;this.cellState=g;this.xmGeo=g.cell.geometry;this.xmlDoc=q;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; -mxVsdxCanvas2D.prototype.newEdge=function(f,g,q){this.shape=f;this.cellState=g;this.xmGeo=g.cellBounds;this.xmlDoc=q};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; -mxVsdxCanvas2D.prototype.createCellElemScaled=function(f,g,q){return this.createCellElem(f,g/VsdxExport.prototype.CONVERSION_FACTOR,q)};mxVsdxCanvas2D.prototype.createCellElem=function(f,g,q){var e=this.createElt("Cell");e.setAttribute("N",f);e.setAttribute("V",g);q&&e.setAttribute("F",q);return e}; -mxVsdxCanvas2D.prototype.createRowScaled=function(f,g,q,e,l,c,b,a,d,k,n,w,y,A){return this.createRowRel(f,g,q/VsdxExport.prototype.CONVERSION_FACTOR,e/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,k,n,w,y,A)}; -mxVsdxCanvas2D.prototype.createRowRel=function(f,g,q,e,l,c,b,a,d,k,n,w,y,A){var z=this.createElt("Row");z.setAttribute("T",f);z.setAttribute("IX",g);z.appendChild(this.createCellElem("X",q,d));z.appendChild(this.createCellElem("Y",e,k));null!=l&&z.appendChild(this.createCellElem("A",l,n));null!=c&&z.appendChild(this.createCellElem("B",c,w));null!=b&&z.appendChild(this.createCellElem("C",b,y));null!=a&&z.appendChild(this.createCellElem("D",a,A));return z}; +mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var f=this.createElt("Section");f.setAttribute("N","Geometry");f.setAttribute("IX",this.geoIndex++);this.geoSec=f;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(f,g,p){this.geoIndex=0;this.shape=f;this.cellState=g;this.xmGeo=g.cell.geometry;this.xmlDoc=p;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()}; +mxVsdxCanvas2D.prototype.newEdge=function(f,g,p){this.shape=f;this.cellState=g;this.xmGeo=g.cellBounds;this.xmlDoc=p};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec}; +mxVsdxCanvas2D.prototype.createCellElemScaled=function(f,g,p){return this.createCellElem(f,g/VsdxExport.prototype.CONVERSION_FACTOR,p)};mxVsdxCanvas2D.prototype.createCellElem=function(f,g,p){var e=this.createElt("Cell");e.setAttribute("N",f);e.setAttribute("V",g);p&&e.setAttribute("F",p);return e}; +mxVsdxCanvas2D.prototype.createRowScaled=function(f,g,p,e,l,c,b,a,d,k,n,w,y,A){return this.createRowRel(f,g,p/VsdxExport.prototype.CONVERSION_FACTOR,e/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,k,n,w,y,A)}; +mxVsdxCanvas2D.prototype.createRowRel=function(f,g,p,e,l,c,b,a,d,k,n,w,y,A){var z=this.createElt("Row");z.setAttribute("T",f);z.setAttribute("IX",g);z.appendChild(this.createCellElem("X",p,d));z.appendChild(this.createCellElem("Y",e,k));null!=l&&z.appendChild(this.createCellElem("A",l,n));null!=c&&z.appendChild(this.createCellElem("B",c,w));null!=b&&z.appendChild(this.createCellElem("C",b,y));null!=a&&z.appendChild(this.createCellElem("D",a,A));return z}; mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()}; -mxVsdxCanvas2D.prototype.rect=function(f,g,q,e){1<this.geoStepIndex&&this.createGeoSec();var l=this.state;q*=l.scale;e*=l.scale;var c=this.xmGeo;f=(f-c.x+l.dx)*l.scale;g=(c.height-g+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,f,g));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f+q,g));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f+q,g-e));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++, -f,g-e));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f,g))};mxVsdxCanvas2D.prototype.roundrect=function(f,g,q,e,l,c){this.rect(f,g,q,e);this.shape.appendChild(this.createCellElemScaled("Rounding",l))}; -mxVsdxCanvas2D.prototype.ellipse=function(f,g,q,e){1<this.geoStepIndex&&this.createGeoSec();var l=this.state;q*=l.scale;e*=l.scale;var c=this.xmGeo,b=c.height*l.scale,a=c.width*l.scale;f=(f-c.x+l.dx)*l.scale;g=b+(-g+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,f+q/2,g-e/2,f,g-e/2,f+q/2,g,"Width*"+(f+q/2)/a,"Height*"+(g-e/2)/b,"Width*"+f/a,"Height*"+(g-e/2)/b,"Width*"+(f+q/2)/a,"Height*"+g/b))}; -mxVsdxCanvas2D.prototype.moveTo=function(f,g){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=f;this.lastMoveToY=g;this.lastX=f;this.lastY=g;var q=this.xmGeo,e=this.state;f=(f-q.x+e.dx)*e.scale;g=(q.height-g+q.y-e.dy)*e.scale;var l=q.height*e.scale,q=q.width*e.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,f/q,g/l))}; -mxVsdxCanvas2D.prototype.lineTo=function(f,g){this.lastX=f;this.lastY=g;var q=this.xmGeo,e=this.state;f=(f-q.x+e.dx)*e.scale;g=(q.height-g+q.y-e.dy)*e.scale;var l=q.height*e.scale,q=q.width*e.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,f/q,g/l))}; -mxVsdxCanvas2D.prototype.quadTo=function(f,g,q,e){this.lastX=q;this.lastY=e;var l=this.state,c=this.xmGeo,b=c.height*l.scale,a=c.width*l.scale;f=(f-c.x+l.dx)*l.scale;g=(c.height-g+c.y-l.dy)*l.scale;q=(q-c.x+l.dx)*l.scale;e=(c.height-e+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,q/a,e/b,f/a,g/b))}; -mxVsdxCanvas2D.prototype.curveTo=function(f,g,q,e,l,c){this.lastX=l;this.lastY=c;var b=this.state,a=this.xmGeo,d=a.height*b.scale,k=a.width*b.scale;f=(f-a.x+b.dx)*b.scale;g=(a.height-g+a.y-b.dy)*b.scale;q=(q-a.x+b.dx)*b.scale;e=(a.height-e+a.y-b.dy)*b.scale;l=(l-a.x+b.dx)*b.scale;c=(a.height-c+a.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,l/k,c/d,f/k,g/d,q/k,e/d))}; -mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(f,g){var q=this.createElt("ForeignData");q.setAttribute("ForeignType","Bitmap");f=f.toUpperCase();"BMP"!=f&&q.setAttribute("CompressionType",f);var e=this.createElt("Rel");e.setAttribute("r:id","rId"+g);q.appendChild(e);this.shape.appendChild(q);this.shapeType="Foreign"}; -mxVsdxCanvas2D.prototype.convertSvg2Png=function(f,g,q){var e=this;this.filesLoading++;try{var l=document.createElement("canvas"),c=l.getContext("2d");g||(f=String.fromCharCode.apply(null,new Uint8Array(f)),f=window.btoa?btoa(f):Base64.encode(f,!0));g="data:image/svg+xml;base64,"+f;img=new Image;img.onload=function(){l.width=this.width;l.height=this.height;c.drawImage(this,0,0);try{q(l.toDataURL("image/png"))}catch(b){}e.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); -try{q(f)}catch(b){}e.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()};img.src=g}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{q(f)}catch(a){}this.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()}}; -mxVsdxCanvas2D.prototype.image=function(f,g,q,e,l,c,b,a){var d=this,k="image"+(this.images.length+1)+".",n;if(0==l.indexOf("data:"))n=l.indexOf("base64,"),c=l.substring(n+7),n=l.substring(11,n-1),0==n.indexOf("svg")?(n="png",k+=n,this.convertSvg2Png(c,!0,function(a){d.zip.file("visio/media/"+k,a.substring(22),{base64:!0})})):(k+=n,this.zip.file("visio/media/"+k,c,{base64:!0}));else if(window.XMLHttpRequest){l=this.converter.convert(l);this.filesLoading++;n=l.lastIndexOf(".");n=l.substring(n+1);var w= -!1;0==n.indexOf("svg")&&(n="png",w=!0);k+=n;c=new XMLHttpRequest;c.open("GET",l,!0);c.responseType="arraybuffer";c.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(w?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+k,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+k,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};c.send()}this.images.push(k);this.shapeImg={type:n,id:this.images.length+1};l=this.state;q*=l.scale;e*=l.scale; -n=this.xmGeo;f=(f-n.x+l.dx)*l.scale;g=(n.height-g+n.y-l.dy)*l.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",f));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",g-e));this.shape.appendChild(this.createCellElemScaled("ImgWidth",q));this.shape.appendChild(this.createCellElemScaled("ImgHeight",e))}; -mxVsdxCanvas2D.prototype.text=function(f,g,q,e,l,c,b,a,d,k,n,w,y){var A=this;if(this.textEnabled&&null!=l){mxUtils.isNode(l)&&(l=mxUtils.getOuterHtml(l));0==q&&0==e&&(e=mxUtils.getSizeForString(l,A.cellState.style.fontSize,A.cellState.style.fontFamily),q=1.2*e.width,e=1.2*e.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML= -l,l=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));k=this.state;n=this.xmGeo;q*=k.scale;e*=k.scale;var z=this.createElt("Section");z.setAttribute("N","Character");var B=this.createElt("Section");B.setAttribute("N","Paragraph");var C=this.createElt("Text"),E=0,D=0,G=0,T=0,M=0,X=0,ba=0,ea=function(b,d,k,n,c){var f=b.fontSize,w=b.fontFamily,l=mxUtils.getSizeForString(c,f,w);a&&l.width>q&&(l=mxUtils.getSizeForString(c,f,w,q));b.blockElem?(M+=l.width,G=Math.min(Math.max(G,M),q),M=0,X= -Math.max(X,l.height),T+=X+ba,ba=X,X=0):(M+=l.width,G=Math.min(Math.max(G,M),q),X=Math.max(X,l.height),T=Math.max(T,X));l=A.createElt("Row");l.setAttribute("IX",E);b.fontColor&&l.appendChild(A.createCellElem("Color",b.fontColor));f&&l.appendChild(A.createCellElemScaled("Size",.97*f));w&&l.appendChild(A.createCellElem("Font",w));f=0;b.bold&&(f|=17);b.italic&&(f|=34);b.underline&&(f|=4);l.appendChild(A.createCellElem("Style",f));l.appendChild(A.createCellElem("Case","0"));l.appendChild(A.createCellElem("Pos", +mxVsdxCanvas2D.prototype.rect=function(f,g,p,e){1<this.geoStepIndex&&this.createGeoSec();var l=this.state;p*=l.scale;e*=l.scale;var c=this.xmGeo;f=(f-c.x+l.dx)*l.scale;g=(c.height-g+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,f,g));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f+p,g));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f+p,g-e));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++, +f,g-e));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f,g))};mxVsdxCanvas2D.prototype.roundrect=function(f,g,p,e,l,c){this.rect(f,g,p,e);this.shape.appendChild(this.createCellElemScaled("Rounding",l))}; +mxVsdxCanvas2D.prototype.ellipse=function(f,g,p,e){1<this.geoStepIndex&&this.createGeoSec();var l=this.state;p*=l.scale;e*=l.scale;var c=this.xmGeo,b=c.height*l.scale,a=c.width*l.scale;f=(f-c.x+l.dx)*l.scale;g=b+(-g+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,f+p/2,g-e/2,f,g-e/2,f+p/2,g,"Width*"+(f+p/2)/a,"Height*"+(g-e/2)/b,"Width*"+f/a,"Height*"+(g-e/2)/b,"Width*"+(f+p/2)/a,"Height*"+g/b))}; +mxVsdxCanvas2D.prototype.moveTo=function(f,g){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=f;this.lastMoveToY=g;this.lastX=f;this.lastY=g;var p=this.xmGeo,e=this.state;f=(f-p.x+e.dx)*e.scale;g=(p.height-g+p.y-e.dy)*e.scale;var l=p.height*e.scale,p=p.width*e.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,f/p,g/l))}; +mxVsdxCanvas2D.prototype.lineTo=function(f,g){this.lastX=f;this.lastY=g;var p=this.xmGeo,e=this.state;f=(f-p.x+e.dx)*e.scale;g=(p.height-g+p.y-e.dy)*e.scale;var l=p.height*e.scale,p=p.width*e.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,f/p,g/l))}; +mxVsdxCanvas2D.prototype.quadTo=function(f,g,p,e){this.lastX=p;this.lastY=e;var l=this.state,c=this.xmGeo,b=c.height*l.scale,a=c.width*l.scale;f=(f-c.x+l.dx)*l.scale;g=(c.height-g+c.y-l.dy)*l.scale;p=(p-c.x+l.dx)*l.scale;e=(c.height-e+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,p/a,e/b,f/a,g/b))}; +mxVsdxCanvas2D.prototype.curveTo=function(f,g,p,e,l,c){this.lastX=l;this.lastY=c;var b=this.state,a=this.xmGeo,d=a.height*b.scale,k=a.width*b.scale;f=(f-a.x+b.dx)*b.scale;g=(a.height-g+a.y-b.dy)*b.scale;p=(p-a.x+b.dx)*b.scale;e=(a.height-e+a.y-b.dy)*b.scale;l=(l-a.x+b.dx)*b.scale;c=(a.height-c+a.y-b.dy)*b.scale;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,l/k,c/d,f/k,g/d,p/k,e/d))}; +mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(f,g){var p=this.createElt("ForeignData");p.setAttribute("ForeignType","Bitmap");f=f.toUpperCase();"BMP"!=f&&p.setAttribute("CompressionType",f);var e=this.createElt("Rel");e.setAttribute("r:id","rId"+g);p.appendChild(e);this.shape.appendChild(p);this.shapeType="Foreign"}; +mxVsdxCanvas2D.prototype.convertSvg2Png=function(f,g,p){var e=this;this.filesLoading++;try{var l=document.createElement("canvas"),c=l.getContext("2d");g||(f=String.fromCharCode.apply(null,new Uint8Array(f)),f=window.btoa?btoa(f):Base64.encode(f,!0));g="data:image/svg+xml;base64,"+f;img=new Image;img.onload=function(){l.width=this.width;l.height=this.height;c.drawImage(this,0,0);try{p(l.toDataURL("image/png"))}catch(b){}e.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed"); +try{p(f)}catch(b){}e.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()};img.src=g}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{p(f)}catch(a){}this.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()}}; +mxVsdxCanvas2D.prototype.image=function(f,g,p,e,l,c,b,a){var d=this,k="image"+(this.images.length+1)+".",n;if(0==l.indexOf("data:"))n=l.indexOf("base64,"),c=l.substring(n+7),n=l.substring(11,n-1),0==n.indexOf("svg")?(n="png",k+=n,this.convertSvg2Png(c,!0,function(a){d.zip.file("visio/media/"+k,a.substring(22),{base64:!0})})):(k+=n,this.zip.file("visio/media/"+k,c,{base64:!0}));else if(window.XMLHttpRequest){l=this.converter.convert(l);this.filesLoading++;n=l.lastIndexOf(".");n=l.substring(n+1);var w= +!1;0==n.indexOf("svg")&&(n="png",w=!0);k+=n;c=new XMLHttpRequest;c.open("GET",l,!0);c.responseType="arraybuffer";c.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(w?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+k,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+k,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};c.send()}this.images.push(k);this.shapeImg={type:n,id:this.images.length+1};l=this.state;p*=l.scale;e*=l.scale; +n=this.xmGeo;f=(f-n.x+l.dx)*l.scale;g=(n.height-g+n.y-l.dy)*l.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",f));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",g-e));this.shape.appendChild(this.createCellElemScaled("ImgWidth",p));this.shape.appendChild(this.createCellElemScaled("ImgHeight",e))}; +mxVsdxCanvas2D.prototype.text=function(f,g,p,e,l,c,b,a,d,k,n,w,y){var A=this;if(this.textEnabled&&null!=l){mxUtils.isNode(l)&&(l=mxUtils.getOuterHtml(l));0==p&&0==e&&(e=mxUtils.getSizeForString(l,A.cellState.style.fontSize,A.cellState.style.fontFamily),p=1.2*e.width,e=1.2*e.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML= +l,l=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));k=this.state;n=this.xmGeo;p*=k.scale;e*=k.scale;var z=this.createElt("Section");z.setAttribute("N","Character");var B=this.createElt("Section");B.setAttribute("N","Paragraph");var C=this.createElt("Text"),E=0,D=0,G=0,T=0,M=0,X=0,ba=0,ea=function(b,d,k,n,c){var f=b.fontSize,w=b.fontFamily,l=mxUtils.getSizeForString(c,f,w);a&&l.width>p&&(l=mxUtils.getSizeForString(c,f,w,p));b.blockElem?(M+=l.width,G=Math.min(Math.max(G,M),p),M=0,X= +Math.max(X,l.height),T+=X+ba,ba=X,X=0):(M+=l.width,G=Math.min(Math.max(G,M),p),X=Math.max(X,l.height),T=Math.max(T,X));l=A.createElt("Row");l.setAttribute("IX",E);b.fontColor&&l.appendChild(A.createCellElem("Color",b.fontColor));f&&l.appendChild(A.createCellElemScaled("Size",.97*f));w&&l.appendChild(A.createCellElem("Font",w));f=0;b.bold&&(f|=17);b.italic&&(f|=34);b.underline&&(f|=4);l.appendChild(A.createCellElem("Style",f));l.appendChild(A.createCellElem("Case","0"));l.appendChild(A.createCellElem("Pos", "0"));l.appendChild(A.createCellElem("FontScale","1"));l.appendChild(A.createCellElem("Letterspace","0"));d.appendChild(l);d=A.createElt("Row");d.setAttribute("IX",D);switch(b.align){case "left":f=0;break;case "center":f=1;break;case "right":f=2;break;case "start":f=0;break;case "end":f=2;break;case "justify":f=0;break;default:f=1}d.appendChild(A.createCellElem("HorzAlign",f));k.appendChild(d);k=A.createElt("cp");k.setAttribute("IX",E++);n.appendChild(k);b=A.xmlDoc.createTextNode(c+(b.blockElem?"\n": ""));n.appendChild(b)},O=function(a,b){b=b||{};for(var d=0;d<a.length;d++){var k=a[d];if(3==k.nodeType){var n=A.cellState.style.fontStyle,c={fontColor:b.fontColor||A.cellState.style.fontColor,fontSize:b.fontSize||A.cellState.style.fontSize,fontFamily:b.fontFamily||A.cellState.style.fontFamily,align:b.align||A.cellState.style.align,bold:b.bold||n&1,italic:b.italic||n&2,underline:b.underline||n&4},n=!1;d+1<a.length&&"BR"==a[d+1].nodeName.toUpperCase()&&(n=!0,d++);ea(c,z,B,C,(b.OL?b.LiIndex+". ":"")+ k.textContent+(n?"\n":""))}else if(1==k.nodeType){var n=k.nodeName.toUpperCase(),f=k.childNodes.length,c=window.getComputedStyle(k,null),w="bold"==c.getPropertyValue("font-weight")||b.bold,l="italic"==c.getPropertyValue("font-style")||b.italic,e=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,y=c.getPropertyValue("text-align"),g;g=c.getPropertyValue("color");g=(g=g.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===g.length?"#"+("0"+parseInt(g[1], 10).toString(16)).slice(-2)+("0"+parseInt(g[2],10).toString(16)).slice(-2)+("0"+parseInt(g[3],10).toString(16)).slice(-2):"";c={bold:w,italic:l,underline:e,align:y,fontColor:g,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==n||"LI"==n,OL:b.OL,LiIndex:b.LiIndex};"UL"==n?(w=A.createElt("Row"),w.setAttribute("IX",D),w.appendChild(A.createCellElem("HorzAlign","0")),w.appendChild(A.createCellElem("Bullet", "1")),B.appendChild(w),w=A.createElt("pp"),w.setAttribute("IX",D++),C.appendChild(w)):"OL"==n?c.OL=!0:"LI"==n&&(c.LiIndex=d+1);0<f?(O(k.childNodes,c),"UL"==n&&(w=A.createElt("Row"),w.setAttribute("IX",D),w.appendChild(A.createCellElem("Bullet","0")),B.appendChild(w),w=A.createElt("pp"),w.setAttribute("IX",D++),C.appendChild(w)),ea(c,z,B,C,"")):ea(c,z,B,C,(b.OL?b.LiIndex+". ":"")+k.textContent)}}};"html"==d&&mxClient.IS_SVG?(l=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1], -null!=l&&O(l.childNodes,{})):ea({fontColor:A.cellState.style.fontColor,fontSize:A.cellState.style.fontSize,fontFamily:A.cellState.style.fontFamily},z,B,C,l);d=l=0;e=Math.max(e,T);q=Math.max(q,G);y=q/2;var ma=e/2,ia=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),Z=ia*Math.PI/180;switch(c){case "right":0!=ia?(f-=y*Math.cos(Z),g-=y*Math.sin(Z)):l=G/2;break;case "left":0!=ia?(f+=y*Math.cos(Z),g+=y*Math.sin(Z)):l=-G/2}switch(b){case "top":0!=ia?(f+=ma*Math.sin(Z),g+=ma*Math.cos(Z)):d= -T/2;break;case "bottom":0!=ia?(f-=ma*Math.sin(Z),g-=ma*Math.cos(Z)):d=-T/2}f=(f-n.x+k.dx)*k.scale;g=(n.height-g+n.y-k.dy)*k.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",f));this.shape.appendChild(this.createCellElemScaled("TxtPinY",g));this.shape.appendChild(this.createCellElemScaled("TxtWidth",q));this.shape.appendChild(this.createCellElemScaled("TxtHeight",e));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",y+l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", -ma+d));w-=ia;0!=w&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-w)*Math.PI/180));this.shape.appendChild(z);this.shape.appendChild(B);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(f,g,q,e,l){0!=f&&(g=this.state,e+=g.dx,l+=g.dy,e*=g.scale,l*=g.scale,this.shape.appendChild(this.createCellElem("Angle",(360-f)*Math.PI/180)),g.rotation+=f,g.rotationCx=e,g.rotationCy=l)}; +null!=l&&O(l.childNodes,{})):ea({fontColor:A.cellState.style.fontColor,fontSize:A.cellState.style.fontSize,fontFamily:A.cellState.style.fontFamily},z,B,C,l);d=l=0;e=Math.max(e,T);p=Math.max(p,G);y=p/2;var na=e/2,ia=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),Z=ia*Math.PI/180;switch(c){case "right":0!=ia?(f-=y*Math.cos(Z),g-=y*Math.sin(Z)):l=G/2;break;case "left":0!=ia?(f+=y*Math.cos(Z),g+=y*Math.sin(Z)):l=-G/2}switch(b){case "top":0!=ia?(f+=na*Math.sin(Z),g+=na*Math.cos(Z)):d= +T/2;break;case "bottom":0!=ia?(f-=na*Math.sin(Z),g-=na*Math.cos(Z)):d=-T/2}f=(f-n.x+k.dx)*k.scale;g=(n.height-g+n.y-k.dy)*k.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",f));this.shape.appendChild(this.createCellElemScaled("TxtPinY",g));this.shape.appendChild(this.createCellElemScaled("TxtWidth",p));this.shape.appendChild(this.createCellElemScaled("TxtHeight",e));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",y+l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", +na+d));w-=ia;0!=w&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-w)*Math.PI/180));this.shape.appendChild(z);this.shape.appendChild(B);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(f,g,p,e,l){0!=f&&(g=this.state,e+=g.dx,l+=g.dy,e*=g.scale,l*=g.scale,this.shape.appendChild(this.createCellElem("Angle",(360-f)*Math.PI/180)),g.rotation+=f,g.rotationCx=e,g.rotationCy=l)}; mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(f,g){this.pos=0;this.buffer=f;this.is_with_alpha=!!g;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()} BmpDecoder.prototype.parseHeader=function(){var f=this.buffer;this.fileSize=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.reserved=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.offset=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.headerSize=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.width=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos]; this.pos+=4;this.height=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.planes=f[this.pos+1]<<8|f[this.pos];this.pos+=2;this.bitPP=f[this.pos+1]<<8|f[this.pos];this.pos+=2;this.compress=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.rawSize=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.hr=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.vr=f[this.pos+3]<<24|f[this.pos+ -2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.colors=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.importantColors=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){f=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(f);for(var g=0;g<f;g++){var q=this.buffer[this.pos++],e=this.buffer[this.pos++],l=this.buffer[this.pos++],c=this.buffer[this.pos++]; -this.palette[g]={red:l,green:e,blue:q,quad:c}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var f="bit"+this.bitPP,g=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=g;this.data=g.data;this[f]()}catch(q){console.log("bit decode error:"+q)}}; -BmpDecoder.prototype.bit1=function(){for(var f=Math.ceil(this.width/8),g=f%4,q=this.height-1;0<=q;q--){for(var e=0;e<f;e++)for(var l=this.buffer[this.pos++],c=q*this.width*4+32*e,b=0;8>b;b++)if(8*e+b<this.width){var a=this.palette[l>>7-b&1];this.data[c+4*b]=a.red;this.data[c+4*b+1]=a.green;this.data[c+4*b+2]=a.blue;this.data[c+4*b+3]=255}else break;0!=g&&(this.pos+=4-g)}}; -BmpDecoder.prototype.bit4=function(){for(var f=Math.ceil(this.width/2),g=f%4,q=this.height-1;0<=q;q--){for(var e=0;e<f;e++){var l=this.buffer[this.pos++],c=q*this.width*4+8*e,b=l&15,l=this.palette[l>>4];this.data[c]=l.red;this.data[c+1]=l.green;this.data[c+2]=l.blue;this.data[c+3]=255;if(2*e+1>=this.width)break;l=this.palette[b];this.data[c+4]=l.red;this.data[c+4+1]=l.green;this.data[c+4+2]=l.blue;this.data[c+4+3]=255}0!=g&&(this.pos+=4-g)}}; -BmpDecoder.prototype.bit8=function(){for(var f=this.width%4,g=this.height-1;0<=g;g--){for(var q=0;q<this.width;q++){var e=this.buffer[this.pos++],l=g*this.width*4+4*q;e<this.palette.length?(e=this.palette[e],this.data[l]=e.red,this.data[l+1]=e.green,this.data[l+2]=e.blue):(this.data[l]=255,this.data[l+1]=255,this.data[l+2]=255);this.data[l+3]=255}0!=f&&(this.pos+=4-f)}}; -BmpDecoder.prototype.bit15=function(){var f=2*this.width%4;0!=f&&(f=4-f);for(var g=this.height-1;0<=g;g--){for(var q=0;q<this.width;q++){var e=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var l=(e&31)/31*255|0,c=(e>>5&31)/31*255|0,b=e>>15?255:0,a=g*this.width*4+4*q;this.data[a]=(e>>10&31)/31*255|0;this.data[a+1]=c;this.data[a+2]=l;this.data[a+3]=b}this.pos+=f}}; -BmpDecoder.prototype.bit16=function(){var f=2*this.width%4;0!=f&&(f=4-f);for(var g=this.height-1;0<=g;g--){for(var q=0;q<this.width;q++){var e=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var l=(e&31)/31*255|0,c=(e>>5&31)/31*255|0,b=g*this.width*4+4*q;this.data[b]=(e>>10&31)/31*255|0;this.data[b+1]=c;this.data[b+2]=l;this.data[b+3]=255}this.pos+=f}}; -BmpDecoder.prototype.bit24=function(){var f=3*this.width%4;0!=f&&(f=4-f);for(var g=this.height-1;0<=g;g--){for(var q=0;q<this.width;q++){var e=this.buffer[this.pos++],l=this.buffer[this.pos++],c=this.buffer[this.pos++],b=g*this.width*4+4*q;this.data[b]=c;this.data[b+1]=l;this.data[b+2]=e;this.data[b+3]=255}this.pos+=f}}; -BmpDecoder.prototype.bit32=function(){for(var f=this.height-1;0<=f;f--)for(var g=0;g<this.width;g++){var q=this.buffer[this.pos++],e=this.buffer[this.pos++],l=this.buffer[this.pos++],c=this.buffer[this.pos++],b=f*this.width*4+4*g;this.data[b]=l;this.data[b+1]=e;this.data[b+2]=q;this.data[b+3]=c}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(f,g){function q(){this.constructor=f}for(var e in g)g.hasOwnProperty(e)&&(f[e]=g[e]);f.prototype=null===g?Object.create(g):(q.prototype=g.prototype,new q)},com; +2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.colors=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.importantColors=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){f=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(f);for(var g=0;g<f;g++){var p=this.buffer[this.pos++],e=this.buffer[this.pos++],l=this.buffer[this.pos++],c=this.buffer[this.pos++]; +this.palette[g]={red:l,green:e,blue:p,quad:c}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var f="bit"+this.bitPP,g=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=g;this.data=g.data;this[f]()}catch(p){console.log("bit decode error:"+p)}}; +BmpDecoder.prototype.bit1=function(){for(var f=Math.ceil(this.width/8),g=f%4,p=this.height-1;0<=p;p--){for(var e=0;e<f;e++)for(var l=this.buffer[this.pos++],c=p*this.width*4+32*e,b=0;8>b;b++)if(8*e+b<this.width){var a=this.palette[l>>7-b&1];this.data[c+4*b]=a.red;this.data[c+4*b+1]=a.green;this.data[c+4*b+2]=a.blue;this.data[c+4*b+3]=255}else break;0!=g&&(this.pos+=4-g)}}; +BmpDecoder.prototype.bit4=function(){for(var f=Math.ceil(this.width/2),g=f%4,p=this.height-1;0<=p;p--){for(var e=0;e<f;e++){var l=this.buffer[this.pos++],c=p*this.width*4+8*e,b=l&15,l=this.palette[l>>4];this.data[c]=l.red;this.data[c+1]=l.green;this.data[c+2]=l.blue;this.data[c+3]=255;if(2*e+1>=this.width)break;l=this.palette[b];this.data[c+4]=l.red;this.data[c+4+1]=l.green;this.data[c+4+2]=l.blue;this.data[c+4+3]=255}0!=g&&(this.pos+=4-g)}}; +BmpDecoder.prototype.bit8=function(){for(var f=this.width%4,g=this.height-1;0<=g;g--){for(var p=0;p<this.width;p++){var e=this.buffer[this.pos++],l=g*this.width*4+4*p;e<this.palette.length?(e=this.palette[e],this.data[l]=e.red,this.data[l+1]=e.green,this.data[l+2]=e.blue):(this.data[l]=255,this.data[l+1]=255,this.data[l+2]=255);this.data[l+3]=255}0!=f&&(this.pos+=4-f)}}; +BmpDecoder.prototype.bit15=function(){var f=2*this.width%4;0!=f&&(f=4-f);for(var g=this.height-1;0<=g;g--){for(var p=0;p<this.width;p++){var e=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var l=(e&31)/31*255|0,c=(e>>5&31)/31*255|0,b=e>>15?255:0,a=g*this.width*4+4*p;this.data[a]=(e>>10&31)/31*255|0;this.data[a+1]=c;this.data[a+2]=l;this.data[a+3]=b}this.pos+=f}}; +BmpDecoder.prototype.bit16=function(){var f=2*this.width%4;0!=f&&(f=4-f);for(var g=this.height-1;0<=g;g--){for(var p=0;p<this.width;p++){var e=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var l=(e&31)/31*255|0,c=(e>>5&31)/31*255|0,b=g*this.width*4+4*p;this.data[b]=(e>>10&31)/31*255|0;this.data[b+1]=c;this.data[b+2]=l;this.data[b+3]=255}this.pos+=f}}; +BmpDecoder.prototype.bit24=function(){var f=3*this.width%4;0!=f&&(f=4-f);for(var g=this.height-1;0<=g;g--){for(var p=0;p<this.width;p++){var e=this.buffer[this.pos++],l=this.buffer[this.pos++],c=this.buffer[this.pos++],b=g*this.width*4+4*p;this.data[b]=c;this.data[b+1]=l;this.data[b+2]=e;this.data[b+3]=255}this.pos+=f}}; +BmpDecoder.prototype.bit32=function(){for(var f=this.height-1;0<=f;f--)for(var g=0;g<this.width;g++){var p=this.buffer[this.pos++],e=this.buffer[this.pos++],l=this.buffer[this.pos++],c=this.buffer[this.pos++],b=f*this.width*4+4*g;this.data[b]=l;this.data[b+1]=e;this.data[b+2]=p;this.data[b+3]=c}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(f,g){function p(){this.constructor=f}for(var e in g)g.hasOwnProperty(e)&&(f[e]=g[e]);f.prototype=null===g?Object.create(g):(p.prototype=g.prototype,new p)},com; (function(f){(function(g){(function(g){var e=function(){function l(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layersMap={};this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c}l.vsdxPlaceholder_$LI$=function(){null==l.vsdxPlaceholder&&(l.vsdxPlaceholder=window.atob?atob("dmlzaW8="): Base64.decode("dmlzaW8=",!0));return l.vsdxPlaceholder};l.parsererrorNS_$LI$=function(){if(null==l.parsererrorNS&&(l.parsererrorNS="",window.DOMParser)){var c=new DOMParser;try{l.parsererrorNS=c.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(b){}}return l.parsererrorNS};l.parseXml=function(c){try{var b=mxUtils.parseXml(c);return 0<b.getElementsByTagNameNS(l.parsererrorNS,"parsererror").length?null:b}catch(a){return null}};l.decodeUTF16LE=function(c){for(var b= "",a=0;a<c.length;a+=2)b+=String.fromCharCode(c.charCodeAt(a)|c.charCodeAt(a+1)<<8);return b};l.prototype.scaleGraph=function(c,b){if(1!==b){var a=c.getModel(),d;for(d in a.cells){var k=a.cells[d],n=a.getGeometry(k);if(null!=n&&(this.scaleRect(n,b),this.scaleRect(n.alternateBounds,b),a.isEdge(k)&&(this.scalePoint(n.sourcePoint,b),this.scalePoint(n.targetPoint,b),this.scalePoint(n.offset,b),k=n.points,null!=k)))for(n=0;n<k.length;n++)this.scalePoint(k[n],b)}}};l.incorrectXMLReqExp=[{regExp:/(\>[^&<]*)\&([^&<;]*\<)/g, repl:"$1&$2"}];l.prototype.decodeVsdx=function(c,b,a,d){var k=this,n={},w={},e=function(){var a;function d(){a=a.concat(k.RESPONSE_END);b&&b(a)}for(var c=l.vsdxPlaceholder+"/document.xml",e=n[c]?n[c]:null,y=e.firstChild;null!=y&&1!=y.nodeType;)y=y.nextSibling;if(null!=y&&1==y.nodeType)k.importNodes(e,y,c,n);else return null;k.vsdxModel=new f.mxgraph.io.vsdx.mxVsdxModel(e,n,w);c=k.vsdxModel.getPages();a=k.RESPONSE_HEADER;var A=function(a){null==a.entries&&(a.entries=[]);return a.entries}(c),g= -function(b,d){var n=A[b].getValue(),c=z.createMxGraph();c.getModel().beginUpdate();z.importPage(n,c,c.getDefaultParent(),!0);z.scaleGraph(c,n.getPageScale()/n.getDrawingScale());c.getModel().endUpdate();z.postImportPage(n,c,function(){z.sanitiseGraph(c);a=a.concat(k.RESPONSE_DIAGRAM_START);a=a.concat(k.processPage(c,n));a=a.concat(k.RESPONSE_DIAGRAM_END);b<A.length-1?g(b+1,d):d()})},z=k;0<A.length?g(0,d):d()},A=0,g=0,q=function(){if(g==A)try{e()}catch(C){console.log(C),null!=d?d():b("")}};JSZip.loadAsync(c).then(function(a){0== -Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,c=d.toLowerCase(),f=c.length;c.indexOf(".xml")==f-4||c.indexOf(".xml.rels")==f-9?(A++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=l.parseXml(a);if(null==b)if(0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5))b=l.parseXml(l.decodeUTF16LE(a));else{for(b=0;b<l.incorrectXMLReqExp.length;b++)l.incorrectXMLReqExp[b].regExp.test(a)&&(a=a.replace(l.incorrectXMLReqExp[b].regExp, -l.incorrectXMLReqExp[b].repl));b=l.parseXml(a)}null!=b&&(b.vsdxFileName=d,n[d]=b)}g++;q()})):0===c.indexOf(l.vsdxPlaceholder+"/media")&&(A++,function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData;b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var n=new XMLHttpRequest;n.open("POST",EMF_CONVERT_URL);n.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(n); -n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=new FileReader;a.readAsDataURL(n.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;w[d]=a.result.substr(b);g++;q()}}catch(ma){console.log(ma),g++,q()}else g++,q()});n.send(b)}):(g++,q()):function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas"); -b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");w[d]=a.substr(23);g++;q()}):b.async("base64").then(function(a){w[d]=a;g++;q()}))})},function(a){null!=d&&d(a)})};l.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};l.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style", +function(b,d){var n=A[b].getValue(),c=z.createMxGraph();c.getModel().beginUpdate();z.importPage(n,c,c.getDefaultParent(),!0);z.scaleGraph(c,n.getPageScale()/n.getDrawingScale());c.getModel().endUpdate();z.postImportPage(n,c,function(){z.sanitiseGraph(c);a=a.concat(k.RESPONSE_DIAGRAM_START);a=a.concat(k.processPage(c,n));a=a.concat(k.RESPONSE_DIAGRAM_END);b<A.length-1?g(b+1,d):d()})},z=k;0<A.length?g(0,d):d()},A=0,g=0,p=function(){if(g==A)try{e()}catch(C){console.log(C),null!=d?d():b("")}};JSZip.loadAsync(c).then(function(a){0== +Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,c=d.toLowerCase(),f=c.length;c.indexOf(".xml")==f-4||c.indexOf(".rels")==f-5?(A++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=l.parseXml(a);if(null==b)if(0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5))b=l.parseXml(l.decodeUTF16LE(a));else{for(b=0;b<l.incorrectXMLReqExp.length;b++)l.incorrectXMLReqExp[b].regExp.test(a)&&(a=a.replace(l.incorrectXMLReqExp[b].regExp, +l.incorrectXMLReqExp[b].repl));b=l.parseXml(a)}null!=b&&(b.vsdxFileName=d,n[d]=b)}g++;p()})):0===c.indexOf(l.vsdxPlaceholder+"/media")&&(A++,function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData;b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var n=new XMLHttpRequest;n.open("POST",EMF_CONVERT_URL);n.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(n); +n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=new FileReader;a.readAsDataURL(n.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;w[d]=a.result.substr(b);g++;p()}}catch(na){console.log(na),g++,p()}else g++,p()});n.send(b)}):(g++,p()):function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas"); +b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");w[d]=a.substr(23);g++;p()}):b.async("base64").then(function(a){w[d]=a;g++;p()}))})},function(a){null!=d&&d(a)})};l.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};l.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style", "default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var k=mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":""),d=d+('<diagram name="'+k+'" id="'+k.replace(/\s/g,"_")+'">');return d+=Graph.compress(a)};l.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c};l.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};l.prototype.importNodes=function(c,b,a,d){var k=a.lastIndexOf("/"),n=a,f=a;if(-1!==k&&(n=a.substring(0,k), f=a.substring(k+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,n+"/_rels/"+f+".rels"),null!=a)){var l=a.getElementsByTagName("Relationship");a={};for(k=0;k<l.length;k++){var f=l.item(k),e=f.getAttribute("Id"),f=f.getAttribute("Target");a[e]=f}b=b.getElementsByTagName("Rel");for(k=0;k<b.length;k++)if(l=b.item(k),f=function(a,b){return a[b]?a[b]:null}(a,l.getAttribute("r:id")),f=n+"/"+f,null!=f&&(e=d[f]?d[f]:null,null!=e)){l=l.parentNode;for(e=e.firstChild;null!=e&&1!=e.nodeType;)e=e.nextSibling; if(null!=e&&1==e.nodeType)for(e=e.firstChild;null!=e;){if(null!=e&&1==e.nodeType){var g=l.appendChild(c.importNode(e,!0));this.importNodes(c,g,f,d)}e=e.nextSibling}}}};l.prototype.importPage=function(c,b,a,d){var k=c.getBackPage();if(null!=k){b.getModel().setValue(b.getDefaultParent(),c.getPageName());var n=new mxCell(k.getPageName());b.addCell(n,b.getModel().getRoot(),0,null,null);this.importPage(k,b,b.getDefaultParent())}k=c.getLayers();this.layersMap[0]=b.getDefaultParent();for(n=0;n<k.length;n++){var f= @@ -993,44 +993,44 @@ return null}(d.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(c.Id,w.Id)),A=new Ima function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var w=b.getId();if(b.isVertex())return n=null,n=b.isGroup()?this.addGroup(c,b,a,d,k):this.addVertex(c,b,a,d,k),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap, new f.mxgraph.io.vsdx.ShapePageId(d,w),b),b=b.getHyperlink(),b.extLink?c.setLinkForCell(n,b.extLink):b.pageLink&&c.setLinkForCell(n,"data:page/id,"+b.pageLink),n;b.setShapeIndex(c.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap, new f.mxgraph.io.vsdx.ShapePageId(d,w),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,w),a)}return null};l.prototype.addGroup=function(c,b,a,d,k){var n=b.getDimensions(),w=b.getMaster(),l=b.getStyleFromShape(), -e=b.getGeomList();e.isNoFill()&&(l[mxConstants.STYLE_FILLCOLOR]="none",l[mxConstants.STYLE_GRADIENTCOLOR]="none");e.isNoLine()&&(l[mxConstants.STYLE_STROKECOLOR]="none");l.html="1";l[mxConstants.STYLE_WHITE_SPACE]="wrap";var g=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"="),l=null,q=b.getChildShapes(),l=null!=q&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(q),e=b.isDisplacedLabel()||b.isRotatedLabel()||l,l=b.getOriginPoint(k,!0);if(e)l=c.insertVertex(a,null,null,Math.floor(Math.round(100* -l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);else var C=b.getTextLabel(),l=c.insertVertex(a,null,C,Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);for(a=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(q));a.hasNext();)g= -a.next().getValue(),q=g.getId(),g.isVertex()?(C=f.mxgraph.io.vsdx.VsdxShape.getType(g.getShape()),null!=C&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&g.isVertex()&&(g.propagateRotation(b.getRotation()),g.isGroup()?this.addGroup(c,g,l,d,n.y):this.addVertex(c, -g,l,d,n.y)),null==w&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),g)):null==w?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&& -a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),g),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, -getValue:function(){return this.value}})}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),l)):this.addUnconnectedEdge(c,l,g,k);e&&b.createLabelSubShape(c,l);c=b.getRotation();if(0!==c)for(n=l.getGeometry(),k=n.width/2,n=n.height/2,w=0;w<l.getChildCount();w++)e=l.getChildAt(w),f.mxgraph.online.Utils.rotatedGeometry(e.getGeometry(),c,k,n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key=== +e=b.getGeomList();e.isNoFill()&&(l[mxConstants.STYLE_FILLCOLOR]="none",l[mxConstants.STYLE_GRADIENTCOLOR]="none");e.isNoLine()&&(l[mxConstants.STYLE_STROKECOLOR]="none");l.html="1";l[mxConstants.STYLE_WHITE_SPACE]="wrap";var g=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"="),l=null,p=b.getChildShapes(),l=null!=p&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(p),e=b.isDisplacedLabel()||b.isRotatedLabel()||l,l=b.getOriginPoint(k,!0);if(e)l=c.insertVertex(a,null,null,Math.floor(Math.round(100* +l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);else var C=b.getTextLabel(),l=c.insertVertex(a,null,C,Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);for(a=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(p));a.hasNext();)g= +a.next().getValue(),p=g.getId(),g.isVertex()?(C=f.mxgraph.io.vsdx.VsdxShape.getType(g.getShape()),null!=C&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&g.isVertex()&&(g.propagateRotation(b.getRotation()),g.isGroup()?this.addGroup(c,g,l,d,n.y):this.addVertex(c, +g,l,d,n.y)),null==w&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,p),g)):null==w?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&& +a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,p),g),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, +getValue:function(){return this.value}})}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,p),l)):this.addUnconnectedEdge(c,l,g,k);e&&b.createLabelSubShape(c,l);c=b.getRotation();if(0!==c)for(n=l.getGeometry(),k=n.width/2,n=n.height/2,w=0;w<l.getChildCount();w++)e=l.getChildAt(w),f.mxgraph.online.Utils.rotatedGeometry(e.getGeometry(),c,k,n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key=== b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(d,b.getId()),l);return l};l.rotatedEdgePoint=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var n=c.x-a,f=c.y-d;c.x=Math.round(n*k-f*b+a);c.y=Math.round(f*k+n*b+d)};l.prototype.addVertex=function(c,b,a,d,k){var n="",w=b.isDisplacedLabel()||b.isRotatedLabel();w||(n=b.getTextLabel());var l=b.getDimensions(), e=b.getStyleFromShape();e.html="1";var g=e.hasOwnProperty(mxConstants.STYLE_SHAPE)||e.hasOwnProperty("stencil");e.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&g||(e[mxConstants.STYLE_FILLCOLOR]="none");g||(e[mxConstants.STYLE_STROKECOLOR]="none");e.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&g||(e[mxConstants.STYLE_GRADIENTCOLOR]="none");e[mxConstants.STYLE_WHITE_SPACE]="wrap";k=b.getOriginPoint(k,!0);return g||null!=n?(e=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(e,"="),g=null,g=w?c.insertVertex(a, null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),e):c.insertVertex(a,null,n,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),e),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value= d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(d,b.getId()),g),b.setLabelOffset(g,e),w&&b.createLabelSubShape(c,g),g):null};l.calculateAbsolutePoint=function(c){for(var b=0,a=0;null!=c;){var d=c.geometry;null!=d&&(b+=d.x,a+=d.y);c=c.parent}return new mxPoint(b,a)};l.prototype.addConnectedEdge=function(c,b,a,d){var k=b.getFromSheet(),k=new f.mxgraph.io.vsdx.ShapePageId(a,k),n=function(a, b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap,k);if(null==n)return null;var w=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(a,n.getId())); -if(null!=w){var e=c.getModel().getGeometry(w);null!=e&&(d=e.height)}var g=n.getStartXY(d),z=n.getEndXY(d),e=n.getRoutingPoints(d,g,n.getRotation());this.rotateChildEdge(c.getModel(),w,g,z,e);var q=null,C=b.getSourceToSheet(),C=null!=C?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,C)):null,E=!0; -if(null==C)C=c.insertVertex(w,null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),0,0);else if(C.style&&-1==C.style.indexOf(";rotation="))var q=l.calculateAbsolutePoint(C),D=l.calculateAbsolutePoint(w),G=C.geometry,q=new mxPoint((D.x+g.x-q.x)/G.width,(D.y+g.y-q.y)/G.height);else E=!1;g=null;b=b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key=== +if(null!=w){var e=c.getModel().getGeometry(w);null!=e&&(d=e.height)}var g=n.getStartXY(d),z=n.getEndXY(d),e=n.getRoutingPoints(d,g,n.getRotation());this.rotateChildEdge(c.getModel(),w,g,z,e);var p=null,C=b.getSourceToSheet(),C=null!=C?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,C)):null,E=!0; +if(null==C)C=c.insertVertex(w,null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),0,0);else if(C.style&&-1==C.style.indexOf(";rotation="))var p=l.calculateAbsolutePoint(C),D=l.calculateAbsolutePoint(w),G=C.geometry,p=new mxPoint((D.x+g.x-p.x)/G.width,(D.y+g.y-p.y)/G.height);else E=!1;g=null;b=b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key=== b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,b)):null;D=!0;null==b?b=c.insertVertex(w,null,null,Math.floor(Math.round(100*z.x)/100),Math.floor(Math.round(100*z.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=l.calculateAbsolutePoint(b),g=l.calculateAbsolutePoint(w),G=b.geometry,g=new mxPoint((g.x+z.x-a.x)/G.width,(g.y+z.y-a.y)/G.height)):D=!1;z=n.getStyleFromEdgeShape(d);G=n.getRotation();0!==G?(a=c.insertEdge(w,null,null,C,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z, -"=")),E=n.createLabelSubShape(c,a),null!=E&&(E.setStyle(E.getStyle()+";rotation="+(60<G&&240>G?(G+180)%360:G)),E=E.getGeometry(),E.x=0,E.y=0,E.relative=!0,E.offset=new mxPoint(-E.width/2,-E.height/2))):(a=c.insertEdge(w,null,n.getTextLabel(),C,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z,"=")),G=n.getLblEdgeOffset(c.getView(),e),a.getGeometry().offset=G,null!=q&&c.setConnectionConstraint(a,C,!0,new mxConnectionConstraint(q,!1)),E&&e.shift(),null!=g&&c.setConnectionConstraint(a,b,!1,new mxConnectionConstraint(g, -!1)),D&&e.pop());E=c.getModel().getGeometry(a);if(C.parent!=b.parent&&null!=w&&1!=w.id&&1==C.parent.id){b=q=0;do g=w.geometry,null!=g&&(q+=g.x,b+=g.y),w=w.parent;while(null!=w);a.parent=C.parent;for(w=0;w<e.length;w++)e[w].x+=q,e[w].y+=b}E.points=e;z.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(z,"curved"),"1")&&(E=c.getModel().getGeometry(a),c=n.getControlPoints(d),E.points=c);return k};l.prototype.addUnconnectedEdge=function(c, -b,a,d){if(null!=b){var k=c.getModel().getGeometry(b);null!=k&&(d=k.height)}var n=a.getStartXY(d),w=a.getEndXY(d),l=a.getStyleFromEdgeShape(d),e=a.getRoutingPoints(d,n,a.getRotation()),g=a.getRotation();if(0!==g){0===a.getShapeIndex()?k=c.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex()));var q=a.createLabelSubShape(c,k);null!=q&& -(q.setStyle(q.getStyle()+";rotation="+(60<g&&240>g?(g+180)%360:g)),g=q.getGeometry(),g.x=0,g.y=0,g.relative=!0,g.offset=new mxPoint(-g.width/2,-g.height/2))}else 0===a.getShapeIndex()?k=c.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex())),g=a.getLblEdgeOffset(c.getView(),e),k.getGeometry().offset=g;this.rotateChildEdge(c.getModel(), +"=")),E=n.createLabelSubShape(c,a),null!=E&&(E.setStyle(E.getStyle()+";rotation="+(60<G&&240>G?(G+180)%360:G)),E=E.getGeometry(),E.x=0,E.y=0,E.relative=!0,E.offset=new mxPoint(-E.width/2,-E.height/2))):(a=c.insertEdge(w,null,n.getTextLabel(),C,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(z,"=")),G=n.getLblEdgeOffset(c.getView(),e),a.getGeometry().offset=G,null!=p&&c.setConnectionConstraint(a,C,!0,new mxConnectionConstraint(p,!1)),E&&e.shift(),null!=g&&c.setConnectionConstraint(a,b,!1,new mxConnectionConstraint(g, +!1)),D&&e.pop());E=c.getModel().getGeometry(a);if(C.parent!=b.parent&&null!=w&&1!=w.id&&1==C.parent.id){b=p=0;do g=w.geometry,null!=g&&(p+=g.x,b+=g.y),w=w.parent;while(null!=w);a.parent=C.parent;for(w=0;w<e.length;w++)e[w].x+=p,e[w].y+=b}E.points=e;z.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(z,"curved"),"1")&&(E=c.getModel().getGeometry(a),c=n.getControlPoints(d),E.points=c);return k};l.prototype.addUnconnectedEdge=function(c, +b,a,d){if(null!=b){var k=c.getModel().getGeometry(b);null!=k&&(d=k.height)}var n=a.getStartXY(d),w=a.getEndXY(d),l=a.getStyleFromEdgeShape(d),e=a.getRoutingPoints(d,n,a.getRotation()),g=a.getRotation();if(0!==g){0===a.getShapeIndex()?k=c.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex()));var p=a.createLabelSubShape(c,k);null!=p&& +(p.setStyle(p.getStyle()+";rotation="+(60<g&&240>g?(g+180)%360:g)),g=p.getGeometry(),g.x=0,g.y=0,g.relative=!0,g.offset=new mxPoint(-g.width/2,-g.height/2))}else 0===a.getShapeIndex()?k=c.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex())),g=a.getLblEdgeOffset(c.getView(),e),k.getGeometry().offset=g;this.rotateChildEdge(c.getModel(), b,n,w,e);b=c.getModel().getGeometry(k);e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);l.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(l,"curved"),"1")&&(b=c.getModel().getGeometry(k),c=a.getControlPoints(d),b.points=c);return k};l.prototype.rotateChildEdge=function(c,b,a,d,k){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="),-1<b))for(c=parseFloat(c.substring(b+ 9,c.indexOf(";",b))),b=n.width/2,n=n.height/2,l.rotatedEdgePoint(a,c,b,n),l.rotatedEdgePoint(d,c,b,n),a=0;a<k.length;a++)l.rotatedEdgePoint(k[a],c,b,n)}};l.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};l.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),d=a.getChildCount(b),k=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<k.push(f)}for(n=0;n<k.length;n++)a.remove(k[n]);0<d&&(d=a.getChildCount(b));k=(new String(a.getValue(b))).toString(); n=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==k.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return l}();g.mxVsdxCodec=e;e.__class="com.mxgraph.io.mxVsdxCodec"})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){var e=function(l){function c(b){var a=l.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(c,l);c.prototype.decodeVssx=function(b,a,d,k){var n=this,c="<mxlibrary>[";this.decodeVsdx(b,function(b){c=c.concat(b);var d=n.vsdxModel.getMasterShapes(),w=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b= -[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(n.vsdxModel.getPages())).next();if(null!=d){var e={str:"",toString:function(){return this.str}},g=0===b.length?"":",",y=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=y[a];var b=q.createMxGraph(),k=1;if(null!=a.pageSheet){var n=k=1,c=a.pageSheet.DrawingScale;null!=c&&(k=parseFloat(c.getAttribute("V"))||1);c=a.pageSheet.PageScale;null!=c&&(n=parseFloat(c.getAttribute("V"))|| -1);k=n/k}n=!1;for(c=0;null!=a.firstLevelShapes&&c<a.firstLevelShapes.length;c++){var A=a.firstLevelShapes[c].getShape(),z=new f.mxgraph.io.vsdx.VsdxShape(w,A,!w.isEdge(A),d,null,q.vsdxModel),A=null;if(z.isVertex()){q.edgeShapeMap.entries=[];q.parentsMap.entries=[];for(var A=q.addShape(b,z,b.getDefaultParent(),0,1169),z=function(a){null==a.entries&&(a.entries=[]);return a.entries}(q.edgeShapeMap),C=0;C<z.length;C++){var B=z[C],E=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= -a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(q.parentsMap,B.getKey());q.addUnconnectedEdge(b,E,B.getValue(),1169)}}else A=q.addUnconnectedEdge(b,null,z,1169);n|=null!=A}if(n){q.scaleGraph(b,k);k=q.normalizeGraph(b);q.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";e.str=e.str.concat(g);e.str=e.str.concat('{"xml":"');b=l.prototype.processPage.call(q,b,null);e.str=e.str.concat(b);e.str=e.str.concat('","w":'); -e.str=e.str.concat(k.width);e.str=e.str.concat(',"h":');e.str=e.str.concat(k.height);e.str=e.str.concat(',"title":');a=a.getName();null==a&&(a="");a=mxUtils.htmlEntities(JSON.stringify(a));e.str=e.str.concat(a);e.str=e.str.concat("}");g=","}};for(var q=n,G=0;G<y.length;G++)b(G);c=c.concat(e)}c=c.concat("]</mxlibrary>");if(a)try{a(c)}catch(T){null!=k?k(T):a("")}},d)};c.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint, +[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(n.vsdxModel.getPages())).next();if(null!=d){var e={str:"",toString:function(){return this.str}},g=0===b.length?"":",",y=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=y[a];var b=p.createMxGraph(),k=1;if(null!=a.pageSheet){var n=k=1,c=a.pageSheet.DrawingScale;null!=c&&(k=parseFloat(c.getAttribute("V"))||1);c=a.pageSheet.PageScale;null!=c&&(n=parseFloat(c.getAttribute("V"))|| +1);k=n/k}n=!1;for(c=0;null!=a.firstLevelShapes&&c<a.firstLevelShapes.length;c++){var A=a.firstLevelShapes[c].getShape(),z=new f.mxgraph.io.vsdx.VsdxShape(w,A,!w.isEdge(A),d,null,p.vsdxModel),A=null;if(z.isVertex()){p.edgeShapeMap.entries=[];p.parentsMap.entries=[];for(var A=p.addShape(b,z,b.getDefaultParent(),0,1169),z=function(a){null==a.entries&&(a.entries=[]);return a.entries}(p.edgeShapeMap),C=0;C<z.length;C++){var B=z[C],E=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= +a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(p.parentsMap,B.getKey());p.addUnconnectedEdge(b,E,B.getValue(),1169)}}else A=p.addUnconnectedEdge(b,null,z,1169);n|=null!=A}if(n){p.scaleGraph(b,k);k=p.normalizeGraph(b);p.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";e.str=e.str.concat(g);e.str=e.str.concat('{"xml":"');b=l.prototype.processPage.call(p,b,null);e.str=e.str.concat(b);e.str=e.str.concat('","w":'); +e.str=e.str.concat(k.width);e.str=e.str.concat(',"h":');e.str=e.str.concat(k.height);e.str=e.str.concat(',"title":');a=a.getName();null==a&&(a="");a=mxUtils.htmlEntities(JSON.stringify(a));e.str=e.str.concat(a);e.str=e.str.concat("}");g=","}};for(var p=n,G=0;G<y.length;G++)b(G);c=c.concat(e)}c=c.concat("]</mxlibrary>");if(a)try{a(c)}catch(T){null!=k?k(T):a("")}},d)};c.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint, d);this.transPoint(a.offset,d);b=a.points;if(null!=b)for(var k=0;k<b.length;k++)this.transPoint(b[k],d);this.transPoint(d,d)}return a};c.prototype.normalizeGraph=function(b){function a(a){null!=a&&(null==d?(d=a.x,k=a.y,n=a.x+(a.width||0),c=a.y+(a.height||0)):(d=Math.min(a.x,d),k=Math.min(a.y,k),n=Math.max(a.x+(a.width||0),n),c=Math.max(a.y+(a.height||0),c)))}var d,k,n,c,f;for(f in b.model.cells){var l=b.model.cells[f],e=l.geometry;if(null!=e&&1==l.parent.id)if(l.vertex)a(e);else for(a(e.sourcePoint), a(e.targetPoint),l=e.points,e=0;null!=l&&e<l.length;e++)a(l[e])}var g={x:d,y:k};for(f in b.model.cells)if(l=b.model.cells[f],e=l.geometry,null!=e&&1==l.parent.id&&(e.x-=d,e.y-=k,l.isEdge()))for(this.transPoint(e.sourcePoint,g),this.transPoint(e.targetPoint,g),this.transPoint(e.offset,g),l=e.points,e=0;null!=l&&e<l.length;e++)this.transPoint(l[e],g);return{width:n-d,height:c-k}};c.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};c.prototype.processPage=function(b,a){var d=b.getModel(), k="",n="",c;for(c in d.cells){var e=d.cells[c];if(b.getDefaultParent()===d.getParent(e)){var k=k.concat(n),k=k.concat('{"xml":"'),g=this.createMxGraph();g.addCell(e);this.sanitiseGraph(g);if(0===g.getModel().getChildCount(g.getDefaultParent()))return"continue";n=this.normalizeGeo(e);g=l.prototype.processPage.call(this,g,null);k=k.concat(g);k=k.concat('","w":');k=k.concat(n.width);k=k.concat(',"h":');k=k.concat(n.height);k=k.concat(',"title":"');n=d.getStyle(e);e="";if(null!=n&&(g=n.indexOf(f.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID), -0<=g)){g+=f.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;c=parseInt(n.substring(g,n.indexOf(";",g)));a:{n=this.vertexShapeMap;g=new f.mxgraph.io.vsdx.ShapePageId(a.getId(),c);null==n.entries&&(n.entries=[]);for(var q=0;q<n.entries.length;q++)if(null!=n.entries[q].key.equals&&n.entries[q].key.equals(g)||n.entries[q].key===g){n=n.entries[q].value;break a}n=null}null!=n&&(e=n.getName())}k=k.concat(e);k=k.concat('"}');n=","}}this.RESPONSE_DIAGRAM_START=0<k.length?",":"";return k};return c}(f.mxgraph.io.mxVsdxCodec); +0<=g)){g+=f.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;c=parseInt(n.substring(g,n.indexOf(";",g)));a:{n=this.vertexShapeMap;g=new f.mxgraph.io.vsdx.ShapePageId(a.getId(),c);null==n.entries&&(n.entries=[]);for(var p=0;p<n.entries.length;p++)if(null!=n.entries[p].key.equals&&n.entries[p].key.equals(g)||n.entries[p].key===g){n=n.entries[p].value;break a}n=null}null!=n&&(e=n.getName())}k=k.concat(e);k=k.concat('"}');n=","}}this.RESPONSE_DIAGRAM_START=0<k.length?",":"";return k};return c}(f.mxgraph.io.mxVsdxCodec); g.mxVssxCodec=e;e.__class="com.mxgraph.io.mxVssxCodec"})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a,b,k){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=k}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA= function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();f.Row=c;c.__class="com.mxgraph.io.vsdx.geometry.Row"})(f.geometry||(f.geometry={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(k){}return null};b.getRowObj=function(a,d){var k=a.getAttribute("T"),n=b.getIndex(a),c;c=(c=a.getAttribute("Del"))&&c.equals?c.equals("1"):"1"===c;if(!c){var e=null;n<=d.length&&(e=d[n-1]);var l=c=null,g=null, -q=null,C=null,E=null,D=null,G=null;null!=e&&(c=e.x,l=e.y,g=e.getA(),q=e.getB(),C=e.getC(),E=e.getD(),G=e.getFormulaA(),D=e.getFormulaE());for(var e=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),T=0;T<e.length;T++){var M=e[T],X=M.getAttribute("N"),ba=M.getAttribute("V");switch(X){case "X":c=b.getDoubleVal(ba);break;case "Y":l=b.getDoubleVal(ba);break;case "A":g=b.getDoubleVal(ba);G=M.getAttribute("V");break;case "B":q=b.getDoubleVal(ba);break;case "C":C=b.getDoubleVal(ba);break;case "D":E= -b.getDoubleVal(ba);break;case "E":D=ba}}switch(k){case "MoveTo":return new f.mxgraph.io.vsdx.geometry.MoveTo(n,c,l);case "LineTo":return new f.mxgraph.io.vsdx.geometry.LineTo(n,c,l);case "ArcTo":return new f.mxgraph.io.vsdx.geometry.ArcTo(n,c,l,g);case "Ellipse":return new f.mxgraph.io.vsdx.geometry.Ellipse(n,c,l,g,q,C,E);case "EllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.EllipticalArcTo(n,c,l,g,q,C,E);case "InfiniteLine":return new f.mxgraph.io.vsdx.geometry.InfiniteLine(n,c,l,g,q);case "NURBSTo":return new f.mxgraph.io.vsdx.geometry.NURBSTo(n, -c,l,g,q,C,E,D);case "PolylineTo":return new f.mxgraph.io.vsdx.geometry.PolylineTo(n,c,l,G);case "RelCubBezTo":return new f.mxgraph.io.vsdx.geometry.RelCubBezTo(n,c,l,g,q,C,E);case "RelEllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(n,c,l,g,q,C,E);case "RelLineTo":return new f.mxgraph.io.vsdx.geometry.RelLineTo(n,c,l);case "RelMoveTo":return new f.mxgraph.io.vsdx.geometry.RelMoveTo(n,c,l);case "RelQuadBezTo":return new f.mxgraph.io.vsdx.geometry.RelQuadBezTo(n,c,l,g,q);case "SplineKnot":return new f.mxgraph.io.vsdx.geometry.SplineKnot(n, -c,l,g);case "SplineStart":return new f.mxgraph.io.vsdx.geometry.SplineStart(n,c,l,g,q,C,E)}}return new f.mxgraph.io.vsdx.geometry.DelRow(n)};return b}();e.RowFactory=c;c.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); +p=null,C=null,E=null,D=null,G=null;null!=e&&(c=e.x,l=e.y,g=e.getA(),p=e.getB(),C=e.getC(),E=e.getD(),G=e.getFormulaA(),D=e.getFormulaE());for(var e=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),T=0;T<e.length;T++){var M=e[T],X=M.getAttribute("N"),ba=M.getAttribute("V");switch(X){case "X":c=b.getDoubleVal(ba);break;case "Y":l=b.getDoubleVal(ba);break;case "A":g=b.getDoubleVal(ba);G=M.getAttribute("V");break;case "B":p=b.getDoubleVal(ba);break;case "C":C=b.getDoubleVal(ba);break;case "D":E= +b.getDoubleVal(ba);break;case "E":D=ba}}switch(k){case "MoveTo":return new f.mxgraph.io.vsdx.geometry.MoveTo(n,c,l);case "LineTo":return new f.mxgraph.io.vsdx.geometry.LineTo(n,c,l);case "ArcTo":return new f.mxgraph.io.vsdx.geometry.ArcTo(n,c,l,g);case "Ellipse":return new f.mxgraph.io.vsdx.geometry.Ellipse(n,c,l,g,p,C,E);case "EllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.EllipticalArcTo(n,c,l,g,p,C,E);case "InfiniteLine":return new f.mxgraph.io.vsdx.geometry.InfiniteLine(n,c,l,g,p);case "NURBSTo":return new f.mxgraph.io.vsdx.geometry.NURBSTo(n, +c,l,g,p,C,E,D);case "PolylineTo":return new f.mxgraph.io.vsdx.geometry.PolylineTo(n,c,l,G);case "RelCubBezTo":return new f.mxgraph.io.vsdx.geometry.RelCubBezTo(n,c,l,g,p,C,E);case "RelEllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(n,c,l,g,p,C,E);case "RelLineTo":return new f.mxgraph.io.vsdx.geometry.RelLineTo(n,c,l);case "RelMoveTo":return new f.mxgraph.io.vsdx.geometry.RelMoveTo(n,c,l);case "RelQuadBezTo":return new f.mxgraph.io.vsdx.geometry.RelQuadBezTo(n,c,l,g,p);case "SplineKnot":return new f.mxgraph.io.vsdx.geometry.SplineKnot(n, +c,l,g);case "SplineStart":return new f.mxgraph.io.vsdx.geometry.SplineStart(n,c,l,g,p,C,E)}}return new f.mxgraph.io.vsdx.geometry.DelRow(n)};return b}();e.RowFactory=c;c.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){var l=function(){function c(){this.colorElementMap={};this.fontElementMap={}}c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.defaultColors_$LI$=function(){c.__static_initialize();null==c.defaultColors&&(c.defaultColors={});return c.defaultColors};c.__static_initializer_0=function(){c.defaultColors_$LI$()["0"]="#000000";c.defaultColors_$LI$()["1"]="#FFFFFF";c.defaultColors_$LI$()["2"]= "#FF0000";c.defaultColors_$LI$()["3"]="#00FF00";c.defaultColors_$LI$()["4"]="#0000FF";c.defaultColors_$LI$()["5"]="#FFFF00";c.defaultColors_$LI$()["6"]="#FF00FF";c.defaultColors_$LI$()["7"]="#00FFFF";c.defaultColors_$LI$()["8"]="#800000";c.defaultColors_$LI$()["9"]="#008000";c.defaultColors_$LI$()["10"]="#000080";c.defaultColors_$LI$()["11"]="#808000";c.defaultColors_$LI$()["12"]="#800080";c.defaultColors_$LI$()["13"]="#008080";c.defaultColors_$LI$()["14"]="#C0C0C0";c.defaultColors_$LI$()["15"]="#E6E6E6"; c.defaultColors_$LI$()["16"]="#CDCDCD";c.defaultColors_$LI$()["17"]="#B3B3B3";c.defaultColors_$LI$()["18"]="#9A9A9A";c.defaultColors_$LI$()["19"]="#808080";c.defaultColors_$LI$()["20"]="#666666";c.defaultColors_$LI$()["21"]="#4D4D4D";c.defaultColors_$LI$()["22"]="#333333";c.defaultColors_$LI$()["23"]="#1A1A1A"};c.prototype.initialise=function(b,a){if(null!=b){var d=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<d.length)for(var k=d.item(0).getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY), @@ -1057,8 +1057,8 @@ c.prototype.isNoLine=function(){return this.noLine};c.prototype.isNoShow=functio (function(f){(function(g){(function(g){(function(e){var l=function(){function c(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}c.prototype.addGeometry=function(b){b=new f.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(0<this.geomList.push(b),this.sortNeeded=!0)};c.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare? b.sort(function(b,k){return a.compare(b,k)}):b.sort(a)}(this.geomList,new c.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};c.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};c.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};c.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&& !a.isNoLine())return!1}return!0};c.prototype.hasGeom=function(){return 0!=this.geomList.length};c.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};c.prototype.rotatedPoint=function(b,a,d){var k=b.y*a+b.x*d;b.x=b.x*a-b.y*d;b.y=k};c.prototype.getRoutingPoints=function(b,a,d){this.sort();b=[];0<b.push(a.clone());for(var k=0,n=0,c=0;c<this.geomList.length;c++){var e=this.geomList[c];if(!e.isNoShow())for(var e=e.getRows(),l=0;l<e.length;l++){var g= -e[l];if(0==l&&null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.MoveTo)k=null!=g.x?g.x:0,n=null!=g.y?g.y:0;else if(null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.LineTo){var q=null!=g.x?g.x:0,g=null!=g.y?g.y:0,C=new mxPoint(q,g);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(C,Math.cos(d),Math.sin(d)));q=(C.x-k)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q+=a.x;g=(C.y-n)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;g+=a.y;q=Math.round(100*q)/100;g=Math.round(100*g)/100;C.x= -q;C.y=g;0<b.push(C)}}}return b};c.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},k=d.str.length,n;n=this.processGeo(b,a,d,-1,!0);n=this.processGeo(b,a,d,n,!1);if(d.str.length===k)return"";this.closePath(d,n);d.str=d.str.concat("</foreground></shape>");return d.str};c.prototype.processGeo=function(b,a,d,k,n){var c=b.getRounding(),e="";0<c&&(e=' rounded="1" arcSize="'+c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+ +e[l];if(0==l&&null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.MoveTo)k=null!=g.x?g.x:0,n=null!=g.y?g.y:0;else if(null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.LineTo){var p=null!=g.x?g.x:0,g=null!=g.y?g.y:0,C=new mxPoint(p,g);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(C,Math.cos(d),Math.sin(d)));p=(C.x-k)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p+=a.x;g=(C.y-n)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;g+=a.y;p=Math.round(100*p)/100;g=Math.round(100*g)/100;C.x= +p;C.y=g;0<b.push(C)}}}return b};c.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},k=d.str.length,n;n=this.processGeo(b,a,d,-1,!0);n=this.processGeo(b,a,d,n,!1);if(d.str.length===k)return"";this.closePath(d,n);d.str=d.str.concat("</foreground></shape>");return d.str};c.prototype.processGeo=function(b,a,d,k,n){var c=b.getRounding(),e="";0<c&&(e=' rounded="1" arcSize="'+c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+ '" ');for(c=0;c<this.geomList.length;c++){var l=this.geomList[c];if(n!==l.isNoFill()){var g=l.getPathXML(a,b);0!==g.length&&(l=this.getGeoStyle(l),-1===k?d.str=d.str.concat("<path"+e+">"):k!==l&&(this.closePath(d,k),d.str=d.str.concat("<path"+e+">")),d.str=d.str.concat(g),k=l)}}return k};c.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};c.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"): 2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return c}();e.mxVsdxGeometryList=l;l.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(c){var b=function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(l=e.mxVsdxGeometryList||(e.mxVsdxGeometryList={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com= {})); @@ -1083,9 +1083,9 @@ function(){return this.pm};c.prototype.setPropertiesManager=function(b){this.pm= (function(f){(function(g){(function(g){(function(e){var l=function(){function c(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.pageSheet=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.cellElements={};this.model=a;this.pageElement=b;this.layers=[];var d=b.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),k;if(k=null!=d)k=f.mxgraph.io.vsdx.mxVsdxConstants.TRUE,k=d&&d.equals?d.equals(k):d===k;this.__isBackground=k?!0:!1;d=b.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE); null!=d&&0<d.length&&(this.backPageId=parseFloat(d));this.Id=parseFloat(b.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<d.length){d=d[0];k=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell");for(var n=0;n<k.length;n++){var c=k[n],e=c.getAttribute("N");this.cellElements[e]=c}d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d, "Section");for(k=0;k<d.length;k++)if(n=d[k],e=n.getAttribute("N"),"Layer"==e)for(e=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n,"Row"),n=0;n<e.length;n++){for(var c=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(e[n],"Cell"),l={},g=0;g<c.length;g++)l[c[g].getAttribute("N")]=c[g].getAttribute("V");this.layers[parseInt(e[n].getAttribute("IX"))]=l}}this.parseNodes(b,a,"pages")}c.prototype.parseNodes=function(b,a,d){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var k= -b,n=k.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Rel"))this.resolveRel(k,a,d);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Shapes"))this.shapes=this.parseShapes(k,null,!1);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,"Connects"))for(k=k.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),k=null!=k&&0<k.length?k.item(0):null;null!=k;){if(null!=k&&1==k.nodeType){var n=k,c=new f.mxgraph.io.vsdx.mxVsdxConnect(n),e=c.getFromSheet(), -e=null!=e&&-1<e?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.connects,e):null;null!=e?e.addConnect(n):function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, -getValue:function(){return this.value}})}(this.connects,c.getFromSheet(),c)}k=k.nextSibling}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(n,"PageSheet")&&(this.pageSheet=k)}b=b.nextSibling}};c.prototype.resolveRel=function(b,a,d){d=a.getRelationship(b.getAttribute("r:id"),f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+d+".xml.rels");b=d.getAttribute("Target");d=d.getAttribute("Type");if(function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}((new String(d)).toString(), +b,c=k.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"Rel"))this.resolveRel(k,a,d);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"Shapes"))this.shapes=this.parseShapes(k,null,!1);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"Connects"))for(k=k.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),k=null!=k&&0<k.length?k.item(0):null;null!=k;){if(null!=k&&1==k.nodeType){var c=k,e=new f.mxgraph.io.vsdx.mxVsdxConnect(c),l=e.getFromSheet(), +l=null!=l&&-1<l?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.connects,l):null;null!=l?l.addConnect(c):function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key}, +getValue:function(){return this.value}})}(this.connects,e.getFromSheet(),e)}k=k.nextSibling}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(c,"PageSheet")&&(this.pageSheet=k)}b=b.nextSibling}};c.prototype.resolveRel=function(b,a,d){d=a.getRelationship(b.getAttribute("r:id"),f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+d+".xml.rels");b=d.getAttribute("Target");d=d.getAttribute("Type");if(function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}((new String(d)).toString(), "page")){var k=null;null!=d&&function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(d,"page")&&(k=a.getXmlDoc(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=k)for(d=k.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(a,b){return a&&a.equals?a.equals(b):a===b}(d.tagName,"PageContents")){k=b.indexOf(".");-1!==k&&this.parseNodes(d,a,b.substring(0,k));break}d=d.nextSibling}}};c.prototype.parseShapes=function(b,a,d){d={};b=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.SHAPE); for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var k=b,c=a;if(null==c){var e=k.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==e||function(a,b){return a&&a.equals?a.equals(b):a===b}(e,"")||(c=this.model.getMaster(e))}var l=this.isEdge(k);l||null==c||(e=k.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),l=c.getMasterElement(),null==e||function(a,b){return a&&a.equals?a.equals(b):a===b}(e,"")||(e=c.getSubShape(e),l=null!=e?e.getShape():l),l=this.isEdge(l)); k=this.createCell(k,!l,c);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(d,k.getId(),k)}b=b.nextSibling}return d};c.prototype.createCell=function(b,a,d){return new f.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),d,this.model)}; @@ -1110,8 +1110,8 @@ a.equals(b):a===b}(k,"a:fontScheme")?(function(a,b){return a&&a.equals?a.equals( n)}this.isProcessed=!0}};c.prototype.processExtras=function(b){b=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(d.nodeName){case "vt:fmtConnectorScheme":var k;k=this.name;var c=d.getAttribute("name");k=k&&k.equals?k.equals(c):k===c;k||(this.__isPure=!1);d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(k=0;k<d.length;k++)switch(c=d[k],c.nodeName){case "a:fillStyleLst":for(var c= f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),e=0;e<c.length;e++)0<this.connFillStyles.push(f.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(c[e]));break;case "a:lnStyleLst":for(c=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),e=0;e<c.length;e++)0<this.connLineStyles.push(new f.mxgraph.io.vsdx.theme.LineStyle(c[e]))}break;case "vt:lineStyles":d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(k=0;k<d.length;k++)switch(c=d[k],c.nodeName){case "vt:fmtConnectorSchemeLineStyles":c= f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(e=0;e<c.length;e++)0<this.connLineStylesExt.push(new f.mxgraph.io.vsdx.theme.LineStyleExt(c[e]));break;case "vt:fmtSchemeLineStyles":for(c=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),e=0;e<c.length;e++)0<this.lineStylesExt.push(new f.mxgraph.io.vsdx.theme.LineStyleExt(c[e]))}break;case "vt:fontStylesGroup":d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d);for(k=0;k<d.length;k++)switch(c=d[k],c.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(c, -this.connFontColors,this.connFontStyles);break;case "vt:fontStyles":this.fillFontStyles(c,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),c=k=0;c<d.length;c++){e=d[c];this.variantEmbellishment[k]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(e,"embellishment");for(var e=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(e),l=0,g=0;g<e.length;g++){var q=e[g];this.variantFillIdx[k][l]= -f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(q,"fillIdx");this.variantLineIdx[k][l]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(q,"lineIdx");this.variantEffectIdx[k][l]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(q,"effectIdx");this.variantFontIdx[k][l]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(q,"fontIdx");l++}k++}}}};c.prototype.fillFontStyles=function(b,a,d){b= +this.connFontColors,this.connFontStyles);break;case "vt:fontStyles":this.fillFontStyles(c,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),c=k=0;c<d.length;c++){e=d[c];this.variantEmbellishment[k]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(e,"embellishment");for(var e=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(e),l=0,g=0;g<e.length;g++){var p=e[g];this.variantFillIdx[k][l]= +f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"fillIdx");this.variantLineIdx[k][l]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"lineIdx");this.variantEffectIdx[k][l]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"effectIdx");this.variantFontIdx[k][l]=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"fontIdx");l++}k++}}}};c.prototype.fillFontStyles=function(b,a,d){b= f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var k=0;k<b.length;k++){var c=b[k];0<d.push(f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,"style"));c=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&0<a.push(f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c)))}};c.prototype.processFormats=function(b){b=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a= 0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "a:fillStyleLst":for(var d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),k=0;k<d.length;k++)0<this.fillStyles.push(f.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(d[k]));break;case "a:lnStyleLst":for(d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(d),k=0;k<d.length;k++)0<this.lineStyles.push(new f.mxgraph.io.vsdx.theme.LineStyle(d[k]))}}};c.prototype.processFonts=function(b){};c.prototype.processColors=function(b){for(b=b.firstChild;null!= b;){if(null!=b&&1==b.nodeType){var a=b,d=a.nodeName,a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),k;k=(k=d)&&k.equals?k.equals("a:extLst"):"a:extLst"===k;k?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(d=d.substring(2),0<a.length&&this.addBasicColor(d,a[0]))}b=b.nextSibling}};c.prototype.addVariantColors=function(b){b=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b); @@ -1135,7 +1135,7 @@ Array||null===a)&&(null!=d&&d instanceof Array||null===d))return this.getLineDas this.lineStylesExt,this.lineStyles)};c.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};c.prototype.getArrowSize=function(b,a,d,k){d=this.getLineStyleExt(b.getQuickStyleLineMatrix(),d);if(null!=d)return a?d.getStartSize():d.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),k);return null!=b?a?b.getStartSize():b.getEndSize():4};c.prototype.getStartSize= function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};c.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};c.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};c.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};c.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b, a){this.processTheme();var d=b.getQuickStyleFontColor(),k=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:k=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(d=100),k=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(k=this.baseColors,k=k.dk1?k.dk1:null):k=a[this.variantFontIdx[this.themeVariant][k]-1]}d=null!=k?k.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(d,this):this.getStyleColor(d);if(0< -(b.getQuickStyleVariation()&2)){var c=this.getStyleColor(8).toHsl(),e=d.toHsl(),k=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),l=k.toHsl(),g=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),q=g.toHsl();.1666<=Math.abs(c.getLum()-e.getLum())||(.7292>=c.getLum()?d=new f.mxgraph.io.vsdx.theme.Color(255,255,255):(q=Math.abs(c.getLum()-q.getLum()),l=Math.abs(c.getLum()-l.getLum()),c=Math.abs(c.getLum()-e.getLum()),c=Math.max(q,l,c),c==q?d=g:c==l&&(d=k)))}return d};c.prototype.getFontColor= +(b.getQuickStyleVariation()&2)){var c=this.getStyleColor(8).toHsl(),e=d.toHsl(),k=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),l=k.toHsl(),g=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b),p=g.toHsl();.1666<=Math.abs(c.getLum()-e.getLum())||(.7292>=c.getLum()?d=new f.mxgraph.io.vsdx.theme.Color(255,255,255):(p=Math.abs(c.getLum()-p.getLum()),l=Math.abs(c.getLum()-l.getLum()),c=Math.abs(c.getLum()-e.getLum()),c=Math.max(p,l,c),c==p?d=g:c==l&&(d=k)))}return d};c.prototype.getFontColor= function(b,a){if((null!=b&&b instanceof f.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof f.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};c.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b, this.fontColors)};c.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};c.prototype.getArrowType=function(b,a,d,k){d=this.getLineStyleExt(b.getQuickStyleLineMatrix(),d);if(null!=d)return a?d.getStart():d.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),k);return null!=b?a?b.getStart():b.getEnd():0};c.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)}; c.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};c.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){var d=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=d?d.getLineWidth():0};c.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof f.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b, @@ -1157,15 +1157,15 @@ a.equals?a.equals(b):a===b}(e,a))return g}}return null};return c}();e.Section=l; (f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=k}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue}; b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,k=this.getBlue()/255,c=Math.max(a,Math.max(b,k)),e=Math.min(a,Math.min(b,k)),l=(c+e)/2;if(c===e)a=e=0;else var g=c-e,e=.5<l?g/(2-c-e):g/(c+e),a=(c===a?(b-k)/g+(b<k?6:0):c===b?(k-a)/g+2:(a-b)/g+4)/6;return new f.mxgraph.io.vsdx.theme.HSLColor(a,e,l)};b.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,k=this.getBlue()/255,c=Math.max(a,Math.max(b,k)),e=Math.min(a, -Math.min(b,k)),l=c-e,a=c===e?0:(c===a?(b-k)/l+(b<k?6:0):c===b?(k-a)/l+2:(a-b)/l+4)/6;return new f.mxgraph.io.vsdx.theme.HSVColor(a,0===c?0:l/c,c)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16),a=1==a.length?"0"+a:a,b=this.green.toString(16),b=1==b.length?"0"+b:b,k=this.blue.toString(16),k=1==k.length?"0"+k:k;return"#"+a+b+k};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr= +Math.min(b,k)),l=c-e,a=c===e?0:(c===a?(b-k)/l+(b<k?6:0):c===b?(k-a)/l+2:(a-b)/l+4)/6;return new f.mxgraph.io.vsdx.theme.HSVColor(a,0===c?0:l/c,c)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16),a=1==a.length?"0"+a:a,b=this.green.toString(16),b=1==b.length?"0"+b:b,c=this.blue.toString(16),c=1==c.length?"0"+c:c;return"#"+a+b+c};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr= function(a){this.gradientClr=a};return b}();e.Color=c;c.__class="com.mxgraph.io.vsdx.theme.Color"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new f.mxgraph.io.vsdx.theme.SolidFillStyle(f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new f.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new f.mxgraph.io.vsdx.theme.GradFill(a)}return b};return b}();e.FillStyleFactory= c;c.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a){this.color2=this.color1=null;a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length- 1]))));null==this.color1&&(this.color1=this.color2=new f.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return b}();e.GradFill=c;c.__class="com.mxgraph.io.vsdx.theme.GradFill";c.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph= {}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=k}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,k){0>k&&(k+=1);1<k&&--k;return k<1/6? -a+6*(b-a)*k:.5>k?b:k<2/3?a+(b-a)*(2/3-k)*6:a};b.prototype.toRgb=function(){var a,b,k;k=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=k=a;else{var c=.5>a?a*(1+b):a+b-a*b,e=2*a-c;a=this.hue2rgb(e,c,k+1/3);b=this.hue2rgb(e,c,k);k=this.hue2rgb(e,c,k-1/3)}return new f.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*k|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*= +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,c){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=c}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,c){0>c&&(c+=1);1<c&&--c;return c<1/6? +a+6*(b-a)*c:.5>c?b:c<2/3?a+(b-a)*(2/3-c)*6:a};b.prototype.toRgb=function(){var a,b,c;c=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=c=a;else{var n=.5>a?a*(1+b):a+b-a*b,e=2*a-n;a=this.hue2rgb(e,n,c+1/3);b=this.hue2rgb(e,n,c);c=this.hue2rgb(e,n,c-1/3)}return new f.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*c|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*= a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();e.HSLColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,c){this.h=a;this.s=b;this.v=c}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,c=Math.floor(a),n=a-c,a=this.v*(1-b),e=this.v*(1-n*b),b=this.v*(1-(1-n)*b),c=(c|0)%6;return new f.mxgraph.io.vsdx.theme.Color(255*[this.v,e,a,a,b,this.v][c]|0,255*[b,this.v,this.v,e,a,a][c]|0,255*[a,a,b,this.v,this.v,e][c]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*= 1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();e.HSVColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx= @@ -1196,8 +1196,8 @@ function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new f.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new f.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new f.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")), parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new f.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new f.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new f.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var c=0;c<a.length;c++){var n=a[c],e=parseInt(n.getAttribute("val"))/1E3|0;switch(n.nodeName){case "a:tint":b.setTint(e);break; case "a:shade":b.setShade(e);break;case "a:satMod":b.setSatMod(e);break;case "a:lumMod":b.setLumMod(e);break;case "a:hueMod":b.setHueMod(e)}}return b};return b}();e.OoxmlColorFactory=c;c.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a,b,c,n,f,e,l,g,q,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=c;this.quickStyleFontColor=n;this.quickStyleFontMatrix=f;this.quickStyleLineColor= -e;this.quickStyleLineMatrix=l;this.quickStyleShadowColor=g;this.quickStyleType=q;this.quickStyleVariation=C}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix}; +(function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a,b,c,n,f,e,l,g,p,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=c;this.quickStyleFontColor=n;this.quickStyleFontMatrix=f;this.quickStyleLineColor= +e;this.quickStyleLineMatrix=l;this.quickStyleShadowColor=g;this.quickStyleType=p;this.quickStyleVariation=C}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix}; b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor= function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType= function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();f.QuickStyleVals=c;c.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); @@ -1205,36 +1205,36 @@ function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a (function(f){(function(f){(function(f){var e=function(){function f(){}f.MAX_AREA_$LI$=function(){null==f.MAX_AREA&&(f.MAX_AREA=1E8);return f.MAX_AREA};return f}();e.MAX_REQUEST_SIZE=52428800;e.IMAGE_DOMAIN="http://img.diagramly.com/";f.Constants=e;e.__class="com.mxgraph.online.Constants"})(f.online||(f.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(f){(function(f){var e=function(){function f(){}f.getRotatedPoint=function(c,b,a,d){var k=c.x-d.x;c=c.y-d.y;return new mxPoint(k*b-c*a+d.x,c*b+k*a+d.y)};f.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var n=c.getCenterX()-a,f=c.getCenterY()-d;c.x=Math.round(n*k-f*b+a-c.width/2);c.y=Math.round(f*k+n*b+d-c.height/2)};return f}();e.CHARSET_FOR_URL_ENCODING="ISO-8859-1";f.Utils=e;e.__class="com.mxgraph.online.Utils"})(f.online||(f.online={}))})(f.mxgraph|| (f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,n,f){a=b.call(this,a,c,n)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),c=b.getWidth(),k=Math.floor(Math.round(b.getLastX()*c)/100),e=Math.floor(Math.round(b.getLastY()*d)/100),g=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.a* -f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=Math.abs(g-k),e=Math.abs(l-e),k=e=.5*q+(k*k+e*e)/(8*q),E=Math.abs(e),e=Math.round(100*e/c*100)/100,k=Math.round(100*k/d*100)/100,g=Math.round(100*g/c*100)/100,l=Math.round(100*l/d*100)/100,q=Math.round(100*q)/100,e=Math.abs(e),k=Math.abs(k),d=0>q?"1":"0",q=E<Math.abs(q)?"1":"0";b.setLastX(g);b.setLastY(l);return'<arc rx="'+(new String(e)).toString()+'" ry="'+(new String(k)).toString()+'" x="'+(new String(g)).toString()+'" y="'+(new String(l)).toString()+ -'" x-axis-rotation="0" large-arc-flag="'+q+'" sweep-flag="'+d+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.ArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,n,f){a=b.call(this,a,c,n)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),c=b.getWidth(),k=Math.floor(Math.round(b.getLastX()*c)/100),e=Math.floor(Math.round(b.getLastY()*d)/100),l=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=d-g,p=this.a* +f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=Math.abs(l-k),e=Math.abs(g-e),k=e=.5*p+(k*k+e*e)/(8*p),E=Math.abs(e),e=Math.round(100*e/c*100)/100,k=Math.round(100*k/d*100)/100,l=Math.round(100*l/c*100)/100,g=Math.round(100*g/d*100)/100,p=Math.round(100*p)/100,e=Math.abs(e),k=Math.abs(k),d=0>p?"1":"0",p=E<Math.abs(p)?"1":"0";b.setLastX(l);b.setLastY(g);return'<arc rx="'+(new String(e)).toString()+'" ry="'+(new String(k)).toString()+'" x="'+(new String(l)).toString()+'" y="'+(new String(g)).toString()+ +'" x-axis-rotation="0" large-arc-flag="'+p+'" sweep-flag="'+d+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.ArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){return b.call(this,a,null,null)||this}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.DelRow=c;c.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,n,f,e,g,l){a=b.call(this,a,c,n)||this;a.a=f;a.b=e;a.c=g;a.d=l;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), -l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),E=this.d*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=Math.abs(g-k),l=Math.abs(l-e),l=Math.sqrt(g*g+l*l),q=Math.abs(q-k),E=Math.abs(d-E-e),k=100*k/c,E=Math.round(100*Math.sqrt(q*q+E*E)/d/2*100)/100,c=Math.round(100*l/c/2*100)/100,q=Math.round(100*(k-2*c))/100,k=Math.round(100*(k+2*c))/100,d=Math.round(100*e/d*100)/100;return'<move x="'+(new String(q)).toString()+ -'" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(q)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.Ellipse= +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,p=this.c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),E=this.d*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=Math.abs(g-k),l=Math.abs(l-e),l=Math.sqrt(g*g+l*l),p=Math.abs(p-k),E=Math.abs(d-E-e),k=100*k/c,E=Math.round(100*Math.sqrt(p*p+E*E)/d/2*100)/100,c=Math.round(100*l/c/2*100)/100,p=Math.round(100*(k-2*c))/100,k=Math.round(100*(k+2*c))/100,d=Math.round(100*e/d*100)/100;return'<move x="'+(new String(p)).toString()+ +'" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(p)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.Ellipse= c;c.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), -l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.c,E=this.d,k=100*k/c,e=100*e/d,D=b.getLastX()*c/100,G=b.getLastY()*d/100,T=k*c/100,M=e*d/100,X=d-l,ba=-q,q=Math.sqrt(D*D+G*G)*Math.cos(Math.atan2(G,D)-ba),l=Math.sqrt(D*D+G*G)*Math.sin(Math.atan2(G,D)-ba),ea=Math.sqrt(T*T+M*M)*Math.cos(Math.atan2(M,T)-ba),O=Math.sqrt(T*T+M*M)*Math.sin(Math.atan2(M,T)-ba),ma=Math.sqrt(g*g+X*X)*Math.cos(Math.atan2(X,g)-ba),ia=Math.sqrt(g*g+X*X)*Math.sin(Math.atan2(X,g)-ba),Z=((q-ea)*(q+ea)*(O-ia)- -(ea-ma)*(ea+ma)*(l-O)+E*E*(l-O)*(O-ia)*(l-ia))/(2*((q-ea)*(O-ia)-(ea-ma)*(l-O))),Fb=((q-ea)*(ea-ma)*(q-ma)/(E*E)+(ea-ma)*(l-O)*(l+O)-(q-ea)*(O-ia)*(O+ia))/(2*((ea-ma)*(l-O)-(q-ea)*(O-ia))),da=q-Z,Va=l-Fb,da=Math.sqrt(da*da+Va*Va*E*E),E=da/E,ba=180*ba/Math.PI,k=Math.round(100*k)/100,e=Math.round(100*e)/100,da=Math.round(100*da/c*100)/100,E=Math.round(100*E/d*100)/100,ba=Math.round(100*ba)/100,d=0<(T-D)*(X-G)-(M-G)*(g-D)?"0":"1",c="0";f.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(Z,Fb,q,l,ea,O,ma, -ia)&&this.isReflexAngle(Z,Fb,q,l,ea,O,ma,ia)&&(c="1");b.setLastX(k);b.setLastY(e);return'<arc rx="'+(new String(da)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(e)).toString()+'" x-axis-rotation="'+(new String(ba)).toString()+'" large-arc-flag="'+c+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,f,e,g,l,q){c-=a;f-=b;g-=b;e=l-a;q-=b;b=a=0;c=180*(Math.atan2(f,c)-Math.atan2(b,a))/Math.PI;e=180*(Math.atan2(g,e)-Math.atan2(b, -a))/Math.PI;a=180*(Math.atan2(q,l)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;e=(e-a)%360;180<c?c-=360:-180>c&&(c+=360);180<e?e-=360:-180>e&&(e+=360);return(0<c&&0>e||0>c&&0<e)&&180<Math.abs(c-e)?!0:!1};return a}(f.mxgraph.io.vsdx.geometry.Row);e.EllipticalArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.c,E=this.d,k=100*k/c,e=100*e/d,D=b.getLastX()*c/100,G=b.getLastY()*d/100,T=k*c/100,M=e*d/100,X=d-l,ba=-p,p=Math.sqrt(D*D+G*G)*Math.cos(Math.atan2(G,D)-ba),l=Math.sqrt(D*D+G*G)*Math.sin(Math.atan2(G,D)-ba),ea=Math.sqrt(T*T+M*M)*Math.cos(Math.atan2(M,T)-ba),O=Math.sqrt(T*T+M*M)*Math.sin(Math.atan2(M,T)-ba),na=Math.sqrt(g*g+X*X)*Math.cos(Math.atan2(X,g)-ba),ia=Math.sqrt(g*g+X*X)*Math.sin(Math.atan2(X,g)-ba),Z=((p-ea)*(p+ea)*(O-ia)- +(ea-na)*(ea+na)*(l-O)+E*E*(l-O)*(O-ia)*(l-ia))/(2*((p-ea)*(O-ia)-(ea-na)*(l-O))),Fb=((p-ea)*(ea-na)*(p-na)/(E*E)+(ea-na)*(l-O)*(l+O)-(p-ea)*(O-ia)*(O+ia))/(2*((ea-na)*(l-O)-(p-ea)*(O-ia))),da=p-Z,Va=l-Fb,da=Math.sqrt(da*da+Va*Va*E*E),E=da/E,ba=180*ba/Math.PI,k=Math.round(100*k)/100,e=Math.round(100*e)/100,da=Math.round(100*da/c*100)/100,E=Math.round(100*E/d*100)/100,ba=Math.round(100*ba)/100,d=0<(T-D)*(X-G)-(M-G)*(g-D)?"0":"1",c="0";f.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(Z,Fb,p,l,ea,O,na, +ia)&&this.isReflexAngle(Z,Fb,p,l,ea,O,na,ia)&&(c="1");b.setLastX(k);b.setLastY(e);return'<arc rx="'+(new String(da)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(e)).toString()+'" x-axis-rotation="'+(new String(ba)).toString()+'" large-arc-flag="'+c+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,f,e,g,l,p){c-=a;f-=b;g-=b;e=l-a;p-=b;b=a=0;c=180*(Math.atan2(f,c)-Math.atan2(b,a))/Math.PI;e=180*(Math.atan2(g,e)-Math.atan2(b, +a))/Math.PI;a=180*(Math.atan2(p,l)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;e=(e-a)%360;180<c?c-=360:-180>c&&(c+=360);180<e?e-=360:-180>e&&(e+=360);return(0<c&&0>e||0>c&&0<e)&&180<Math.abs(c-e)?!0:!1};return a}(f.mxgraph.io.vsdx.geometry.Row);e.EllipticalArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;return a}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.InfiniteLine=c;c.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f){return b.call(this,a,c,f)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,c=a.y,k=b.getHeight(),e=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/e*100)/100;c=Math.round(100*(100-100*c/k))/100;a.x=d;a.y=c;b.setLastX(d);b.setLastY(c);return'<line x="'+ (new String(d)).toString()+'" y="'+(new String(c)).toString()+'"/>'};return a}(f.mxgraph.io.vsdx.geometry.Row);e.LineTo=c;c.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f){return b.call(this,a,c,f)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,c=a.y,k=b.getHeight(),e=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/e*100)/100;c=Math.round(100*(100-100*c/k))/100;a.x=d;a.y=c;b.setLastX(d);b.setLastY(c);b.setLastMoveX(d); b.setLastMoveY(c);return'<move x="'+(new String(d)).toString()+'" y="'+(new String(c)).toString()+'"/>'};return a}(f.mxgraph.io.vsdx.geometry.Row);e.MoveTo=c;c.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q,B){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;a.formulaE=B;return a}__extends(a,b);a.prototype.handle=function(b,c){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=c.getHeight(),k=c.getWidth(),e=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.formulaE.split("NURBS(").join(""),l=l.split(")").join(""), -l=new a.Nurbs(this,l,k,d);if(2<=l.getSize()){var q=l.getX(0),C=l.getY(0),E=l.getX(1),D=l.getY(1),e=Math.round(100*e/k*100)/100,g=Math.round(100*(100-100*g/d))/100,q=Math.round(100*q)/100,C=Math.round(100*C)/100,E=Math.round(100*E)/100,D=Math.round(100*D)/100;c.setLastX(e);c.setLastY(g);if(3===l.getDegree()&&l.isOrderedByThree(this.getA())){d=[];k=[];q=[];E=l.getSize();for(C=0;C<E-1;C+=3)0<d.push(new mxPoint(l.getX(C),l.getY(C))),0<k.push(new mxPoint(l.getX(C+1),l.getY(C+1))),C<E-2?0<q.push(new mxPoint(l.getX(C+ -2),l.getY(C+2))):0<q.push(new mxPoint(e,g));e="";for(C=0;C<d.length;C++)e+='<curve x1="'+d[C].x+'" y1="'+d[C].y+'" x2="'+k[C].x+'" y2="'+k[C].y+'" x3="'+q[C].x+'" y3="'+q[C].y+'"/>\n';return e}return'<curve x1="'+(new String(q)).toString()+'" y1="'+(new String(C)).toString()+'" x2="'+(new String(E)).toString()+'" y2="'+(new String(D)).toString()+'" x3="'+(new String(e)).toString()+'" y3="'+(new String(g)).toString()+'"/>'}}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.NURBSTo=c;c.__class= +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p,B){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=p;a.formulaE=B;return a}__extends(a,b);a.prototype.handle=function(b,c){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=c.getHeight(),k=c.getWidth(),e=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.formulaE.split("NURBS(").join(""),l=l.split(")").join(""), +l=new a.Nurbs(this,l,k,d);if(2<=l.getSize()){var p=l.getX(0),C=l.getY(0),E=l.getX(1),D=l.getY(1),e=Math.round(100*e/k*100)/100,g=Math.round(100*(100-100*g/d))/100,p=Math.round(100*p)/100,C=Math.round(100*C)/100,E=Math.round(100*E)/100,D=Math.round(100*D)/100;c.setLastX(e);c.setLastY(g);if(3===l.getDegree()&&l.isOrderedByThree(this.getA())){d=[];k=[];p=[];E=l.getSize();for(C=0;C<E-1;C+=3)0<d.push(new mxPoint(l.getX(C),l.getY(C))),0<k.push(new mxPoint(l.getX(C+1),l.getY(C+1))),C<E-2?0<p.push(new mxPoint(l.getX(C+ +2),l.getY(C+2))):0<p.push(new mxPoint(e,g));e="";for(C=0;C<d.length;C++)e+='<curve x1="'+d[C].x+'" y1="'+d[C].y+'" x2="'+k[C].x+'" y2="'+k[C].y+'" x3="'+p[C].x+'" y3="'+p[C].y+'"/>\n';return e}return'<curve x1="'+(new String(p)).toString()+'" y1="'+(new String(C)).toString()+'" x2="'+(new String(E)).toString()+'" y2="'+(new String(D)).toString()+'" x3="'+(new String(e)).toString()+'" y3="'+(new String(g)).toString()+'"/>'}}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.NURBSTo=c;c.__class= "com.mxgraph.io.vsdx.geometry.NURBSTo";(function(b){var a=function(){function a(a,b,d,c){this.__parent=a;this.nurbsValues=[];a=b.split(/\s*,\s*/).slice(0);for(b=0;b<a.length;b++)3<b&&0===b%4?0<this.nurbsValues.push(100*parseFloat(a[b])):3<b&&1===b%4?0<this.nurbsValues.push(100-100*parseFloat(a[b])):0<this.nurbsValues.push(parseFloat(a[b]))}a.prototype.isOrderedByThree=function(a){for(var b=0;b+2<this.getSize();b+=3){var d=Math.round(100*this.getKnot(b))/100,c=Math.round(100*this.getKnot(b+1))/100, k=Math.round(100*this.getKnot(b+2))/100;if(d!==c||d!==k||c!==k)return!1}b=Math.round(10*this.getKnot(this.getSize()-2))/10;d=Math.round(10*this.getKnot(this.getSize()-1))/10;a=Math.round(10*a)/10;return b!==d||b!==a||d!==a?!1:!0};a.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};a.prototype.getKnotLast=function(){return this.nurbsValues[0]};a.prototype.getDegree=function(){return this.nurbsValues[1]};a.prototype.getXType=function(){return this.nurbsValues[2]};a.prototype.getYType= function(){return this.nurbsValues[3]};a.prototype.getX=function(a){return this.nurbsValues[4*(a+1)]};a.prototype.getY=function(a){return this.nurbsValues[4*(a+1)+1]};a.prototype.getKnot=function(a){return this.nurbsValues[4*(a+1)+2]};a.prototype.getWeight=function(a){return this.nurbsValues[4*(a+1)+3]};return a}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(c=e.NURBSTo||(e.NURBSTo={}))})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph= {}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e){a=b.call(this,a,c,f)||this;a.formulaA=e;return a}__extends(a,b);a.prototype.handle=function(a,b){var d="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var c=b.getHeight(),k=b.getWidth(),e=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=Math.round(100*e/k*100)/100,g=Math.round(100*(100-100*g/c))/100,l=this.formulaA.replace(RegExp("\\s", -"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),q;q=l&&l.equals?l.equals("inh"):"inh"===l;if(q)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});l=l.split(",").slice(0).slice(0);q=parseFloat(l.splice(0,1));parseFloat(l.splice(0,1));for(var E,D;0<l.length;)E=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), -D=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===q&&(E=100*E/k),1===q&&(D=100*D/c),D=100-D,E=Math.round(100*E)/100,D=Math.round(100*D)/100,b.setLastX(E),b.setLastY(D),d+='<line x="'+(new String(E)).toString()+'" y="'+(new String(D)).toString()+'"/>';d+='<line x="'+(new String(e)).toString()+'" y="'+(new String(g)).toString()+'"/>';b.getLastMoveX()===e&&b.getLastMoveY()===g&&(d+="<close/>")}return d};return a}(f.mxgraph.io.vsdx.geometry.Row);e.PolylineTo=c;c.__class= +"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),p;p=l&&l.equals?l.equals("inh"):"inh"===l;if(p)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});l=l.split(",").slice(0).slice(0);p=parseFloat(l.splice(0,1));parseFloat(l.splice(0,1));for(var E,D;0<l.length;)E=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), +D=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===p&&(E=100*E/k),1===p&&(D=100*D/c),D=100-D,E=Math.round(100*E)/100,D=Math.round(100*D)/100,b.setLastX(E),b.setLastY(D),d+='<line x="'+(new String(E)).toString()+'" y="'+(new String(D)).toString()+'"/>';d+='<line x="'+(new String(e)).toString()+'" y="'+(new String(g)).toString()+'"/>';b.getLastMoveX()===e&&b.getLastMoveY()===g&&(d+="<close/>")}return d};return a}(f.mxgraph.io.vsdx.geometry.Row);e.PolylineTo=c;c.__class= "com.mxgraph.io.vsdx.geometry.PolylineTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=100*this.x,c=100-100*this.y,k=100*this.a,f=100-100*this.b,e=100*this.c,g=100-100*this.d,d=Math.round(100*d)/100,c=Math.round(100*c)/100,k=Math.round(100*k)/100,f=Math.round(100*f)/100,e=Math.round(100* +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=100*this.x,c=100-100*this.y,k=100*this.a,f=100-100*this.b,e=100*this.c,g=100-100*this.d,d=Math.round(100*d)/100,c=Math.round(100*c)/100,k=Math.round(100*k)/100,f=Math.round(100*f)/100,e=Math.round(100* e)/100,g=Math.round(100*g)/100;b.setLastX(d);b.setLastY(c);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(f)).toString()+'" x2="'+(new String(e)).toString()+'" y2="'+(new String(g)).toString()+'" x3="'+(new String(d)).toString()+'" y3="'+(new String(c)).toString()+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.RelCubBezTo=c;c.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph= {}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f){return b.call(this,a,c,f)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,c=a.y;null!=this.x&&null!=this.y&&(d=100*this.x,c=100-100*this.y);d=Math.round(100*d)/100;c=Math.round(100*c)/100;a.x=d;a.y=c;b.setLastX(d);b.setLastY(c);return'<line x="'+(new String(d)).toString()+'" y="'+(new String(c)).toString()+'"/>'};return a}(f.mxgraph.io.vsdx.geometry.Row);e.RelLineTo=c;c.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(e.geometry|| @@ -1245,7 +1245,7 @@ e.RelMoveTo=c;c.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(e.geometry||( (new String(f)).toString()+'" x2="'+(new String(d)).toString()+'" y2="'+(new String(c)).toString()+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.RelQuadBezTo=c;c.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e){a=b.call(this,a,c,f)||this;a.a=e;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),d=Math.round(100*d)/100,c=Math.round(100*(100-c))/100;b.setLastX(d);b.setLastY(c)}return""};return a}(f.mxgraph.io.vsdx.geometry.Row); e.SplineKnot=c;c.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b.getHeight();b.getWidth();var d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b.setLastKnot(this.c);d=Math.round(100*d)/ +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=p;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){b.getHeight();b.getWidth();var d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b.setLastKnot(this.c);d=Math.round(100*d)/ 100;c=Math.round(100*(100-c))/100;b.getLastX();b.getLastY();b.setLastX(d);b.setLastY(c);return"<curve "}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.SplineStart=c;c.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){var g=function(){function c(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();var d=b.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=d&&0!==d.length?parseFloat(d):-1}catch(k){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0(), c.__static_initializer_1())};c.styleTypes_$LI$=function(){c.__static_initialize();null==c.styleTypes&&(c.styleTypes={});return c.styleTypes};c.__static_initializer_0=function(){c.styleTypes_$LI$()[f.mxgraph.io.vsdx.mxVsdxConstants.FILL]=f.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;c.styleTypes_$LI$()[f.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=f.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;c.styleTypes_$LI$()[f.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=f.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE; @@ -1276,7 +1276,7 @@ b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals() 0)};c.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};c.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),0)};c.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.STYLE, b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.POS,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b, "")};c.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};c.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getHorizontalAlign= -function(b,a){var d;d=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(d,"")){case "0":d=a?"left":mxConstants.ALIGN_LEFT;break;case "2":d=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":d=a?"justify":mxConstants.ALIGN_CENTER;break;default:d=a?"center":mxConstants.ALIGN_CENTER}return d};c.prototype.getIndentFirst=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST, +function(b,a){var c;c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(c,"")){case "0":c=a?"left":mxConstants.ALIGN_LEFT;break;case "2":c=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":c=a?"justify":mxConstants.ALIGN_CENTER;break;default:c=a?"center":mxConstants.ALIGN_CENTER}return c};c.prototype.getIndentFirst=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST, b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};c.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT, b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpAfter=function(b){b= this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a;a=b&& @@ -1290,39 +1290,40 @@ b=[];0<b.push(c.DASH);0<b.push(c.SHORT_SPACE);0<b.push(c.SHORT_DASH);0<b.push(c. c.lineDashPatterns_$LI$().push(b);b=[];0<b.push(c.XLONG_DASH);0<b.push(c.LONG_SPACE);0<b.push(c.DASH);0<b.push(c.LONG_SPACE);0<b.push(c.DASH);0<b.push(c.LONG_SPACE);0<c.lineDashPatterns_$LI$().push(b);b=[];0<b.push(c.XSHORT_DASH);0<b.push(c.SHORT_SPACE);0<c.lineDashPatterns_$LI$().push(b)};c.getLineDashPattern=function(b){return 0<=b&&23>=b?c.lineDashPatterns_$LI$()[b]:c.lineDashPatterns_$LI$()[0]};return c}();g.__static_initialized=!1;g.vsdxStyleDebug=!1;g.SPACE=4;g.SHORT_SPACE=2;g.LONG_SPACE=6; g.DOT=1;g.DASH=8;g.LONG_DASH=12;g.SHORT_DASH=4;g.XLONG_DASH=20;g.XSHORT_DASH=2;e.Style=g;g.__class="com.mxgraph.io.vsdx.Style"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,e){var d=b.call(this)||this;d.__com_mxgraph_io_vsdx_theme_HslClr_hue=a/360;d.__com_mxgraph_io_vsdx_theme_HslClr_sat=c/100;d.__com_mxgraph_io_vsdx_theme_HslClr_lum=e/100;d.color=(new f.mxgraph.io.vsdx.theme.HSLColor(a,c,e)).toRgb();return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.HslClr=c;c.__class="com.mxgraph.io.vsdx.theme.HslClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io|| -(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var d=b.call(this)||this;d.val=a;d.color=new f.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.PrstClr=c;c.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var d=b.call(this)||this;d.isDynamic=!0;d.val=a;return d}__extends(a,b);a.prototype.calcColor=function(a,c){var d;d=this.val;d="phClr".equals?"phClr".equals(d):"phClr"===d;d?this.color=c.getStyleColor(a):(this.color=c.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,a,c)};return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SchemeClr=c;c.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(e.theme|| +(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var c=b.call(this)||this;c.val=a;c.color=new f.mxgraph.io.vsdx.theme.Color(255,255,255);return c}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.PrstClr=c;c.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var c=b.call(this)||this;c.isDynamic=!0;c.val=a;return c}__extends(a,b);a.prototype.calcColor=function(a,c){var d;d=this.val;d="phClr".equals?"phClr".equals(d):"phClr"===d;d?this.color=c.getStyleColor(a):(this.color=c.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,a,c)};return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SchemeClr=c;c.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(e.theme|| (e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,e){var d=b.call(this)||this;d.r=0;d.g=0;d.b=0;d.r=a;d.g=c;d.b=e;d.color=new f.mxgraph.io.vsdx.theme.Color(a,c,e);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.ScrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var d=b.call(this)||this;d.hexVal=null;d.hexVal=a;d.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(a);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var c=b.call(this)||this;c.hexVal=null;c.hexVal=a;c.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(a);return c}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c){var d=b.call(this)||this;d.lastClr=null;d.val=a;var k=d.lastClr=c;if(null==k)switch(a){case "windowText":k="000000";break;case "window":k="FFFFFF";break;default:k="FFFFFF"}d.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(k);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SysClr=c;c.__class="com.mxgraph.io.vsdx.theme.SysClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io|| (g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); -(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){return b.call(this,a,c,f,e,g,l,q)||this}__extends(a,b);a.prototype.handle=function(a,c){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=c.getHeight()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=c.getWidth()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=d;this.a*=k;this.b*=d}return b.prototype.handle.call(this, +(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){return b.call(this,a,c,f,e,g,l,p)||this}__extends(a,b);a.prototype.handle=function(a,c){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=c.getHeight()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=c.getWidth()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=d;this.a*=k;this.b*=d}return b.prototype.handle.call(this, a,c)};return a}(f.mxgraph.io.vsdx.geometry.EllipticalArcTo);e.RelEllipticalArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){var g=function(c){function b(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=c.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a, b){return a[b]?a[b]:null}(d.cellElements,f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a,b){return a[b]?a[b]:null}(d.cellElements,f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,c);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==", b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new f.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]); -this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){c.prototype.parseShapeElem.call(this,a,d);var k=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(k,"ForeignData")){var e=a.ownerDocument.vsdxFileName,g=a.getAttribute("ForeignType"),k=a.getAttribute("CompressionType")||"";if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Bitmap"))k=k.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"MetaFile"))k="png";else if(function(a,b){return a&& -a.equals?a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))k="png";else return;g=a.firstChild;if(null!=g){if(null!=g&&1==g.nodeType){var l=g;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var g=e.lastIndexOf("/"),q="",z="";try{q=e.substring(0,g),z=e.substring(g,e.length)}catch(B){return}g=d.getRelationship(l,q+"/_rels"+z+".rels");if(null!=g){e=g.getAttribute("Target")|| -"";l=g.getAttribute("Type");g=e.lastIndexOf("/");try{e=e.substring(g+1,e.length)}catch(B){return}null!=l&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(l,"image")&&(this.imageData={},(g=d.getMedia(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+e))?(this.imageData.iData=g,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(e.toLowerCase(),".bmp")&&(k="jpg"),this.imageData.iType=k):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}g= -g.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(k,f.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var k=0;k<a.length;k++){var d=a[k],e=d.getAttribute("IX")|| -"";if(0!==e.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[e]="";else{for(var g=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",q="",z=0;z<g.length;z++){var B=g[z],d=B.getAttribute("N"),B=B.getAttribute("V")||B.textContent||"";switch(d){case "Value":l=B;break;case "Format":q=B}}if(0!==l.length){try{if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(q,"{{"))var q=q.replace(/m/g, -"@").replace(/M/g,"m").replace(/@/g,"M"),C=isNaN(l)?new Date(l):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(l))),l=Graph.prototype.formatDate(C,q.replace(RegExp("\\{|\\}","g"),""))}catch(E){}this.fields[e]=l}}}}else c.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text? -this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var b= -null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square":"disc")+'">'));return b};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical(); -c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",c="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",e="font-family:"+this.getTextFont(this.cp)+";",g="direction:"+this.getRtlText(this.cp)+";",l="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),z=";opacity:"+this.getTextOpacity(this.cp),B=this.getTextPos(this.cp), -C=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(C,"1")?a=a.toUpperCase():function(a,b){return a&&a.equals?a.equals(b):a===b}(C,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(B,"1")?a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(B,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a, -"b"):a;a=this.isItalic(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+c+e+b+g+l+q+z+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals? -a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),c=a.substring(d),d=a.substring(0, -d),e=' style="'+f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+e+c}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b= -!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a); -(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS, -a,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a= -mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot= -function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(f.mxgraph.io.vsdx.Style);g.VSDX_START_TIME=-22091688E5;e.Shape=g;g.__class="com.mxgraph.io.vsdx.Shape"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); +this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){c.prototype.parseShapeElem.call(this,a,d);var k=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(k,"ForeignData")){var k=function(a,b){for(var c=a.firstChild;null!=c;){if(1==c.nodeType){var k=c;if("rel"==k.nodeName.toLowerCase()&&(k=k.getAttribute("r:id"),null!=k&&0!==k.length)){var c=b.lastIndexOf("/"),f="",e="";try{f=b.substring(0,c),e=b.substring(c,b.length)}catch(M){break}c=d.getRelationship(k,f+"/_rels"+e+".rels"); +if(null!=c){k=c.getAttribute("Target")||"";f=c.getAttribute("Type");c=k.lastIndexOf("/");try{k=k.substring(c+1,k.length)}catch(M){break}return{type:f,target:k}}break}}c=c.nextSibling}},e=a.ownerDocument.vsdxFileName,g=a.getAttribute("ForeignType"),l=a.getAttribute("CompressionType")||"",p=null;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Bitmap"))l=l.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"MetaFile"))l="png";else if(function(a,b){return a&&a.equals? +a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))l="png";else if("Object"==g){if(p=k(a,e),0<p.type.indexOf("/oleObject"))if(l=d.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=l){p=l.getAttribute("Target");g=l.getAttribute("Type");try{var z=p.lastIndexOf("/"),p=p.substring(z+1,p.length)}catch(B){return}l="png";p={type:g,target:p}}else return}else return;null==p&&(p=k(a,e));g=p.type;p=p.target;null!=g&&function(a, +b){var c=a.length-b.length,d=a.indexOf(b,c);return-1!==d&&d===c}(g,"image")&&(this.imageData={},(z=d.getMedia(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=z,function(a,b){var c=a.length-b.length,d=a.indexOf(b,c);return-1!==d&&d===c}(p.toLowerCase(),".bmp")&&(l="jpg"),this.imageData.iType=l):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(k,f.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text= +a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var k=0;k<a.length;k++){var d=a[k],e=d.getAttribute("IX")||"";if(0!==e.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1", +d.getAttribute("Del")))this.fields[e]="";else{for(var g=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",p="",z=0;z<g.length;z++){var B=g[z],d=B.getAttribute("N"),B=B.getAttribute("V")||B.textContent||"";switch(d){case "Value":l=B;break;case "Format":p=B}}if(0!==l.length){try{if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(p,"{{"))var p=p.replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M"),C=isNaN(l)?new Date(l):new Date(b.VSDX_START_TIME+Math.floor(864E5* +parseFloat(l))),l=Graph.prototype.formatDate(C,p.replace(RegExp("\\{|\\}","g"),""))}catch(E){}this.fields[e]=l}}}}else c.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width}; +b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square": +"disc")+'">'));return b};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical();c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated= +function(a){var b="color:"+this.getTextColor(this.cp)+";",c="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",e="font-family:"+this.getTextFont(this.cp)+";",g="direction:"+this.getRtlText(this.cp)+";",l="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",p="line-height:"+this.getSpcLine(this.pp),z=";opacity:"+this.getTextOpacity(this.cp),B=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(C,"1")?a=a.toUpperCase():function(a, +b){return a&&a.equals?a.equals(b):a===b}(C,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(B,"1")?a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(B,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)? +f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+c+e+b+g+l+p+z+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a}; +b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var c=a.indexOf(">"),d=a.substring(c),c=a.substring(0,c),e=' style="'+f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return c+e+d}return a};b.prototype.getRtlText= +function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals? +a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(), +"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a, +"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN), +"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY= +a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(f.mxgraph.io.vsdx.Style);g.VSDX_START_TIME=-22091688E5;e.Shape=g;g.__class="com.mxgraph.io.vsdx.Shape"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){var g=function(c){function b(a,b,k,e,g,l){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=c.call(this,b,l)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var n=d.getMasterId(),w=d.getShapeMasterId();d.master=null!=n?e[n]?e[n]:null:g;null!=d.master&&(d.masterShape=null==n&&null!=w?d.master.getSubShape(w):d.master.getMasterShape());e=d.getNameU();g=e.lastIndexOf(".");-1!==g&&(e=e.substring(0, -g));d.shapeName=e;b=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));l=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key=== -b)return a.entries[d].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(e=0;e<b.length;e++)g=b[e].getValue(),g.setRootShape(d),null==g.theme&&g.setThemeAndVariant(l,a);d.quickStyleVals=new f.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"), +g));d.shapeName=e;b=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));l=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key=== +b)return a.entries[c].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(e=0;e<b.length;e++)g=b[e].getValue(),g.setRootShape(d),null==g.theme&&g.setThemeAndVariant(l,a);d.quickStyleVals=new f.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"), "1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleShadowColor"), "1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=d.masterShape?(d.masterShape.processGeomList(null),d.processGeomList(d.masterShape.getGeomList()),0===d.width&&(d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===d.height&&(d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT), 0))):d.processGeomList(null);d.vertex=k||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());d.layerMember=d.getValue(d.getCellElement$java_lang_String("LayerMember"));d.layerMember&&0==d.layerMember.indexOf("0;")&&(d.layerMember=d.layerMember.substr(2));return d}__extends(b,c);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())}; @@ -1361,16 +1362,16 @@ a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c, a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var b;b=this.cellElements;b=b[a]?b[a]: null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getTextLabel=function(){var a;a=this.getValue(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");a="1".equals?"1".equals(a):"1"===a;if(a)return null;a=this.getTextChildren();null==a&&null!=this.masterShape&&(a=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=a)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(), this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),this.getHtmlTextContent(a)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,c=null,e=null,g=0;g<a.length;g++){var l;l=a.item(g);switch(l.nodeName){case "cp":b=this.getIndex(l);break;case "tp":this.getIndex(l);break;case "pp":c= -this.getIndex(l);break;case "fld":e=this.getIndex(l);break;case "#text":l=l.textContent;var q;q=this.paragraphs;q=q[c]?q[c]:null;null==q?(q=new f.mxgraph.io.vsdx.Paragraph(l,b,c,e),this.paragraphs[c]=q):q.addText(l,b,e)}}};b.prototype.createHybridLabel=function(a){var b=function(a,b){return a[b]?a[b]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]= +this.getIndex(l);break;case "fld":e=this.getIndex(l);break;case "#text":l=l.textContent;var p;p=this.paragraphs;p=p[c]?p[c]:null;null==p?(p=new f.mxgraph.io.vsdx.Paragraph(l,b,c,e),this.paragraphs[c]=p):p.addText(l,b,e)}}};b.prototype.createHybridLabel=function(a){var b=function(a,b){return a[b]?a[b]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]= this.getIndentRight(a);this.styleMap[mxConstants.STYLE_SPACING_TOP]=this.getSpBefore(a);this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=this.getSpAfter(a);this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical();this.styleMap.fontColor=this.getTextColor(a);this.styleMap.fontSize=this.getTextSize(a);this.styleMap.fontFamily=this.getTextFont(a);var c=this.isBold(a)?mxConstants.FONT_BOLD:0,c=c|(this.isItalic(a)?mxConstants.FONT_ITALIC:0),c=c|(this.isUnderline(a)?mxConstants.FONT_UNDERLINE: 0);this.styleMap.fontStyle=(new String(c)).toString();a=b.numValues();for(var c=null,f=0;f<a;f++){var e=b.getValue(f);if(0===e.length&&null!=this.fields){var g=b.getField(f);null!=g&&(e=function(a,b){return a[b]?a[b]:null}(this.fields,g),null==e&&null!=this.masterShape&&null!=this.masterShape.fields&&(e=function(a,b){return a[b]?a[b]:null}(this.masterShape.fields,g)))}null!=e&&(c=null==c?e:c+e)}return c};b.prototype.getHtmlTextContent=function(a){function b(a){a=f.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(a); -l&&(a="<li>"+a,l=!1);g?(a=a.split("\n"),a[a.length-1]||(a.pop(),l=!0),a=a.join("</li><li>")):a=a.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(f.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(a)}var c="",e=!0,g=!1,l=!1;if(null!=a&&0<a.length)for(var q=0;q<a.length;q++){var z=a.item(q);(function(a,b){return a&&a.equals?a.equals(b):a===b})(z.nodeName,"cp")?this.cp=this.getIndex(z):function(a,b){return a&&a.equals?a.equals(b):a===b}(z.nodeName,"tp")?this.tp= +l&&(a="<li>"+a,l=!1);g?(a=a.split("\n"),a[a.length-1]||(a.pop(),l=!0),a=a.join("</li><li>")):a=a.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(f.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(a)}var c="",e=!0,g=!1,l=!1;if(null!=a&&0<a.length)for(var p=0;p<a.length;p++){var z=a.item(p);(function(a,b){return a&&a.equals?a.equals(b):a===b})(z.nodeName,"cp")?this.cp=this.getIndex(z):function(a,b){return a&&a.equals?a.equals(b):a===b}(z.nodeName,"tp")?this.tp= this.getIndex(z):function(a,b){return a&&a.equals?a.equals(b):a===b}(z.nodeName,"pp")?(this.pp=this.getIndex(z),g&&(c+="</li></ul>"),e?e=!1:c+="</p>",c+=this.getTextParagraphFormated("<p>"),z=this.getPPList(this.pp),l=g=null!=z,c+=g?z:""):function(a,b){return a&&a.equals?a.equals(b):a===b}(z.nodeName,"fld")?(this.fld=this.getIndex(z),z=null,null!=this.fields&&(z=function(a,b){return a[b]?a[b]:null}(this.fields,this.fld)),null==z&&null!=this.masterShape&&null!=this.masterShape.fields&&(z=function(a, b){return a[b]?a[b]:null}(this.masterShape.fields,this.fld)),null!=z&&(c+=b.call(this,z))):function(a,b){return a&&a.equals?a.equals(b):a===b}(z.nodeName,"#text")&&(z=z.textContent,c+=b.call(this,z))}g&&(c+="</li></ul>");c+=e?"":"</p>";f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(c,"div");return c};b.prototype.isConnectorBigNameU=function(a){return function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree single")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)=== b}(a,"45 degree single")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree double")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree double")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"60 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"45 degree tail")||function(a,b,c){void 0===c&&(c= 0);return a.substr(c,b.length)===b}(a,"60 degree tail")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 2")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 1")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Flexi-arrow 3")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Double flexi-arrow")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a,"Fancy arrow")};b.prototype.isVertex= -function(){return this.vertex};b.prototype.getOriginPoint=function(a,b){var c=this.getPinX(),d=this.getPinY(),e=this.getLocPinY(),g=this.getLocPinX(),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0),c=c-g,d=a-(d+(q-e));return!b||e===q/2&&g===l/2||0===this.rotation?new mxPoint(c,d):(g=l/2-g,e-=q/2,q=Math.cos((360- -this.rotation)*Math.PI/180),l=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(c+g-(g*q-e*l),g*l+e*q+d-e))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.PIN_X), +function(){return this.vertex};b.prototype.getOriginPoint=function(a,b){var c=this.getPinX(),d=this.getPinY(),e=this.getLocPinY(),g=this.getLocPinX(),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0),c=c-g,d=a-(d+(p-e));return!b||e===p/2&&g===l/2||0===this.rotation?new mxPoint(c,d):(g=l/2-g,e-=p/2,p=Math.cos((360- +this.rotation)*Math.PI/180),l=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(c+g-(g*p-e*l),g*l+e*p+d-e))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.PIN_X), 0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity= function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(a,b){return a&&a.equals?a.equals(b):a===b}("1",this.getValue(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(a,b){return a[b]?a[b]:null}(this.sections,"FillGradient");if(null!=a){var b=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem, "Row"),a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};b.prototype.getGradientDirection= @@ -1394,12 +1395,12 @@ function(){return this.shape.hasAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.MAST b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a}; b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,b){var c="",d="";this.shape.hasAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(c=this.shape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.getMaster().getMasterElement().getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)); if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,"Organizational unit")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(d,"Organizational unit")){var e=this.shape.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0),c=null,c="0.0",d=null,d="-0.4";null!=e&&(c=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),c=c.hasAttribute("F")?c.getAttribute("F"):c.textContent,d=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0), -d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent);e=a.getGeometry();c=c.split("Width/2+").join("");c=c.split("DL").join("");d=d.split("Height*").join("");(function(a,b){return a&&a.equals?a.equals(b):a===b})(c,"Inh")&&(c="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Inh")&&(d="-0.4");-1!=d.indexOf("txtHeight")&&(d="-0.4");for(var g=b.split(";"),l="",q=0;q<g.length;q++){var B=g[q],B=B.trim();(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b})(B,"tabHeight=")&& +d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent);e=a.getGeometry();c=c.split("Width/2+").join("");c=c.split("DL").join("");d=d.split("Height*").join("");(function(a,b){return a&&a.equals?a.equals(b):a===b})(c,"Inh")&&(c="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Inh")&&(d="-0.4");-1!=d.indexOf("txtHeight")&&(d="-0.4");for(var g=b.split(";"),l="",p=0;p<g.length;p++){var B=g[p],B=B.trim();(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b})(B,"tabHeight=")&& (l=B.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(l,"")&&(l="20");g=parseFloat(l);c=parseFloat(c);d=parseFloat(d);l=e.height;c=.1*e.width+100*c;c=new mxPoint(c,l-l*d-g/2);a.getGeometry().offset=c}else if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,"Domain 3D")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(d,"Domain 3D")){e=this.shape.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);c=null; c="0.0";d=null;d="-0.4";null!=e&&(c=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),c=c.getAttribute("F")||"",d=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),d=d.getAttribute("F")||"");e=a.getGeometry();c=c.split("Width/2+").join("");c=c.split("DL").join("");d=d.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(c,""))c="0.0";if(function(a,b){return a&&a.equals?a.equals(b): a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="-0.4";-1!=d.indexOf("txtHeight")&&(d="-0.4");c=parseFloat(c);d=parseFloat(d);l=e.height;c=.1*e.width+100*c;c=new mxPoint(c,l-l*d);a.getGeometry().offset=c}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var c=b.getType(this.getShape());this.styleDebug("shape type = "+c);if(null!=this.imageData||function(a,b){return a&&a.equals?a.equals(b):a===b}(f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,c)&&null!=this.masterShape&& -null!=this.masterShape.imageData){var e=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var g=function(a,b){return a[b]?a[b]:null}(e,"iType"),l=function(a,b){return a[b]?a[b]:null}(e,"iData"),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),z=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),B=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"), -"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),E=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=q||0!=A?this.toBeCroppedImg={imgOffsetX:q,imgOffsetY:A,imgWidth:z,imgHeight:B,width:C,height:E,iType:g,iData:l}:a.image="data:image/"+g+","+l;return a}var D=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(D,""))return this.styleDebug("No geom found"),a;var G=Graph.compress(D);a[mxConstants.STYLE_SHAPE]="stencil("+ +null!=this.masterShape.imageData){var e=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var g=function(a,b){return a[b]?a[b]:null}(e,"iType"),l=function(a,b){return a[b]?a[b]:null}(e,"iData"),p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),z=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),B=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"), +"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),E=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=p||0!=A?this.toBeCroppedImg={imgOffsetX:p,imgOffsetY:A,imgWidth:z,imgHeight:B,width:C,height:E,iType:g,iData:l}:a.image="data:image/"+g+","+l;return a}var D=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(D,""))return this.styleDebug("No geom found"),a;var G=Graph.compress(D);a[mxConstants.STYLE_SHAPE]="stencil("+ G+")"}catch(T){console.error(T.message,T)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+ this.shapeName);if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a; a=(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),c=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH, @@ -1410,61 +1411,61 @@ b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a.toLowerCase(),"control "V","");null!=this.masterShape&&function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")&&(a=this.masterShape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0.0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY= function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.END_X), 0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};b.prototype.getRoutingPoints=function(a,b,c){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,c):null};b.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var c=[];if(null!=this.shape){var e=this.shape.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.GEOM); -if(0<e.length&&(e=e.item(0).getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=e)){for(var e=e.getAttribute("F")||"",e=e.replace(RegExp("NURBS\\(","g"),""),e=e.replace(RegExp("\\)","g"),""),e=e.replace(RegExp(",","g")," "),e=e.replace(RegExp("\\s\\s","g")," "),e=e.split(" "),g=e.length,l=[];0<g--;)l.push(0);for(g=0;g<e.length;g++)l[g]=parseFloat(e[g]);for(g=2;g+4<e.length;g+=4){var q=new mxPoint,z=l[g+3];q.x=Math.floor(Math.round(100*(b.x+ -Math.min(100,Math.abs(a.x-b.x))*l[g+2]))/100);q.y=Math.floor(Math.round(100*(b.y-100*z))/100);0<c.push(q)}return c}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[f.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,""))for(var c in a)this.styleMap[c]=a[c];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",c=this.getDashPattern(),null!=c&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]= +if(0<e.length&&(e=e.item(0).getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=e)){for(var e=e.getAttribute("F")||"",e=e.replace(RegExp("NURBS\\(","g"),""),e=e.replace(RegExp("\\)","g"),""),e=e.replace(RegExp(",","g")," "),e=e.replace(RegExp("\\s\\s","g")," "),e=e.split(" "),g=e.length,l=[];0<g--;)l.push(0);for(g=0;g<e.length;g++)l[g]=parseFloat(e[g]);for(g=2;g+4<e.length;g+=4){var p=new mxPoint,z=l[g+3];p.x=Math.floor(Math.round(100*(b.x+ +Math.min(100,Math.abs(a.x-b.x))*l[g+2]))/100);p.y=Math.floor(Math.round(100*(b.y-100*z))/100);0<c.push(p)}return c}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[f.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,""))for(var c in a)this.styleMap[c]=a[c];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",c=this.getDashPattern(),null!=c&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]= c));c=this.getEdgeMarker(!0);null!=c&&(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=c);c=this.getEdgeMarker(!1);null!=c&&(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]= c);c=Math.round(this.getStartArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+c);c=Math.round(this.getFinalArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+c);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+c);c=this.getStrokeColor();(function(a,b){return a&&a.equals?a.equals(b):a===b})(c,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=f.mxgraph.io.vsdx.mxVsdxConstants.TRUE); this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,c=this.getFillColor(),function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=c));c=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c;c=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c;c=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+ c;c=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c;c=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=c;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND)),b;b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"), "0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?f.mxgraph.io.vsdx.mxVsdxConstants.TRUE:f.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var c=this.getValue(this.getCellElement$java_lang_String(a?f.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:f.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),e=0;try{if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"Themed")){var g= this.getTheme();null!=g&&(e=this.isVertex()?g.getEdgeMarker(a,this.getQuickStyleVals()):g.getConnEdgeMarker(a,this.getQuickStyleVals()))}else e=parseInt(c)}catch(w){}a=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(),e);0<e&&null==a&&(a=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!= -a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(),1));return a};b.prototype.getCellElement$java_lang_String=function(a){var b=c.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,e){var d=c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this, -a,b,e);return null==d&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,e):d};b.prototype.getCellElement=function(a,b,c){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof c&&null!==c){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,c)};b.prototype.createLabelSubShape= +a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key===b)return a.entries[c].value;return null}(b.arrowTypes_$LI$(),1));return a};b.prototype.getCellElement$java_lang_String=function(a){var b=c.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,f){var d=c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this, +a,b,f);return null==d&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,f):d};b.prototype.getCellElement=function(a,b,c){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof c&&null!==c){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,c)};b.prototype.createLabelSubShape= function(a,b){var c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),e=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),c/2),g=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y), -d/2),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),e),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),g),B=this.getValueAsDouble(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel();if(null!=C&&0!==C.length){var E=mxUtils.clone(this.getStyleMap())||{};E[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;E[mxConstants.STYLE_STROKECOLOR]= +d/2),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),e),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),g),B=this.getValueAsDouble(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel();if(null!=C&&0!==C.length){var E=mxUtils.clone(this.getStyleMap())||{};E[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;E[mxConstants.STYLE_STROKECOLOR]= mxConstants.NONE;E[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;E.hasOwnProperty("align")||(E.align="center");E.hasOwnProperty("verticalAlign")||(E.verticalAlign="middle");E.hasOwnProperty("whiteSpace")||(E.whiteSpace="wrap");delete E.shape;delete E.image;this.isVerticalLabel()&&(B+=Math.PI+.01,E.horizontal="0");var D=this.getRotation();0!==B&&(B=360-180*B/Math.PI,B=Math.round((B+D)%360*100)/100,0!==B&&(E.rotation=""+B));E="text;"+f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(E,"=");g=b.getGeometry().height- -(q+d-g);e=l-e;0<D&&(l=new mxGeometry(e,g,c,d),e=b.getGeometry(),f.mxgraph.online.Utils.rotatedGeometry(l,D,e.width/2,e.height/2),e=l.x,g=l.y);return a.insertVertex(b,null,C,Math.round(100*e)/100,Math.round(100*g)/100,Math.round(100*c)/100,Math.round(100*d)/100,E+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var c=new mxCellState;c.absolutePoints=b;a.updateEdgeBounds(c);var c=a.getPoint(c),d=b[0],e=b[b.length-1],g=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH), -this.getWidth()),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),B=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),C=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X), -0),E=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0),e=(this.getHeight()-(d.y-e.y))/2+d.y-c.y-(E-B+l/2),c=C-q+g/2+(d.x-c.x);return 1E11<Math.abs(c)?null:new mxPoint(Math.floor(Math.round(100*c)/100),Math.floor(Math.round(100*e)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(f.mxgraph.io.vsdx.Shape);g.__static_initialized=!1;g.ARROW_NO_FILL_MARKER= +(p+d-g);e=l-e;0<D&&(l=new mxGeometry(e,g,c,d),e=b.getGeometry(),f.mxgraph.online.Utils.rotatedGeometry(l,D,e.width/2,e.height/2),e=l.x,g=l.y);return a.insertVertex(b,null,C,Math.round(100*e)/100,Math.round(100*g)/100,Math.round(100*c)/100,Math.round(100*d)/100,E+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var c=new mxCellState;c.absolutePoints=b;a.updateEdgeBounds(c);var c=a.getPoint(c),d=b[0],e=b[b.length-1],g=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH), +this.getWidth()),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),B=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),C=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X), +0),E=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0),e=(this.getHeight()-(d.y-e.y))/2+d.y-c.y-(E-B+l/2),c=C-p+g/2+(d.x-c.x);return 1E11<Math.abs(c)?null:new mxPoint(Math.floor(Math.round(100*c)/100),Math.floor(Math.round(100*e)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(f.mxgraph.io.vsdx.Shape);g.__static_initialized=!1;g.ARROW_NO_FILL_MARKER= "0";g.maxDp=2;g.USE_SHAPE_MATCH=!1;g.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';e.VsdxShape=g;g.__class="com.mxgraph.io.vsdx.VsdxShape"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){var e=function(){function e(){}e.__static_initialize=function(){e.__static_initialized||(e.__static_initialized=!0,e.__static_initializer_0())};e.CA_$LI$=function(){e.__static_initialize();null==e.CA&&(e.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return e.CA};e.IA_$LI$=function(){e.__static_initialize();if(null==e.IA){for(var c=256,b=[];0<c--;)b.push(0);e.IA=b}return e.IA};e.__static_initializer_0=function(){for(var c=e.IA_$LI$(), -b=0;b<c.length;b++)c[b]=-1;c=0;for(b=e.CA_$LI$().length;c<b;c++)e.IA_$LI$()[e.CA_$LI$()[c].charCodeAt(0)]=c;e.IA_$LI$()[61]=0};e.encodeToChar=function(c,b,a){var d=null!=c?c.length-b:0;if(0===d)return[];for(var f=3*(d/3|0),g=((d-1)/3|0)+1<<2,g=g+(a?((g-1)/76|0)<<1:0),l=Array(g),q=b,A=0,z=0;q<f+b;){var B=(c[q++]&255)<<16|(c[q++]&255)<<8|c[q++]&255;l[A++]=e.CA_$LI$()[B>>>18&63];l[A++]=e.CA_$LI$()[B>>>12&63];l[A++]=e.CA_$LI$()[B>>>6&63];l[A++]=e.CA_$LI$()[B&63];a&&19===++z&&A<g-2&&(l[A++]="\r",l[A++]= +b=0;b<c.length;b++)c[b]=-1;c=0;for(b=e.CA_$LI$().length;c<b;c++)e.IA_$LI$()[e.CA_$LI$()[c].charCodeAt(0)]=c;e.IA_$LI$()[61]=0};e.encodeToChar=function(c,b,a){var d=null!=c?c.length-b:0;if(0===d)return[];for(var f=3*(d/3|0),g=((d-1)/3|0)+1<<2,g=g+(a?((g-1)/76|0)<<1:0),l=Array(g),p=b,A=0,z=0;p<f+b;){var B=(c[p++]&255)<<16|(c[p++]&255)<<8|c[p++]&255;l[A++]=e.CA_$LI$()[B>>>18&63];l[A++]=e.CA_$LI$()[B>>>12&63];l[A++]=e.CA_$LI$()[B>>>6&63];l[A++]=e.CA_$LI$()[B&63];a&&19===++z&&A<g-2&&(l[A++]="\r",l[A++]= "\n",z=0)}a=d-f;0<a&&(B=(c[f+b]&255)<<10|(2===a?(c[d+b-1]&255)<<2:0),l[g-4]=e.CA_$LI$()[B>>12],l[g-3]=e.CA_$LI$()[B>>>6&63],l[g-2]=2===a?e.CA_$LI$()[B&63]:"=",l[g-1]="=");return l};e.decode$char_A=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>e.IA_$LI$()[c[d].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c[--d].charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b= -[];0<a--;)b.push(0);return b}(b),g=f=0;g<b;){for(var l=d=0;4>l;l++){var q=e.IA_$LI$()[c[f++].charCodeAt(0)];0<=q?d|=q<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decode=function(c){if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"string"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decode$char_A(c);if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"number"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decode$byte_A(c);if("string"=== +[];0<a--;)b.push(0);return b}(b),g=f=0;g<b;){for(var l=d=0;4>l;l++){var p=e.IA_$LI$()[c[f++].charCodeAt(0)];0<=p?d|=p<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decode=function(c){if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"string"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decode$char_A(c);if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"number"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decode$byte_A(c);if("string"=== typeof c||null===c)return f.mxgraph.online.mxBase64.decode$java_lang_String(c);throw Error("invalid overload");};e.decodeFast$char_A=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[c[a].charCodeAt(0)];)a++;for(;0<d&&0>e.IA_$LI$()[c[d].charCodeAt(0)];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])?61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d-1])?2:1:0,g=d-a+1,l=76<b?(13==function(a){return null==a.charCodeAt?a: -a.charCodeAt(0)}(c[76])?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),q=0,A=0,z=3*(g/3|0);q<z;){var B=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18|e.IA_$LI$()[c[a++].charCodeAt(0)]<<12|e.IA_$LI$()[c[a++].charCodeAt(0)]<<6|e.IA_$LI$()[c[a++].charCodeAt(0)];b[q++]=B>>16|0;b[q++]=B>>8|0;b[q++]=B|0;0<l&&19===++A&&(a+=2,A=0)}if(q<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=B>>c|0}return b};e.decodeFast=function(c){if(null!= +a.charCodeAt(0)}(c[76])?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),p=0,A=0,z=3*(g/3|0);p<z;){var B=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18|e.IA_$LI$()[c[a++].charCodeAt(0)]<<12|e.IA_$LI$()[c[a++].charCodeAt(0)]<<6|e.IA_$LI$()[c[a++].charCodeAt(0)];b[p++]=B>>16|0;b[p++]=B>>8|0;b[p++]=B|0;0<l&&19===++A&&(a+=2,A=0)}if(p<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18-6*l;for(c=16;p<g;c-=8)b[p++]=B>>c|0}return b};e.decodeFast=function(c){if(null!= c&&c instanceof Array&&(0==c.length||null==c[0]||"string"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decodeFast$char_A(c);if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"number"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decodeFast$byte_A(c);if("string"===typeof c||null===c)return f.mxgraph.online.mxBase64.decodeFast$java_lang_String(c);throw Error("invalid overload");};e.encodeToByte=function(c,b){var a=null!=c?c.length:0;if(0===a)return[];for(var d=3*(a/ -3|0),f=((a-1)/3|0)+1<<2,g=f+=b?((f-1)/76|0)<<1:0,l=[];0<g--;)l.push(0);for(var q=0,A=0,z=0;q<d;)g=(c[q++]&255)<<16|(c[q++]&255)<<8|c[q++]&255,l[A++]=e.CA_$LI$()[g>>>18&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g>>>12&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g&63].charCodeAt(0),b&&19===++z&&A<f-2&&(l[A++]=13,l[A++]=10,z=0);q=a-d;0<q&&(g=(c[d]&255)<<10|(2===q?(c[a-1]&255)<<2:0),l[f-4]=e.CA_$LI$()[g>>12].charCodeAt(0),l[f-3]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[f-2]= -2===q?e.CA_$LI$()[g&63].charCodeAt(0):61,l[f-1]=61);return l};e.decode$byte_A=function(c){for(var b=c.length,a=0,d=0;d<b;d++)0>e.IA_$LI$()[c[d]&255]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c[--d]&255];)61==c[d]&&f++;d=b=(6*(b-a)>>3)-f;for(a=[];0<d--;)a.push(0);for(var g=f=0;g<b;){for(var l=d=0;4>l;l++){var q=e.IA_$LI$()[c[f++]&255];0<=q?d|=q<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decodeFast$byte_A=function(c){var b=c.length;if(0=== -b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[c[a]&255];)a++;for(;0<d&&0>e.IA_$LI$()[c[d]&255];)d--;for(var f=61==c[d]?61==c[d-1]?2:1:0,g=d-a+1,l=76<b?(13==c[76]?g/78|0:0)<<1:0,q=g=(6*(g-l)>>3)-f,b=[];0<q--;)b.push(0);for(var A=q=0,z=3*(g/3|0);q<z;){var B=e.IA_$LI$()[c[a++]]<<18|e.IA_$LI$()[c[a++]]<<12|e.IA_$LI$()[c[a++]]<<6|e.IA_$LI$()[c[a++]];b[q++]=B>>16|0;b[q++]=B>>8|0;b[q++]=B|0;0<l&&19===++A&&(a+=2,A=0)}if(q<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c[a++]]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=B>> +3|0),f=((a-1)/3|0)+1<<2,g=f+=b?((f-1)/76|0)<<1:0,l=[];0<g--;)l.push(0);for(var p=0,A=0,z=0;p<d;)g=(c[p++]&255)<<16|(c[p++]&255)<<8|c[p++]&255,l[A++]=e.CA_$LI$()[g>>>18&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g>>>12&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g&63].charCodeAt(0),b&&19===++z&&A<f-2&&(l[A++]=13,l[A++]=10,z=0);p=a-d;0<p&&(g=(c[d]&255)<<10|(2===p?(c[a-1]&255)<<2:0),l[f-4]=e.CA_$LI$()[g>>12].charCodeAt(0),l[f-3]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[f-2]= +2===p?e.CA_$LI$()[g&63].charCodeAt(0):61,l[f-1]=61);return l};e.decode$byte_A=function(c){for(var b=c.length,a=0,d=0;d<b;d++)0>e.IA_$LI$()[c[d]&255]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c[--d]&255];)61==c[d]&&f++;d=b=(6*(b-a)>>3)-f;for(a=[];0<d--;)a.push(0);for(var g=f=0;g<b;){for(var l=d=0;4>l;l++){var p=e.IA_$LI$()[c[f++]&255];0<=p?d|=p<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decodeFast$byte_A=function(c){var b=c.length;if(0=== +b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[c[a]&255];)a++;for(;0<d&&0>e.IA_$LI$()[c[d]&255];)d--;for(var f=61==c[d]?61==c[d-1]?2:1:0,g=d-a+1,l=76<b?(13==c[76]?g/78|0:0)<<1:0,p=g=(6*(g-l)>>3)-f,b=[];0<p--;)b.push(0);for(var A=p=0,z=3*(g/3|0);p<z;){var B=e.IA_$LI$()[c[a++]]<<18|e.IA_$LI$()[c[a++]]<<12|e.IA_$LI$()[c[a++]]<<6|e.IA_$LI$()[c[a++]];b[p++]=B>>16|0;b[p++]=B>>8|0;b[p++]=B|0;0<l&&19===++A&&(a+=2,A=0)}if(p<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c[a++]]<<18-6*l;for(c=16;p<g;c-=8)b[p++]=B>> c|0}return b};e.encodeToString=function(c,b,a){return e.encodeToChar(c,b,a).join("")};e.decode$java_lang_String=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>e.IA_$LI$()[c.charAt(d).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c.charAt(--d).charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b=[];0<a--;)b.push(0);return b}(b),g=f=0;g<b;){for(var l= -d=0;4>l;l++){var q=e.IA_$LI$()[c.charAt(f++).charCodeAt(0)];0<=q?d|=q<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decodeFast$java_lang_String=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(a))&255];)a++;for(;0<d&&0>e.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&255];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))? -61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d-1))?2:1:0,g=d-a+1,l=76<b?(13==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(76))?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),q=0,A=0,z=3*(g/3|0);q<z;){var B=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<12|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<6|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)];b[q++]=B>>16|0;b[q++]=B>>8|0;b[q++]= -B|0;0<l&&19===++A&&(a+=2,A=0)}if(q<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=B>>c|0}return b};return e}();e.__static_initialized=!1;g.mxBase64=e;e.__class="com.mxgraph.online.mxBase64"})(g.online||(g.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$(); +d=0;4>l;l++){var p=e.IA_$LI$()[c.charAt(f++).charCodeAt(0)];0<=p?d|=p<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decodeFast$java_lang_String=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(a))&255];)a++;for(;0<d&&0>e.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&255];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))? +61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d-1))?2:1:0,g=d-a+1,l=76<b?(13==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(76))?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),p=0,A=0,z=3*(g/3|0);p<z;){var B=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<12|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<6|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)];b[p++]=B>>16|0;b[p++]=B>>8|0;b[p++]= +B|0;0<l&&19===++A&&(a+=2,A=0)}if(p<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18-6*l;for(c=16;p<g;c-=8)b[p++]=B>>c|0}return b};return e}();e.__static_initialized=!1;g.mxBase64=e;e.__class="com.mxgraph.online.mxBase64"})(g.online||(g.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$(); com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(); com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$(); -EditorUi.prototype.doImportVisio=function(f,g,q,e){e=e||f.name;null!=e&&/(\.vs(x|sx?))($|\?)/i.test(e)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(f,g,null,q):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(f,g,null,q)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y\:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x\:Static\s+(.+)\.(.+)\}$/; -mxGraphMlCodec.prototype.decode=function(f,g,q){try{var e=mxUtils.parseXml(f),l=this.getDirectChildNamedElements(e.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(e.documentElement);f='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(e=0;e<l.length;e++){var c=l[e],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(c,b,b.getDefaultParent()),e=0;e<this.edges.length;e++)for(var d=this.edges[e],k=d.edges,n=d.parent,w=d.dx,y=d.dy, -A=0;A<k.length;A++)this.importEdge(k[A],b,n,w,y)}catch(Z){throw console.log(Z),Z;}finally{a.endUpdate()}a.beginUpdate();try{var z=b.getModel().cells,B;for(B in z){var C=z[B];if(C.edge&&0<C.getChildCount())for(e=0;e<C.getChildCount();e++){var E=C.children[e].geometry;if(E.adjustIt){var D=b.view.getState(C),G=D.absolutePoints,T=G[0],M=G[G.length-1],X=E.x,ba=E.y,w=M.x-T.x,y=M.y-T.y,ea=T.x+X*w,O=T.y+X*y,ma=Math.sqrt(w*w+y*y),w=w/ma,y=y/ma,ea=ea-ba*y,O=O+ba*w,ia=b.view.getRelativePoint(D,ea,O);E.x=ia.x; -E.y=ia.y}}}}catch(Z){throw console.log(Z),Z;}finally{a.endUpdate()}f+=this.processPage(b,e+1)}g&&g(f+"</mxfile>")}catch(Z){q&&q(Z)}}; +EditorUi.prototype.doImportVisio=function(f,g,p,e){e=e||f.name;null!=e&&/(\.vs(x|sx?))($|\?)/i.test(e)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(f,g,null,p):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(f,g,null,p)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y\:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x\:Static\s+(.+)\.(.+)\}$/; +mxGraphMlCodec.prototype.decode=function(f,g,p){try{var e=mxUtils.parseXml(f),l=this.getDirectChildNamedElements(e.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(e.documentElement);f='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(e=0;e<l.length;e++){var c=l[e],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(c,b,b.getDefaultParent()),e=0;e<this.edges.length;e++)for(var d=this.edges[e],k=d.edges,n=d.parent,w=d.dx,y=d.dy, +A=0;A<k.length;A++)this.importEdge(k[A],b,n,w,y)}catch(Z){throw console.log(Z),Z;}finally{a.endUpdate()}a.beginUpdate();try{var z=b.getModel().cells,B;for(B in z){var C=z[B];if(C.edge&&0<C.getChildCount())for(e=0;e<C.getChildCount();e++){var E=C.children[e].geometry;if(E.adjustIt){var D=b.view.getState(C),G=D.absolutePoints,T=G[0],M=G[G.length-1],X=E.x,ba=E.y,w=M.x-T.x,y=M.y-T.y,ea=T.x+X*w,O=T.y+X*y,na=Math.sqrt(w*w+y*y),w=w/na,y=y/na,ea=ea-ba*y,O=O+ba*w,ia=b.view.getRelativePoint(D,ea,O);E.x=ia.x; +E.y=ia.y}}}}catch(Z){throw console.log(Z),Z;}finally{a.endUpdate()}f+=this.processPage(b,e+1)}g&&g(f+"</mxfile>")}catch(Z){p&&p(Z)}}; mxGraphMlCodec.prototype.initializeKeys=function(f){var g=this.getDirectChildNamedElements(f,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]= -{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var q,e=0;e<g.length;e++){var l=this.dataElem2Obj(g[e]),c=l[mxGraphMlConstants.ID],b=l[mxGraphMlConstants.KEY_FOR],a=l[mxGraphMlConstants.KEY_NAME],d=l[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(q=c);a=a?a:d;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]= -{key:c,keyObj:l};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:c,keyObj:l};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:c,keyObj:l};break;case mxGraphMlConstants.ALL:l={key:c,keyObj:l},this.nodesKeys[a]=l,this.edgesKeys[a]=l,this.portsKeys[a]=l}}f=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA);for(e=0;e<f.length;e++)if(f[e].getAttribute(mxGraphMlConstants.KEY)==q)for(b=this.getDirectChildNamedElements(f[e],mxGraphMlConstants.Y_SHARED_DATA),g=0;g<b.length;g++)for(a= +{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var p,e=0;e<g.length;e++){var l=this.dataElem2Obj(g[e]),c=l[mxGraphMlConstants.ID],b=l[mxGraphMlConstants.KEY_FOR],a=l[mxGraphMlConstants.KEY_NAME],d=l[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(p=c);a=a?a:d;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]= +{key:c,keyObj:l};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:c,keyObj:l};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:c,keyObj:l};break;case mxGraphMlConstants.ALL:l={key:c,keyObj:l},this.nodesKeys[a]=l,this.edgesKeys[a]=l,this.portsKeys[a]=l}}f=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA);for(e=0;e<f.length;e++)if(f[e].getAttribute(mxGraphMlConstants.KEY)==p)for(b=this.getDirectChildNamedElements(f[e],mxGraphMlConstants.Y_SHARED_DATA),g=0;g<b.length;g++)for(a= this.getDirectChildElements(b[g]),l=0;l<a.length;l++)c=a[l].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[c]=a[l];else for(b=this.getDirectChildNamedElements(f[e],mxGraphMlConstants.Y_RESOURCES),g=0;g<b.length;g++)for(a=this.getDirectChildElements(b[g]),l=0;l<a.length;l++)c=a[l].getAttribute(mxGraphMlConstants.ID),this.sharedData[c]=a[l]}; -mxGraphMlCodec.prototype.parseAttributes=function(f,g){var q=f.attributes;if(q)for(var e=0;e<q.length;e++){var l=q[e].nodeValue,c=this.refRegexp.exec(l),b=this.staticRegexp.exec(l);c?(l=c[1],c=this.cachedRefObj[l],c||(c={},c[this.sharedData[l].nodeName]=this.dataElem2Obj(this.sharedData[l]),this.cachedRefObj[l]=c),g[q[e].nodeName]=c):b?(g[q[e].nodeName]={},g[q[e].nodeName][b[1]]=b[2]):g[q[e].nodeName]=l}}; -mxGraphMlCodec.prototype.dataElem2Obj=function(f){var g=this.getDirectFirstChildNamedElements(f,mxGraphMlConstants.GRAPHML_REFERENCE)||f.getAttribute(mxGraphMlConstants.REFID),q=null,e=f,l={};if(g){q="string"===typeof g?g:g.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(g=this.cachedRefObj[q])return this.parseAttributes(f,g),g;f=this.sharedData[q]}this.parseAttributes(f,l);for(g=0;g<f.childNodes.length;g++){var c=f.childNodes[g];if(1==c.nodeType){var b=c.nodeName;if(b==mxGraphMlConstants.X_LIST){for(var a= -[],c=this.getDirectChildElements(c),d=0;d<c.length;d++)b=c[d].nodeName,a.push(this.dataElem2Obj(c[d]));l[b]=a}else b==mxGraphMlConstants.X_STATIC?(b=c.getAttribute(mxGraphMlConstants.MEMBER),a=b.lastIndexOf("."),l[b.substr(0,a)]=b.substr(a+1)):(a=b.lastIndexOf("."),0<a&&(b=b.substr(a+1)),null!=l[b]?(l[b]instanceof Array||(l[b]=[l[b]]),l[b].push(this.dataElem2Obj(c))):l[b]=this.dataElem2Obj(c))}else 3!=c.nodeType&&4!=c.nodeType||!c.textContent.trim()||(l["#text"]=c.textContent)}return q?(f={},this.parseAttributes(e, -f),f[this.sharedData[q].nodeName]=l,this.cachedRefObj[q]=f):l};mxGraphMlCodec.prototype.mapArray=function(f,g,q){for(var e={},l=0;l<f.length;l++)f[l].name&&(e[f[l].name]=f[l].value||f[l]);this.mapObject(e,g,q)}; -mxGraphMlCodec.prototype.mapObject=function(f,g,q){if(g.defaults)for(var e in g.defaults)q[e]=g.defaults[e];for(e in g){for(var l=e.split("."),c=f,b=0;b<l.length&&c;b++)c=c[l[b]];null==c&&f&&(c=f[e]);if(null!=c)if(l=g[e],"string"===typeof c)if("string"===typeof l)q[l]=c.toLowerCase();else if("object"===typeof l){b=c.toLowerCase();switch(l.mod){case "color":0==c.indexOf("#")&&9==c.length?b="#"+c.substr(3)+c.substr(1,2):"TRANSPARENT"==c&&(b="none");break;case "shape":b=mxGraphMlShapesMap[c.toLowerCase()]; -break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[c.toLowerCase()];break;case "bpmnSymbol":b=mxGraphMlShapesMap.bpmnSymbol[c.toLowerCase()];break;case "bool":b="true"==c?"1":"0";break;case "scale":try{b=parseFloat(c)*l.scale}catch(a){}break;case "arrow":b=mxGraphMlArrowsMap[c]}null!=b&&(q[l.key]=b)}else l(c,q);else c instanceof Array?this.mapArray(c,l,q):null!=c.name&&null!=c.value?this.mapArray([c],l,q):this.mapObject(c,l,q)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph}; -mxGraphMlCodec.prototype.importGraph=function(f,g,q){for(var e=this.getDirectChildNamedElements(f,mxGraphMlConstants.NODE),l=q,c=0,b=0;l&&l.geometry;)c+=l.geometry.x,b+=l.geometry.y,l=l.parent;for(l=0;l<e.length;l++)this.importNode(e[l],g,q,c,b);this.edges.push({edges:this.getDirectChildNamedElements(f,mxGraphMlConstants.EDGE),parent:q,dx:c,dy:b})}; -mxGraphMlCodec.prototype.importPort=function(f,g){for(var q=f.getAttribute(mxGraphMlConstants.PORT_NAME),e={},l=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),c=0;c<l.length;c++){var b=l[c];b.getAttribute(mxGraphMlConstants.KEY);b=this.dataElem2Obj(b);b.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(b,{"y:FreeNodePortLocationModelParameter.Ratio":function(a,b){var c=a.split(",");b.pos={x:c[0],y:c[1]}}},e)}g[q]=e}; -mxGraphMlCodec.prototype.styleMap2Str=function(f){var g="",q="",e;for(e in f)q+=g+e+"="+f[e],g=";";return q}; -mxGraphMlCodec.prototype.importNode=function(f,g,q,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);g.addCell(a,q);q={graphMlID:b};for(var d=null,k=null,n=null,w=null,y=0;y<c.length;y++){var A=this.dataElem2Obj(c[y]);if(A.key)if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,A,e,l);else if(A.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)n= -A;else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)d=A,A["yjs:StringTemplateNodeStyle"]?k=A["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,A,q);else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)w=A;else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var z=d=null;for(z in A)if("key"!=z&&"#text"!=z){if("y:ProxyAutoBoundsNode"==z){if(z=A[z]["y:Realizers"])for(var B in z)if("active"!=B&&"#text"!=B){d=z[B][z.active];A={};A[B]=d;break}}else d= -A[z];break}d&&(d[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,d[mxGraphMlConstants.GEOMETRY],e,l),d[mxGraphMlConstants.NODE_LABEL]&&(w=d[mxGraphMlConstants.NODE_LABEL]));d=A;this.addNodeStyle(a,A,q)}}l=this.getDirectChildNamedElements(f,mxGraphMlConstants.PORT);e={};for(y=0;y<l.length;y++)this.importPort(l[y],e);k&&this.handleTemplates(k,n,a,q);this.handleFixedRatio(a,q);this.handleCompoundShape(a,q,d,null);0==q.strokeWidth&&(q.strokeColor="none");a.style=this.styleMap2Str(q);f=this.getDirectChildNamedElements(f, -mxGraphMlConstants.GRAPH);for(y=0;y<f.length;y++)this.importGraph(f[y],g,a,e);w&&this.addLabels(a,w,q,g);this.nodesMap[b]={node:a,ports:e}}; -mxGraphMlCodec.prototype.addNodeStyle=function(f,g,q){f=function(a,b){if("line"!=a){b.dashed=1;var c;switch(a){case "DashDot":c="3 1 1 1";break;case "Dot":c="1 1";break;case "DashDotDot":c="3 1 1 1 1 1";break;case "Dash":c="3 1";break;case "dotted":c="1 3";break;case "dashed":c="5 2";break;default:c=a.replace(/0/g,"1")}c&&(0>c.indexOf(" ")&&(c=c+" "+c),b.dashPattern=c)}};f={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape", +mxGraphMlCodec.prototype.parseAttributes=function(f,g){var p=f.attributes;if(p)for(var e=0;e<p.length;e++){var l=p[e].nodeValue,c=this.refRegexp.exec(l),b=this.staticRegexp.exec(l);c?(l=c[1],c=this.cachedRefObj[l],c||(c={},c[this.sharedData[l].nodeName]=this.dataElem2Obj(this.sharedData[l]),this.cachedRefObj[l]=c),g[p[e].nodeName]=c):b?(g[p[e].nodeName]={},g[p[e].nodeName][b[1]]=b[2]):g[p[e].nodeName]=l}}; +mxGraphMlCodec.prototype.dataElem2Obj=function(f){var g=this.getDirectFirstChildNamedElements(f,mxGraphMlConstants.GRAPHML_REFERENCE)||f.getAttribute(mxGraphMlConstants.REFID),p=null,e=f,l={};if(g){p="string"===typeof g?g:g.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(g=this.cachedRefObj[p])return this.parseAttributes(f,g),g;f=this.sharedData[p]}this.parseAttributes(f,l);for(g=0;g<f.childNodes.length;g++){var c=f.childNodes[g];if(1==c.nodeType){var b=c.nodeName;if(b==mxGraphMlConstants.X_LIST){for(var a= +[],c=this.getDirectChildElements(c),d=0;d<c.length;d++)b=c[d].nodeName,a.push(this.dataElem2Obj(c[d]));l[b]=a}else b==mxGraphMlConstants.X_STATIC?(b=c.getAttribute(mxGraphMlConstants.MEMBER),a=b.lastIndexOf("."),l[b.substr(0,a)]=b.substr(a+1)):(a=b.lastIndexOf("."),0<a&&(b=b.substr(a+1)),null!=l[b]?(l[b]instanceof Array||(l[b]=[l[b]]),l[b].push(this.dataElem2Obj(c))):l[b]=this.dataElem2Obj(c))}else 3!=c.nodeType&&4!=c.nodeType||!c.textContent.trim()||(l["#text"]=c.textContent)}return p?(f={},this.parseAttributes(e, +f),f[this.sharedData[p].nodeName]=l,this.cachedRefObj[p]=f):l};mxGraphMlCodec.prototype.mapArray=function(f,g,p){for(var e={},l=0;l<f.length;l++)f[l].name&&(e[f[l].name]=f[l].value||f[l]);this.mapObject(e,g,p)}; +mxGraphMlCodec.prototype.mapObject=function(f,g,p){if(g.defaults)for(var e in g.defaults)p[e]=g.defaults[e];for(e in g){for(var l=e.split("."),c=f,b=0;b<l.length&&c;b++)c=c[l[b]];null==c&&f&&(c=f[e]);if(null!=c)if(l=g[e],"string"===typeof c)if("string"===typeof l)p[l]=c.toLowerCase();else if("object"===typeof l){b=c.toLowerCase();switch(l.mod){case "color":0==c.indexOf("#")&&9==c.length?b="#"+c.substr(3)+c.substr(1,2):"TRANSPARENT"==c&&(b="none");break;case "shape":b=mxGraphMlShapesMap[c.toLowerCase()]; +break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[c.toLowerCase()];break;case "bpmnSymbol":b=mxGraphMlShapesMap.bpmnSymbol[c.toLowerCase()];break;case "bool":b="true"==c?"1":"0";break;case "scale":try{b=parseFloat(c)*l.scale}catch(a){}break;case "arrow":b=mxGraphMlArrowsMap[c]}null!=b&&(p[l.key]=b)}else l(c,p);else c instanceof Array?this.mapArray(c,l,p):null!=c.name&&null!=c.value?this.mapArray([c],l,p):this.mapObject(c,l,p)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph}; +mxGraphMlCodec.prototype.importGraph=function(f,g,p){for(var e=this.getDirectChildNamedElements(f,mxGraphMlConstants.NODE),l=p,c=0,b=0;l&&l.geometry;)c+=l.geometry.x,b+=l.geometry.y,l=l.parent;for(l=0;l<e.length;l++)this.importNode(e[l],g,p,c,b);this.edges.push({edges:this.getDirectChildNamedElements(f,mxGraphMlConstants.EDGE),parent:p,dx:c,dy:b})}; +mxGraphMlCodec.prototype.importPort=function(f,g){for(var p=f.getAttribute(mxGraphMlConstants.PORT_NAME),e={},l=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),c=0;c<l.length;c++){var b=l[c];b.getAttribute(mxGraphMlConstants.KEY);b=this.dataElem2Obj(b);b.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(b,{"y:FreeNodePortLocationModelParameter.Ratio":function(a,b){var c=a.split(",");b.pos={x:c[0],y:c[1]}}},e)}g[p]=e}; +mxGraphMlCodec.prototype.styleMap2Str=function(f){var g="",p="",e;for(e in f)p+=g+e+"="+f[e],g=";";return p}; +mxGraphMlCodec.prototype.importNode=function(f,g,p,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);g.addCell(a,p);p={graphMlID:b};for(var d=null,k=null,n=null,w=null,y=0;y<c.length;y++){var A=this.dataElem2Obj(c[y]);if(A.key)if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,A,e,l);else if(A.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)n= +A;else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)d=A,A["yjs:StringTemplateNodeStyle"]?k=A["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,A,p);else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)w=A;else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var z=d=null;for(z in A)if("key"!=z&&"#text"!=z){if("y:ProxyAutoBoundsNode"==z){if(z=A[z]["y:Realizers"])for(var B in z)if("active"!=B&&"#text"!=B){d=z[B][z.active];A={};A[B]=d;break}}else d= +A[z];break}d&&(d[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,d[mxGraphMlConstants.GEOMETRY],e,l),d[mxGraphMlConstants.NODE_LABEL]&&(w=d[mxGraphMlConstants.NODE_LABEL]));d=A;this.addNodeStyle(a,A,p)}}l=this.getDirectChildNamedElements(f,mxGraphMlConstants.PORT);e={};for(y=0;y<l.length;y++)this.importPort(l[y],e);k&&this.handleTemplates(k,n,a,p);this.handleFixedRatio(a,p);this.handleCompoundShape(a,p,d,null);0==p.strokeWidth&&(p.strokeColor="none");a.style=this.styleMap2Str(p);f=this.getDirectChildNamedElements(f, +mxGraphMlConstants.GRAPH);for(y=0;y<f.length;y++)this.importGraph(f[y],g,a,e);w&&this.addLabels(a,w,p,g);this.nodesMap[b]={node:a,ports:e}}; +mxGraphMlCodec.prototype.addNodeStyle=function(f,g,p){f=function(a,b){if("line"!=a){b.dashed=1;var c;switch(a){case "DashDot":c="3 1 1 1";break;case "Dot":c="1 1";break;case "DashDotDot":c="3 1 1 1 1 1";break;case "Dash":c="3 1";break;case "dotted":c="1 3";break;case "dashed":c="5 2";break;default:c=a.replace(/0/g,"1")}c&&(0>c.indexOf(" ")&&(c=c+" "+c),b.dashPattern=c)}};f={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape", mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(a,b){"true"==a&&(b.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(a,b){"false"==a&&(b.strokeColor="none")}, type:f},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:f,"dashStyle.yjs:DashStyle.dashes":f,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var e=mxUtils.clone(f);e.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var l=mxUtils.clone(f);l.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var c=mxUtils.clone(f);c.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"}; var b=mxUtils.clone(f);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(f);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var d=mxUtils.clone(f);d.defaults={shape:"js:bpmnDataObject"};var k=mxUtils.clone(f);k.defaults={shape:"datastore"};var n=mxUtils.clone(f);n.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var w= @@ -1473,62 +1474,62 @@ startSize:20,strokeWidth:4,spacingLeft:10};z.isCollapsible={key:"collapsible",mo var C=mxUtils.clone(f);C.defaults={shape:"js:table"};var E=mxUtils.clone(f);E.defaults={shape:"image"};E.image=function(a,b){b.image=a};var D=mxUtils.clone(f);D.defaults={shape:"image"};D["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(a,b){b.image="data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a))};var G=mxUtils.clone(f);G.defaults={shape:"swimlane",startSize:20};G["y:Shape.type"]=function(a,b){"roundrectangle"==a&&(b.rounded=1,b.arcSize=5)};var T=mxUtils.clone(f);T.defaults={shape:"js:table2"}; var M=mxUtils.clone(f);M.defaults={gradientDirection:"east"};M["y:Fill"].color2={key:"gradientColor",mod:"color"};M["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize", mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(g,{"yjs:ShapeNodeStyle":f,"demostyle:FlowchartNodeStyle":f,"demostyle:AssetNodeStyle":e,"bpmn:ActivityNodeStyle":l,"bpmn:GatewayNodeStyle":c,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":d,"bpmn:DataStoreNodeStyle":k,"bpmn:GroupNodeStyle":n,"bpmn:ChoreographyNodeStyle":w,"yjs:BevelNodeStyle":y,"yjs:ShinyPlateNodeStyle":A,"demostyle:DemoGroupStyle":z,"yjs:CollapsibleNodeStyleDecorator":B, -"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":E,"y:ShapeNode":f,"y:GenericNode":M,"y:GenericGroupNode":M,"y:TableNode":T,"y:SVGNode":D,"y:GroupNode":G},q)}; -mxGraphMlCodec.prototype.handleTemplates=function(f,g,q,e){if(f){for(var l=q.geometry.width,c=q.geometry.height,b='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+l+" "+c+'"><g>',a,d=[],k=/\{TemplateBinding\s+([^}]+)\}/g;null!=(a=k.exec(f));){var n="";switch(a[1]){case "width":n=l;break;case "height":n=c}d.push({match:a[0],repl:n})}if(g&&g["y:Json"])for(c=JSON.parse(g["y:Json"]["#text"]),k=/\{Binding\s+([^}]+)\}/g;null!=(a=k.exec(f));)if(n=a[1].split(","), +"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":E,"y:ShapeNode":f,"y:GenericNode":M,"y:GenericGroupNode":M,"y:TableNode":T,"y:SVGNode":D,"y:GroupNode":G},p)}; +mxGraphMlCodec.prototype.handleTemplates=function(f,g,p,e){if(f){for(var l=p.geometry.width,c=p.geometry.height,b='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+l+" "+c+'"><g>',a,d=[],k=/\{TemplateBinding\s+([^}]+)\}/g;null!=(a=k.exec(f));){var n="";switch(a[1]){case "width":n=l;break;case "height":n=c}d.push({match:a[0],repl:n})}if(g&&g["y:Json"])for(c=JSON.parse(g["y:Json"]["#text"]),k=/\{Binding\s+([^}]+)\}/g;null!=(a=k.exec(f));)if(n=a[1].split(","), l=c[n[0]]){if(1<n.length&&n[1].indexOf("Converter=")){var w=mxGraphMlConverters[n[1].substr(11)];w&&(arguments=[l],n[2]&&arguments.push(n[2].substr(11)),l=w.apply(null,arguments))}d.push({match:a[0],repl:mxUtils.htmlEntities(l)})}for(a=0;a<d.length;a++)f=f.replace(d[a].match,d[a].repl);d=[];for(c=/\<text.+data-content="([^"]+).+\<\/text\>/g;null!=(a=c.exec(f));)l=a[0].substr(0,a[0].length-7)+a[1]+"</text>",d.push({match:a[0],repl:l});for(a=0;a<d.length;a++)f=f.replace(d[a].match,d[a].repl);b=b+f+ "</g></svg>";e.shape="image";e.image="data:image/svg+xml,"+(window.btoa?btoa(b):Base64.encode(b))}}; -mxGraphMlCodec.prototype.handleCompoundShape=function(f,g,q,e){var l=g.shape;if(l&&0==l.indexOf("js:")){switch(l){case "js:bpmnArtifactShadow":g.shadow="1";case "js:bpmnArtifact":g.shape=g.symbol;delete g.fillColor;delete g.strokeColor;delete g.gradientColor;this.handleCompoundShape(f,g,q,e);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":g.shape="note;size=16";q=q["bpmn:DataObjectNodeStyle"]||q["y:GenericNode"]||q["y:GenericGroupNode"];e={};this.mapObject(q,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType", -"com.yworks.bpmn.marker1":"marker1"}},e);if("true"==q.collection||"bpmn_marker_parallel"==e.marker1){var c=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");c.vertex=!0;c.geometry.relative=!0;c.geometry.offset=new mxPoint(-5,-10);f.insert(c)}if("INPUT"==q.type||"data_object_type_input"==e.dataObjectType)c=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),c.vertex=!0,c.geometry.relative=!0,c.geometry.offset=new mxPoint(2, -2),f.insert(c);else if("OUTPUT"==q.type||"data_object_type_output"==e.dataObjectType)c=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),c.vertex=!0,c.geometry.relative=!0,c.geometry.offset=new mxPoint(2,2),f.insert(c);break;case "js:BpmnChoreography":this.mapObject(q,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},g);c=f.geometry;c=new mxCell("",new mxGeometry(0,c.height- -20,c.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");c.vertex=!0;f.insert(c);e&&e.lblTxts&&(f.value=e.lblTxts[0],c.value=e.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":g.shape="ext;rounded=1";e={};q=q["y:GenericNode"]||q["y:GenericGroupNode"];this.mapObject(q,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3", +mxGraphMlCodec.prototype.handleCompoundShape=function(f,g,p,e){var l=g.shape;if(l&&0==l.indexOf("js:")){switch(l){case "js:bpmnArtifactShadow":g.shadow="1";case "js:bpmnArtifact":g.shape=g.symbol;delete g.fillColor;delete g.strokeColor;delete g.gradientColor;this.handleCompoundShape(f,g,p,e);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":g.shape="note;size=16";p=p["bpmn:DataObjectNodeStyle"]||p["y:GenericNode"]||p["y:GenericGroupNode"];e={};this.mapObject(p,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType", +"com.yworks.bpmn.marker1":"marker1"}},e);if("true"==p.collection||"bpmn_marker_parallel"==e.marker1){var c=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");c.vertex=!0;c.geometry.relative=!0;c.geometry.offset=new mxPoint(-5,-10);f.insert(c)}if("INPUT"==p.type||"data_object_type_input"==e.dataObjectType)c=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),c.vertex=!0,c.geometry.relative=!0,c.geometry.offset=new mxPoint(2, +2),f.insert(c);else if("OUTPUT"==p.type||"data_object_type_output"==e.dataObjectType)c=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),c.vertex=!0,c.geometry.relative=!0,c.geometry.offset=new mxPoint(2,2),f.insert(c);break;case "js:BpmnChoreography":this.mapObject(p,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},g);c=f.geometry;c=new mxCell("",new mxGeometry(0,c.height- +20,c.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");c.vertex=!0;f.insert(c);e&&e.lblTxts&&(f.value=e.lblTxts[0],c.value=e.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":g.shape="ext;rounded=1";e={};p=p["y:GenericNode"]||p["y:GenericGroupNode"];this.mapObject(p,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3", "com.yworks.bpmn.marker4":"marker4"}},e);switch(e.activityType){case "activity_type_transaction":g["double"]="1"}switch(e.taskType){case "task_type_send":var b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_user":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;"); b.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":b=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":b=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_service":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");b.geometry.offset=new mxPoint(4,5);break;case "task_type_script":b= -new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geometry.offset=new mxPoint(4,5)}b&&(b.vertex=!0,b.geometry.relative=!0,f.insert(b),b=null);for(var a=0,c=1;4>=c;c++)e["marker"+c]&&a++;q=-7.5*a-2*(a-1);for(c=1;c<=a;c++){switch(e["marker"+c]){case "bpmn_marker_closed":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_open":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");b.geometry.offset= -new mxPoint(q,-20);var d=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");d.geometry.offset=new mxPoint(-4,-1);d.geometry.relative=!0;d.vertex=!0;b.insert(d);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_sequential":b=new mxCell("", -new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(q,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(q,-18)}b.geometry.relative=!0;b.vertex=!0;f.insert(b); -q+=20}break;case "js:table":g.shape="swimlane;collapsible=0;swimlaneLine=0";e=q["yjs:TableNodeStyle"]||q["demotablestyle:DemoTableStyle"];!e&&q["bpmn:PoolNodeStyle"]&&(e=q["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(e,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor", -mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},g);g.swimlaneFillColor=g.fillColor;e=e.table["y:Table"];var k=a=0,n={x:0};q=0;(c=e.Insets)?(c=c.split(","),"0"!=c[0]?(g.startSize=c[0],n.x=parseFloat(c[0]),g.horizontal="0"):"0"!=c[1]&&(g.startSize=c[1],q=parseFloat(c[1]),k+=q)):g.startSize="0";var w={},y={Insets:function(a,b){b.startSize=a.split(",")[0]}, +new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geometry.offset=new mxPoint(4,5)}b&&(b.vertex=!0,b.geometry.relative=!0,f.insert(b),b=null);for(var a=0,c=1;4>=c;c++)e["marker"+c]&&a++;p=-7.5*a-2*(a-1);for(c=1;c<=a;c++){switch(e["marker"+c]){case "bpmn_marker_closed":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");b.geometry.offset=new mxPoint(p,-20);break;case "bpmn_marker_open":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");b.geometry.offset= +new mxPoint(p,-20);var d=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");d.geometry.offset=new mxPoint(-4,-1);d.geometry.relative=!0;d.vertex=!0;b.insert(d);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(p,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(p,-20);break;case "bpmn_marker_sequential":b=new mxCell("", +new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(p,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(p,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(p,-18)}b.geometry.relative=!0;b.vertex=!0;f.insert(b); +p+=20}break;case "js:table":g.shape="swimlane;collapsible=0;swimlaneLine=0";e=p["yjs:TableNodeStyle"]||p["demotablestyle:DemoTableStyle"];!e&&p["bpmn:PoolNodeStyle"]&&(e=p["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(e,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor", +mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},g);g.swimlaneFillColor=g.fillColor;e=e.table["y:Table"];var k=a=0,n={x:0};p=0;(c=e.Insets)?(c=c.split(","),"0"!=c[0]?(g.startSize=c[0],n.x=parseFloat(c[0]),g.horizontal="0"):"0"!=c[1]&&(g.startSize=c[1],p=parseFloat(c[1]),k+=p)):g.startSize="0";var w={},y={Insets:function(a,b){b.startSize=a.split(",")[0]}, "Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor", mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(e.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":y},w);b={};d={Insets:function(a,b){b.startSize=a.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill", mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(e.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"}, -"y:StripeDefaults":d},b);var c=f.geometry,a=e.Rows["y:Row"],k=k+parseFloat(b.startSize),A=n.x,z=n.x;n.lx=n.x;if(a)for(a instanceof Array||(a=[a]),c=0;c<a.length;c++)n.x=z,n.lx=z,k=this.addRow(a[c],f,c&1,k,n,y,w),A=Math.max(n.x,A);e=e.Columns["y:Column"];a=A;if(e)for(e instanceof Array||(e=[e]),c=0;c<e.length;c++)a=this.addColumn(e[c],f,c&1,a,q,d,b);break;case "js:table2":g.shape="swimlane;collapsible=0;swimlaneLine=0";e={};this.mapObject(q,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor", +"y:StripeDefaults":d},b);var c=f.geometry,a=e.Rows["y:Row"],k=k+parseFloat(b.startSize),A=n.x,z=n.x;n.lx=n.x;if(a)for(a instanceof Array||(a=[a]),c=0;c<a.length;c++)n.x=z,n.lx=z,k=this.addRow(a[c],f,c&1,k,n,y,w),A=Math.max(n.x,A);e=e.Columns["y:Column"];a=A;if(e)for(e instanceof Array||(e=[e]),c=0;c<e.length;c++)a=this.addColumn(e[c],f,c&1,a,p,d,b);break;case "js:table2":g.shape="swimlane;collapsible=0;swimlaneLine=0";e={};this.mapObject(p,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor", mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle", POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},e);g.swimlaneFillColor=g.fillColor;y=b=0;"pool_type_lane_and_column"==e.isHorz||"pool_type_empty"==e.isHorz||"pool_type_lane"==e.isHorz?y=parseFloat(e.tblHWidth):b=parseFloat(e.tblHHeight); -g.startSize=b?b:y;try{a=q["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];d=q["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];k="lane.style.rows"==e.laneStyle||"lane_style_rows"==e.laneStyle;a instanceof Array||(a=[a]);d instanceof Array||(d=[d]);n=parseFloat(e.rowHWidth);for(c=0;c<a.length;c++)a[c]["y:Insets"]&&(n=Math.max(n,parseFloat(a[c]["y:Insets"].left)+parseFloat(a[c]["y:Insets"].right)));w=parseFloat(e.colHHeight);for(c=0;c<d.length;c++)d[c]["y:Insets"]&&(w=Math.max(w,parseFloat(d[c]["y:Insets"].top)+ -parseFloat(d[c]["y:Insets"].bottom)));k?(this.addTbl2Rows(f,a,b,y,n,w,k,e),this.addTbl2Cols(f,d,b,y,n,w,k,e)):(this.addTbl2Cols(f,d,b,y,n,w,k,e),this.addTbl2Rows(f,a,b,y,n,w,k,e))}catch(B){}break;case "js:relationship_big_entity":g.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(f=q["y:GenericNode"]["y:Fill"])g.fillColor=f.color2,g.swimlaneFillColor=f.color;break;case "js:relationship_attribute":g.shape="1"==g["double"]?"doubleEllipse":"ellipse"}0<l.indexOf("Shadow")&&(g.shadow= +g.startSize=b?b:y;try{a=p["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];d=p["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];k="lane.style.rows"==e.laneStyle||"lane_style_rows"==e.laneStyle;a instanceof Array||(a=[a]);d instanceof Array||(d=[d]);n=parseFloat(e.rowHWidth);for(c=0;c<a.length;c++)a[c]["y:Insets"]&&(n=Math.max(n,parseFloat(a[c]["y:Insets"].left)+parseFloat(a[c]["y:Insets"].right)));w=parseFloat(e.colHHeight);for(c=0;c<d.length;c++)d[c]["y:Insets"]&&(w=Math.max(w,parseFloat(d[c]["y:Insets"].top)+ +parseFloat(d[c]["y:Insets"].bottom)));k?(this.addTbl2Rows(f,a,b,y,n,w,k,e),this.addTbl2Cols(f,d,b,y,n,w,k,e)):(this.addTbl2Cols(f,d,b,y,n,w,k,e),this.addTbl2Rows(f,a,b,y,n,w,k,e))}catch(B){}break;case "js:relationship_big_entity":g.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(f=p["y:GenericNode"]["y:Fill"])g.fillColor=f.color2,g.swimlaneFillColor=f.color;break;case "js:relationship_attribute":g.shape="1"==g["double"]?"doubleEllipse":"ellipse"}0<l.indexOf("Shadow")&&(g.shadow= "1")}}; -mxGraphMlCodec.prototype.addTbl2Rows=function(f,g,q,e,l,c,b,a){q+=c;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var y={shape:"swimlane;collapsible=0;horizontal=0",startSize:l,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(y.startSize)&&(y.fillColor="none",y.swimlaneLine="0");if(b){var A=n?a.headerColorAlt:a.headerColor;y.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;y.fillColor=A?A:y.swimlaneFillColor}n=parseFloat(g[k].height);A=d&&0==k?c:0; -w.geometry=new mxGeometry(e,q-A,f.geometry.width-e,n+A);q+=n;w.style=this.styleMap2Str(y);f.insert(w)}}; -mxGraphMlCodec.prototype.addTbl2Cols=function(f,g,q,e,l,c,b,a){e=l+e;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var y={shape:"swimlane;collapsible=0",startSize:c,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(y.startSize)&&(y.fillColor="none");if(!b){var A=n?a.headerColorAlt:a.headerColor;y.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;y.fillColor=A?A:y.swimlaneFillColor}n=parseFloat(g[k].width);A=d&&0==k?l:0;w.geometry=new mxGeometry(e-A, -q,n+A,f.geometry.height-q);e+=n;w.style=this.styleMap2Str(y);f.insert(w)}}; -mxGraphMlCodec.prototype.addRow=function(f,g,q,e,l,c,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(f,c,d);q?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));q=parseFloat(d.height);a.geometry=new mxGeometry(l.lx,e,g.geometry.width-l.lx,q);var k=f.Labels;k&&this.addLabels(a,k,d);a.style=this.styleMap2Str(d);g.insert(a);f=f["y:Row"];l.lx=0;d.startSize&& -(l.lx=parseFloat(d.startSize),l.x+=l.lx);g=d=l.x;var k=l.lx,n=0;if(f){f instanceof Array||(f=[f]);for(var w=0;w<f.length;w++)l.x=d,l.lx=k,n=this.addRow(f[w],a,w&1,n,l,c,b),g=Math.max(l.x,g)}l.x=g;q=Math.max(q,n);a.geometry.height=q;return e+q}; -mxGraphMlCodec.prototype.addColumn=function(f,g,q,e,l,c,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(f,c,d);q?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));q=parseFloat(d.width);a.geometry=new mxGeometry(e,l,q,g.geometry.height-l);var k=f.Labels;k&&this.addLabels(a,k,d);a.style=this.styleMap2Str(d);g.insert(a);f=f["y:Column"];g=0;if(f)for(f instanceof -Array||(f=[f]),d=0;d<f.length;d++)g=this.addColumn(f[d],a,d&1,g,l,c,b);q=Math.max(q,g);a.geometry.width=q;return e+q};mxGraphMlCodec.prototype.handleFixedRatio=function(f,g){var q=g.shape,e=f.geometry;if(q&&e)if(0<q.indexOf(";aspect=fixed"))q=Math.min(e.height,e.width),q==e.height&&(e.x+=(e.width-q)/2),e.height=q,e.width=q;else if(0<q.indexOf(";rotation=90")||0<q.indexOf(";rotation=-90")){var q=e.height,l=e.width;e.height=l;e.width=q;q=(q-l)/2;e.x-=q;e.y+=q}}; -mxGraphMlCodec.prototype.addNodeGeo=function(f,g,q,e){var l=g[mxGraphMlConstants.RECT],c=0,b=0,a=30,d=30;l?(c=l[mxGraphMlConstants.X],b=l[mxGraphMlConstants.Y],a=l[mxGraphMlConstants.WIDTH],d=l[mxGraphMlConstants.HEIGHT]):(c=g[mxGraphMlConstants.X_L]||c,b=g[mxGraphMlConstants.Y_L]||b,a=g[mxGraphMlConstants.WIDTH_L]||a,d=g[mxGraphMlConstants.HEIGHT_L]||d);f=f.geometry;f.x=parseFloat(c)-q;f.y=parseFloat(b)-e;f.width=parseFloat(a);f.height=parseFloat(d)}; -mxGraphMlCodec.prototype.importEdge=function(f,g,q,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=f.getAttribute(mxGraphMlConstants.EDGE_SOURCE),d=f.getAttribute(mxGraphMlConstants.EDGE_TARGET),k=f.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);f=f.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];d=this.nodesMap[d];q=g.insertEdge(q,null,"",a.node,d.node,"graphMLId="+b);for(var b={graphMlID:b},n=0;n<c.length;n++){var w= -this.dataElem2Obj(c[n]),y=w["y:PolyLineEdge"]||w["y:GenericEdge"]||w["y:ArcEdge"]||w["y:BezierEdge"]||w["y:QuadCurveEdge"]||w["y:SplineEdge"];w.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(q,w,e,l):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(q,w,b):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(q,w,b,g):y&&(this.addEdgeStyle(q,w,b),w=this.addEdgePath(q,y["y:Path"],b,e,l),y["y:EdgeLabel"]&&this.addLabels(q,y["y:EdgeLabel"], -b,g,w),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&k&&(g=a.ports[k],g.pos&&(b.exitX=g.pos.x,b.exitY=g.pos.y));d.ports&&f&&(g=d.ports[f],g.pos&&(b.entryX=g.pos.x,b.entryY=g.pos.y));q.style=this.styleMap2Str(b);return q}; -mxGraphMlCodec.prototype.addEdgeGeo=function(f,g,q,e){if(g=g[mxGraphMlConstants.Y_BEND]){for(var l=[],c=0;c<g.length;c++){var b=g[c][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),l.push(new mxPoint(parseFloat(b[0])-q,parseFloat(b[1])-e)))}f.geometry.points=l}}; -mxGraphMlCodec.prototype.addEdgePath=function(f,g,q,e,l){var c=[];if(g){var b=parseFloat(g.sx),a=parseFloat(g.sy),d=parseFloat(g.tx),k=parseFloat(g.ty),n=f.source.geometry;0!=b||0!=a?(q.exitX=(b+n.width/2)/n.width,q.exitY=(a+n.height/2)/n.height,c.push(new mxPoint(n.x+q.exitX*n.width-e,n.y+q.exitY*n.height-l))):c.push(new mxPoint(n.x+n.width/2-e,n.y+n.height/2-l));b=f.target.geometry;0!=d||0!=k?(q.entryX=(d+b.width/2)/b.width,q.entryY=(k+b.height/2)/b.height,q=new mxPoint(b.x+q.entryX*b.width-e,b.y+ -q.entryY*b.height-l)):q=new mxPoint(b.x+b.width/2-e,b.y+b.height/2-l);if(g=g["y:Point"]){g instanceof Array||(g=[g]);d=[];for(k=0;k<g.length;k++)b=new mxPoint(parseFloat(g[k].x)-e,parseFloat(g[k].y)-l),d.push(b),c.push(b);f.geometry.points=d}c.push(q)}return c}; -mxGraphMlCodec.prototype.addEdgeStyle=function(f,g,q){f=function(a,b){b.dashed=1;var c;switch(a){case "DashDot":c="3 1 1 1";break;case "Dot":c="1 1";break;case "DashDotDot":c="3 1 1 1 1 1";break;case "Dash":c="3 1";break;default:c=a.replace(/0/g,"1")}c&&(0>c.indexOf(" ")&&(c=c+" "+c),b.dashPattern=c)};var e=function(a,b){b.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},l=function(a,b){b.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0": +mxGraphMlCodec.prototype.addTbl2Rows=function(f,g,p,e,l,c,b,a){p+=c;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var y={shape:"swimlane;collapsible=0;horizontal=0",startSize:l,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(y.startSize)&&(y.fillColor="none",y.swimlaneLine="0");if(b){var A=n?a.headerColorAlt:a.headerColor;y.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;y.fillColor=A?A:y.swimlaneFillColor}n=parseFloat(g[k].height);A=d&&0==k?c:0; +w.geometry=new mxGeometry(e,p-A,f.geometry.width-e,n+A);p+=n;w.style=this.styleMap2Str(y);f.insert(w)}}; +mxGraphMlCodec.prototype.addTbl2Cols=function(f,g,p,e,l,c,b,a){e=l+e;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var y={shape:"swimlane;collapsible=0",startSize:c,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(y.startSize)&&(y.fillColor="none");if(!b){var A=n?a.headerColorAlt:a.headerColor;y.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;y.fillColor=A?A:y.swimlaneFillColor}n=parseFloat(g[k].width);A=d&&0==k?l:0;w.geometry=new mxGeometry(e-A, +p,n+A,f.geometry.height-p);e+=n;w.style=this.styleMap2Str(y);f.insert(w)}}; +mxGraphMlCodec.prototype.addRow=function(f,g,p,e,l,c,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(f,c,d);p?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));p=parseFloat(d.height);a.geometry=new mxGeometry(l.lx,e,g.geometry.width-l.lx,p);var k=f.Labels;k&&this.addLabels(a,k,d);a.style=this.styleMap2Str(d);g.insert(a);f=f["y:Row"];l.lx=0;d.startSize&& +(l.lx=parseFloat(d.startSize),l.x+=l.lx);g=d=l.x;var k=l.lx,n=0;if(f){f instanceof Array||(f=[f]);for(var w=0;w<f.length;w++)l.x=d,l.lx=k,n=this.addRow(f[w],a,w&1,n,l,c,b),g=Math.max(l.x,g)}l.x=g;p=Math.max(p,n);a.geometry.height=p;return e+p}; +mxGraphMlCodec.prototype.addColumn=function(f,g,p,e,l,c,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(f,c,d);p?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));p=parseFloat(d.width);a.geometry=new mxGeometry(e,l,p,g.geometry.height-l);var k=f.Labels;k&&this.addLabels(a,k,d);a.style=this.styleMap2Str(d);g.insert(a);f=f["y:Column"];g=0;if(f)for(f instanceof +Array||(f=[f]),d=0;d<f.length;d++)g=this.addColumn(f[d],a,d&1,g,l,c,b);p=Math.max(p,g);a.geometry.width=p;return e+p};mxGraphMlCodec.prototype.handleFixedRatio=function(f,g){var p=g.shape,e=f.geometry;if(p&&e)if(0<p.indexOf(";aspect=fixed"))p=Math.min(e.height,e.width),p==e.height&&(e.x+=(e.width-p)/2),e.height=p,e.width=p;else if(0<p.indexOf(";rotation=90")||0<p.indexOf(";rotation=-90")){var p=e.height,l=e.width;e.height=l;e.width=p;p=(p-l)/2;e.x-=p;e.y+=p}}; +mxGraphMlCodec.prototype.addNodeGeo=function(f,g,p,e){var l=g[mxGraphMlConstants.RECT],c=0,b=0,a=30,d=30;l?(c=l[mxGraphMlConstants.X],b=l[mxGraphMlConstants.Y],a=l[mxGraphMlConstants.WIDTH],d=l[mxGraphMlConstants.HEIGHT]):(c=g[mxGraphMlConstants.X_L]||c,b=g[mxGraphMlConstants.Y_L]||b,a=g[mxGraphMlConstants.WIDTH_L]||a,d=g[mxGraphMlConstants.HEIGHT_L]||d);f=f.geometry;f.x=parseFloat(c)-p;f.y=parseFloat(b)-e;f.width=parseFloat(a);f.height=parseFloat(d)}; +mxGraphMlCodec.prototype.importEdge=function(f,g,p,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=f.getAttribute(mxGraphMlConstants.EDGE_SOURCE),d=f.getAttribute(mxGraphMlConstants.EDGE_TARGET),k=f.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);f=f.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];d=this.nodesMap[d];p=g.insertEdge(p,null,"",a.node,d.node,"graphMLId="+b);for(var b={graphMlID:b},n=0;n<c.length;n++){var w= +this.dataElem2Obj(c[n]),y=w["y:PolyLineEdge"]||w["y:GenericEdge"]||w["y:ArcEdge"]||w["y:BezierEdge"]||w["y:QuadCurveEdge"]||w["y:SplineEdge"];w.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(p,w,e,l):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(p,w,b):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(p,w,b,g):y&&(this.addEdgeStyle(p,w,b),w=this.addEdgePath(p,y["y:Path"],b,e,l),y["y:EdgeLabel"]&&this.addLabels(p,y["y:EdgeLabel"], +b,g,w),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&k&&(g=a.ports[k],g.pos&&(b.exitX=g.pos.x,b.exitY=g.pos.y));d.ports&&f&&(g=d.ports[f],g.pos&&(b.entryX=g.pos.x,b.entryY=g.pos.y));p.style=this.styleMap2Str(b);return p}; +mxGraphMlCodec.prototype.addEdgeGeo=function(f,g,p,e){if(g=g[mxGraphMlConstants.Y_BEND]){for(var l=[],c=0;c<g.length;c++){var b=g[c][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),l.push(new mxPoint(parseFloat(b[0])-p,parseFloat(b[1])-e)))}f.geometry.points=l}}; +mxGraphMlCodec.prototype.addEdgePath=function(f,g,p,e,l){var c=[];if(g){var b=parseFloat(g.sx),a=parseFloat(g.sy),d=parseFloat(g.tx),k=parseFloat(g.ty),n=f.source.geometry;0!=b||0!=a?(p.exitX=(b+n.width/2)/n.width,p.exitY=(a+n.height/2)/n.height,c.push(new mxPoint(n.x+p.exitX*n.width-e,n.y+p.exitY*n.height-l))):c.push(new mxPoint(n.x+n.width/2-e,n.y+n.height/2-l));b=f.target.geometry;0!=d||0!=k?(p.entryX=(d+b.width/2)/b.width,p.entryY=(k+b.height/2)/b.height,p=new mxPoint(b.x+p.entryX*b.width-e,b.y+ +p.entryY*b.height-l)):p=new mxPoint(b.x+b.width/2-e,b.y+b.height/2-l);if(g=g["y:Point"]){g instanceof Array||(g=[g]);d=[];for(k=0;k<g.length;k++)b=new mxPoint(parseFloat(g[k].x)-e,parseFloat(g[k].y)-l),d.push(b),c.push(b);f.geometry.points=d}c.push(p)}return c}; +mxGraphMlCodec.prototype.addEdgeStyle=function(f,g,p){f=function(a,b){b.dashed=1;var c;switch(a){case "DashDot":c="3 1 1 1";break;case "Dot":c="1 1";break;case "DashDotDot":c="3 1 1 1 1 1";break;case "Dash":c="3 1";break;default:c=a.replace(/0/g,"1")}c&&(0>c.indexOf(" ")&&(c=c+" "+c),b.dashPattern=c)};var e=function(a,b){b.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},l=function(a,b){b.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0": "1"},c={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var c=null;switch(a){case "dashed":c="3 1";break;case "dotted":c="1 1";break;case "dashed_dotted":c="3 2 1 2"}c&&(b.dashPattern=c)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";l(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";e(a,b)}},"y:BendStyle":{smoothed:{key:"rounded", mod:"bool"}}},b=mxUtils.clone(c);b.defaults.curved="1";this.mapObject(g,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:f,"dashStyle.yjs:DashStyle.dashes":f,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow", -mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:e,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:l,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":c,"y:GenericEdge":c,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},q)}; -mxGraphMlCodec.prototype.addLabels=function(f,g,q,e,l){q=f.getChildCount();var c=g[mxGraphMlConstants.Y_LABEL]||g;g=[];var b=[],a=[];if(c){c instanceof Array||(c=[c]);for(var d=0;d<c.length;d++){var k=c[d],n={},w=k[mxGraphMlConstants.TEXT]||k;w&&(w=w["#text"]);var y=k[mxGraphMlConstants.LAYOUTPARAMETER]||k||{},A=function(a,b){a&&(a=a.toUpperCase());var c=b.fontStyle||0;switch(a){case "ITALIC":c|=2;break;case "BOLD":c|=1;break;case "UNDERLINE":c|=4}b.fontStyle=c};this.mapObject(k,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor", +mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:e,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:l,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":c,"y:GenericEdge":c,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},p)}; +mxGraphMlCodec.prototype.addLabels=function(f,g,p,e,l){p=f.getChildCount();var c=g[mxGraphMlConstants.Y_LABEL]||g;g=[];var b=[],a=[];if(c){c instanceof Array||(c=[c]);for(var d=0;d<c.length;d++){var k=c[d],n={},w=k[mxGraphMlConstants.TEXT]||k;w&&(w=w["#text"]);var y=k[mxGraphMlConstants.LAYOUTPARAMETER]||k||{},A=function(a,b){a&&(a=a.toUpperCase());var c=b.fontStyle||0;switch(a){case "ITALIC":c|=2;break;case "BOLD":c|=1;break;case "UNDERLINE":c|=4}b.fontStyle=c};this.mapObject(k,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor", mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(a,b){a&&(b.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily", fontSize:"fontSize",fontStyle:A,fontWeight:A,textDecoration:A}},"Style.y:VoidLabelStyle":function(a,b){b.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:A,underlinedText:function(a,b){var c=b.fontStyle||0;"true"==a&&(c|=4);b.fontStyle=c},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},n);n.VoidLbl||"0"==n.hasText||(g.push(w),b.push(n),a.push(y))}}for(d= -0;d<g.length;d++)if(g[d]&&(!a[d]||!a[d]["bpmn:ParticipantParameter"])){g[d]=mxUtils.htmlEntities(g[d],!1).replace(/\n/g,"<br/>");y=f.geometry;n=new mxCell(g[d],new mxGeometry(0,0,y.width,y.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[d]));n.vertex=!0;f.insert(n,q);c=n.geometry;if(a[d]["y:RatioAnchoredLabelModelParameter"])y=mxUtils.getSizeForString(g[d],b[d].fontSize,b[d].fontFamily),(k=a[d]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(k=k.split(","),c.x=parseFloat(k[0]),c.y=parseFloat(k[1]), +0;d<g.length;d++)if(g[d]&&(!a[d]||!a[d]["bpmn:ParticipantParameter"])){g[d]=mxUtils.htmlEntities(g[d],!1).replace(/\n/g,"<br/>");y=f.geometry;n=new mxCell(g[d],new mxGeometry(0,0,y.width,y.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[d]));n.vertex=!0;f.insert(n,p);c=n.geometry;if(a[d]["y:RatioAnchoredLabelModelParameter"])y=mxUtils.getSizeForString(g[d],b[d].fontSize,b[d].fontFamily),(k=a[d]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(k=k.split(","),c.x=parseFloat(k[0]),c.y=parseFloat(k[1]), c.width=y.width,c.height=y.height,n.style+=";spacingTop=-4;"):n.style+=";align=center;";else if(a[d]["y:InteriorLabelModel"]){switch(a[d]["y:InteriorLabelModel"]){case "Center":n.style+=";verticalAlign=middle;";break;case "North":c.height=1;break;case "West":c.width=y.height,c.height=y.width,c.y=y.height/2-y.width/2,c.x=-c.y,n.style+=";rotation=-90"}n.style+=";align=center;"}else if(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"])switch(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"].Position){case "North":c.height= 1;break;case "West":c.width=y.height,c.height=y.width,c.y=y.height/2-y.width/2,c.x=-c.y,n.style+=";rotation=-90;"}else if(a[d]["bpmn:PoolHeaderLabelModel"]){switch(a[d]["bpmn:PoolHeaderLabelModel"]){case "NORTH":c.height=1;break;case "WEST":c.width=y.height,c.height=y.width,c.y=y.height/2-y.width/2,c.x=-c.y,n.style+=";rotation=-90;"}n.style+=";align=center;"}else if(a[d]["y:InteriorStretchLabelModelParameter"])n.style+=";align=center;";else if(a[d]["y:ExteriorLabelModel"])switch(a[d]["y:ExteriorLabelModel"]){case "East":n.style+= ";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":n.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":n.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":n.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[d]["y:FreeEdgeLabelModelParameter"]){c.relative=!0;c.adjustIt=!0;var y= a[d]["y:FreeEdgeLabelModelParameter"],k=y.Ratio,A=y.Distance,z=y.Angle;k&&(c.x=parseFloat(k));A&&(c.y=parseFloat(A));z&&(n.style+=";rotation="+parseFloat(z)*(180/Math.PI));n.style+=";verticalAlign=middle;"}else if(a[d]["y:EdgePathLabelModelParameter"]){c.relative=!0;y=a[d]["y:EdgePathLabelModelParameter"];w=y.SideOfEdge;k=y.SegmentRatio;c.x=k?2*parseFloat(k)-1:0;if(w)switch(w){case "RightOfEdge":c.y=-15;break;case "LeftOfEdge":c.y=15}n.style+=";verticalAlign=middle;"}else if(y=parseFloat(a[d].x), k=parseFloat(a[d].y),a[d].width&&(c.width=parseFloat(a[d].width)),a[d].height&&(c.height=parseFloat(a[d].height)),f.edge)if(c.relative=!0,c.x=0,c.y=0,n=f.source.geometry.getCenterX()-f.target.geometry.getCenterX(),w=f.source.geometry.getCenterY()-f.target.geometry.getCenterY(),e&&l&&a[d]["y:ModelParameter"]&&a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){var y=a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"],z=parseFloat(y.angle),A=parseFloat(y.distance),B=y.position,k=parseFloat(y.ratio), y=parseFloat(y.segment),C=new mxCellState;C.absolutePoints=l;e.view.updateEdgeBounds(C);var E="left"==B?1:-1;if(-1==y&&6.283185307179586==z)c.offset=new mxPoint(1>Math.abs(k)?C.segments[0]*k:k,E*A);else{-1==y&&(y=0);for(var D=z=0;D<y;D++)z+=C.segments[D];z+=C.segments[y]*k;c.x=z/C.length*2-1;c.y=(("center"==B?0:A)+c.height/2*E*(Math.abs(n)>Math.abs(w)?1:-1))*E}}else isNaN(y)||isNaN(k)||(c.offset=new mxPoint(y+n/2+(0<n?-c.width:c.width),k));else c.x=y||0,c.y=k||0;b[d].rotation&&270==b[d].rotation&& -(c.x-=c.height/2)}return{lblTxts:g,lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(f,g){var q=(new mxCodec).encode(f.getModel());q.setAttribute("style","default-style2");q=mxUtils.getXml(q);q='<diagram name="Page '+g+'">'+Graph.compress(q);return q+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(f,g){for(var q=[],e=f.firstChild;null!=e;e=e.nextSibling)null!=e&&1==e.nodeType&&g==e.nodeName&&0<q.push(e);return q}; -mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(f,g){for(var q=f.firstChild;null!=q;q=q.nextSibling)if(null!=q&&1==q.nodeType&&g==q.nodeName)return q;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(f){var g=[];for(f=f.firstChild;null!=f;f=f.nextSibling)null!=f&&1==f.nodeType&&0<g.push(f);return g};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(f){for(f=f.firstChild;null!=f;f=f.nextSibling)if(null!=f&&1==f.nodeType)return f;return null}; -var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(f,g){if("string"===typeof f){for(var q=f;20<q.length&&-1<q.indexOf(" ");)q=q.substring(0,q.lastIndexOf(" "));return"true"===g?q:f.substring(q.length)}return""},"orgchartconverters.borderconverter":function(f,g){return"boolean"===typeof f?f?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(f,g){return"string"===typeof f?"string"===typeof g?"#"+f+g:"#"+f:f},"orgchartconverters.intermediateconverter":function(f, +(c.x-=c.height/2)}return{lblTxts:g,lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(f,g){var p=(new mxCodec).encode(f.getModel());p.setAttribute("style","default-style2");p=mxUtils.getXml(p);p='<diagram name="Page '+g+'">'+Graph.compress(p);return p+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(f,g){for(var p=[],e=f.firstChild;null!=e;e=e.nextSibling)null!=e&&1==e.nodeType&&g==e.nodeName&&0<p.push(e);return p}; +mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(f,g){for(var p=f.firstChild;null!=p;p=p.nextSibling)if(null!=p&&1==p.nodeType&&g==p.nodeName)return p;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(f){var g=[];for(f=f.firstChild;null!=f;f=f.nextSibling)null!=f&&1==f.nodeType&&0<g.push(f);return g};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(f){for(f=f.firstChild;null!=f;f=f.nextSibling)if(null!=f&&1==f.nodeType)return f;return null}; +var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(f,g){if("string"===typeof f){for(var p=f;20<p.length&&-1<p.indexOf(" ");)p=p.substring(0,p.lastIndexOf(" "));return"true"===g?p:f.substring(p.length)}return""},"orgchartconverters.borderconverter":function(f,g){return"boolean"===typeof f?f?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(f,g){return"string"===typeof f?"string"===typeof g?"#"+f+g:"#"+f:f},"orgchartconverters.intermediateconverter":function(f, g){return"string"===typeof f&&17<f.length?f.replace(/^(.)(\S*)(.*)/,"$1.$3"):f},"orgchartconverters.overviewconverter":function(f,g){return"string"===typeof f&&0<f.length?f.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open", skewed_dash:"dash",concave:"openThin",transparent_circle:"oval",crows_foot_many:"ERmany",crows_foot_one:"ERone",crows_foot_one_optional:"ERzeroToOne",crows_foot_one_mandatory:"ERmandOne",crows_foot_many_optional:"ERzeroToMany",crows_foot_many_mandatory:"ERoneToMany",white_circle:"oval",t_shape:"ERone","short":"classicThin",convex:"",cross:"cross"},mxGraphMlShapesMap={star5:"mxgraph.basic.star;flipV=1",star6:"mxgraph.basic.6_point_star",star8:"mxgraph.basic.8_point_star",sheared_rectangle:"parallelogram", sheared_rectangle2:"parallelogram;flipH=1",hexagon:"hexagon",octagon:"mxgraph.basic.octagon",ellipse:"ellipse",round_rectangle:"rect;rounded=1;arcsize=30",diamond:"rhombus",fat_arrow:"step;perimeter=stepPerimeter",fat_arrow2:"step;perimeter=stepPerimeter;flipH=1",trapez:"trapezoid;perimeter=trapezoidPerimeter;flipV=1",trapez2:"trapezoid;perimeter=trapezoidPerimeter",triangle:"triangle",triangle2:"triangle",rectangle:"rect",rectangle3d:"",roundrectangle:"rect;rounded=1;arcsize=30",fatarrow:"step;perimeter=stepPerimeter", @@ -1555,7 +1556,7 @@ artifact_type_request_message:"message",connection_type_sequence_flow:"",connect HYPEREDGE:"hyperedge",PORT:"port",ENDPOINT:"endpoint",KEY:"key",DATA:"data",ALL:"all",EDGE_SOURCE:"source",EDGE_SOURCE_PORT:"sourceport",EDGE_TARGET:"target",EDGE_TARGET_PORT:"targetport",EDGE_DIRECTED:"directed",EDGE_UNDIRECTED:"undirected",EDGE_DEFAULT:"edgedefault",PORT_NAME:"name",HEIGHT:"Height",WIDTH:"Width",X:"X",Y:"Y",HEIGHT_L:"height",WIDTH_L:"width",X_L:"x",Y_L:"y",JGRAPH:"jGraph:",GEOMETRY:"y:Geometry",FILL:"Fill",SHAPENODE:"y:ShapeNode",SHAPEEDGE:"ShapeEdge",JGRAPH_URL:"http://www.jgraph.com/", KEY_NODE_ID:"d0",KEY_NODE_NAME:"nodeData",KEY_EDGE_ID:"d1",KEY_EDGE_NAME:"edgeData",STYLE:"Style",SHAPE:"Shape",TYPE:"type",LABEL:"label",TEXT:"text",PROPERTIES:"properties",SOURCETARGET:"SourceTarget",RECT:"y:RectD",NODE_LABELS:"NodeLabels",NODE_LABEL:"y:NodeLabel",NODE_GEOMETRY:"NodeGeometry",USER_TAGS:"UserTags",NODE_STYLE:"NodeStyle",NODE_GRAPHICS:"nodegraphics",NODE_VIEW_STATE:"NodeViewState",EDGE_LABELS:"EdgeLabels",EDGE_GEOMETRY:"EdgeGeometry",EDGE_STYLE:"EdgeStyle",EDGE_VIEW_STATE:"EdgeViewState", PORT_LOCATION_PARAMETER:"PortLocationParameter",PORT_STYLE:"PortStyle",PORT_VIEW_STATE:"PortViewState",SHARED_DATA:"SharedData",Y_SHARED_DATA:"y:SharedData",X_KEY:"x:Key",GRAPHML_REFERENCE:"y:GraphMLReference",RESOURCE_KEY:"ResourceKey",Y_RESOURCES:"y:Resources",Y_RESOURCE:"y:Resource",REFID:"refid",X_LIST:"x:List",X_STATIC:"x:Static",Y_BEND:"y:Bend",LOCATION:"Location",Y_LABEL:"y:Label",LAYOUTPARAMETER:"LayoutParameter",YJS_DEFAULTLABELSTYLE:"yjs:DefaultLabelStyle",MEMBER:"Member"}; -EditorUi.prototype.doImportGraphML=function(f,g,q){(new mxGraphMlCodec).decode(f,g,q)};/*! +EditorUi.prototype.doImportGraphML=function(f,g,p){(new mxGraphMlCodec).decode(f,g,p)};/*! JSZip v3.1.3 - A Javascript class for generating and reading zip files <http://stuartk.com/jszip> diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js index 3edcd8975..563b6f472 100644 --- a/src/main/webapp/js/mxgraph/Editor.js +++ b/src/main/webapp/js/mxgraph/Editor.js @@ -103,10 +103,16 @@ Editor.useLocalStorage = typeof(Storage) != 'undefined' && mxClient.IS_IOS; Editor.moveImage = (mxClient.IS_SVG) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=' : IMAGE_PATH + '/move.png'; +/** + * + */ +Editor.rowMoveImage = (mxClient.IS_SVG) ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=' : + IMAGE_PATH + '/thumb_horz.png'; + /** * Images below are for lightbox and embedding toolbars. */ -Editor.helpImage = (mxClient.IS_SVG) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+' : +Editor.helpImage = (mxClient.IS_SVG) ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=' : IMAGE_PATH + '/help.png'; /** @@ -2707,28 +2713,35 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types) var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection; mxGraphHandler.prototype.isDelayedSelection = function(cell, me) { - var result = graphHandlerIsDelayedSelection.apply(this, arguments); - - if (!result) + if (this.graph.cellEditor.getEditingCell() == cell) + { + return false; + } + else { - var model = this.graph.getModel(); - var parent = model.getParent(cell); + var result = graphHandlerIsDelayedSelection.apply(this, arguments); - while (parent != null) + if (!result) { - // Inconsistency for unselected parent swimlane is intended for easier moving - // of stack layouts where the container title section is too far away - if (this.graph.isCellSelected(parent) && model.isVertex(parent)) + var model = this.graph.getModel(); + var parent = model.getParent(cell); + + while (parent != null) { - result = true; - break; + // Inconsistency for unselected parent swimlane is intended for easier moving + // of stack layouts where the container title section is too far away + if (this.graph.isCellSelected(parent) && model.isVertex(parent)) + { + result = true; + break; + } + + parent = model.getParent(parent); } - - parent = model.getParent(parent); } + + return result; } - - return result; }; // Delayed selection of parent group diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js index 6501bcacb..82a3c26d1 100644 --- a/src/main/webapp/js/mxgraph/EditorUi.js +++ b/src/main/webapp/js/mxgraph/EditorUi.js @@ -151,6 +151,22 @@ EditorUi = function(editor, container, lightbox) // Creates hover icons this.hoverIcons = this.createHoverIcons(); + // Hides hover icons when cells are moved + if (graph.graphHandler != null) + { + var graphHandlerStart = graph.graphHandler.start; + + graph.graphHandler.start = function() + { + if (ui.hoverIcons != null) + { + ui.hoverIcons.reset(); + } + + graphHandlerStart.apply(this, arguments); + }; + } + // Adds tooltip when mouse is over scrollbars to show space-drag panning option mxEvent.addListener(this.diagramContainer, 'mousemove', mxUtils.bind(this, function(evt) { diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js index 8297603f4..c1f0ec4e0 100644 --- a/src/main/webapp/js/mxgraph/Graph.js +++ b/src/main/webapp/js/mxgraph/Graph.js @@ -594,7 +594,9 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone) for (var i = 0; i < cells.length; i++) { - var cell = this.graph.getCompositeParent(cells[i]); + // Moves composite parent with exception of selected table rows + var cell = (!this.graph.isTableRow(cells[i]) || !this.graph.isCellSelected(cells[i])) ? + this.graph.getCompositeParent(cells[i]) : cells[i]; if (cell != null && !lookup.get(cell)) { @@ -4327,13 +4329,13 @@ Graph.prototype.createTable = function(rowCount, colCount, w, h) h = (h != null) ? h : 30; return this.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, rowCount * h, - 'html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;' + + 'swimlane;startSize=0;html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;' + 'childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;'), this.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, h, - 'html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;' + - 'portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;'), + 'shape=partialRectangle;html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];' + + 'fillColor=none;strokeColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;'), this.createVertex(null, null, '', 0, 0, w, h, - 'html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;'), + 'shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;left=0;top=0;'), colCount, w, 0), rowCount, 0, h); }; @@ -4382,7 +4384,7 @@ Graph.prototype.createCrossFunctionalSwimlane = function(rowCount, colCount, w, */ Graph.prototype.isTableCell = function(cell) { - return this.isTableRow(this.model.getParent(cell)); + return this.model.isVertex(cell) && this.isTableRow(this.model.getParent(cell)); }; /** @@ -4390,7 +4392,7 @@ Graph.prototype.isTableCell = function(cell) */ Graph.prototype.isTableRow = function(cell) { - return this.isTable(this.model.getParent(cell)); + return this.model.isVertex(cell) && this.isTable(this.model.getParent(cell)); }; /** @@ -4513,13 +4515,21 @@ function TableLayout(graph) /** * Extends mxGraphLayout. */ -TableLayout.prototype = new mxGraphLayout(); +TableLayout.prototype = new mxStackLayout(); TableLayout.prototype.constructor = TableLayout; +/** + * Table layout is always vertical. + */ +TableLayout.prototype.isHorizontal = function() +{ + return false; +}; + /** * Function: getLayout * - * Implements <mxGraphLayout.execute>. + * Returns the child cells and sum of their widths or heights. */ TableLayout.prototype.getLayout = function(parent, vertical) { @@ -4575,14 +4585,15 @@ TableLayout.prototype.execute = function(parent) // Updates row geometry row = row.clone(); - - row.height = (row.height / sh) * h; - row.width = table.width; row.x = offset.x; - row.y = y; + row.y = Math.round(y); + row.width = table.width; + + var rh = (row.height / sh) * h; + y += rh; + row.height = Math.round(y) - row.y; model.setGeometry(rows[i], row); - y += row.height; // Updates cells var off = this.graph.getActualStartSize(rows[i]); @@ -4598,14 +4609,15 @@ TableLayout.prototype.execute = function(parent) // Updates cell geometry cell = cell.clone(); - - cell.width = (cell.width / sw) * w; - cell.height = row.height; + cell.x = Math.round(x); cell.y = 0; - cell.x = x; + cell.height = Math.round(rh); + + var cw = (cell.width / sw) * w; + x += cw; + cell.width = Math.round(x) - cell.x; model.setGeometry(cells[j], cell); - x += cell.width; } } } @@ -8830,17 +8842,18 @@ if (typeof mxVertexHandler != 'undefined') return new mxRectangle(0, 0, (state.text == null) ? 30 : state.text.size * scale + 20, 30); }; - // Hold alt to ignore drop target - var mxGraphHandlerMoveCells = mxGraphHandler.prototype.moveCells; - - mxGraphHandler.prototype.moveCells = function(cells, dx, dy, clone, target, evt) + /** + * Function: isValidDropTarget + * + * Returns true if the given cell is a valid drop target. + */ + mxGraphHandlerIsValidDropTarget = mxGraphHandler.prototype.isValidDropTarget; + mxGraphHandler.prototype.isValidDropTarget = function(target, me) { - if (mxEvent.isAltDown(evt)) - { - target = null; - } - - mxGraphHandlerMoveCells.apply(this, arguments); + return mxGraphHandlerIsValidDropTarget.apply(this, arguments) && + !mxEvent.isAltDown(me.getEvent) && (this.cells.length > 1 || + !this.graph.isTableRow(this.cells[0]) || + this.graph.isTable(target)); }; /** @@ -8985,21 +8998,6 @@ if (typeof mxVertexHandler != 'undefined') return shape; }; - - /** - * Non resizable shapes have stronger selection shape. - */ - var vertexHandlerGetSelectionStrokeWidth = mxVertexHandler.prototype.getSelectionStrokeWidth; - mxVertexHandler.prototype.getSelectionStrokeWidth = function(bounds) - { - // LATER: Use strokewidth 1 when active - return this.graph.cellEditor.getEditingCell() == this.state.cell || - (!this.graph.isTable(this.state.cell) || - !this.graph.isCellSelected(this.state.cell)) && - !this.graph.isTableRow(this.state.cell) && - !this.graph.isTableCell(this.state.cell) ? - vertexHandlerGetSelectionStrokeWidth.apply(this, arguments) : 2; - }; /** * Moves rotation handle to top, right corner. @@ -9095,11 +9093,11 @@ if (typeof mxVertexHandler != 'undefined') if (this.graph.isTableRow(this.state.cell)) { - bounds.grow(-1); + bounds.grow(-2); } else if (this.graph.isTableCell(this.state.cell)) { - bounds.grow(-2); + bounds.grow(-3); } return bounds; @@ -9133,6 +9131,7 @@ if (typeof mxVertexHandler != 'undefined') { if (rowState != null && model.isVertex(rowState.cell)) { + // Adds handle to change row height var shape = new mxLine(new mxRectangle(), mxVertexHandler.TABLE_HANDLE_COLOR, 2); var handle = new mxHandle(rowState, 'row-resize', null, shape); handle.tableHandle = true; @@ -9147,9 +9146,9 @@ if (typeof mxVertexHandler != 'undefined') { this.shape.bounds.x = this.state.x; this.shape.bounds.width = this.state.width; - this.shape.bounds.y = this.state.y + this.state.height + dy; + this.shape.bounds.y = this.state.y + this.state.height + + dy * this.graph.view.scale; this.shape.bounds.height = 1; - this.shape.node.style.zOrder = -1; this.shape.redraw(); } }; @@ -9177,6 +9176,7 @@ if (typeof mxVertexHandler != 'undefined') { if (colState != null) { + // Adds handle to change column width var shape = new mxLine(new mxRectangle(), mxVertexHandler.TABLE_HANDLE_COLOR, 2, true); var handle = new mxHandle(colState, 'col-resize', null, shape); handle.tableHandle = true; @@ -9189,10 +9189,12 @@ if (typeof mxVertexHandler != 'undefined') { if (this.shape != null && this.state.shape != null) { - this.shape.bounds.x = this.state.x + this.state.width + dx; + this.shape.bounds.x = this.state.x + this.state.width + + dx * this.graph.view.scale; this.shape.bounds.width = 1; - this.shape.bounds.y = tableState.y + start.y; - this.shape.bounds.height = tableState.height - start.y - start.height; + this.shape.bounds.y = tableState.y + start.y * this.graph.view.scale; + this.shape.bounds.height = tableState.height - + (start.height + start.y) * this.graph.view.scale; this.shape.redraw(); } }; @@ -9214,7 +9216,8 @@ if (typeof mxVertexHandler != 'undefined') } } - return handles; + // Reserve gives point handles precedence over line handles + return (handles != null) ? handles.reverse() : null; }; var vertexHandlerSetHandlesVisible = mxVertexHandler.prototype.setHandlesVisible; @@ -9222,10 +9225,13 @@ if (typeof mxVertexHandler != 'undefined') mxVertexHandler.prototype.setHandlesVisible = function(visible) { vertexHandlerSetHandlesVisible.apply(this, arguments); - - if (this.rowMoveHandle != null) + + if (this.moveHandles != null) { - this.rowMoveHandle.style.visibility = (visible) ? '' : 'hidden'; + for (var i = 0; i < this.moveHandles.length; i++) + { + this.moveHandles[i].style.visibility = (visible) ? '' : 'hidden'; + } } }; @@ -9242,16 +9248,6 @@ if (typeof mxVertexHandler != 'undefined') } }; - /** - * Adds handle padding for editing cells and exceptions. - */ - mxVertexHandler.prototype.isTableHandler = function() - { - return this.graph.isTableCell(this.state.cell) || - this.graph.isTableRow(this.state.cell) || - this.graph.isTable(this.state.cell); - }; - /** * Adds handle padding for editing cells and exceptions. */ @@ -10062,43 +10058,54 @@ if (typeof mxVertexHandler != 'undefined') this.rotationShape.node.setAttribute('title', mxResources.get('rotateTooltip')); } - this.rowState = null; - - if (this.graph.isTableRow(this.state.cell)) - { - this.rowState = this.state; - } - else if (this.graph.isTableCell(this.state.cell)) - { - this.rowState = this.graph.view.getState( - this.graph.model.getParent(this.state.cell)); - } - - if (this.rowState != null) + if (this.graph.isTable(this.state.cell)) { - this.rowMoveHandle = mxUtils.createImage(Editor.moveImage); - this.rowMoveHandle.style.position = 'absolute'; - this.rowMoveHandle.style.cursor = 'pointer'; - this.rowMoveHandle.style.width = '24px'; - this.rowMoveHandle.style.height = '24px'; - this.graph.container.appendChild(this.rowMoveHandle); + var graph = this.graph; + var model = graph.model; + + // Special handles for moving rows + this.moveHandles = []; - mxEvent.addGestureListeners(this.rowMoveHandle, mxUtils.bind(this, function(evt) + for (var i = 0; i < model.getChildCount(this.state.cell); i++) { - this.graph.graphHandler.start(this.state.cell, - mxEvent.getClientX(evt), mxEvent.getClientY(evt), [this.rowState.cell]); - this.graph.graphHandler.cellWasClicked = true; - this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt); - this.graph.isMouseDown = true; - mxEvent.consume(evt); - })); + (mxUtils.bind(this, function(rowState) + { + if (rowState != null && model.isVertex(rowState.cell)) + { + // Adds handle to move row + var moveHandle = mxUtils.createImage(Editor.rowMoveImage); + moveHandle.style.position = 'absolute'; + moveHandle.style.cursor = 'move'; + moveHandle.style.width = '7px'; + moveHandle.style.height = '4px'; + moveHandle.rowState = rowState; + + mxEvent.addGestureListeners(moveHandle, mxUtils.bind(this, function(evt) + { + this.graph.graphHandler.start(this.state.cell, + mxEvent.getClientX(evt), mxEvent.getClientY(evt), + [rowState.cell]); + this.graph.graphHandler.cellWasClicked = true; + this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt); + this.graph.isMouseDown = true; + mxEvent.consume(evt); + })); + + this.moveHandles.push(moveHandle); + this.graph.container.appendChild(moveHandle); + + } + }))(this.graph.view.getState(model.getChildAt(this.state.cell, i))); + } } - + var update = mxUtils.bind(this, function() { if (this.specialHandle != null) { - this.specialHandle.node.style.display = (this.graph.isEnabled() && this.graph.getSelectionCount() < this.graph.graphHandler.maxCells) ? '' : 'none'; + this.specialHandle.node.style.display = (this.graph.isEnabled() && + this.graph.getSelectionCount() < this.graph.graphHandler.maxCells) ? + '' : 'none'; } this.redrawHandles(); @@ -10290,17 +10297,22 @@ if (typeof mxVertexHandler != 'undefined') var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles; mxVertexHandler.prototype.redrawHandles = function() - { - if (this.rowMoveHandle != null && this.rowState != null) + { + if (this.moveHandles != null) { - this.rowMoveHandle.style.left = (this.rowState.x + this.rowState.width) + 'px'; - this.rowMoveHandle.style.top = (this.rowState.y + this.rowState.height) + 'px'; + for (var i = 0; i < this.moveHandles.length; i++) + { + this.moveHandles[i].style.left = (this.moveHandles[i].rowState.x + + this.moveHandles[i].rowState.width + 10) + 'px'; + this.moveHandles[i].style.top = (this.moveHandles[i].rowState.y + + this.moveHandles[i].rowState.height * 3 / 4) + 'px'; + } } // Shows rotation handle only if one vertex is selected if (this.rotationShape != null && this.rotationShape.node != null) { - this.rotationShape.node.style.display = (this.rowMoveHandle == null && + this.rotationShape.node.style.display = (this.moveHandles == null && (this.graph.getSelectionCount() == 1 && (this.index == null || this.index == mxEvent.ROTATION_HANDLE))) ? '' : 'none'; } @@ -10338,11 +10350,14 @@ if (typeof mxVertexHandler != 'undefined') { vertexHandlerDestroy.apply(this, arguments); - if (this.rowMoveHandle != null) + if (this.moveHandles != null) { - this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle); - this.rowMoveHandle = null; - this.rowState = null; + for (var i = 0; i < this.moveHandles.length; i++) + { + this.moveHandles[i].parentNode.removeChild(this.moveHandles[i]); + } + + this.moveHandles = null; } if (this.linkHint != null) diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js index e17d6abfe..13bbb52d6 100644 --- a/src/main/webapp/js/viewer.min.js +++ b/src/main/webapp/js/viewer.min.js @@ -831,8 +831,8 @@ y)));this.limitX=Math.max(this.limitX,y);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankT q.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}}; mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)}; mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null; -mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots)for(var d=a.roots,c=[],e=0;e<d.length;e++)mxCellPath.create(d[e]),c[e]=a.vertexMapper.get(d[e]);a.visit(function(a,c,d,e,m){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);m=null!=a&&null!=d&&a.swimlaneIndex<c.swimlaneIndex&&d.source==c;e?(d.invert(),mxUtils.remove(d,a.connectsAsSource),c.connectsAsSource.push(d),a.connectsAsTarget.push(d),mxUtils.remove(d, -c.connectsAsTarget)):m&&(d.invert(),mxUtils.remove(d,a.connectsAsTarget),c.connectsAsTarget.push(d),a.connectsAsSource.push(d),mxUtils.remove(d,c.connectsAsSource));a=mxCellPath.create(c.cell);delete b[a]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout; +mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots)for(var d=a.roots,c=[],e=0;e<d.length;e++)c[e]=a.vertexMapper.get(d[e]);a.visit(function(a,c,d,e,m){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);m=null!=a&&null!=d&&a.swimlaneIndex<c.swimlaneIndex&&d.source==c;e?(d.invert(),mxUtils.remove(d,a.connectsAsSource),c.connectsAsSource.push(d),a.connectsAsTarget.push(d),mxUtils.remove(d,c.connectsAsTarget)): +m&&(d.invert(),mxUtils.remove(d,a.connectsAsTarget),c.connectsAsTarget.push(d),a.connectsAsSource.push(d),mxUtils.remove(d,c.connectsAsSource));a=mxCellPath.create(c.cell);delete b[a]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout; mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!1;mxHierarchicalLayout.prototype.maintainParentLocation=!1;mxHierarchicalLayout.prototype.moveParent=!1;mxHierarchicalLayout.prototype.parentBorder=0;mxHierarchicalLayout.prototype.intraCellSpacing=30;mxHierarchicalLayout.prototype.interRankCellSpacing=100;mxHierarchicalLayout.prototype.interHierarchySpacing=60; mxHierarchicalLayout.prototype.parallelEdgeSpacing=10;mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxHierarchicalLayout.prototype.fineTuning=!0;mxHierarchicalLayout.prototype.tightenToSource=!0;mxHierarchicalLayout.prototype.disableEdgeStyle=!0;mxHierarchicalLayout.prototype.traverseAncestors=!0;mxHierarchicalLayout.prototype.model=null;mxHierarchicalLayout.prototype.edgesCache=null;mxHierarchicalLayout.prototype.edgeSourceTermCache=null; mxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxHierarchicalLayout.prototype.getModel=function(){return this.model}; @@ -1503,11 +1503,11 @@ mxGraphHandler.prototype.start=function(a,b,c,d){this.cell=a;this.first=mxUtils. var e=this.graph.model.getParent(a),f=2>this.graph.model.getChildCount(e),g=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||g.get(c)||g.put(c,!0);this.guide.isStateIgnored=mxUtils.bind(this,function(a){var b=this.graph.model.getParent(a.cell);return null!=a.cell&&(!this.cloning&&this.isCellMoving(a.cell)||a.cell!=(this.target||e)&&!f&&!g.get(a)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&& b!=(this.target||e))})}};mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;for(var c=this.graph.model.getChildCount(a),e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)}; mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.graph.isConstrainedEvent(a.getEvent()):!0};mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a}; -mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a){return this.graph.model.getParent(this.cell)!=a}; +mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a,b){return this.graph.model.getParent(this.cell)!=a}; mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))}; mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(b.isConsumed()||!c.isMouseDown||null==this.cell||null==this.first||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||c.isMouseDown||(d=c.getCursorForMouseEvent(b),null==d&&c.isEnabled()&&c.isCellMovable(b.getCell())&&(d=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!= d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{var d=this.getDelta(b),e=c.tolerance;if(null!=this.shape||this.livePreviewActive||Math.abs(d.x)>e||Math.abs(d.y)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));var e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=c.isGridEnabledEvent(b.getEvent()),g=b.getCell(),k=!0,l=null;this.cloning=e;c.isDropEnabled()&& -this.highlightEnabled&&(l=c.getDropTarget(this.cells,b.getEvent(),g,e));var m=c.getView().getState(l),n=!1;null!=m&&(e||this.isValidDropTarget(l))?(this.target!=l&&(this.target=l,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),n=!0):(this.target=null,this.connectOnDrop&&null!=g&&1==this.cells.length&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&(m=c.getView().getState(g),null!=m&&(g=null==c.getEdgeValidationError(null,this.cell,g)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR, +this.highlightEnabled&&(l=c.getDropTarget(this.cells,b.getEvent(),g,e));var m=c.getView().getState(l),n=!1;null!=m&&(e||this.isValidDropTarget(l,b))?(this.target!=l&&(this.target=l,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),n=!0):(this.target=null,this.connectOnDrop&&null!=g&&1==this.cells.length&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&(m=c.getView().getState(g),null!=m&&(g=null==c.getEdgeValidationError(null,this.cell,g)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR, this.setHighlightColor(g),n=!0)));null!=m&&n?this.highlight.highlight(m):this.highlight.hide();null!=this.guide&&this.useGuidesForEvent(b)?(d=this.guide.move(this.bounds,d,f,e),k=!1):d=this.graph.snapDelta(d,this.bounds,!f,!1,!1);null!=this.guide&&k&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(d.x)>Math.abs(d.y)?d.y=0:d.x=0);this.checkPreview();if(this.currentDx!=d.x||this.currentDy!=d.y)this.currentDx=d.x,this.currentDy=d.y,this.updatePreview()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE, b);mxEvent.consume(b.getEvent())}};mxGraphHandler.prototype.updatePreview=function(a){this.livePreviewUsed&&!a?null!=this.cells&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1),this.updateLivePreview(this.currentDx,this.currentDy)):this.updatePreviewShape()}; mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&null!=this.pBounds&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx),Math.round(this.pBounds.y+this.currentDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())}; @@ -2010,11 +2010,9 @@ Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:th function(){return this.status};this.graphChangeListener=function(a,d){var c=null!=d?d.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+ -"/move.png"; -Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+ -"/help.png"; -Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+ -"/checkmark.gif";Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC"; +"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/help.png"; +Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=": +IMAGE_PATH+"/checkmark.gif";Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC"; Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC"; Editor.layersImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAaVBMVEUAAAAgICAICAgdHR0PDw8WFhYICAgLCwsXFxcvLy8ODg4uLi4iIiIqKiokJCQYGBgKCgonJycFBQUCAgIqKiocHBwcHBwODg4eHh4cHBwnJycJCQkUFBQqKiojIyMuLi4ZGRkgICAEBATOWYXAAAAAGnRSTlMAD7+fnz8/H7/ff18/77+vr5+fn39/b28fH2xSoKsAAACQSURBVBjTrYxJEsMgDARZZMAY73sgCcn/HxnhKtnk7j6oRq0psfuoyndZ/SuODkHPLzfVT6KeyPePnJ7KrnkRjWMXTn4SMnN8mXe2SSM3ts8L/ZUxxrbAULSYJJULE0Iw9pjpenoICcgcX61mGgTgtCv9Be99pzCoDhNQWQnchD1mup5++CYGcoQexajZbfwAj/0MD8ZOaUgAAAAASUVORK5CYII="; Editor.previousImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAh0lEQVQ4je3UsQnCUBCA4U8hpa1NsoEjpHQJS0dxADdwEMuMIJkgA1hYChbGQgMi+JC8q4L/AB/vDu7x74cWWEZhJU44RmA1zujR5GIbXF9YNrjD/Q0bDRY4fEBZ4P4LlgTnCbAf84pUM8/9hY08tMUtEoQ1LpEgrNBFglChFXR6Q6GfwwR6AGKJMF74Vtt3AAAAAElFTkSuQmCC";Editor.nextImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAAi0lEQVQ4jeXUIQ7CUAwA0MeGxWI2yylwnALJUdBcgYvM7QYLmjOQIAkIPmJZghiIvypoUtX0tfnJL38X5ZfaEgUeUcManFBHgS0SLlhHggk3bCPBhCf2keCQR8wjwYTDp6YiZxJmOU1jGw7vGALescuBxsArNlOwd/CM1VSM/ut1qCIw+uOwiMJ+OF4CQzBCXm3hyAAAAABJRU5ErkJggg=="; @@ -2048,12 +2046,12 @@ Editor.prototype.setFilename=function(a){this.filename=a}; Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],c=0;c< e.length;c++)null!=a.view.getState(e[c])&&k.push(e[c]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()}; OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,e,d,k,l,q,c,f,g,p){var m=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(m=80);e+=m;d+=m;var n=e,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var u=t.height,F=Math.max(1,Math.round((t.width-e-64)/2)),B=Math.max(1,Math.round((u-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,u-64);0<a.dialogs.length&&(this.zIndex+= -2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";F+=t.x;B+=t.y;k&&document.body.appendChild(this.bg);var C=a.createDiv(f?"geTransDialog": -"geDialog");k=this.getPosition(F,B,e,d);F=k.x;B=k.y;C.style.width=e+"px";C.style.height=d+"px";C.style.left=F+"px";C.style.top=B+"px";C.style.zIndex=this.zIndex;C.appendChild(b);document.body.appendChild(C);!c&&b.clientHeight>C.clientHeight-64&&(b.style.overflowY="auto");if(l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=B+14+"px",l.style.left=F+e+38-m+"px",l.style.zIndex= -this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!p)){var A=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){A=!0}),null,mxUtils.bind(this,function(c){A&&(a.hideDialog(!0),A=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var f=g();null!=f&&(n=e=f.w,v=d=f.h)}f=mxUtils.getDocumentSize();u=f.height;this.bg.style.height=u+"px";F=Math.max(1,Math.round((f.width-e-64)/2));B=Math.max(1, -Math.round((u-d-a.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;d=Math.min(v,u-64);f=this.getPosition(F,B,e,d);F=f.x;B=f.y;C.style.left=F+"px";C.style.top=B+"px";C.style.width=e+"px";C.style.height=d+"px";!c&&b.clientHeight>C.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=B+14+"px",this.dialogImg.style.left=F+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container= -C;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +function Dialog(a,b,e,d,k,m,q,c,f,g,p){var l=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(l=80);e+=l;d+=l;var n=e,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var u=t.height,A=Math.max(1,Math.round((t.width-e-64)/2)),B=Math.max(1,Math.round((u-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,u-64);0<a.dialogs.length&&(this.zIndex+= +2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";A+=t.x;B+=t.y;k&&document.body.appendChild(this.bg);var D=a.createDiv(f?"geTransDialog": +"geDialog");k=this.getPosition(A,B,e,d);A=k.x;B=k.y;D.style.width=e+"px";D.style.height=d+"px";D.style.left=A+"px";D.style.top=B+"px";D.style.zIndex=this.zIndex;D.appendChild(b);document.body.appendChild(D);!c&&b.clientHeight>D.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=B+14+"px",m.style.left=A+e+38-l+"px",m.style.zIndex= +this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(c){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var f=g();null!=f&&(n=e=f.w,v=d=f.h)}f=mxUtils.getDocumentSize();u=f.height;this.bg.style.height=u+"px";A=Math.max(1,Math.round((f.width-e-64)/2));B=Math.max(1, +Math.round((u-d-a.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;d=Math.min(v,u-64);f=this.getPosition(A,B,e,d);A=f.x;B=f.y;D.style.left=A+"px";D.style.top=B+"px";D.style.width=e+"px";D.style.height=d+"px";!c&&b.clientHeight>D.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=B+14+"px",this.dialogImg.style.left=A+e+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container= +D;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2062,47 +2060,47 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA "/locked.png"; Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,e,d,k,l,q,c,f,g,p){f=null!=f?f:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,b);n.setAttribute("title",b);m.appendChild(n)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;m.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",e.appendChild(g));var v=mxUtils.button(d,function(){f&&a.hideDialog();null!=k&&k()}); -v.className="geBtn";e.appendChild(v);null!=q&&(d=mxUtils.button(q,function(){f&&a.hideDialog();null!=c&&c()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){v.focus()};m.appendChild(e);this.container=m},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var f=c.checked||g.checked,d=parseInt(m.value)/100;isNaN(d)&&(d=1,m.value="100%");var d=.75*d,b=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(f){var v=c.checked?1:parseInt(p.value);isNaN(v)||(n=mxUtils.getScaleForPageCount(v,e,b))}e.getGraphBounds();var l=v=0,b=mxRectangle.fromRectangle(b);b.width=Math.ceil(b.width*d);b.height=Math.ceil(b.height*d);n*=d;!f&&e.pageVisible?(d=e.getPageLayout(),v-=d.x*b.width,l-=d.y*b.height): -f=!0;f=PrintDialog.createPrintPreview(e,n,b,0,v,l,f);f.open();a&&PrintDialog.printPreview(f)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(c);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage")); +var ErrorDialog=function(a,b,e,d,k,m,q,c,f,g,p){f=null!=f?f:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,b);n.setAttribute("title",b);l.appendChild(n)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;l.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",e.appendChild(g));var v=mxUtils.button(d,function(){f&&a.hideDialog();null!=k&&k()}); +v.className="geBtn";e.appendChild(v);null!=q&&(d=mxUtils.button(q,function(){f&&a.hideDialog();null!=c&&c()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){v.focus()};l.appendChild(e);this.container=l},PrintDialog=function(a,b){this.create(a,b)}; +PrintDialog.prototype.create=function(a){function b(a){var f=c.checked||g.checked,d=parseInt(l.value)/100;isNaN(d)&&(d=1,l.value="100%");var d=.75*d,b=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(f){var v=c.checked?1:parseInt(p.value);isNaN(v)||(n=mxUtils.getScaleForPageCount(v,e,b))}e.getGraphBounds();var m=v=0,b=mxRectangle.fromRectangle(b);b.width=Math.ceil(b.width*d);b.height=Math.ceil(b.height*d);n*=d;!f&&e.pageVisible?(d=e.getPageLayout(),v-=d.x*b.width,m-=d.y*b.height): +f=!0;f=PrintDialog.createPrintPreview(e,n,b,0,v,m,f);f.open();a&&PrintDialog.printPreview(f)}var e=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(c);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage")); k.appendChild(f);mxEvent.addListener(f,"click",function(a){c.checked=!c.checked;g.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){g.checked=!c.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");k.appendChild(f);mxEvent.addListener(f, "click",function(a){g.checked=!g.checked;c.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(p);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(g,"change", -function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");c.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";k.appendChild(m);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");c.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";k.appendChild(l);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2; k.style.paddingTop="20px";k.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&k.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst|| -k.appendChild(f);d.appendChild(k);q.appendChild(d);l.appendChild(q);this.container=l};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; -PrintDialog.createPrintPreview=function(a,b,e,d,k,l,q){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; +k.appendChild(f);d.appendChild(k);q.appendChild(d);m.appendChild(q);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; +PrintDialog.createPrintPreview=function(a,b,e,d,k,m,q){b=new mxPrintPreview(a,b,e,d,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function e(){null==v?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",v.src),n.style.fontSize="11px",n.innerHTML=v.src.substring(0,42)+"...")}var d=a.editor.graph,k,l,q=document.createElement("table");q.style.width= -"100%";q.style.height="100%";var c=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td"); -mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;b();mxEvent.addListener(g,"click",function(c){a.pickColor(p||"none",function(a){p=a;b()});mxEvent.consume(c)}); -l.appendChild(g);mxUtils.write(l,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=d.getGridSize();l.appendChild(m);mxEvent.addListener(m,"change",function(){var a=parseInt(m.value);m.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+ -":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){v=a;e()});mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var t= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&l.appendChild(t);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==m.value&&d.setGridSize(parseInt(m.value));var c=new ChangePageSetup(a,p,v,f.get());c.ignoreColor=d.background==p;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&& -c.ignoreColor&&c.ignoreImage||d.model.execute(c)});u.className="geBtn gePrimaryBtn";l.appendChild(u);a.editor.cancelFirst||l.appendChild(t);k.appendChild(l);c.appendChild(k);q.appendChild(c);this.container=q}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,d,b){if(b||m!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<t.length;d++)b=t[d],C?"custom"==b.key&&(c.value=b.key,C=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&& -e.height==b.format.height?(c.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(c.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(f.style.display="",p.style.display="none"):(m.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"), -c.value="custom",f.style.display="none",p.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px"; -f.style.height="24px";l.style.marginRight="6px";f.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));f.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";f.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var m=document.createElement("input"); -m.setAttribute("size","7");m.style.textAlign="right";p.appendChild(m);mxUtils.write(p," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in");f.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),u=0;u<t.length;u++){var F=t[u];v[F.key]=F;var B=document.createElement("option");B.setAttribute("value",F.key);mxUtils.write(B,F.title);c.appendChild(B)}var C=!1;k();a.appendChild(c);mxUtils.br(a); -a.appendChild(f);a.appendChild(p);var A=e,x=function(a,b){var g=v[c.value];null!=g.format?(m.value=g.format.width/100,n.value=g.format.height/100,p.style.display="none",f.style.display=""):(f.style.display="none",p.style.display="");g=parseFloat(m.value);if(isNaN(g)||0>=g)m.value=e.width/100;g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),Math.floor(100*parseFloat(n.value)));"custom"!=c.value&&q.checked&&(g=new mxRectangle(0,0, -g.height,g.width));b&&C||g.width==A.width&&g.height==A.height||(A=g,null!=d&&d(A))};mxEvent.addListener(b,"click",function(a){l.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(m,"blur",x);mxEvent.addListener(m,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(q,"change",x);mxEvent.addListener(l,"change",x);mxEvent.addListener(c,"change",function(a){C="custom"==c.value; -x(a,!0)});x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return A},widthInput:m,heightInput:n}}; +var PageSetupDialog=function(a){function b(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function e(){null==v?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",v.src),n.style.fontSize="11px",n.innerHTML=v.src.substring(0,42)+"...")}var d=a.editor.graph,k,m,q=document.createElement("table");q.style.width= +"100%";q.style.height="100%";var c=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);c.appendChild(k);k=document.createElement("tr");m=document.createElement("td"); +mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;b();mxEvent.addListener(g,"click",function(c){a.pickColor(p||"none",function(a){p=a;b()});mxEvent.consume(c)}); +m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=d.getGridSize();m.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);c.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ +":");k.appendChild(m);m=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){v=a;e()});mxEvent.consume(c)});e();m.appendChild(n);k.appendChild(m);c.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var t= +mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==l.value&&d.setGridSize(parseInt(l.value));var c=new ChangePageSetup(a,p,v,f.get());c.ignoreColor=d.background==p;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==c.previousFormat.height&& +c.ignoreColor&&c.ignoreImage||d.model.execute(c)});u.className="geBtn gePrimaryBtn";m.appendChild(u);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);c.appendChild(k);q.appendChild(c);this.container=q}; +PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,d,b){if(b||l!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<t.length;d++)b=t[d],D?"custom"==b.key&&(c.value=b.key,D=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&& +e.height==b.format.height?(c.value=b.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(c.value=b.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(f.style.display="",p.style.display="none"):(l.value=e.width/100,n.value=e.height/100,m.setAttribute("checked","checked"), +c.value="custom",f.style.display="none",p.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px"; +f.style.height="24px";m.style.marginRight="6px";f.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));f.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";f.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var l=document.createElement("input"); +l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in");f.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),u=0;u<t.length;u++){var A=t[u];v[A.key]=A;var B=document.createElement("option");B.setAttribute("value",A.key);mxUtils.write(B,A.title);c.appendChild(B)}var D=!1;k();a.appendChild(c);mxUtils.br(a); +a.appendChild(f);a.appendChild(p);var C=e,x=function(a,b){var g=v[c.value];null!=g.format?(l.value=g.format.width/100,n.value=g.format.height/100,p.style.display="none",f.style.display=""):(f.style.display="none",p.style.display="");g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=e.width/100;g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(n.value)));"custom"!=c.value&&q.checked&&(g=new mxRectangle(0,0, +g.height,g.width));b&&D||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(b,"click",function(a){m.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",x);mxEvent.addListener(l,"click",x);mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(q,"change",x);mxEvent.addListener(m,"change",x);mxEvent.addListener(c,"change",function(a){D="custom"==c.value; +x(a,!0)});x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return C},widthInput:l,heightInput:n}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,e,d,k,l,q,c,f,g,p,m){f=null!=f?f:!0;var n,v,t=document.createElement("table"),u=document.createElement("tbody");t.style.marginTop="8px";n=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");n.appendChild(v);var F=document.createElement("input");F.setAttribute("value",b||"");F.style.marginLeft="4px";F.style.width=null!=m?m+ -"px":"180px";var B=mxUtils.button(e,function(){if(null==l||l(F.value))f&&a.hideDialog(),d(F.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?F.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()}); -mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=F,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),B.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td"); -v.style.whiteSpace="nowrap";v.appendChild(F);n.appendChild(v);if(null!=k||null==q)u.appendChild(n),null!=p&&(null!=a.editor.diagramFileTypes&&(n=FilenameDialog.createFileTypes(a,F,a.editor.diagramFileTypes),n.style.marginLeft="6px",n.style.width="74px",v.appendChild(n),F.style.width=null!=m?m-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,F,p)));null!=q&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),n.appendChild(v),u.appendChild(n));n= -document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=c&&(m=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),m.className="geBtn",v.appendChild(m));mxEvent.addListener(F,"keypress",function(a){13==a.keyCode&&B.click()}); +var FilenameDialog=function(a,b,e,d,k,m,q,c,f,g,p,l){f=null!=f?f:!0;var n,v,t=document.createElement("table"),u=document.createElement("tbody");t.style.marginTop="8px";n=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");n.appendChild(v);var A=document.createElement("input");A.setAttribute("value",b||"");A.style.marginLeft="4px";A.style.width=null!=l?l+ +"px":"180px";var B=mxUtils.button(e,function(){if(null==m||m(A.value))f&&a.hideDialog(),d(A.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()}); +mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=A,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),B.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td"); +v.style.whiteSpace="nowrap";v.appendChild(A);n.appendChild(v);if(null!=k||null==q)u.appendChild(n),null!=p&&(null!=a.editor.diagramFileTypes&&(n=FilenameDialog.createFileTypes(a,A,a.editor.diagramFileTypes),n.style.marginLeft="6px",n.style.width="74px",v.appendChild(n),A.style.width=null!=l?l-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,A,p)));null!=q&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),n.appendChild(v),u.appendChild(n));n= +document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=c&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),l.className="geBtn",v.appendChild(l));mxEvent.addListener(A,"keypress",function(a){13==a.keyCode&&B.click()}); v.appendChild(B);a.editor.cancelFirst||v.appendChild(p);n.appendChild(v);u.appendChild(n);t.appendChild(u);this.container=t};FilenameDialog.filenameHelpLink=null; FilenameDialog.createTypeHint=function(a,b,e){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){d.setAttribute("src", mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",k);mxEvent.addListener(b,"change",k);mxEvent.addListener(d,"click",function(b){var e=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90); mxEvent.consume(b)});k();return d}; -FilenameDialog.createFileTypes=function(a,b,e){var d=document.createElement("select");for(a=0;a<e.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(e[a].description)+" (."+e[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=e[d.value].extension;var l=b.value.lastIndexOf(".");0<l?(a=e[d.value].extension,b.value=b.value.substring(0,l+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"), -a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var l=b.value.lastIndexOf(".");a=0;if(0<l)for(var l=b.value.toLowerCase().substring(l+1),c=0;c<e.length;c++)if(l==e[c].extension){a=c;break}d.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d}; +FilenameDialog.createFileTypes=function(a,b,e){var d=document.createElement("select");for(a=0;a<e.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(e[a].description)+" (."+e[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=e[d.value].extension;var m=b.value.lastIndexOf(".");0<m?(a=e[d.value].extension,b.value=b.value.substring(0,m+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"), +a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var m=b.value.lastIndexOf(".");a=0;if(0<m)for(var m=b.value.toLowerCase().substring(m+1),c=0;c<e.length;c++)if(m==e[c].extension){a=c;break}d.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d}; (function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var f=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(this.backgroundPageShape=this.createBackgroundPageShape(f),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}), mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=f,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= @@ -2111,41 +2109,41 @@ b="url("+this.gridImage+")";var n=d=0;null!=a.view.backgroundPageShape&&(n=this. f,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=e,d.style.backgroundColor=f,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],e=1;e<this.gridSteps;e++){var n=e*c;b.push("M 0 "+n+" L "+d+" "+n+" M "+n+" 0 L "+n+" "+d)}return'<svg width="'+ d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,f){a.apply(this,arguments);if(null!=this.shiftPreview1){var d= this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var b=this.gridSize*this.view.scale*this.view.gridSteps,b=-Math.round(b-mxUtils.mod(this.view.translate.x*this.view.scale+c,b))+"px "+-Math.round(b-mxUtils.mod(this.view.translate.y*this.view.scale+f,b))+"px";d.style.backgroundPosition=b}};mxGraph.prototype.updatePageBreaks=function(a,f,d){var c=this.view.scale,b=this.view.translate,g=this.pageFormat,e=c*this.pageScale,t=this.view.getBackgroundPageBounds();f=t.width;d=t.height;var u= -new mxRectangle(c*b.x,c*b.y,g.width*e,g.height*e),l=(a=a&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(d/u.height)-1:0,k=a?Math.ceil(f/u.width)-1:0,q=t.x+f,A=t.y+d;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?l:k,f=0;f<=c;f++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(t.x),Math.round(t.y+(f+1)*u.height)), -new mxPoint(Math.round(q),Math.round(t.y+(f+1)*u.height))]:[new mxPoint(Math.round(t.x+(f+1)*u.width),Math.round(t.y)),new mxPoint(Math.round(t.x+(f+1)*u.width),Math.round(A))];null!=a[f]?(a[f].points=d,a[f].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[f]=d)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; +new mxRectangle(c*b.x,c*b.y,g.width*e,g.height*e),m=(a=a&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(d/u.height)-1:0,k=a?Math.ceil(f/u.width)-1:0,q=t.x+f,C=t.y+d;null==this.horizontalPageBreaks&&0<m&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?m:k,f=0;f<=c;f++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(t.x),Math.round(t.y+(f+1)*u.height)), +new mxPoint(Math.round(q),Math.round(t.y+(f+1)*u.height))]:[new mxPoint(Math.round(t.x+(f+1)*u.width),Math.round(t.y)),new mxPoint(Math.round(t.x+(f+1)*u.width),Math.round(C))];null!=a[f]?(a[f].points=d,a[f].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[f]=d)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,f,d){for(var c=0;c<f.length;c++)if(this.graph.getModel().isVertex(f[c])){var g=this.graph.getCellGeometry(f[c]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){return this.isConnecting()? !0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),f=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,e=this.graph.pageScale,n=b.width*e,b=b.height*e,e=Math.floor(Math.min(0,f)/n),v=Math.floor(Math.min(0, d)/b);return new mxRectangle(this.scale*(this.translate.x+e*n),this.scale*(this.translate.y+v*b),this.scale*(Math.ceil(Math.max(1,f+a.width/this.scale)/n)-e)*n,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-v)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,f){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= -a+"px",this.view.backgroundPageShape.node.style.marginTop=f+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,f,d,b,e,n){var c=k.apply(this,arguments);null==n||n||mxEvent.addListener(c,"mousedown",function(a){mxEvent.consume(a)});return c};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=l.apply(this,arguments),d=this.graph.getModel(),b=d.getParent(this.graph.getSelectionCell()),e=d.getParent(c); -if(null==b||b!=c&&b!=e)for(;!(this.graph.isCellSelected(c)||this.graph.isCellSelected(e)||this.graph.isContainer(e)&&!this.graph.isPart(c))&&d.isVertex(e);)c=e,e=this.graph.getModel().getParent(c);return c};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,f){var c=q.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),b=d.getParent(a);null!=b;){if(this.graph.isCellSelected(b)&&d.isVertex(b)){c=!0;break}b=d.getParent(b)}return c};mxGraphHandler.prototype.selectDelayed= -function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var d=this.graph.view.getState(c);if(!(null!=d&&a.isSource(d.control)||this.graph.isToggleEvent(a.getEvent())))for(var d=this.graph.getModel(),b=d.getParent(c);!this.graph.isCellSelected(b)&&d.isVertex(b);)c=b,b=d.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),d=c.getParent(a);c.isVertex(d)&& -!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&(a=d),d=c.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); +a+"px",this.view.backgroundPageShape.node.style.marginTop=f+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,f,d,b,e,n){var c=k.apply(this,arguments);null==n||n||mxEvent.addListener(c,"mousedown",function(a){mxEvent.consume(a)});return c};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=m.apply(this,arguments),d=this.graph.getModel(),b=d.getParent(this.graph.getSelectionCell()),e=d.getParent(c); +if(null==b||b!=c&&b!=e)for(;!(this.graph.isCellSelected(c)||this.graph.isCellSelected(e)||this.graph.isContainer(e)&&!this.graph.isPart(c))&&d.isVertex(e);)c=e,e=this.graph.getModel().getParent(c);return c};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,f){if(this.graph.cellEditor.getEditingCell()==a)return!1;var c=q.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),b=d.getParent(a);null!=b;){if(this.graph.isCellSelected(b)&&d.isVertex(b)){c= +!0;break}b=d.getParent(b)}return c};mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var d=this.graph.view.getState(c);if(!(null!=d&&a.isSource(d.control)||this.graph.isToggleEvent(a.getEvent())))for(var d=this.graph.getModel(),b=d.getParent(c);!this.graph.isCellSelected(b)&&d.isVertex(b);)c=b,b=d.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent= +function(a){a=a.getCell();for(var c=this.graph.getModel(),d=c.getParent(a);c.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&(a=d),d=c.getParent(d);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src); this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart= k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable? (b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position= -"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var l=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent= -function(a,c){return l||q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(l=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup", -this.keyupHandler);var c=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return c.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var f=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return f.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&& -mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var g=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return l||g.apply(this,arguments)};var p=!1,m=null,n=null,v=null,t=mxUtils.bind(this,function(){if(null!=this.toolbar&&p!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu; -f=this.toolbar.sizeMenu;if(null==v)this.toolbar.createTextToolbar();else{for(var b=0;b<v.length;b++)this.toolbar.container.appendChild(v[b]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}p=d.cellEditor.isContentEditing();m=a;n=f;v=c}}),u=this,F=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){F.apply(this,arguments);t();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c= -c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));u.toolbar.setFontName(f);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var B= -d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{B.apply(this,arguments),t()}catch(K){u.handleError(K)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod= -mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var A="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f= -a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),m=null!=e?e.split(";"):[],e=0;e<m.length;e++){var p=m[e],n=p.indexOf("=");if(0<=n){g=p.substring(0,n);var u=p.substring(n+1);null!=b[g]&&"none"==u&&(a.push(u),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",a,"cells",[c.cell]))}}catch(da){this.handleError(da)}}; -this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"], -["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(b=0;b<D[a].length;b++)A.push(D[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(A,x[a])&&A.push(x[a]);var J=function(a,c){var f=d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),p=null!=m?m.split(";"):[];e=A.slice();for(var n=0;n<p.length;n++){var u=p[n],t=u.indexOf("=");if(0<=t){var y=u.substring(0,t),v=mxUtils.indexOf(e, -y);0<=v&&e.splice(v,1);for(var l=0;l<D.length;l++){var k=D[l];if(0<=mxUtils.indexOf(k,y))for(var B=0;B<k.length;B++){var q=mxUtils.indexOf(e,k[B]);0<=q&&e.splice(q,1)}}}}}for(var F=f.isEdge(g),C=F?d.currentEdgeStyle:d.currentVertexStyle,E=f.getStyle(g),n=0;n<e.length;n++){var y=e[n],G=C[y];null==G||"shape"==y&&!F||F&&!(0>mxUtils.indexOf(x,y))||(E=mxUtils.setStyle(E,y,G))}f.setStyle(g,E)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){J(c.getProperty("cells"))});d.addListener("textInserted", -function(a,c){J(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));J(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=c.getProperty("keys"),m=c.getProperty("values"), -e=0;e<f.length;e++){var p=0<=mxUtils.indexOf(E,f[e]);if("strokeColor"!=f[e]||null!=m[e]&&"none"!=m[e])if(0<=mxUtils.indexOf(x,f[e]))g||0<=mxUtils.indexOf(G,f[e])?null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]:b&&0<=mxUtils.indexOf(A,f[e])&&(null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e]);else if(0<=mxUtils.indexOf(A,f[e])){if(b||p)null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e];if(g||p||0<=mxUtils.indexOf(G,f[e]))null== -m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle|| -"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"), -null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW], -mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),f=d.getView().getState(d.getSelectionCell()); -null!=f&&(a=f.style[mxConstants.STYLE_FONTFAMILY]||a,c=f.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var f=c.getProperty("cells"),b=c.getProperty("parent");d.getModel().isLayer(b)&&!d.isCellVisible(b)&&null!=f&&0<f.length&&d.getModel().setVisible(b,!0)});this.gestureHandler= -mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange", -this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()})); -d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28; -EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; +"absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=A.hoverIcons&&A.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title", +mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=!1,c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return q||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document, +"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return f.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))}; +var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var l=!1,n=null,v=null,t=null,u=mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild, +c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var b=0;b<t.length;b++)this.toolbar.container.appendChild(t[b]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=v}l=d.cellEditor.isContentEditing();n=a;v=f;t=c}}),A=this,B=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){B.apply(this,arguments);u();if(d.cellEditor.isContentEditing()){var a= +!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=A.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));A.toolbar.setFontName(f);A.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea, +"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var D=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{D.apply(this,arguments),u()}catch(z){A.handleError(z)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(y){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&& +this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var x="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),F="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" "); +this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var p=l[e],n=p.indexOf("=");if(0<=n){g=p.substring(0,n);var u=p.substring(n+1);null!=b[g]&&"none"==u&&(a.push(u),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged", +"keys",f,"values",a,"cells",[c.cell]))}}catch(fa){this.handleError(fa)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],E="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),J=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "), +["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<J.length;a++)for(b=0;b<J[a].length;b++)x.push(J[a][b]);for(a=0;a<F.length;a++)0>mxUtils.indexOf(x,F[a])&&x.push(F[a]);var H=function(a,c){var f=d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var l=f.getStyle(g),p=null!=l?l.split(";"):[];e=x.slice();for(var n=0;n<p.length;n++){var u=p[n],t=u.indexOf("=");if(0<=t){var y= +u.substring(0,t),K=mxUtils.indexOf(e,y);0<=K&&e.splice(K,1);for(var v=0;v<J.length;v++){var m=J[v];if(0<=mxUtils.indexOf(m,y))for(var k=0;k<m.length;k++){var B=mxUtils.indexOf(e,m[k]);0<=B&&e.splice(B,1)}}}}}for(var A=f.isEdge(g),q=A?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),n=0;n<e.length;n++){var y=e[n],C=q[y];null==C||"shape"==y&&!A||A&&!(0>mxUtils.indexOf(F,y))||(D=mxUtils.setStyle(D,y,C))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){H(c.getProperty("cells"))}); +d.addListener("textInserted",function(a,c){H(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));H(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=c.getProperty("keys"), +l=c.getProperty("values"),e=0;e<f.length;e++){var p=0<=mxUtils.indexOf(G,f[e]);if("strokeColor"!=f[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(F,f[e]))g||0<=mxUtils.indexOf(E,f[e])?null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]:b&&0<=mxUtils.indexOf(x,f[e])&&(null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=l[e]);else if(0<=mxUtils.indexOf(x,f[e])){if(b||p)null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=l[e];if(g||p|| +0<=mxUtils.indexOf(E,f[e]))null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved": +"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"): +"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape, +d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize|| +"12"),f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_FONTFAMILY]||a,c=f.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var f=c.getProperty("cells"),b=c.getProperty("parent");d.getModel().isLayer(b)&&!d.isCellVisible(b)&&null!=f&&0<f.length&& +d.getModel().setVisible(b,!0)});this.gestureHandler=mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()}); +mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this, +function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38; +EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)})); mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct; this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9!=a.which||!b.isEnabled()||mxEvent.isAltDown(a)||b.isEditing()&&mxEvent.isShiftDown(a)||(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))}; @@ -2156,40 +2154,40 @@ EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?n e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"== e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null}; EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())}; -EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var b=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var b=b||d.getSelectionCells(),b=d.getExportableCells(d.model.getTopmostCells(b)),c={},f=d.createCellLookup(b),g=d.cloneCells(b,null,c),e=new mxGraphModel,m=e.getChildAt(e.getRoot(), -0),n=0;n<g.length;n++)e.add(m,g[n]);d.updateCustomLinks(d.createCellMapping(c,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return b};var e=mxClipboard.paste;mxClipboard.paste=function(d){var b=null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):b=e.apply(this,arguments);a.updatePasteActionStates();return b};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()}; +EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var b=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var b=b||d.getSelectionCells(),b=d.getExportableCells(d.model.getTopmostCells(b)),c={},f=d.createCellLookup(b),g=d.cloneCells(b,null,c),e=new mxGraphModel,l=e.getChildAt(e.getRoot(), +0),n=0;n<g.length;n++)e.add(l,g[n]);d.updateCustomLinks(d.createCellMapping(c,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return b};var e=mxClipboard.paste;mxClipboard.paste=function(d){var b=null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):b=e.apply(this,arguments);a.updatePasteActionStates();return b};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()}; var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,b){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width, -this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),m=a.view.translate,p=a.view.scale,n=mxRectangle.fromRectangle(g); -n.x=n.x/p-m.x;n.y=n.y/p-m.y;n.width/=p;n.height/=p;var m=a.container.scrollTop,u=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(f||1,y/n.width)):p;f=(y-c*n.width)/2/c;var z=0==this.lightboxVerticalDivider?0:(t-c*n.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),z=Math.max(z,0));if(e||g.width<y||g.height<t)a.view.scaleAndTranslate(c, -Math.floor(f-n.x),Math.floor(z-n.y)),a.container.scrollTop=m*c/p,a.container.scrollLeft=u*c/p;else if(0!=d||0!=b)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/p),Math.floor(g.y+b/p))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", +this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,p=a.view.scale,n=mxRectangle.fromRectangle(g); +n.x=n.x/p-l.x;n.y=n.y/p-l.y;n.width/=p;n.height/=p;var l=a.container.scrollTop,u=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var y=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(f||1,y/n.width)):p;f=(y-c*n.width)/2/c;var z=0==this.lightboxVerticalDivider?0:(t-c*n.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),z=Math.max(z,0));if(e||g.width<y||g.height<t)a.view.scaleAndTranslate(c, +Math.floor(f-n.x),Math.floor(z-n.y)),a.container.scrollTop=l*c/p,a.container.scrollLeft=u*c/p;else if(0!=d||0!=b)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/p),Math.floor(g.y+b/p))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView", mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden"; -this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var l=mxUtils.bind(this,function(){var c= -mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",l);l();var q=0,l=mxUtils.bind(this,function(a,c,f){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=f&&d.setAttribute("title", -f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&l(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var c=l(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),f=document.createElement("div"); -f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontFamily="Helvetica,Arial";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var g=l(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages, -this.currentPage)+1+" / "+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",f.style.display="inline-block"):(g.style.display="none",c.style.display="none",f.style.display="none");p()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",p);l(mxUtils.bind(this, -function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");l(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");l(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage, +this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var c= +mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var q=0,m=mxUtils.bind(this,function(a,c,f){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=f&&d.setAttribute("title", +f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var c=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),f=document.createElement("div"); +f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontFamily="Helvetica,Arial";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages, +this.currentPage)+1+" / "+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",f.style.display="inline-block"):(g.style.display="none",c.style.display="none",f.style.display="none");p()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",p);m(mxUtils.bind(this, +function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage, mxResources.get("fit"));var n=null,v=null,t=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=v&&(window.clearTimeout(v), -fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=l(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog= -null}));var f=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ -this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),B=a.getModel();B.addListener(mxEvent.CHANGE,function(){F.style.display=1<B.getChildCount(B.root)?"":"none"})}this.addChromelessToolbarItems(l);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||l(mxUtils.bind(this,function(c){null!= -this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var C=this.lightboxToolbarActions[m];l(C.fn,C.icon,C.tooltip)}null!=k.refreshBtn&&l(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url: -window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&l(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&l(mxUtils.bind(this, +fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var A=m(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog= +null}));var f=A.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ +this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),B=a.getModel();B.addListener(mxEvent.CHANGE,function(){A.style.display=1<B.getChildCount(B.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(c){null!= +this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(l=0;l<this.lightboxToolbarActions.length;l++){var D=this.lightboxToolbarActions[l];m(D.fn,D.icon,D.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url: +window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this, function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)|| u(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)|| -u(30)}));var A=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<A&&Math.abs(this.scrollTop-a.container.scrollTop)<A&&Math.abs(this.startX-f.getGraphX())<A&&Math.abs(this.startY-f.getGraphY())< -A&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():u(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange= -function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0= -c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),D=a.view.getDrawPane();a.cumulativeZoomFactor=1;var J=null,I=null,y=null,K=null,z=function(c){null!=J&&window.clearTimeout(J);window.setTimeout(function(){a.isMouseDown||(J=window.setTimeout(mxUtils.bind(this, -function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),D.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(D.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){D.style.transform="";G.style.transform=""},0)):(D.style.transform= -"",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,m=0;null!=I&&(g=a.container.offsetWidth/2-I.x+f.x,m=a.container.offsetHeight/2-I.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=y&&(g+=c.x-y.x,m+=c.y-y.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),m*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)|| -0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=K&&D.setAttribute("filter",K);a.cumulativeZoomFactor=1;K=I=y=J=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(I=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= +u(30)}));var C=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<C&&Math.abs(this.scrollTop-a.container.scrollTop)<C&&Math.abs(this.startX-f.getGraphX())<C&&Math.abs(this.startY-f.getGraphY())< +C&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():u(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,arguments)};if(!a.isViewer()){var F=a.sizeDidChange;a.sizeDidChange= +function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?F.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0= +c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),E=a.view.getDrawPane();a.cumulativeZoomFactor=1;var J=null,H=null,y=null,K=null,z=function(c){null!=J&&window.clearTimeout(J);window.setTimeout(function(){a.isMouseDown||(J=window.setTimeout(mxUtils.bind(this, +function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),E.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(E.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){E.style.transform="";G.style.transform=""},0)):(E.style.transform= +"",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,l=0;null!=H&&(g=a.container.offsetWidth/2-H.x+f.x,l=a.container.offsetHeight/2-H.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=y&&(g+=c.x-y.x,l+=c.y-y.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)|| +0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=K&&E.setAttribute("filter",K);a.cumulativeZoomFactor=1;K=H=y=J=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(H=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= (this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale* -this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=D.getAttribute("filter")&&(K=D.getAttribute("filter"),D.removeAttribute("filter"));y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:I.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:I.y+a.container.scrollTop-a.container.offsetTop;D.style.transformOrigin=c+"px "+b+"px";D.style.transform="scale("+ -this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":I.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":I.y+ +this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=E.getAttribute("filter")&&(K=E.getAttribute("filter"),E.removeAttribute("filter"));y=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:H.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:H.y+a.container.scrollTop-a.container.offsetTop;E.style.transformOrigin=c+"px "+b+"px";E.style.transform="scale("+ +this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":H.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":H.y+ a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}z(d)};mxEvent.addGestureListeners(a.container,function(a){null!=J&&window.clearTimeout(J)},null,function(c){1!=a.cumulativeZoomFactor&&z(0)});mxEvent.addListener(a.container,"scroll",function(){J&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&& -z(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),I=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f), +z(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),H=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f), mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))}; @@ -2211,19 +2209,19 @@ this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.e (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))}; EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))}; EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; -EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing; -this.editor.graph.cellEditor.stopEditing=function(a,c){l.apply(this,arguments);d()};d()}; -EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var q=k[l];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l= -0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1== +EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var m=this.editor.graph.cellEditor.stopEditing; +this.editor.graph.cellEditor.stopEditing=function(a,c){m.apply(this,arguments);d()};d()}; +EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=a.getSelectionCells();if(null!=k)for(var m=0;m<k.length;m++){var q=k[m];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(e=!0);if(d&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m= +0;m<k.length;m++)this.actions.get(k[m]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1== a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot); this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b); this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&& e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset}; EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& -(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),q=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",q+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",q+=this.toolbarHeight);0<q&&!mxClient.IS_QUIRKS&&(q+=1);var c=0;if(null!=this.sidebarFooterContainer){var f= -this.footerHeight+k,c=Math.max(0,Math.min(d-q-f,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=c+"px";this.sidebarFooterContainer.style.bottom=f+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(), -p=null!=this.hsplit.parentNode?l+this.splitSize:0;this.diagramContainer.style.left=p+g.x+"px";this.diagramContainer.style.top=q+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=p+"px");b?(this.menubarContainer.style.width=e+"px", -this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-c+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-f)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width= +(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),q=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",q+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",q+=this.toolbarHeight);0<q&&!mxClient.IS_QUIRKS&&(q+=1);var c=0;if(null!=this.sidebarFooterContainer){var f= +this.footerHeight+k,c=Math.max(0,Math.min(d-q-f,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=c+"px";this.sidebarFooterContainer.style.bottom=f+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(), +p=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=p+g.x+"px";this.diagramContainer.style.top=q+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=p+"px");b?(this.menubarContainer.style.width=e+"px", +this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-c+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-f)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width= this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",c-=this.tabContainer.clientHeight),this.diagramContainer.style.height=c+"px",this.hsplit.style.height=c+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=f+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom= this.footerHeight+c+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); @@ -2234,12 +2232,12 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)}; EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b}; -EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=q){var m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,c+(b?m.x-q.x:q.y-m.y)-e));mxEvent.consume(a);c!=p()&&(f=!0,g=null)}}function l(a){k(a);q=c=null}var q=null,c=null,f=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var p=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));c=p();f=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!f&&this.hsplitClickEnabled){var c=null!=g?g-e:0;g=p();d(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})}; -EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,l,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()}; -EditorUi.prototype.showError=function(a,b,e,d,k,l,q,c,f,g,p,m,n){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,l,q,m,c,f);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,g||340,p||100+20*b,!0,!1,n);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,l,q,c,f,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,q,c,f,g);this.dialogs.push(this.dialog)}; +EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=q){var l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,c+(b?l.x-q.x:q.y-l.y)-e));mxEvent.consume(a);c!=p()&&(f=!0,g=null)}}function m(a){k(a);q=c=null}var q=null,c=null,f=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var p=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));c=p();f=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!f&&this.hsplitClickEnabled){var c=null!=g?g-e:0;g=p();d(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})}; +EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,m,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()}; +EditorUi.prototype.showError=function(a,b,e,d,k,m,q,c,f,g,p,l,n){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,m,q,l,c,f);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,g||340,p||100+20*b,!0,!1,n);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,m,q,c,f,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,m,q,c,f,g);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus(): -(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()}; +(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(m.container,230,k,!0,!1);m.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("<mxGraphModel ");if(0<=e){var d=a.lastIndexOf("</mxGraphModel>");d>e&&(b=a.substring(e,d+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(k){}return b}; EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=Graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&& @@ -2247,18 +2245,18 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document, "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}}; EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var q=new Image;q.onload=function(){e(l,q.width,q.height)};q.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; +EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),m=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=m&&0<m.length){var q=new Image;q.onload=function(){e(m,q.width,q.height)};q.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()}; EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())}; EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)}; EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()}; EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"}; -EditorUi.prototype.createKeyHandler=function(a){function b(a,f,b){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(f=null!=f?f:1,b){d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),g=0;g<c.length;g++)if(d.getModel().isVertex(c[g])&&d.isCellResizable(c[g])){var e=d.getCellGeometry(c[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-f):38==a?e.height=Math.max(0,e.height-f):39==a?e.width+=f:40==a&&(e.height+=f),d.getModel().setGeometry(c[g],e))}}finally{d.getModel().endUpdate()}}else{var m= -d.getSelectionCell(),e=d.model.getParent(m),c=null;1==d.getSelectionCount()&&d.model.isVertex(m)&&null!=d.layoutManager&&!d.isCellLocked(m)&&(c=d.layoutManager.getLayout(e));if(null!=c&&c.constructor==mxStackLayout)c=e.getIndex(m),37==a||38==a?d.model.add(e,m,Math.max(0,c-1)):39!=a&&40!=a||d.model.add(e,m,Math.min(d.model.getChildCount(e),c+1));else{c=d.getMovableCells(d.getSelectionCells());m=[];for(g=0;g<c.length;g++)e=d.getCurrentCellStyle(c[g]),"1"==mxUtils.getValue(e,"part","0")?(e=d.model.getParent(c[g]), -d.model.isVertex(e)&&0>mxUtils.indexOf(c,e)&&m.push(e)):m.push(c[g]);0<m.length&&(c=e=0,37==a?e=-f:38==a?c=-f:39==a?e=f:40==a&&(c=f),d.moveCells(m,e,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)|| -mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],c= +EditorUi.prototype.createKeyHandler=function(a){function b(a,f,b){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(f=null!=f?f:1,b){d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),g=0;g<c.length;g++)if(d.getModel().isVertex(c[g])&&d.isCellResizable(c[g])){var e=d.getCellGeometry(c[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-f):38==a?e.height=Math.max(0,e.height-f):39==a?e.width+=f:40==a&&(e.height+=f),d.getModel().setGeometry(c[g],e))}}finally{d.getModel().endUpdate()}}else{var l= +d.getSelectionCell(),e=d.model.getParent(l),c=null;1==d.getSelectionCount()&&d.model.isVertex(l)&&null!=d.layoutManager&&!d.isCellLocked(l)&&(c=d.layoutManager.getLayout(e));if(null!=c&&c.constructor==mxStackLayout)c=e.getIndex(l),37==a||38==a?d.model.add(e,l,Math.max(0,c-1)):39!=a&&40!=a||d.model.add(e,l,Math.min(d.model.getChildCount(e),c+1));else{c=d.getMovableCells(d.getSelectionCells());l=[];for(g=0;g<c.length;g++)e=d.getCurrentCellStyle(c[g]),"1"==mxUtils.getValue(e,"part","0")?(e=d.model.getParent(c[g]), +d.model.isVertex(e)&&0>mxUtils.indexOf(c,e)&&l.push(e)):l.push(c[g]);0<l.length&&(c=e=0,37==a?e=-f:38==a?c=-f:39==a?e=f:40==a&&(c=f),d.moveCells(l,e,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)|| +mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],c= null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}: function(){d.selectChildCell()};if(null!=f[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),f[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)? -function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,f,d){var b=this.actions.get(f);null!=b&&(f=function(){b.isEnabled()&&b.funct()},c?d?k.bindControlShiftKey(a,f):k.bindControlKey(a,f):d?k.bindShiftKey(a,f):k.bindKey(a,f))});var p=this,m=k.escape;k.escape=function(a){m.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()}); +function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,f,d){var b=this.actions.get(f);null!=b&&(f=function(){b.isEnabled()&&b.funct()},c?d?k.bindControlShiftKey(a,f):k.bindControlKey(a,f):d?k.bindShiftKey(a,f):k.bindKey(a,f))});var p=this,l=k.escape;k.escape=function(a){l.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()}); k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){if(d.isEnabled())try{d.setSelectionCells(d.duplicateCells(d.getSelectionCells(), !1))}catch(n){p.handleError(n)}}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(36,!1,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0, "selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71, @@ -2271,26 +2269,26 @@ Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&( mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})(); mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor; mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null}; -Graph=function(a,b,e,d,k,l){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=l?l:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a); +Graph=function(a,b,e,d,k,m){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a); return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,c=null,f=null,g=null,p=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event");if(!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())){var e=b.getState();null!=e&&this.model.isEdge(e.cell)&&(q=new mxPoint(b.getGraphX(),b.getGraphY()),p=this.isCellSelected(e.cell),f= e,c=b,null!=e.text&&null!=e.text.boundingBox&&mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY())?g=mxEvent.LABEL_HANDLE:(e=this.selectionCellsHandler.getHandler(e.cell),null!=e&&null!=e.bends&&0<e.bends.length&&(g=e.getHandleForEvent(b))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(d.getEvent())&& -!mxEvent.isShiftDown(d.getEvent())&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=q&&null!=f&&null!=c){if(b=f,Math.abs(q.x-d.getGraphX())>e||Math.abs(q.y-d.getGraphY())>e){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var m=this.selectionCellsHandler.getHandler(b.cell);if(null!=m&&null!=m.bends&&0<m.bends.length){var n=m.getHandleForEvent(c),u=this.view.getEdgeStyle(b);e=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(n=g);if(e&&0!=n&&n!=m.bends.length-1&&n!=mxEvent.LABEL_HANDLE)!e|| -null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(n==mxEvent.LABEL_HANDLE||0==n||null!=b.visibleSourceState||n==m.bends.length-1||null!=b.visibleTargetState)e||n==mxEvent.LABEL_HANDLE||(e=b.absolutePoints,null!=e&&(null==u&&null==n||u==mxEdgeStyle.OrthConnector)&&(n=g,null==n&&(n=new mxRectangle(q.x,q.y),n.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(n,e[0].x,e[0].y)?n=0:mxUtils.contains(n,e[e.length-1].x,e[e.length-1].y)? -n=m.bends.length-1:null!=u&&(2==e.length||3==e.length&&(0==Math.round(e[0].x-e[1].x)&&0==Math.round(e[1].x-e[2].x)||0==Math.round(e[0].y-e[1].y)&&0==Math.round(e[1].y-e[2].y)))?n=2:(n=mxUtils.findNearestSegment(b,q.x,q.y),n=null==u?mxEvent.VIRTUAL_HANDLE-n:n+1))),null==n&&(n=mxEvent.VIRTUAL_HANDLE)),m.start(d.getGraphX(),d.getGraphX(),n),g=q=c=f=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(b=d.getState(),null!=b&&this.model.isEdge(b.cell)){m=null;e=b.absolutePoints;if(null!=e)if(n=new mxRectangle(d.getGraphX(), -d.getGraphY()),n.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,d.getGraphX(),d.getGraphY()))m="move";else if(mxUtils.contains(n,e[0].x,e[0].y)||mxUtils.contains(n,e[e.length-1].x,e[e.length-1].y))m="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)u=this.view.getEdgeStyle(b),m="crosshair",u!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(u=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()), -u<e.length-1&&0<=u&&(m=0==Math.round(e[u].x-e[u+1].x)?"col-resize":"row-resize"));null!=m&&b.setCursor(m)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=c=f=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0); -this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= -function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,d=this.graph.pageScale,b=f.width*d,f=f.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)c.push(new mxRectangle(((g.x+p)*b+d.x)*e,(g.y*f+d.y)*e,b*e,f*e));for(p=1;p<g.height;p++)c.push(new mxRectangle((g.x*b+d.x)*e,((g.y+p)*f+d.y)*e,b*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= -function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=n.apply(this,arguments),f=new mxDictionary,d=[],b=0;b<c.length;b++){var e=this.graph.getCompositeParent(c[b]);null==e||f.get(e)|| -(f.put(e,!0),d.push(e))}return d};var v=this.graphHandler.start;this.graphHandler.start=function(a,c,f,d){a=this.graph.getCompositeParent(a);v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var u=(new Date).getTime(),F=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove= -function(){var a=this.currentState;B.apply(this,arguments);a!=this.currentState?(u=(new Date).getTime(),F=0):F=(new Date).getTime()-u};var C=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this, -arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this, -function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c|| -a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())}; -var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,d,b,e){e=null!=e?e:[];if(0<f||0<d){var g=this.getModel(),m=a+f,p=c+d;null==b&&(b=this.getCurrentRoot(),null==b&&(b= -g.getRoot()));if(null!=b)for(var n=g.getChildCount(b),u=0;u<n;u++){var t=g.getChildAt(b,u),y=this.view.getState(t);if(null!=y&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var z=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=z&&(y=mxUtils.getBoundingBox(y,z));(g.isEdge(t)||g.isVertex(t))&&y.x>=a&&y.y+y.height<=p&&y.y>=c&&y.x+y.width<=m&&e.push(t);this.getAllCells(a,c,f,d,t,e)}}}return e};var J=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= -function(a,c,f){return this.graph.isCellSelected(a)?!1:J.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var I=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();I=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null: -this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),t.start(f.x,f.y)):null!=I?this.addSelectionCells(I):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);I=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c|| +!mxEvent.isShiftDown(d.getEvent())&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=q&&null!=f&&null!=c){if(b=f,Math.abs(q.x-d.getGraphX())>e||Math.abs(q.y-d.getGraphY())>e){this.isCellSelected(b.cell)||this.setSelectionCell(b.cell);var l=this.selectionCellsHandler.getHandler(b.cell);if(null!=l&&null!=l.bends&&0<l.bends.length){var n=l.getHandleForEvent(c),u=this.view.getEdgeStyle(b);e=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(n=g);if(e&&0!=n&&n!=l.bends.length-1&&n!=mxEvent.LABEL_HANDLE)!e|| +null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(n==mxEvent.LABEL_HANDLE||0==n||null!=b.visibleSourceState||n==l.bends.length-1||null!=b.visibleTargetState)e||n==mxEvent.LABEL_HANDLE||(e=b.absolutePoints,null!=e&&(null==u&&null==n||u==mxEdgeStyle.OrthConnector)&&(n=g,null==n&&(n=new mxRectangle(q.x,q.y),n.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(n,e[0].x,e[0].y)?n=0:mxUtils.contains(n,e[e.length-1].x,e[e.length-1].y)? +n=l.bends.length-1:null!=u&&(2==e.length||3==e.length&&(0==Math.round(e[0].x-e[1].x)&&0==Math.round(e[1].x-e[2].x)||0==Math.round(e[0].y-e[1].y)&&0==Math.round(e[1].y-e[2].y)))?n=2:(n=mxUtils.findNearestSegment(b,q.x,q.y),n=null==u?mxEvent.VIRTUAL_HANDLE-n:n+1))),null==n&&(n=mxEvent.VIRTUAL_HANDLE)),l.start(d.getGraphX(),d.getGraphX(),n),g=q=c=f=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(b=d.getState(),null!=b&&this.model.isEdge(b.cell)){l=null;e=b.absolutePoints;if(null!=e)if(n=new mxRectangle(d.getGraphX(), +d.getGraphY()),n.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,d.getGraphX(),d.getGraphY()))l="move";else if(mxUtils.contains(n,e[0].x,e[0].y)||mxUtils.contains(n,e[e.length-1].x,e[e.length-1].y))l="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)u=this.view.getEdgeStyle(b),l="crosshair",u!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(u=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()), +u<e.length-1&&0<=u&&(l=0==Math.round(e[u].x-e[u+1].x)?"col-resize":"row-resize"));null!=l&&b.setCursor(l)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=c=f=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0); +this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates= +function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,d=this.graph.pageScale,b=f.width*d,f=f.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),p=0;p<g.width;p++)c.push(new mxRectangle(((g.x+p)*b+d.x)*e,(g.y*f+d.y)*e,b*e,f*e));for(p=1;p<g.height;p++)c.push(new mxRectangle((g.x*b+d.x)*e,((g.y+p)*f+d.y)*e,b*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor= +function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=n.apply(this,arguments),f=new mxDictionary,d=[],b=0;b<c.length;b++){var e=this.graph.isTableRow(c[b])&&this.graph.isCellSelected(c[b])? +c[b]:this.graph.getCompositeParent(c[b]);null==e||f.get(e)||(f.put(e,!0),d.push(e))}return d};var v=this.graphHandler.start;this.graphHandler.start=function(a,c,f,d){a=this.graph.getCompositeParent(a);v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var u=(new Date).getTime(),A=0,B=this.connectionHandler.mouseMove; +this.connectionHandler.mouseMove=function(){var a=this.currentState;B.apply(this,arguments);a!=this.currentState?(u=(new Date).getTime(),A=0):A=(new Date).getTime()-u};var D=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<A||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent= +function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var F=null;this.panningHandler.addListener(mxEvent.PAN_START, +mxUtils.bind(this,function(){this.isEnabled()&&(F=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=F)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& +!c||a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())}; +var E=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return E.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(f,c);return f};this.getAllCells=function(a,c,f,d,b,e){e=null!=e?e:[];if(0<f||0<d){var g=this.getModel(),l=a+f,p=c+d;null==b&&(b=this.getCurrentRoot(),null==b&&(b= +g.getRoot()));if(null!=b)for(var n=g.getChildCount(b),u=0;u<n;u++){var t=g.getChildAt(b,u),y=this.view.getState(t);if(null!=y&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(y.style,"locked","0")){var z=mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION)||0;0!=z&&(y=mxUtils.getBoundingBox(y,z));(g.isEdge(t)||g.isVertex(t))&&y.x>=a&&y.y+y.height<=p&&y.y>=c&&y.x+y.width<=l&&e.push(t);this.getAllCells(a,c,f,d,t,e)}}}return e};var J=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +function(a,c,f){return this.graph.isCellSelected(a)?!1:J.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();H=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null: +this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),t.start(f.x,f.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);H=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c|| a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this, arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487"; @@ -2301,18 +2299,18 @@ Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph. mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff"; Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default"; Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1; -Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,b=!0,l=null,q=mxUtils.bind(this,function(a){b=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),c=mxUtils.bind(this,function(a){b=b&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<d&&Math.abs(l.y-mxEvent.getClientY(a))<d}),f=mxUtils.bind(this,function(c){if(b)for(var f=mxEvent.getSource(c);null!= +Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,b=!0,m=null,q=mxUtils.bind(this,function(a){b=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),c=mxUtils.bind(this,function(a){b=b&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<d&&Math.abs(m.y-mxEvent.getClientY(a))<d}),f=mxUtils.bind(this,function(c){if(b)for(var f=mxEvent.getSource(c);null!= f&&f!=e.node;){if("a"==f.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,f,c);break}f=f.parentNode}});mxEvent.addGestureListeners(e.node,q,c,f);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()}; (function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,q,c,f){this.useCssTransforms&& -(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,q,c,f){q=null!=q?q:!0;c=null!=c?c:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var p=this.model.getChildAt(e,d),m=this.getScaledCellAt(a,b,p,q,c,f);if(null!=m)return m;if(this.isCellVisible(p)&&(c&&this.model.isEdge(p)|| -q&&this.model.isVertex(p))&&(m=this.view.getState(p),null!=m&&(null==f||!f(m,a,b))&&this.intersects(m,a,b)))return p}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")};Graph.prototype.getCompositeParent= +(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,q,c,f){q=null!=q?q:!0;c=null!=c?c:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var p=this.model.getChildAt(e,d),l=this.getScaledCellAt(a,b,p,q,c,f);if(null!=l)return l;if(this.isCellVisible(p)&&(c&&this.model.isEdge(p)|| +q&&this.model.isVertex(p))&&(l=this.view.getState(p),null!=l&&(null==f||!f(l,a,b))&&this.intersects(l,a,b)))return p}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")};Graph.prototype.getCompositeParent= function(a){for(;this.isPart(a);){var d=this.model.getParent(a);if(!this.model.isVertex(d))break;a=d}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged= function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(d){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale, this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!= -a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(c){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale= -e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,c=this.view.scale,f=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=c,this.view.translate=f,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1}; +a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(c){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale= +e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var d=this.useCssTransforms,c=this.view.scale,f=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=c,this.view.translate=f,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1}; Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}}; -Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(l){}return d}; +Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(m){}return d}; Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)}; Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a}; Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){if(b!=mxEvent.BEGIN_UPDATE){var e=this.graph.getCellStyle(a);if("stackLayout"==e.childLayout){var d=new mxStackLayout(this.graph,!0);d.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");d.horizontal="1"==mxUtils.getValue(e,"horizontalStack","1");d.resizeParent= @@ -2327,31 +2325,31 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))}; Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", -shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,q=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var c=e?"getUTC":"get",f=a[c+"Date"](),g=a[c+"Day"](),p=a[c+"Month"](),m=a[c+"FullYear"](),n=a[c+"Hours"](),v=a[c+"Minutes"](),t=a[c+"Seconds"](),c=a[c+"Milliseconds"](),u=e?0:a.getTimezoneOffset(),F={d:f,dd:q(f),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+ -12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:q(n%12||12),H:n,HH:q(n),M:v,MM:q(v),s:t,ss:q(t),l:q(c,3),L:q(99<c?Math.round(c/10):c),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<u?"-":"+")+q(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in F?F[a]:a.slice(1, +shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,q=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var c=e?"getUTC":"get",f=a[c+"Date"](),g=a[c+"Day"](),p=a[c+"Month"](),l=a[c+"FullYear"](),n=a[c+"Hours"](),v=a[c+"Minutes"](),t=a[c+"Seconds"](),c=a[c+"Milliseconds"](),u=e?0:a.getTimezoneOffset(),A={d:f,dd:q(f),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+ +12],yy:String(l).slice(2),yyyy:l,h:n%12||12,hh:q(n%12||12),H:n,HH:q(n),M:v,MM:q(v),s:t,ss:q(t),l:q(c,3),L:q(99<c?Math.round(c/10):c),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<u?"-":"+")+q(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in A?A[a]:a.slice(1, a.length-1)})}; Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"), k.defaultChecked=!0);e.appendChild(k);var c=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",c);mxUtils.write(e,c);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a}; -Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var c=a;null==l&&null!=c;)null!=c.value&&"object"==typeof c.value&&(l=c.hasAttribute(q)?null!=c.getAttribute(q)?c.getAttribute(q):"":null),c=this.model.getParent(c);null==l&&(l=this.getGlobalVariable(q))}e.push(b.substring(d, -match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()}; +Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>d&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var c=a;null==m&&null!=c;)null!=c.value&&"object"==typeof c.value&&(m=c.hasAttribute(q)?null!=c.getAttribute(q)?c.getAttribute(q):"":null),c=this.model.getParent(c);null==m&&(m=this.getGlobalVariable(q))}e.push(b.substring(d, +match.index)+(null!=m?m:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()}; Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,b,e,d,k,l){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];l=l?l:!1;var q=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(q.x+=a.geometry.width/2,q.y-=e):b==mxConstants.DIRECTION_SOUTH?(q.x+=a.geometry.width/2,q.y+=a.geometry.height+e):(q.x=b==mxConstants.DIRECTION_WEST?q.x-e:q.x+(a.geometry.width+ -e),q.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var c=this.view.scale,f=this.view.translate,g=f.x*c,f=f.y*c;null!=e&&this.model.isVertex(e.cell)&&(g=e.x,f=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(g+q.x*c,f+q.y*c);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a), -c=this.view.getState(l),null!=e&&null!=c&&mxUtils.intersects(e,c)&&(l=null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?q.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?q.y+=a.geometry.height/2:q.x=b==mxConstants.DIRECTION_WEST?q.x-a.geometry.width/2:q.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[]; -this.model.beginUpdate();try{var p=null!=l&&this.isSwimlane(l),c=p?null:l;if(null==c&&k){for(var g=a,m=this.getCellGeometry(a);null!=m&&m.relative;)g=this.getModel().getParent(g),m=this.getCellGeometry(g);g=this.getCompositeParent(g);c=this.duplicateCells([g],!1)[0];m=this.getCellGeometry(c);null!=m&&(m.x=q.x-m.width/2,m.y=q.y-m.height/2);p&&(this.addCells([c],l,null,null,null,!0),l=null)}p=null;null!=this.layoutManager&&(p=this.layoutManager.getLayout(this.model.getParent(a)));var n=mxEvent.isControlDown(d)&& -k||null==l&&null!=p&&p.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,c,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var v=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(v=d.parent.getIndex(d),this.model.add(d.parent,n,v))}null==l&&null!=c&&null!=p&&null!=a.parent&&p.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&& -(v=a.parent.getIndex(a),this.model.add(a.parent,c,v));null!=n&&e.push(n);null==l&&null!=c&&e.push(c);null==c&&null!=n&&n.geometry.setTerminalPoint(q,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e}; +Graph.prototype.connectVertex=function(a,b,e,d,k,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var q=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(q.x+=a.geometry.width/2,q.y-=e):b==mxConstants.DIRECTION_SOUTH?(q.x+=a.geometry.width/2,q.y+=a.geometry.height+e):(q.x=b==mxConstants.DIRECTION_WEST?q.x-e:q.x+(a.geometry.width+ +e),q.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var c=this.view.scale,f=this.view.translate,g=f.x*c,f=f.y*c;null!=e&&this.model.isVertex(e.cell)&&(g=e.x,f=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(d)&&!k?null:this.getCellAt(g+q.x*c,f+q.y*c);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a), +c=this.view.getState(m),null!=e&&null!=c&&mxUtils.intersects(e,c)&&(m=null));if(k=!mxEvent.isShiftDown(d)||k)b==mxConstants.DIRECTION_NORTH?q.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?q.y+=a.geometry.height/2:q.x=b==mxConstants.DIRECTION_WEST?q.x-a.geometry.width/2:q.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[]; +this.model.beginUpdate();try{var p=null!=m&&this.isSwimlane(m),c=p?null:m;if(null==c&&k){for(var g=a,l=this.getCellGeometry(a);null!=l&&l.relative;)g=this.getModel().getParent(g),l=this.getCellGeometry(g);g=this.getCompositeParent(g);c=this.duplicateCells([g],!1)[0];l=this.getCellGeometry(c);null!=l&&(l.x=q.x-l.width/2,l.y=q.y-l.height/2);p&&(this.addCells([c],m,null,null,null,!0),m=null)}p=null;null!=this.layoutManager&&(p=this.layoutManager.getLayout(this.model.getParent(a)));var n=mxEvent.isControlDown(d)&& +k||null==m&&null!=p&&p.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,c,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var v=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=n.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==n.parent&&(v=d.parent.getIndex(d),this.model.add(d.parent,n,v))}null==m&&null!=c&&null!=p&&null!=a.parent&&p.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&& +(v=a.parent.getIndex(a),this.model.add(a.parent,c,v));null!=n&&e.push(n);null==m&&null!=c&&e.push(c);null==c&&null!=n&&n.geometry.setTerminalPoint(q,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b}; Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")}; -Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var q=this.view.getState(e[l]),c=this.getCellGeometry(e[l]);if(null!=q&&null!=c){var f=Math.round(c.width-q.width/this.view.scale),g=Math.round(c.height-q.height/this.view.scale);if(0!=g||0!=f){var p=this.model.getParent(e[l]),m=this.layoutManager.getLayout(p); -null==m?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,p,f,g):null!=k&&mxEvent.isAltDown(k)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(p,m,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; -Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=l&&null!=q&&(q=q.clone(),q.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],q))}}finally{this.model.endUpdate()}}; -Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,q.width/this.view.scale-l.width):l.height+=d+Math.min(0,q.height/this.view.scale-l.height),this.model.setGeometry(a, -l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);return null!=b&&(b=this.getCurrentCellStyle(b),null!=b.expand)?"0"!=b.expand:mxGraph.prototype.isExtendParent.apply(this,arguments)}; +Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var q=this.view.getState(e[m]),c=this.getCellGeometry(e[m]);if(null!=q&&null!=c){var f=Math.round(c.width-q.width/this.view.scale),g=Math.round(c.height-q.height/this.view.scale);if(0!=g||0!=f){var p=this.model.getParent(e[m]),l=this.layoutManager.getLayout(p); +null==l?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,p,f,g):null!=k&&mxEvent.isAltDown(k)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(p,l,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; +Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var m=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=m&&null!=q&&(q=q.clone(),q.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[b],q))}}finally{this.model.endUpdate()}}; +Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var m=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,q.width/this.view.scale-m.width):m.height+=d+Math.min(0,q.height/this.view.scale-m.height),this.model.setGeometry(a, +m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);return null!=b&&(b=this.getCurrentCellStyle(b),null!=b.expand)?"0"!=b.expand:mxGraph.prototype.isExtendParent.apply(this,arguments)}; Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)}; Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d}; Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()}; @@ -2367,8 +2365,8 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler= mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler); this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING, -mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState()); -null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)); +mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(d.getState()); +null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e)); this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)|| this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)}; HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline": @@ -2378,13 +2376,13 @@ this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=funct HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState}; HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"=== mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))}; -HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),d,this):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()}; +HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),m=e.getGraphY(),k=this.getStateAt(a,k,m);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),d,this):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()}; HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null}; HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing); var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),e=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,f,d){if(null!=e){var c=new mxRectangle(f,d,a.clientWidth,a.clientHeight); mxUtils.intersects(c,e)&&(a==this.arrowUp?d-=c.y+c.height-e.y:a==this.arrowRight?f+=e.x+e.width-c.x:a==this.arrowDown?d+=e.y+e.height-c.y:a==this.arrowLeft&&(f-=c.x+c.width-e.x))}a.style.left=f+"px";a.style.top=d+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()- this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(), -a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==k&&k==a&&(a=k=d=b=null);var l=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,f){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==l||c.height<3*l.height&&c.width<3*l.width)?f.style.visibility="visible": +a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==k&&k==a&&(a=k=d=b=null);var m=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,f){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==m||c.height<3*m.height&&c.width<3*m.width)?f.style.visibility="visible": f.style.visibility="hidden"});q(b,this.arrowRight);q(d,this.arrowLeft);q(k,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")), this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}}; HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a}; @@ -2392,36 +2390,36 @@ HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getM HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()|| this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox, b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,k){a=this.cloneCell(a);for(var l=0;l<e;l++){var q=this.cloneCell(b),c=this.getCellGeometry(q);null!=c&&(c.x+=l*d,c.y+=l*k);a.insert(q)}return a}; -Graph.prototype.createTable=function(a,b,e,d){e=null!=e?e:40;d=null!=d?d:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*d,"html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,"html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;"), -this.createVertex(null,null,"",0,0,e,d,"html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;"),b,e,0),a,0,d)}; -Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d){e=null!=e?e:120;d=null!=d?d:120;var k=this.createVertex(null,null,"",0,0,b*e,a*d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;containerType=table;container=0;dropTarget=0;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),l=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=l;k.geometry.height+=l;var q=this.createVertex(null, -null,"",0,l,b*e+l,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;resizeLast=1;resizeParent=0;container=0;");k.insert(this.createParent(q,this.createVertex(null,null,"",l,0,e,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),b,e,0));return 1<a?(q.geometry.y=d+l,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",l,0,e,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"), -b,e,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType}; -Graph.prototype.updateTableRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{var d=this.getCellGeometry(a);if(null!=d){d=d.clone();d.height+=b;e.setGeometry(a,d);var k=e.getParent(a),l=this.getCellGeometry(k);null!=l&&(l=l.clone(),l.height+=b,e.setGeometry(k,l))}}finally{e.endUpdate()}}; -Graph.prototype.updateTableColumnWidth=function(a,b){var e=this.getModel(),d=e.getParent(a),k=e.getParent(d),l=d.getIndex(a);e.beginUpdate();try{for(var q=0;q<e.getChildCount(k);q++)if(d=e.getChildAt(k,q),e.isVertex(d)){var c=e.getChildAt(d,l);if(e.isVertex(c)){var f=this.getCellGeometry(c);null!=f&&(f=f.clone(),f.width+=b,e.setGeometry(c,f))}l<e.getChildCount(d)-1&&(c=e.getChildAt(d,l+1),e.isVertex(c)&&(f=this.getCellGeometry(c),null!=f&&(f=f.clone(),f.x+=b,f.width-=b,e.setGeometry(c,f))))}}finally{e.endUpdate()}}; -function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.getLayout=function(a,b){for(var e=this.graph.getModel(),d=[],k=0,l=0;l<e.getChildCount(a);l++){var q=e.getChildAt(a,l);if(!this.isVertexIgnored(q)){var c=this.graph.getCellGeometry(q);null!=c&&(k+=b?c.height:c.width,d.push(q))}}return[d,k]}; -TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a),e=this.graph.getCellGeometry(a),d=this.graph.getModel();d.beginUpdate();try{var k=this.getLayout(a,!0),l=k[0],q=k[1],c=b.y;for(a=0;a<l.length;a++){var f=e.height-b.y-b.height,g=this.graph.getCellGeometry(l[a]),g=g.clone();g.height=g.height/q*f;g.width=e.width;g.x=b.x;g.y=c;d.setGeometry(l[a],g);for(var c=c+g.height,p=this.graph.getActualStartSize(l[a]),m=this.getLayout(l[a],!1),n=m[0],v=m[1],t=p.x,k=0;k<n.length;k++){var u= -this.graph.getCellGeometry(n[k]),F=g.width-p.x-p.width,u=u.clone();u.width=u.width/v*F;u.height=g.height;u.y=0;u.x=t;d.setGeometry(n[k],u);t+=u.width}}}finally{d.endUpdate()}}}; +HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,k){a=this.cloneCell(a);for(var m=0;m<e;m++){var q=this.cloneCell(b),c=this.getCellGeometry(q);null!=c&&(c.x+=m*d,c.y+=m*k);a.insert(q)}return a}; +Graph.prototype.createTable=function(a,b,e,d){e=null!=e?e:40;d=null!=d?d:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*d,"swimlane;startSize=0;html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,"shape=partialRectangle;html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;strokeColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;"), +this.createVertex(null,null,"",0,0,e,d,"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;left=0;top=0;"),b,e,0),a,0,d)}; +Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d){e=null!=e?e:120;d=null!=d?d:120;var k=this.createVertex(null,null,"",0,0,b*e,a*d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;containerType=table;container=0;dropTarget=0;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),m=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=m;k.geometry.height+=m;var q=this.createVertex(null, +null,"",0,m,b*e+m,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;resizeLast=1;resizeParent=0;container=0;");k.insert(this.createParent(q,this.createVertex(null,null,"",m,0,e,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),b,e,0));return 1<a?(q.geometry.y=d+m,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",m,0,e,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"), +b,e,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType}; +Graph.prototype.updateTableRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{var d=this.getCellGeometry(a);if(null!=d){d=d.clone();d.height+=b;e.setGeometry(a,d);var k=e.getParent(a),m=this.getCellGeometry(k);null!=m&&(m=m.clone(),m.height+=b,e.setGeometry(k,m))}}finally{e.endUpdate()}}; +Graph.prototype.updateTableColumnWidth=function(a,b){var e=this.getModel(),d=e.getParent(a),k=e.getParent(d),m=d.getIndex(a);e.beginUpdate();try{for(var q=0;q<e.getChildCount(k);q++)if(d=e.getChildAt(k,q),e.isVertex(d)){var c=e.getChildAt(d,m);if(e.isVertex(c)){var f=this.getCellGeometry(c);null!=f&&(f=f.clone(),f.width+=b,e.setGeometry(c,f))}m<e.getChildCount(d)-1&&(c=e.getChildAt(d,m+1),e.isVertex(c)&&(f=this.getCellGeometry(c),null!=f&&(f=f.clone(),f.x+=b,f.width-=b,e.setGeometry(c,f))))}}finally{e.endUpdate()}}; +function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.getLayout=function(a,b){for(var e=this.graph.getModel(),d=[],k=0,m=0;m<e.getChildCount(a);m++){var q=e.getChildAt(a,m);if(!this.isVertexIgnored(q)){var c=this.graph.getCellGeometry(q);null!=c&&(k+=b?c.height:c.width,d.push(q))}}return[d,k]}; +TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a),e=this.graph.getCellGeometry(a),d=this.graph.getModel();d.beginUpdate();try{var k=this.getLayout(a,!0),m=k[0],q=k[1],c=b.y;for(a=0;a<m.length;a++){var f=e.height-b.y-b.height,g=this.graph.getCellGeometry(m[a]),g=g.clone();g.x=b.x;g.y=Math.round(c);g.width=e.width;var p=g.height/q*f,c=c+p;g.height=Math.round(c)-g.y;d.setGeometry(m[a],g);for(var l=this.graph.getActualStartSize(m[a]),n=this.getLayout(m[a],!1), +v=n[0],t=n[1],u=l.x,k=0;k<v.length;k++){var A=this.graph.getCellGeometry(v[k]),B=g.width-l.x-l.width,A=A.clone();A.x=Math.round(u);A.y=0;A.height=Math.round(p);u+=A.width/t*B;A.width=Math.round(u)-A.x;d.setGeometry(v[k],A)}}}finally{d.endUpdate()}}}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var f=this.getState(a);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=b.apply(this, arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&& 1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var b=function(c,f,b){var e=new mxPoint(f,b);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=f||e.y!=b},e=.5*this.scale,f=!1,d=[],t=0;t<c.length-1;t++){for(var u= -c[t+1],l=c[t],k=[],q=c[t+2];t<c.length-2&&mxUtils.ptSegDistSq(l.x,l.y,q.x,q.y,u.x,u.y)<1*this.scale*this.scale;)u=q,t++,q=c[t+2];for(var f=b(0,l.x,l.y)||f,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],E=x.absolutePoints;if(null!=E&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<E.length-1;x++){for(var G=E[x+1],D=E[x],q=E[x+2];x<E.length-2&&mxUtils.ptSegDistSq(D.x,D.y,q.x,q.y,G.x,G.y)<1*this.scale*this.scale;)G=q,x++,q=E[x+2];q=mxUtils.intersection(l.x,l.y,u.x,u.y,D.x,D.y,G.x, -G.y);if(null!=q&&(Math.abs(q.x-l.x)>e||Math.abs(q.y-l.y)>e)&&(Math.abs(q.x-u.x)>e||Math.abs(q.y-u.y)>e)&&(Math.abs(q.x-D.x)>e||Math.abs(q.y-D.y)>e)&&(Math.abs(q.x-G.x)>e||Math.abs(q.y-G.y)>e)){G=q.x-l.x;D=q.y-l.y;q={distSq:G*G+D*D,x:q.x,y:q.y};for(G=0;G<k.length;G++)if(k[G].distSq>q.distSq){k.splice(G,0,q);q=null;break}null==q||0!=k.length&&k[k.length-1].x===q.x&&k[k.length-1].y===q.y||k.push(q)}}}for(x=0;x<k.length;x++)f=b(1,k[x].x,k[x].y)||f}q=c[c.length-1];f=b(0,q.x,q.y)||f}a.routedPoints=d;return f}return!1}; +c[t+1],k=c[t],m=[],q=c[t+2];t<c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,u.x,u.y)<1*this.scale*this.scale;)u=q,t++,q=c[t+2];for(var f=b(0,k.x,k.y)||f,C=0;C<this.validEdges.length;C++){var x=this.validEdges[C],F=x.absolutePoints;if(null!=F&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<F.length-1;x++){for(var G=F[x+1],E=F[x],q=F[x+2];x<F.length-2&&mxUtils.ptSegDistSq(E.x,E.y,q.x,q.y,G.x,G.y)<1*this.scale*this.scale;)G=q,x++,q=F[x+2];q=mxUtils.intersection(k.x,k.y,u.x,u.y,E.x,E.y,G.x, +G.y);if(null!=q&&(Math.abs(q.x-k.x)>e||Math.abs(q.y-k.y)>e)&&(Math.abs(q.x-u.x)>e||Math.abs(q.y-u.y)>e)&&(Math.abs(q.x-E.x)>e||Math.abs(q.y-E.y)>e)&&(Math.abs(q.x-G.x)>e||Math.abs(q.y-G.y)>e)){G=q.x-k.x;E=q.y-k.y;q={distSq:G*G+E*E,x:q.x,y:q.y};for(G=0;G<m.length;G++)if(m[G].distSq>q.distSq){m.splice(G,0,q);q=null;break}null==q||0!=m.length&&m[m.length-1].x===q.x&&m[m.length-1].y===q.y||m.push(q)}}}for(x=0;x<m.length;x++)f=b(1,m[x].x,m[x].y)||f}q=c[c.length-1];f=b(0,q.x,q.y)||f}a.routedPoints=d;return f}return!1}; var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,b=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style, -"jumpStyle","none"),g=!0,p=null,l=null,q=[],C=null;a.begin();for(var A=0;A<this.state.routedPoints.length;A++){var x=this.state.routedPoints[A],E=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?E=c[0]:A==this.state.routedPoints.length-1&&(E=c[c.length-1]);var G=!1;if(null!=p&&1==x.type){var D=this.state.routedPoints[A+1],x=D.x/this.scale-E.x,D=D.y/this.scale-E.y,x=x*x+D*D;null==C&&(C=new mxPoint(E.x-p.x,E.y-p.y),l=Math.sqrt(C.x*C.x+C.y*C.y),0<l?(C.x=C.x*b/l,C.y=C.y*b/l):C=null);x>b*b&&0<l&&(x=p.x- -E.x,D=p.y-E.y,x=x*x+D*D,x>b*b&&(G=new mxPoint(E.x-C.x,E.y-C.y),x=new mxPoint(E.x+C.x,E.y+C.y),q.push(G),this.addPoints(a,q,d,f,!1,null,g),q=0>Math.round(C.x)||0==Math.round(C.x)&&0>=Math.round(C.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(G.x-C.y*q,G.y+C.x*q),a.lineTo(x.x-C.y*q,x.y+C.x*q),a.lineTo(x.x,x.y)):"arc"==e?(q*=1.3,a.curveTo(G.x-C.y*q,G.y+C.x*q,x.x-C.y*q,x.y+C.x*q,x.x,x.y)):(a.moveTo(x.x,x.y),g=!0),q=[x],G=!0))}else C=null;G||(q.push(E),p=E)}this.addPoints(a,q,d,f,!1,null,g);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null==a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,b);var f=this.getNextPoint(a,d,b),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),f=mxUtils.getRotatedPoint(f,p,k,m);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);p+=parseFloat(a.style[b?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(c,f,0==g&&e,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),f=mxUtils.getRotatedPoint(f,p,k,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,d,b,f),b)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,d,b,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c, -a[f]);if(null!=g){var m=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==b||m<b)d=g,b=m}}null!=d&&(e=d)}return e};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,d){var f=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(f=d.state.view.graph.replacePlaceholders(d.state.cell,f));return f};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var f= +"jumpStyle","none"),g=!0,p=null,m=null,q=[],D=null;a.begin();for(var C=0;C<this.state.routedPoints.length;C++){var x=this.state.routedPoints[C],F=new mxPoint(x.x/this.scale,x.y/this.scale);0==C?F=c[0]:C==this.state.routedPoints.length-1&&(F=c[c.length-1]);var G=!1;if(null!=p&&1==x.type){var E=this.state.routedPoints[C+1],x=E.x/this.scale-F.x,E=E.y/this.scale-F.y,x=x*x+E*E;null==D&&(D=new mxPoint(F.x-p.x,F.y-p.y),m=Math.sqrt(D.x*D.x+D.y*D.y),0<m?(D.x=D.x*b/m,D.y=D.y*b/m):D=null);x>b*b&&0<m&&(x=p.x- +F.x,E=p.y-F.y,x=x*x+E*E,x>b*b&&(G=new mxPoint(F.x-D.x,F.y-D.y),x=new mxPoint(F.x+D.x,F.y+D.y),q.push(G),this.addPoints(a,q,d,f,!1,null,g),q=0>Math.round(D.x)||0==Math.round(D.x)&&0>=Math.round(D.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(G.x-D.y*q,G.y+D.x*q),a.lineTo(x.x-D.y*q,x.y+D.x*q),a.lineTo(x.x,x.y)):"arc"==e?(q*=1.3,a.curveTo(G.x-D.y*q,G.y+D.x*q,x.x-D.y*q,x.y+D.x*q,x.x,x.y)):(a.moveTo(x.x,x.y),g=!0),q=[x],G=!0))}else D=null;G||(q.push(F),p=F)}this.addPoints(a,q,d,f,!1,null,g);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,d,b){if(null==c||null==a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{c=this.getTerminalPort(a,c,b);var f=this.getNextPoint(a,d,b),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),f=mxUtils.getRotatedPoint(f,p,k,l);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);p+=parseFloat(a.style[b?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(c,f,0==g&&e,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),f=mxUtils.getRotatedPoint(f,p,k,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,d,b,f),b)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,d,b,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);b=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c, +a[f]);if(null!=g){var l=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==b||l<b)d=g,b=l}}null!=d&&(e=d)}return e};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,d){var f=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(f=d.state.view.graph.replacePlaceholders(d.state.cell,f));return f};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var f= mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var d=f.substring(8,f.length-1),b=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(b.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; -mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l= -mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; +mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m= +mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b}; -mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!= -k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; -mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var q=d.getAttribute("w"), -c=d.getAttribute("h"),q=null==q?80:parseInt(q,10),c=null==c?80:parseInt(c,10);b(k,l,a,q,c)}}d=d.nextSibling}}}; +mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var m=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,m=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!= +k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; +mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(d));if(null!=b){var q=d.getAttribute("w"), +c=d.getAttribute("h"),q=null==q?80:parseInt(q,10),c=null==c?80:parseInt(c,10);b(k,m,a,q,c)}}d=d.nextSibling}}}; "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR= "#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents= !0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var e=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||e.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview= @@ -2431,22 +2429,22 @@ orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edg (a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&& (a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+ "/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var f=0;f<a.length;f++){var d=a[f];c[mxObjectIdentity.get(d)]=d.getId();for(var b=this.model.getChildCount(d),e=0;e<b;e++)this.createCellLookup([this.model.getChildAt(d,e)],c)}return c};Graph.prototype.createCellMapping=function(a,c,f){f=null!=f?f:{};for(var d in a){var b=c[d];null==f[b]&&(f[b]=a[d].getId()||"")}return f}; -Graph.prototype.importGraphModel=function(a,c,f,d){c=null!=c?c:0;f=null!=f?f:0;var b=new mxCodec(a.ownerDocument),e=new mxGraphModel;b.decode(a,e);a=[];var b={},g={},m=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),b));if(null!=m){var p=this.createCellLookup([e.root]),m=m.slice();this.model.beginUpdate();try{if(1!=m.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<m.length;e++){var n=this.model.getChildren(this.moveCells([m[e]],c,f,!1,this.model.getRoot())[0]);null!=n&& -(a=a.concat(n))}else a=this.moveCells(e.getChildren(m[0]),c,f,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(b,p,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(c=this.snap(c),f=this.snap(f));var u=this.getBoundingBoxFromGeometry(a,!0);null!=u&&this.moveCells(a,c-u.x,f-u.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},f=this.cloneCells(a,null,c),d=new mxDictionary, +Graph.prototype.importGraphModel=function(a,c,f,d){c=null!=c?c:0;f=null!=f?f:0;var b=new mxCodec(a.ownerDocument),e=new mxGraphModel;b.decode(a,e);a=[];var b={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),b));if(null!=l){var p=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var n=this.model.getChildren(this.moveCells([l[e]],c,f,!1,this.model.getRoot())[0]);null!=n&& +(a=a.concat(n))}else a=this.moveCells(e.getChildren(l[0]),c,f,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(b,p,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(c=this.snap(c),f=this.snap(f));var u=this.getBoundingBoxFromGeometry(a,!0);null!=u&&this.moveCells(a,c-u.x,f-u.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},f=this.cloneCells(a,null,c),d=new mxDictionary, b=0;b<a.length;b++)d.put(a[b],!0);for(b=0;b<f.length;b++){var e=this.view.getState(a[b]);if(null!=e){var g=this.getCellGeometry(f[b]);null==g||!g.relative||this.model.isEdge(a[b])||d.get(this.model.getParent(a[b]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}d=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(b=0;b<f.length;b++)e.add(g,f[b]);this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),f);return d.encode(e)}; -var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,c,f){if(c||f)l.apply(this,arguments);else{var d=this.getSelectionCell(),b=null,e=[],g=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(e.push(c),c==d)b=e.length-1;else if(a&&null==d&&0<e.length||null!=b&&a&&e.length>b||!a&&0<b)return;for(var f=0;f<this.model.getChildCount(c);f++)g(this.model.getChildAt(c,f))});g(this.model.root);0<e.length&&(b=null!=b?mxUtils.mod(b+ -(a?1:-1),e.length):0,this.setSelectionCell(e[b]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,c,f,d,b,e,g){g=null!=g?g:{};var m=q.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),m);return m};var c=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,f){var d=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.isTableCell(a[b])||this.isTableRow(a[b])?this.labelChanged(a[b],""):d.push(a[b]);d=c.apply(this, +var m=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,c,f){if(c||f)m.apply(this,arguments);else{var d=this.getSelectionCell(),b=null,e=[],g=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(e.push(c),c==d)b=e.length-1;else if(a&&null==d&&0<e.length||null!=b&&a&&e.length>b||!a&&0<b)return;for(var f=0;f<this.model.getChildCount(c);f++)g(this.model.getChildAt(c,f))});g(this.model.root);0<e.length&&(b=null!=b?mxUtils.mod(b+ +(a?1:-1),e.length):0,this.setSelectionCell(e[b]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,c,f,d,b,e,g){g=null!=g?g:{};var l=q.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};var c=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,f){var d=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.isTableCell(a[b])||this.isTableRow(a[b])?this.labelChanged(a[b],""):d.push(a[b]);d=c.apply(this, [d,f])}finally{this.model.endUpdate()}return d};Graph.prototype.updateCustomLinks=function(a,c){for(var f=0;f<c.length;f++)null!=c[f]&&this.updateCustomLinksForCell(a,c[f])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var f=mxUtils.getValue(a.style,"points",null);if(null!=f){var d=[];try{for(var b=JSON.parse(f),f=0;f<b.length;f++){var e=b[f];d.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]: -!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(ka){}return d}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;b=a.shape.bounds;f=a.shape.scale;d=b.width/f;b=b.height/f;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=d,d=b,b=e;f=a.shape.getConstraints(a.style,d,b);if(null!=f)return f;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge= +!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(ma){}return d}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;b=a.shape.bounds;f=a.shape.scale;d=b.width/f;b=b.height/f;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=d,d=b,b=e;f=a.shape.getConstraints(a.style,d,b);if(null!=f)return f;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge= function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),f=0,d=0;d<c;d++){var b=this.model.getChildAt(a,d);this.model.isVertex(b)&&(b=this.getCellGeometry(b),null==b||b.relative||f++)}return 0<f||this.isContainer(a)}; Graph.prototype.isValidDropTarget=function(a){var c=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this, arguments);if(c&&null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var f=this.getModel(),d=[];f.beginUpdate(); -try{for(var b=0;b<a.length;b++){var e=a[b];if(f.isEdge(e)){var g=f.getTerminal(e,!0),m=f.getTerminal(e,!1);f.setTerminal(e,m,!0);f.setTerminal(e,g,!1);var p=f.getGeometry(e);if(null!=p){p=p.clone();null!=p.points&&p.points.reverse();var n=p.getTerminalPoint(!0),u=p.getTerminalPoint(!1);p.setTerminalPoint(n,!1);p.setTerminalPoint(u,!0);f.setGeometry(e,p);var y=this.view.getState(e),t=this.view.getState(g),z=this.view.getState(m);if(null!=y){var l=null!=t?this.getConnectionConstraint(y,t,!0):null,v= -null!=z?this.getConnectionConstraint(y,z,!1):null;this.setConnectionConstraint(e,g,!0,v);this.setConnectionConstraint(e,m,!1,l)}d.push(e)}}else if(f.isVertex(e)&&(p=this.getCellGeometry(e),null!=p)){p=p.clone();p.x+=p.width/2-p.height/2;p.y+=p.height/2-p.width/2;var k=p.width;p.width=p.height;p.height=k;f.setGeometry(e,p);var M=this.view.getState(e);if(null!=M){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],L=mxUtils.getValue(M.style, +try{for(var b=0;b<a.length;b++){var e=a[b];if(f.isEdge(e)){var g=f.getTerminal(e,!0),l=f.getTerminal(e,!1);f.setTerminal(e,l,!0);f.setTerminal(e,g,!1);var p=f.getGeometry(e);if(null!=p){p=p.clone();null!=p.points&&p.points.reverse();var n=p.getTerminalPoint(!0),u=p.getTerminalPoint(!1);p.setTerminalPoint(n,!1);p.setTerminalPoint(u,!0);f.setGeometry(e,p);var y=this.view.getState(e),t=this.view.getState(g),z=this.view.getState(l);if(null!=y){var v=null!=t?this.getConnectionConstraint(y,t,!0):null,m= +null!=z?this.getConnectionConstraint(y,z,!1):null;this.setConnectionConstraint(e,g,!0,m);this.setConnectionConstraint(e,l,!1,v)}d.push(e)}}else if(f.isVertex(e)&&(p=this.getCellGeometry(e),null!=p)){p=p.clone();p.x+=p.width/2-p.height/2;p.y+=p.height/2-p.width/2;var k=p.width;p.width=p.height;p.height=k;f.setGeometry(e,p);var Y=this.view.getState(e);if(null!=Y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],L=mxUtils.getValue(Y.style, mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,L)+(c?-1:1),K.length)],[e])}d.push(e)}}}finally{f.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments); a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var f=this.view.getState(a[c]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}}; Graph.prototype.replaceElement=function(a,c){for(var f=a.ownerDocument.createElement(null!=c?c:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=a.innerHTML;a.parentNode.replaceChild(f,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var f=a.getElementsByTagName("*"),d=0;d<f.length;d++)c(f[d])};Graph.prototype.updateLabelElements=function(a,c,f){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"), -b=0;b<a.length;b++)if(this.isHtmlLabel(a[b])){var e=this.convertValueToString(a[b]);if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=f?f:"*"),m=0;m<g.length;m++)c(g[m]);d.innerHTML!=e&&this.cellLabelChanged(a[b],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,f){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"), +b=0;b<a.length;b++)if(this.isHtmlLabel(a[b])){var e=this.convertValueToString(a[b]);if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=f?f:"*"),l=0;l<g.length;l++)c(g[l]);d.innerHTML!=e&&this.cellLabelChanged(a[b],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,f){c=Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"), b=a;null!=b;){if(b==this.model.getRoot()||null!=b.value&&"object"==typeof b.value&&b.hasAttribute(d)){this.setAttributeForCell(b,d,c);break}b=this.model.getParent(b)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,f=0;f<a.length;f++)c.put(a[f],!0);for(var d=[],f=0;f<a.length;f++){var b=this.model.getParent(a[f]);null==b|| c.get(b)||(c.put(b,!0),d.push(b))}for(f=0;f<d.length;f++)if(b=this.view.getState(d[f]),null!=b&&(this.model.isEdge(b.cell)||this.model.isVertex(b.cell))&&this.isCellDeletable(b.cell)&&this.isTransparentState(b)){for(var e=!0,g=0;g<this.model.getChildCount(b.cell)&&e;g++)c.get(this.model.getChildAt(b.cell,g))||(e=!1);e&&a.push(b.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],f=0;f<a.length;f++)this.isCellDeletable(a[f])&& this.isTransparentState(this.view.getState(a[f]))&&c.push(a[f]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,f){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c):null;return null!=a?a:f};Graph.prototype.setAttributeForCell=function(a,c,f){var b; @@ -2458,31 +2456,31 @@ this.view.translate.x,f=this.container.scrollTop/this.view.scale-this.view.trans this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,f){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=f&&this.model.isEdge(f.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(f,a,c); b.geometry.x=Math.round(1E4*d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(f,b.geometry),e=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=f?f.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!= f?f.origin.y:0),b.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=f?f.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};Graph.prototype.addClickHandler=function(a,c,f){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++){var b=this.getAbsoluteUrl(a[f].getAttribute("href"));null!=b&&(a[f].setAttribute("rel",this.linkRelation), -a[f].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[f],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,e=this.getTolerance(),g=this,m={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null, +a[f].setAttribute("href",b),null!=c&&mxEvent.addGestureListeners(a[f],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null, function(a,c,f){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a, c){if(g.isMouseDown){if(null!=this.currentLink){var f=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(f>e||b>e)&&this.clear()}}else{for(f=c.getSource();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!g.intersects(this.currentState,c.getGraphX(), -c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var d=b.getSource(),m=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(m)||mxEvent.isMiddleMouseButton(m))&&!mxEvent.isPopupTrigger(m)||mxEvent.isTouchEvent(m))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink), -"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(m,this.currentLink),mxEvent.isConsumed(m)||(m=mxEvent.isMiddleMouseButton(m)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,m),b.consume())):null!=f&&!b.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&f(b.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell)); -null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(m);mxEvent.addListener(document,"mouseleave",function(a){m.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells(); -c=null!=c?c:!0;a=this.model.getTopmostCells(a);var f=this.getModel(),b=this.gridSize,d=[];f.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var m=f.getParent(a[g]),p=this.moveCells([e[g]],b,b,!1)[0];d.push(p);if(c)f.add(m,e[g]);else{var n=m.getIndex(a[g]);f.add(m,e[g],n+1)}}}finally{f.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,f){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<b.length;e++)d.push(b[e]); +c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,b){for(var d=b.getSource(),l=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink), +"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),b.consume())):null!=f&&!b.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&f(b.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell)); +null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells(); +c=null!=c?c:!0;a=this.model.getTopmostCells(a);var f=this.getModel(),b=this.gridSize,d=[];f.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=f.getParent(a[g]),p=this.moveCells([e[g]],b,b,!1)[0];d.push(p);if(c)f.add(l,e[g]);else{var n=l.getIndex(a[g]);f.add(l,e[g],n+1)}}}finally{f.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,f){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<b.length;e++)d.push(b[e]); document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",f);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),f=[],b=0;b<c.length;b++)f.push(c[b]);document.execCommand("createlink", !1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==f.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=f[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(f=c[0].parentNode;null!=c[0].firstChild;)f.insertBefore(c[0].firstChild,c[0]);f.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(a);return!this.isTableCell(a)&& -!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var f=[],b=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var m=a?g.getCenterX():g.getCenterY(),b=null!=b?Math.max(b,m):m,d=null!=d?Math.min(d,m):m;f.push(g)}}if(2<f.length){f.sort(function(c,f){return a? -c.x-f.x:c.y-f.y});g=this.view.translate;m=this.view.scale;d=d/m-(a?g.x:g.y);b=b/m-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var p=(b-d)/(f.length-1),b=d,e=1;e<f.length-1;e++){var n=this.view.getState(this.model.getParent(f[e].cell)),u=this.getCellGeometry(f[e].cell),b=b+p;null!=u&&null!=n&&(u=u.clone(),a?u.x=Math.round(b-u.width/2)-n.origin.x:u.y=Math.round(b-u.height/2)-n.origin.y,this.getModel().setGeometry(f[e].cell,u))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent= -function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,f,b,d,e,g,m,p,n){var u=this.useCssTransforms;u&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;f=null!=f?f:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var y=e||b? -this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==y)throw Error(mxResources.get("drawingEmpty"));var t=this.view.scale,z=mxUtils.createXmlDocument(),l=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"svg"):z.createElement("svg");null!=a&&(null!=l.style?l.style.backgroundColor=a:l.setAttribute("style","background-color:"+a));null==z.createElementNS?(l.setAttribute("xmlns",mxConstants.NS_SVG),l.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):l.setAttributeNS("http://www.w3.org/2000/xmlns/", -"xmlns:xlink",mxConstants.NS_XLINK);a=c/t;var v=Math.max(1,Math.ceil(y.width*a)+2*f)+(n?5:0),k=Math.max(1,Math.ceil(y.height*a)+2*f)+(n?5:0);l.setAttribute("version","1.1");l.setAttribute("width",v+"px");l.setAttribute("height",k+"px");l.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+v+" "+k);z.appendChild(l);var K=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"g"):z.createElement("g");l.appendChild(K);var L=this.createSvgCanvas(K);L.foOffset=d?-.5:0;L.textOffset=d?-.5:0;L.imageOffset= -d?-.5:0;L.translate(Math.floor((f/c-y.x)/t),Math.floor((f/c-y.y)/t));var x=document.createElement("div"),q=L.getAlternateText;L.getAlternateText=function(a,c,f,b,d,e,g,m,p,n,u,y,ia){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(x.innerHTML=e,e=mxUtils.extractTextWithWhitespace(x.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),t=[],La=0,z=0;(0==Na||La<Na)&&z<e.length;){var l=e.charCodeAt(z);if(10==l||13==l){if(0<La)break}else t.push(e.charAt(z)),255>l&&La++;z++}t.length< -e.length&&1<e.length-t.length&&(e=mxUtils.trim(t.join(""))+"...");return e}catch(Ua){return q.apply(this,arguments)}else return q.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){c=t/c;var H=this.view.translate,B=new mxRectangle(H.x*c,H.y*c,P.width*c,P.height*c);mxUtils.intersects(y,B)&&L.image(H.x,H.y,P.width,P.height,P.src,!0)}L.scale(a);L.textEnabled=g;m=null!=m?m:this.createSvgImageExport();var M=m.drawCellState,F=m.getLinkForCellState;m.getLinkForCellState=function(a,c){var f=F.apply(this, -arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};m.drawCellState=function(a,c){for(var f=a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&M.apply(this,arguments)};m.drawState(this.getView().getState(this.model.root),L);this.updateSvgLinks(l,p,!0);this.addForeignObjectWarning(L,l);return l}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning= +!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var f=[],b=null,d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),b=null!=b?Math.max(b,l):l,d=null!=d?Math.min(d,l):l;f.push(g)}}if(2<f.length){f.sort(function(c,f){return a? +c.x-f.x:c.y-f.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);b=b/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var p=(b-d)/(f.length-1),b=d,e=1;e<f.length-1;e++){var n=this.view.getState(this.model.getParent(f[e].cell)),u=this.getCellGeometry(f[e].cell),b=b+p;null!=u&&null!=n&&(u=u.clone(),a?u.x=Math.round(b-u.width/2)-n.origin.x:u.y=Math.round(b-u.height/2)-n.origin.y,this.getModel().setGeometry(f[e].cell,u))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent= +function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,f,b,d,e,g,l,p,n){var u=this.useCssTransforms;u&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;f=null!=f?f:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var y=e||b? +this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==y)throw Error(mxResources.get("drawingEmpty"));var t=this.view.scale,z=mxUtils.createXmlDocument(),v=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"svg"):z.createElement("svg");null!=a&&(null!=v.style?v.style.backgroundColor=a:v.setAttribute("style","background-color:"+a));null==z.createElementNS?(v.setAttribute("xmlns",mxConstants.NS_SVG),v.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):v.setAttributeNS("http://www.w3.org/2000/xmlns/", +"xmlns:xlink",mxConstants.NS_XLINK);a=c/t;var m=Math.max(1,Math.ceil(y.width*a)+2*f)+(n?5:0),k=Math.max(1,Math.ceil(y.height*a)+2*f)+(n?5:0);v.setAttribute("version","1.1");v.setAttribute("width",m+"px");v.setAttribute("height",k+"px");v.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+m+" "+k);z.appendChild(v);var K=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"g"):z.createElement("g");v.appendChild(K);var L=this.createSvgCanvas(K);L.foOffset=d?-.5:0;L.textOffset=d?-.5:0;L.imageOffset= +d?-.5:0;L.translate(Math.floor((f/c-y.x)/t),Math.floor((f/c-y.y)/t));var q=document.createElement("div"),x=L.getAlternateText;L.getAlternateText=function(a,c,f,b,d,e,g,l,p,n,u,y,t){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(q.innerHTML=e,e=mxUtils.extractTextWithWhitespace(q.childNodes));for(var z=Math.ceil(2*b/this.state.fontSize),da=[],Ja=0,v=0;(0==z||Ja<z)&&v<e.length;){var Ka=e.charCodeAt(v);if(10==Ka||13==Ka){if(0<Ja)break}else da.push(e.charAt(v)),255>Ka&&Ja++;v++}da.length< +e.length&&1<e.length-da.length&&(e=mxUtils.trim(da.join(""))+"...");return e}catch(Ua){return x.apply(this,arguments)}else return x.apply(this,arguments)};var O=this.backgroundImage;if(null!=O){c=t/c;var I=this.view.translate,A=new mxRectangle(I.x*c,I.y*c,O.width*c,O.height*c);mxUtils.intersects(y,A)&&L.image(I.x,I.y,O.width,O.height,O.src,!0)}L.scale(a);L.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var B=l.drawCellState,Y=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var f= +Y.apply(this,arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};l.drawCellState=function(a,c){for(var f=a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&B.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),L);this.updateSvgLinks(v,p,!0);this.addForeignObjectWarning(L,v);return v}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning= function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var f=a.createElement("switch"),b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href", Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);f.appendChild(b);d.appendChild(e);f.appendChild(d);c.appendChild(f)}};Graph.prototype.updateSvgLinks=function(a,c,f){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++){var d=a[b].getAttribute("href"); null==d&&(d=a[b].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[b].setAttribute("target",c):f&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement()); return a};Graph.prototype.getParentByName=function(a,c,f){for(;null!=a&&a.nodeName!=c;){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,f){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var f=document.createRange();f.selectNode(a);c.removeAllRanges();c.addRange(f)}}else(c=document.selection)&& -"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),f=c.createRange(),f.setEndPoint("StartToStart",a),f.select())};Graph.prototype.insertTableColumn=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=e.getIndex(a);else this.isTableRow(a)&&(b=f.getParent(a)),c||(d=f.getChildCount(f.getChildAt(b,0))-1);for(var g=0;g<f.getChildCount(b);g++){var e=f.getChildAt(b,g),m=f.getChildAt(e,d),p=f.cloneCell(m),n=this.getCellGeometry(p); +"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),f=c.createRange(),f.setEndPoint("StartToStart",a),f.select())};Graph.prototype.insertTableColumn=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=e.getIndex(a);else this.isTableRow(a)&&(b=f.getParent(a)),c||(d=f.getChildCount(f.getChildAt(b,0))-1);for(var g=0;g<f.getChildCount(b);g++){var e=f.getChildAt(b,g),l=f.getChildAt(e,d),p=f.cloneCell(l),n=this.getCellGeometry(p); p.value=null;if(null!=n){n.width=Graph.minTableColumnWidth;var u=this.getCellGeometry(e);null!=u&&(n.height=u.height)}f.add(e,p,d+(c?0:1))}var y=this.getCellGeometry(b);null!=y&&(y=y.clone(),y.width+=Graph.minTableColumnWidth,f.setGeometry(b,y))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=b.getIndex(e);else this.isTableRow(a)?(b=f.getParent(a),d=b.getIndex(a)): -c||(d=f.getChildCount(b)-1);e=f.cloneCell(f.getChildAt(b,d));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var m=0;m<f.getChildCount(e);m++){a=f.getChildAt(e,m);a.value=null;var p=this.getCellGeometry(a);null!=p&&(p.height=g.height)}f.add(b,e,d+(c?0:1));var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.height+=g.height,f.setGeometry(b,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var f= -a,b=0;if(this.isTableCell(a))var d=c.getParent(a),f=c.getParent(d),b=d.getIndex(a);else this.isTableRow(a)?(f=c.getParent(a),b=c.getChildCount(a)-1):this.isTable(a)&&(b=c.getChildCount(c.getChildAt(a,0))-1);for(var e=a=0;e<c.getChildCount(f);e++){var d=c.getChildAt(f,e),g=c.getChildAt(d,b);c.remove(g);var m=this.getCellGeometry(g);null!=m&&(a=Math.max(a,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=a,c.setGeometry(f,p))}finally{c.endUpdate()}};Graph.prototype.deleteTableRow= +c||(d=f.getChildCount(b)-1);e=f.cloneCell(f.getChildAt(b,d));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<f.getChildCount(e);l++){a=f.getChildAt(e,l);a.value=null;var p=this.getCellGeometry(a);null!=p&&(p.height=g.height)}f.add(b,e,d+(c?0:1));var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.height+=g.height,f.setGeometry(b,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var f= +a,b=0;if(this.isTableCell(a))var d=c.getParent(a),f=c.getParent(d),b=d.getIndex(a);else this.isTableRow(a)?(f=c.getParent(a),b=c.getChildCount(a)-1):this.isTable(a)&&(b=c.getChildCount(c.getChildAt(a,0))-1);for(var e=a=0;e<c.getChildCount(f);e++){var d=c.getChildAt(f,e),g=c.getChildAt(d,b);c.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=a,c.setGeometry(f,p))}finally{c.endUpdate()}};Graph.prototype.deleteTableRow= function(a){var c=this.getModel();c.beginUpdate();try{var f=a;this.isTableCell(a)?f=c.getParent(a):this.isTable(a)&&(f=c.getChildAt(a,c.getChildCount(a)-1));var b=c.getParent(f);c.remove(f);a=0;var d=this.getCellGeometry(f);null!=d&&(a=d.height);var e=this.getCellGeometry(b);null!=e&&(e=e.clone(),e.height-=a,c.setGeometry(b,e))}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var f=a.tBodies[0],b=f.rows[0].cells,d=0,e=0;e<b.length;e++)var g=b[e].getAttribute("colspan"),d=d+(null!= g?parseInt(g):1);f=f.insertRow(c);for(e=0;e<d;e++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var f=a.tHead;if(null!=f)for(var b=0;b<f.rows.length;b++){var d=document.createElement("th");f.rows[b].appendChild(d);mxUtils.br(d)}f=a.tBodies[0];for(b=0;b<f.rows.length;b++)d=f.rows[b].insertCell(c),mxUtils.br(d);return f.rows[0].cells[0<=c?c:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn= function(a,c){if(0<=c)for(var f=a.tBodies[0].rows,b=0;b<f.length;b++)f[b].cells.length>c&&f[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var f=document.createElement("div");f.innerHTML=a;a=document.createDocumentFragment();for(var b;b=f.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)}; @@ -2492,15 +2490,15 @@ null==c.getState()){var f=this.getCellAt(c.graphX,c.graphY);null!=f&&this.isSwim f=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(f&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){var f=null!=c&&mxEvent.isShiftDown(c);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var b=!0;this.graph.processElements(this.textarea, function(a){f||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):b=!1});b&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],f=0,b=a.rangeCount;f<b;++f)c.push(a.getRangeAt(f));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange(); -return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,f=a.length;c<f;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(ea){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var g=mxConstraintHandler.prototype.update; +return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,f=a.length;c<f;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(ja){}};var f=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));f.apply(this,arguments)};var g=mxConstraintHandler.prototype.update; mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?g.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var f=this.graph.view.getState(a);this.textarea.className=null!= f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var f=this.graph.getModel().getParent(a),b=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(f)&&null!=b&&b.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px": -"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var m=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,f){f.originalNode=a;a=a.firstChild;for(var b=f.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return f}function f(a,c){if(null!=a)if(c.originalNode!=a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?b(a):(f(a,c),c=c.nextSibling);a=d}}function b(a){for(var c= -a.firstChild;null!=c;){var f=c.nextSibling;b(c);c=f}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}m.apply(this,arguments); +"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var l=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,f){f.originalNode=a;a=a.firstChild;for(var b=f.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return f}function f(a,c){if(null!=a)if(c.originalNode!=a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?b(a):(f(a,c),c=c.nextSibling);a=d}}function b(a){for(var c= +a.firstChild;null!=c;){var f=c.nextSibling;b(c);c=f}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}l.apply(this,arguments); mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,b):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a= this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){p=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<p.length&&"\n"==p.charAt(p.length-1)&&(p=p.substring(0,p.length-1));p=this.graph.sanitizeHtml(c?p.replace(/\n/g,"<br/>"):p,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style, -mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,m=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&m.push("underline");(mxUtils.getValue(a.style, -mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&m.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=m.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign= +mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style, +mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign= d;this.textarea.style.padding="0px";this.textarea.innerHTML!=p&&(this.textarea.innerHTML=p,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var p=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(p=mxUtils.replaceTrailingNewlines(p, "<div><br></div>"));p=this.graph.sanitizeHtml(c?p.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):p,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily= mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=p&&(this.textarea.innerHTML=p);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var n=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&& @@ -2508,202 +2506,201 @@ null!=a){var f=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this. Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth- this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=f:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",n.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue= function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML, -!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var v=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();v.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(M){}};var t=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, +!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var v=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();v.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Y){}};var t=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, c){this.graph.getModel().beginUpdate();try{t.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, -mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var u=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,f,b,d,e){mxEvent.isAltDown(e)&&(d=null);u.apply(this,arguments)};mxGraphView.prototype.formatUnitText= -function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/d-f.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.pBounds.x+this.currentDx+ -Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){f.get(a)||(f.put(a,!0),d.push(a))}for(var c=F.apply(this,arguments),f= -new mxDictionary,b=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(b.getParent(b.getParent(g))):this.graph.isTableRow(g)&&a(b.getParent(g));a(g)}return d};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=B.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c= -C.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var A=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:A.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition= -function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style, -"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var x=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return x.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? -this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var E=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return E.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var G=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||G.apply(this,arguments)&& -(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var D=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=D.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var J=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=J.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c= -this.graph,f=c.model,b=c.getActualStartSize(this.state.cell),d=f.getChildAt(this.state.cell,0),e=this.state;null==a&&(a=[]);for(var g=0;g<f.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(b){if(null!=b&&f.isVertex(b.cell)){var d=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);b=new mxHandle(b,"row-resize",null,d);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);b.redraw=function(){null!=this.shape&&null!= -this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+e,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};b.setPosition=function(a,c,f){e=c.y-a.y-a.height};b.execute=function(){c.updateTableRowHeight(this.state.cell,e);e=0};a.push(b)}})(this.graph.view.getState(f.getChildAt(this.state.cell,g)));for(g=0;g<f.getChildCount(d)-1;g++)mxUtils.bind(this,function(c){if(null!=c){var f=new mxLine(new mxRectangle, -mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);c=new mxHandle(c,"col-resize",null,f);c.tableHandle=!0;var d=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+d,this.shape.bounds.width=1,this.shape.bounds.y=e.y+b.y,this.shape.bounds.height=e.height-b.y-b.height,this.shape.redraw())};c.setPosition=function(a,c,f){d=c.x-a.x-a.width};c.execute=function(){this.graph.updateTableColumnWidth(this.state.cell, -d);d=0};a.push(c)}})(this.graph.view.getState(f.getChildAt(d,g)))}return a};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){I.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.visibility=a?"":"hidden")};mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())}; -mxVertexHandler.prototype.isTableHandler=function(){return this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTable(this.state.cell)};var y=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell; -if(!f&&null!=this.customHandles)for(var b=0;b<this.customHandles.length;b++)if(null!=this.customHandles[b].shape&&null!=this.customHandles[b].shape.bounds){var d=this.customHandles[b].shape.bounds,e=d.getCenterX(),g=d.getCenterY();if(Math.abs(this.state.x-e)<d.width/2||Math.abs(this.state.y-g)<d.height/2||Math.abs(this.state.x+this.state.width-e)<d.width/2||Math.abs(this.state.y+this.state.height-g)<d.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x= -this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=y.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/ -c),f)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display= -"")};var K=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){K.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var z=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){z.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint= -function(c,f){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(f.x/e-d.x),d=this.roundLength(f.y/e-d.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(d,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML= -"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ -HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): -new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+ -'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5, -5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle; -mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop= -HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src= -HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled= -!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH|| -0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)|| -mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var L=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){L.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null== -a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled= -!1,c.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,e=(this.currentX-b)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(c.getEvent())&& -this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),m=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(m)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(m=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),f=0;f<m.length;f++)if(this.graph.isCellMovable(m[f])){var p=this.graph.view.getState(m[f]),n=this.graph.getCellGeometry(m[f]);null!=p&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(m[f], -n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);f.x-=b.x;f.y-=b.y;var b=c.getX()+f.x,f=c.getY()+f.y,d=this.first.x-b,e=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null== -this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,f),this.isSpaceEvent(c)?(b=this.x+this.width,f=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=b-this.width),this.y<this.first.y&&(this.y=f-this.height)), -this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+ -"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!= -this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var H=(new Date).getTime(),S=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,f,b){ca.apply(this,arguments);f!=this.currentTerminalState?(H=(new Date).getTime(),S=0):S=(new Date).getTime()-H;this.currentTerminalState=f};var aa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!= -this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<S||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&aa.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var f=null!=a&&0==a,b=this.state.getVisibleTerminalState(f),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor== -mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,f):null,f=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),d):null)?this.fixedHandleImage:null!=d&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; -var da=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,f){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return da.apply(this,arguments)};var ga=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),f=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(f)&& -null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return ga.apply(this,arguments)};var T=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=T.apply(this,arguments),c=[],f=0;f<a.length;f++)"1"!=mxUtils.getValue(a[f].style,"part","0")&&c.push(a[f]);return c};var X=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds= -function(a){var c=this.graph.getModel(),f=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(f)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):X.apply(this,arguments)};var Y=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var f=this.graph.getModel(),b=f.getParent(this.state.cell), -d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!f.isEdge(b)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Y.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&& -c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var ha=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){ha.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"), -null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var V=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){V.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var U=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init= -function(){U.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor= -"pointer",this.rowMoveHandle.style.width="24px",this.rowMoveHandle.style.height="24px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var c=mxUtils.bind(this,function(){null!= -this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler= -mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var f=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);this.updateLinkHint(f,b);if(null!=f||null!=b&&0<b.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,f){try{if(null==c&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), +mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,c){return mxGraphHandlerIsValidDropTarget.apply(this, +arguments)&&!mxEvent.isAltDown(c.getEvent)&&(1<this.cells.length||!this.graph.isTableRow(this.cells[0])||this.graph.isTable(a))};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/ +d-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/d-f.y);d=this.graph.view.unit;this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var u=mxSelectionCellsHandler.prototype.getHandledSelectionCells; +mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){f.get(a)||(f.put(a,!0),d.push(a))}for(var c=u.apply(this,arguments),f=new mxDictionary,b=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(b.getParent(b.getParent(g))):this.graph.isTableRow(g)&&a(b.getParent(g));a(g)}return d};var A=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=A.apply(this,arguments);c.stroke= +"#C0C0C0";c.strokewidth=1;return c};var B=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=B.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing- +a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())}; +var D=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return D.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var C=mxVertexHandler.prototype.isParentHighlightVisible; +mxVertexHandler.prototype.isParentHighlightVisible=function(){return C.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var x=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||x.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var F=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds= +function(){var a=F.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-2):this.graph.isTableCell(this.state.cell)&&a.grow(-3);return a};var G=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=G.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,f=c.model,b=c.getActualStartSize(this.state.cell),d=f.getChildAt(this.state.cell,0),e=this.state;null==a&&(a=[]);for(var g=0;g<f.getChildCount(this.state.cell)- +1;g++)mxUtils.bind(this,function(b){if(null!=b&&f.isVertex(b.cell)){var d=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);b=new mxHandle(b,"row-resize",null,d);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+e*this.graph.view.scale,this.shape.bounds.height= +1,this.shape.redraw())};b.setPosition=function(a,c,f){e=c.y-a.y-a.height};b.execute=function(){c.updateTableRowHeight(this.state.cell,e);e=0};a.push(b)}})(this.graph.view.getState(f.getChildAt(this.state.cell,g)));for(g=0;g<f.getChildCount(d)-1;g++)mxUtils.bind(this,function(c){if(null!=c){var f=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);c=new mxHandle(c,"col-resize",null,f);c.tableHandle=!0;var d=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild); +c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+d*this.graph.view.scale,this.shape.bounds.width=1,this.shape.bounds.y=e.y+b.y*this.graph.view.scale,this.shape.bounds.height=e.height-(b.height+b.y)*this.graph.view.scale,this.shape.redraw())};c.setPosition=function(a,c,f){d=c.x-a.x-a.width};c.execute=function(){this.graph.updateTableColumnWidth(this.state.cell,d);d=0};a.push(c)}})(this.graph.view.getState(f.getChildAt(d,g)))}return null!= +a?a.reverse():null};var E=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){E.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())};var J=mxVertexHandler.prototype.getHandlePadding; +mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var b=0;b<this.customHandles.length;b++)if(null!=this.customHandles[b].shape&&null!=this.customHandles[b].shape.bounds){var d=this.customHandles[b].shape.bounds,e=d.getCenterX(),g= +d.getCenterY();if(Math.abs(this.state.x-e)<d.width/2||Math.abs(this.state.y-g)<d.height/2||Math.abs(this.state.x+this.state.width-e)<d.width/2||Math.abs(this.state.y+this.state.height-g)<d.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=J.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint= +a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width- +this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var H=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){H.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&& +"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var y=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){y.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(f.x/e-d.x),d=this.roundLength(f.y/ +e-d.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(d,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top= +Math.max(c.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'): +new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'): +new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>', +24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage= +HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft, +Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src, +(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop= +!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent= +function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger= +function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var K=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){K.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c= +a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&& +(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=!1,c.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,e=(this.currentX-b)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)< +this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),f=0;f<l.length;f++)if(this.graph.isCellMovable(l[f])){var p= +this.graph.view.getState(l[f]),n=this.graph.getCellGeometry(l[f]);null!=p&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(l[f],n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);f.x-=b.x;f.y-=b.y; +var b=c.getX()+f.x,f=c.getY()+f.y,d=this.first.x-b,e=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,f),this.isSpaceEvent(c)?(b=this.x+this.width,f=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width= +0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=b-this.width),this.y<this.first.y&&(this.y=f-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv= +this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), +this.secondDiv=null)),c.consume()}};var z=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);z.apply(this,arguments)};var L=(new Date).getTime(),O=0,I=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,f,b){I.apply(this,arguments);f!=this.currentTerminalState?(L=(new Date).getTime(),O=0):O=(new Date).getTime()-L;this.currentTerminalState= +f};var U=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<O||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&U.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var f=null!= +a&&0==a,b=this.state.getVisibleTerminalState(f),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,f):null,f=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),d):null)?this.fixedHandleImage:null!=d&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE; +this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ea=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,f){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ea.apply(this,arguments)};var ba=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= +function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),f=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(f)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return ba.apply(this,arguments)};var ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ha.apply(this,arguments),c=[],f=0;f<a.length;f++)"1"!= +mxUtils.getValue(a[f].style,"part","0")&&c.push(a[f]);return c};var fa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),f=c.getParent(a.cell),b=this.graph.getCellGeometry(a.cell);return c.isEdge(f)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))): +fa.apply(this,arguments)};var S=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var f=this.graph.getModel(),b=f.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!f.isEdge(b)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&S.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR, +mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var X=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a, +c){X.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Z=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){Z.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()? +"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var ia=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ia.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell)){var c=this.graph.model;this.moveHandles=[];for(var f=0;f<c.getChildCount(this.state.cell);f++)mxUtils.bind(this,function(a){if(null!=a&&c.isVertex(a.cell)){var f= +mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="move";f.style.width="7px";f.style.height="4px";f.rowState=a;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(c){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(c),mxEvent.getClientY(c),[a.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(c);this.graph.isMouseDown=!0;mxEvent.consume(c)}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(c.getChildAt(this.state.cell, +f)))}var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE, +this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var f=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(f,d);if(null!=f||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,f){try{if(null==c&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), this.linkHint=null);else if(null!=c||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title", mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=f)for(b=0;b<f.length;b++){var e=document.createElement("div");e.style.marginTop=null!=c||0<b?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[b].getAttribute("href"),mxUtils.getTextContent(f[b]))); -this.linkHint.appendChild(e)}}}catch(pa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Q=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Q.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display= +this.linkHint.appendChild(e)}}}catch(ga){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var V=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){V.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display= this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state); -if(null!=c||null!=f&&0<f.length)this.updateLinkHint(c,f),this.redrawHandles()};var N=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){N.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=this.rowState.x+this.rowState.width+ -"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ba.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+ -22),f=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==f&&(f=this.state);f=f.y+f.height;null!=c&&(f=Math.max(f,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(f+this.verticalOffset/2+Editor.hintOffset)+"px"}}; -var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null); -null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Z=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Z.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/ -2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var fa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){fa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), -this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function v(){mxActor.call(this)}function t(a,c){this.canvas= +if(null!=c||null!=f&&0<f.length)this.updateLinkHint(c,f),this.redrawHandles()};var T=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){T.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+ +this.moveHandles[a].rowState.width+10+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+3*this.moveHandles[a].rowState.height/4+"px";null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Q.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x, +this.state.y-22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==f&&(f=this.state);f=f.y+f.height;null!=c&&(f=Math.max(f,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(f+ +this.verticalOffset/2+Editor.hintOffset)+"px"}};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler), +this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ca=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ca.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width- +this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var P=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), +this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function q(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function l(){mxActor.call(this)}function n(){mxActor.call(this)}function v(){mxActor.call(this)}function t(a,c){this.canvas= a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function B(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function D(){mxShape.call(this)}function J(){mxShape.call(this)} -function I(){mxEllipse.call(this)}function y(){mxShape.call(this)}function K(){mxShape.call(this)}function z(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function P(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function ca(){mxShape.call(this)}function aa(){mxCylinder.call(this)}function da(){mxCylinder.call(this)}function ga(){mxRectangleShape.call(this)}function T(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function Y(){mxArrowConnector.call(this); -this.spacing=0}function ha(){mxArrowConnector.call(this);this.spacing=0}function V(){mxActor.call(this)}function U(){mxRectangleShape.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function ba(){mxActor.call(this)}function O(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxActor.call(this)}function ya(){mxActor.call(this)}function M(){mxActor.call(this)}function ja(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)} -function na(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ka(){mxRhombus.call(this)}function qa(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Da(a,c,f,b,d,e,g,m,p,n){g+=p;var ia=b.clone();b.x-=d*(2*g+p);b.y-=e*(2*g+p);d*=g+p;e*=g+p;return function(){a.ellipse(ia.x- -d-g,ia.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ia=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); -a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-e,0),a.lineTo(b,e),a.lineTo(e,e),a.close(),a.fill()),0!=ia&&(a.setFillAlpha(Math.abs(ia)),a.setFillColor(0>ia?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d- +this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function B(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function E(){mxShape.call(this)}function J(){mxShape.call(this)} +function H(){mxEllipse.call(this)}function y(){mxShape.call(this)}function K(){mxShape.call(this)}function z(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function O(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxShape.call(this)}function ea(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function ha(){mxCylinder.call(this)}function fa(){mxRectangleShape.call(this)}function S(){mxDoubleEllipse.call(this)}function X(){mxDoubleEllipse.call(this)}function Z(){mxArrowConnector.call(this); +this.spacing=0}function ia(){mxArrowConnector.call(this);this.spacing=0}function V(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function Q(){mxActor.call(this)}function M(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function za(){mxActor.call(this)}function N(){mxActor.call(this)}function ja(){mxActor.call(this)}function W(){mxActor.call(this)}function ga(){mxEllipse.call(this)} +function ma(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ka(){mxRhombus.call(this)}function pa(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function qa(){mxActor.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Da(a,c,f,b,d,e,g,l,p,n){g+=p;var da=b.clone();b.x-=d*(2*g+p);b.y-=e*(2*g+p);d*=g+p;e*=g+p;return function(){a.ellipse(da.x- +d-g,da.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); +a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-e,0),a.lineTo(b,e),a.lineTo(e,e),a.close(),a.fill()),0!=da&&(a.setFillAlpha(Math.abs(da)),a.setFillColor(0>da?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d- e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(b,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var wa=Math.tan(mxUtils.toRadians(30)),la=(.5-wa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,f,b,d){c= Math.min(b,d/wa);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.min(b,d/(.5+wa));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5* c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c), a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0, Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.close(), -a.fill()),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b/2,.5*d,b,0);a.quadTo(.5*b,d/2,b,d);a.quadTo(b/2,.5*d,0,d);a.quadTo(.5*b,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",l);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.redrawPath=function(a,c,f,b, +a.fill()),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b/2,.5*d,b,0);a.quadTo(.5*b,d/2,b,d);a.quadTo(b/2,.5*d,0,d);a.quadTo(.5*b,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.redrawPath=function(a,c,f,b, d,e){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,f),a.lineTo(c,f)):(a.moveTo(b-c,f),a.lineTo(b,f)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f)):(a.moveTo(0,f),a.lineTo(b-c,f),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,d),a.lineTo(0,d),a.lineTo(0, f),a.close());a.end()};mxCellRenderer.registerShape("folder",q);mxUtils.extend(c,mxActor);c.prototype.size=30;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,f,!0); a.end()};mxCellRenderer.registerShape("card",c);mxUtils.extend(f,mxActor);f.prototype.size=.4;f.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*b/4,c*(1-1.4),b,c/2);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};f.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl", !1)){var c=mxUtils.getValue(this.style,"size",this.size),f=a.width,b=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=b,new mxRectangle(a.x,a.y+c,f,b-2*c);c*=f;return new mxRectangle(a.x+c,a.y,f-2*c,b)}return a};mxCellRenderer.registerShape("tape",f);mxUtils.extend(g,mxActor);g.prototype.size=.3;g.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, -"size",this.size))*a.height):null};g.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",g);var za=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,f,b){var d=mxUtils.getValue(this.style,"size");return null!= -d?b*Math.max(0,Math.min(1,d)):za.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size)))); -f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b-c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("parallelogram",p);mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",m);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,f,b,d){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, +"size",this.size))*a.height):null};g.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",g);var ya=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,f,b){var d=mxUtils.getValue(this.style,"size");return null!= +d?b*Math.max(0,Math.min(1,d)):ya.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size)))); +f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b-c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("parallelogram",p);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,f,b,d){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, [new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(b,d)],this.isRounded,f,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",n);mxUtils.extend(v,mxActor);v.prototype.redrawPath=function(a,c,f,b,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",v);t.prototype.moveTo= function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};t.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};t.prototype.quadTo=function(a,c,f,b){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=b};t.prototype.curveTo=function(a,c,f,b,d,e){this.originalCurveTo.apply(this.canvas, -arguments);this.lastX=d;this.lastY=e};t.prototype.arcTo=function(a,c,f,b,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};t.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var f=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(b*b+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),ia=this.defaultVariation; -5>g&&(g=5,ia/=3);for(var m=f(a-this.lastX)*b/g,f=f(c-this.lastY)*d/g,b=b/e,d=d/e,e=0;e<g;e++){var p=(Math.random()-.5)*ia;this.originalLineTo.call(this.canvas,m*e+this.lastX-p*d,f*e+this.lastY-p*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo; -this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ia=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new t(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ia.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ja=mxRectangleShape.prototype.isHtmlAllowed; -mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ja.apply(this,arguments)};var Sa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,f,b,d){if(null==a.handJiggle)Sa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!= +arguments);this.lastX=d;this.lastY=e};t.prototype.arcTo=function(a,c,f,b,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};t.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var f=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(b*b+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),da=this.defaultVariation; +5>g&&(g=5,da/=3);for(var l=f(a-this.lastX)*b/g,f=f(c-this.lastY)*d/g,b=b/e,d=d/e,e=0;e<g;e++){var p=(Math.random()-.5)*da;this.originalLineTo.call(this.canvas,l*e+this.lastX-p*d,f*e+this.lastY-p*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo; +this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var La=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new t(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));La.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ma=mxRectangleShape.prototype.isHtmlAllowed; +mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ma.apply(this,arguments)};var Sa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,f,b,d){if(null==a.handJiggle)Sa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!= mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(b/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(b*e,d*e)),a.moveTo(c+e,f),a.lineTo(c+b-e,f),a.quadTo(c+b,f,c+b,f+e),a.lineTo(c+b,f+d-e),a.quadTo(c+ b,f+d,c+b-e,f+d),a.lineTo(c+e,f+d),a.quadTo(c,f+d,c,f+d-e),a.lineTo(c,f+e),a.quadTo(c,f,c+e,f)):(a.moveTo(c,f),a.lineTo(c+b,f),a.lineTo(c+b,f+d),a.lineTo(c,f+d),a.lineTo(c,f)),a.close(),a.end(),a.fillAndStroke()}};var Ta=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,f,b,d){null==a.handJiggle&&Ta.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds= function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,f=a.height;a=new mxRectangle(a.x,a.y,c,f);var b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*d,f*d));a.x+= Math.round(b);a.width-=Math.round(2*b)}return a};u.prototype.paintForeground=function(a,c,f,b,d){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,f);a.lineTo(c+e,f+d);a.moveTo(c+b-e,f);a.lineTo(c+b-e,f+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("process",u);mxUtils.extend(F,mxRectangleShape);F.prototype.paintBackground=function(a,c,f,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,f,b,d);a.fill()};F.prototype.paintForeground=function(a,c,f,b,d){};mxCellRenderer.registerShape("transparent",F);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, -"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,f,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ia=Math.max(0,Math.min(b, -parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-f),new mxPoint(Math.min(b,e+ia),d-f),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-f),new mxPoint(0,d-f)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",B);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize", -"0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(A,mxHexagon);A.prototype.size= -.25;A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",A);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed= -function(){return!1};x.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1== -this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};E.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1); -var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var m=this.style["symbol"+e+"Align"],ia=this.style["symbol"+e+"VerticalAlign"],p=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,y=this.style["symbol"+e+"VSpacing"]||u,t=this.style["symbol"+e+"ArcSpacing"];null!=t&&(t*=this.getArcSize(b+this.strokewidth,d+this.strokewidth),u+=t,y+=t);var t=c,z=f,t=m==mxConstants.ALIGN_CENTER?t+(b-p)/2:m==mxConstants.ALIGN_RIGHT?t+ -(b-p-u):t+u,z=ia==mxConstants.ALIGN_MIDDLE?z+(d-n)/2:ia==mxConstants.ALIGN_BOTTOM?z+(d-n-y):z+y;a.save();m=new g;m.style=this.style;g.prototype.paintVertexShape.call(m,a,t,z,p,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,f,b,d,e){e?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d), -a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/ -6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", -I);mxUtils.extend(y,mxShape);y.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",y);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};K.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0, +arguments)};mxCellRenderer.registerShape("process",u);mxUtils.extend(A,mxRectangleShape);A.prototype.paintBackground=function(a,c,f,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,f,b,d);a.fill()};A.prototype.paintForeground=function(a,c,f,b,d){};mxCellRenderer.registerShape("transparent",A);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, +"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,f,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),da=Math.max(0,Math.min(b, +parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-f),new mxPoint(Math.min(b,e+da),d-f),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-f),new mxPoint(0,d-f)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",B);mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize", +"0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("step",D);mxUtils.extend(C,mxHexagon);C.prototype.size= +.25;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",C);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed= +function(){return!1};x.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Pa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| +0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Pa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Pa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(1== +this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};F.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1); +var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],da=this.style["symbol"+e+"VerticalAlign"],p=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,y=this.style["symbol"+e+"VSpacing"]||u,t=this.style["symbol"+e+"ArcSpacing"];null!=t&&(t*=this.getArcSize(b+this.strokewidth,d+this.strokewidth),u+=t,y+=t);var t=c,z=f,t=l==mxConstants.ALIGN_CENTER?t+(b-p)/2:l==mxConstants.ALIGN_RIGHT?t+ +(b-p-u):t+u,z=da==mxConstants.ALIGN_MIDDLE?z+(d-n)/2:da==mxConstants.ALIGN_BOTTOM?z+(d-n-y):z+y;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,t,z,p,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",F);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,f,b,d,e){e?(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d), +a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/ +6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(H,mxEllipse);H.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", +H);mxUtils.extend(y,mxShape);y.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",y);mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};K.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0, d/8,b,7*d/8);a.fillAndStroke()};K.prototype.paintForeground=function(a,c,f,b,d){a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",K);mxUtils.extend(z,mxRectangleShape);z.prototype.size=40;z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};z.prototype.paintBackground= function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,f,b,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=z&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,f,b,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+b/2,f+e),a.lineTo(c+b/2,f+d),a.end(),a.stroke())};z.prototype.paintForeground= function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,f,b,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",z);mxUtils.extend(L,mxShape);L.prototype.width=60;L.prototype.height=30;L.prototype.corner=10;L.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, -"height",this.height)*this.scale))};L.prototype.paintBackground=function(a,c,f,b,d){var e=this.corner,g=Math.min(b,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),m=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);p!=mxConstants.NONE&&(a.setFillColor(p),a.rect(c,f,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= -mxConstants.NONE?(this.getGradientBounds(a,c,f,b,d),a.setGradient(this.fill,this.gradient,c,f,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,f);a.lineTo(c+g,f);a.lineTo(c+g,f+Math.max(0,m-1.5*e));a.lineTo(c+Math.max(0,g-e),f+m);a.lineTo(c,f+m);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+b,f);a.lineTo(c+b,f+d);a.lineTo(c,f+d);a.lineTo(c,f+m);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,c,f,b){b=z.prototype.size; +"height",this.height)*this.scale))};L.prototype.paintBackground=function(a,c,f,b,d){var e=this.corner,g=Math.min(b,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);p!=mxConstants.NONE&&(a.setFillColor(p),a.rect(c,f,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= +mxConstants.NONE?(this.getGradientBounds(a,c,f,b,d),a.setGradient(this.fill,this.gradient,c,f,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,f);a.lineTo(c+g,f);a.lineTo(c+g,f+Math.max(0,l-1.5*e));a.lineTo(c+Math.max(0,g-e),f+l);a.lineTo(c,f+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+b,f);a.lineTo(c+b,f+d);a.lineTo(c,f+d);a.lineTo(c,f+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",L);mxPerimeter.LifelinePerimeter=function(a,c,f,b){b=z.prototype.size; null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;f.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+b,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,f,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter); mxPerimeter.BackbonePerimeter=function(a,c,f,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return f.x<a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,f.y)));f.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,f.x)), a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,f,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",B.prototype.size))*c.view.scale))),c.style),c,f,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,f,b){var d=p.prototype.size; -null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+m,g+d),new mxPoint(e+m,g+n),new mxPoint(e,g+n-d),new mxPoint(e,g)]):(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+m,g),new mxPoint(e+m-d,g+n),new mxPoint(e, -g+n),new mxPoint(e+d,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+m?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,f,b){var d=m.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,p=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; +null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,l=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+l,g+d),new mxPoint(e+l,g+n),new mxPoint(e,g+n-d),new mxPoint(e,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+l,g),new mxPoint(e+l-d,g+n),new mxPoint(e, +g+n),new mxPoint(e+d,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+l?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,f,b){var d=l.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,p=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; c==mxConstants.DIRECTION_EAST?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+p-d,g),new mxPoint(e+p,g+n),new mxPoint(e,g+n),new mxPoint(e+d,g)]):c==mxConstants.DIRECTION_WEST?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+p,g),new mxPoint(e+p-d,g+n),new mxPoint(e+d,g+n),new mxPoint(e,g)]):c==mxConstants.DIRECTION_NORTH?(d=n*Math.max(0,Math.min(1,d)),g=[new mxPoint(e,g+d),new mxPoint(e+p,g),new mxPoint(e+p,g+n),new mxPoint(e,g+n-d),new mxPoint(e,g+d)]):(d=n*Math.max(0, -Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+p,g+d),new mxPoint(e+p,g+n-d),new mxPoint(e,g+n),new mxPoint(e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?C.prototype.fixedSize:C.prototype.size;null!=c&&(e=mxUtils.getValue(c.style, -"size",e));var g=a.x,m=a.y,p=a.width,n=a.height,u=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),m=[new mxPoint(g,m),new mxPoint(g+p-d,m),new mxPoint(g+p,a),new mxPoint(g+p-d,m+n),new mxPoint(g,m+n),new mxPoint(g+d,a),new mxPoint(g,m)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0, -Math.min(1,e)),m=[new mxPoint(g+d,m),new mxPoint(g+p,m),new mxPoint(g+p-d,a),new mxPoint(g+p,m+n),new mxPoint(g+d,m+n),new mxPoint(g,a),new mxPoint(g+d,m)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),m=[new mxPoint(g,m+d),new mxPoint(u,m),new mxPoint(g+p,m+d),new mxPoint(g+p,m+n),new mxPoint(u,m+n-d),new mxPoint(g,m+n),new mxPoint(g,m+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),m=[new mxPoint(g,m),new mxPoint(u,m+d),new mxPoint(g+ -p,m),new mxPoint(g+p,m+n-d),new mxPoint(u,m+n),new mxPoint(g,m+n-d),new mxPoint(g,m)]);u=new mxPoint(u,a);b&&(f.x<g||f.x>g+p?u.y=f.y:u.x=f.x);return mxUtils.getPerimeterPoint(m,u,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,f,b){var d=A.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,m=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, -mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(n,g),new mxPoint(e+m,g+d),new mxPoint(e+m,g+p-d),new mxPoint(n,g+p),new mxPoint(e,g+p-d),new mxPoint(e,g+d),new mxPoint(n,g)]):(d=m*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+m-d,g),new mxPoint(e+m,a),new mxPoint(e+m-d,g+p),new mxPoint(e+d,g+p),new mxPoint(e,a),new mxPoint(e+d,g)]);n=new mxPoint(n,a);b&&(f.x<e||f.x>e+ -m?n.y=f.y:n.x=f.x);return mxUtils.getPerimeterPoint(g,n,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,f);a.ellipse((b-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(H,mxShape);H.prototype.size= -10;H.prototype.inset=2;H.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,f);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",H);mxUtils.extend(S,mxShape);S.prototype.paintBackground= -function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",S);mxUtils.extend(ca,mxShape);ca.prototype.inset=2;ca.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,f);a.ellipse(0,e,b-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", -ca);mxUtils.extend(aa,mxCylinder);aa.prototype.jettyWidth=20;aa.prototype.jettyHeight=10;aa.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,m=Math.min(c,d-c),p=Math.min(m+2*c,d-c);e?(a.moveTo(f,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(f,m+c),a.moveTo(f,p),a.lineTo(g,p),a.lineTo(g,p+c),a.lineTo(f,p+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b, -d),a.lineTo(f,d),a.lineTo(f,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(f,p),a.lineTo(f,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(f,m),a.close());a.end()};mxCellRenderer.registerShape("module",aa);mxUtils.extend(da,mxCylinder);da.prototype.jettyWidth=32;da.prototype.jettyHeight=12;da.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,m=.3* -d-c/2,p=.7*d-c/2;e?(a.moveTo(f,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(f,m+c),a.moveTo(f,p),a.lineTo(g,p),a.lineTo(g,p+c),a.lineTo(f,p+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(f,d),a.lineTo(f,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(f,p),a.lineTo(f,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(f,m),a.close());a.end()};mxCellRenderer.registerShape("component",da);mxUtils.extend(ga,mxRectangleShape);ga.prototype.paintForeground=function(a,c,f,b,d){var e=b/2,g=d/2,m=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,f),new mxPoint(c+b,f+g),new mxPoint(c+e,f+d),new mxPoint(c,f+g)],this.isRounded,m,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ga);mxUtils.extend(T,mxDoubleEllipse);T.prototype.outerStroke=!0;T.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+e,f+e,b-2*e,d-2*e), -a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,f,b,d),a.stroke())};mxCellRenderer.registerShape("endState",T);mxUtils.extend(X,T);X.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",X);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=4;Y.prototype.isOpenEnded=function(){return!0};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Y.prototype.isArrowRounded=function(){return this.isRounded}; -mxCellRenderer.registerShape("link",Y);mxUtils.extend(ha,mxArrowConnector);ha.prototype.defaultWidth=10;ha.prototype.defaultArrowWidth=20;ha.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ha.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ha.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ -Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ha);mxUtils.extend(V,mxActor);V.prototype.size=30;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("manualInput", -V);mxUtils.extend(U,mxRectangleShape);U.prototype.dx=20;U.prototype.dy=20;U.prototype.isHtmlAllowed=function(){return!1};U.prototype.paintForeground=function(a,c,f,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));g=Math.max(e,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d, -parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,f+e);a.lineTo(c+b,f+e);a.end();a.stroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+g,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",U);mxUtils.extend(Q,mxActor);Q.prototype.dx=20;Q.prototype.dy=20;Q.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style, -"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(c,f),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",Q);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar", -N);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint((b+ -c)/2,f),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(O,mxActor);O.prototype.arrowWidth=.3;O.prototype.arrowSize=.2;O.prototype.redrawPath=function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(d-e)/2;var e=f+e, -g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",O);mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth))));c=b*Math.max(0, -Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize))));f=(d-e)/2;var e=f+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Z);mxUtils.extend(fa,mxActor);fa.prototype.size= -.1;fa.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",fa);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",ya);mxUtils.extend(M,mxActor);M.prototype.redrawPath= -function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",M);mxUtils.extend(ja,mxActor);ja.prototype.size=20;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b- +Math.min(1,d)),g=[new mxPoint(e,g),new mxPoint(e+p,g+d),new mxPoint(e+p,g+n-d),new mxPoint(e,g+n),new mxPoint(e,g)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);b&&(f.x<e||f.x>e+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(g,a,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?D.prototype.fixedSize:D.prototype.size;null!=c&&(e=mxUtils.getValue(c.style, +"size",e));var g=a.x,l=a.y,p=a.width,n=a.height,u=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p-d,l),new mxPoint(g+p,a),new mxPoint(g+p-d,l+n),new mxPoint(g,l+n),new mxPoint(g+d,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0, +Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+p,l),new mxPoint(g+p-d,a),new mxPoint(g+p,l+n),new mxPoint(g+d,l+n),new mxPoint(g,a),new mxPoint(g+d,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(u,l),new mxPoint(g+p,l+d),new mxPoint(g+p,l+n),new mxPoint(u,l+n-d),new mxPoint(g,l+n),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(u,l+d),new mxPoint(g+ +p,l),new mxPoint(g+p,l+n-d),new mxPoint(u,l+n),new mxPoint(g,l+n-d),new mxPoint(g,l)]);u=new mxPoint(u,a);b&&(f.x<g||f.x>g+p?u.y=f.y:u.x=f.x);return mxUtils.getPerimeterPoint(l,u,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,f,b){var d=C.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,l=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, +mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(n,g),new mxPoint(e+l,g+d),new mxPoint(e+l,g+p-d),new mxPoint(n,g+p),new mxPoint(e,g+p-d),new mxPoint(e,g+d),new mxPoint(n,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+l-d,g),new mxPoint(e+l,a),new mxPoint(e+l-d,g+p),new mxPoint(e+d,g+p),new mxPoint(e,a),new mxPoint(e+d,g)]);n=new mxPoint(n,a);b&&(f.x<e||f.x>e+ +l?n.y=f.y:n.x=f.x);return mxUtils.getPerimeterPoint(g,n,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,f);a.ellipse((b-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(I,mxShape);I.prototype.size= +10;I.prototype.inset=2;I.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,f);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",I);mxUtils.extend(U,mxShape);U.prototype.paintBackground= +function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",U);mxUtils.extend(ea,mxShape);ea.prototype.inset=2;ea.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,f);a.ellipse(0,e,b-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", +ea);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=20;ba.prototype.jettyHeight=10;ba.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,l=Math.min(c,d-c),p=Math.min(l+2*c,d-c);e?(a.moveTo(f,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(f,l+c),a.moveTo(f,p),a.lineTo(g,p),a.lineTo(g,p+c),a.lineTo(f,p+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b, +d),a.lineTo(f,d),a.lineTo(f,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(f,p),a.lineTo(f,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(f,l),a.close());a.end()};mxCellRenderer.registerShape("module",ba);mxUtils.extend(ha,mxCylinder);ha.prototype.jettyWidth=32;ha.prototype.jettyHeight=12;ha.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,l=.3* +d-c/2,p=.7*d-c/2;e?(a.moveTo(f,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(f,l+c),a.moveTo(f,p),a.lineTo(g,p),a.lineTo(g,p+c),a.lineTo(f,p+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(f,d),a.lineTo(f,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(f,p),a.lineTo(f,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(f,l),a.close());a.end()};mxCellRenderer.registerShape("component",ha);mxUtils.extend(fa,mxRectangleShape);fa.prototype.paintForeground=function(a,c,f,b,d){var e=b/2,g=d/2,l=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,f),new mxPoint(c+b,f+g),new mxPoint(c+e,f+d),new mxPoint(c,f+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",fa);mxUtils.extend(S,mxDoubleEllipse);S.prototype.outerStroke=!0;S.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+e,f+e,b-2*e,d-2*e), +a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,f,b,d),a.stroke())};mxCellRenderer.registerShape("endState",S);mxUtils.extend(X,S);X.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",X);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=4;Z.prototype.isOpenEnded=function(){return!0};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Z.prototype.isArrowRounded=function(){return this.isRounded}; +mxCellRenderer.registerShape("link",Z);mxUtils.extend(ia,mxArrowConnector);ia.prototype.defaultWidth=10;ia.prototype.defaultArrowWidth=20;ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ +Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ia);mxUtils.extend(V,mxActor);V.prototype.size=30;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("manualInput", +V);mxUtils.extend(T,mxRectangleShape);T.prototype.dx=20;T.prototype.dy=20;T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(a,c,f,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));g=Math.max(e,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d, +parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,f+e);a.lineTo(c+b,f+e);a.end();a.stroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+g,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",T);mxUtils.extend(Q,mxActor);Q.prototype.dx=20;Q.prototype.dy=20;Q.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style, +"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(c,f),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",Q);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar", +M);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint((b+ +c)/2,f),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(P,mxActor);P.prototype.arrowWidth=.3;P.prototype.arrowSize=.2;P.prototype.redrawPath=function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(d-e)/2;var e=f+e, +g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",P);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",P.prototype.arrowWidth))));c=b*Math.max(0, +Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",P.prototype.arrowSize))));f=(d-e)/2;var e=f+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",aa);mxUtils.extend(Y,mxActor);Y.prototype.size= +.1;Y.prototype.redrawPath=function(a,c,f,b,d){c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Y);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",za);mxUtils.extend(N,mxActor);N.prototype.redrawPath= +function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",N);mxUtils.extend(ja,mxActor);ja.prototype.size=20;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b- c,0),new mxPoint(b,.8*c),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ja);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b, -0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,f+d);a.lineTo(c+b,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this, -arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,f);a.lineTo(c+b/2,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",na);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,f+.145*d);a.lineTo(c+.855*b,f+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,f+.145*d);a.lineTo(c+.145*b, -f+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(a,c,f,b,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,f,b,d){a.begin();a.moveTo(c,f);a.lineTo(c+b,f);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke(); -a.begin();a.moveTo(c,f+d);a.lineTo(c+b,f+d);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",qa);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,c,f,b,d){var e=f+d-5;a.begin();a.moveTo(c,f);a.lineTo(c,f+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+b,e);a.moveTo(c+b,f);a.lineTo(c+b,f+d);a.moveTo(c+b,e);a.lineTo(c+b-10,e-5);a.moveTo(c+b,e);a.lineTo(c+b-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension", +0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ga,mxEllipse);ga.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,f+d);a.lineTo(c+b,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ga);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this, +arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,f);a.lineTo(c+b/2,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ma);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,f+.145*d);a.lineTo(c+.855*b,f+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,f+.145*d);a.lineTo(c+.145*b, +f+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(a,c,f,b,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,f,b,d){a.begin();a.moveTo(c,f);a.lineTo(c+b,f);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke(); +a.begin();a.moveTo(c,f+d);a.lineTo(c+b,f+d);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",pa);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,c,f,b,d){var e=f+d-5;a.begin();a.moveTo(c,f);a.lineTo(c,f+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+b,e);a.moveTo(c+b,f);a.lineTo(c+b,f+d);a.moveTo(c+b,e);a.lineTo(c+b-10,e-5);a.moveTo(c+b,e);a.lineTo(c+b-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension", oa);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,c,f,b,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,f,b,d),a.fill(),a.begin(),a.moveTo(c,f),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,f):a.moveTo(c+b,f),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,f+d):a.moveTo(c+b,f+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,f+ d):a.moveTo(c,f+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,f),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,f),a.lineTo(c+b/2,f+d)):(a.moveTo(c,f+d/2),a.lineTo(c+b,f+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse", -ua);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",ra);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,b);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;f=c+e;var g=(b-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g, -0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,f);a.lineTo(e,f);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("cross",sa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);f=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(f,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(f,d);a.close();a.end()}; -mxCellRenderer.registerShape("display",ta);mxUtils.extend(ma,mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),ma.prototype.origPaintEdgeShape.apply(this, -[a,c,f])))};mxCellRenderer.registerShape("filledEdge",ma);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),f=a.apply(this,arguments);"umlFrame"==c.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(a,c,f,b,d,e,g,m,p,n){var u=d*(g+p+1),y=e*(g+p+1);return function(){a.begin(); -a.moveTo(b.x-u/2-y/2,b.y-y/2+u/2);a.lineTo(b.x+y/2-3*u/2,b.y-3*y/2-u/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,m,p,n){var u=d*(g+p+1),y=e*(g+p+1),t=b.x+u/2,z=b.y+y/2;b.x-=u;b.y-=y;return function(){a.begin();a.moveTo(t-u/2-y/2,z-y/2+u/2);a.lineTo(t-u/2+y/2,z-y/2-u/2);a.lineTo(t+y/2-3*u/2,z-3*y/2-u/2);a.lineTo(t-y/2-3*u/2,z-3*y/2+u/2);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,m,p,n){var u=d*(g+p+1),y=e*(g+p+1);return function(){a.begin(); -a.moveTo(b.x-u/2-y/2,b.y-y/2+u/2);a.lineTo(b.x+y/2-3*u/2,b.y-3*y/2-u/2);a.moveTo(b.x-u/2+y/2,b.y-y/2-u/2);a.lineTo(b.x-y/2-3*u/2,b.y-3*y/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,m,p,n){var u=b.clone(),y=Da.apply(this,arguments),t=d*(g+2*p),z=e*(g+2*p);return function(){y.apply(this,arguments);a.begin();a.moveTo(u.x-d*p,u.y-e*p);a.lineTo(u.x-2*t+d*p,u.y-2*z+e*p);a.moveTo(u.x-t-z+e*p,u.y-z+t-d*p);a.lineTo(u.x+z-t-e*p,u.y-z-t+d*p);a.stroke()}}); -mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,m,p,n){var u=d*(g+p+1),y=e*(g+p+1),t=b.clone();b.x-=u;b.y-=y;return function(){a.begin();a.moveTo(t.x-y,t.y+u);a.quadTo(b.x-y,b.y+u,b.x,b.y);a.quadTo(b.x+y,b.y-u,t.x+y,t.y-u);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,m,p,n){c=d*p*1.118;f=e*p*1.118;d*=g+p;e*=g+p;var u=b.clone();u.x-=c;u.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(u.x,u.y);m?a.lineTo(u.x-d-e/2,u.y-e+d/2):a.lineTo(u.x+e/2-d,u.y-e-d/2); -a.lineTo(u.x-d,u.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,m,p,n,u){e*=m+n;g*=m+n;var y=d.clone();return function(){c.begin();c.moveTo(y.x,y.y);p?c.lineTo(y.x-e-g/a,y.y-g+e/a):c.lineTo(y.x+g/a-e,y.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,f){return Ca(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+ -d*c/4-b*g/2)},function(c,b,d,e,g,m){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,m.x,m.y));a.style.width=Math.round(2*c)/a.view.scale-f})},Ca=function(a,c,f,b,d){return R(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,m=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-m.x,p=d.y-m.y,n=Math.sqrt(e*e+p*p),m=b.call(this,n,e/n,p/n,m,d);return new mxPoint(m.x/g-c.x,m.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,m=g.length-1;c=a.view.translate;var p=a.view.scale,n=f?g[0]: -g[m],g=f?g[1]:g[m-1],m=g.x-n.x,u=g.y-n.y,y=Math.sqrt(m*m+u*u);b.x=(b.x+c.x)*p;b.y=(b.y+c.y)*p;d.call(this,y,m/y,u/y,n,g,b,e)})},xa=function(a){return function(c){return[R(c,["arrowWidth","arrowSize"],function(c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",O.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",O.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-f)*c.height/2)},function(c,f){this.state.style.arrowWidth= -Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-f.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-f.x)/c.width))})]}},Ka=function(a,c,f){return function(b){var d=[R(b,["size"],function(f){var b=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(f.x+b,f.y+b)},function(c,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,f.x-c.x),Math.min(c.height,f.y-c.y)))/a)})];f&&mxUtils.getValue(b.style, +ua);mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",qa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,b);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;f=c+e;var g=(b-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g, +0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,f);a.lineTo(e,f);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("cross",ra);mxUtils.extend(sa,mxActor);sa.prototype.size=.25;sa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);f=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(f,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(f,d);a.close();a.end()}; +mxCellRenderer.registerShape("display",sa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),na.prototype.origPaintEdgeShape.apply(this, +[a,c,f])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),f=a.apply(this,arguments);"umlFrame"==c.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(a,c,f,b,d,e,g,l,p,n){var u=d*(g+p+1),y=e*(g+p+1);return function(){a.begin(); +a.moveTo(b.x-u/2-y/2,b.y-y/2+u/2);a.lineTo(b.x+y/2-3*u/2,b.y-3*y/2-u/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,l,p,n){var u=d*(g+p+1),y=e*(g+p+1),t=b.x+u/2,z=b.y+y/2;b.x-=u;b.y-=y;return function(){a.begin();a.moveTo(t-u/2-y/2,z-y/2+u/2);a.lineTo(t-u/2+y/2,z-y/2-u/2);a.lineTo(t+y/2-3*u/2,z-3*y/2-u/2);a.lineTo(t-y/2-3*u/2,z-3*y/2+u/2);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,l,p,n){var u=d*(g+p+1),y=e*(g+p+1);return function(){a.begin(); +a.moveTo(b.x-u/2-y/2,b.y-y/2+u/2);a.lineTo(b.x+y/2-3*u/2,b.y-3*y/2-u/2);a.moveTo(b.x-u/2+y/2,b.y-y/2-u/2);a.lineTo(b.x-y/2-3*u/2,b.y-3*y/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,l,p,n){var u=b.clone(),y=Da.apply(this,arguments),t=d*(g+2*p),z=e*(g+2*p);return function(){y.apply(this,arguments);a.begin();a.moveTo(u.x-d*p,u.y-e*p);a.lineTo(u.x-2*t+d*p,u.y-2*z+e*p);a.moveTo(u.x-t-z+e*p,u.y-z+t-d*p);a.lineTo(u.x+z-t-e*p,u.y-z-t+d*p);a.stroke()}}); +mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,l,p,n){var u=d*(g+p+1),y=e*(g+p+1),t=b.clone();b.x-=u;b.y-=y;return function(){a.begin();a.moveTo(t.x-y,t.y+u);a.quadTo(b.x-y,b.y+u,b.x,b.y);a.quadTo(b.x+y,b.y-u,t.x+y,t.y-u);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,l,p,n){c=d*p*1.118;f=e*p*1.118;d*=g+p;e*=g+p;var u=b.clone();u.x-=c;u.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(u.x,u.y);l?a.lineTo(u.x-d-e/2,u.y-e+d/2):a.lineTo(u.x+e/2-d,u.y-e-d/2); +a.lineTo(u.x-d,u.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,l,p,n,u){e*=l+n;g*=l+n;var y=d.clone();return function(){c.begin();c.moveTo(y.x,y.y);p?c.lineTo(y.x-e-g/a,y.y-g+e/a):c.lineTo(y.x+g/a-e,y.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Na=function(a,c,f){return Ba(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+ +d*c/4-b*g/2)},function(c,b,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-f})},Ba=function(a,c,f,b,d){return R(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-l.x,p=d.y-l.y,n=Math.sqrt(e*e+p*p),l=b.call(this,n,e/n,p/n,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var p=a.view.scale,n=f?g[0]: +g[l],g=f?g[1]:g[l-1],l=g.x-n.x,u=g.y-n.y,y=Math.sqrt(l*l+u*u);b.x=(b.x+c.x)*p;b.y=(b.y+c.y)*p;d.call(this,y,l/y,u/y,n,g,b,e)})},xa=function(a){return function(c){return[R(c,["arrowWidth","arrowSize"],function(c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",P.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",P.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-f)*c.height/2)},function(c,f){this.state.style.arrowWidth= +Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-f.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-f.x)/c.width))})]}},Ia=function(a,c,f){return function(b){var d=[R(b,["size"],function(f){var b=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(f.x+b,f.y+b)},function(c,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,f.x-c.x),Math.min(c.height,f.y-c.y)))/a)})];f&&mxUtils.getValue(b.style, mxConstants.STYLE_ROUNDED,!1)&&d.push(va(b));return d}},Ea=function(a,c,f,b,d){f=null!=f?f:1;return function(e){var g=[R(e,["size"],function(c){var f=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",f?d:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,b*(f?1:c.width))),c.getCenterY())},function(a,c,b){var g=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(f,(c.x-a.x)/ -a.width));g&&!mxEvent.isAltDown(b.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,b)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(e));return g}},Ma=function(a){return function(c){var f=[R(c,["size"],function(c){var f=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(c.x+f*c.width*.75,c.y+c.height/4)},function(c,f){this.state.style.size=Math.max(0,Math.min(a,(f.x-c.x)/(.75*c.width)))},null, -!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(va(c));return f}},Ba=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c}},va=function(a,c){return R(a,[mxConstants.STYLE_ARCSIZE],function(f){var b=null!=c?c:f.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/ +a.width));g&&!mxEvent.isAltDown(b.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,b)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(e));return g}},Oa=function(a){return function(c){var f=[R(c,["size"],function(c){var f=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(c.x+f*c.width*.75,c.y+c.height/4)},function(c,f){this.state.style.size=Math.max(0,Math.min(a,(f.x-c.x)/(.75*c.width)))},null, +!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(va(c));return f}},Ca=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c}},va=function(a,c){return R(a,[mxConstants.STYLE_ARCSIZE],function(f){var b=null!=c?c:f.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/ 2,d),f.y+b)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*d),f.y+b)},function(c,f,b){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50, -Math.max(0,100*(c.width-f.x+c.x)/Math.min(c.width,c.height))))})},R=function(a,c,f,b,d,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=f;g.setPosition=b;g.ignoreGrid=null!=d?d:!0;if(e){var m=g.positionChanged;g.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Fa={link:function(a){return[Pa(a,!0,10),Pa(a,!1,10)]},flexArrow:function(a){var c= -a.view.graph.gridSize/a.view.scale,f=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Ca(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f* -c/2)},function(f,b,d,e,g,m,p){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,m.x,m.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,m.x,m.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))< -c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),f.push(Ca(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2)},function(f,b,d,e,g,m,p){f= -Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,m.x,m.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,m.x,m.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])- -parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Ca(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style, -mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,m,p){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,m.x,m.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,m.x,m.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]= -a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),f.push(Ca(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,f,b,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/ -5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,m,p){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,m.x,m.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,m.x,m.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]= +Math.max(0,100*(c.width-f.x+c.x)/Math.min(c.width,c.height))))})},R=function(a,c,f,b,d,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=f;g.setPosition=b;g.ignoreGrid=null!=d?d:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Fa={link:function(a){return[Na(a,!0,10),Na(a,!1,10)]},flexArrow:function(a){var c= +a.view.graph.gridSize/a.view.scale,f=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Ba(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f* +c/2)},function(f,b,d,e,g,l,p){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))< +c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),f.push(Ba(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2)},function(f,b,d,e,g,l,p){f= +Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])- +parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Ba(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style, +mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,l,p){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]= +a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),f.push(Ba(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,f,b,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/ +5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,l,p){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]= a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return f},swimlane:function(a){var c=[R(a,[mxConstants.STYLE_STARTSIZE],function(c){var f=parseFloat(mxUtils.getValue(a.style, mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,f))):new mxPoint(c.x+Math.max(0,Math.min(c.width,f)),c.getCenterY())},function(c,f){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,f.y-c.y))):Math.round(Math.max(0,Math.min(c.width,f.x-c.x)))})];if(mxUtils.getValue(a.style, -mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(va(a,f/2))}return c},label:Ba(),ext:Ba(),rectangle:Ba(),triangle:Ba(),rhombus:Ba(),umlLifeline:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height, +mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(va(a,f/2))}return c},label:Ca(),ext:Ca(),rectangle:Ca(),triangle:Ca(),rhombus:Ca(),umlLifeline:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height, c.y-a.y)))},!1)]},umlFrame:function(a){return[R(a,["width","height"],function(a){var c=Math.max(L.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",L.prototype.width))),f=Math.max(1.5*L.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",L.prototype.height)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.width=Math.round(Math.max(L.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*L.prototype.corner, Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[R(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},cross:function(a){return[R(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1, -mxUtils.getValue(this.state.style,"size",sa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var f=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/f*2,Math.max(0,a.getCenterX()-c.x)/f*2)))})]},note:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width- +mxUtils.getValue(this.state.style,"size",ra.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var f=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/f*2,Math.max(0,a.getCenterX()-c.x)/f*2)))})]},note:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width- c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[R(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",V.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a)); -return c},dataStorage:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[R(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style, +return c},dataStorage:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[R(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style, "position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(a.x+f*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),R(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2))); return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),R(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(a.x+Math.min(a.width,f*a.width+ -b),a.y+a.height-c)},function(a,c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-f*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style, -"dy",U.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[R(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",aa.prototype.jettyWidth))),f=Math.max(0,Math.min(a.height, -mxUtils.getValue(this.state.style,"jettyHeight",aa.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*f)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style, -"dy",Q.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+f)},function(a, +b),a.y+a.height-c)},function(a,c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-f*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style, +"dy",T.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[R(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ba.prototype.jettyWidth))),f=Math.max(0,Math.min(a.height, +mxUtils.getValue(this.state.style,"jettyHeight",ba.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*f)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Q.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style, +"dy",Q.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[R(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+f)},function(a, c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:xa(1),doubleArrow:xa(.5),folder:function(a){return[R(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style, "tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+f)},function(a,c){var f=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=a.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style, "size",g.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[R(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[R(a, -["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0),curlyBracket:Ea(n.prototype.size,!1),display:Ea(ta.prototype.size,!1),cube:Ka(1,a.prototype.size,!1),card:Ka(.5,c.prototype.size,!0),loopLimit:Ka(.5, -ja.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=R;Graph.handleFactory=Fa;var Qa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Qa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_RECTANGLE);c=Fa[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&& +["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ea(D.prototype.size,!0,null,!0,D.prototype.fixedSize),hexagon:Ea(C.prototype.size,!0,.5,!0),curlyBracket:Ea(n.prototype.size,!1),display:Ea(sa.prototype.size,!1),cube:Ia(1,a.prototype.size,!1),card:Ia(.5,c.prototype.size,!0),loopLimit:Ia(.5, +ja.prototype.size,!0),trapezoid:Oa(.5),parallelogram:Oa(1)};Graph.createHandle=R;Graph.handleFactory=Fa;var Qa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Qa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_RECTANGLE);c=Fa[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&& (c=Fa[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Fa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ga=new mxPoint(1,0),Ha=new mxPoint(1,0),xa=mxUtils.toRadians(-30),Ga=mxUtils.getRotatedPoint(Ga, -Math.cos(xa),Math.sin(xa)),xa=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(xa),Math.sin(xa));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,m=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==m&&null!=c&&(m=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var p=Ga.x,n=Ga.y,u=Ha.x,y=Ha.y,t="horizontal"==mxUtils.getValue(a.style,"elbow", -"horizontal");if(null!=g&&null!=m){a=function(a,c,f){a-=z.x;var b=c-z.y;c=(y*a-u*b)/(p*y-n*u);a=(n*a-p*b)/(n*u-p*y);t?(f&&(z=new mxPoint(z.x+p*c,z.y+n*c),d.push(z)),z=new mxPoint(z.x+u*a,z.y+y*a)):(f&&(z=new mxPoint(z.x+u*a,z.y+y*a),d.push(z)),z=new mxPoint(z.x+p*c,z.y+n*c));d.push(z)};var z=m;null==b&&(b=new mxPoint(m.x+(g.x-m.x)/2,m.y+(g.y-m.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ra=Graph.prototype.createEdgeHandler; +Math.cos(xa),Math.sin(xa)),xa=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(xa),Math.sin(xa));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var p=Ga.x,n=Ga.y,u=Ha.x,y=Ha.y,t="horizontal"==mxUtils.getValue(a.style,"elbow", +"horizontal");if(null!=g&&null!=l){a=function(a,c,f){a-=z.x;var b=c-z.y;c=(y*a-u*b)/(p*y-n*u);a=(n*a-p*b)/(n*u-p*y);t?(f&&(z=new mxPoint(z.x+p*c,z.y+n*c),d.push(z)),z=new mxPoint(z.x+u*a,z.y+y*a)):(f&&(z=new mxPoint(z.x+u*a,z.y+y*a),d.push(z)),z=new mxPoint(z.x+p*c,z.y+n*c));d.push(z)};var z=l;null==b&&(b=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ra=Graph.prototype.createEdgeHandler; Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(a);f.snapToTerminals=!1;return f}return Ra.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,f){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,f/(.5+b));c=(c-b)/2;f=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+b*d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};B.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style, "position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, @@ -2719,44 +2716,44 @@ f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this. parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d)),a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(c+b),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c,.5*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};U.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints= -mxEllipse.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;ra.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.getConstraints=function(a,c,f){a=[];var b=Math.min(c,f/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -.5*(d+c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));return a};aa.prototype.getConstraints=function(a,c,f){c=parseFloat(mxUtils.getValue(a,"jettyWidth",aa.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a, -"jettyHeight",aa.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null, +0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};T.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints= +mxEllipse.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.getConstraints=function(a,c,f){a=[];var b=Math.min(c,f/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, +.5*(d+c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));return a};ba.prototype.getConstraints=function(a,c,f){c=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a, +"jettyHeight",ba.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null, c),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*a,3.5*a))];f>5*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));f>8*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));f> 15*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return b};ja.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0, -1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1, +.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0, +1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75, -.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, +.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, .5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25, -1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5, +1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, +.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5, 1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints= [new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0), new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55, -.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, -0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, +.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];p.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75, +0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ca.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, "dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(c+b),.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};Q.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -1),!1));return a};N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];O.prototype.getConstraints= +1),!1));return a};M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];P.prototype.getConstraints= function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));return a};Z.prototype.getConstraints=function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));return a};sa.prototype.getConstraints= +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));return a};aa.prototype.getConstraints=function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",P.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",P.prototype.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));return a};ra.prototype.getConstraints= function(a,c,f){a=[];var b=Math.min(f,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(f-d)/2,e=b+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};z.prototype.constraints=null;ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, -.9),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};z.prototype.constraints=null;za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, +.9),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} Actions.prototype.init=function(){function a(a){d.escape();var c=d.getDeletableCells(d.getSelectionCells());if(null!=c&&0<c.length){var b=d.selectParentAfterDelete?d.model.getParents(c):null;d.removeCells(c,a);if(null!=b){a=[];for(c=0;c<b.length;c++)d.model.contains(b[c])&&(d.model.isVertex(b[c])||d.model.isEdge(b[c]))&&a.push(b[c]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...", function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,f){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ ": "+p.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container, 620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN? Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(c){b.handleError(c)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate(); -try{var c=mxClipboard.paste(d);if(null!=c){a=!0;for(var b=0;b<c.length&&a;b++)a=a&&d.model.isEdge(c[b]);var e=d.view.translate,m=d.view.scale,n=e.x,l=e.y,e=null;if(1==c.length&&a){var t=d.getCellGeometry(c[0]);null!=t&&(e=t.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(c,a);if(null!=e){var u=Math.round(d.snap(d.popupMenuHandler.triggerX/m-n)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/m-l));d.cellsMoved(c,u-e.x,k-e.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize", +try{var c=mxClipboard.paste(d);if(null!=c){a=!0;for(var b=0;b<c.length&&a;b++)a=a&&d.model.isEdge(c[b]);var e=d.view.translate,l=d.view.scale,n=e.x,v=e.y,e=null;if(1==c.length&&a){var t=d.getCellGeometry(c[0]);null!=t&&(e=t.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(c,a);if(null!=e){var u=Math.round(d.snap(d.popupMenuHandler.triggerX/l-n)),m=Math.round(d.snap(d.popupMenuHandler.triggerY/l-v));d.cellsMoved(c,u-e.x,m-e.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize", function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(a=0;a<c.length;a++)if(d.getModel().isVertex(c[a])){var e=d.getCellGeometry(c[a]);null!=e&&(e=e.clone(),e.width=b.copiedSize.width,e.height= b.copiedSize.height,d.getModel().setGeometry(c[a],e))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(c){a(null!=c&&mxEvent.isShiftDown(c))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells())}catch(c){b.handleError(c)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"), function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A"); @@ -2767,69 +2764,69 @@ this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,nul ":",d,function(c){a.setTooltipForCell(f,c)});b.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var f=a.getSelectionCell(),d=a.getLinkForCell(f)||"";b.showLinkDialog(d,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(f,0<c.length?c:null)})}},null, null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,f){a=mxUtils.trim(a);if(0<a.length){var c=null,b=d.getLinkTitle(a);null!=f&&0<f.length&&(c=f[0].iconUrl, b=f[0].name||f[0].type,b=b.charAt(0).toUpperCase()+b.substring(1),30<b.length&&(b=b.substring(0,30)+"..."));var e=d.getFreeInsertPoint(),c=new mxCell(b,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells", -[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var f=a.getSelectedElement(),d=a.getParentByName(f,"A",a.cellEditor.textarea),e="";if(null==d&&null!=f&&null!=f.getElementsByTagName)for(var m=f.getElementsByTagName("a"),n=0;n<m.length&&null==d;n++)m[n].textContent==f.textContent&&(d=m[n]);null!=d&& -"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var l=a.cellEditor.saveSelection();b.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(l);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().getChildCount(b))d.updateGroupBounds([b], -20);else{var e=d.view.getState(b),m=d.getCellGeometry(b);d.getModel().isVertex(b)&&null!=e&&null!=e.text&&null!=m&&d.isWrapping(b)?(m=m.clone(),m.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,m)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var f= -d.getSelectionCells(),e=0;e<f.length;e++)if(state=d.getView().getState(f[e]),null!=state){var p=mxUtils.getValue(state.style,"html","0");if("1"==p&&null==a){var m=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=m;m=mxUtils.extractTextWithWhitespace(n.childNodes);d.cellLabelChanged(state.cell,m);d.setCellStyles("html",a,[f[e]])}else"0"==p&&"1"==a&&(m=mxUtils.htmlEntities(d.convertValueToString(state.cell), -!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(m=m.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(m)),d.setCellStyles("html",a,[f[e]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",f))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),f="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var f=a.getSelectedElement(),d=a.getParentByName(f,"A",a.cellEditor.textarea),e="";if(null==d&&null!=f&&null!=f.getElementsByTagName)for(var l=f.getElementsByTagName("a"),n=0;n<l.length&&null==d;n++)l[n].textContent==f.textContent&&(d=l[n]);null!=d&& +"A"==d.nodeName&&(e=d.getAttribute("href")||"",a.selectNode(d));var v=a.cellEditor.saveSelection();b.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(v);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().getChildCount(b))d.updateGroupBounds([b], +20);else{var e=d.view.getState(b),l=d.getCellGeometry(b);d.getModel().isVertex(b)&&null!=e&&null!=e.text&&null!=l&&d.isWrapping(b)?(l=l.clone(),l.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,l)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var f= +d.getSelectionCells(),e=0;e<f.length;e++)if(state=d.getView().getState(f[e]),null!=state){var p=mxUtils.getValue(state.style,"html","0");if("1"==p&&null==a){var l=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=l;l=mxUtils.extractTextWithWhitespace(n.childNodes);d.cellLabelChanged(state.cell,l);d.setCellStyles("html",a,[f[e]])}else"0"==p&&"1"==a&&(l=mxUtils.htmlEntities(d.convertValueToString(state.cell), +!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(l)),d.setCellStyles("html",a,[f[e]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",f))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),f="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, f)});this.addAction("rotation",function(){var a="0",f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn", function(a){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),f=d.view.translate,b=d.view.scale;a.width/=b;a.height/=b;a.x=a.x/b-f.x;a.y= -a.y/b-f.y;var b=d.container.clientWidth-10,e=d.container.clientHeight-10,m=Math.floor(20*Math.min(b/a.width,e/a.height))/20;d.zoomTo(m);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=(a.y+f.y)*m-Math.max((e-a.height*m)/2+5,0),d.container.scrollLeft=(a.x+f.x)*m-Math.max((b-a.width*m)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth- +a.y/b-f.y;var b=d.container.clientWidth-10,e=d.container.clientHeight-10,l=Math.floor(20*Math.min(b/a.width,e/a.height))/20;d.zoomTo(l);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=(a.y+f.y)*l-Math.max((e-a.height*l)/2+5,0),d.container.scrollLeft=(a.x+f.x)*l-Math.max((b-a.width*l)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth- 10)/a.width/f,(d.container.clientHeight-10)/a.height/f))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/ f,(d.container.clientHeight-10)/a.height/f))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/ 20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container, -300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid", -function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1); -l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())}); -l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled}); -l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()}); -l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container, -320,280,!0,!0,function(){q=!1}),q=!0)}));l=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC? -d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold", -!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)}); +300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid", +function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.isGridEnabled()});m.setEnabled(!1);m=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});m.setEnabled(!1); +m=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=k;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())}); +m.setToggleAction(!0);m.setSelectedCallback(function(){return d.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled}); +m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()}); +m.isEnabled=k;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=k;m.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container, +320,280,!0,!0,function(){q=!1}),q=!0)}));m=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC? +d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold", +!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)}); this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid", function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null), b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells", d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED, "1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),f=d.getCurrentCellStyle(a[0]),e="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED, e);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED], -"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),f="1";null!=a&&null!=d.getFoldingImage(a)&&(f="0");d.setCellStyles("collapsible",f);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var b=d.getModel(),b= -new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()}, -null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var g=d.view.translate,p=d.view.scale,m=g.x,g=g.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)m+=n.x,g+=n.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);m=Math.round(d.snap(d.popupMenuHandler.triggerX/p-m));p=Math.round(d.snap(d.popupMenuHandler.triggerY/ -p-g));b.addPointAt(b.state,m,p)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().isEdge(e)){var p=d.getCellGeometry(e);null!=p&&(p=p.clone(),p.points=null,d.getModel().setGeometry(e,p))}}}finally{d.getModel().endUpdate()}}}, -null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");l=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab"); +"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),f="1";null!=a&&null!=d.getFoldingImage(a)&&(f="0");d.setCellStyles("collapsible",f);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var f=d.getModel(),f= +new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),a)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()}, +null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var f=e.graph.selectionCellsHandler.getHandler(a);if(f instanceof mxEdgeHandler){for(var b=d.view.translate,p=d.view.scale,l=b.x,b=b.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)l+=n.x,b+=n.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);l=Math.round(d.snap(d.popupMenuHandler.triggerX/p-l));p=Math.round(d.snap(d.popupMenuHandler.triggerY/ +p-b));f.addPointAt(f.state,l,p)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}}, +null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab"); this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=d.getView().getState(d.getSelectionCell()),e="";null!=f&&(e=f.style[mxConstants.STYLE_IMAGE]||e);var p=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(p),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null; -d.getModel().beginUpdate();try{if(0==f.length){var g=d.getFreeInsertPoint(),e=f=[d.insertVertex(d.getDefaultParent(),null,"",g.x,g.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",e))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var m=d.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image", -f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var n=f[0],l=d.getModel().getGeometry(n);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(n,l))}}finally{d.getModel().endUpdate()}null!=e&&(d.setSelectionCells(e),d.scrollCellToVisible(e[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow= -new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0); -l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180, -180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&& -this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]}; +d.getModel().beginUpdate();try{if(0==f.length){var g=d.getFreeInsertPoint(),e=f=[d.insertVertex(d.getDefaultParent(),null,"",g.x,g.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",e))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var l=d.getCurrentCellStyle(f[0]);"image"!=l[mxConstants.STYLE_SHAPE]&&"label"!=l[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image", +f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var n=f[0],v=d.getModel().getGeometry(n);null!=v&&(v=v.clone(),v.width=c,v.height=b,d.getModel().setGeometry(n,v))}}finally{d.getModel().endUpdate()}null!=e&&(d.setSelectionCells(e),d.scrollCellToVisible(e[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow= +new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0); +m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180, +180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&& +this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,k){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]}; function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled}; Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource); DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null; DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0}; DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)}; -DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(l){null!=b&&b(l)}}),b))}; -DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var l=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(l,this.ui.pages):null;var c=[this.ui.diffPages(null!=d?d:l,this.shadowPages)];if(!this.ignorePatches(c)){var f=this.ui.patchPages(l, -c[0]);d={};var g=this.ui.getHashValueForPages(f,d),l={},p=this.ui.getHashValueForPages(this.shadowPages,l);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",p==g,g);if(null!=g&&g!=p){var m=this.compressReportData(this.getAnonymizedXmlForPages(q)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,c,"Shadow Details: "+JSON.stringify(d)+ -"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(l)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(B){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); -null!=e&&e(B);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,B);else{var u=this.getCurrentUser(),F=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),F,B)}}catch(C){}}}; +DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))}; +DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var c=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(c)){var f=this.ui.patchPages(m, +c[0]);d={};var g=this.ui.getHashValueForPages(f,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",p==g,g);if(null!=g&&g!=p){var l=this.compressReportData(this.getAnonymizedXmlForPages(q)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,c,"Shadow Details: "+JSON.stringify(d)+ +"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(B){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); +null!=e&&e(B);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,B);else{var u=this.getCurrentUser(),A=null!=u?u.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,B)}}catch(D){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)}; DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a}; -DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var l=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), -25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?l(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?l(a):l(null)}),function(){})}else{var q=this.getCurrentUser(),c=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); +DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), +25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?m(a):m(null)}),function(){})}else{var q=this.getCurrentUser(),c=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}}; -DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),l=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),c=null!=q?this.ui.hashValue(q.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),p=g.lastIndexOf("."),q="xml";0<p&&(q=g.substring(p));var m=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ +DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),c=null!=q?this.ui.hashValue(q.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),p=g.lastIndexOf("."),q="xml";0<p&&(q=g.substring(p));var l=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ ":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+q+")\nUser="+c+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b: -"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+k+"\n\nData:\n"+l,d)}catch(n){}}; -DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),l=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(l,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats= +"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+k+"\n\nData:\n"+m,d)}catch(n){}}; +DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats= this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))}; DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b}; -DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var c=l.foldingEnabled,f=l.mathEnabled,g=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};l.model.beginUpdate();try{for(var p= -0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.container.style.visibility="";l.model.endUpdate();l.cellRenderer.redraw=g;this.changeListenerEnabled=q;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)f!= -l.mathEnabled?(this.ui.editor.updateGraphComponents(),l.refresh()):(c!=l.foldingEnabled?l.view.revalidate():l.view.validate(),l.sizeDidChange());this.ui.updateTabContainer()}}; -DrawioFile.prototype.save=function(a,b,e,d,k,l){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=e)e(q);else throw q;}}; +DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var c=m.foldingEnabled,f=m.mathEnabled,g=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};m.model.beginUpdate();try{for(var p= +0;p<a.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[p],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=g;this.changeListenerEnabled=q;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)f!= +m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(c!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}}; +DrawioFile.prototype.save=function(a,b,e,d,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=e)e(q);else throw q;}}; DrawioFile.prototype.updateFileData=function(a){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,null!=a?!a:!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml}; DrawioFile.prototype.decompress=function(){this.updateFileData(!1);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","false");this.fileChanged()};DrawioFile.prototype.compress=function(){this.updateFileData(!0);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","true");this.fileChanged()};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1}; @@ -2859,21 +2856,21 @@ window.location.href=e});null==a&&this.isModified()?this.ui.confirm(mxResources. k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))}; DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+ mxUtils.htmlEntities(mxResources.get("error"))+(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}}; -DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& -this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,l):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); +DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&& +this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument"))); this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval}; DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart= this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a,b){var e=Editor.guid(32);null!=this.sync?this.sync.createToken(e,mxUtils.bind(this,function(b){a(e,b)}),b):a(e)}; -DrawioFile.prototype.fileSaved=function(a,b,e,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,k)}catch(c){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var l= -this.getCurrentUser(),q=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),q,c)}}catch(f){}}}; +DrawioFile.prototype.fileSaved=function(a,b,e,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,k)}catch(c){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var m= +this.getCurrentUser(),q=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),q,c)}}catch(f){}}}; DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this, function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)}; DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b}; DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.stats.destroyed++;this.clearAutosave();this.removeListeners();null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1}; DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)}; -LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ -(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?(b=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null,b.scale,b.border)):l(b)}; +LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);else if(b.length<MAX_REQUEST_SIZE){var c=a.lastIndexOf("."),c=0<c?a.substring(c+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+c+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+ +(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?(b=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null,b.scale,b.border)):m(b)}; LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"}, {ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC": IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=": @@ -2906,9 +2903,9 @@ Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeo (f=d[0].getAttribute("data-mxgraph"),null!=f?(d=JSON.parse(f),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(f=mxUtils.getTextContent(d[0]),f=Graph.decompress(f,null,b),0<f.length&&(a=mxUtils.parseXml(f),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(f=a.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f)), null!=f&&0<f.length)a=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(f=a.getElementsByTagName("diagram"),0<f.length&&(d=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=d&&(a=Editor.parseDiagramNode(d,b)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,c){var b=mxUtils.trim(mxUtils.getTextContent(a)),f=null; 0<b.length?(b=Graph.decompress(b,null,c),null!=b&&0<b.length&&(f=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(b[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&& -!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",f=0,d=0,e=[],g=null;d<a.length;){var m=a.charCodeAt(d),d=d+1;10!=m&&(b+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var p=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(p>d){c=a.substring(d,p);break}}10==m&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==c&&(c=Editor.extractGraphModelFromXref(e));null!=c&& +!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",f=0,d=0,e=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var p=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(p>d){c=a.substring(d,p);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==c&&(c=Editor.extractGraphModelFromXref(e));null!=c&& (c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(c=a[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(a=a[c[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),f=window.atob&& -!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(P){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)); +!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(O){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)); null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(b=c||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0])));return null!=b?mxUtils.trim(b):b};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts; ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile= a.templateFile);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!= @@ -2920,7 +2917,7 @@ c)}}}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUI decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2"; if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled= "1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"), -!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(P){console.log("ExtFonts format error: "+P.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!= +!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(O){console.log("ExtFonts format error: "+O.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!= this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var f=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",f.join("|"))}return c}; Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=function(a,c,b){return Editor.extractGraphModel.apply(this, arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents= @@ -2932,27 +2929,27 @@ var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\ return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.diagrams\.new\/proxy/.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c= a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=Editor.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))}; Editor.prototype.convertImageToDataUri=function(a,c){try{var b=!0,f=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(f);b&&c(Editor.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(f);if(b)try{var a=document.createElement("canvas"), -e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);c(a.toDataURL())}catch(ca){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(H){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var m=a.getElementsByTagName(b),p=0;p<m.length;p++)mxUtils.bind(this,function(b){try{if(null!=b){var m= -f.convert(b.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var p=e[m];null==p?(d++,this.convertImageToDataUri(m,function(f){null!=f&&(e[m]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,p)}else null!=m&&b.setAttribute(g,m)}}catch(Y){}})(m[p])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,g;b<f;){d=a.charCodeAt(b++)&255;if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>> +e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);c(a.toDataURL())}catch(ea){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(I){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var l=a.getElementsByTagName(b),p=0;p<l.length;p++)mxUtils.bind(this,function(b){try{if(null!=b){var l= +f.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var p=e[l];null==p?(d++,this.convertImageToDataUri(l,function(f){null!=f&&(e[l]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,p)}else null!=l&&b.setAttribute(g,l)}}catch(Z){}})(l[p])});b("image","xlink:href");b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,g;b<f;){d=a.charCodeAt(b++)&255;if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>> 2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>> -2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e,g,m){try{var p=!g&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this, +2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,f,d,e,g,l){try{var p=!g&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this, function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+Editor.base64Encode(f)}c(f)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")}, -a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},p,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},m)});n()}catch(ga){null!=b&&b(ga)}};Editor.prototype.embedCssFonts=function(a,c){function b(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}var f=a.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0== -d){for(var a=[f[0]],e=1;e<f.length;e++){var g=f[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[b(f[e].substring(0,g))]);a.push('"'+f[e].substring(g))}c(a.join(""))}});if(0<f.length){for(var g=1;g<f.length;g++){var m=f[g].indexOf(")"),p=null,n=f[g].indexOf("format(",m);0<n&&(p=b(f[g].substring(n+7,f[g].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml"; +a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},p,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},l)});n()}catch(fa){null!=b&&b(fa)}};Editor.prototype.embedCssFonts=function(a,c){function b(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")}var f=a.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0== +d){for(var a=[f[0]],e=1;e<f.length;e++){var g=f[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[b(f[e].substring(0,g))]);a.push('"'+f[e].substring(g))}c(a.join(""))}});if(0<f.length){for(var g=1;g<f.length;g++){var l=f[g].indexOf(")"),p=null,n=f[g].indexOf("format(",l);0<n&&(p=b(f[g].substring(n+7,f[g].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml"; else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b, -mxUtils.bind(this,function(c){this.cachedFonts[a]=c;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(b(f[g].substring(0,m)),p)}e()}else c(a)};Editor.prototype.loadFonts=function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.extFonts;if(null!=c&&0<c.length){var b="",f=0;null==this.cachedGoogleFonts&& +mxUtils.bind(this,function(c){this.cachedFonts[a]=c;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(b(f[g].substring(0,l)),p)}e()}else c(a)};Editor.prototype.loadFonts=function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.extFonts;if(null!=c&&0<c.length){var b="",f=0;null==this.cachedGoogleFonts&& (this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(b,a)}),e=0;e<c.length;e++)mxUtils.bind(this,function(a,c){0==c.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[c]?(f++,this.loadUrl(c,mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;f--;d()}),mxUtils.bind(this,function(a){f--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'");}'})(c[e].name,c[e].url);d()}else a()};Editor.prototype.addMathCss= function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.fontCss;if(null!=c){var b=a.getElementsByTagName("defs"),f=a.ownerDocument;0==b.length?(b=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(b, -a.firstChild):a.appendChild(b)):b=b[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,c);b.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,m,p,n,u,t,l,k,v){try{e=null!=e?e:!0;g=null!=g?g:!0;t=null!=t?t:this.graph;l=null!=l?l:0;var y=p?null:t.background;y==mxConstants.NONE&& -(y=null);null==y&&(y=f);null==y&&0==p&&(y="#ffffff");this.convertImages(t.getSvg(null,null,null,k,null,g,null,null,null,n),mxUtils.bind(this,function(b){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){k.drawImage(f,l/m,l/m);a(p)},0):(k.drawImage(f,l/m,l/m),a(p))},p=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),u=parseInt(b.getAttribute("height"));m=null!=m?m:1;null!=c&&(m=e?Math.min(1,Math.min(3*c/(4* -u),c/n)):c/n);n=Math.ceil(m*n)+2*l;u=Math.ceil(m*u)+2*l;p.setAttribute("width",n);p.setAttribute("height",u);var k=p.getContext("2d");null!=y&&(k.beginPath(),k.rect(0,0,n,u),k.fillStyle=y,k.fill());k.scale(m,m);if(v){var z=t.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,B=t.gridSize*z.gridSteps*m,F=t.getGraphBounds(),K=z.translate.x*x,H=z.translate.y*x,A=K+(F.x-K)/x,C=H+(F.y-H)/x,E=new Image;E.onload= -function(){try{for(var a=-Math.round(B-mxUtils.mod((K-A)*m,B)),c=-Math.round(B-mxUtils.mod((H-C)*m,B));a<n;a+=B)for(var b=c;b<u;b+=B)k.drawImage(E,a/m,b/m);g()}catch(ta){null!=d&&d(ta)}};E.onerror=function(a){null!=d&&d(a)};E.src=q}else g()}catch(ua){null!=d&&d(ua)}});f.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ba){null!= -d&&d(ba)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(O){null!=d&&d(O)}}))}catch(ba){null!=d&&d(ba)}}),b,u)}catch(U){null!=d&&d(U)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var l=k,q=0;8>q;q++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[k]=l;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^ -a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=p;p+=c;return a.substring(b,p)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a, -4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,p);do{var n=g(a);if("IDAT"==e(a,4)){d=a.substring(0,p-8);"pHYs"==c&&"dpi"==b?(b=Math.round(f/.0254),b=m(b)+m(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=m(b.length)+c+b+m(f^4294967295);d+=a.substring(p-8,a.length);break}d+=a.substring(p-8,p-4+n);e(a,n);e(a,4)}while(n);return"data:image/png;base64,"+(window.btoa? +a.firstChild):a.appendChild(b)):b=b[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,c);b.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,l,p,n,u,t,v,m,k){try{e=null!=e?e:!0;g=null!=g?g:!0;t=null!=t?t:this.graph;v=null!=v?v:0;var y=p?null:t.background;y==mxConstants.NONE&& +(y=null);null==y&&(y=f);null==y&&0==p&&(y="#ffffff");this.convertImages(t.getSvg(null,null,null,m,null,g,null,null,null,n),mxUtils.bind(this,function(b){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){m.drawImage(f,v/l,v/l);a(p)},0):(m.drawImage(f,v/l,v/l),a(p))},p=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),u=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=c&&(l=e?Math.min(1,Math.min(3*c/(4* +u),c/n)):c/n);n=Math.ceil(l*n)+2*v;u=Math.ceil(l*u)+2*v;p.setAttribute("width",n);p.setAttribute("height",u);var m=p.getContext("2d");null!=y&&(m.beginPath(),m.rect(0,0,n,u),m.fillStyle=y,m.fill());m.scale(l,l);if(k){var z=t.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,A=t.gridSize*z.gridSteps*l,B=t.getGraphBounds(),K=z.translate.x*x,I=z.translate.y*x,D=K+(B.x-K)/x,C=I+(B.y-I)/x,F=new Image;F.onload= +function(){try{for(var a=-Math.round(A-mxUtils.mod((K-D)*l,A)),c=-Math.round(A-mxUtils.mod((I-C)*l,A));a<n;a+=A)for(var b=c;b<u;b+=A)m.drawImage(F,a/l,b/l);g()}catch(sa){null!=d&&d(sa)}};F.onerror=function(a){null!=d&&d(a)};F.src=q}else g()}catch(ua){null!=d&&d(ua)}});f.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ca){null!= +d&&d(ca)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(P){null!=d&&d(P)}}))}catch(ca){null!=d&&d(ca)}}),b,u)}catch(T){null!=d&&d(T)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var m=k,q=0;8>q;q++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^ +a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=p;p+=c;return a.substring(b,p)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a, +4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,p);do{var n=g(a);if("IDAT"==e(a,4)){d=a.substring(0,p-8);"pHYs"==c&&"dpi"==b?(b=Math.round(f/.0254),b=l(b)+l(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=l(b.length)+c+b+l(f^4294967295);d+=a.substring(p-8,a.length);break}d+=a.substring(p-8,p-4+n);e(a,n);e(a,4)}while(n);return"data:image/png;base64,"+(window.btoa? btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&& (EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless? -p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"), +p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"), function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var n=DiagramFormatPanel.prototype.addOptions; DiagramFormatPanel.prototype.addOptions=function(a){a=n.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}}); a.appendChild(d)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875"); @@ -2978,55 +2975,55 @@ font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073" {fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28", stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes= null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties, -Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var c= +Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(I){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var c= {},b=a.vertices,f=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()})); c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c); -mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){t.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],m=b.parentRow.nextSibling;m&&m.getAttribute("data-pName")==a;)g.push(m.getAttribute("data-pValue")),m=m.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&& -(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var p=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var l=n.length;l<c;l++)n.push(p);n=n.join(",");t.setCellStyles(b.dependentProps[a],n,t.getSelectionCells());d.push(b.dependentProps[a]);e.push(n)}if("function"==typeof b.onChange)b.onChange(t, +mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function f(a,c,b,f){t.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&& +(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,c,t.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var p=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var k=n.length;k<c;k++)n.push(p);n=n.join(",");t.setCellStyles(b.dependentProps[a],n,t.getSelectionCells());d.push(b.dependentProps[a]);e.push(n)}if("function"==typeof b.onChange)b.onChange(t, c);u.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px"; -d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(u,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,m){null!=c&&(c=c.split(","),l.push({name:a,values:c,type:b,defVal:d,countProperty:e, -parentRow:g,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(u,function(c){for(var p=g,u=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==a)p=p.nextSibling,u++;else break;var t={type:b,parentRow:g,index:u,isDeletable:!0,defVal:d,countProperty:e},u=n(a,"",t,0==u%2,m);f(a,d,t);p.parentNode.insertBefore(u,p.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function m(a,c,b,f,d,e,g){if(0<d){var m=Array(d); -c=null!=c?c.split(","):[];for(var p=0;p<d;p++)m[p]=null!=c[p]?c[p]:null!=f?f:"";l.push({name:a,values:m,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}function p(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function n(c,b,n,t,l){var v=n.dispName,k=n.type,z=document.createElement("tr");z.className="gePropRow"+(l?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow"; -z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);t=!1;null!=n.index&&(z.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",t=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(y.style.textAlign="right");z.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==k)y.appendChild(e(c,b,n));else if("bool"==k||"boolean"==k)y.appendChild(p(c,b,n));else if("enum"==k){var x= -n.enumList;for(l=0;l<x.length;l++)if(v=x[l],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(u,function(){var e=document.createElement("select");d(y,e);for(var g=0;g<x.length;g++){var m=x[g],p=document.createElement("option");p.value=mxUtils.htmlEntities(m.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));e.appendChild(p)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change", -function(){var a=mxUtils.htmlEntities(e.value);f(c,a,n)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==k?y.appendChild(g(c,b,n.subType,n.subDefVal,n.countProperty,z,l)):"staticArr"==k?y.appendChild(m(c,b,n.subType,n.subDefVal,n.size,z,l)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(u,function(){function e(){var a=g.value,a=0==a.length&&"string"!=k?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",k="string"):(a=parseFloat(a), -a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==k?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className="gePropEditor";"int"!=k&&"float"!=k||n.allowAuto||(g.type="number",g.step="int"==k?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur", -function(){e()})})));n.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(u,function(a){f(c,"",n,n.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",y.appendChild(l));z.appendChild(y);return z}var u=this,t=this.editorUi.editor.graph,l=[];a.style.position="relative";a.style.padding="0";var k=document.createElement("table");k.style.whiteSpace="nowrap";k.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader"; -var z=document.createElement("th");z.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;z.appendChild(y);mxUtils.write(z,mxResources.get("property"));v.style.cursor="pointer";var x=function(){var c=k.querySelectorAll(".gePropNonHeaderRow"),b;if(u.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(qa){}}else y.src= -Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;x()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");v.appendChild(z);k.appendChild(v);var q=!1,B=!1,F;for(F in c)if(v=c[F],"function"!=typeof v.isVisible||v.isVisible(b,this)){var A=null!=b.style[F]?mxUtils.htmlEntities(b.style[F]+""):null!=v.getDefaultValue? -v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)B=!B;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var C=v.dependentProps,E=[],K=[],z=0;z<C.length;z++){var D=b.style[C[z]];K.push(c[C[z]].subDefVal);E.push(null!=D?D.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}k.appendChild(n(F,A,v,q,B));q=!q}}for(z=0;z<l.length;z++)for(v=l[z],c=v.parentRow,b=0;b<v.values.length;b++)F=n(v.name,v.values[b], -{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(F,c.nextSibling),c=F;a.appendChild(k);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d, -e[g]);var m=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(m,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(m,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR, -a.stroke||mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(m,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(m,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(m, -mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(m,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ +d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(u,function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,l){null!=c&&(c=c.split(","),v.push({name:a,values:c,type:b,defVal:d,countProperty:e, +parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(u,function(c){for(var p=g,u=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==a)p=p.nextSibling,u++;else break;var t={type:b,parentRow:g,index:u,isDeletable:!0,defVal:d,countProperty:e},u=n(a,"",t,0==u%2,l);f(a,d,t);p.parentNode.insertBefore(u,p.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,c,b,f,d,e,g){if(0<d){var l=Array(d); +c=null!=c?c.split(","):[];for(var p=0;p<d;p++)l[p]=null!=c[p]?c[p]:null!=f?f:"";v.push({name:a,values:l,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}function p(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function n(c,b,n,t,k){var v=n.dispName,m=n.type,z=document.createElement("tr");z.className="gePropRow"+(k?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow"; +z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);t=!1;null!=n.index&&(z.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",t=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(y.style.textAlign="right");z.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==m)y.appendChild(e(c,b,n));else if("bool"==m||"boolean"==m)y.appendChild(p(c,b,n));else if("enum"==m){var x= +n.enumList;for(k=0;k<x.length;k++)if(v=x[k],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(u,function(){var e=document.createElement("select");d(y,e);for(var g=0;g<x.length;g++){var l=x[g],p=document.createElement("option");p.value=mxUtils.htmlEntities(l.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(p)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change", +function(){var a=mxUtils.htmlEntities(e.value);f(c,a,n)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==m?y.appendChild(g(c,b,n.subType,n.subDefVal,n.countProperty,z,k)):"staticArr"==m?y.appendChild(l(c,b,n.subType,n.subDefVal,n.size,z,k)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(u,function(){function e(){var a=g.value,a=0==a.length&&"string"!=m?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",m="string"):(a=parseFloat(a), +a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==m?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className="gePropEditor";"int"!=m&&"float"!=m||n.allowAuto||(g.type="number",g.step="int"==m?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur", +function(){e()})})));n.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(u,function(a){f(c,"",n,n.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",y.appendChild(k));z.appendChild(y);return z}var u=this,t=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.style.whiteSpace="nowrap";m.style.width="100%";var k=document.createElement("tr");k.className="gePropHeader"; +var z=document.createElement("th");z.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;z.appendChild(y);mxUtils.write(z,mxResources.get("property"));k.style.cursor="pointer";var x=function(){var c=m.querySelectorAll(".gePropNonHeaderRow"),b;if(u.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(pa){}}else y.src= +Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(k,"click",function(){u.editorUi.propertiesCollapsed=!u.editorUi.propertiesCollapsed;x()});k.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");k.appendChild(z);m.appendChild(k);var q=!1,A=!1,B;for(B in c)if(k=c[B],"function"!=typeof k.isVisible||k.isVisible(b,this)){var D=null!=b.style[B]?mxUtils.htmlEntities(b.style[B]+""):null!=k.getDefaultValue? +k.getDefaultValue(b,this):k.defVal;if("separator"==k.type)A=!A;else{if("staticArr"==k.type)k.size=parseInt(b.style[k.sizeProperty]||c[k.sizeProperty].defVal)||0;else if(null!=k.dependentProps){for(var C=k.dependentProps,F=[],K=[],z=0;z<C.length;z++){var E=b.style[C[z]];K.push(c[C[z]].subDefVal);F.push(null!=E?E.split(","):[])}k.dependentPropsDefVal=K;k.dependentPropsVals=F}m.appendChild(n(B,D,k,q,A));q=!q}}for(z=0;z<v.length;z++)for(k=v[z],c=k.parentRow,b=0;b<k.values.length;b++)B=n(k.name,k.values[b], +{type:k.type,parentRow:k.parentRow,isDeletable:k.isDeletable,index:b,defVal:k.defVal,countProperty:k.countProperty,size:k.size},0==b%2,k.flipBkg),c.parentNode.insertBefore(B,c.nextSibling),c=B;a.appendChild(m);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),g=0;g<e.length;g++)d=mxUtils.removeStylename(d, +e[g]);var l=f.getModel().isVertex(b[c])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR, +a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l, +mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(b[c])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE? "1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+ g}d.appendChild(c)}d.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d); var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var m=document.createElement("div");m.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(m));mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(m);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& +mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&& (b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px": (b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= "3";Graph.prototype.edgeMode="move"!=urlParams.edge;var u=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button= -a.button,c.relatedTarget=a.relatedTarget}catch(H){}}u.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout; +a.button,c.relatedTarget=a.relatedTarget}catch(I){}}u.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout; this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"== c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop|| -0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars= +0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars= Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(z){null!=window.console&&console.log("Error in vars URL parameter: "+z)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var B=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c= -B.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,m,p,n,u){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&& -(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var l=C.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var v=l.ownerDocument,k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?k.setAttributeNS("type","text/css"):k.setAttribute("type","text/css");for(var z="",y="",x=0;x<this.extFonts.length;x++){var q=this.extFonts[x].name,B=this.extFonts[x].url;0==B.indexOf(Editor.GOOGLE_FONTS)? -z+="@import url("+B+");\n":y+='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+B+'");\n}\n'}k.appendChild(v.createTextNode(z+y));l.getElementsByTagName("defs")[0].appendChild(k)}null!=t&&(this.stylesheet=t,this.refresh());return l};var A=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=A.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&& +B.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,p,n,u){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&& +(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var k=D.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var v=k.ownerDocument,m=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?m.setAttributeNS("type","text/css"):m.setAttribute("type","text/css");for(var z="",y="",x=0;x<this.extFonts.length;x++){var q=this.extFonts[x].name,B=this.extFonts[x].url;0==B.indexOf(Editor.GOOGLE_FONTS)? +z+="@import url("+B+");\n":y+='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+B+'");\n}\n'}m.appendChild(v.createTextNode(z+y));k.getElementsByTagName("defs")[0].appendChild(m)}null!=t&&(this.stylesheet=t,this.refresh());return k};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&& (mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= function(){x.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&& -this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== +this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var F=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){F.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide, !0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c); null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var f=document.createElement("div");f.innerHTML=this.getLabel(c);for(var d=f.getElementsByTagName("a"),e=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(c,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==c.substring(0, 17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(L){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var f=c[b];this.updateCustomLinkAction(a,f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,f.scroll)}};Graph.prototype.updateCustomLinkAction= function(a,c){if(null!=c&&null!=c.cells){for(var b=[],f=0;f<c.cells.length;f++)if("*"==c.cells[f])b.push(c.cells[f]);else{var d=a[c.cells[f]];null!=d?""!=d&&b.push(d):b.push(c.cells[f])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!= -f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},m=0;m<a.length;m++)0<a[m].length&&(g[a[m].toLowerCase()]=!0,e++);for(m=0;m<c.length;m++)if(f&&this.model.getParent(c[m])==this.model.root||this.model.isVertex(c[m])||this.model.isEdge(c[m])){var p=null!=c[m].value&&"object"==typeof c[m].value?mxUtils.trim(c[m].value.getAttribute(b)|| -""):"",n=!1;if(0<p.length){if(p=p.toLowerCase().split(" "),p.length>=a.length){for(var u=n=0;u<p.length&&n<e;u++)null!=g[p[u]]&&n++;n=n==e}}else n=0==a.length;n&&d.push(c[m])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}}; +f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,e++);for(l=0;l<c.length;l++)if(f&&this.model.getParent(c[l])==this.model.root||this.model.isVertex(c[l])||this.model.isEdge(c[l])){var p=null!=c[l].value&&"object"==typeof c[l].value?mxUtils.trim(c[l].value.getAttribute(b)|| +""):"",n=!1;if(0<p.length){if(p=p.toLowerCase().split(" "),p.length>=a.length){for(var u=n=0;u<p.length&&n<e;u++)null!=g[p[u]]&&n++;n=n==e}}else n=0==a.length;n&&d.push(c[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}}; Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition", "all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation", this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity", @@ -3043,41 +3040,41 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo "/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d= [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst= [SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var G=mxMarker.createMarker;mxMarker.createMarker= -function(a,c,b,f,d,e,g,m,p,n){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);null!=u&&mxStencilRegistry.getStencil(u)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,Math.min(m,Math.max(parseInt(v.value),parseInt(l.value))));l.value=Math.max(1,Math.min(m,Math.min(parseInt(v.value),parseInt(l.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,m=c.currentTranslate,p=c.currentScale,n=c.view.translate,u= -c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),l=0,k=0,v=pa.get(),x=1/c.pageScale,z=B.checked;if(z)var x=parseInt(K.value),F=parseInt(na.value),x=Math.min(v.height*F/(t.height/c.view.scale),v.width*x/(t.width/c.view.scale));else x=parseInt(q.value)/(100*c.pageScale),isNaN(x)&&(f=1/c.pageScale,q.value="100 %");v=mxRectangle.fromRectangle(v);v.width=Math.ceil(v.width* -f);v.height=Math.ceil(v.height*f);x*=f;!z&&c.pageVisible?(t=c.getPageLayout(),l-=t.x*v.width,k-=t.y*v.height):z=!0;if(null==b){b=PrintDialog.createPrintPreview(c,x,v,0,l,k,z);b.pageSelector=!1;b.mathEnabled=!1;l=a.getCurrentFile();null!=l&&(b.title=l.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d= -c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=b.renderPage;b.renderPage=function(c,b,f,d,e,g){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject; -var p=A.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:p.className="geDisableMathJax";return p}}l=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(l=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=l&&(d.stylesheet=l,d.refresh())}else{v=c.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";b.backgroundColor=v;b.autoOrigin=z;b.appendGraph(c,x,l,k,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e= -0;e<c.extFonts.length;e++)l=c.extFonts[e].name,k=c.extFonts[e].url,0==k.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+k+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+l+'";\n\tsrc: url("'+k+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=m,c.currentScale=p,c.view.translate=n,c.view.scale=u);return b}var f=parseInt(ka.value)/ -100;isNaN(f)&&(f=1,ka.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=l.value,m=v.value,n=!u.checked,t=null;n&&(n=g==p&&m==p);if(!n&&null!=a.pages&&a.pages.length){var k=0,n=a.pages.length-1;u.checked||(k=parseInt(g)-1,n=parseInt(m)-1);for(var x=k;x<=n;x++){var z=a.pages[x],g=z==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),m=!0,k=!1,F=null,y=null;null==z.viewState&& -null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(m=z.viewState.pageVisible,k=z.viewState.mathEnabled,F=z.viewState.background,y=z.viewState.backgroundImage,g.extFonts=z.viewState.extFonts);g.background=F;g.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;g.pageVisible=m;g.mathEnabled=k;var A=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?z.getName():"pagenumber"==c?x+1:"pagecount"==c?null!=a.pages?a.pages.length:1:A.apply(this,arguments)};document.body.appendChild(g.container); -a.updatePageRoot(z);g.model.setRoot(z.root)}t=b(g,t,x!=n);g!=d&&g.container.parentNode.removeChild(g.container)}}else t=b(d);null==t?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln("showMathMenu: false,"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/SVG"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'), +function(a,c,b,f,d,e,g,l,p,n){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);null!=u&&mxStencilRegistry.getStencil(u)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,Math.min(l,Math.max(parseInt(v.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(v.value),parseInt(k.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,l=c.currentTranslate,p=c.currentScale,n=c.view.translate,u= +c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),k=0,m=0,v=ta.get(),x=1/c.pageScale,A=B.checked;if(A)var x=parseInt(K.value),z=parseInt(ma.value),x=Math.min(v.height*z/(t.height/c.view.scale),v.width*x/(t.width/c.view.scale));else x=parseInt(q.value)/(100*c.pageScale),isNaN(x)&&(f=1/c.pageScale,q.value="100 %");v=mxRectangle.fromRectangle(v);v.width=Math.ceil(v.width* +f);v.height=Math.ceil(v.height*f);x*=f;!A&&c.pageVisible?(t=c.getPageLayout(),k-=t.x*v.width,m-=t.y*v.height):A=!0;if(null==b){b=PrintDialog.createPrintPreview(c,x,v,0,k,m,A);b.pageSelector=!1;b.mathEnabled=!1;k=a.getCurrentFile();null!=k&&(b.title=k.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d= +c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var C=b.renderPage;b.renderPage=function(c,b,f,d,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject; +var p=C.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:p.className="geDisableMathJax";return p}}k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=k&&(d.stylesheet=k,d.refresh())}else{v=c.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";b.backgroundColor=v;b.autoOrigin=A;b.appendGraph(c,x,k,m,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e= +0;e<c.extFonts.length;e++)k=c.extFonts[e].name,m=c.extFonts[e].url,0==m.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+k+'";\n\tsrc: url("'+m+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=p,c.view.translate=n,c.view.scale=u);return b}var f=parseInt(ka.value)/ +100;isNaN(f)&&(f=1,ka.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=v.value,n=!u.checked,t=null;n&&(n=g==p&&l==p);if(!n&&null!=a.pages&&a.pages.length){var m=0,n=a.pages.length-1;u.checked||(m=parseInt(g)-1,n=parseInt(l)-1);for(var x=m;x<=n;x++){var A=a.pages[x],g=A==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,m=!1,z=null,y=null;null==A.viewState&& +null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(l=A.viewState.pageVisible,m=A.viewState.mathEnabled,z=A.viewState.background,y=A.viewState.backgroundImage,g.extFonts=A.viewState.extFonts);g.background=z;g.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;g.pageVisible=l;g.mathEnabled=m;var C=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?A.getName():"pagenumber"==c?x+1:"pagecount"==c?null!=a.pages?a.pages.length:1:C.apply(this,arguments)};document.body.appendChild(g.container); +a.updatePageRoot(A);g.model.setRoot(A.root)}t=b(g,t,x!=n);g!=d&&g.container.parentNode.removeChild(g.container)}}else t=b(d);null==t?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln("showMathMenu: false,"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/SVG"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'), n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),n.writeln("},"),n.writeln("SVG: {"),n.writeln('font: "'+(null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX")+'"'),n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('ignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('ignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),c&&(n.writeln("MathJax.Hub.Queue(function () {"), -n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t));null!=e&&(d.stylesheet=e,d.refresh())}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var m=1,p=1,n= +n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t));null!=e&&(d.stylesheet=e,d.refresh())}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,p=1,n= document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","all");u.setAttribute("type","radio");u.setAttribute("name","pages-printdialog");n.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var t=u.cloneNode(!0);u.setAttribute("checked","checked"); -t.setAttribute("value","range");n.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.style.width="50px";n.appendChild(l);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var v=l.cloneNode(!0);n.appendChild(v);mxEvent.addListener(l,"focus", -function(){t.checked=!0});mxEvent.addListener(v,"focus",function(){t.checked=!0});mxEvent.addListener(l,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(m=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+1;l.value=p;v.value=p;break}l.setAttribute("max",m);v.setAttribute("max",m);1<m&&e.appendChild(n);var k=document.createElement("div");k.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value", -"adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");k.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));k.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";k.appendChild(q);mxEvent.addListener(q,"focus",function(){x.checked=!0});e.appendChild(k);var n=n.cloneNode(!1),B=x.cloneNode(!0);B.setAttribute("value","fit");x.setAttribute("checked", -"checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(B);n.appendChild(g);k=document.createElement("table");k.style.display="inline-block";var F=document.createElement("tbody"),y=document.createElement("tr"),C=y.cloneNode(!0),A=document.createElement("td"),E=A.cloneNode(!0),D=A.cloneNode(!0),G=A.cloneNode(!0),I=A.cloneNode(!0),J=A.cloneNode(!0);A.style.textAlign="right";G.style.textAlign="right";mxUtils.write(A, -mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));D.appendChild(g);mxUtils.write(G,mxResources.get("fitToBy"));var na=K.cloneNode(!0);I.appendChild(na);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(na,"focus", -function(){B.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);y.appendChild(A);y.appendChild(E);y.appendChild(D);C.appendChild(G);C.appendChild(I);C.appendChild(J);F.appendChild(y);F.appendChild(C);k.appendChild(F);n.appendChild(k);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div"); -g.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";n.appendChild(ka);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;"; -n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),k.className="geBtn",g.appendChild(k));PrintDialog.previewEnabled&&(k=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),k.className="geBtn",g.appendChild(k));k=mxUtils.button(mxResources.get(PrintDialog.previewEnabled? -"print":"ok"),function(){a.hideDialog();f(!0)});k.className="geBtn gePrimaryBtn";g.appendChild(k);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&& -(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(D.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible), -this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var J=document.createElement("canvas"),I=new Image;I.onload=function(){try{J.getContext("2d").drawImage(I,0,0);var a=J.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};I.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}})(); +t.setAttribute("value","range");n.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";n.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var v=k.cloneNode(!0);n.appendChild(v);mxEvent.addListener(k,"focus", +function(){t.checked=!0});mxEvent.addListener(v,"focus",function(){t.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(v,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+1;k.value=p;v.value=p;break}k.setAttribute("max",l);v.setAttribute("max",l);1<l&&e.appendChild(n);var m=document.createElement("div");m.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value", +"adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");m.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));m.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";m.appendChild(q);mxEvent.addListener(q,"focus",function(){x.checked=!0});e.appendChild(m);var n=n.cloneNode(!1),B=x.cloneNode(!0);B.setAttribute("value","fit");x.setAttribute("checked", +"checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(B);n.appendChild(g);m=document.createElement("table");m.style.display="inline-block";var A=document.createElement("tbody"),y=document.createElement("tr"),D=y.cloneNode(!0),C=document.createElement("td"),F=C.cloneNode(!0),E=C.cloneNode(!0),G=C.cloneNode(!0),H=C.cloneNode(!0),J=C.cloneNode(!0);C.style.textAlign="right";G.style.textAlign="right";mxUtils.write(C, +mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";F.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));E.appendChild(g);mxUtils.write(G,mxResources.get("fitToBy"));var ma=K.cloneNode(!0);H.appendChild(ma);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(ma,"focus", +function(){B.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);y.appendChild(C);y.appendChild(F);y.appendChild(E);D.appendChild(G);D.appendChild(H);D.appendChild(J);A.appendChild(y);A.appendChild(D);m.appendChild(A);n.appendChild(m);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div"); +g.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";n.appendChild(ka);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;"; +n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),m.className="geBtn",g.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),m.className="geBtn",g.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled? +"print":"ok"),function(){a.hideDialog();f(!0)});m.className="geBtn gePrimaryBtn";g.appendChild(m);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&& +(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible), +this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var J=document.createElement("canvas"),H=new Image;H.onload=function(){try{J.getContext("2d").drawImage(H,0,0);var a=J.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};H.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}})(); (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars= "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&& !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4, -topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,e,m,n,l){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&& -null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(a);(new Image).src=c+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(u){}try{l||null==window.console|| -console.error(n,a,b,d,e,m)}catch(u){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length> +topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,e,l,n,k){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&& +null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";l=null!=l?l:Error(a);(new Image).src=c+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=l&&null!=l.stack?"&stack="+encodeURIComponent(l.stack):"")}}catch(u){}try{k||null==window.console|| +console.error(n,a,b,d,e,l)}catch(u){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length> b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b, e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad= -!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(n){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b= -document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a); +!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(n){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}try{b= +document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(l){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a); b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner= function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize= "9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&& @@ -3085,13 +3082,13 @@ function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.r c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)|| 80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))}; EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("<mxfile ");if(0<=d){var e=c.lastIndexOf("</mxfile>");e>d&&(b=c.substring(d,e+15).replace(/>/g, -">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),n=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(v){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData= +">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var l=mxUtils.parseXml(c),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(v){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData= function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var n=this.updatePageRoot(new DiagramPage(d[e])); null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,n,0==e?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root= -this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,n,l,t,u,k,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;u=null!=u?u:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id", -Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}k?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"), +this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,l,n,k,t,u,m,q){b=null!=b?b:this.editor.graph;l=null!=l?l:!1;u=null!=u?u:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id", +Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}m?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"), g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()), -a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!m&&(l||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b, +a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!l&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||!l&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b, e,null,t,u,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0): (a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState, f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))): @@ -3100,221 +3097,221 @@ n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE] delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c= 0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!= c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(), -this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,m,n,l,t,u,k){m=null!=m?m:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(k= -!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}l=null!=l?l:this.getXmlFileData(m,n,k);u=null!=u?u:this.getCurrentFile();a=this.createFileData(l,c,u,window.location.href,a,b,d,e,m,t,k);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container); -return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom", -"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+ -(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ -m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=m&&(m=m.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null== -m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+ -'"></div>\n'+(null==m?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a, +this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,l,n,k,t,u,m){l=null!=l?l:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(m= +!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(l,n,m);u=null!=u?u:this.getCurrentFile();a=this.createFileData(k,c,u,window.location.href,a,b,d,e,l,t,m);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container); +return a};EditorUi.prototype.getHtml=function(a,b,d,e,l,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==l&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom", +"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=l&&(l=l.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+ +(null==l?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":"")+"</head>\n<body"+(null==l&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==l?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+ +l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,l){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=l&&(l=l.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null== +l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+ +'"></div>\n'+(null==l?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a, mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber", [d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a); -null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),l=n.getChildren(n.root),d=0;d<l.length;d++){var t=l[d];n.setVisible(t,a[t.id]||!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)|| -/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,m,n,l,t,u,k,q){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!m),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+ -this.getFileData(!0,null,null,null,e,m,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var d=this.createDownloadRequest(c, -a,e,b,l,m,t,u,k,q);this.editor.graph.pageVisible=f;return d}catch(L){this.handleError(L)}}));else{var p=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var B=this.editor.graph.background;if(l||B==mxConstants.NONE)B=null;var F=this.editor.graph.getSvg(B,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(F); -this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,m,n,l,t,u,k){var c=this.editor.graph,f=c.getGraphBounds(); -d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};k=k?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(k="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"==b&&m?n=mxConstants.NONE:m||null!=n&&n!=mxConstants.NONE||(n="#ffffff");m={globalVars:c.getExportVariables()}; -u&&(m.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+k+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=l?"&scale="+l:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash, +null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),d=0;d<k.length;d++){var t=k[d];n.setVisible(t,a[t.id]||!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)|| +/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,l,n,k,t,u,m,q){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!l),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+ +this.getFileData(!0,null,null,null,e,l,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var d=this.createDownloadRequest(c, +a,e,b,k,l,t,u,m,q);this.editor.graph.pageVisible=f;return d}catch(L){this.handleError(L)}}));else{var p=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var A=this.editor.graph.background;if(k||A==mxConstants.NONE)A=null;var B=this.editor.graph.getSvg(A,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(B); +this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,l,n,k,t,u,m){var c=this.editor.graph,f=c.getGraphBounds(); +d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};m=m?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(m="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"==b&&l?n=mxConstants.NONE:l||null!=n&&n!=mxConstants.NONE||(n="#ffffff");l={globalVars:c.getExportVariables()}; +u&&(l.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+m+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(l))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash, f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval? -parseInt(a.interval):6E4,g=null,m=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(m, -e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();m()}));n();m()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign, -a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var l=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=n.getCell(a.getAttribute("id"));if(null!=t){try{var u=a.getAttribute("value");if(null!=u){var k=mxUtils.parseXml(u).documentElement;if(null!=k)if("1"==k.getAttribute("replace-value"))n.setValue(t, -k);else for(var q=k.attributes,C=0;C<q.length;C++)e.setAttributeForCell(t,q[C].nodeName,0<q[C].nodeValue.length?q[C].nodeValue:null)}}catch(y){null!=window.console&&console.log("Error in value for "+t.id+": "+y)}try{var A=a.getAttribute("style");null!=A&&e.model.setStyle(t,A)}catch(y){null!=window.console&&console.log("Error in style for "+t.id+": "+y)}try{var x=a.getAttribute("icon");if(null!=x){var E=0<x.length?JSON.parse(x):null;null!=E&&E.append||e.removeCellOverlays(t);null!=E&&e.addCellOverlay(t, -c(E))}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),D=e.getCellGeometry(t);if(null!=D){D=D.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?D.x+=J:"dy"==key?D.y+=J:"dw"==key?D.width+=J:"dh"==key?D.height+=J:D[key]=parseFloat(G[key])}e.model.setGeometry(t,D)}}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!= -I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(l=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!= -l&&this.chromelessResize&&this.chromelessResize(!0,l)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),l=e.getMonth()+1,t=e.getDate(),u=e.getHours(),k=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+l+"-"+t+"-"+u+"-"+k+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c= +parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l, +e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign, +a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=n.getCell(a.getAttribute("id"));if(null!=t){try{var u=a.getAttribute("value");if(null!=u){var m=mxUtils.parseXml(u).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))n.setValue(t, +m);else for(var q=m.attributes,D=0;D<q.length;D++)e.setAttributeForCell(t,q[D].nodeName,0<q[D].nodeValue.length?q[D].nodeValue:null)}}catch(y){null!=window.console&&console.log("Error in value for "+t.id+": "+y)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(t,C)}catch(y){null!=window.console&&console.log("Error in style for "+t.id+": "+y)}try{var x=a.getAttribute("icon");if(null!=x){var F=0<x.length?JSON.parse(x):null;null!=F&&F.append||e.removeCellOverlays(t);null!=F&&e.addCellOverlay(t, +c(F))}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),E=e.getCellGeometry(t);if(null!=E){E=E.clone();for(key in G){var J=parseFloat(G[key]);"dx"==key?E.x+=J:"dy"==key?E.y+=J:"dw"==key?E.width+=J:"dh"==key?E.height+=J:E[key]=parseFloat(G[key])}e.model.setGeometry(t,E)}}}catch(y){null!=window.console&&console.log("Error in icon for "+t.id+": "+y)}}}else if("model"==a.nodeName){for(var H=a.firstChild;null!= +H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(a.firstChild)).decode(H,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!= +k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),k=e.getMonth()+1,t=e.getDate(),u=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+k+"-"+t+"-"+u+"-"+m+"-"+e));return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c= this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&& 0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener); a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()|| this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on": "off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+ v.stack})}catch(t){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(v,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]); -var l=a[e].node.cloneNode(!1);l.removeAttribute("name");f.root=a[e].root;var t=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");l.appendChild(t);null!=b&&(b.eltCount+=l.getElementsByTagName("*").length,b.nodeCount+=l.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(l,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&& +var k=a[e].node.cloneNode(!1);k.removeAttribute("name");f.root=a[e].root;var t=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");k.appendChild(t);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,f){return!f||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&& "previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e, -b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,m,n,l){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| +b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,e,l,n,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage|| mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b); return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container; if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,d,c.documentElement.getAttribute("title"), b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()? (null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var u=p.parentNode.previousSibling;e=u.getAttribute("title");null!=e&&0<e.length&&".scratchpad"!=a.title&&u.setAttribute("title", -this.getLibraryStorageHint(a)+"\n"+e);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");u.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.cursor="pointer";k.style.margin= -"0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var A=this.editor.graph,x=null,E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p, -b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=k.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",l.insertBefore(x,l.firstChild),u.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!= -x.parentNode&&(x.parentNode.removeChild(x),u.style.paddingRight=18*l.childNodes.length+"px")})):null==q&&(q=k.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),l.insertBefore(q,l.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(u.style.paddingRight=18*l.childNodes.length+"px",q.parentNode.removeChild(q), -q=null)});mxEvent.consume(c)})),u.style.paddingRight=18*l.childNodes.length+"px")}),D=mxUtils.bind(this,function(a,c,d,e){a=A.cloneCells(mxUtils.sortCells(A.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var m=A.getCellGeometry(a[g]);null!=m&&m.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);G(d);null!= -f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=A.getSelectionCells(),b=A.view.getBounds(c),d=A.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=A.view.translate.x;b.y-=A.view.translate.y;D(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p, -function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.first&&(A.graphHandler.suspend(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(p.style.backgroundColor="",p.style.cursor="default",this.sidebar.showTooltips=!0, -A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.first&&(A.graphHandler.resume(),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",A.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect= -"copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,m,n,u,l,t,k){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("", -new mxGeometry(0,0,n,u),c)],c[0].vertex=!0,D(c,new mxRectangle(0,0,n,u),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,q=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(e.documentElement)); -g(m,p);b=b.concat(m);G(a);this.spinner.stop();v=!0}catch(N){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var u=this.stringToCells(Editor.getDiagramNodeXml(n[m])),l=this.editor.graph.getBoundingBoxFromGeometry(u);D(u,new mxRectangle(0,0,l.width,l.height),a)}v=!0}catch(N){null!=window.console&&console.log("error in drop handler:",N)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")})); -null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=k&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(k,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=k?this.parseFile(k,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",Editor.editImage);k.setAttribute("title",mxResources.get("edit"));l.insertBefore(k,l.firstChild);mxEvent.addListener(k,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)== -p&&E(a)});e=k.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));l.insertBefore(e,l.firstChild);mxEvent.addListener(e,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink); -mxEvent.consume(a)})),l.insertBefore(e,l.firstChild))}u.appendChild(l);u.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)), +this.getLibraryStorageHint(a)+"\n"+e);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");u.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.cursor="pointer";m.style.margin= +"0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var C=this.editor.graph,x=null,F=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p, +b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=m.cloneNode(!1),x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",k.insertBefore(x,k.firstChild),u.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!= +x.parentNode&&(x.parentNode.removeChild(x),u.style.paddingRight=18*k.childNodes.length+"px")})):null==q&&(q=m.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",mxResources.get("save")),k.insertBefore(q,k.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(u.style.paddingRight=18*k.childNodes.length+"px",q.parentNode.removeChild(q), +q=null)});mxEvent.consume(c)})),u.style.paddingRight=18*k.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,e){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);G(d);null!= +f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),J=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=C.getSelectionCells(),b=C.view.getBounds(c),d=C.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=C.view.translate.x;b.y-=C.view.translate.y;E(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p, +function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor="",p.style.cursor="default",this.sidebar.showTooltips=!0, +C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect= +"copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,l,n,u,k,t,m){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("", +new mxGeometry(0,0,n,u),c)],c[0].vertex=!0,E(c,new mxRectangle(0,0,n,u),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,q=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var l=JSON.parse(mxUtils.getTextContent(e.documentElement)); +g(l,p);b=b.concat(l);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var u=this.stringToCells(Editor.getDiagramNodeXml(n[l])),k=this.editor.graph.getBoundingBoxFromGeometry(u);E(u,new mxRectangle(0,0,k.width,k.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")})); +null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=m&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?this.importVisio(m,function(a){q(a,"text/xml")},null,k):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status? +"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",F);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)== +p&&F(a)});e=m.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));k.insertBefore(e,k.firstChild);mxEvent.addListener(e,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink); +mxEvent.consume(a)})),k.insertBefore(e,k.firstChild))}u.appendChild(k);u.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)), 0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS? "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor= "black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", -Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport? -480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,640,440,!0,!1, +Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,l){a=new ImageDialog(this,a,b,d,e,l);this.showDialog(a.container,Graph.fileSupport? +480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,l){a=new LibraryDialog(this,a,b,d,e,l);this.showDialog(a.container,640,440,!0,!1, mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position= "absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct(); -mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,m,n,l){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(x){}if(null!=f||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError")); -var g=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),p=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){l=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var k= -null!=n?n:window.location.hash;if(null!=k&&("#G"==k.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==k.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){k="#U"==k.substring(0,2)?k.substring(45,k.lastIndexOf("%26ex")):k.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this, -function(){this.editor.graph.openLink("https://drive.google.com/open?id="+k);this.handleError(a,b,d,e,m)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML=" ";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option"); +mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,l,n,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(x){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError")); +var g=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),p=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=l?l:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m= +null!=n?n:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this, +function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,d,e,l)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML=" ";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option"); mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;f.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var b=f.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d|| -(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?l=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?l=mxUtils.htmlEntities(f.response.error):"undefined"!== -typeof window.App&&(f.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,l,g,d,p,null,null,n,v,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container, -340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,m,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&& +(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!== +typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,d,p,null,null,n,v,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container, +340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,l,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,l,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&& null!=mxSettings.settings["close"+a])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn"; c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;"; f.appendChild(c);mxUtils.write(f,b);document.body.appendChild(f);this.bannerShowing=!0;var e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";e.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));e.appendChild(b); -f.style.paddingBottom="30px";f.appendChild(e);var l=mxUtils.bind(this,function(c){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);l()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b&&(mxEvent.consume(a), -d(),l())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){l(!0)}),1E3)}),3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= -function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,m){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a, -b,d,m);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width= -"600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b+=".drawio");if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0): +f.style.paddingBottom="30px";f.appendChild(e);var k=mxUtils.bind(this,function(c){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b&&(mxEvent.consume(a), +d(),k())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k(!0)}),1E3)}),3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= +function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,l){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a, +b,d,l);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width= +"600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,l){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b+=".drawio");if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0): (d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a"),f=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./), -f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a,b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,m,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL, -a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),l=0;l<f;++l){for(var t=1024*l,u=Math.min(t+1024,d),k=Array(u-t),q=0;t<u;++q,++t)k[q]=c[t].charCodeAt(0);e[l]=new Uint8Array(k)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,m,n,l){n=null!=n?n:!1;l=null!=l?l: -"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(n);isLocalStorage&&m++;var c=4>=m?2:6<m?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&& -this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(A){this.handleError(A)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,l,null,1<m,c,a,d,e);n=this.isServices(m)?m>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!= +f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a,b,d,e,l).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,l,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL, +a+(null!=d?"&mime="+d:"")+(null!=l?"&format="+l:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),k=0;k<f;++k){for(var m=1024*k,u=Math.min(m+1024,d),q=Array(u-m),B=0;m<u;++B,++m)q[B]=c[m].charCodeAt(0);e[k]=new Uint8Array(q)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,l,n,k){n=null!=n?n:!1;k=null!=k?k: +"vsdx"!=l&&(!mxClient.IS_IOS||!navigator.standalone);l=this.getServiceCount(n);isLocalStorage&&l++;var c=4>=l?2:6<l?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&& +this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(C){this.handleError(C)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,k,null,1<l,c,a,d,e);n=this.isServices(l)?l>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!= b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b= mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily= "Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex= d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer"; a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}), -Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,m,n,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this, +Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,l){this.isLocalFileSave()?this.saveLocalFile(d,a,e,l,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,l,b,c)}),d,l,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,l,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this, function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,n,!0,c,d)}catch(x){this.handleError(x)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop(); -if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,n,!0,c,d)}catch(x){this.handleError(x)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<c,f,e,n,m);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!= -a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,m,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,m,n,l,k,u,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f, -a,l,k,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,u,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE? -this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(G){this.handleError(G)}};EditorUi.prototype.addRadiobox=function(a,b,d,e,m,n,l){return this.addCheckbox(a,d,e,m,n,l,!0, -b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,n,l,k){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();c.id=l;null!=k&&c.setAttribute("name",k);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",l),a.appendChild(d),m||mxUtils.br(a)); +if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,n,!0,c,d)}catch(x){this.handleError(x)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,f,e,n,l);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!= +a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,l,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,l,n,k,m,u,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f, +a,k,m,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();l&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,u,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE? +this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(G){this.handleError(G)}};EditorUi.prototype.addRadiobox=function(a,b,d,e,l,n,k){return this.addCheckbox(a,d,e,l,n,k,!0, +b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,l,n,k,m){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();c.id=k;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",k),a.appendChild(d),l||mxUtils.br(a)); return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy")); e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change", -mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){l.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+ +mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+ e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value", -"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",l=null,l=mxUtils.button("", -mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();l.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";l.style.marginLeft="4px";l.style.height="22px";l.style.width="22px";l.style.position="relative";l.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";l.className="geColorBtn";a.appendChild(l);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink= -function(a,b,d,e,m,n,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=l?d="#U"+encodeURIComponent(l):(c= -this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+ -"/"+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,n,l,k,u,q,B){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);u||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&& -(u&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+ +"blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("", +mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink= +function(a,b,d,e,l,n,k,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=l&&0<l.length&&f.push("edit="+encodeURIComponent(l)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?d="#U"+encodeURIComponent(k):(c= +this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+ +"/"+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,l,n,k,m,u,q,B){this.getBasenames();var c={};""!=l&&l!=mxConstants.NONE&&(c.highlight=l);"auto"!==e&&(c.target=e);u||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);m&&d.push("layers");0<d.length&& +(u&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";B(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+ a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;"; var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","type-embedhtmldialog");f=p.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var u=document.createElement("span");mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(u);mxUtils.br(g);g.appendChild(p);u=document.createElement("span");mxUtils.write(u,mxResources.get("publicDiagramUrl")); -g.appendChild(u);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(u=document.createElement("a"),u.style.paddingLeft="12px",u.style.color="gray",u.setAttribute("href","javascript:void(0);"),mxUtils.write(u,mxResources.get("share")),g.appendChild(u),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&p.setAttribute("disabled","disabled");c.appendChild(g);var k= -this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";c.appendChild(A);var x=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(c,mxResources.get("allPages"),g,!g),G=this.addCheckbox(c,mxResources.get("layers"),!0), -D=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,D),I=J.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&D.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(p.checked?d:null,q.checked,A.value,k.getTarget(),k.getColor(),x.checked,E.checked, -G.checked,D.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,m,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!= -g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())})); -l.style.marginTop="12px";l.className="geBtn";p.appendChild(l);c.appendChild(p);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));p.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this, -null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var k=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),k=document.createElement("input"),k.setAttribute("type","text"),k.style.marginRight="16px",k.style.width="50px",k.style.marginLeft="6px",k.style.marginRight="16px",k.style.marginBottom="10px",k.value="100%",c.appendChild(k),mxUtils.write(c,mxResources.get("height")+ -":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var x=this.addLinkSection(c,n);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==g||g.constructor!=window.DriveFile||b)E=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(c,mxResources.get("lightbox"),!0),D=this.addEditButton(c,G),J=D.getEditInput(),I=this.addCheckbox(c,mxResources.get("layers"), -!0);I.style.marginLeft=J.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(I.removeAttribute("disabled"),J.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&G.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){m(x.getTarget(),x.getColor(),null==E? -!0:E.checked,G.checked,D.getLink(),I.checked,null!=k?k.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=k?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f, -mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";c.appendChild(f);if(m){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type", -"text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c)}var l=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a= -new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(p.value)||0;d(!l.checked,null!=k?k.checked:!1,null!=q?q.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(m?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,m,n,l,k){l=null!=l?l:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==k?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +g.appendChild(u);var k=this.getCurrentFile();null==d&&null!=k&&k.constructor==window.DriveFile&&(u=document.createElement("a"),u.style.paddingLeft="12px",u.style.color="gray",u.setAttribute("href","javascript:void(0);"),mxUtils.write(u,mxResources.get("share")),g.appendChild(u),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));f.setAttribute("checked","checked");null==d&&p.setAttribute("disabled","disabled");c.appendChild(g);var m= +this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";c.appendChild(C);var x=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(c,mxResources.get("allPages"),g,!g),G=this.addCheckbox(c,mxResources.get("layers"),!0), +E=this.addCheckbox(c,mxResources.get("lightbox"),!0),J=this.addEditButton(c,E),H=J.getEditInput();H.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&E.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(p.checked?d:null,q.checked,C.value,m.getTarget(),m.getColor(),x.checked,F.checked, +G.checked,E.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!= +g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));p.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())})); +k.style.marginTop="12px";k.className="geBtn";p.appendChild(k);c.appendChild(p);k=document.createElement("a");k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));p.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this, +null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+ +":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var x=this.addLinkSection(c,n);d=null!=this.pages&&1<this.pages.length;var F=null;if(null==g||g.constructor!=window.DriveFile||b)F=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,G),J=E.getEditInput(),H=this.addCheckbox(c,mxResources.get("layers"), +!0);H.style.marginLeft=J.style.marginLeft;H.style.marginBottom="16px";H.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(H.removeAttribute("disabled"),J.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&G.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(x.getTarget(),x.getColor(),null==F? +!0:F.checked,G.checked,E.getLink(),H.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f, +mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";c.appendChild(f);if(l){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type", +"text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";c.appendChild(p);mxUtils.br(c)}var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a= +new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(p.value)||0;d(!k.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,l,n,k,m){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; c.appendChild(p);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder|| -"0";c.appendChild(q);mxUtils.br(c);var v=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=k),G=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.setAttribute("type","checkbox");n&&(c.appendChild(D),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(G,"change",function(){G.checked? -D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(D.setAttribute("checked","checked"),D.defaultChecked=!0);var J=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");b&&(c.appendChild(I),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+= -26);var y=null;if("png"==k||"jpeg"==k)y=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var K=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=k),z=null!=this.pages&&1<this.pages.length,L=this.addCheckbox(c,z?mxResources.get("allPages"):"",z,!z,null,"jpeg"!=k);L.style.marginLeft="24px";L.style.marginBottom="16px";z?g+=26:L.style.display="none";mxEvent.addListener(K,"change",function(){K.checked&&z?L.removeAttribute("disabled"): -L.setAttribute("disabled","disabled")});l&&z||L.setAttribute("disabled","disabled");var P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="8px";P.style.marginRight="10px";P.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));P.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));P.appendChild(a);a=document.createElement("option"); -a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));P.appendChild(a);"svg"==k&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(P),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;m(t.value,v.checked,!G.checked,J.checked,K.checked,I.checked,q.value,D.checked,!L.checked,P.value,null!=y?y.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null, -null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var p=this.addCheckbox(c,mxResources.get("fit"), -!0),l=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),k=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),A=this.addEditButton(c,q),x=A.getEditInput(),E=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),E,!E);G.style.marginLeft=x.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),x.removeAttribute("disabled")): -(G.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"));x.checked&&q.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(p.checked,l.checked,k.checked,q.checked,A.getLink(),G.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,m,n,l,k){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+p+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null, -null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?c("data:image/png;base64,"+p.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,d,e,m,n,l){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var k=" ",q="";e&&(k="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+k+"/>")}))}else q="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date- +"0";c.appendChild(q);mxUtils.br(c);var v=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.style.marginLeft="24px";E.setAttribute("disabled","disabled");E.setAttribute("type","checkbox");n&&(c.appendChild(E),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(G,"change",function(){G.checked? +E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(E.setAttribute("checked","checked"),E.defaultChecked=!0);var J=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||H.setAttribute("disabled","disabled");b&&(c.appendChild(H),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+= +26);var y=null;if("png"==m||"jpeg"==m)y=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var K=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),z=null!=this.pages&&1<this.pages.length,L=this.addCheckbox(c,z?mxResources.get("allPages"):"",z,!z,null,"jpeg"!=m);L.style.marginLeft="24px";L.style.marginBottom="16px";z?g+=26:L.style.display="none";mxEvent.addListener(K,"change",function(){K.checked&&z?L.removeAttribute("disabled"): +L.setAttribute("disabled","disabled")});k&&z||L.setAttribute("disabled","disabled");var O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="8px";O.style.marginRight="10px";O.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));O.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));O.appendChild(a);a=document.createElement("option"); +a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));O.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(O),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;l(t.value,v.checked,!G.checked,J.checked,K.checked,H.checked,q.value,E.checked,!L.checked,O.value,null!=y?y.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null, +null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var p=this.addCheckbox(c,mxResources.get("fit"), +!0),k=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,q),x=C.getEditInput(),F=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),F,!F);G.style.marginLeft=x.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(F&&G.removeAttribute("disabled"),x.removeAttribute("disabled")): +(G.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"));x.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(p.checked,k.checked,m.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,l,n,k,m){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+c+'"'+p+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null, +null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?c("data:image/png;base64,"+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,d,e,l,n,k){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var m=" ",q="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){k('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=q&&c.setAttribute("style",q),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),k(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date- a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"== a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=a){if(a.hasAttribute("scale")){var d= -parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,m){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement, -!0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),p=c.getGlobalVariable,l=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:p.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(l.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f, -"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,m)}catch(B){null!=b&&b(B)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,m,n,l,k){k=null!=k?k:!0;l=b.background;l==mxConstants.NONE&&(l=null);n=b.getSvg(l,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&& -n.setAttribute("content",a);null!=d&&n.setAttribute("resource",d);if(null!=m)this.embedFonts(n,mxUtils.bind(this,function(a){k?this.editor.convertImages(a,mxUtils.bind(this,function(a){m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,l){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement, +!0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),p=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:p.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f, +"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(C){null!=b&&b(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,l)}catch(B){null!=b&&b(B)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,n,k,m){m=null!=m?m:!0;k=b.background;k==mxConstants.NONE&&(k=null);n=b.getSvg(k,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&& +n.setAttribute("content",a);null!=d&&n.setAttribute("resource",d);if(null!=l)this.embedFonts(n,mxUtils.bind(this,function(a){m?this.editor.convertImages(a,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(p){b(a)}}))}catch(g){b(a)}}))}; -EditorUi.prototype.exportImage=function(a,b,d,e,m,n,l,k,u,q,B){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,k):null,u,null==this.pages||0==this.pages.length,B)}catch(x){"Invalid image"==x.message?this.downloadFile(u): -this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,n,l,q)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,m){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var l= -this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var p=l.getElementsByTagName("diagram");if(1==p.length)l=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],k=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),l=Editor.parseDiagramNode(p[0]),e=!1,k=1);for(;k<p.length;k++){var q=p[k].getAttribute("id"); -p[k].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(p[k]));a[q]=p[k].getAttribute("id");var x=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));f.model.execute(new ChangePage(this,A,A,x,!0));g.push(A)}this.updatePageLinks(a,g)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=f.importGraphModel(l,b,d,e),null!=c))for(k=0;k<c.length;k++)this.updatePageLinksForCell(a,c[k])}finally{f.model.endUpdate()}}}catch(E){if(m)throw E;this.handleError(E)}return c}; -EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),l=!1,k=0;k<e.length;k++)f=e[k].getAttribute("href"),null!=f&&(e[k].setAttribute("href",this.updatePageLink(a,f)), -l=!0);l&&d.labelChanged(b,c.innerHTML)}for(k=0;k<d.model.getChildCount(b);k++)this.updatePageLinksForCell(a,d.model.getChildAt(b,k))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0, +EditorUi.prototype.exportImage=function(a,b,d,e,l,n,k,m,u,q,B){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,d,m):null,u,null==this.pages||0==this.pages.length,B)}catch(x){"Invalid image"==x.message?this.downloadFile(u): +this.handleError(x)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,n,k,q)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var p= +this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var k=p.getElementsByTagName("diagram");if(1==k.length)p=Editor.parseDiagramNode(k[0]),null!=this.currentPage&&(a[k[0].getAttribute("id")]=this.currentPage.getId());else if(1<k.length){var g=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[k[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(k[0]),e=!1,m=1);for(;m<k.length;m++){var q=k[m].getAttribute("id"); +k[m].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(k[m]));a[q]=k[m].getAttribute("id");var x=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[x+1]));f.model.execute(new ChangePage(this,C,C,x,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(c=f.importGraphModel(p,b,d,e),null!=c))for(m=0;m<c.length;m++)this.updatePageLinksForCell(a,c[m])}finally{f.model.endUpdate()}}}catch(F){if(l)throw F;this.handleError(F)}return c}; +EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var e=c.getElementsByTagName("a"),k=!1,m=0;m<e.length;m++)f=e[m].getAttribute("href"),null!=f&&(e[m].setAttribute("href",this.updatePageLink(a,f)), +k=!0);k&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0, 13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(v){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e); -try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(B){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var l=new XMLHttpRequest; -l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(x){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(A){d(A)}else d({})});l.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(B){d(B)}}else this.spinner.stop(), -this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}); +try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var l=e.lastIndexOf("/");0<=l&&l<e.length&&(e=e.substring(l+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(B){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var k=new XMLHttpRequest; +k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(x){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(C){d(C)}else d({})});k.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(B){d(B)}}else this.spinner.stop(), +this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(l){d(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}); this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}); -"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&& -console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad= +"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!=window.console&& +console.error(l),d(l)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad= !1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));d(c.convertDataUri(Editor.createSvgDataUri(a)),f, g)}else e({message:mxResources.get("invalidInput")})}catch(B){e(B)}})}catch(v){e(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+ a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType= -"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,m=g.indexOf(","),l=decodeURIComponent(escape(atob(g.substring(m+1)))),n=mxUtils.parseXml(l).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}d(c.result,a, -f)}catch(J){e(J)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,m,l,k){l=null!=l?l:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&& -!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f= -Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f, -b,d,l,!0);if(0<g.length)return g}catch(C){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)), +"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,l=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(l+1)))),n=mxUtils.parseXml(k).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}d(c.result,a, +f)}catch(J){e(J)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,l,k,m){k=null!=k?k:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&& +!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f= +Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f, +b,d,k,!0);if(0<g.length)return g}catch(D){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)), g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a= -Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(c){this.editor.graph.setSelectionCells(this.importXml(c,b,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"), -mxUtils.bind(this,function(){var c=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(c.container,610,360,!0,!1);c.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;m=null;c.getModel().beginUpdate();try{m=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)); -a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");m.value=a;c.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var n=c.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=n.width;m.geometry.height=n.height}Graph.isLink(m.value)&&c.setLinkForCell(m,m.value);m.geometry.width+=c.gridSize;m.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024< +Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(c){this.editor.graph.setSelectionCells(this.importXml(c,b,d,k));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"), +mxUtils.bind(this,function(){var c=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(c.container,610,360,!0,!1);c.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;l=null;c.getModel().beginUpdate();try{l=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[l]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)); +a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");l.value=a;c.updateCellSize(l);if(0<this.maxTextWidth&&l.geometry.width>this.maxTextWidth){var n=c.getPreferredSizeForCell(l,this.maxTextWidth);l.geometry.width=n.width;l.geometry.height=n.height}Graph.isLink(l.value)&&c.setLinkForCell(l,l.value);l.geometry.width+=c.gridSize;l.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024< a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0, 14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import"; if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container, -360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,m=!1;f.forEach(function(a, -c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(m=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):m||d()}}, -function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,m,l,k,t,u,q,B){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):c=this.importXml(a,d,e,q);null!=t&&t(c)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=B?null: -this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),u=!0)),u||(b=this.editor.graph,B=a.indexOf(";"),0<B&&(a=a.substring(0,B)+a.substring(a.indexOf(",",B+1))),q&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,m,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)|| -/(\.vs(x|sx?))($|\?)/i.test(k))?(c=!0,this.importVisio(u,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(c=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=t&&t(null))}),k)):0==a.indexOf("PK")&&null!=u?(c=!0,this.importZipFile(u,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)|| -/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==t||t(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,m,l,k,t,u,q,B,C){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=B||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g= -this.editor.graph,n=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,b,d,f,e,g,m,l,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,m)),null):this.importFile(a,b,d,f,e,g,m,l,n,c,C)}catch(V){return this.handleError(V),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,v=[],x=mxUtils.bind(this,function(a,c){v[a]=c;if(0== ---u){this.spinner.stop();if(null!=t)t(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}l(b)}}),E=0;E<p;E++)mxUtils.bind(this,function(c){var l=a[c];if(null!=l){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(u+1)))), -z=mxUtils.parseXml(t),t=z.getElementsByTagName("svg");if(0<t.length){var t=t[0],v=C?null:t.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var f=a[0],k=f.getAttribute("width"),t= -f.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox","0 0 "+k+" "+t);else if(isNaN(k)||isNaN(t)){var v=q.split(" ");3<v.length&&(k=parseFloat(v[2]),t=parseFloat(v[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,t)),E=m(p,l.type,b+c*n,d+c*n,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(t* -x)),l.name);if(isNaN(k)||isNaN(t)){var y=new Image;y.onload=mxUtils.bind(this,function(){k=Math.max(1,y.width);t=Math.max(1,y.height);E[0].geometry.width=k;E[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+k+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[E[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return E}}}catch(W){}return null})):x(c,mxUtils.bind(this,function(){return m(v, -"text/xml",b+c*n,d+c*n,0,0,l.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==l.type){var E=C?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var y=new Image;y.src=a.target.result;x(c,mxUtils.bind(this,function(){return m(E,"text/xml",b+c*n,d+c*n,y.width,y.height,l.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"), -mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,p){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var u=f&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(e/k,e/p)):1;return m(g,l.type,b+c*n,d+c*n,Math.round(k*u),Math.round(p*u),l.name)}this.handleError({message:mxResources.get("imageTooBig")}); -return null}))}),f,e,B)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,m(p,l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?m(null,l.type,b+c*n,d+c*n,240,160,l.name,function(a){x(c,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?p.readAsDataURL(l):p.readAsText(l)}})(E)});if(g){g=[]; +360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,l=!1;f.forEach(function(a, +c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):l||d()}}, +function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,l,k,m,t,u,q,B){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):c=this.importXml(a,d,e,q);null!=t&&t(c)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=B?null: +this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),u=!0)),u||(b=this.editor.graph,B=a.indexOf(";"),0<B&&(a=a.substring(0,B)+a.substring(a.indexOf(",",B+1))),q&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,l,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=u&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)|| +/(\.vs(x|sx?))($|\?)/i.test(m))?(c=!0,this.importVisio(u,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(c=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=t&&t(null))}),m)):0==a.indexOf("PK")&&null!=u?(c=!0,this.importZipFile(u,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(m)|| +/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==t||t(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,l,k,m,t,u,q,B,D){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=B||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g= +this.editor.graph,n=g.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,d,f,e,g,l,k,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,e,g,l,k,n,c,D)}catch(V){return this.handleError(V),null}});k=null!=k?k:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,u=p,v=[],x=mxUtils.bind(this,function(a,c){v[a]=c;if(0== +--u){this.spinner.stop();if(null!=t)t(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}k(b)}}),F=0;F<p;F++)mxUtils.bind(this,function(c){var k=a[c];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,u=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(u+1)))), +v=mxUtils.parseXml(t),t=v.getElementsByTagName("svg");if(0<t.length){var t=t[0],z=D?null:t.getAttribute("content");null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=f.getAttribute("width"),t= +f.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,q=f.getAttribute("viewBox");if(null==q||0==q.length)f.setAttribute("viewBox","0 0 "+m+" "+t);else if(isNaN(m)||isNaN(t)){var z=q.split(" ");3<z.length&&(m=parseFloat(z[2]),t=parseFloat(z[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,t)),F=l(p,k.type,b+c*n,d+c*n,Math.max(1,Math.round(m*x)),Math.max(1,Math.round(t* +x)),k.name);if(isNaN(m)||isNaN(t)){var y=new Image;y.onload=mxUtils.bind(this,function(){m=Math.max(1,y.width);t=Math.max(1,y.height);F[0].geometry.width=m;F[0].geometry.height=t;f.setAttribute("viewBox","0 0 "+m+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[F[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return F}}}catch(W){}return null})):x(c,mxUtils.bind(this,function(){return l(z, +"text/xml",b+c*n,d+c*n,0,0,k.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==k.type){var F=D?null:this.extractGraphModelFromPng(a.target.result);if(null!=F&&0<F.length){var y=new Image;y.src=a.target.result;x(c,mxUtils.bind(this,function(){return l(F,"text/xml",b+c*n,d+c*n,y.width,y.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"), +mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,p){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var u=f&&this.isResampleImage(a.target.result,B)?Math.min(1,Math.min(e/m,e/p)):1;return l(g,k.type,b+c*n,d+c*n,Math.round(m*u),Math.round(p*u),k.name)}this.handleError({message:mxResources.get("imageTooBig")}); +return null}))}),f,e,B)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,l(p,k.type,b+c*n,d+c*n,240,160,k.name,function(a){x(c,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?l(null,k.type,b+c*n,d+c*n,240,160,k.name,function(a){x(c,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?p.readAsDataURL(k):p.readAsText(k)}})(F)});if(g){g=[]; for(p=0;p<a.length;p++)g.push(a[p]);a=g;this.confirmImageResize(function(a){f=a;v()},u)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST", -OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,m,l){m=null!=m?m:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/m,f/m);if(1<g){var k=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas"); -p.width=k;p.height=n;p.getContext("2d").drawImage(a,0,0,k,n);var q=p.toDataURL();if(q.length<b.length){var x=document.createElement("canvas");x.width=k;x.height=n;var E=x.toDataURL();q!==E&&(b=q,c=k,f=n)}}}catch(G){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d); -c.src=a}catch(m){if(null!=d)d(m);else throw m;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&& -a.generatePlantUmlImage(d,e.format,function(f,g,m){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=g,l.height=m,b.cellsResized([c],[l],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container, -420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,m){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var l=b.model.getGeometry(c);null!=l&&(l=l.clone(),l.width=Math.max(l.width,g),l.height=Math.max(l.height,m),b.cellsResized([c],[l],!1));b.setAttributeForCell(c, +OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,l,k){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var g=Math.max(c/l,f/l);if(1<g){var m=Math.round(c/g),n=Math.round(f/g),p=document.createElement("canvas"); +p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var x=document.createElement("canvas");x.width=m;x.height=n;var F=x.toDataURL();q!==F&&(b=q,c=m,f=n)}}}catch(G){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d); +c.src=a}catch(l){if(null!=d)d(l);else throw l;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&& +a.generatePlantUmlImage(d,e.format,function(f,g,l){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=g,k.height=l,b.cellsResized([c],[k],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container, +420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,l),b.cellsResized([c],[k],!1));b.setAttributeForCell(c, "mermaidData",JSON.stringify({data:d,config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,b){try{var d=this.graph.getAttributeForCell(c,"plantUmlData");null!=d?this.editPlantUmlData(c,b,d):(d=this.graph.getAttributeForCell(c,"mermaidData"),null!=d?this.editMermaidData(c,b,d):e.apply(this,arguments))}catch(G){a.handleError(G)}}; -b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(E){a.handleError(E)}return b};var l=this.clearDefaultStyle;this.clearDefaultStyle=function(){l.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!= -a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&& -mxEvent.consume(a);null!=f&&f(a,c)};k.call(this,a,c,d)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var q=b.getExportVariables;b.getExportVariables=function(){var c=q.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle()); +b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(F){a.handleError(F)}return b};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!= +a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");return l.apply(this,arguments)};var m=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&& +mxEvent.consume(a);null!=f&&f(a,c)};m.call(this,a,c,d)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var q=b.getExportVariables;b.getExportVariables=function(){var c=q.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle()); c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var t=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages? a.pages.length:1:t.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c}; -var F=this.actions.get("print");F.setEnabled(!mxClient.IS_IOS||!navigator.standalone);F.visible=F.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse", +var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse", !0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave", function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,f, e,g){c.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1, -a));c.insertImage(decodeURIComponent(b),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(F=this.editor.graph.view, -F.setUnit(mxSettings.getUnit()),F.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,F.unit),this.refresh());if("1"==urlParams.styledev){F=document.getElementById("geFooter");null!=F&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", -"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),F.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, -function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var B=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:B.apply(this,arguments)}}F=document.getElementById("geInfo");null!=F&&F.parentNode.removeChild(F);if(Graph.fileSupport&&(!this.editor.chromeless|| -this.editor.editable)){var C=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this, -function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var m=0<=mxUtils.indexOf(a.dataTransfer.types, -"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=l;var k=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(k=!0)):(d=c.getElementsByTagName("a"),null!= -d&&1==d.length?l=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(l=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(l,e,g,!0,k,null,n))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1, -a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+m+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(m,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation(); -a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var l=e[index]; -if("file"===l.kind){if(a.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML= +a));c.insertImage(decodeURIComponent(b),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(A=this.editor.graph.view, +A.setUnit(mxSettings.getUnit()),A.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,A.unit),this.refresh());if("1"==urlParams.styledev){A=document.getElementById("geFooter");null!=A&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", +"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),A.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, +function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var B=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:B.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless|| +this.editor.editable)){var D=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this, +function(a){null!=D&&(D.parentNode.removeChild(D),D=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types, +"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var m=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(d=c.getElementsByTagName("a"),null!= +d&&1==d.length?k=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(k=mxUtils.getTextContent(c[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,e,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1, +a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation(); +a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var k=e[index]; +if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML= " ";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow= "hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML=" ";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown|| b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this, function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b), -this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML=" ",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}}; +this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML=" ",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:l.apply(this,arguments)}}; EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")|| "Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(), this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged")); @@ -3324,17 +3321,17 @@ function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==u null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){c=document.createElement("div");c.innerHTML=g;f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&& null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,g),f=!1));Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"), null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}g=c.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))d=g[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b, -b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText),l=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(x){}try{var g=c.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(p)&&(l=!0,f=p)}catch(x){}try{var q= -this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var C=q.pasteCounter*q.gridSize;if(l||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,C,C));else if(e&&1==q.getSelectionCount())q.labelChanged(q.getSelectionCell(),f),Graph.isLink(f)&&q.setLinkForCell(q.getSelectionCell(),f);else{var A=q.getInsertPoint();q.isMouseInsertPoint()&&(C=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f, -A.x+C,A.y+C,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(x){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(x){this.handleError(x)}}}b.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null); +b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText),k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(x){}try{var g=c.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(p)&&(k=!0,f=p)}catch(x){}try{var q= +this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var D=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,D,D));else if(e&&1==q.getSelectionCount())q.labelChanged(q.getSelectionCell(),f),Graph.isLink(f)&&q.setLinkForCell(q.getSelectionCell(),f);else{var C=q.getInsertPoint();q.isMouseInsertPoint()&&(D=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f, +C.x+D,C.y+D,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(x){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(x){this.handleError(x)}}}b.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null); a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(), "1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types, "text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=b,d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this, function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body; -var l=document.documentElement;d=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=c+"px";l.style.left=b+"px";l.style.width=Math.max(0,d-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? -this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c= +var k=document.documentElement;d=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container? +this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c= 0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,f=a.name;if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var e=mxUtils.bind(this,function(a){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&& -this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&& +this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&& (new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a, f,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop(); e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,b)}));else{if("image/png"==a.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,f,b)}}}catch(B){this.handleError(B)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"=== @@ -3346,112 +3343,112 @@ a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebar this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0); null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1< this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale, -page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,l=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g= -f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ha){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(Y){g=null}try{if(null== -g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")}, -null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}), -g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(Y){k.postMessage(JSON.stringify({event:"draft",error:Y.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p= -1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}): -null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"== -g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var D=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body, -D):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=g;c.data=a;c.xml=encodeURIComponent(J); -k.postMessage(JSON.stringify(c),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);y(a)}),z=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=z){for(var L=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),P,H=0;H<this.pages.length;H++)if(this.pages[H].getId()== -z){P=this.updatePageRoot(this.pages[H]);break}I.getGlobalVariable=function(a){return"page"==a?P.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(P.root)}if(null!=g.layerIds){for(var S=I.model,ca=S.getChildCells(S.getRoot()),m={},H=0;H<g.layerIds.length;H++)m[g.layerIds[H]]=!0;for(H=0;H<ca.length;H++)S.setVisible(ca[H],m[ca[H].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this, -function(){K(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=z?"&pageId="+z:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!= -g.xml&&0<g.xml.length&&this.setFileData(g.xml);D=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();D.xml=mxUtils.getXml(aa);D.data=this.getFileData(null,null,!0,null,null,null,aa);D.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),D.data=this.getHtml(J,this.editor.graph),D.xml=mxUtils.getXml(J),D.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var da=this.editor.graph.background; -da==mxConstants.NONE&&(da=null);D.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);D.format="svg";var ga=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();D.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(D),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(D.xml,this.editor.graph,null,!0,ga,null,null,g.embedImages);else if(null== -g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var T=this.editor.graph.getSvg(da);this.embedFonts(T,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){ga(mxUtils.getXml(a))})):ga(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(D),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&& +page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g= +f.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ia){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(Z){g=null}try{if(null== +g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&m.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")}, +null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){var n=k(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}), +g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(Z){m.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p= +1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?m.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}): +null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"== +g.action){var v=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var E=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body, +E):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var H=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=g;c.data=a;c.xml=encodeURIComponent(J); +m.postMessage(JSON.stringify(c),"*")}),K=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));H!=this.editor.graph&&H.container.parentNode.removeChild(H.container);y(a)}),z=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=z){for(var L=H.getGlobalVariable,H=this.createTemporaryGraph(H.getStylesheet()),O,I=0;I<this.pages.length;I++)if(this.pages[I].getId()== +z){O=this.updatePageRoot(this.pages[I]);break}H.getGlobalVariable=function(a){return"page"==a?O.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(H.container);H.model.setRoot(O.root)}if(null!=g.layerIds){for(var U=H.model,ea=U.getChildCells(U.getRoot()),l={},I=0;I<g.layerIds.length;I++)l[g.layerIds[I]]=!0;for(I=0;I<ea.length;I++)U.setVisible(ea[I],l[ea[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){K(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this, +function(){K(null)}),null,null,g.scale,null,null,null,H)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=z?"&pageId="+z:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!= +g.xml&&0<g.xml.length&&this.setFileData(g.xml);E=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ba=this.getXmlFileData();E.xml=mxUtils.getXml(ba);E.data=this.getFileData(null,null,!0,null,null,null,ba);E.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),E.data=this.getHtml(J,this.editor.graph),E.xml=mxUtils.getXml(J),E.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ha=this.editor.graph.background; +ha==mxConstants.NONE&&(ha=null);E.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);E.format="svg";var fa=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();E.data=Editor.createSvgDataUri(a);m.postMessage(JSON.stringify(E),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(E.xml,this.editor.graph,null,!0,fa,null,null,g.embedImages);else if(null== +g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var S=this.editor.graph.getSvg(ha);this.embedFonts(S,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){fa(mxUtils.getXml(a))})):fa(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(E),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&& (urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&& -this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(Y){this.handleError(Y)}}var X= -mxUtils.bind(this,function(f,g){b=!0;try{a(f,g)}catch(U){this.handleError(U)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=l();if(d!=e&&!b){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}), +this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(Z){this.handleError(Z)}}var X= +mxUtils.bind(this,function(f,g){b=!0;try{a(f,g)}catch(T){this.handleError(T)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=k();if(d!=e&&!b){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}), this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged", -c));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){X(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&& -this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&X(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){X(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),X(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto? -JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title", +c));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||m.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){X(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&& +this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&X(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){X(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),X(g,f))}}));var m=window.opener||window.parent,k="json"==urlParams.proto? +JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(k,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title", mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title", mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})); a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container, -640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var l in a[f].config)e[l]=a[f].config[l];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var l={},k=null, -q=null,F=null,B=null,C=null,A=null,x=null,E=null,G="",D="auto",J="auto",I=null,y=null,K=40,z=40,L=100,P=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=b?b(oa):(H.setSelectionCells(oa),H.scrollCellToVisible(H.getSelectionCell()))},ca=H.getFreeInsertPoint(),aa=ca.x,da=ca.y,ca=da,ga=null,T="auto",E=null,X=[],Y=null,ha=null,V=0;V<c.length&&"#"==c[V].charAt(0);){a=c[V];for(V++;V<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[V].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[V].substring(1)), -V++;if("#"!=a.charAt(1)){var U=a.indexOf(":");if(0<U){var Q=mxUtils.trim(a.substring(1,U)),N=mxUtils.trim(a.substring(U+1));"label"==Q?ga=H.sanitizeHtml(N):"labelname"==Q&&0<N.length&&"-"!=N?B=N:"labels"==Q&&0<N.length&&"-"!=N?C=JSON.parse(N):"style"==Q?k=N:"parentstyle"==Q?A=N:"stylename"==Q&&0<N.length&&"-"!=N?F=N:"styles"==Q&&0<N.length&&"-"!=N?q=JSON.parse(N):"identity"==Q&&0<N.length&&"-"!=N?x=N:"parent"==Q&&0<N.length&&"-"!=N?E=N:"namespace"==Q&&0<N.length&&"-"!=N?G=N:"width"==Q?D=N:"height"== -Q?J=N:"left"==Q&&0<N.length?I=N:"top"==Q&&0<N.length?y=N:"ignore"==Q?ha=N.split(","):"connect"==Q?X.push(JSON.parse(N)):"link"==Q?Y=N:"padding"==Q?P=parseFloat(N):"edgespacing"==Q?K=parseFloat(N):"nodespacing"==Q?z=parseFloat(N):"levelspacing"==Q?L=parseFloat(N):"layout"==Q&&(T=N)}}}if(null==c[V])throw Error(mxResources.get("invalidOrMissingFile"));for(var ba=this.editor.csvToArray(c[V]),Q=U=null,N=[],O=0;O<ba.length;O++)x==ba[O]&&(U=O),E==ba[O]&&(Q=O),N.push(mxUtils.trim(ba[O]).replace(/[^a-z0-9]+/ig, -"_").replace(/^\d+/,"").replace(/_+$/,""));null==ga&&(ga="%"+N[0]+"%");if(null!=X)for(var Z=0;Z<X.length;Z++)null==l[X[Z].to]&&(l[X[Z].to]={});x=[];for(O=V+1;O<c.length;O++){var fa=this.editor.csvToArray(c[O]);if(null==fa){var ya=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(ya+" ("+O+"):\n"+mxResources.get("containsValidationErrors"));}0<fa.length&&x.push(fa)}H.model.beginUpdate();try{for(O=0;O<x.length;O++){var fa=x[O],M=null,ja=null!=U?G+fa[U]:null;null!=ja&&(M=H.model.getCell(ja)); -var c=null!=M,W=new mxCell(ga,new mxGeometry(aa,ca,0,0),k||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=ja;for(var ea=0;ea<fa.length;ea++)H.setAttributeForCell(W,N[ea],fa[ea]);if(null!=B&&null!=C){var na=C[W.getAttribute(B)];null!=na&&H.labelChanged(W,na)}if(null!=F&&null!=q){var pa=q[W.getAttribute(F)];null!=pa&&(W.style=pa)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);c&&(H.model.setGeometry(M,W.geometry),H.model.setStyle(M,W.style),0>mxUtils.indexOf(f,M)&& -f.push(M));M=W;if(!c)for(Z=0;Z<X.length;Z++)l[X[Z].to][M.getAttribute(X[Z].to)]=M;null!=Y&&"link"!=Y&&(H.setLinkForCell(M,M.getAttribute(Y)),H.setAttributeForCell(M,Y,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var ka=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=I&&null!=M.getAttribute(I)&&(M.geometry.x=aa+parseFloat(M.getAttribute(I))),null!=y&&null!=M.getAttribute(y)&&(M.geometry.y=da+parseFloat(M.getAttribute(y))),"@"==D.charAt(0)&&null!=M.getAttribute(D.substring(1))? -M.geometry.width=parseFloat(M.getAttribute(D.substring(1))):M.geometry.width="auto"==D?ka.width+P:parseFloat(D),"@"==J.charAt(0)&&null!=M.getAttribute(J.substring(1))?M.geometry.height=parseFloat(M.getAttribute(J.substring(1))):M.geometry.height="auto"==J?ka.height+P:parseFloat(J),ca+=M.geometry.height+z);c?(null==e[ja]&&(e[ja]=[]),e[ja].push(M)):(E=null!=Q?H.model.getCell(G+fa[Q]):null,d.push(M),null!=E?(E.style=H.replacePlaceholders(E,A),H.addCell(M,E)):f.push(H.addCell(M)))}for(var qa=f.slice(), -oa=f.slice(),Z=0;Z<X.length;Z++)for(var Aa=X[Z],O=0;O<d.length;O++){var M=d[O],ua=mxUtils.bind(this,function(a,c,b){var d=c.getAttribute(b.from);if(null!=d&&(H.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=l[b.to][d[f]];if(null!=e){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.tolabel&&(g=(g||"")+(e.getAttribute(b.tolabel)||""));var m="target"==b.placeholders==!b.invert?e:a,m=null!=b.style?H.replacePlaceholders(m, -b.style):H.createCurrentEdgeStyle();oa.push(H.insertEdge(null,null,g||"",b.invert?e:a,b.invert?a:e,m));mxUtils.remove(b.invert?a:e,qa)}}});ua(M,M,Aa);if(null!=e[M.id])for(ea=0;ea<e[M.id].length;ea++)ua(M,e[M.id][ea],Aa)}if(null!=ha)for(O=0;O<d.length;O++)for(M=d[O],ea=0;ea<ha.length;ea++)H.setAttributeForCell(M,mxUtils.trim(ha[ea]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(H);ra.spacing=K;var sa=function(){0<ra.spacing&&ra.execute(H.getDefaultParent());for(var a=0;a<f.length;a++){var c= -H.getCellGeometry(f[a]);c.x=Math.round(H.snap(c.x));c.y=Math.round(H.snap(c.y));"auto"==D&&(c.width=Math.round(H.snap(c.width)));"auto"==J&&(c.height=Math.round(H.snap(c.height)))}};if("["==T.charAt(0)){var ta=S;H.view.validate();this.executeLayoutList(JSON.parse(T),function(){sa();ta()});S=null}else if("circle"==T){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var Da=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return Da.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent()); -sa()},!0,S);S=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&oa.length==2*f.length-1&&1==qa.length){H.view.validate();var wa=new mxCompactTreeLayout(H,"horizontaltree"==T);wa.levelDistance=z;wa.edgeRouting=!1;wa.resetEdges=!1;this.executeLayout(function(){wa.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==qa.length){H.view.validate();var la=new mxHierarchicalLayout(H,"horizontalflow"==T?mxConstants.DIRECTION_WEST: -mxConstants.DIRECTION_NORTH);la.intraCellSpacing=z;la.parallelEdgeSpacing=K;la.interRankCellSpacing=L;la.disableEdgeStyle=!1;this.executeLayout(function(){la.execute(H.getDefaultParent(),oa);H.moveCells(oa,aa,da)},!0,S);S=null}else if("organic"==T||"auto"==T&&oa.length>f.length){H.view.validate();var za=new mxFastOrganicLayout(H);za.forceConstant=3*z;za.resetEdges=!1;var Ia=za.isVertexIgnored;za.isVertexIgnored=function(a){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(H); -ra.spacing=K;this.executeLayout(function(){za.execute(H.getDefaultParent());sa()},!0,S);S=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=S&&S()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl= +640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},m=null, +q=null,A=null,B=null,D=null,C=null,x=null,F=null,G="",E="auto",J="auto",H=null,y=null,K=40,z=40,L=100,O=0,I=this.editor.graph;I.getGraphBounds();for(var U=function(){null!=b?b(oa):(I.setSelectionCells(oa),I.scrollCellToVisible(I.getSelectionCell()))},ea=I.getFreeInsertPoint(),ba=ea.x,ha=ea.y,ea=ha,fa=null,S="auto",F=null,X=[],Z=null,ia=null,V=0;V<c.length&&"#"==c[V].charAt(0);){a=c[V];for(V++;V<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[V].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[V].substring(1)), +V++;if("#"!=a.charAt(1)){var T=a.indexOf(":");if(0<T){var Q=mxUtils.trim(a.substring(1,T)),M=mxUtils.trim(a.substring(T+1));"label"==Q?fa=I.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?B=M:"labels"==Q&&0<M.length&&"-"!=M?D=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?A=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?x=M:"parent"==Q&&0<M.length&&"-"!=M?F=M:"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?E=M:"height"== +Q?J=M:"left"==Q&&0<M.length?H=M:"top"==Q&&0<M.length?y=M:"ignore"==Q?ia=M.split(","):"connect"==Q?X.push(JSON.parse(M)):"link"==Q?Z=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?z=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(S=M)}}}if(null==c[V])throw Error(mxResources.get("invalidOrMissingFile"));for(var ca=this.editor.csvToArray(c[V]),Q=T=null,M=[],P=0;P<ca.length;P++)x==ca[P]&&(T=P),F==ca[P]&&(Q=P),M.push(mxUtils.trim(ca[P]).replace(/[^a-z0-9]+/ig, +"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+M[0]+"%");if(null!=X)for(var aa=0;aa<X.length;aa++)null==k[X[aa].to]&&(k[X[aa].to]={});x=[];for(P=V+1;P<c.length;P++){var Y=this.editor.csvToArray(c[P]);if(null==Y){var za=40<c[P].length?c[P].substring(0,40)+"...":c[P];throw Error(za+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<Y.length&&x.push(Y)}I.model.beginUpdate();try{for(P=0;P<x.length;P++){var Y=x[P],N=null,ja=null!=T?G+Y[T]:null;null!=ja&&(N=I.model.getCell(ja)); +var c=null!=N,W=new mxCell(fa,new mxGeometry(ba,ea,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=ja;for(var ga=0;ga<Y.length;ga++)I.setAttributeForCell(W,M[ga],Y[ga]);if(null!=B&&null!=D){var ma=D[W.getAttribute(B)];null!=ma&&I.labelChanged(W,ma)}if(null!=A&&null!=q){var ta=q[W.getAttribute(A)];null!=ta&&(W.style=ta)}I.setAttributeForCell(W,"placeholders","1");W.style=I.replacePlaceholders(W,W.style);c&&(I.model.setGeometry(N,W.geometry),I.model.setStyle(N,W.style),0>mxUtils.indexOf(f,N)&&f.push(N)); +N=W;if(!c)for(aa=0;aa<X.length;aa++)k[X[aa].to][N.getAttribute(X[aa].to)]=N;null!=Z&&"link"!=Z&&(I.setLinkForCell(N,N.getAttribute(Z)),I.setAttributeForCell(N,Z,null));I.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=H&&null!=N.getAttribute(H)&&(N.geometry.x=ba+parseFloat(N.getAttribute(H))),null!=y&&null!=N.getAttribute(y)&&(N.geometry.y=ha+parseFloat(N.getAttribute(y))),"@"==E.charAt(0)&&null!=N.getAttribute(E.substring(1))? +N.geometry.width=parseFloat(N.getAttribute(E.substring(1))):N.geometry.width="auto"==E?ka.width+O:parseFloat(E),"@"==J.charAt(0)&&null!=N.getAttribute(J.substring(1))?N.geometry.height=parseFloat(N.getAttribute(J.substring(1))):N.geometry.height="auto"==J?ka.height+O:parseFloat(J),ea+=N.geometry.height+z);c?(null==e[ja]&&(e[ja]=[]),e[ja].push(N)):(F=null!=Q?I.model.getCell(G+Y[Q]):null,d.push(N),null!=F?(F.style=I.replacePlaceholders(F,C),I.addCell(N,F)):f.push(I.addCell(N)))}for(var pa=f.slice(), +oa=f.slice(),aa=0;aa<X.length;aa++)for(var Aa=X[aa],P=0;P<d.length;P++){var N=d[P],ua=mxUtils.bind(this,function(a,c,b){var d=c.getAttribute(b.from);if(null!=d&&(I.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=k[b.to][d[f]];if(null!=e){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.tolabel&&(g=(g||"")+(e.getAttribute(b.tolabel)||""));var l="target"==b.placeholders==!b.invert?e:a,l=null!=b.style?I.replacePlaceholders(l, +b.style):I.createCurrentEdgeStyle();oa.push(I.insertEdge(null,null,g||"",b.invert?e:a,b.invert?a:e,l));mxUtils.remove(b.invert?a:e,pa)}}});ua(N,N,Aa);if(null!=e[N.id])for(ga=0;ga<e[N.id].length;ga++)ua(N,e[N.id][ga],Aa)}if(null!=ia)for(P=0;P<d.length;P++)for(N=d[P],ga=0;ga<ia.length;ga++)I.setAttributeForCell(N,mxUtils.trim(ia[ga]),null);if(0<f.length){var qa=new mxParallelEdgeLayout(I);qa.spacing=K;var ra=function(){0<qa.spacing&&qa.execute(I.getDefaultParent());for(var a=0;a<f.length;a++){var c= +I.getCellGeometry(f[a]);c.x=Math.round(I.snap(c.x));c.y=Math.round(I.snap(c.y));"auto"==E&&(c.width=Math.round(I.snap(c.width)));"auto"==J&&(c.height=Math.round(I.snap(c.height)))}};if("["==S.charAt(0)){var sa=U;I.view.validate();this.executeLayoutList(JSON.parse(S),function(){ra();sa()});U=null}else if("circle"==S){var na=new mxCircleLayout(I);na.resetEdges=!1;var Da=na.isVertexIgnored;na.isVertexIgnored=function(a){return Da.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){na.execute(I.getDefaultParent()); +ra()},!0,U);U=null}else if("horizontaltree"==S||"verticaltree"==S||"auto"==S&&oa.length==2*f.length-1&&1==pa.length){I.view.validate();var wa=new mxCompactTreeLayout(I,"horizontaltree"==S);wa.levelDistance=z;wa.edgeRouting=!1;wa.resetEdges=!1;this.executeLayout(function(){wa.execute(I.getDefaultParent(),0<pa.length?pa[0]:null)},!0,U);U=null}else if("horizontalflow"==S||"verticalflow"==S||"auto"==S&&1==pa.length){I.view.validate();var la=new mxHierarchicalLayout(I,"horizontalflow"==S?mxConstants.DIRECTION_WEST: +mxConstants.DIRECTION_NORTH);la.intraCellSpacing=z;la.parallelEdgeSpacing=K;la.interRankCellSpacing=L;la.disableEdgeStyle=!1;this.executeLayout(function(){la.execute(I.getDefaultParent(),oa);I.moveCells(oa,ba,ha)},!0,U);U=null}else if("organic"==S||"auto"==S&&oa.length>f.length){I.view.validate();var ya=new mxFastOrganicLayout(I);ya.forceConstant=3*z;ya.resetEdges=!1;var La=ya.isVertexIgnored;ya.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(f,a)};qa=new mxParallelEdgeLayout(I); +qa.spacing=K;this.executeLayout(function(){ya.execute(I.getDefaultParent());ra()},!0,U);U=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=U&&U()}}catch(Ma){this.handleError(Ma)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl= function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k= EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var c=k.apply(this,arguments),b=this.editor.graph,d=c.getSourceGraphBounds;c.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(b.container)&&b.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/c),Math.ceil(this.source.minimumGraphSize.height-2*a.y/c))}return d.apply(this,arguments)}; var e=c.getSourceContainerSize;c.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*c-2*a.x),Math.ceil(this.source.minimumGraphSize.height*c-2*a.y))}return e.apply(this,arguments)};c.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(); -return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var l=c.init;c.init=function(){l.apply(this,arguments);c.outline.view.getBackgroundPageBounds=function(){var a=b.getPageLayout(),c=b.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+ +return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var m=c.init;c.init=function(){m.apply(this,arguments);c.outline.view.getBackgroundPageBounds=function(){var a=b.getPageLayout(),c=b.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+ a.y*c.height),this.scale*a.width*c.width,this.scale*a.height*c.height)};c.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,b){var d=b.getProperty("change"),f=c.source,e=c.outline;e.pageScale=f.pageScale;e.pageFormat=f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&& (e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);c.outline.view.clear(d.previousPage.root,!0);c.outline.view.validate()});return c};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&& c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d); d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&& a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement= -function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b); +function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b); this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell())); this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility); this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)}; -var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,l,k,q){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b, -"svg",mxUtils.getXml(c.getSvg(e,l,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),m=Math.floor(g.width*l/c.view.scale),n=Math.floor(g.height*l/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+(null!=a?"&filename="+encodeURIComponent(a): -"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<q?"&dpi="+q:"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+k+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,q):a.exportImage(l,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e= +var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,m,q){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b, +"svg",mxUtils.getXml(c.getSvg(e,k,m)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),n=Math.floor(g.height*k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+(null!=a?"&filename="+encodeURIComponent(a): +"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<q?"&dpi="+q:"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(k,null==e||"none"==e,!0,!1,!1,m,!0,!1,null,null,q):a.exportImage(k,!1,!0,!1,!1,m,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e= a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var c={},b=document.createElement("div");b.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px"; -b.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var q=k[a];if("R"==q.substring(0,1)){var u=JSON.parse(decodeURIComponent(q.substring(1)));l[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML= -"";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var b=0;b<a.length;b++){var d=a[b];l[d.id]&&(c[d.id]=d);var f=this.addCheckbox(e,d.title,l[d.id]);(function(a,b){mxEvent.addListener(b,"change",function(){this.checked?c[a.id]=a:delete c[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c, -mxResources.get("error")+": ");mxUtils.write(c,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(c)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,b;for(b in c)null==l[b]&&(a++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],null,mxUtils.bind(this,function(b){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,b,c))}catch(x){this.handleError(x, -mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[b]));for(b in l)c[b]||this.closeLibrary(new RemoteLibrary(this,null,l[b]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(b.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, +b.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var q=m[a];if("R"==q.substring(0,1)){var u=JSON.parse(decodeURIComponent(q.substring(1)));k[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML= +"";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var b=0;b<a.length;b++){var d=a[b];k[d.id]&&(c[d.id]=d);var f=this.addCheckbox(e,d.title,k[d.id]);(function(a,b){mxEvent.addListener(b,"change",function(){this.checked?c[a.id]=a:delete c[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c, +mxResources.get("error")+": ");mxUtils.write(c,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(c)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,b;for(b in c)null==k[b]&&(a++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],null,mxUtils.bind(this,function(b){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,b,c))}catch(x){this.handleError(x, +mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[b]));for(b in k)c[b]||this.closeLibrary(new RemoteLibrary(this,null,k[b]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(b.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var c=0;c<this.remoteInvokeQueue.length;c++)a.postMessage(this.remoteInvokeQueue[c],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var c= -a.msgMarkers,b=this.remoteInvokeCallbacks[c.callbackId];if(null==b)throw Error("No callback for "+(null!=c?c.callbackId:"null"));a.error?b.error&&b.error(a.error.errResp):b.callback&&b.callback.apply(this,a.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f); -c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(c,b){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=b?d.error={errResp:b}:null!=c&&(d.resp= -c);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,f=this.remoteInvokableFns[d];if(null!=f&&"function"===typeof this[d]){if(f.allowedDomains){for(var e=!1,l=0;l<f.allowedDomains.length;l++)if(b=="https://"+f.allowedDomains[l]){e=!0;break}if(!e){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(f.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this, -k);else{var q=this[d].apply(this,k);c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(F){c(null,"Invalid Call: An error occured, "+F.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}), +a.msgMarkers,b=this.remoteInvokeCallbacks[c.callbackId];if(null==b)throw Error("No callback for "+(null!=c?c.callbackId:"null"));a.error?b.error&&b.error(a.error.errResp):b.callback&&b.callback.apply(this,a.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f); +c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:k});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(c,b){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=b?d.error={errResp:b}:null!=c&&(d.resp= +c);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,f=this.remoteInvokableFns[d];if(null!=f&&"function"===typeof this[d]){if(f.allowedDomains){for(var e=!1,k=0;k<f.allowedDomains.length;k++)if(b=="https://"+f.allowedDomains[k]){e=!0;break}if(!e){c(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(f.isAsync)m.push(function(){c(Array.prototype.slice.apply(arguments))}),m.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this, +m);else{var q=this[d].apply(this,m);c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(A){c(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}), c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=b&&b(v)}};d.onsuccess=mxUtils.bind(this,function(c){var b=d.result;this.database=b;EditorUi.migrateStorageFiles&&(StorageFile.migrate(b),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var c=document.createElement("iframe"); -c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var b=!0,d=!1,f,e=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){e++;m()}),m=mxUtils.bind(this,function(){try{if(e>=f.length)g();else{var a=f[e];StorageFile.getFileContent(this, -a,mxUtils.bind(this,function(b){null==b||".scratchpad"==a&&b==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(J){console.log(J)}}),k=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(J){console.log(J)}});a=mxUtils.bind(this,function(a){try{if(a.source== -c.contentWindow){var e={};try{e=JSON.parse(a.data)}catch(I){}"init"==e.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=e.event||d||(b?null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?(f=e.resp[0],b=!1,m()):g():null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?k(e.resp[0]):l())}}catch(I){console.log(I)}});window.addEventListener("message", -a)}})));a(b);b.onversionchange=function(){b.close()}});d.onerror=b;d.onblocked=function(){}}catch(m){null!=b&&b(m)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,l){this.openDatabase(mxUtils.bind(this,function(c){try{l=l||"objects";Array.isArray(l)||(l=[l],a=[a],b=[b]);var f=c.transaction(l,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<l.length;c++)f.objectStore(l[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=e&&e(t)}}),e)}; +c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var b=!0,d=!1,f,e=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){e++;l()}),l=mxUtils.bind(this,function(){try{if(e>=f.length)g();else{var a=f[e];StorageFile.getFileContent(this, +a,mxUtils.bind(this,function(b){null==b||".scratchpad"==a&&b==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(J){console.log(J)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(J){console.log(J)}});a=mxUtils.bind(this,function(a){try{if(a.source== +c.contentWindow){var e={};try{e=JSON.parse(a.data)}catch(H){}"init"==e.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=e.event||d||(b?null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?(f=e.resp[0],b=!1,l()):g():null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?m(e.resp[0]):k())}}catch(H){console.log(H)}});window.addEventListener("message", +a)}})));a(b);b.onversionchange=function(){b.close()}});d.onerror=b;d.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=c.transaction(k,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<k.length;c++)f.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(t){null!=e&&e(t)}}),e)}; EditorUi.prototype.removeDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror= d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(c){null==c.target.result?a(f):(f.push(c.target.result.value),c.target.result["continue"]())};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d= d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded(): !1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile(); return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor== -DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,l,k,q,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,l,k,q,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)}; -EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,k,q,t,u,F,B,C,A,x,E){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas"); -return this.editor.exportToCanvas(a,b,d,e,l,k,q,t,u,F,B,C,A,x,E)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); -return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng"); -return Editor.writeGraphModelToPng(a,b,d,e,l)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var l="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(l|| +DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,k,m,q,t){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,k,m,q,t)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)}; +EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,m,q,t,u,A,B,D,C,x,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas"); +return this.editor.exportToCanvas(a,b,d,e,k,m,q,t,u,A,B,D,C,x,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); +return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng"); +return Editor.writeGraphModelToPng(a,b,d,e,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k|| e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(a,b,e,d,k,l){function q(){for(var a=C.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==C&&b++;A.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(l);b.removeChild(k);g.style.display="block";f.style.display="block"}u={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className= -"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var k=document.createElement("div");k.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();u=null});m.className="geCommentEditBtn";k.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);u=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this, -function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";k.appendChild(n);b.insertBefore(k,f);g.style.display="none";f.style.display="none";l.focus()}function f(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", -[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function n(b,d,e,l,k){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className= -"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});B.appendChild(e);d&&(e.style.display="none")}function x(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function E(d,e,f,k,q){function u(){g(E);b.addReply(v,function(a){v.id=a;b.replies.push(v);m(E);f&&f()},function(b){t();p(E);a.handleError(b,null, -null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,q)}function t(){c(v,E,function(a){u()},!0)}var z=x().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var E=n(v,b.replies,z,l+1);e?t():u()}if(k||!b.isResolved){A.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*l+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite"); -var D=document.createElement("div");D.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=b.user.pictureUrl||Editor.userImage;D.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";D.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);f(b, -F);L.appendChild(F);y.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,b.content||"");y.appendChild(D);D=document.createElement("div");D.className="geCommentActions";var B=document.createElement("ul");B.className="geCommentActionsList";D.appendChild(B);v||0!=l&&!t||z(mxResources.get("reply"),function(){E("",!0)},b.isResolved);L=a.getCurrentUser();null==L||L.id!=b.user.id||v||(z(mxResources.get("edit"),function(){function d(){c(b,y,function(){g(y);b.editComment(b.content, -function(){m(y)},function(b){p(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(y);b.deleteComment(function(){for(var a=x(b).replies,c=0;c<a.length;c++)C.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}A.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){p(y);a.handleError(b,null,null, -null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));v||0!=l||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=x(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"), -k=0;k<l.length;k++)l[k]!=c.parentNode&&(l[k].style.display=d);G||(e[g].style.display="none")}q()}b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(D);null!=e?C.insertBefore(y,e.nextSibling):C.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)D=b.replies[e],D.isResolved=b.isResolved,n(D,b.replies,null,l+1,k);null!=u&&(u.comment.id==b.id?(k=b.content,b.content=u.comment.content,c(b,y,u.saveCallback,u.deleteOnCancel), -b.content=k):null==u.comment.id&&u.comment.pCommentId==b.id&&(C.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return y}}var v=!a.canComment(),t=a.canReplyToReplies(),u=null,F=document.createElement("div");F.className="geCommentsWin";F.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var B=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke": -Dialog.backdropColor;C.style.bottom=parseInt(B)+7+"px";F.appendChild(C);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=B;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(x.style.filter= -"none");B=document.createElement("a");B.className="geButton";mxClient.IS_QUIRKS&&(B.style.filter="none");if(!v){var E=B.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){c(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;D.push(b);m(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})}, -!0)}var e=a.newComment("",a.getCurrentUser()),f=n(e,D,null,0);d();b.preventDefault();mxEvent.consume(b)});x.appendChild(E)}E=B.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});x.appendChild(E);a.commentsRefreshNeeded()&& -(E=B.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),x.appendChild(E));a.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&& -(B.style.filter="invert(100%)"),mxEvent.addListener(B,"click",function(a){l();a.preventDefault();mxEvent.consume(a)}),x.appendChild(B));F.appendChild(x);var D=[],J=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var b=u.div.querySelector(".geCommentEditTxtArea"),d=u.div.querySelector(".geCommentEditBtns");u.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(z){a.handleError(z)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+ -IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(A);A.style.display="block";D=a;for(a=0;a<D.length;a++)b(D[a].replies), -n(D[a],D,null,0,G);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(C.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(a){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;x=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(f(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])} -if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<D.length;d++)a(D[d])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=new mxWindow(mxResources.get("comments"),F,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var a=this.window.getX(), -b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,k,l,q,c,f,g,p){var m=document.createElement("div");m.style.textAlign="center";p=null!=p?p:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=p+"px";n.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(n.style.height="60px");mxUtils.write(n,b); -m.appendChild(n);null!=g&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),n.appendChild(b),m.appendChild(n));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");l=mxUtils.button(l||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});l.className="geBtn";null!=c&&(l.innerHTML=c+"<br>"+l.innerHTML,l.style.paddingBottom= -"8px",l.style.paddingTop="8px",l.style.height="auto",l.style.width="40%");a.editor.cancelFirst&&g.appendChild(l);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(v.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(l);m.appendChild(g);f?(g.style.marginTop= -"10px",n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),n.appendChild(k),m.appendChild(n),mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=m};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +var CommentsWindow=function(a,b,e,d,k,m){function q(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;C.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}u={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className= +"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var l=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();u=null});l.className="geCommentEditBtn";m.appendChild(l);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);u=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this, +function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(l.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function f(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", +[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function n(b,d,e,k,m){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className= +"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});B.appendChild(e);d&&(e.style.display="none")}function x(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function F(d,e,f,m,q){function u(){g(F);b.addReply(v,function(a){v.id=a;b.replies.push(v);l(F);f&&f()},function(b){t();p(F);a.handleError(b,null, +null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function t(){c(v,F,function(a){u()},!0)}var z=x().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var F=n(v,b.replies,z,k+1);e?t():u()}if(m||!b.isResolved){C.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite"); +var A=document.createElement("div");A.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;A.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";A.appendChild(E);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,b.user.displayName||"");E.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",b.id);f(b, +L);E.appendChild(L);y.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");y.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var B=document.createElement("ul");B.className="geCommentActionsList";A.appendChild(B);v||0!=k&&!t||z(mxResources.get("reply"),function(){F("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||v||(z(mxResources.get("edit"),function(){function d(){c(b,y,function(){g(y);b.editComment(b.content, +function(){l(y)},function(b){p(y);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(y);b.deleteComment(function(){for(var a=x(b).replies,c=0;c<a.length;c++)D.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}C.style.display=0==D.getElementsByTagName("div").length?"block":"none"},function(b){p(y);a.handleError(b,null,null, +null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));v||0!=k||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=x(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"), +m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);G||(e[g].style.display="none")}q()}b.isResolved?F(mxResources.get("reOpened")+": ",!0,c,!1,!0):F(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(A);null!=e?D.insertBefore(y,e.nextSibling):D.appendChild(y);for(e=0;null!=b.replies&&e<b.replies.length;e++)A=b.replies[e],A.isResolved=b.isResolved,n(A,b.replies,null,k+1,m);null!=u&&(u.comment.id==b.id?(m=b.content,b.content=u.comment.content,c(b,y,u.saveCallback,u.deleteOnCancel), +b.content=m):null==u.comment.id&&u.comment.pCommentId==b.id&&(D.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return y}}var v=!a.canComment(),t=a.canReplyToReplies(),u=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var B=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke": +Dialog.backdropColor;D.style.bottom=parseInt(B)+7+"px";A.appendChild(D);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(C,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=B;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(x.style.filter= +"none");B=document.createElement("a");B.className="geButton";mxClient.IS_QUIRKS&&(B.style.filter="none");if(!v){var F=B.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function d(){c(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;E.push(b);l(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})}, +!0)}var e=a.newComment("",a.getCurrentUser()),f=n(e,E,null,0);d();b.preventDefault();mxEvent.consume(b)});x.appendChild(F)}F=B.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";J();a.preventDefault();mxEvent.consume(a)});x.appendChild(F);a.commentsRefreshNeeded()&& +(F=B.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){J();a.preventDefault();mxEvent.consume(a)}),x.appendChild(F));a.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&& +(B.style.filter="invert(100%)"),mxEvent.addListener(B,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),x.appendChild(B));A.appendChild(x);var E=[],J=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var b=u.div.querySelector(".geCommentEditTxtArea"),d=u.div.querySelector(".geCommentEditBtns");u.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(z){a.handleError(z)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+ +IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});D.innerHTML="";D.appendChild(C);C.style.display="block";E=a;for(a=0;a<E.length;a++)b(E[a].replies), +n(E[a],E,null,0,G);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&(D.appendChild(u.div),c(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});J();this.refreshComments=J;x=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(f(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])} +if(this.window.isVisible()){for(var b=D.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<E.length;d++)a(E[d])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=new mxWindow(mxResources.get("comments"),A,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var H=mxUtils.bind(this,function(){var a=this.window.getX(), +b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,k,m,q,c,f,g,p){var l=document.createElement("div");l.style.textAlign="center";p=null!=p?p:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=p+"px";n.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(n.style.height="60px");mxUtils.write(n,b); +l.appendChild(n);null!=g&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),n.appendChild(b),l.appendChild(n));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});m.className="geBtn";null!=c&&(m.innerHTML=c+"<br>"+m.innerHTML,m.style.paddingBottom= +"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(v.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);l.appendChild(g);f?(g.style.marginTop= +"10px",n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),n.appendChild(k),l.appendChild(n),mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))} @@ -3465,8 +3462,8 @@ this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pa a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})): "undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,c=0;c<e.length;c++)if(e[c]instanceof SelectPage||e[c]instanceof RenamePage||e[c]instanceof MovePage||e[c]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(e))}; -Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),l=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!= -a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"=== +Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!= +a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"=== typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}}; Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold", null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math", @@ -3482,17 +3479,17 @@ Graph.prototype.addExtFont=function(a,b,e){if(a&&b){var d="extFont_"+a;if(null== d=!0;for(k=0;k<e.length;k++)if(e[k].name==a){d=!1;break}d&&this.extFonts.push({name:a,url:b})}}}; EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var e=this.editor.extractGraphModel(a.node,null,b),d=Editor.extractParserError(e);if(d)throw Error(d);null!=e?(a.graphModelNode=e,a.viewState=this.editor.graph.createViewState(e),d=new mxCodec(e.ownerDocument),a.root=d.decode(e).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){e=this.editor.extractGraphModel(a.node);if(d=Editor.extractParserError(e))throw Error(d);null!=e&&(a.graphModelNode= e)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a}; -EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(l){this.handleError(l)}}; +EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(m){this.handleError(m)}}; EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))}; EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a}; EditorUi.prototype.createPage=function(a,b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e}; EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(k){this.handleError(k)}return a}; -EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(l){this.handleError(l)}return e}; +EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return e}; EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))}; EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a}; EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- -e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k= -null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage,l+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab(); +e)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k= +null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],d,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab(); this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var q=this.createControlTab(4," ❮ ");q.style.position="absolute";q.style.right=this.editor.chromeless?"29px":"55px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=this.createControlTab(4," ❯"); c.style.position="absolute";c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=f+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,0<b.scrollLeft?100: 50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; @@ -3503,9 +3500,9 @@ EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'< 0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var d=this.currentPage;null!=d&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this, function(){this.removePage(d)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d= mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; -EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),l=a.getId();e.setAttribute("title",k+(null!=l?" ("+l+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; -EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var c=mxEvent.getClientX(l),f=mxEvent.getClientY(l);q.popup(c,f,null,l);this.setCurrentMenu(q,b)}mxEvent.consume(l)}}))}; +EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; +EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu(); +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var c=mxEvent.getClientX(m),f=mxEvent.getClientY(m);q.popup(c,f,null,m);this.setCurrentMenu(q,b)}mxEvent.consume(m)}}))}; EditorUi.prototype.getLinkForPage=function(a){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var e=this.getSearch("create title mode url drive splash state".split(" ")),e=e+((0==e.length?"?":"&")+"page-id="+a.getId());return window.location.protocol+"//"+window.location.host+"/"+e+"#"+b.getHash()}}return null}; EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);var k=this.getLinkForPage(a);null!=k&&(e.addSeparator(d),e.addItem(mxResources.get("link"),null, mxUtils.bind(this,function(){var a=new EmbedDialog(this,k);this.showDialog(a.container,440,240,!0,!0);a.init()}),d));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(d),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null, @@ -3513,42 +3510,42 @@ null,null,!0,!0))}),d))})};(function(){var a=EditorUi.prototype.refresh;EditorUi (function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})(); (function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b, a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState")); -b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,l,q,c){e=null!=e?e:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var d=l.slice(),g=[],k=0;k<l.length;k++){var m=this.getCurrentCellStyle(l[k]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(l[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=l[k]&&g.push(a);return a== -l[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(l[k],b))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!b);l=d;l=a.apply(this,arguments)}finally{this.model.endUpdate()}return l};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return u.isVertex(a)&&e(a)}function b(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving); +b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,m,q,c){e=null!=e?e:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var d=m.slice(),g=[],k=0;k<m.length;k++){var l=this.getCurrentCellStyle(m[k]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(m[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=m[k]&&g.push(a);return a== +m[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[k],b))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!b);m=d;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return u.isVertex(a)&&e(a)}function b(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving); return b}function e(a){var b=!1;null!=a&&(a=u.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=u.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function c(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y== -a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=c(a),l=d.geometry;g==mxConstants.DIRECTION_SOUTH|| -g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=l.x,f[1].geometry.y-=l.y);var k=t.view.getState(a),m=t.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0], -!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,u=l=e=0;u<p.length;u++){var z=t.model.getTerminal(p[u],!1);if(g==c(z)){var x=t.view.getState(z);z!=a&&null!=x&&(q&&b!=x.getCenterX()<k.getCenterX()||!q&&b!=x.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,x)&&(e=10+Math.max(e,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/m),l=10+Math.max(l,(Math.min(n.y+n.height,x.y+x.height)-Math.max(n.y,x.y))/m))}}q?l=0:e=0;for(u=0;u<p.length;u++)if(z=t.model.getTerminal(p[u], -!1),g==c(z)&&(x=t.view.getState(z),z!=a&&null!=x&&(q&&b!=x.getCenterX()<k.getCenterX()||!q&&b!=x.getCenterY()<k.getCenterY()))){var v=[];t.traverse(x.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});t.moveCells(v,(b?1:-1)*e,(b?1:-1)*l)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var b=c(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1); -var f=t.model.getParent(a),g=f.geometry,l=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&l.push(b);l.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(l,k,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,b){t.model.beginUpdate();try{var d= -t.model.getParent(a),e=t.getIncomingEdges(a),f=c(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=b);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var l=t.getCellStyle(g[1]).newEdgeStyle;if(null!=l)try{var k=JSON.parse(l),m;for(m in k)t.setCellStyles(m,k[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH? -"vertical":"horizontal",[g[0]])}catch(U){}}var e=t.getOutgoingEdges(a),n=d.geometry,l=[];t.view.currentRoot==d&&(n=new mxRectangle);for(k=0;k<e.length;k++){var p=t.model.getTerminal(e[k],!1);null!=p&&l.push(p)}var q=t.view.getBounds(l),u=t.view.translate,x=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/x-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x= -null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/x-u.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/x-u.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function m(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d= +a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=c(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH|| +g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0], +!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,u=k=e=0;u<p.length;u++){var z=t.model.getTerminal(p[u],!1);if(g==c(z)){var x=t.view.getState(z);z!=a&&null!=x&&(q&&b!=x.getCenterX()<l.getCenterX()||!q&&b!=x.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,x)&&(e=10+Math.max(e,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,x.y+x.height)-Math.max(n.y,x.y))/m))}}q?k=0:e=0;for(u=0;u<p.length;u++)if(z=t.model.getTerminal(p[u], +!1),g==c(z)&&(x=t.view.getState(z),z!=a&&null!=x&&(q&&b!=x.getCenterX()<l.getCenterX()||!q&&b!=x.getCenterY()<l.getCenterY()))){var v=[];t.traverse(x.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});t.moveCells(v,(b?1:-1)*e,(b?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var b=c(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1); +var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,b){t.model.beginUpdate();try{var d= +t.model.getParent(a),e=t.getIncomingEdges(a),f=c(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=b);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH? +"vertical":"horizontal",[g[0]])}catch(T){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),u=t.view.translate,x=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/x-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x= +null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/x-u.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/x-u.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function l(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d= [];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var d=c(a),e=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=b?v.actions.get("selectParent").funct(): -d==b?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=m(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,u=t.getModel(),F=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){F.apply(this,arguments); +d==b?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=l(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,u=t.getModel(),A=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){A.apply(this,arguments); if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a); if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent", function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var B=t.removeCells;t.removeCells=function(b,c){c=null!= -c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];u.isEdge(g)&&e(g)&&(d.push(g),g=u.getTerminal(g,!1));if(a(g)){var l=[];t.traverse(g,!0,function(a,b){null!=b&&l.push(b);l.push(a);return!0});0<l.length&&(d=d.concat(l),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return B.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c, -d))};var C=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var l=C.call(this,b,c);if(l.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var k=t.getIncomingEdges(l[e]),g=t.getIncomingEdges(b[e]);if(0==k.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m, -t.getDefaultParent(),this.model.getTerminal(g[0],!0),l[e])}}}finally{this.model.endUpdate()}return l};var A=t.moveCells;t.moveCells=function(b,c,d,e,f,g,l){var k=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]); -if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var x=t.view.getState(m);null!=x&&(c=(x.getCenterX()-u.getCenterX())/t.view.scale,d=(x.getCenterY()-u.getCenterY())/t.view.scale)}}}}k=A.apply(this,arguments);if(null!=k&&null!=b&&k.length==b.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))a(m)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b, -this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(k[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,k[p])}}finally{this.model.endUpdate()}return k};if(null!=v.sidebar){var x=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),a(b))for(var l=0;l<g.length;l++)if(f.isEdge(g[l])&& -null==f.getTerminal(g[l],!0)){f.setTerminal(g[l],b,!0);var k=t.getCellGeometry(g[l]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&& -(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=f(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode]; -null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var D=t.connectVertex;t.connectVertex= -function(b,d,e,l,k,m){var n=t.getIncomingEdges(b);return a(b)?(e=c(b),l=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d||0==n.length?p(b,d):l==k?g(b):f(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):D.call(this,b,d,e,l,k,m)};t.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||q(c)||t.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d}; +c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];u.isEdge(g)&&e(g)&&(d.push(g),g=u.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return B.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c, +d))};var D=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=D.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m, +t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]); +if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var x=t.view.getState(m);null!=x&&(c=(x.getCenterX()-u.getCenterX())/t.view.scale,d=(x.getCenterY()-u.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b, +this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var x=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&& +null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var F={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&& +(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=f(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=F[b.keyCode]; +null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(I){v.handleError(I)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var E=t.connectVertex;t.connectVertex= +function(b,d,e,k,l,m){var n=t.getIncomingEdges(b);return a(b)?(e=c(b),k=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d||0==n.length?p(b,d):k==l?g(b):f(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):E.call(this,b,d,e,k,l,m)};t.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||q(c)||t.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d}; var J=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){J.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle), -mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this,arguments);null!=this.moveHandle&& +mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&& (this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!= this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=e.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140, 60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative= !0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0; b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);e.insertEdge(k,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);m.insertEdge(n,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(n);a.insert(t);a.insert(b);a.insert(c);a.insert(e);a.insert(m);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;'); +k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);e.insertEdge(k,!1);var l=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');l.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);l.insertEdge(n,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0, +0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(n);a.insert(t);a.insert(b);a.insert(c);a.insert(e);a.insert(l);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;'); a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};'); a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};'); @@ -3566,13 +3563,13 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0, 0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(null!=b?b:!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+ -(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(u){}var k=function(a,b,c,d,e,f,g){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";g(l);this.window=new mxWindow(b,l,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); +(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(u){}var k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&& (this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src; mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR= "#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor= -"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer; -EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");l.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var c=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900> +"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer; +EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var c=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900> e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):c.apply(this,arguments)};var f=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){f.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat= "no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var g=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){g.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;"; a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a"); @@ -3581,9 +3578,9 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt "geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var p=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators= !0;p.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-", "lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow? -this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&& +this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&& (this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(), -this.menus.findWindow=null);m.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))}; +this.menus.findWindow=null);l.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))}; EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...", function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...", function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b); @@ -3593,32 +3590,32 @@ b);c.menus.addMenuItems(a,["-","find","tags"],b);null!=d&&null!=c.fileNode&&(d=n null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));c.menus.addMenuItems(a,["-","autosave"],b);null!=d&&d.isRevisionHistorySupported()&&c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this, function(a,b){e.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var f=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=f&&c.menus.addSubmenu("language",a,b);c.menus.addSubmenu("units",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage|| mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a, -d){b.apply(this,arguments);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):l(a,b,mxResources.get(g[c])+ +d){b.apply(this,arguments);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+ "...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a, -b,c){var d=k.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition= +b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition= "center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding= -"6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?n.insertBefore(g,k.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g, +"6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g, "click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight= -"6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=k.statusContainer?n.insertBefore(c,k.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=b}p=n.firstChild;e= -window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>e)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),k.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),k.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+": -null),d(mxResources.get("format"),k.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+k.actions.get("formatPanel").shortcut+")",k.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==": -null)],a?60:null);b=c("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([b,d(mxResources.get("delete"),k.actions.get("delete").funct,null,mxResources.get("delete"),k.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==": -null)],a?60:null);if(411<=e&&(b=k.actions.get("undo"),a=k.actions.get("redo"),b=d("",b.funct,null,mxResources.get("undo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("", -a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),f([b,a],60),480<=e)){var a=k.actions.get("zoomIn"),b=k.actions.get("zoomOut"),g=k.actions.get("resetView"); -f([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), +"6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=b}p=n.firstChild;e= +window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>e)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+": +null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==": +null)],a?60:null);b=c("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([b,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==": +null)],a?60:null);if(411<=e&&(b=l.actions.get("undo"),a=l.actions.get("redo"),b=d("",b.funct,null,mxResources.get("undo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("", +a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),f([b,a],60),480<=e)){var a=l.actions.get("zoomIn"),b=l.actions.get("zoomOut"),g=l.actions.get("resetView"); +f([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), 640<=e?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="): null,640<=e?d("",b.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="): -null],60)}a=k.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==P&&(b=q.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor= -"pointer",b.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(b),P=b),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=P&&(P.parentNode.removeChild(P),P=null))}t.apply(this,arguments);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);(1E3<=e||null!=urlParams.clibs|| -null!=urlParams.libs)&&b(this,!0);1E3<=e&&a(this,!0);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(k,n);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position= -"relative";k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var v=k.descriptorChanged;k.descriptorChanged=function(){v.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"== -b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};k.setStatusText(k.editor.getStatus());n.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(k.buttonContainer);k.menubarContainer= -k.buttonContainer;k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var l=k.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var K= -k.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var z=q.addMenu("100%",K.funct);z.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");z.style.whiteSpace="nowrap";z.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";z.style.backgroundPosition="right 6px center";z.style.backgroundRepeat="no-repeat";z.style.backgroundColor="#ffffff";z.style.paddingRight="10px";z.style.display="block";z.style.position="absolute";z.style.textDecoration="none";z.style.textDecoration= -"none";z.style.right="0px";z.style.bottom="0px";z.style.overflow="hidden";z.style.visibility="hidden";z.style.textAlign="center";z.style.color="#000";z.style.fontSize="12px";z.style.color="#707070";z.style.width="59px";z.style.cursor="pointer";z.style.borderTop="1px solid lightgray";z.style.borderLeft="1px solid lightgray";z.style.height=parseInt(k.tabContainerHeight)-1+"px";z.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";y.appendChild(z);K=mxUtils.bind(this,function(){z.innerHTML=Math.round(100* -k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);k.editor.addListener("resetGraphView",K);k.editor.addListener("pageSelected",K);var L=k.setGraphEnabled;k.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(z.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}y.appendChild(k.tabContainer);y.appendChild(n);y.appendChild(k.diagramContainer); -l.appendChild(y);k.updateTabContainer();var P=null;g();mxEvent.addListener(window,"resize",function(){g();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}}; -(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,l,q){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=l;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; +null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(b=q.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor= +"pointer",b.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(b),O=b),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=e||null!=urlParams.clibs|| +null!=urlParams.libs)&&b(this,!0);1E3<=e&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position= +"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"== +b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer= +l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K= +l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var z=q.addMenu("100%",K.funct);z.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");z.style.whiteSpace="nowrap";z.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";z.style.backgroundPosition="right 6px center";z.style.backgroundRepeat="no-repeat";z.style.backgroundColor="#ffffff";z.style.paddingRight="10px";z.style.display="block";z.style.position="absolute";z.style.textDecoration="none";z.style.textDecoration= +"none";z.style.right="0px";z.style.bottom="0px";z.style.overflow="hidden";z.style.visibility="hidden";z.style.textAlign="center";z.style.color="#000";z.style.fontSize="12px";z.style.color="#707070";z.style.width="59px";z.style.cursor="pointer";z.style.borderTop="1px solid lightgray";z.style.borderLeft="1px solid lightgray";z.style.height=parseInt(l.tabContainerHeight)-1+"px";z.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";y.appendChild(z);K=mxUtils.bind(this,function(){z.innerHTML=Math.round(100* +l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(z.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}y.appendChild(l.tabContainer);y.appendChild(n);y.appendChild(l.diagramContainer); +k.appendChild(y);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}}; +(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,m,q){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1; GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100; GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!= @@ -3630,7 +3627,7 @@ mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement, [];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning= !0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph); this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver|| -window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a}; +window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a}; GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))}; GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))}; GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})}; @@ -3639,27 +3636,27 @@ d="relative"===document.body.style.position?document.body.getBoundingClientRect( this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");e=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(), this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size", d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)), -!this.zoomEnabled&&this.autoFit){var l=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(l);this.handlingResize||(l=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth= +!this.zoomEnabled&&this.autoFit){var m=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth= "100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>d)){var e=null;null!=d&&b.height+2*this.graph.border>d-2&&(e=(d-2*this.graph.border-2)/b.height);this.fitGraph(e)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale), Math.floor(this.graph.border-b.y/this.graph.view.scale)),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"}; GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"}; -GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var l=null!=b?b.getModel():null,q=a.getModel();q.beginUpdate();try{for(var c=q.getChildCount(q.root),f=0;f<c;f++)q.setVisible(q.getChildAt(q.root,f),null!=b?l.isVisible(l.getChildAt(l.root,f)):!1);if(null==l)if(k)for(f=0;f<d.length;f++)q.setVisible(q.getCell(d[f]),!0);else for(f=0;f<e.length;f++)q.setVisible(q.getChildAt(q.root, +GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,q=a.getModel();q.beginUpdate();try{for(var c=q.getChildCount(q.root),f=0;f<c;f++)q.setVisible(q.getChildAt(q.root,f),null!=b?m.isVisible(m.getChildAt(m.root,f)):!1);if(null==m)if(k)for(f=0;f<d.length;f++)q.setVisible(q.getCell(d[f]),!0);else for(f=0;f<e.length;f++)q.setVisible(q.getChildAt(q.root, parseInt(e[f])),!0)}finally{q.endUpdate()}}}; GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave", function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);p++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; -e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this, -function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER? +e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this, +function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER? "pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var c=this.graph,f=c.getTolerance();c.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY(); -this.scrollLeft=c.container.scrollLeft;this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<f&&Math.abs(this.scrollTop-c.container.scrollTop)<f&&Math.abs(this.startX-b.getGraphX())<f&&Math.abs(this.startY-b.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?l():q(30))}})}for(var g=this.toolbarItems,p=0,m=null,n=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){n=b.ownerDocument.createElement("div"); -n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";e.appendChild(n);var F=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ -1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");F.style.paddingLeft="0px";F.style.paddingRight="0px";t=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";u.style.display=n.style.display;F.style.display=n.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, -mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var B=this.graph.getModel(),C=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m), -m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=C.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+ -"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");B.addListener(mxEvent.CHANGE,function(){C.style.display=1<B.getChildCount(B.root)?"inline-block":"none"});C.style.display=1<B.getChildCount(B.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t], +this.scrollLeft=c.container.scrollLeft;this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<f&&Math.abs(this.scrollTop-c.container.scrollTop)<f&&Math.abs(this.startX-b.getGraphX())<f&&Math.abs(this.startY-b.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,l=null,n=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){n=b.ownerDocument.createElement("div"); +n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";e.appendChild(n);var A=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ +1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");A.style.paddingLeft="0px";A.style.paddingRight="0px";t=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";u.style.display=n.style.display;A.style.display=n.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, +mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var B=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=l)l.parentNode.removeChild(l), +l=null;else{l=this.graph.createLayersDialog();mxEvent.addListener(l,"mouseleave",function(){l.parentNode.removeChild(l);l=null});a=D.getBoundingClientRect();l.style.width="140px";l.style.padding="2px 0px 2px 0px";l.style.border="1px solid #d0d0d0";l.style.backgroundColor="#eee";l.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";l.style.fontSize="11px";l.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(l,80);var b=mxUtils.getDocumentScrollOrigin(document);l.style.left=b.x+a.left+ +"px";l.style.top=b.y+a.bottom+"px";document.body.appendChild(l)}}),Editor.layersImage,mxResources.get("layers")||"Layers");B.addListener(mxEvent.CHANGE,function(){D.style.display=1<B.getChildCount(B.root)?"inline-block":"none"});D.style.display=1<B.getChildCount(B.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t], null!=t&&a(null==t.enabled||t.enabled?t.handler:function(){},t.image,t.title,t.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*p);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g, -70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*p;var A=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left- -c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=m&&(m.parentNode.removeChild(m), -m=null);b.style.border=A});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()}; +70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*p;var C=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left- +c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==C&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l), +l=null);b.style.border=C});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==l)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()}; GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&& a.customLinkClicked(d)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))}; GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&& @@ -3668,8 +3665,8 @@ e.drawdev="1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/# GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b); var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length? this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId= -"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var l=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled= -!0;q.apply(this,arguments)};var c=k.editor.graph,f=c.container;f.style.overflow="hidden";this.lightboxChrome?(f.style.border="1px solid #c0c0c0",f.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",l)):(b.style.display="none",e.style.display="none");var g=this;c.getImageFromBundles=function(a){return g.getImageUrl(a)};var p=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=p.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a}; +"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled= +!0;q.apply(this,arguments)};var c=k.editor.graph,f=c.container;f.style.overflow="hidden";this.lightboxChrome?(f.style.border="1px solid #c0c0c0",f.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var g=this;c.getImageFromBundles=function(a){return g.getImageUrl(a)};var p=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=p.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a}; this.graphConfig.move&&(c.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(f.style,"border-radius","4px"),f.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(f.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(f.style,"transition","all .25s ease-in-out"));this.addClickHandler(c,k);window.setTimeout(mxUtils.bind(this,function(){f.style.outline="none"; f.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(f);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(f.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(f.style.position="absolute",f.style.display="block",f.style.left= a.x+"px",f.style.top=a.y+"px",f.style.width=document.body.clientWidth-80+"px",f.style.height=document.body.clientHeight-80+"px",f.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(c,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k}; @@ -3679,9 +3676,9 @@ GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassNam GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}}; GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}}; GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; -(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached= +(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached= new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,E,G,D=function(){if((E=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)m=!0,p=E,q=G;g()},J=function(a,b,c){a.attachEvent? -a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",D);J(f,"scroll",D)}var c=function(){GraphViewer.resizeSensorEnabled&&d()},f=Object.prototype.toString.call(e),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(g)for(var f=0,p=e.length;f<p;f++)q(e[f],c);else q(e,c);this.detach=function(){if(g)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; +b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var l=!1,n=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(n))};a(n);var p,q,F,G,E=function(){if((F=b.offsetWidth)!=p||(G=b.offsetHeight)!=q)l=!0,p=F,q=G;g()},J=function(a,b,c){a.attachEvent? +a.attachEvent("on"+b,c):a.addEventListener(b,c)};J(d,"scroll",E);J(f,"scroll",E)}var c=function(){GraphViewer.resizeSensorEnabled&&d()},f=Object.prototype.toString.call(e),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(g)for(var f=0,p=e.length;f<p;f++)q(e[f],c);else q(e,c);this.detach=function(){if(g)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js index 0c1e9dec0..94c61de89 100644 --- a/src/main/webapp/service-worker.js +++ b/src/main/webapp/service-worker.js @@ -6,11 +6,11 @@ if (workbox) workbox.precaching.precacheAndRoute([ { "url": "js/app.min.js", - "revision": "893a2614b11aec42f563c307818eac5c" + "revision": "31ef97ea7228e3d7ceb877ee7fe69503" }, { "url": "js/extensions.min.js", - "revision": "befa93c9f4f16312a26fb8d5450061cd" + "revision": "b6311ad55b3030c29977e2d8689eaa8e" }, { "url": "js/stencils.min.js", -- GitLab